PR python/14635:
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb
RW
593LIBOBJS
594GDB_NM_FILE
595frags
596target_subdir
597CONFIG_UNINSTALL
598CONFIG_INSTALL
599CONFIG_CLEAN
600CONFIG_ALL
601CONFIG_SRCS
602CONFIG_DEPS
603CONFIG_OBS
604PROFILE_CFLAGS
605ENABLE_CFLAGS
606SIM_OBS
607SIM
608XMKMF
609GDBTK_SRC_DIR
610GDBTK_CFLAGS
611GDBTKLIBS
612X_LIBS
613X_LDFLAGS
614X_CFLAGS
615TK_XINCLUDES
616TK_DEPS
617TK_LIBRARY
618TK_INCLUDE
619TK_STUB_LIB_SPEC
620TK_STUB_LIB_FLAG
621TK_STUB_LIB_FILE
622TK_LIB_SPEC
623TK_LIB_FLAG
624TK_LIB_FILE
625TK_SRC_DIR
626TK_BIN_DIR
627TK_VERSION
628TCL_DEPS
629TCL_LIBRARY
630TCL_INCLUDE
631TCL_STUB_LIB_SPEC
632TCL_STUB_LIB_FLAG
633TCL_STUB_LIB_FILE
634TCL_LIB_SPEC
635TCL_LIB_FLAG
636TCL_LIB_FILE
637TCL_SRC_DIR
638TCL_BIN_DIR
639TCL_PATCH_LEVEL
640TCL_VERSION
641WIN32LDAPP
642GUI_CFLAGS_X
643LIBGUI
644WIN32LIBS
645SER_HARDWIRE
646WERROR_CFLAGS
647WARN_CFLAGS
648SYSTEM_GDBINIT
81ecdfbb
RW
649TARGET_SYSTEM_ROOT
650CONFIG_LDFLAGS
f6528abd 651RDYNAMIC
81ecdfbb 652ALLOCA
ac534cba
JB
653PYTHON_LIBS
654PYTHON_CPPFLAGS
81ecdfbb 655PYTHON_CFLAGS
ec685c5e 656python_prog_path
81ecdfbb
RW
657LTLIBEXPAT
658LIBEXPAT
659HAVE_LIBEXPAT
b8e0a31c 660JIT_READER_DIR
f997c383 661TARGET_PTR
39037522 662READLINE_TEXI_INCFLAG
81ecdfbb
RW
663READLINE_CFLAGS
664READLINE_DEPS
665READLINE
666MIG
667WINDRES
668DLLTOOL
c971b7fa 669AR
81ecdfbb
RW
670YFLAGS
671YACC
c971b7fa 672RANLIB
81ecdfbb 673LN_S
c971b7fa
PA
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677AWK
81ecdfbb
RW
678REPORT_BUGS_TEXI
679REPORT_BUGS_TO
680PKGVERSION
681TARGET_OBS
682subdirs
683GDB_DATADIR
684DEBUGDIR
5048e516
JK
685MAKEINFO_EXTRA_FLAGS
686MAKEINFOFLAGS
687MAKEINFO
81ecdfbb
RW
688PACKAGE
689GNULIB_STDINT_H
81ecdfbb
RW
690CATOBJEXT
691GENCAT
692INSTOBJEXT
693DATADIRNAME
694CATALOGS
695POSUB
696GMSGFMT
697XGETTEXT
698INCINTL
699LIBINTL_DEP
700LIBINTL
701USE_NLS
702SET_MAKE
703GMAKE_FALSE
704GMAKE_TRUE
705MAKE
706CCDEPMODE
707DEPDIR
708am__leading_dot
709target_os
710target_vendor
711target_cpu
712target
713host_os
714host_vendor
715host_cpu
716host
717build_os
718build_vendor
719build_cpu
720build
c971b7fa
PA
721EGREP
722GREP
723CPP
81ecdfbb
RW
724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731MAINT
732MAINTAINER_MODE_FALSE
733MAINTAINER_MODE_TRUE
734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
a4ce5b0d 772ac_subst_files='host_makefile_frag'
81ecdfbb
RW
773ac_user_opts='
774enable_option_checking
775enable_maintainer_mode
da2f07f1
JK
776enable_plugins
777enable_largefile
81ecdfbb
RW
778with_separate_debug_dir
779with_gdb_datadir
780with_relocated_sources
7349ff92 781with_auto_load_dir
bccbefd2 782with_auto_load_safe_path
81ecdfbb
RW
783enable_targets
784enable_64_bit_bfd
785enable_gdbcli
786enable_gdbmi
787enable_tui
788enable_gdbtk
05e7c244 789with_libunwind_ia64
81ecdfbb
RW
790with_curses
791enable_profiling
792with_pkgversion
793with_bugurl
b040ad30 794with_zlib
81ecdfbb 795with_libiconv_prefix
478aac75 796with_iconv_bin
81ecdfbb 797with_system_readline
b8e0a31c 798with_jit_reader_dir
81ecdfbb
RW
799with_expat
800with_gnu_ld
801enable_rpath
802with_libexpat_prefix
803with_python
a8db4212 804enable_libmcheck
81ecdfbb
RW
805with_included_regex
806with_sysroot
807with_system_gdbinit
808enable_werror
809enable_build_warnings
810enable_gdb_build_warnings
811with_tcl
812with_tk
813with_x
814enable_sim
815enable_multi_ice
496c0e1b 816enable_gdbserver
81ecdfbb
RW
817'
818 ac_precious_vars='build_alias
819host_alias
820target_alias
821CC
822CFLAGS
823LDFLAGS
824LIBS
825CPPFLAGS
826CPP
f06e05e0
JK
827MAKEINFO
828MAKEINFOFLAGS
81ecdfbb
RW
829YACC
830YFLAGS
831XMKMF'
5ae98d25 832ac_subdirs_all='testsuite
81ecdfbb
RW
833gdbtk
834multi-ice
835gdbserver'
c906108c
SS
836
837# Initialize some variables set by options.
bec39cab
AC
838ac_init_help=
839ac_init_version=false
81ecdfbb
RW
840ac_unrecognized_opts=
841ac_unrecognized_sep=
c906108c
SS
842# The variables have the same names as the options, with
843# dashes changed to underlines.
bec39cab 844cache_file=/dev/null
c906108c 845exec_prefix=NONE
c906108c 846no_create=
c906108c
SS
847no_recursion=
848prefix=NONE
849program_prefix=NONE
850program_suffix=NONE
851program_transform_name=s,x,x,
852silent=
853site=
854srcdir=
c906108c
SS
855verbose=
856x_includes=NONE
857x_libraries=NONE
bec39cab
AC
858
859# Installation directory options.
860# These are left unexpanded so users can "make install exec_prefix=/foo"
861# and all the variables that are supposed to be based on exec_prefix
862# by default will actually change.
863# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 864# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
865bindir='${exec_prefix}/bin'
866sbindir='${exec_prefix}/sbin'
867libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
868datarootdir='${prefix}/share'
869datadir='${datarootdir}'
c906108c
SS
870sysconfdir='${prefix}/etc'
871sharedstatedir='${prefix}/com'
872localstatedir='${prefix}/var'
c906108c
SS
873includedir='${prefix}/include'
874oldincludedir='/usr/include'
81ecdfbb
RW
875docdir='${datarootdir}/doc/${PACKAGE}'
876infodir='${datarootdir}/info'
877htmldir='${docdir}'
878dvidir='${docdir}'
879pdfdir='${docdir}'
880psdir='${docdir}'
881libdir='${exec_prefix}/lib'
882localedir='${datarootdir}/locale'
883mandir='${datarootdir}/man'
c906108c 884
c906108c 885ac_prev=
81ecdfbb 886ac_dashdash=
c906108c
SS
887for ac_option
888do
c906108c
SS
889 # If the previous option needs an argument, assign it.
890 if test -n "$ac_prev"; then
81ecdfbb 891 eval $ac_prev=\$ac_option
c906108c
SS
892 ac_prev=
893 continue
894 fi
895
81ecdfbb
RW
896 case $ac_option in
897 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
898 *) ac_optarg=yes ;;
899 esac
c906108c
SS
900
901 # Accept the important Cygnus configure options, so we can diagnose typos.
902
81ecdfbb
RW
903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
c906108c
SS
906
907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 910 bindir=$ac_optarg ;;
c906108c
SS
911
912 -build | --build | --buil | --bui | --bu)
bec39cab 913 ac_prev=build_alias ;;
c906108c 914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 915 build_alias=$ac_optarg ;;
c906108c
SS
916
917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
c906108c 926
81ecdfbb 927 -datadir | --datadir | --datadi | --datad)
c906108c 928 ac_prev=datadir ;;
81ecdfbb 929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 930 datadir=$ac_optarg ;;
c906108c 931
81ecdfbb
RW
932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
c906108c 939 -disable-* | --disable-*)
81ecdfbb 940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 941 # Reject names that are not valid shell variable names.
81ecdfbb
RW
942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
943 as_fn_error "invalid feature name: $ac_useropt"
944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
954
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
959
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
c906108c
SS
964
965 -enable-* | --enable-*)
81ecdfbb 966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 967 # Reject names that are not valid shell variable names.
81ecdfbb
RW
968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969 as_fn_error "invalid feature name: $ac_useropt"
970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
b4e70030 978 esac
81ecdfbb 979 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
980
981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
bec39cab 988 exec_prefix=$ac_optarg ;;
c906108c
SS
989
990 -gas | --gas | --ga | --g)
991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
993
bec39cab
AC
994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
c906108c
SS
1000
1001 -host | --host | --hos | --ho)
bec39cab 1002 ac_prev=host_alias ;;
c906108c 1003 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1004 host_alias=$ac_optarg ;;
c906108c 1005
81ecdfbb
RW
1006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
1011
c906108c
SS
1012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1017 includedir=$ac_optarg ;;
c906108c
SS
1018
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1022 infodir=$ac_optarg ;;
c906108c
SS
1023
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1027 libdir=$ac_optarg ;;
c906108c
SS
1028
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
bec39cab 1034 libexecdir=$ac_optarg ;;
c906108c 1035
81ecdfbb
RW
1036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
1040
c906108c 1041 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1042 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1046 localstatedir=$ac_optarg ;;
c906108c
SS
1047
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1051 mandir=$ac_optarg ;;
c906108c
SS
1052
1053 -nfp | --nfp | --nf)
1054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
1056
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1058 | --no-cr | --no-c | -n)
c906108c
SS
1059 no_create=yes ;;
1060
1061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
1064
1065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1072 oldincludedir=$ac_optarg ;;
c906108c
SS
1073
1074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1077 prefix=$ac_optarg ;;
c906108c
SS
1078
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1084 program_prefix=$ac_optarg ;;
c906108c
SS
1085
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1091 program_suffix=$ac_optarg ;;
c906108c
SS
1092
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1108 program_transform_name=$ac_optarg ;;
c906108c 1109
81ecdfbb
RW
1110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
1114
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
1119
c906108c
SS
1120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
1123
1124 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1125 ac_prev=sbindir ;;
1126 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1127 | --sbi=* | --sb=*)
bec39cab 1128 sbindir=$ac_optarg ;;
c906108c
SS
1129
1130 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1131 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1132 | --sharedst | --shareds | --shared | --share | --shar \
1133 | --sha | --sh)
1134 ac_prev=sharedstatedir ;;
1135 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1136 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1137 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1138 | --sha=* | --sh=*)
bec39cab 1139 sharedstatedir=$ac_optarg ;;
c906108c
SS
1140
1141 -site | --site | --sit)
1142 ac_prev=site ;;
1143 -site=* | --site=* | --sit=*)
bec39cab 1144 site=$ac_optarg ;;
3ace7edb 1145
c906108c
SS
1146 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1147 ac_prev=srcdir ;;
1148 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1149 srcdir=$ac_optarg ;;
c906108c
SS
1150
1151 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1152 | --syscon | --sysco | --sysc | --sys | --sy)
1153 ac_prev=sysconfdir ;;
1154 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1155 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1156 sysconfdir=$ac_optarg ;;
c906108c
SS
1157
1158 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1159 ac_prev=target_alias ;;
c906108c 1160 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1161 target_alias=$ac_optarg ;;
c906108c
SS
1162
1163 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1164 verbose=yes ;;
1165
bec39cab
AC
1166 -version | --version | --versio | --versi | --vers | -V)
1167 ac_init_version=: ;;
c906108c
SS
1168
1169 -with-* | --with-*)
81ecdfbb 1170 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1171 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173 as_fn_error "invalid package name: $ac_useropt"
1174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
b4e70030 1182 esac
81ecdfbb 1183 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1184
1185 -without-* | --without-*)
81ecdfbb 1186 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1187 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189 as_fn_error "invalid package name: $ac_useropt"
1190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=no ;;
c906108c
SS
1200
1201 --x)
1202 # Obsolete; use --with-x.
1203 with_x=yes ;;
1204
1205 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1206 | --x-incl | --x-inc | --x-in | --x-i)
1207 ac_prev=x_includes ;;
1208 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1209 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1210 x_includes=$ac_optarg ;;
c906108c
SS
1211
1212 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1213 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1214 ac_prev=x_libraries ;;
1215 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1216 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1217 x_libraries=$ac_optarg ;;
c906108c 1218
81ecdfbb
RW
1219 -*) as_fn_error "unrecognized option: \`$ac_option'
1220Try \`$0 --help' for more information."
c906108c
SS
1221 ;;
1222
bec39cab
AC
1223 *=*)
1224 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1225 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1226 case $ac_envvar in #(
1227 '' | [0-9]* | *[!_$as_cr_alnum]* )
1228 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1229 esac
1230 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1231 export $ac_envvar ;;
1232
c906108c 1233 *)
bec39cab 1234 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1235 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1236 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1237 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1238 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1239 ;;
1240
1241 esac
1242done
1243
1244if test -n "$ac_prev"; then
bec39cab 1245 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1246 as_fn_error "missing argument to $ac_option"
c906108c 1247fi
c906108c 1248
81ecdfbb
RW
1249if test -n "$ac_unrecognized_opts"; then
1250 case $enable_option_checking in
1251 no) ;;
1252 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1253 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1254 esac
81ecdfbb 1255fi
b4e70030 1256
81ecdfbb
RW
1257# Check all directory arguments for consistency.
1258for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1259 datadir sysconfdir sharedstatedir localstatedir includedir \
1260 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1261 libdir localedir mandir
b4e70030 1262do
81ecdfbb
RW
1263 eval ac_val=\$$ac_var
1264 # Remove trailing slashes.
1265 case $ac_val in
1266 */ )
1267 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1268 eval $ac_var=\$ac_val;;
1269 esac
1270 # Be sure to have absolute directory names.
b4e70030 1271 case $ac_val in
81ecdfbb
RW
1272 [\\/$]* | ?:[\\/]* ) continue;;
1273 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1274 esac
81ecdfbb 1275 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1276done
1277
bec39cab
AC
1278# There might be people who depend on the old broken behavior: `$host'
1279# used to hold the argument of --host etc.
1280# FIXME: To remove some day.
1281build=$build_alias
1282host=$host_alias
1283target=$target_alias
1284
1285# FIXME: To remove some day.
1286if test "x$host_alias" != x; then
1287 if test "x$build_alias" = x; then
1288 cross_compiling=maybe
81ecdfbb 1289 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1290 If a cross compiler is detected then cross compile mode will be used." >&2
1291 elif test "x$build_alias" != "x$host_alias"; then
1292 cross_compiling=yes
1293 fi
1294fi
c906108c 1295
bec39cab
AC
1296ac_tool_prefix=
1297test -n "$host_alias" && ac_tool_prefix=$host_alias-
1298
1299test "$silent" = yes && exec 6>/dev/null
c906108c 1300
c906108c 1301
81ecdfbb
RW
1302ac_pwd=`pwd` && test -n "$ac_pwd" &&
1303ac_ls_di=`ls -di .` &&
1304ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1305 as_fn_error "working directory cannot be determined"
1306test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1307 as_fn_error "pwd does not report name of working directory"
1308
1309
c906108c
SS
1310# Find the source files, if location was not specified.
1311if test -z "$srcdir"; then
1312 ac_srcdir_defaulted=yes
81ecdfbb
RW
1313 # Try the directory containing this script, then the parent directory.
1314 ac_confdir=`$as_dirname -- "$as_myself" ||
1315$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1316 X"$as_myself" : 'X\(//\)[^/]' \| \
1317 X"$as_myself" : 'X\(//\)$' \| \
1318 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1319$as_echo X"$as_myself" |
1320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)[^/].*/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\/\)$/{
1329 s//\1/
1330 q
1331 }
1332 /^X\(\/\).*/{
1333 s//\1/
1334 q
1335 }
1336 s/.*/./; q'`
c906108c 1337 srcdir=$ac_confdir
81ecdfbb 1338 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1339 srcdir=..
1340 fi
1341else
1342 ac_srcdir_defaulted=no
1343fi
81ecdfbb
RW
1344if test ! -r "$srcdir/$ac_unique_file"; then
1345 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1346 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1347fi
1348ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1349ac_abs_confdir=`(
1350 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1351 pwd)`
1352# When building in place, set srcdir=.
1353if test "$ac_abs_confdir" = "$ac_pwd"; then
1354 srcdir=.
1355fi
1356# Remove unnecessary trailing slashes from srcdir.
1357# Double slashes in file names in object file debugging info
1358# mess up M-x gdb in Emacs.
1359case $srcdir in
1360*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1361esac
1362for ac_var in $ac_precious_vars; do
1363 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_env_${ac_var}_value=\$${ac_var}
1365 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1366 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1367done
c906108c 1368
bec39cab
AC
1369#
1370# Report the --help message.
1371#
1372if test "$ac_init_help" = "long"; then
1373 # Omit some internal or obsolete options to make the list less imposing.
1374 # This message is too long to be a string in the A/UX 3.1 sh.
1375 cat <<_ACEOF
1376\`configure' configures this package to adapt to many kinds of systems.
1377
1378Usage: $0 [OPTION]... [VAR=VALUE]...
1379
1380To assign environment variables (e.g., CC, CFLAGS...), specify them as
1381VAR=VALUE. See below for descriptions of some of the useful variables.
1382
1383Defaults for the options are specified in brackets.
1384
1385Configuration:
1386 -h, --help display this help and exit
1387 --help=short display options specific to this package
1388 --help=recursive display the short help of all the included packages
1389 -V, --version display version information and exit
1390 -q, --quiet, --silent do not print \`checking...' messages
1391 --cache-file=FILE cache test results in FILE [disabled]
1392 -C, --config-cache alias for \`--cache-file=config.cache'
1393 -n, --no-create do not create output files
1394 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1395
bec39cab
AC
1396Installation directories:
1397 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1398 [$ac_default_prefix]
bec39cab 1399 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1400 [PREFIX]
bec39cab
AC
1401
1402By default, \`make install' will install all the files in
1403\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1404an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1405for instance \`--prefix=\$HOME'.
1406
1407For better control, use the options below.
1408
1409Fine tuning of the installation directories:
81ecdfbb
RW
1410 --bindir=DIR user executables [EPREFIX/bin]
1411 --sbindir=DIR system admin executables [EPREFIX/sbin]
1412 --libexecdir=DIR program executables [EPREFIX/libexec]
1413 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1414 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1415 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1416 --libdir=DIR object code libraries [EPREFIX/lib]
1417 --includedir=DIR C header files [PREFIX/include]
1418 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1419 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1420 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1421 --infodir=DIR info documentation [DATAROOTDIR/info]
1422 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1423 --mandir=DIR man documentation [DATAROOTDIR/man]
1424 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1425 --htmldir=DIR html documentation [DOCDIR]
1426 --dvidir=DIR dvi documentation [DOCDIR]
1427 --pdfdir=DIR pdf documentation [DOCDIR]
1428 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1429_ACEOF
1430
1431 cat <<\_ACEOF
1432
9009e1ae
MR
1433Program names:
1434 --program-prefix=PREFIX prepend PREFIX to installed program names
1435 --program-suffix=SUFFIX append SUFFIX to installed program names
1436 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1437
bec39cab
AC
1438X features:
1439 --x-includes=DIR X include files are in DIR
1440 --x-libraries=DIR X library files are in DIR
1441
1442System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1445 --target=TARGET configure for building compilers for TARGET [HOST]
1446_ACEOF
1447fi
1448
1449if test -n "$ac_init_help"; then
1450
1451 cat <<\_ACEOF
1452
1453Optional Features:
81ecdfbb 1454 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1455 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1456 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1457 --enable-maintainer-mode enable make rules and dependencies not useful
1458 (and sometimes confusing) to the casual installer
da2f07f1
JK
1459 --enable-plugins Enable support for plugins (defaults no)
1460 --disable-largefile omit support for large files
a1220294
TT
1461 --enable-targets=TARGETS
1462 alternative target configurations
c0993dbe 1463 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1464 --disable-gdbcli disable command-line interface (CLI)
1465 --disable-gdbmi disable machine-interface (MI)
1466 --enable-tui enable full-screen terminal user interface (TUI)
1467 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1468 --enable-profiling enable profiling of GDB
3841debe 1469 --disable-rpath do not hardcode runtime library paths
a8db4212 1470 --enable-libmcheck Try building GDB with -lmcheck if available
a1220294 1471 --enable-werror treat compile warnings as errors
32c1c914 1472 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1473 --enable-gdb-build-warnings
32c1c914 1474 enable GDB specific build-time compiler warnings if
a1220294 1475 gcc is used
32c1c914 1476 --enable-sim link gdb with simulator
bec39cab 1477 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1478 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1479 is auto)
bec39cab
AC
1480
1481Optional Packages:
1482 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1483 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1484 --with-separate-debug-dir=PATH
32c1c914 1485 look for global separate debug info in this path
62e4f60c 1486 [LIBDIR/debug]
b14b1491
TT
1487 --with-gdb-datadir=PATH look for global separate data files in this path
1488 [DATADIR/gdb]
29b0e8a2 1489 --with-relocated-sources=PATH
32c1c914 1490 automatically relocate this path for source files
7349ff92 1491 --with-auto-load-dir=PATH
aff139ff 1492 directories from which to load auto-loaded scripts
1564a261 1493 [$debugdir:$datadir/auto-load]
bccbefd2 1494 --with-auto-load-safe-path=PATH
aff139ff 1495 directories safe to hold auto-loaded files
7349ff92 1496 [--with-auto-load-dir]
bccbefd2
JK
1497 --without-auto-load-safe-path
1498 do not restrict auto-loaded files locations
05e7c244 1499 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1500 --with-curses use the curses library instead of the termcap
1501 library
c16158bc
JM
1502 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1503 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1504 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1505 --with-libiconv-prefix=DIR
1506 search for libiconv in DIR/include and DIR/lib
478aac75 1507 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1508 --with-system-readline use installed readline library
b8e0a31c
SD
1509 --with-jit-reader-dir=PATH
1510 directory to load the JIT readers from
5c39566f 1511 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1512 --with-gnu-ld assume the C compiler uses GNU ld default=no
1513 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1514 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1515 --with-python[=PYTHON] include python support
1516 (auto/yes/no/<python-program>)
a1220294
TT
1517 --without-included-regex
1518 don't use included regex; this is the default on
1519 systems with version 2 of the GNU C library (use
1520 with caution on other system)
81ecdfbb 1521 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1522 --with-system-gdbinit=PATH
32c1c914 1523 automatically load a system-wide gdbinit file
5062cc19
KS
1524 --with-tcl directory containing tcl configuration (tclConfig.sh)
1525 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1526 --with-x use the X Window System
bec39cab
AC
1527
1528Some influential environment variables:
1529 CC C compiler command
1530 CFLAGS C compiler flags
1531 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1532 nonstandard directory <lib dir>
81ecdfbb
RW
1533 LIBS libraries to pass to the linker, e.g. -l<library>
1534 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1535 you have headers in a nonstandard directory <include dir>
bec39cab 1536 CPP C preprocessor
f06e05e0
JK
1537 MAKEINFO Parent configure detects if it is of sufficient version.
1538 MAKEINFOFLAGS
1539 Parameters for MAKEINFO.
81ecdfbb
RW
1540 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1541 the first program found out of: `bison -y', `byacc', `yacc'.
1542 YFLAGS The list of arguments that will be passed by default to $YACC.
1543 This script will default YFLAGS to the empty string to avoid a
1544 default value of `-d' given by some make applications.
1545 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1546
1547Use these variables to override the choices made by `configure' or to help
1548it to find libraries and programs with nonstandard names/locations.
1549
81ecdfbb 1550Report bugs to the package provider.
bec39cab 1551_ACEOF
81ecdfbb 1552ac_status=$?
bec39cab
AC
1553fi
1554
1555if test "$ac_init_help" = "recursive"; then
1556 # If there are subdirs, report their specific --help.
bec39cab 1557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1558 test -d "$ac_dir" ||
1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560 continue
bec39cab
AC
1561 ac_builddir=.
1562
81ecdfbb
RW
1563case "$ac_dir" in
1564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565*)
1566 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1567 # A ".." for each directory in $ac_dir_suffix.
1568 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1569 case $ac_top_builddir_sub in
1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572 esac ;;
1573esac
1574ac_abs_top_builddir=$ac_pwd
1575ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576# for backward compatibility:
1577ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1578
1579case $srcdir in
81ecdfbb 1580 .) # We are building in place.
bec39cab 1581 ac_srcdir=.
81ecdfbb
RW
1582 ac_top_srcdir=$ac_top_builddir_sub
1583 ac_abs_top_srcdir=$ac_pwd ;;
1584 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1585 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1586 ac_top_srcdir=$srcdir
1587 ac_abs_top_srcdir=$srcdir ;;
1588 *) # Relative name.
1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590 ac_top_srcdir=$ac_top_build_prefix$srcdir
1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1592esac
81ecdfbb 1593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1594
81ecdfbb
RW
1595 cd "$ac_dir" || { ac_status=$?; continue; }
1596 # Check for guested configure.
1597 if test -f "$ac_srcdir/configure.gnu"; then
1598 echo &&
1599 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1600 elif test -f "$ac_srcdir/configure"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1603 else
81ecdfbb
RW
1604 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1605 fi || ac_status=$?
1606 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1607 done
1608fi
1609
81ecdfbb 1610test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1611if $ac_init_version; then
1612 cat <<\_ACEOF
81ecdfbb
RW
1613configure
1614generated by GNU Autoconf 2.64
bec39cab 1615
81ecdfbb 1616Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1617This configure script is free software; the Free Software Foundation
1618gives unlimited permission to copy, distribute and modify it.
1619_ACEOF
81ecdfbb 1620 exit
bec39cab 1621fi
bec39cab 1622
81ecdfbb
RW
1623## ------------------------ ##
1624## Autoconf initialization. ##
1625## ------------------------ ##
bec39cab 1626
81ecdfbb
RW
1627# ac_fn_c_try_compile LINENO
1628# --------------------------
1629# Try to compile conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_compile ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext
1634 if { { ac_try="$ac_compile"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_compile") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest.$ac_objext; then :
1653 ac_retval=0
1654else
1655 $as_echo "$as_me: failed program was:" >&5
1656sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1657
81ecdfbb
RW
1658 ac_retval=1
1659fi
1660 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1661 return $ac_retval
1662
1663} # ac_fn_c_try_compile
1664
1665# ac_fn_c_try_cpp LINENO
1666# ----------------------
1667# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668ac_fn_c_try_cpp ()
bec39cab 1669{
81ecdfbb
RW
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } >/dev/null && {
1687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1694
81ecdfbb
RW
1695 ac_retval=1
1696fi
1697 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1698 return $ac_retval
bec39cab 1699
81ecdfbb 1700} # ac_fn_c_try_cpp
bec39cab 1701
81ecdfbb
RW
1702# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1703# -------------------------------------------------------
1704# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1705# the include files in INCLUDES and setting the cache variable VAR
1706# accordingly.
1707ac_fn_c_check_header_mongrel ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1712$as_echo_n "checking for $2... " >&6; }
1713if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1714 $as_echo_n "(cached) " >&6
1715fi
1716eval ac_res=\$$3
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1718$as_echo "$ac_res" >&6; }
1719else
1720 # Is the header compilable?
1721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1722$as_echo_n "checking $2 usability... " >&6; }
1723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1724/* end confdefs.h. */
1725$4
1726#include <$2>
1727_ACEOF
1728if ac_fn_c_try_compile "$LINENO"; then :
1729 ac_header_compiler=yes
1730else
1731 ac_header_compiler=no
1732fi
1733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1735$as_echo "$ac_header_compiler" >&6; }
bec39cab 1736
81ecdfbb
RW
1737# Is the header present?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1739$as_echo_n "checking $2 presence... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_cpp "$LINENO"; then :
1745 ac_header_preproc=yes
1746else
1747 ac_header_preproc=no
1748fi
1749rm -f conftest.err conftest.$ac_ext
1750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1751$as_echo "$ac_header_preproc" >&6; }
bec39cab 1752
81ecdfbb
RW
1753# So? What about this header?
1754case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1755 yes:no: )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1757$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1759$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1760 ;;
1761 no:yes:* )
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1763$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1765$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1767$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1769$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1771$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1772 ;;
1773esac
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
1776if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1777 $as_echo_n "(cached) " >&6
1778else
1779 eval "$3=\$ac_header_compiler"
1780fi
1781eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783$as_echo "$ac_res" >&6; }
1784fi
1785 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1786
81ecdfbb 1787} # ac_fn_c_check_header_mongrel
bec39cab 1788
81ecdfbb
RW
1789# ac_fn_c_try_run LINENO
1790# ----------------------
1791# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1792# that executables *can* be run.
1793ac_fn_c_try_run ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 if { { ac_try="$ac_link"
1797case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800esac
1801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802$as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_link") 2>&5
1804 ac_status=$?
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1807 { { case "(($ac_try" in
1808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1809 *) ac_try_echo=$ac_try;;
1810esac
1811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1812$as_echo "$ac_try_echo"; } >&5
1813 (eval "$ac_try") 2>&5
1814 ac_status=$?
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; }; }; then :
1817 ac_retval=0
1818else
1819 $as_echo "$as_me: program exited with status $ac_status" >&5
1820 $as_echo "$as_me: failed program was:" >&5
1821sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1822
81ecdfbb
RW
1823 ac_retval=$ac_status
1824fi
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1826 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1827 return $ac_retval
bec39cab 1828
81ecdfbb 1829} # ac_fn_c_try_run
bec39cab 1830
81ecdfbb
RW
1831# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1832# -------------------------------------------------------
1833# Tests whether HEADER exists and can be compiled using the include files in
1834# INCLUDES, setting the cache variable VAR accordingly.
1835ac_fn_c_check_header_compile ()
1836{
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839$as_echo_n "checking for $2... " >&6; }
1840if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1841 $as_echo_n "(cached) " >&6
1842else
1843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844/* end confdefs.h. */
1845$4
1846#include <$2>
bec39cab 1847_ACEOF
81ecdfbb
RW
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 eval "$3=yes"
1850else
1851 eval "$3=no"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
1858 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1859
81ecdfbb 1860} # ac_fn_c_check_header_compile
bec39cab 1861
81ecdfbb
RW
1862# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1863# --------------------------------------------
1864# Tries to find the compile-time value of EXPR in a program that includes
1865# INCLUDES, setting VAR accordingly. Returns whether the value could be
1866# computed
1867ac_fn_c_compute_int ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 if test "$cross_compiling" = yes; then
1871 # Depending upon the size, compute the lo and hi bounds.
1872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1873/* end confdefs.h. */
1874$4
1875int
1876main ()
1877{
1878static int test_array [1 - 2 * !(($2) >= 0)];
1879test_array [0] = 0
bec39cab 1880
81ecdfbb
RW
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 ac_lo=0 ac_mid=0
1887 while :; do
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889/* end confdefs.h. */
1890$4
1891int
1892main ()
1893{
1894static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1895test_array [0] = 0
bec39cab 1896
81ecdfbb
RW
1897 ;
1898 return 0;
1899}
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902 ac_hi=$ac_mid; break
1903else
1904 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1905 if test $ac_lo -le $ac_mid; then
1906 ac_lo= ac_hi=
1907 break
1908 fi
1909 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1910fi
81ecdfbb
RW
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912 done
c906108c 1913else
81ecdfbb
RW
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917int
1918main ()
1919{
1920static int test_array [1 - 2 * !(($2) < 0)];
1921test_array [0] = 0
bec39cab 1922
81ecdfbb
RW
1923 ;
1924 return 0;
1925}
1926_ACEOF
1927if ac_fn_c_try_compile "$LINENO"; then :
1928 ac_hi=-1 ac_mid=-1
1929 while :; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$4
1933int
1934main ()
1935{
1936static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1937test_array [0] = 0
bec39cab 1938
81ecdfbb
RW
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 ac_lo=$ac_mid; break
1945else
1946 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1947 if test $ac_mid -le $ac_hi; then
1948 ac_lo= ac_hi=
1949 break
1950 fi
1951 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954 done
1955else
1956 ac_lo= ac_hi=
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1959fi
1960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1961# Binary search between lo and hi bounds.
1962while test "x$ac_lo" != "x$ac_hi"; do
1963 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$4
1967int
1968main ()
1969{
1970static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1971test_array [0] = 0
bec39cab 1972
81ecdfbb
RW
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978 ac_hi=$ac_mid
1979else
1980 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983done
1984case $ac_lo in #((
1985?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1986'') ac_retval=1 ;;
1987esac
1988 else
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$4
1992static long int longval () { return $2; }
1993static unsigned long int ulongval () { return $2; }
1994#include <stdio.h>
1995#include <stdlib.h>
1996int
1997main ()
1998{
bec39cab 1999
81ecdfbb
RW
2000 FILE *f = fopen ("conftest.val", "w");
2001 if (! f)
2002 return 1;
2003 if (($2) < 0)
2004 {
2005 long int i = longval ();
2006 if (i != ($2))
2007 return 1;
2008 fprintf (f, "%ld", i);
2009 }
2010 else
2011 {
2012 unsigned long int i = ulongval ();
2013 if (i != ($2))
2014 return 1;
2015 fprintf (f, "%lu", i);
2016 }
2017 /* Do not output a trailing newline, as this causes \r\n confusion
2018 on some platforms. */
2019 return ferror (f) || fclose (f) != 0;
bec39cab 2020
81ecdfbb
RW
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_run "$LINENO"; then :
2026 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2027else
2028 ac_retval=1
2029fi
2030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2031 conftest.$ac_objext conftest.beam conftest.$ac_ext
2032rm -f conftest.val
bec39cab 2033
81ecdfbb
RW
2034 fi
2035 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2036 return $ac_retval
bec39cab 2037
81ecdfbb 2038} # ac_fn_c_compute_int
bec39cab 2039
c971b7fa
PA
2040# ac_fn_c_try_link LINENO
2041# -----------------------
2042# Try to link conftest.$ac_ext, and return whether this succeeded.
2043ac_fn_c_try_link ()
2044{
2045 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2046 rm -f conftest.$ac_objext conftest$ac_exeext
2047 if { { ac_try="$ac_link"
2048case "(($ac_try" in
2049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2050 *) ac_try_echo=$ac_try;;
2051esac
2052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2053$as_echo "$ac_try_echo"; } >&5
2054 (eval "$ac_link") 2>conftest.err
2055 ac_status=$?
2056 if test -s conftest.err; then
2057 grep -v '^ *+' conftest.err >conftest.er1
2058 cat conftest.er1 >&5
2059 mv -f conftest.er1 conftest.err
2060 fi
2061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2062 test $ac_status = 0; } && {
2063 test -z "$ac_c_werror_flag" ||
2064 test ! -s conftest.err
2065 } && test -s conftest$ac_exeext && {
2066 test "$cross_compiling" = yes ||
2067 $as_test_x conftest$ac_exeext
2068 }; then :
2069 ac_retval=0
2070else
2071 $as_echo "$as_me: failed program was:" >&5
2072sed 's/^/| /' conftest.$ac_ext >&5
2073
2074 ac_retval=1
2075fi
2076 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2077 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2078 # interfere with the next link command; also delete a directory that is
2079 # left behind by Apple's compiler. We do this before executing the actions.
2080 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2081 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2082 return $ac_retval
2083
2084} # ac_fn_c_try_link
2085
55a8c076
YQ
2086# ac_fn_c_check_func LINENO FUNC VAR
2087# ----------------------------------
2088# Tests whether FUNC exists, setting the cache variable VAR accordingly
2089ac_fn_c_check_func ()
81ecdfbb
RW
2090{
2091 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2093$as_echo_n "checking for $2... " >&6; }
2094if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2095 $as_echo_n "(cached) " >&6
2096else
81ecdfbb
RW
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
55a8c076
YQ
2099/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2101#define $2 innocuous_$2
2102
2103/* System header to define __stub macros and hopefully few prototypes,
2104 which can conflict with char $2 (); below.
2105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2106 <limits.h> exists even on freestanding compilers. */
2107
2108#ifdef __STDC__
2109# include <limits.h>
2110#else
2111# include <assert.h>
2112#endif
2113
2114#undef $2
2115
2116/* Override any GCC internal prototype to avoid an error.
2117 Use char because int might match the return type of a GCC
2118 builtin and then its argument prototype would still apply. */
2119#ifdef __cplusplus
2120extern "C"
2121#endif
2122char $2 ();
2123/* The GNU C library defines this for functions which it implements
2124 to always fail with ENOSYS. Some functions are actually named
2125 something starting with __ and the normal name is an alias. */
2126#if defined __stub_$2 || defined __stub___$2
2127choke me
2128#endif
2129
2130int
2131main ()
2132{
2133return $2 ();
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_link "$LINENO"; then :
2139 eval "$3=yes"
2140else
2141 eval "$3=no"
2142fi
2143rm -f core conftest.err conftest.$ac_objext \
2144 conftest$ac_exeext conftest.$ac_ext
2145fi
2146eval ac_res=\$$3
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148$as_echo "$ac_res" >&6; }
2149 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2150
2151} # ac_fn_c_check_func
2152
770d76d7
PA
2153# ac_fn_c_check_decl LINENO SYMBOL VAR
2154# ------------------------------------
2155# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2156ac_fn_c_check_decl ()
2157{
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 as_decl_name=`echo $2|sed 's/ *(.*//'`
2160 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2162$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2163if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2164 $as_echo_n "(cached) " >&6
2165else
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172#ifndef $as_decl_name
2173#ifdef __cplusplus
2174 (void) $as_decl_use;
2175#else
2176 (void) $as_decl_name;
2177#endif
2178#endif
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"; then :
2185 eval "$3=yes"
2186else
2187 eval "$3=no"
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190fi
2191eval ac_res=\$$3
2192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2193$as_echo "$ac_res" >&6; }
2194 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2195
2196} # ac_fn_c_check_decl
2197
55a8c076
YQ
2198# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2199# ----------------------------------------------------
2200# Tries to find if the field MEMBER exists in type AGGR, after including
2201# INCLUDES, setting cache variable VAR accordingly.
2202ac_fn_c_check_member ()
2203{
2204 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2206$as_echo_n "checking for $2.$3... " >&6; }
2207if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2208 $as_echo_n "(cached) " >&6
2209else
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$5
2213int
2214main ()
2215{
2216static $2 ac_aggr;
2217if (ac_aggr.$3)
2218return 0;
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224 eval "$4=yes"
2225else
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$5
2229int
2230main ()
2231{
2232static $2 ac_aggr;
2233if (sizeof ac_aggr.$3)
2234return 0;
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_compile "$LINENO"; then :
2240 eval "$4=yes"
2241else
2242 eval "$4=no"
2243fi
2244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2245fi
2246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2247fi
2248eval ac_res=\$$4
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2250$as_echo "$ac_res" >&6; }
2251 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2252
2253} # ac_fn_c_check_member
2254
2255# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2256# -------------------------------------------
2257# Tests whether TYPE exists after having included INCLUDES, setting cache
2258# variable VAR accordingly.
2259ac_fn_c_check_type ()
2260{
2261 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2263$as_echo_n "checking for $2... " >&6; }
2264if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2265 $as_echo_n "(cached) " >&6
2266else
2267 eval "$3=no"
2268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h. */
2270$4
2271int
2272main ()
2273{
2274if (sizeof ($2))
2275 return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h. */
2283$4
2284int
2285main ()
2286{
2287if (sizeof (($2)))
2288 return 0;
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2294
81ecdfbb
RW
2295else
2296 eval "$3=yes"
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$3
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2306
81ecdfbb
RW
2307} # ac_fn_c_check_type
2308cat >config.log <<_ACEOF
2309This file contains any messages produced by compilers while
2310running configure, to aid debugging if configure makes a mistake.
d5af19ba 2311
81ecdfbb
RW
2312It was created by $as_me, which was
2313generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2314
81ecdfbb 2315 $ $0 $@
413ccac7 2316
81ecdfbb
RW
2317_ACEOF
2318exec 5>>config.log
2319{
2320cat <<_ASUNAME
2321## --------- ##
2322## Platform. ##
2323## --------- ##
413ccac7 2324
81ecdfbb
RW
2325hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2326uname -m = `(uname -m) 2>/dev/null || echo unknown`
2327uname -r = `(uname -r) 2>/dev/null || echo unknown`
2328uname -s = `(uname -s) 2>/dev/null || echo unknown`
2329uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2330
81ecdfbb
RW
2331/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2332/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2333
81ecdfbb
RW
2334/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2335/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2336/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2337/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2338/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2339/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2340/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2341
81ecdfbb 2342_ASUNAME
bec39cab 2343
bec39cab
AC
2344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2345for as_dir in $PATH
2346do
2347 IFS=$as_save_IFS
2348 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2349 $as_echo "PATH: $as_dir"
2350 done
2351IFS=$as_save_IFS
bec39cab 2352
81ecdfbb 2353} >&5
bec39cab 2354
81ecdfbb 2355cat >&5 <<_ACEOF
bec39cab 2356
bec39cab 2357
81ecdfbb
RW
2358## ----------- ##
2359## Core tests. ##
2360## ----------- ##
2361
2362_ACEOF
2363
2364
2365# Keep a trace of the command line.
2366# Strip out --no-create and --no-recursion so they do not pile up.
2367# Strip out --silent because we don't want to record it for future runs.
2368# Also quote any args containing shell meta-characters.
2369# Make two passes to allow for proper duplicate-argument suppression.
2370ac_configure_args=
2371ac_configure_args0=
2372ac_configure_args1=
2373ac_must_keep_next=false
2374for ac_pass in 1 2
2375do
2376 for ac_arg
2377 do
2378 case $ac_arg in
2379 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2380 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2381 | -silent | --silent | --silen | --sile | --sil)
2382 continue ;;
2383 *\'*)
2384 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2385 esac
2386 case $ac_pass in
2387 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2388 2)
2389 as_fn_append ac_configure_args1 " '$ac_arg'"
2390 if test $ac_must_keep_next = true; then
2391 ac_must_keep_next=false # Got value, back to normal.
2392 else
2393 case $ac_arg in
2394 *=* | --config-cache | -C | -disable-* | --disable-* \
2395 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2396 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2397 | -with-* | --with-* | -without-* | --without-* | --x)
2398 case "$ac_configure_args0 " in
2399 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2400 esac
2401 ;;
2402 -* ) ac_must_keep_next=true ;;
2403 esac
2404 fi
2405 as_fn_append ac_configure_args " '$ac_arg'"
2406 ;;
2407 esac
2408 done
2409done
2410{ ac_configure_args0=; unset ac_configure_args0;}
2411{ ac_configure_args1=; unset ac_configure_args1;}
2412
2413# When interrupted or exit'd, cleanup temporary files, and complete
2414# config.log. We remove comments because anyway the quotes in there
2415# would cause problems or look ugly.
2416# WARNING: Use '\'' to represent an apostrophe within the trap.
2417# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2418trap 'exit_status=$?
2419 # Save into config.log some information that might help in debugging.
2420 {
2421 echo
2422
2423 cat <<\_ASBOX
2424## ---------------- ##
2425## Cache variables. ##
2426## ---------------- ##
2427_ASBOX
2428 echo
2429 # The following way of writing the cache mishandles newlines in values,
2430(
2431 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2432 eval ac_val=\$$ac_var
2433 case $ac_val in #(
2434 *${as_nl}*)
2435 case $ac_var in #(
2436 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2437$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2438 esac
2439 case $ac_var in #(
2440 _ | IFS | as_nl) ;; #(
2441 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2442 *) { eval $ac_var=; unset $ac_var;} ;;
2443 esac ;;
2444 esac
2445 done
2446 (set) 2>&1 |
2447 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2448 *${as_nl}ac_space=\ *)
2449 sed -n \
2450 "s/'\''/'\''\\\\'\'''\''/g;
2451 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2452 ;; #(
2453 *)
2454 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2455 ;;
2456 esac |
2457 sort
2458)
2459 echo
2460
2461 cat <<\_ASBOX
2462## ----------------- ##
2463## Output variables. ##
2464## ----------------- ##
2465_ASBOX
2466 echo
2467 for ac_var in $ac_subst_vars
2468 do
2469 eval ac_val=\$$ac_var
2470 case $ac_val in
2471 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2472 esac
2473 $as_echo "$ac_var='\''$ac_val'\''"
2474 done | sort
2475 echo
2476
2477 if test -n "$ac_subst_files"; then
2478 cat <<\_ASBOX
2479## ------------------- ##
2480## File substitutions. ##
2481## ------------------- ##
2482_ASBOX
2483 echo
2484 for ac_var in $ac_subst_files
2485 do
2486 eval ac_val=\$$ac_var
2487 case $ac_val in
2488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2489 esac
2490 $as_echo "$ac_var='\''$ac_val'\''"
2491 done | sort
2492 echo
2493 fi
2494
2495 if test -s confdefs.h; then
2496 cat <<\_ASBOX
2497## ----------- ##
2498## confdefs.h. ##
2499## ----------- ##
2500_ASBOX
2501 echo
2502 cat confdefs.h
2503 echo
2504 fi
2505 test "$ac_signal" != 0 &&
2506 $as_echo "$as_me: caught signal $ac_signal"
2507 $as_echo "$as_me: exit $exit_status"
2508 } >&5
2509 rm -f core *.core core.conftest.* &&
2510 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2511 exit $exit_status
2512' 0
2513for ac_signal in 1 2 13 15; do
2514 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2515done
2516ac_signal=0
2517
2518# confdefs.h avoids OS command line length limits that DEFS can exceed.
2519rm -f -r conftest* confdefs.h
2520
2521$as_echo "/* confdefs.h */" > confdefs.h
2522
2523# Predefined preprocessor variables.
2524
2525cat >>confdefs.h <<_ACEOF
2526#define PACKAGE_NAME "$PACKAGE_NAME"
2527_ACEOF
2528
2529cat >>confdefs.h <<_ACEOF
2530#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2531_ACEOF
2532
2533cat >>confdefs.h <<_ACEOF
2534#define PACKAGE_VERSION "$PACKAGE_VERSION"
2535_ACEOF
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_STRING "$PACKAGE_STRING"
2539_ACEOF
2540
2541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2543_ACEOF
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_URL "$PACKAGE_URL"
2547_ACEOF
2548
2549
2550# Let the site file select an alternate cache file if it wants to.
2551# Prefer an explicitly selected file to automatically selected ones.
2552ac_site_file1=NONE
2553ac_site_file2=NONE
2554if test -n "$CONFIG_SITE"; then
2555 ac_site_file1=$CONFIG_SITE
2556elif test "x$prefix" != xNONE; then
2557 ac_site_file1=$prefix/share/config.site
2558 ac_site_file2=$prefix/etc/config.site
2559else
2560 ac_site_file1=$ac_default_prefix/share/config.site
2561 ac_site_file2=$ac_default_prefix/etc/config.site
2562fi
2563for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2564do
2565 test "x$ac_site_file" = xNONE && continue
2566 if test -r "$ac_site_file"; then
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2568$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2569 sed 's/^/| /' "$ac_site_file" >&5
2570 . "$ac_site_file"
2571 fi
2572done
2573
2574if test -r "$cache_file"; then
2575 # Some versions of bash will fail to source /dev/null (special
2576 # files actually), so we avoid doing that.
2577 if test -f "$cache_file"; then
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2579$as_echo "$as_me: loading cache $cache_file" >&6;}
2580 case $cache_file in
2581 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2582 *) . "./$cache_file";;
2583 esac
2584 fi
2585else
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2587$as_echo "$as_me: creating cache $cache_file" >&6;}
2588 >$cache_file
bec39cab
AC
2589fi
2590
81ecdfbb
RW
2591# Check that the precious variables saved in the cache have kept the same
2592# value.
2593ac_cache_corrupted=false
2594for ac_var in $ac_precious_vars; do
2595 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2596 eval ac_new_set=\$ac_env_${ac_var}_set
2597 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2598 eval ac_new_val=\$ac_env_${ac_var}_value
2599 case $ac_old_set,$ac_new_set in
2600 set,)
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2602$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2603 ac_cache_corrupted=: ;;
2604 ,set)
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2606$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2607 ac_cache_corrupted=: ;;
2608 ,);;
2609 *)
2610 if test "x$ac_old_val" != "x$ac_new_val"; then
2611 # differences in whitespace do not lead to failure.
2612 ac_old_val_w=`echo x $ac_old_val`
2613 ac_new_val_w=`echo x $ac_new_val`
2614 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2616$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2617 ac_cache_corrupted=:
2618 else
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2620$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2621 eval $ac_var=\$ac_old_val
2622 fi
2623 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2624$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2626$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2627 fi;;
2628 esac
2629 # Pass precious variables to config.status.
2630 if test "$ac_new_set" = set; then
2631 case $ac_new_val in
2632 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2633 *) ac_arg=$ac_var=$ac_new_val ;;
2634 esac
2635 case " $ac_configure_args " in
2636 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2637 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2638 esac
2639 fi
2640done
2641if $ac_cache_corrupted; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2645$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2646 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2647fi
2648## -------------------- ##
2649## Main body of script. ##
2650## -------------------- ##
2651
2652ac_ext=c
2653ac_cpp='$CPP $CPPFLAGS'
2654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2656ac_compiler_gnu=$ac_cv_c_compiler_gnu
2657
2658
2659
2660
2661
2662ac_config_headers="$ac_config_headers config.h:config.in"
2663
2664
2665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2666$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2667 # Check whether --enable-maintainer-mode was given.
2668if test "${enable_maintainer_mode+set}" = set; then :
2669 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2670else
2671 USE_MAINTAINER_MODE=no
2672fi
2673
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2675$as_echo "$USE_MAINTAINER_MODE" >&6; }
2676 if test $USE_MAINTAINER_MODE = yes; then
2677 MAINTAINER_MODE_TRUE=
2678 MAINTAINER_MODE_FALSE='#'
2679else
2680 MAINTAINER_MODE_TRUE='#'
2681 MAINTAINER_MODE_FALSE=
2682fi
2683
2684 MAINT=$MAINTAINER_MODE_TRUE
2685
2686
2687
f5f1cdb6
JK
2688# Provide more thorough testing by -lmcheck.
2689# Set it to 'true' for development snapshots, 'false' for releases or
2690# pre-releases.
2691development=true
2692
81ecdfbb
RW
2693ac_ext=c
2694ac_cpp='$CPP $CPPFLAGS'
2695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
2698if test -n "$ac_tool_prefix"; then
2699 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2700set dummy ${ac_tool_prefix}gcc; ac_word=$2
2701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2702$as_echo_n "checking for $ac_word... " >&6; }
2703if test "${ac_cv_prog_CC+set}" = set; then :
2704 $as_echo_n "(cached) " >&6
c906108c
SS
2705else
2706 if test -n "$CC"; then
2707 ac_cv_prog_CC="$CC" # Let the user override the test.
2708else
bec39cab
AC
2709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2710for as_dir in $PATH
2711do
2712 IFS=$as_save_IFS
2713 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2714 for ac_exec_ext in '' $ac_executable_extensions; do
2715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2716 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2718 break 2
2719 fi
2720done
81ecdfbb
RW
2721 done
2722IFS=$as_save_IFS
bec39cab 2723
c906108c
SS
2724fi
2725fi
bec39cab 2726CC=$ac_cv_prog_CC
c906108c 2727if test -n "$CC"; then
81ecdfbb
RW
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2729$as_echo "$CC" >&6; }
c906108c 2730else
81ecdfbb
RW
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2732$as_echo "no" >&6; }
c906108c
SS
2733fi
2734
81ecdfbb 2735
b4e70030
JB
2736fi
2737if test -z "$ac_cv_prog_CC"; then
2738 ac_ct_CC=$CC
81ecdfbb
RW
2739 # Extract the first word of "gcc", so it can be a program name with args.
2740set dummy gcc; ac_word=$2
2741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2742$as_echo_n "checking for $ac_word... " >&6; }
2743if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2744 $as_echo_n "(cached) " >&6
b4e70030
JB
2745else
2746 if test -n "$ac_ct_CC"; then
2747 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2748else
2749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2750for as_dir in $PATH
2751do
2752 IFS=$as_save_IFS
2753 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2754 for ac_exec_ext in '' $ac_executable_extensions; do
2755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2756 ac_cv_prog_ac_ct_CC="gcc"
2757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2758 break 2
4e8d927d 2759 fi
b4e70030 2760done
81ecdfbb
RW
2761 done
2762IFS=$as_save_IFS
b4e70030
JB
2763
2764fi
2765fi
2766ac_ct_CC=$ac_cv_prog_ac_ct_CC
2767if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2769$as_echo "$ac_ct_CC" >&6; }
b4e70030 2770else
81ecdfbb
RW
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2772$as_echo "no" >&6; }
b4e70030
JB
2773fi
2774
81ecdfbb
RW
2775 if test "x$ac_ct_CC" = x; then
2776 CC=""
2777 else
2778 case $cross_compiling:$ac_tool_warned in
2779yes:)
2780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2782ac_tool_warned=yes ;;
2783esac
2784 CC=$ac_ct_CC
2785 fi
b4e70030
JB
2786else
2787 CC="$ac_cv_prog_CC"
2788fi
2789
c906108c 2790if test -z "$CC"; then
81ecdfbb
RW
2791 if test -n "$ac_tool_prefix"; then
2792 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2793set dummy ${ac_tool_prefix}cc; ac_word=$2
2794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2795$as_echo_n "checking for $ac_word... " >&6; }
2796if test "${ac_cv_prog_CC+set}" = set; then :
2797 $as_echo_n "(cached) " >&6
c906108c
SS
2798else
2799 if test -n "$CC"; then
2800 ac_cv_prog_CC="$CC" # Let the user override the test.
2801else
bec39cab
AC
2802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2803for as_dir in $PATH
2804do
2805 IFS=$as_save_IFS
2806 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2807 for ac_exec_ext in '' $ac_executable_extensions; do
2808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2809 ac_cv_prog_CC="${ac_tool_prefix}cc"
2810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2811 break 2
2812 fi
2813done
81ecdfbb
RW
2814 done
2815IFS=$as_save_IFS
2816
2817fi
2818fi
2819CC=$ac_cv_prog_CC
2820if test -n "$CC"; then
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2822$as_echo "$CC" >&6; }
2823else
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2825$as_echo "no" >&6; }
2826fi
2827
2828
2829 fi
2830fi
2831if test -z "$CC"; then
2832 # Extract the first word of "cc", so it can be a program name with args.
2833set dummy cc; ac_word=$2
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2835$as_echo_n "checking for $ac_word... " >&6; }
2836if test "${ac_cv_prog_CC+set}" = set; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test -n "$CC"; then
2840 ac_cv_prog_CC="$CC" # Let the user override the test.
2841else
2842 ac_prog_rejected=no
2843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844for as_dir in $PATH
2845do
2846 IFS=$as_save_IFS
2847 test -z "$as_dir" && as_dir=.
2848 for ac_exec_ext in '' $ac_executable_extensions; do
2849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2850 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2851 ac_prog_rejected=yes
2852 continue
2853 fi
2854 ac_cv_prog_CC="cc"
2855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2856 break 2
2857 fi
2858done
2859 done
2860IFS=$as_save_IFS
bec39cab 2861
c906108c
SS
2862if test $ac_prog_rejected = yes; then
2863 # We found a bogon in the path, so make sure we never use it.
2864 set dummy $ac_cv_prog_CC
2865 shift
bec39cab 2866 if test $# != 0; then
c906108c
SS
2867 # We chose a different compiler from the bogus one.
2868 # However, it has the same basename, so the bogon will be chosen
2869 # first if we set CC to just the basename; use the full file name.
2870 shift
bec39cab 2871 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2872 fi
2873fi
2874fi
2875fi
bec39cab 2876CC=$ac_cv_prog_CC
c906108c 2877if test -n "$CC"; then
81ecdfbb
RW
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2879$as_echo "$CC" >&6; }
c906108c 2880else
81ecdfbb
RW
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2882$as_echo "no" >&6; }
c906108c
SS
2883fi
2884
81ecdfbb 2885
bec39cab
AC
2886fi
2887if test -z "$CC"; then
2888 if test -n "$ac_tool_prefix"; then
81ecdfbb 2889 for ac_prog in cl.exe
bec39cab
AC
2890 do
2891 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
2895if test "${ac_cv_prog_CC+set}" = set; then :
2896 $as_echo_n "(cached) " >&6
c906108c
SS
2897else
2898 if test -n "$CC"; then
2899 ac_cv_prog_CC="$CC" # Let the user override the test.
2900else
bec39cab
AC
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2908 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2910 break 2
2911 fi
2912done
81ecdfbb
RW
2913 done
2914IFS=$as_save_IFS
bec39cab 2915
c906108c
SS
2916fi
2917fi
bec39cab 2918CC=$ac_cv_prog_CC
c906108c 2919if test -n "$CC"; then
81ecdfbb
RW
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2921$as_echo "$CC" >&6; }
c906108c 2922else
81ecdfbb
RW
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
c906108c 2925fi
bec39cab 2926
81ecdfbb 2927
bec39cab
AC
2928 test -n "$CC" && break
2929 done
2930fi
2931if test -z "$CC"; then
2932 ac_ct_CC=$CC
81ecdfbb 2933 for ac_prog in cl.exe
bec39cab
AC
2934do
2935 # Extract the first word of "$ac_prog", so it can be a program name with args.
2936set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2938$as_echo_n "checking for $ac_word... " >&6; }
2939if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2940 $as_echo_n "(cached) " >&6
bec39cab
AC
2941else
2942 if test -n "$ac_ct_CC"; then
2943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2944else
2945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946for as_dir in $PATH
2947do
2948 IFS=$as_save_IFS
2949 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2950 for ac_exec_ext in '' $ac_executable_extensions; do
2951 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2952 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2954 break 2
c906108c 2955 fi
bec39cab 2956done
81ecdfbb
RW
2957 done
2958IFS=$as_save_IFS
bec39cab
AC
2959
2960fi
2961fi
2962ac_ct_CC=$ac_cv_prog_ac_ct_CC
2963if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2965$as_echo "$ac_ct_CC" >&6; }
bec39cab 2966else
81ecdfbb
RW
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2968$as_echo "no" >&6; }
c906108c
SS
2969fi
2970
81ecdfbb 2971
bec39cab
AC
2972 test -n "$ac_ct_CC" && break
2973done
c906108c 2974
81ecdfbb
RW
2975 if test "x$ac_ct_CC" = x; then
2976 CC=""
2977 else
2978 case $cross_compiling:$ac_tool_warned in
2979yes:)
2980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2982ac_tool_warned=yes ;;
2983esac
2984 CC=$ac_ct_CC
2985 fi
bec39cab
AC
2986fi
2987
2988fi
2989
2990
81ecdfbb
RW
2991test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2993as_fn_error "no acceptable C compiler found in \$PATH
2994See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2995
2996# Provide some information about the compiler.
81ecdfbb
RW
2997$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2998set X $ac_compile
2999ac_compiler=$2
3000for ac_option in --version -v -V -qversion; do
3001 { { ac_try="$ac_compiler $ac_option >&5"
3002case "(($ac_try" in
3003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3004 *) ac_try_echo=$ac_try;;
3005esac
3006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3007$as_echo "$ac_try_echo"; } >&5
3008 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3009 ac_status=$?
81ecdfbb
RW
3010 if test -s conftest.err; then
3011 sed '10a\
3012... rest of stderr output deleted ...
3013 10q' conftest.err >conftest.er1
3014 cat conftest.er1 >&5
3015 rm -f conftest.er1 conftest.err
3016 fi
3017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3018 test $ac_status = 0; }
3019done
bec39cab 3020
81ecdfbb 3021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3022/* end confdefs.h. */
3023
3024int
3025main ()
3026{
3027
3028 ;
3029 return 0;
3030}
3031_ACEOF
3032ac_clean_files_save=$ac_clean_files
81ecdfbb 3033ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3034# Try to create an executable without -o first, disregard a.out.
3035# It will help us diagnose broken compilers, and finding out an intuition
3036# of exeext.
81ecdfbb
RW
3037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3038$as_echo_n "checking for C compiler default output file name... " >&6; }
3039ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3040
3041# The possible output files:
3042ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3043
3044ac_rmfiles=
3045for ac_file in $ac_files
3046do
3047 case $ac_file in
3048 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3049 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3050 esac
3051done
3052rm -f $ac_rmfiles
3053
3054if { { ac_try="$ac_link_default"
3055case "(($ac_try" in
3056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3057 *) ac_try_echo=$ac_try;;
3058esac
3059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3060$as_echo "$ac_try_echo"; } >&5
3061 (eval "$ac_link_default") 2>&5
3062 ac_status=$?
3063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3064 test $ac_status = 0; }; then :
3065 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3066# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3067# in a Makefile. We should not override ac_cv_exeext if it was cached,
3068# so that the user can short-circuit this test for compilers unknown to
3069# Autoconf.
3070for ac_file in $ac_files ''
bec39cab
AC
3071do
3072 test -f "$ac_file" || continue
3073 case $ac_file in
81ecdfbb 3074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3075 ;;
3076 [ab].out )
3077 # We found the default executable, but exeext='' is most
3078 # certainly right.
3079 break;;
3080 *.* )
81ecdfbb
RW
3081 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3082 then :; else
3083 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3084 fi
3085 # We set ac_cv_exeext here because the later test for it is not
3086 # safe: cross compilers may not add the suffix if given an `-o'
3087 # argument, so we may need to know it at that point already.
3088 # Even if this section looks crufty: it has the advantage of
3089 # actually working.
b4e70030
JB
3090 break;;
3091 * )
3092 break;;
bec39cab
AC
3093 esac
3094done
81ecdfbb
RW
3095test "$ac_cv_exeext" = no && ac_cv_exeext=
3096
bec39cab 3097else
81ecdfbb
RW
3098 ac_file=''
3099fi
3100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3101$as_echo "$ac_file" >&6; }
3102if test -z "$ac_file"; then :
3103 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3104sed 's/^/| /' conftest.$ac_ext >&5
3105
81ecdfbb
RW
3106{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3108{ as_fn_set_status 77
3109as_fn_error "C compiler cannot create executables
3110See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3111fi
b4e70030 3112ac_exeext=$ac_cv_exeext
b4e70030 3113
81ecdfbb 3114# Check that the compiler produces executables we can run. If not, either
bec39cab 3115# the compiler is broken, or we cross compile.
81ecdfbb
RW
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3117$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3118# If not cross compiling, check that we can run a simple program.
3119if test "$cross_compiling" != yes; then
3120 if { ac_try='./$ac_file'
81ecdfbb
RW
3121 { { case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
3125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3126$as_echo "$ac_try_echo"; } >&5
3127 (eval "$ac_try") 2>&5
bec39cab 3128 ac_status=$?
81ecdfbb
RW
3129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3130 test $ac_status = 0; }; }; then
bec39cab 3131 cross_compiling=no
c906108c 3132 else
bec39cab
AC
3133 if test "$cross_compiling" = maybe; then
3134 cross_compiling=yes
3135 else
81ecdfbb
RW
3136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3138as_fn_error "cannot run C compiled programs.
bec39cab 3139If you meant to cross compile, use \`--host'.
81ecdfbb 3140See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3141 fi
c906108c 3142 fi
bec39cab 3143fi
81ecdfbb
RW
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3145$as_echo "yes" >&6; }
bec39cab 3146
81ecdfbb 3147rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3148ac_clean_files=$ac_clean_files_save
81ecdfbb 3149# Check that the compiler produces executables we can run. If not, either
b4e70030 3150# the compiler is broken, or we cross compile.
81ecdfbb
RW
3151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3152$as_echo_n "checking whether we are cross compiling... " >&6; }
3153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3154$as_echo "$cross_compiling" >&6; }
3155
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3157$as_echo_n "checking for suffix of executables... " >&6; }
3158if { { ac_try="$ac_link"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
3163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164$as_echo "$ac_try_echo"; } >&5
3165 (eval "$ac_link") 2>&5
bec39cab 3166 ac_status=$?
81ecdfbb
RW
3167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168 test $ac_status = 0; }; then :
b4e70030
JB
3169 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3170# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3171# work properly (i.e., refer to `conftest.exe'), while it won't with
3172# `rm'.
3173for ac_file in conftest.exe conftest conftest.*; do
3174 test -f "$ac_file" || continue
3175 case $ac_file in
81ecdfbb 3176 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3177 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3178 break;;
3179 * ) break;;
3180 esac
3181done
c906108c 3182else
81ecdfbb
RW
3183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3185as_fn_error "cannot compute suffix of executables: cannot compile and link
3186See \`config.log' for more details." "$LINENO" 5; }
c906108c 3187fi
b4e70030 3188rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3190$as_echo "$ac_cv_exeext" >&6; }
c906108c 3191
b4e70030 3192rm -f conftest.$ac_ext
bec39cab
AC
3193EXEEXT=$ac_cv_exeext
3194ac_exeext=$EXEEXT
81ecdfbb
RW
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3196$as_echo_n "checking for suffix of object files... " >&6; }
3197if test "${ac_cv_objext+set}" = set; then :
3198 $as_echo_n "(cached) " >&6
bec39cab 3199else
81ecdfbb 3200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3201/* end confdefs.h. */
3202
3203int
3204main ()
3205{
3206
3207 ;
3208 return 0;
3209}
3210_ACEOF
3211rm -f conftest.o conftest.obj
81ecdfbb
RW
3212if { { ac_try="$ac_compile"
3213case "(($ac_try" in
3214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3215 *) ac_try_echo=$ac_try;;
3216esac
3217eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3218$as_echo "$ac_try_echo"; } >&5
3219 (eval "$ac_compile") 2>&5
3220 ac_status=$?
3221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3222 test $ac_status = 0; }; then :
3223 for ac_file in conftest.o conftest.obj conftest.*; do
3224 test -f "$ac_file" || continue;
bec39cab 3225 case $ac_file in
81ecdfbb 3226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3227 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3228 break;;
3229 esac
3230done
c906108c 3231else
81ecdfbb 3232 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3233sed 's/^/| /' conftest.$ac_ext >&5
3234
81ecdfbb
RW
3235{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3237as_fn_error "cannot compute suffix of object files: cannot compile
3238See \`config.log' for more details." "$LINENO" 5; }
c906108c 3239fi
b4e70030 3240rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3241fi
81ecdfbb
RW
3242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3243$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3244OBJEXT=$ac_cv_objext
3245ac_objext=$OBJEXT
81ecdfbb
RW
3246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3247$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3248if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3249 $as_echo_n "(cached) " >&6
c906108c 3250else
81ecdfbb 3251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3252/* end confdefs.h. */
3253
3254int
3255main ()
3256{
3257#ifndef __GNUC__
3258 choke me
3259#endif
3260
3261 ;
3262 return 0;
3263}
3264_ACEOF
81ecdfbb 3265if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3266 ac_compiler_gnu=yes
3267else
81ecdfbb 3268 ac_compiler_gnu=no
bec39cab 3269fi
81ecdfbb 3270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3271ac_cv_c_compiler_gnu=$ac_compiler_gnu
3272
3273fi
81ecdfbb
RW
3274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3275$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3276if test $ac_compiler_gnu = yes; then
3277 GCC=yes
3278else
3279 GCC=
3280fi
bec39cab
AC
3281ac_test_CFLAGS=${CFLAGS+set}
3282ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3284$as_echo_n "checking whether $CC accepts -g... " >&6; }
3285if test "${ac_cv_prog_cc_g+set}" = set; then :
3286 $as_echo_n "(cached) " >&6
bec39cab 3287else
81ecdfbb
RW
3288 ac_save_c_werror_flag=$ac_c_werror_flag
3289 ac_c_werror_flag=yes
3290 ac_cv_prog_cc_g=no
3291 CFLAGS="-g"
3292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3293/* end confdefs.h. */
3294
3295int
3296main ()
3297{
3298
3299 ;
3300 return 0;
3301}
3302_ACEOF
81ecdfbb 3303if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3304 ac_cv_prog_cc_g=yes
3305else
81ecdfbb
RW
3306 CFLAGS=""
3307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3308/* end confdefs.h. */
3309
3310int
3311main ()
3312{
3313
3314 ;
3315 return 0;
3316}
3317_ACEOF
3318if ac_fn_c_try_compile "$LINENO"; then :
3319
3320else
3321 ac_c_werror_flag=$ac_save_c_werror_flag
3322 CFLAGS="-g"
3323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3324/* end confdefs.h. */
3325
3326int
3327main ()
3328{
c906108c 3329
81ecdfbb
RW
3330 ;
3331 return 0;
3332}
3333_ACEOF
3334if ac_fn_c_try_compile "$LINENO"; then :
3335 ac_cv_prog_cc_g=yes
3336fi
3337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3338fi
3339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3340fi
81ecdfbb
RW
3341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3342 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3343fi
81ecdfbb
RW
3344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3345$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3346if test "$ac_test_CFLAGS" = set; then
bec39cab 3347 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3348elif test $ac_cv_prog_cc_g = yes; then
3349 if test "$GCC" = yes; then
3350 CFLAGS="-g -O2"
3351 else
3352 CFLAGS="-g"
3353 fi
3354else
3355 if test "$GCC" = yes; then
3356 CFLAGS="-O2"
3357 else
3358 CFLAGS=
3359 fi
3360fi
81ecdfbb
RW
3361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3362$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3363if test "${ac_cv_prog_cc_c89+set}" = set; then :
3364 $as_echo_n "(cached) " >&6
bec39cab 3365else
81ecdfbb 3366 ac_cv_prog_cc_c89=no
bec39cab 3367ac_save_CC=$CC
81ecdfbb 3368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3369/* end confdefs.h. */
c906108c
SS
3370#include <stdarg.h>
3371#include <stdio.h>
3372#include <sys/types.h>
3373#include <sys/stat.h>
3374/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3375struct buf { int x; };
3376FILE * (*rcsopen) (struct buf *, struct stat *, int);
3377static char *e (p, i)
3378 char **p;
3379 int i;
3380{
3381 return p[i];
3382}
3383static char *f (char * (*g) (char **, int), char **p, ...)
3384{
3385 char *s;
3386 va_list v;
3387 va_start (v,p);
3388 s = g (p, va_arg (v,int));
3389 va_end (v);
3390 return s;
3391}
bec39cab
AC
3392
3393/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3394 function prototypes and stuff, but not '\xHH' hex character constants.
3395 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3396 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3398 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3399 that's true only with -std. */
bec39cab
AC
3400int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3401
81ecdfbb
RW
3402/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3403 inside strings and character constants. */
3404#define FOO(x) 'x'
3405int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3406
c906108c
SS
3407int test (int i, double x);
3408struct s1 {int (*f) (int a);};
3409struct s2 {int (*f) (double a);};
3410int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3411int argc;
3412char **argv;
bec39cab
AC
3413int
3414main ()
3415{
c906108c 3416return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3417 ;
3418 return 0;
3419}
3420_ACEOF
81ecdfbb
RW
3421for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3423do
3424 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3425 if ac_fn_c_try_compile "$LINENO"; then :
3426 ac_cv_prog_cc_c89=$ac_arg
c906108c 3427fi
81ecdfbb
RW
3428rm -f core conftest.err conftest.$ac_objext
3429 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3430done
81ecdfbb 3431rm -f conftest.$ac_ext
bec39cab 3432CC=$ac_save_CC
c906108c
SS
3433
3434fi
81ecdfbb
RW
3435# AC_CACHE_VAL
3436case "x$ac_cv_prog_cc_c89" in
3437 x)
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3439$as_echo "none needed" >&6; } ;;
3440 xno)
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3442$as_echo "unsupported" >&6; } ;;
bec39cab 3443 *)
81ecdfbb
RW
3444 CC="$CC $ac_cv_prog_cc_c89"
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3446$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3447esac
81ecdfbb 3448if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3449
b4e70030
JB
3450fi
3451
bec39cab
AC
3452ac_ext=c
3453ac_cpp='$CPP $CPPFLAGS'
3454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3456ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3457
60ca704f 3458
bec39cab
AC
3459ac_ext=c
3460ac_cpp='$CPP $CPPFLAGS'
3461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3463ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3465$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3466# On Suns, sometimes $CPP names a directory.
3467if test -n "$CPP" && test -d "$CPP"; then
3468 CPP=
8bb2c122 3469fi
bec39cab 3470if test -z "$CPP"; then
81ecdfbb
RW
3471 if test "${ac_cv_prog_CPP+set}" = set; then :
3472 $as_echo_n "(cached) " >&6
bec39cab
AC
3473else
3474 # Double quotes because CPP needs to be expanded
3475 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3476 do
3477 ac_preproc_ok=false
3478for ac_c_preproc_warn_flag in '' yes
3479do
3480 # Use a header file that comes with gcc, so configuring glibc
3481 # with a fresh cross-compiler works.
3482 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3483 # <limits.h> exists even on freestanding compilers.
3484 # On the NeXT, cc -E runs the code through the compiler's parser,
3485 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3487/* end confdefs.h. */
3488#ifdef __STDC__
3489# include <limits.h>
3490#else
3491# include <assert.h>
3492#endif
3493 Syntax error
3494_ACEOF
81ecdfbb 3495if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3496
81ecdfbb 3497else
bec39cab
AC
3498 # Broken: fails on valid input.
3499continue
3500fi
3501rm -f conftest.err conftest.$ac_ext
3502
81ecdfbb 3503 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3504 # can be detected and how.
81ecdfbb 3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3506/* end confdefs.h. */
3507#include <ac_nonexistent.h>
3508_ACEOF
81ecdfbb 3509if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3510 # Broken: success on invalid input.
3511continue
8bb2c122 3512else
bec39cab
AC
3513 # Passes both tests.
3514ac_preproc_ok=:
3515break
8bb2c122 3516fi
bec39cab 3517rm -f conftest.err conftest.$ac_ext
8bb2c122 3518
bec39cab
AC
3519done
3520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3521rm -f conftest.err conftest.$ac_ext
81ecdfbb 3522if $ac_preproc_ok; then :
bec39cab
AC
3523 break
3524fi
8bb2c122 3525
bec39cab
AC
3526 done
3527 ac_cv_prog_CPP=$CPP
ddc9cd0f 3528
c906108c 3529fi
bec39cab
AC
3530 CPP=$ac_cv_prog_CPP
3531else
3532 ac_cv_prog_CPP=$CPP
c906108c 3533fi
81ecdfbb
RW
3534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3535$as_echo "$CPP" >&6; }
bec39cab
AC
3536ac_preproc_ok=false
3537for ac_c_preproc_warn_flag in '' yes
3538do
3539 # Use a header file that comes with gcc, so configuring glibc
3540 # with a fresh cross-compiler works.
3541 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3542 # <limits.h> exists even on freestanding compilers.
3543 # On the NeXT, cc -E runs the code through the compiler's parser,
3544 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3546/* end confdefs.h. */
3547#ifdef __STDC__
3548# include <limits.h>
3549#else
3550# include <assert.h>
3551#endif
3552 Syntax error
3553_ACEOF
81ecdfbb 3554if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3555
81ecdfbb 3556else
bec39cab
AC
3557 # Broken: fails on valid input.
3558continue
3559fi
3560rm -f conftest.err conftest.$ac_ext
3561
81ecdfbb 3562 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3563 # can be detected and how.
81ecdfbb 3564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3565/* end confdefs.h. */
3566#include <ac_nonexistent.h>
3567_ACEOF
81ecdfbb 3568if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3569 # Broken: success on invalid input.
3570continue
c906108c 3571else
bec39cab
AC
3572 # Passes both tests.
3573ac_preproc_ok=:
3574break
c906108c 3575fi
bec39cab 3576rm -f conftest.err conftest.$ac_ext
c906108c 3577
bec39cab
AC
3578done
3579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3580rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3581if $ac_preproc_ok; then :
3582
c906108c 3583else
81ecdfbb
RW
3584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3586as_fn_error "C preprocessor \"$CPP\" fails sanity check
3587See \`config.log' for more details." "$LINENO" 5; }
c906108c 3588fi
c906108c 3589
bec39cab
AC
3590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595
3596
81ecdfbb
RW
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3598$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3599if test "${ac_cv_path_GREP+set}" = set; then :
3600 $as_echo_n "(cached) " >&6
4e8d927d 3601else
81ecdfbb
RW
3602 if test -z "$GREP"; then
3603 ac_path_GREP_found=false
3604 # Loop through the user's path and test for each of PROGNAME-LIST
3605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3607do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
3610 for ac_prog in grep ggrep; do
3611 for ac_exec_ext in '' $ac_executable_extensions; do
3612 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3613 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3614# Check for GNU ac_path_GREP and select it if it is found.
3615 # Check for GNU $ac_path_GREP
3616case `"$ac_path_GREP" --version 2>&1` in
3617*GNU*)
3618 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3619*)
3620 ac_count=0
3621 $as_echo_n 0123456789 >"conftest.in"
3622 while :
3623 do
3624 cat "conftest.in" "conftest.in" >"conftest.tmp"
3625 mv "conftest.tmp" "conftest.in"
3626 cp "conftest.in" "conftest.nl"
3627 $as_echo 'GREP' >> "conftest.nl"
3628 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3629 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3630 as_fn_arith $ac_count + 1 && ac_count=$as_val
3631 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3632 # Best one so far, save it but keep looking for a better one
3633 ac_cv_path_GREP="$ac_path_GREP"
3634 ac_path_GREP_max=$ac_count
bec39cab 3635 fi
81ecdfbb
RW
3636 # 10*(2^10) chars as input seems more than enough
3637 test $ac_count -gt 10 && break
3638 done
3639 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3640esac
bec39cab 3641
81ecdfbb
RW
3642 $ac_path_GREP_found && break 3
3643 done
3644 done
3645 done
3646IFS=$as_save_IFS
3647 if test -z "$ac_cv_path_GREP"; then
3648 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3649 fi
c906108c 3650else
81ecdfbb 3651 ac_cv_path_GREP=$GREP
c906108c 3652fi
c906108c 3653
81ecdfbb
RW
3654fi
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3656$as_echo "$ac_cv_path_GREP" >&6; }
3657 GREP="$ac_cv_path_GREP"
c906108c 3658
c906108c 3659
81ecdfbb
RW
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3661$as_echo_n "checking for egrep... " >&6; }
3662if test "${ac_cv_path_EGREP+set}" = set; then :
3663 $as_echo_n "(cached) " >&6
783e057b 3664else
81ecdfbb
RW
3665 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3666 then ac_cv_path_EGREP="$GREP -E"
3667 else
3668 if test -z "$EGREP"; then
3669 ac_path_EGREP_found=false
3670 # Loop through the user's path and test for each of PROGNAME-LIST
3671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3676 for ac_prog in egrep; do
3677 for ac_exec_ext in '' $ac_executable_extensions; do
3678 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3679 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3680# Check for GNU ac_path_EGREP and select it if it is found.
3681 # Check for GNU $ac_path_EGREP
3682case `"$ac_path_EGREP" --version 2>&1` in
3683*GNU*)
3684 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3685*)
3686 ac_count=0
3687 $as_echo_n 0123456789 >"conftest.in"
3688 while :
3689 do
3690 cat "conftest.in" "conftest.in" >"conftest.tmp"
3691 mv "conftest.tmp" "conftest.in"
3692 cp "conftest.in" "conftest.nl"
3693 $as_echo 'EGREP' >> "conftest.nl"
3694 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3695 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3696 as_fn_arith $ac_count + 1 && ac_count=$as_val
3697 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3698 # Best one so far, save it but keep looking for a better one
3699 ac_cv_path_EGREP="$ac_path_EGREP"
3700 ac_path_EGREP_max=$ac_count
3701 fi
3702 # 10*(2^10) chars as input seems more than enough
3703 test $ac_count -gt 10 && break
3704 done
3705 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3706esac
bec39cab 3707
81ecdfbb
RW
3708 $ac_path_EGREP_found && break 3
3709 done
3710 done
3711 done
3712IFS=$as_save_IFS
3713 if test -z "$ac_cv_path_EGREP"; then
3714 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3715 fi
783e057b 3716else
81ecdfbb 3717 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3718fi
3719
81ecdfbb 3720 fi
783e057b 3721fi
81ecdfbb
RW
3722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3723$as_echo "$ac_cv_path_EGREP" >&6; }
3724 EGREP="$ac_cv_path_EGREP"
3725
783e057b 3726
81ecdfbb
RW
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3728$as_echo_n "checking for ANSI C header files... " >&6; }
3729if test "${ac_cv_header_stdc+set}" = set; then :
3730 $as_echo_n "(cached) " >&6
783e057b 3731else
81ecdfbb 3732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3733/* end confdefs.h. */
783e057b 3734#include <stdlib.h>
bec39cab 3735#include <stdarg.h>
783e057b
DJ
3736#include <string.h>
3737#include <float.h>
c906108c 3738
bec39cab
AC
3739int
3740main ()
3741{
c906108c 3742
bec39cab
AC
3743 ;
3744 return 0;
3745}
3746_ACEOF
81ecdfbb 3747if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3748 ac_cv_header_stdc=yes
c906108c 3749else
81ecdfbb 3750 ac_cv_header_stdc=no
c906108c 3751fi
81ecdfbb 3752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3753
783e057b
DJ
3754if test $ac_cv_header_stdc = yes; then
3755 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3757/* end confdefs.h. */
3758#include <string.h>
c906108c 3759
783e057b
DJ
3760_ACEOF
3761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3762 $EGREP "memchr" >/dev/null 2>&1; then :
3763
c906108c 3764else
783e057b 3765 ac_cv_header_stdc=no
c906108c 3766fi
783e057b 3767rm -f conftest*
c906108c
SS
3768
3769fi
3770
783e057b
DJ
3771if test $ac_cv_header_stdc = yes; then
3772 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3774/* end confdefs.h. */
3775#include <stdlib.h>
bec39cab 3776
783e057b
DJ
3777_ACEOF
3778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3779 $EGREP "free" >/dev/null 2>&1; then :
3780
bec39cab 3781else
783e057b 3782 ac_cv_header_stdc=no
bec39cab 3783fi
783e057b 3784rm -f conftest*
bec39cab
AC
3785
3786fi
bec39cab 3787
783e057b
DJ
3788if test $ac_cv_header_stdc = yes; then
3789 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3790 if test "$cross_compiling" = yes; then :
783e057b 3791 :
bec39cab 3792else
81ecdfbb 3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3794/* end confdefs.h. */
3795#include <ctype.h>
81ecdfbb 3796#include <stdlib.h>
783e057b
DJ
3797#if ((' ' & 0x0FF) == 0x020)
3798# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3799# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3800#else
3801# define ISLOWER(c) \
3802 (('a' <= (c) && (c) <= 'i') \
3803 || ('j' <= (c) && (c) <= 'r') \
3804 || ('s' <= (c) && (c) <= 'z'))
3805# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3806#endif
3807
3808#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3809int
3810main ()
3811{
3812 int i;
3813 for (i = 0; i < 256; i++)
3814 if (XOR (islower (i), ISLOWER (i))
3815 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3816 return 2;
3817 return 0;
783e057b
DJ
3818}
3819_ACEOF
81ecdfbb 3820if ac_fn_c_try_run "$LINENO"; then :
783e057b 3821
81ecdfbb
RW
3822else
3823 ac_cv_header_stdc=no
783e057b 3824fi
81ecdfbb
RW
3825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3826 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3827fi
81ecdfbb 3828
783e057b
DJ
3829fi
3830fi
81ecdfbb
RW
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3832$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3833if test $ac_cv_header_stdc = yes; then
3834
81ecdfbb 3835$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3836
3837fi
3838
3839# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3840for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3841 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3842do :
3843 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3844ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3845"
3846eval as_val=\$$as_ac_Header
3847 if test "x$as_val" = x""yes; then :
783e057b 3848 cat >>confdefs.h <<_ACEOF
81ecdfbb 3849#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3850_ACEOF
3851
3852fi
3853
3854done
3855
3856
3857
81ecdfbb
RW
3858 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3859if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3860 MINIX=yes
3861else
3862 MINIX=
3863fi
3864
3865
3866 if test "$MINIX" = yes; then
3867
81ecdfbb 3868$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3869
3870
81ecdfbb 3871$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3872
3873
81ecdfbb 3874$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3875
3876 fi
3877
3878
81ecdfbb
RW
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3880$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3881if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3882 $as_echo_n "(cached) " >&6
783e057b 3883else
81ecdfbb 3884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3885/* end confdefs.h. */
3886
c971b7fa
PA
3887# define __EXTENSIONS__ 1
3888 $ac_includes_default
783e057b
DJ
3889int
3890main ()
3891{
3892
3893 ;
3894 return 0;
3895}
3896_ACEOF
81ecdfbb 3897if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3898 ac_cv_safe_to_define___extensions__=yes
3899else
81ecdfbb 3900 ac_cv_safe_to_define___extensions__=no
783e057b 3901fi
81ecdfbb 3902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3903fi
81ecdfbb
RW
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3905$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3906 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3907 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3908
81ecdfbb 3909 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3910
81ecdfbb 3911 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3912
81ecdfbb 3913 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3914
81ecdfbb 3915 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3916
3917
c971b7fa
PA
3918ac_aux_dir=
3919for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3920 for ac_t in install-sh install.sh shtool; do
3921 if test -f "$ac_dir/$ac_t"; then
3922 ac_aux_dir=$ac_dir
3923 ac_install_sh="$ac_aux_dir/$ac_t -c"
3924 break 2
3925 fi
3926 done
3927done
3928if test -z "$ac_aux_dir"; then
3929 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3930fi
770d76d7 3931
c971b7fa
PA
3932# These three variables are undocumented and unsupported,
3933# and are intended to be withdrawn in a future Autoconf release.
3934# They can cause serious problems if a builder's source tree is in a directory
3935# whose full name contains unusual characters.
3936ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3937ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3938ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3939
770d76d7 3940
c971b7fa
PA
3941# Make sure we can run config.sub.
3942$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3943 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3944
c971b7fa
PA
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3946$as_echo_n "checking build system type... " >&6; }
3947if test "${ac_cv_build+set}" = set; then :
3948 $as_echo_n "(cached) " >&6
770d76d7 3949else
c971b7fa
PA
3950 ac_build_alias=$build_alias
3951test "x$ac_build_alias" = x &&
3952 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3953test "x$ac_build_alias" = x &&
3954 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3955ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3956 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3957
770d76d7 3958fi
c971b7fa
PA
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3960$as_echo "$ac_cv_build" >&6; }
3961case $ac_cv_build in
3962*-*-*) ;;
3963*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3964esac
c971b7fa
PA
3965build=$ac_cv_build
3966ac_save_IFS=$IFS; IFS='-'
3967set x $ac_cv_build
3968shift
3969build_cpu=$1
3970build_vendor=$2
3971shift; shift
3972# Remember, the first character of IFS is used to create $*,
3973# except with old shells:
3974build_os=$*
3975IFS=$ac_save_IFS
3976case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3977
3978
c971b7fa
PA
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3980$as_echo_n "checking host system type... " >&6; }
3981if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3982 $as_echo_n "(cached) " >&6
3983else
c971b7fa
PA
3984 if test "x$host_alias" = x; then
3985 ac_cv_host=$ac_cv_build
81ecdfbb 3986else
c971b7fa
PA
3987 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3988 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3989fi
81ecdfbb
RW
3990
3991fi
c971b7fa
PA
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3993$as_echo "$ac_cv_host" >&6; }
3994case $ac_cv_host in
3995*-*-*) ;;
3996*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3997esac
c971b7fa
PA
3998host=$ac_cv_host
3999ac_save_IFS=$IFS; IFS='-'
4000set x $ac_cv_host
4001shift
4002host_cpu=$1
4003host_vendor=$2
4004shift; shift
4005# Remember, the first character of IFS is used to create $*,
4006# except with old shells:
4007host_os=$*
4008IFS=$ac_save_IFS
4009case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4010
4011
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4013$as_echo_n "checking target system type... " >&6; }
4014if test "${ac_cv_target+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
4016else
4017 if test "x$target_alias" = x; then
4018 ac_cv_target=$ac_cv_host
4019else
4020 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4021 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4022fi
4023
4024fi
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4026$as_echo "$ac_cv_target" >&6; }
4027case $ac_cv_target in
4028*-*-*) ;;
4029*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4030esac
4031target=$ac_cv_target
4032ac_save_IFS=$IFS; IFS='-'
4033set x $ac_cv_target
4034shift
4035target_cpu=$1
4036target_vendor=$2
4037shift; shift
4038# Remember, the first character of IFS is used to create $*,
4039# except with old shells:
4040target_os=$*
4041IFS=$ac_save_IFS
4042case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4043
4044
4045# The aliases save the names the user supplied, while $host etc.
4046# will get canonicalized.
4047test -n "$target_alias" &&
4048 test "$program_prefix$program_suffix$program_transform_name" = \
4049 NONENONEs,x,x, &&
4050 program_prefix=${target_alias}-
4051
4052# The tests for host and target for $enable_largefile require
4053# canonical names.
4054
4055
81ecdfbb 4056
da2f07f1
JK
4057# As the $enable_largefile decision depends on --enable-plugins we must set it
4058# even in directories otherwise not depending on the $plugins option.
4059
4060
4061# Check whether --enable-plugins was given.
4062if test "${enable_plugins+set}" = set; then :
4063 enableval=$enable_plugins; case "${enableval}" in
4064 yes | "") plugins=yes ;;
4065 no) plugins=no ;;
4066 *) plugins=yes ;;
4067 esac
4068else
4069 plugins=no
4070fi
4071
4072
4073
4074case "${host}" in
4075 sparc-*-solaris*|i[3-7]86-*-solaris*)
4076 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4077 # are mutually exclusive; and without procfs support, the bfd/ elf module
4078 # cannot provide certain routines such as elfcore_write_prpsinfo
4079 # or elfcore_write_prstatus. So unless the user explicitly requested
4080 # large-file support through the --enable-largefile switch, disable
4081 # large-file support in favor of procfs support.
4082 test "${target}" = "${host}" -a "x$plugins" = xno \
4083 && : ${enable_largefile="no"}
4084 ;;
4085esac
4086
4087# Check whether --enable-largefile was given.
4088if test "${enable_largefile+set}" = set; then :
4089 enableval=$enable_largefile;
4090fi
4091
4092if test "$enable_largefile" != no; then
4093
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4095$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4096if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4097 $as_echo_n "(cached) " >&6
4098else
4099 ac_cv_sys_largefile_CC=no
4100 if test "$GCC" != yes; then
4101 ac_save_CC=$CC
4102 while :; do
4103 # IRIX 6.2 and later do not support large files by default,
4104 # so use the C compiler's -n32 option if that helps.
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106/* end confdefs.h. */
4107#include <sys/types.h>
4108 /* Check that off_t can represent 2**63 - 1 correctly.
4109 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4110 since some C++ compilers masquerading as C compilers
4111 incorrectly reject 9223372036854775807. */
4112#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4113 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4114 && LARGE_OFF_T % 2147483647 == 1)
4115 ? 1 : -1];
4116int
4117main ()
4118{
4119
4120 ;
4121 return 0;
4122}
4123_ACEOF
4124 if ac_fn_c_try_compile "$LINENO"; then :
4125 break
4126fi
4127rm -f core conftest.err conftest.$ac_objext
4128 CC="$CC -n32"
4129 if ac_fn_c_try_compile "$LINENO"; then :
4130 ac_cv_sys_largefile_CC=' -n32'; break
4131fi
4132rm -f core conftest.err conftest.$ac_objext
4133 break
4134 done
4135 CC=$ac_save_CC
4136 rm -f conftest.$ac_ext
4137 fi
4138fi
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4140$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4141 if test "$ac_cv_sys_largefile_CC" != no; then
4142 CC=$CC$ac_cv_sys_largefile_CC
4143 fi
4144
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4146$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4147if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4148 $as_echo_n "(cached) " >&6
4149else
4150 while :; do
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4152/* end confdefs.h. */
4153#include <sys/types.h>
4154 /* Check that off_t can represent 2**63 - 1 correctly.
4155 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4156 since some C++ compilers masquerading as C compilers
4157 incorrectly reject 9223372036854775807. */
4158#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4159 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4160 && LARGE_OFF_T % 2147483647 == 1)
4161 ? 1 : -1];
4162int
4163main ()
4164{
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
4170if ac_fn_c_try_compile "$LINENO"; then :
4171 ac_cv_sys_file_offset_bits=no; break
4172fi
4173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4175/* end confdefs.h. */
4176#define _FILE_OFFSET_BITS 64
4177#include <sys/types.h>
4178 /* Check that off_t can represent 2**63 - 1 correctly.
4179 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4180 since some C++ compilers masquerading as C compilers
4181 incorrectly reject 9223372036854775807. */
4182#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4183 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4184 && LARGE_OFF_T % 2147483647 == 1)
4185 ? 1 : -1];
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194if ac_fn_c_try_compile "$LINENO"; then :
4195 ac_cv_sys_file_offset_bits=64; break
4196fi
4197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4198 ac_cv_sys_file_offset_bits=unknown
4199 break
4200done
4201fi
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4203$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4204case $ac_cv_sys_file_offset_bits in #(
4205 no | unknown) ;;
4206 *)
4207cat >>confdefs.h <<_ACEOF
4208#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4209_ACEOF
4210;;
4211esac
4212rm -rf conftest*
4213 if test $ac_cv_sys_file_offset_bits = unknown; then
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4215$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4216if test "${ac_cv_sys_large_files+set}" = set; then :
4217 $as_echo_n "(cached) " >&6
4218else
4219 while :; do
4220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4221/* end confdefs.h. */
4222#include <sys/types.h>
4223 /* Check that off_t can represent 2**63 - 1 correctly.
4224 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4225 since some C++ compilers masquerading as C compilers
4226 incorrectly reject 9223372036854775807. */
4227#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4228 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4229 && LARGE_OFF_T % 2147483647 == 1)
4230 ? 1 : -1];
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
4239if ac_fn_c_try_compile "$LINENO"; then :
4240 ac_cv_sys_large_files=no; break
4241fi
4242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4244/* end confdefs.h. */
4245#define _LARGE_FILES 1
4246#include <sys/types.h>
4247 /* Check that off_t can represent 2**63 - 1 correctly.
4248 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4249 since some C++ compilers masquerading as C compilers
4250 incorrectly reject 9223372036854775807. */
4251#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4252 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4253 && LARGE_OFF_T % 2147483647 == 1)
4254 ? 1 : -1];
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263if ac_fn_c_try_compile "$LINENO"; then :
4264 ac_cv_sys_large_files=1; break
4265fi
4266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267 ac_cv_sys_large_files=unknown
4268 break
4269done
4270fi
4271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4272$as_echo "$ac_cv_sys_large_files" >&6; }
4273case $ac_cv_sys_large_files in #(
4274 no | unknown) ;;
4275 *)
4276cat >>confdefs.h <<_ACEOF
4277#define _LARGE_FILES $ac_cv_sys_large_files
4278_ACEOF
4279;;
4280esac
4281rm -rf conftest*
4282 fi
4283fi
4284
4285
4286
81ecdfbb
RW
4287
4288
4289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4290$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4291if test "${am_cv_prog_cc_stdc+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
4293else
4294 am_cv_prog_cc_stdc=no
4295ac_save_CC="$CC"
4296# Don't try gcc -ansi; that turns off useful extensions and
4297# breaks some systems' header files.
4298# AIX -qlanglvl=ansi
4299# Ultrix and OSF/1 -std1
4300# HP-UX 10.20 and later -Ae
4301# HP-UX older versions -Aa -D_HPUX_SOURCE
4302# SVR4 -Xc -D__EXTENSIONS__
4303for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4304do
783e057b 4305 CC="$ac_save_CC $ac_arg"
81ecdfbb 4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4307/* end confdefs.h. */
4308#include <stdarg.h>
4309#include <stdio.h>
4310#include <sys/types.h>
4311#include <sys/stat.h>
4312/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4313struct buf { int x; };
4314FILE * (*rcsopen) (struct buf *, struct stat *, int);
4315static char *e (p, i)
4316 char **p;
4317 int i;
4318{
4319 return p[i];
4320}
4321static char *f (char * (*g) (char **, int), char **p, ...)
4322{
4323 char *s;
4324 va_list v;
4325 va_start (v,p);
4326 s = g (p, va_arg (v,int));
4327 va_end (v);
4328 return s;
4329}
4330int test (int i, double x);
4331struct s1 {int (*f) (int a);};
4332struct s2 {int (*f) (double a);};
4333int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4334int argc;
4335char **argv;
4336
4337int
4338main ()
4339{
4340
4341return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4342
4343 ;
4344 return 0;
4345}
4346_ACEOF
81ecdfbb 4347if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4348 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4349fi
81ecdfbb 4350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4351done
4352CC="$ac_save_CC"
4353
4354fi
4355
4356if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4358$as_echo "none needed" >&6; }
783e057b 4359else
81ecdfbb
RW
4360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4361$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4362fi
4363case "x$am_cv_prog_cc_stdc" in
4364 x|xno) ;;
4365 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4366esac
4367
4368
4369ac_aux_dir=
81ecdfbb
RW
4370for ac_dir in .. "$srcdir"/..; do
4371 for ac_t in install-sh install.sh shtool; do
4372 if test -f "$ac_dir/$ac_t"; then
4373 ac_aux_dir=$ac_dir
4374 ac_install_sh="$ac_aux_dir/$ac_t -c"
4375 break 2
4376 fi
4377 done
783e057b
DJ
4378done
4379if test -z "$ac_aux_dir"; then
81ecdfbb 4380 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4381fi
81ecdfbb
RW
4382
4383# These three variables are undocumented and unsupported,
4384# and are intended to be withdrawn in a future Autoconf release.
4385# They can cause serious problems if a builder's source tree is in a directory
4386# whose full name contains unusual characters.
4387ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4388ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4389ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4390
783e057b 4391
783e057b 4392
9009e1ae
MR
4393test "$program_prefix" != NONE &&
4394 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4395# Use a double $ so make ignores it.
4396test "$program_suffix" != NONE &&
4397 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4398# Double any \ or $.
4399# By default was `s,x,x', remove it if useless.
4400ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4401program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4402
81ecdfbb 4403
a417dc56
RW
4404# Dependency checking.
4405rm -rf .tst 2>/dev/null
4406mkdir .tst 2>/dev/null
4407if test -d .tst; then
4408 am__leading_dot=.
4409else
4410 am__leading_dot=_
4411fi
4412rmdir .tst 2>/dev/null
4413
4414DEPDIR="${am__leading_dot}deps"
4415
81ecdfbb 4416ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4417
4418
4419depcc="$CC" am_compiler_list=
4420
4421am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4423$as_echo_n "checking dependency style of $depcc... " >&6; }
4424if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4425 $as_echo_n "(cached) " >&6
a417dc56
RW
4426else
4427 if test -f "$am_depcomp"; then
4428 # We make a subdir and do the tests there. Otherwise we can end up
4429 # making bogus files that we don't know about and never remove. For
4430 # instance it was reported that on HP-UX the gcc test will end up
4431 # making a dummy file named `D' -- because `-MD' means `put the output
4432 # in D'.
4433 mkdir conftest.dir
4434 # Copy depcomp to subdir because otherwise we won't find it if we're
4435 # using a relative directory.
4436 cp "$am_depcomp" conftest.dir
4437 cd conftest.dir
4438 # We will build objects and dependencies in a subdirectory because
4439 # it helps to detect inapplicable dependency modes. For instance
4440 # both Tru64's cc and ICC support -MD to output dependencies as a
4441 # side effect of compilation, but ICC will put the dependencies in
4442 # the current directory while Tru64 will put them in the object
4443 # directory.
4444 mkdir sub
4445
4446 am_cv_CC_dependencies_compiler_type=none
4447 if test "$am_compiler_list" = ""; then
4448 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4449 fi
4450 for depmode in $am_compiler_list; do
4451 if test $depmode = none; then break; fi
4452
81ecdfbb 4453 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4454 # Setup a source with many dependencies, because some compilers
4455 # like to wrap large dependency lists on column 80 (with \), and
4456 # we should not choose a depcomp mode which is confused by this.
4457 #
4458 # We need to recreate these files for each test, as the compiler may
4459 # overwrite some of them when testing with obscure command lines.
4460 # This happens at least with the AIX C compiler.
4461 : > sub/conftest.c
4462 for i in 1 2 3 4 5 6; do
4463 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4464 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4465 # Solaris 8's {/usr,}/bin/sh.
4466 touch sub/conftst$i.h
4467 done
4468 echo "include sub/conftest.Po" > confmf
4469
4470 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4471 # mode. It turns out that the SunPro C++ compiler does not properly
4472 # handle `-M -o', and we need to detect this.
4473 depcmd="depmode=$depmode \
4474 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4475 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4476 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4477 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4478 if env $depcmd > conftest.err 2>&1 &&
4479 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4480 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4481 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4482 # icc doesn't choke on unknown options, it will just issue warnings
4483 # or remarks (even with -Werror). So we grep stderr for any message
4484 # that says an option was ignored or not supported.
4485 # When given -MP, icc 7.0 and 7.1 complain thusly:
4486 # icc: Command line warning: ignoring option '-M'; no argument required
4487 # The diagnosis changed in icc 8.0:
4488 # icc: Command line remark: option '-MP' not supported
4489 if (grep 'ignoring option' conftest.err ||
4490 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4491 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4492 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4493 break
4494 fi
4495 fi
81ecdfbb 4496 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4497 sed -e 's/^/| /' < conftest.err >&5
4498 done
4499
4500 cd ..
4501 rm -rf conftest.dir
4502else
4503 am_cv_CC_dependencies_compiler_type=none
4504fi
4505
4506fi
81ecdfbb
RW
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4508$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4509if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4510then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4511else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4512
4513fi
4514
4515
4516# Check for the 'make' the user wants to use.
4517for ac_prog in make
4518do
4519 # Extract the first word of "$ac_prog", so it can be a program name with args.
4520set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4522$as_echo_n "checking for $ac_word... " >&6; }
4523if test "${ac_cv_prog_MAKE+set}" = set; then :
4524 $as_echo_n "(cached) " >&6
a417dc56
RW
4525else
4526 if test -n "$MAKE"; then
4527 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4528else
4529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in $PATH
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4534 for ac_exec_ext in '' $ac_executable_extensions; do
4535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4536 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4538 break 2
4539 fi
4540done
81ecdfbb
RW
4541 done
4542IFS=$as_save_IFS
a417dc56
RW
4543
4544fi
4545fi
4546MAKE=$ac_cv_prog_MAKE
4547if test -n "$MAKE"; then
81ecdfbb
RW
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4549$as_echo "$MAKE" >&6; }
a417dc56 4550else
81ecdfbb
RW
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4552$as_echo "no" >&6; }
a417dc56
RW
4553fi
4554
81ecdfbb 4555
a417dc56
RW
4556 test -n "$MAKE" && break
4557done
4558
4559MAKE_IS_GNU=
4560case "`$MAKE --version 2>&1 | sed 1q`" in
4561 *GNU*)
4562 MAKE_IS_GNU=yes
4563 ;;
4564esac
81ecdfbb 4565 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4566 GMAKE_TRUE=
4567 GMAKE_FALSE='#'
4568else
4569 GMAKE_TRUE='#'
4570 GMAKE_FALSE=
4571fi
4572
81ecdfbb
RW
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4574$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4575set x ${MAKE-make}
4576ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4577if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4578 $as_echo_n "(cached) " >&6
a417dc56
RW
4579else
4580 cat >conftest.make <<\_ACEOF
81ecdfbb 4581SHELL = /bin/sh
a417dc56 4582all:
81ecdfbb 4583 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4584_ACEOF
4585# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4586case `${MAKE-make} -f conftest.make 2>/dev/null` in
4587 *@@@%%%=?*=@@@%%%*)
4588 eval ac_cv_prog_make_${ac_make}_set=yes;;
4589 *)
4590 eval ac_cv_prog_make_${ac_make}_set=no;;
4591esac
a417dc56
RW
4592rm -f conftest.make
4593fi
81ecdfbb
RW
4594if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4596$as_echo "yes" >&6; }
a417dc56
RW
4597 SET_MAKE=
4598else
81ecdfbb
RW
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600$as_echo "no" >&6; }
a417dc56
RW
4601 SET_MAKE="MAKE=${MAKE-make}"
4602fi
4603
4604
c971b7fa
PA
4605# Configure gnulib. We need to build gnulib under some other
4606# directory not "gnulib", to avoid the problem of both GDB and
4607# GDBserver wanting to build it in the same directory, when building
4608# in the source dir.
783e057b 4609
c971b7fa
PA
4610 in_src="gnulib"
4611 in_build="build-gnulib"
4612
4613 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4614 # so they do not pile up.
4615 ac_sub_configure_args=
4616 ac_prev=
4617 eval "set x $ac_configure_args"
4618 shift
4619 for ac_arg
4620 do
4621 if test -n "$ac_prev"; then
4622 ac_prev=
4623 continue
4624 fi
4625 case $ac_arg in
4626 -cache-file | --cache-file | --cache-fil | --cache-fi \
4627 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4628 ac_prev=cache_file ;;
4629 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4630 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4631 | --c=*)
4632 ;;
4633 --config-cache | -C)
4634 ;;
4635 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4636 ac_prev=srcdir ;;
4637 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4638 ;;
4639 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4640 ac_prev=prefix ;;
4641 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4642 ;;
4643 --disable-option-checking)
4644 ;;
4645 *)
4646 case $ac_arg in
4647 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4648 esac
4649 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4650 esac
4651 done
4652
4653 # Always prepend --prefix to ensure using the same prefix
4654 # in subdir configurations.
4655 ac_arg="--prefix=$prefix"
4656 case $ac_arg in
4657 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4658 esac
4659 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4660
4661 # Pass --silent
4662 if test "$silent" = yes; then
4663 ac_sub_configure_args="--silent $ac_sub_configure_args"
4664 fi
4665
4666 # Always prepend --disable-option-checking to silence warnings, since
4667 # different subdirs can have different --enable and --with options.
4668 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4669
4670 ac_popdir=`pwd`
4671 ac_dir=$in_build
4672
4673 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4674 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4675 $as_echo "$ac_msg" >&6
4676 as_dir="$ac_dir"; as_fn_mkdir_p
4677
38ea300a
PA
4678 case $srcdir in
4679 [\\/]* | ?:[\\/]* )
4680 ac_srcdir=$srcdir/$in_src ;;
4681 *) # Relative name.
4682 ac_srcdir=../$srcdir/$in_src ;;
4683 esac
c971b7fa
PA
4684
4685 cd "$ac_dir"
4686
4687 ac_sub_configure=$ac_srcdir/configure
4688
4689 # Make the cache file name correct relative to the subdirectory.
4690 case $cache_file in
4691 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4692 *) # Relative name.
4693 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4694 esac
4695
4696 { $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
4697$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4698 # The eval makes quoting arguments work.
4699 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4700 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4701 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4702
4703 cd "$ac_popdir"
783e057b 4704
c971b7fa
PA
4705
4706
4707CONFIG_OBS=
4708CONFIG_DEPS=
4709CONFIG_SRCS=
4710ENABLE_CFLAGS=
4711
4712CONFIG_ALL=
4713CONFIG_CLEAN=
4714CONFIG_INSTALL=
4715CONFIG_UNINSTALL=
4716
4717# If we haven't got the data from the intl directory,
4718# assume NLS is disabled.
4719USE_NLS=no
4720LIBINTL=
4721LIBINTL_DEP=
4722INCINTL=
4723XGETTEXT=
4724GMSGFMT=
4725POSUB=
783e057b
DJ
4726
4727if test -f ../intl/config.intl; then
4728 . ../intl/config.intl
4729fi
81ecdfbb
RW
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4731$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4732if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
783e057b 4735else
81ecdfbb
RW
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4737$as_echo "yes" >&6; }
783e057b 4738
81ecdfbb 4739$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4740
4741
81ecdfbb
RW
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4743$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4744 # Look for .po and .gmo files in the source directory.
4745 CATALOGS=
4746 XLINGUAS=
4747 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4748 # If there aren't any .gmo files the shell will give us the
4749 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4750 # weeded out.
4751 case "$cat" in *\**)
4752 continue;;
4753 esac
4754 # The quadruple backslash is collapsed to a double backslash
4755 # by the backticks, then collapsed again by the double quotes,
4756 # leaving us with one backslash in the sed expression (right
4757 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4758 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4759 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4760 # The user is allowed to set LINGUAS to a list of languages to
4761 # install catalogs for. If it's empty that means "all of them."
4762 if test "x$LINGUAS" = x; then
4763 CATALOGS="$CATALOGS $cat"
4764 XLINGUAS="$XLINGUAS $lang"
4765 else
4766 case "$LINGUAS" in *$lang*)
4767 CATALOGS="$CATALOGS $cat"
4768 XLINGUAS="$XLINGUAS $lang"
4769 ;;
4770 esac
e28b3332
DJ
4771 fi
4772 done
c971b7fa
PA
4773 LINGUAS="$XLINGUAS"
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4775$as_echo "$LINGUAS" >&6; }
4776
4777
4778 DATADIRNAME=share
4779
4780 INSTOBJEXT=.mo
4781
4782 GENCAT=gencat
4783
4784 CATOBJEXT=.gmo
e28b3332 4785
e28b3332
DJ
4786fi
4787
c971b7fa
PA
4788localedir='${datadir}/locale'
4789
4790
4791if test x"$USE_NLS" = xyes; then
4792 CONFIG_ALL="$CONFIG_ALL all-po"
4793 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4794 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4795 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4796fi
e28b3332 4797
c971b7fa
PA
4798GNULIB=build-gnulib/import
4799
4800# For Makefile dependencies.
4801GNULIB_STDINT_H=
4802if test x"$STDINT_H" != x; then
4803 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4804fi
4805
4806
c971b7fa
PA
4807PACKAGE=gdb
4808
4809cat >>confdefs.h <<_ACEOF
4810#define PACKAGE "$PACKAGE"
4811_ACEOF
4812
4813
4814
4815# We never need to detect it in this sub-configure.
4816# But preserve it for config.status --recheck.
4817
4818
4819
4820MAKEINFO_EXTRA_FLAGS=""
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4822$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4823if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4824 $as_echo_n "(cached) " >&6
4825else
4826 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4827 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4828 gdb_cv_have_makeinfo_click=yes
4829 else
4830 gdb_cv_have_makeinfo_click=no
4831 fi
4832fi
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4834$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4835if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4836 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4837fi
e28b3332
DJ
4838
4839
bec39cab
AC
4840
4841
81ecdfbb
RW
4842# Check whether --with-separate-debug-dir was given.
4843if test "${with_separate_debug_dir+set}" = set; then :
4844 withval=$with_separate_debug_dir;
b14b1491
TT
4845 DEBUGDIR=$withval
4846else
4847 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4848fi
4849
20e95c23 4850
783e057b
DJ
4851 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4852 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4853 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4854 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4855
783e057b
DJ
4856cat >>confdefs.h <<_ACEOF
4857#define DEBUGDIR "$ac_define_dir"
20e95c23 4858_ACEOF
20e95c23 4859
20e95c23 4860
20e95c23 4861
0c4a4063 4862
b14b1491
TT
4863 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4864 if test "x$prefix" = xNONE; then
4865 test_prefix=/usr/local
4866 else
4867 test_prefix=$prefix
4868 fi
783e057b 4869 else
b14b1491 4870 test_prefix=$exec_prefix
783e057b 4871 fi
b14b1491
TT
4872 value=0
4873 case ${ac_define_dir} in
4874 "${test_prefix}"|"${test_prefix}/"*|\
4875 '${exec_prefix}'|'${exec_prefix}/'*)
4876 value=1
4877 ;;
4878 esac
4879
4880cat >>confdefs.h <<_ACEOF
4881#define DEBUGDIR_RELOCATABLE $value
4882_ACEOF
4883
4884
4885
0c4a4063 4886
f83d8a90
DE
4887# We can't pass paths as command line arguments.
4888# Mingw32 tries to be clever and will convert the paths for us.
4889# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4890# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4891# This breaks GDB's relocatable path conversions since paths passed in
4892# config.h would not get so translated, the path prefixes no longer match.
4893
4894 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4895 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4896 ac_define_dir=`eval echo $bindir`
4897 ac_define_dir=`eval echo $ac_define_dir`
4898
4899cat >>confdefs.h <<_ACEOF
4900#define BINDIR "$ac_define_dir"
4901_ACEOF
4902
4903
4904
b14b1491
TT
4905# GDB's datadir relocation
4906
4907
4908
81ecdfbb
RW
4909# Check whether --with-gdb-datadir was given.
4910if test "${with_gdb_datadir+set}" = set; then :
4911 withval=$with_gdb_datadir;
b14b1491 4912 GDB_DATADIR=$withval
20e95c23 4913else
b14b1491 4914 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4915fi
4916
20e95c23 4917
b14b1491
TT
4918 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4919 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4920 ac_define_dir=`eval echo $GDB_DATADIR`
4921 ac_define_dir=`eval echo $ac_define_dir`
4922
4923cat >>confdefs.h <<_ACEOF
4924#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4925_ACEOF
4926
b14b1491
TT
4927
4928
0c4a4063 4929
b14b1491
TT
4930 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4931 if test "x$prefix" = xNONE; then
4932 test_prefix=/usr/local
4933 else
4934 test_prefix=$prefix
4935 fi
4936 else
4937 test_prefix=$exec_prefix
4938 fi
4939 value=0
4940 case ${ac_define_dir} in
4941 "${test_prefix}"|"${test_prefix}/"*|\
4942 '${exec_prefix}'|'${exec_prefix}/'*)
4943 value=1
4944 ;;
4945 esac
4946
4947cat >>confdefs.h <<_ACEOF
4948#define GDB_DATADIR_RELOCATABLE $value
4949_ACEOF
4950
4951
783e057b 4952
20e95c23 4953
0c4a4063 4954
81ecdfbb
RW
4955# Check whether --with-relocated-sources was given.
4956if test "${with_relocated_sources+set}" = set; then :
4957 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4958
4959 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4960 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4961 ac_define_dir=`eval echo $reloc_srcdir`
4962 ac_define_dir=`eval echo $ac_define_dir`
4963
4964cat >>confdefs.h <<_ACEOF
4965#define RELOC_SRCDIR "$ac_define_dir"
4966_ACEOF
4967
4968
4969
81ecdfbb
RW
4970fi
4971
29b0e8a2 4972
7349ff92
JK
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4974$as_echo_n "checking for default auto-load directory... " >&6; }
4975
4976# Check whether --with-auto-load-dir was given.
4977if test "${with_auto_load_dir+set}" = set; then :
4978 withval=$with_auto_load_dir;
4979else
1564a261 4980 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
4981fi
4982
1564a261 4983escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
4984
4985 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4987 ac_define_dir=`eval echo $escape_dir`
4988 ac_define_dir=`eval echo $ac_define_dir`
4989
4990cat >>confdefs.h <<_ACEOF
4991#define AUTO_LOAD_DIR "$ac_define_dir"
4992_ACEOF
4993
4994
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
4996$as_echo "$with_auto_load_dir" >&6; }
4997
bccbefd2
JK
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4999$as_echo_n "checking for default auto-load safe-path... " >&6; }
5000
5001# Check whether --with-auto-load-safe-path was given.
5002if test "${with_auto_load_safe_path+set}" = set; then :
5003 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5004 with_auto_load_safe_path="/"
5005 fi
bccbefd2 5006else
7349ff92 5007 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5008fi
5009
1564a261 5010escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5011
5012 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5013 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5014 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5015 ac_define_dir=`eval echo $ac_define_dir`
5016
5017cat >>confdefs.h <<_ACEOF
6dea1fbd 5018#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5019_ACEOF
5020
5021
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5023$as_echo "$with_auto_load_safe_path" >&6; }
5024
29b0e8a2 5025
20e95c23 5026
5ae98d25 5027subdirs="$subdirs testsuite"
20e95c23
DJ
5028
5029
783e057b 5030# Check whether to support alternative target configurations
81ecdfbb
RW
5031# Check whether --enable-targets was given.
5032if test "${enable_targets+set}" = set; then :
5033 enableval=$enable_targets; case "${enableval}" in
5034 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5035 ;;
5036 no) enable_targets= ;;
5037 *) enable_targets=$enableval ;;
5038esac
81ecdfbb
RW
5039fi
5040
20e95c23 5041
783e057b 5042# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5043# Check whether --enable-64-bit-bfd was given.
5044if test "${enable_64_bit_bfd+set}" = set; then :
5045 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5046 yes) want64=true ;;
5047 no) want64=false ;;
81ecdfbb 5048 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5049esac
5050else
5051 want64=false
81ecdfbb
RW
5052fi
5053
783e057b
DJ
5054# Provide defaults for some variables set by the per-host and per-target
5055# configuration.
5056gdb_host_obs=posix-hdep.o
20e95c23 5057
783e057b
DJ
5058if test "${target}" = "${host}"; then
5059 gdb_native=yes
5060else
5061 gdb_native=no
5062fi
20e95c23 5063
783e057b 5064. $srcdir/configure.host
20e95c23 5065
783e057b 5066# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5067
783e057b
DJ
5068TARGET_OBS=
5069all_targets=
20e95c23 5070
783e057b 5071for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5072do
783e057b
DJ
5073 if test "$targ_alias" = "all"; then
5074 all_targets=true
5075 else
5076 # Canonicalize the secondary target names.
5077 result=`$ac_config_sub $targ_alias 2>/dev/null`
5078 if test -n "$result"; then
5079 targ=$result
5080 else
5081 targ=$targ_alias
5082 fi
20e95c23 5083
783e057b 5084 . ${srcdir}/configure.tgt
20e95c23 5085
bf307134
JB
5086 if test -z "${gdb_target_obs}"; then :
5087 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5088fi
5089
783e057b
DJ
5090 # Target-specific object files
5091 for i in ${gdb_target_obs}; do
5092 case " $TARGET_OBS " in
5093 *" ${i} "*) ;;
5094 *)
5095 TARGET_OBS="$TARGET_OBS ${i}"
5096 ;;
5097 esac
5098 done
20e95c23 5099
783e057b
DJ
5100 # Check whether this target needs 64-bit CORE_ADDR
5101 if test x${want64} = xfalse; then
5102 . ${srcdir}/../bfd/config.bfd
5103 fi
5104 fi
20e95c23
DJ
5105done
5106
783e057b
DJ
5107if test x${all_targets} = xtrue; then
5108
5109 # We want all 64-bit targets if we either:
5110 # - run on a 64-bit host or
5111 # - already require 64-bit support for some other target or
5112 # - the --enable-64-bit-bfd option was supplied
5113 # Otherwise we only support all 32-bit targets.
5114 #
5115 # NOTE: This test must be in sync with the corresponding
5116 # tests in BFD!
20e95c23 5117
783e057b 5118 if test x${want64} = xfalse; then
81ecdfbb
RW
5119 # The cast to long int works around a bug in the HP C Compiler
5120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5122# This bug is HP SR number 8606223364.
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5124$as_echo_n "checking size of long... " >&6; }
5125if test "${ac_cv_sizeof_long+set}" = set; then :
5126 $as_echo_n "(cached) " >&6
c0993dbe 5127else
81ecdfbb 5128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5129
81ecdfbb
RW
5130else
5131 if test "$ac_cv_type_long" = yes; then
5132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5134{ as_fn_set_status 77
5135as_fn_error "cannot compute sizeof (long)
5136See \`config.log' for more details." "$LINENO" 5; }; }
5137 else
5138 ac_cv_sizeof_long=0
5139 fi
c0993dbe 5140fi
81ecdfbb 5141
c0993dbe 5142fi
81ecdfbb
RW
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5144$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5145
c0993dbe 5146
c0993dbe 5147
c0993dbe
UW
5148cat >>confdefs.h <<_ACEOF
5149#define SIZEOF_LONG $ac_cv_sizeof_long
5150_ACEOF
5151
5152
5153 if test "x${ac_cv_sizeof_long}" = "x8"; then
5154 want64=true
5155 fi
5156 fi
5157 if test x${want64} = xtrue; then
5158 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5159 else
5160 TARGET_OBS='$(ALL_TARGET_OBS)'
5161 fi
5162fi
5163
5164
5165
5166# For other settings, only the main target counts.
5167gdb_sim=
5168gdb_osabi=
5169build_gdbserver=
5170targ=$target; . ${srcdir}/configure.tgt
5171
5172# Fetch the default architecture and default target vector from BFD.
5173targ=$target; . $srcdir/../bfd/config.bfd
5174
5175# We only want the first architecture, so strip off the others if
5176# there is more than one.
5177targ_archs=`echo $targ_archs | sed 's/ .*//'`
5178
5179if test "x$targ_archs" != x; then
5180
5181cat >>confdefs.h <<_ACEOF
5182#define DEFAULT_BFD_ARCH $targ_archs
5183_ACEOF
5184
5185fi
5186if test "x$targ_defvec" != x; then
5187
5188cat >>confdefs.h <<_ACEOF
5189#define DEFAULT_BFD_VEC $targ_defvec
5190_ACEOF
5191
5192fi
5193
c0993dbe
UW
5194# The CLI cannot be disabled yet, but may be in the future.
5195
5196# Enable CLI.
81ecdfbb
RW
5197# Check whether --enable-gdbcli was given.
5198if test "${enable_gdbcli+set}" = set; then :
5199 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5200 yes)
5201 ;;
5202 no)
81ecdfbb 5203 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5204 *)
81ecdfbb 5205 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5206 esac
5207else
5208 enable_gdbcli=yes
81ecdfbb
RW
5209fi
5210
c0993dbe
UW
5211if test x"$enable_gdbcli" = xyes; then
5212 if test -d $srcdir/cli; then
5213 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5214 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5215 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5216 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5217 fi
5218fi
5219
5220# Enable MI.
81ecdfbb
RW
5221# Check whether --enable-gdbmi was given.
5222if test "${enable_gdbmi+set}" = set; then :
5223 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5224 yes | no)
5225 ;;
5226 *)
81ecdfbb 5227 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5228 esac
5229else
5230 enable_gdbmi=yes
81ecdfbb
RW
5231fi
5232
c0993dbe
UW
5233if test x"$enable_gdbmi" = xyes; then
5234 if test -d $srcdir/mi; then
5235 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5236 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5237 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5238 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5239 fi
5240fi
5241
5242# Enable TUI.
81ecdfbb
RW
5243# Check whether --enable-tui was given.
5244if test "${enable_tui+set}" = set; then :
5245 enableval=$enable_tui; case $enableval in
3ca64bd3 5246 yes | no | auto)
c0993dbe
UW
5247 ;;
5248 *)
81ecdfbb 5249 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5250 esac
5251else
3ca64bd3 5252 enable_tui=auto
81ecdfbb
RW
5253fi
5254
c0993dbe
UW
5255
5256# Enable gdbtk.
81ecdfbb
RW
5257# Check whether --enable-gdbtk was given.
5258if test "${enable_gdbtk+set}" = set; then :
5259 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5260 yes | no)
5261 ;;
5262 *)
81ecdfbb 5263 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5264 esac
5265else
5062cc19 5266 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5267 enable_gdbtk=yes
5268 else
5269 enable_gdbtk=no
5270 fi
81ecdfbb
RW
5271fi
5272
c0993dbe
UW
5273# We unconditionally disable gdbtk tests on selected platforms.
5274case $host_os in
5275 go32* | windows*)
81ecdfbb
RW
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5277$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5278 enable_gdbtk=no ;;
5279esac
5280
05e7c244 5281# Libunwind support for ia64.
bec39cab 5282
05e7c244
JK
5283
5284# Check whether --with-libunwind-ia64 was given.
5285if test "${with_libunwind_ia64+set}" = set; then :
5286 withval=$with_libunwind_ia64;
bec39cab 5287else
05e7c244
JK
5288 with_libunwind_ia64=auto
5289fi
bec39cab 5290
05e7c244
JK
5291
5292# Backward compatibility option.
5293if test "${with_libunwind+set}" = set; then
5294 if test x"$with_libunwind_ia64" != xauto; then
5295 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5296 fi
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5298$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5299 with_libunwind_ia64="$with_libunwind"
5300fi
5301
5302case "$with_libunwind_ia64" in
5303 yes | no)
5304 ;;
5305 auto)
5306 for ac_header in libunwind-ia64.h
81ecdfbb 5307do :
b54a8fd7
PA
5308 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5309if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5310 cat >>confdefs.h <<_ACEOF
b54a8fd7 5311#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5312_ACEOF
5313
5314fi
5315
5316done
5317
05e7c244
JK
5318 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5319 ;;
5320 *)
5321 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5322 ;;
5323esac
bec39cab 5324
05e7c244 5325if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5326 for ac_header in libunwind-ia64.h
81ecdfbb 5327do :
b54a8fd7
PA
5328 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5329if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5330 cat >>confdefs.h <<_ACEOF
b54a8fd7 5331#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5332_ACEOF
5333
5334fi
5335
5336done
5337
05e7c244
JK
5338 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5339 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5340 fi
5341 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5342 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5343 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5344fi
5345
cb01cfba
JB
5346opt_curses=no
5347
81ecdfbb
RW
5348# Check whether --with-curses was given.
5349if test "${with_curses+set}" = set; then :
5350 withval=$with_curses; opt_curses=$withval
5351fi
5352
cb01cfba 5353
76a39ba7 5354prefer_curses=no
cb01cfba 5355if test "$opt_curses" = "yes"; then
76a39ba7 5356 prefer_curses=yes
cb01cfba
JB
5357fi
5358
a9322a30 5359# Profiling support.
81ecdfbb
RW
5360# Check whether --enable-profiling was given.
5361if test "${enable_profiling+set}" = set; then :
5362 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5363 yes | no)
5364 ;;
5365 *)
81ecdfbb 5366 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5367 esac
5368else
5369 enable_profiling=no
81ecdfbb 5370fi
bec39cab 5371
a9322a30
TT
5372
5373for ac_func in monstartup _mcleanup
81ecdfbb
RW
5374do :
5375 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5376ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5377eval as_val=\$$as_ac_var
5378 if test "x$as_val" = x""yes; then :
5379 cat >>confdefs.h <<_ACEOF
5380#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5381_ACEOF
a9322a30 5382
81ecdfbb
RW
5383fi
5384done
a9322a30 5385
81ecdfbb
RW
5386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5387$as_echo_n "checking for _etext... " >&6; }
5388if test "${ac_cv_var__etext+set}" = set; then :
5389 $as_echo_n "(cached) " >&6
5390else
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5392/* end confdefs.h. */
5393#include <stdlib.h>
5394extern char _etext;
a9322a30
TT
5395
5396int
5397main ()
5398{
5399free (&_etext);
5400 ;
5401 return 0;
5402}
bec39cab 5403_ACEOF
81ecdfbb 5404if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5405 ac_cv_var__etext=yes
bec39cab 5406else
81ecdfbb 5407 ac_cv_var__etext=no
bec39cab 5408fi
81ecdfbb
RW
5409rm -f core conftest.err conftest.$ac_objext \
5410 conftest$ac_exeext conftest.$ac_ext
bec39cab 5411fi
81ecdfbb
RW
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5413$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5414if test $ac_cv_var__etext = yes; then
60ca704f 5415
81ecdfbb 5416$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5417
bec39cab 5418fi
81ecdfbb
RW
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5420$as_echo_n "checking for etext... " >&6; }
5421if test "${ac_cv_var_etext+set}" = set; then :
5422 $as_echo_n "(cached) " >&6
bec39cab 5423else
81ecdfbb 5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5425/* end confdefs.h. */
a9322a30
TT
5426#include <stdlib.h>
5427extern char etext;
bec39cab
AC
5428
5429int
5430main ()
5431{
a9322a30 5432free (&etext);
bec39cab
AC
5433 ;
5434 return 0;
5435}
5436_ACEOF
81ecdfbb 5437if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5438 ac_cv_var_etext=yes
bec39cab 5439else
81ecdfbb 5440 ac_cv_var_etext=no
bec39cab 5441fi
81ecdfbb
RW
5442rm -f core conftest.err conftest.$ac_objext \
5443 conftest$ac_exeext conftest.$ac_ext
bec39cab 5444fi
81ecdfbb
RW
5445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5446$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5447if test $ac_cv_var_etext = yes; then
5448
81ecdfbb 5449$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5450
5451fi
a9322a30
TT
5452if test "$enable_profiling" = yes ; then
5453 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5454 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5455 fi
5456 PROFILE_CFLAGS=-pg
5457 OLD_CFLAGS="$CFLAGS"
5458 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5459
81ecdfbb
RW
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5461$as_echo_n "checking whether $CC supports -pg... " >&6; }
5462if test "${ac_cv_cc_supports_pg+set}" = set; then :
5463 $as_echo_n "(cached) " >&6
bec39cab 5464else
81ecdfbb 5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5466/* end confdefs.h. */
bec39cab
AC
5467
5468int
5469main ()
5470{
a9322a30 5471int x;
bec39cab
AC
5472 ;
5473 return 0;
5474}
5475_ACEOF
81ecdfbb 5476if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5477 ac_cv_cc_supports_pg=yes
bec39cab 5478else
81ecdfbb 5479 ac_cv_cc_supports_pg=no
bec39cab 5480fi
81ecdfbb 5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5482fi
81ecdfbb
RW
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5484$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5485
a9322a30 5486 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5487 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5488 fi
bec39cab 5489
a9322a30 5490 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5491fi
5492
c16158bc
JM
5493
5494
81ecdfbb
RW
5495# Check whether --with-pkgversion was given.
5496if test "${with_pkgversion+set}" = set; then :
5497 withval=$with_pkgversion; case "$withval" in
5498 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5499 no) PKGVERSION= ;;
5500 *) PKGVERSION="($withval) " ;;
5501 esac
5502else
5503 PKGVERSION="(GDB) "
5504
81ecdfbb 5505fi
c16158bc
JM
5506
5507
5508
5509
81ecdfbb
RW
5510
5511# Check whether --with-bugurl was given.
5512if test "${with_bugurl+set}" = set; then :
5513 withval=$with_bugurl; case "$withval" in
5514 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5515 no) BUGURL=
5516 ;;
5517 *) BUGURL="$withval"
5518 ;;
5519 esac
5520else
5521 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5522
81ecdfbb
RW
5523fi
5524
c16158bc
JM
5525 case ${BUGURL} in
5526 "")
5527 REPORT_BUGS_TO=
5528 REPORT_BUGS_TEXI=
5529 ;;
5530 *)
5531 REPORT_BUGS_TO="<$BUGURL>"
5532 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5533 ;;
5534 esac;
5535
5536
5537
5538
5539cat >>confdefs.h <<_ACEOF
5540#define PKGVERSION "$PKGVERSION"
5541_ACEOF
5542
5543
5544cat >>confdefs.h <<_ACEOF
5545#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5546_ACEOF
5547
5548
bec39cab
AC
5549# --------------------- #
5550# Checks for programs. #
5551# --------------------- #
5552
5553for ac_prog in gawk mawk nawk awk
5554do
5555 # Extract the first word of "$ac_prog", so it can be a program name with args.
5556set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558$as_echo_n "checking for $ac_word... " >&6; }
5559if test "${ac_cv_prog_AWK+set}" = set; then :
5560 $as_echo_n "(cached) " >&6
bec39cab
AC
5561else
5562 if test -n "$AWK"; then
5563 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5564else
5565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5566for as_dir in $PATH
5567do
5568 IFS=$as_save_IFS
5569 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5570 for ac_exec_ext in '' $ac_executable_extensions; do
5571 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5572 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5574 break 2
5575 fi
5576done
81ecdfbb
RW
5577 done
5578IFS=$as_save_IFS
bec39cab
AC
5579
5580fi
5581fi
5582AWK=$ac_cv_prog_AWK
5583if test -n "$AWK"; then
81ecdfbb
RW
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5585$as_echo "$AWK" >&6; }
bec39cab 5586else
81ecdfbb
RW
5587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588$as_echo "no" >&6; }
bec39cab
AC
5589fi
5590
bec39cab 5591
81ecdfbb 5592 test -n "$AWK" && break
bec39cab
AC
5593done
5594
c971b7fa
PA
5595# Find a good install program. We prefer a C program (faster),
5596# so one script is as good as another. But avoid the broken or
5597# incompatible versions:
5598# SysV /etc/install, /usr/sbin/install
5599# SunOS /usr/etc/install
5600# IRIX /sbin/install
5601# AIX /bin/install
5602# AmigaOS /C/install, which installs bootblocks on floppy discs
5603# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5604# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5605# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5606# OS/2's system install, which has a completely different semantic
5607# ./install, which can be erroneously created by make from ./install.sh.
5608# Reject install programs that cannot install multiple files.
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5610$as_echo_n "checking for a BSD-compatible install... " >&6; }
5611if test -z "$INSTALL"; then
5612if test "${ac_cv_path_install+set}" = set; then :
5613 $as_echo_n "(cached) " >&6
5614else
5615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5616for as_dir in $PATH
5617do
5618 IFS=$as_save_IFS
5619 test -z "$as_dir" && as_dir=.
5620 # Account for people who put trailing slashes in PATH elements.
5621case $as_dir/ in #((
5622 ./ | .// | /[cC]/* | \
5623 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5624 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5625 /usr/ucb/* ) ;;
5626 *)
5627 # OSF1 and SCO ODT 3.0 have their own names for install.
5628 # Don't use installbsd from OSF since it installs stuff as root
5629 # by default.
5630 for ac_prog in ginstall scoinst install; do
5631 for ac_exec_ext in '' $ac_executable_extensions; do
5632 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5633 if test $ac_prog = install &&
5634 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5635 # AIX install. It has an incompatible calling convention.
5636 :
5637 elif test $ac_prog = install &&
5638 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5639 # program-specific install script used by HP pwplus--don't use.
5640 :
5641 else
5642 rm -rf conftest.one conftest.two conftest.dir
5643 echo one > conftest.one
5644 echo two > conftest.two
5645 mkdir conftest.dir
5646 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5647 test -s conftest.one && test -s conftest.two &&
5648 test -s conftest.dir/conftest.one &&
5649 test -s conftest.dir/conftest.two
5650 then
5651 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5652 break 3
5653 fi
5654 fi
5655 fi
5656 done
5657 done
5658 ;;
5659esac
5660
5661 done
5662IFS=$as_save_IFS
5663
5664rm -rf conftest.one conftest.two conftest.dir
5665
5666fi
5667 if test "${ac_cv_path_install+set}" = set; then
5668 INSTALL=$ac_cv_path_install
5669 else
5670 # As a last resort, use the slow shell script. Don't cache a
5671 # value for INSTALL within a source directory, because that will
5672 # break other packages using the cache if that directory is
5673 # removed, or if the value is a relative name.
5674 INSTALL=$ac_install_sh
5675 fi
5676fi
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5678$as_echo "$INSTALL" >&6; }
5679
5680# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5681# It thinks the first close brace ends the variable substitution.
5682test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5683
5684test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5685
5686test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5687
81ecdfbb
RW
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5689$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5690LN_S=$as_ln_s
5691if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5693$as_echo "yes" >&6; }
bec39cab 5694else
81ecdfbb
RW
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5696$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5697fi
5698
5699if test -n "$ac_tool_prefix"; then
5700 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5701set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
5704if test "${ac_cv_prog_RANLIB+set}" = set; then :
5705 $as_echo_n "(cached) " >&6
bec39cab
AC
5706else
5707 if test -n "$RANLIB"; then
5708 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5709else
5710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713 IFS=$as_save_IFS
5714 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5715 for ac_exec_ext in '' $ac_executable_extensions; do
5716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5717 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5719 break 2
5720 fi
5721done
81ecdfbb
RW
5722 done
5723IFS=$as_save_IFS
bec39cab
AC
5724
5725fi
5726fi
5727RANLIB=$ac_cv_prog_RANLIB
5728if test -n "$RANLIB"; then
81ecdfbb
RW
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5730$as_echo "$RANLIB" >&6; }
bec39cab 5731else
81ecdfbb
RW
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
bec39cab
AC
5734fi
5735
81ecdfbb 5736
bec39cab
AC
5737fi
5738if test -z "$ac_cv_prog_RANLIB"; then
5739 ac_ct_RANLIB=$RANLIB
5740 # Extract the first word of "ranlib", so it can be a program name with args.
5741set dummy ranlib; ac_word=$2
81ecdfbb
RW
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5745 $as_echo_n "(cached) " >&6
bec39cab
AC
5746else
5747 if test -n "$ac_ct_RANLIB"; then
5748 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5749else
5750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753 IFS=$as_save_IFS
5754 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5755 for ac_exec_ext in '' $ac_executable_extensions; do
5756 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5757 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5759 break 2
5760 fi
5761done
81ecdfbb
RW
5762 done
5763IFS=$as_save_IFS
bec39cab 5764
bec39cab
AC
5765fi
5766fi
5767ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5768if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5770$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5771else
81ecdfbb
RW
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
bec39cab
AC
5774fi
5775
81ecdfbb
RW
5776 if test "x$ac_ct_RANLIB" = x; then
5777 RANLIB=":"
5778 else
5779 case $cross_compiling:$ac_tool_warned in
5780yes:)
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5783ac_tool_warned=yes ;;
5784esac
5785 RANLIB=$ac_ct_RANLIB
5786 fi
bec39cab
AC
5787else
5788 RANLIB="$ac_cv_prog_RANLIB"
5789fi
5790
5791for ac_prog in 'bison -y' byacc
5792do
5793 # Extract the first word of "$ac_prog", so it can be a program name with args.
5794set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796$as_echo_n "checking for $ac_word... " >&6; }
5797if test "${ac_cv_prog_YACC+set}" = set; then :
5798 $as_echo_n "(cached) " >&6
bec39cab
AC
5799else
5800 if test -n "$YACC"; then
5801 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5802else
5803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804for as_dir in $PATH
5805do
5806 IFS=$as_save_IFS
5807 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5808 for ac_exec_ext in '' $ac_executable_extensions; do
5809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5810 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5812 break 2
5813 fi
5814done
81ecdfbb
RW
5815 done
5816IFS=$as_save_IFS
bec39cab
AC
5817
5818fi
5819fi
5820YACC=$ac_cv_prog_YACC
5821if test -n "$YACC"; then
81ecdfbb
RW
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5823$as_echo "$YACC" >&6; }
bec39cab 5824else
81ecdfbb
RW
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
bec39cab
AC
5827fi
5828
81ecdfbb 5829
bec39cab
AC
5830 test -n "$YACC" && break
5831done
5832test -n "$YACC" || YACC="yacc"
5833
5834
5835if test -n "$ac_tool_prefix"; then
5836 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5837set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if test "${ac_cv_prog_AR+set}" = set; then :
5841 $as_echo_n "(cached) " >&6
bec39cab
AC
5842else
5843 if test -n "$AR"; then
5844 ac_cv_prog_AR="$AR" # Let the user override the test.
5845else
5846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849 IFS=$as_save_IFS
5850 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5851 for ac_exec_ext in '' $ac_executable_extensions; do
5852 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5853 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5855 break 2
5856 fi
5857done
81ecdfbb
RW
5858 done
5859IFS=$as_save_IFS
bec39cab
AC
5860
5861fi
5862fi
5863AR=$ac_cv_prog_AR
5864if test -n "$AR"; then
81ecdfbb
RW
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5866$as_echo "$AR" >&6; }
bec39cab 5867else
81ecdfbb
RW
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5869$as_echo "no" >&6; }
bec39cab
AC
5870fi
5871
81ecdfbb 5872
bec39cab
AC
5873fi
5874if test -z "$ac_cv_prog_AR"; then
5875 ac_ct_AR=$AR
5876 # Extract the first word of "ar", so it can be a program name with args.
5877set dummy ar; ac_word=$2
81ecdfbb
RW
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5879$as_echo_n "checking for $ac_word... " >&6; }
5880if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5881 $as_echo_n "(cached) " >&6
bec39cab
AC
5882else
5883 if test -n "$ac_ct_AR"; then
5884 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5885else
5886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887for as_dir in $PATH
5888do
5889 IFS=$as_save_IFS
5890 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5891 for ac_exec_ext in '' $ac_executable_extensions; do
5892 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5893 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5895 break 2
5896 fi
5897done
81ecdfbb
RW
5898 done
5899IFS=$as_save_IFS
bec39cab
AC
5900
5901fi
5902fi
5903ac_ct_AR=$ac_cv_prog_ac_ct_AR
5904if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5906$as_echo "$ac_ct_AR" >&6; }
bec39cab 5907else
81ecdfbb
RW
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909$as_echo "no" >&6; }
bec39cab
AC
5910fi
5911
81ecdfbb
RW
5912 if test "x$ac_ct_AR" = x; then
5913 AR=""
5914 else
5915 case $cross_compiling:$ac_tool_warned in
5916yes:)
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5919ac_tool_warned=yes ;;
5920esac
5921 AR=$ac_ct_AR
5922 fi
bec39cab
AC
5923else
5924 AR="$ac_cv_prog_AR"
5925fi
5926
5927if test -n "$ac_tool_prefix"; then
5928 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5929set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5931$as_echo_n "checking for $ac_word... " >&6; }
5932if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5933 $as_echo_n "(cached) " >&6
bec39cab
AC
5934else
5935 if test -n "$DLLTOOL"; then
5936 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5937else
5938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941 IFS=$as_save_IFS
5942 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5943 for ac_exec_ext in '' $ac_executable_extensions; do
5944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5945 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5947 break 2
5948 fi
5949done
81ecdfbb
RW
5950 done
5951IFS=$as_save_IFS
bec39cab
AC
5952
5953fi
5954fi
5955DLLTOOL=$ac_cv_prog_DLLTOOL
5956if test -n "$DLLTOOL"; then
81ecdfbb
RW
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5958$as_echo "$DLLTOOL" >&6; }
bec39cab 5959else
81ecdfbb
RW
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961$as_echo "no" >&6; }
bec39cab
AC
5962fi
5963
81ecdfbb 5964
bec39cab
AC
5965fi
5966if test -z "$ac_cv_prog_DLLTOOL"; then
5967 ac_ct_DLLTOOL=$DLLTOOL
5968 # Extract the first word of "dlltool", so it can be a program name with args.
5969set dummy dlltool; ac_word=$2
81ecdfbb
RW
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971$as_echo_n "checking for $ac_word... " >&6; }
5972if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5973 $as_echo_n "(cached) " >&6
bec39cab
AC
5974else
5975 if test -n "$ac_ct_DLLTOOL"; then
5976 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5977else
5978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981 IFS=$as_save_IFS
5982 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5983 for ac_exec_ext in '' $ac_executable_extensions; do
5984 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5985 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5987 break 2
5988 fi
5989done
81ecdfbb
RW
5990 done
5991IFS=$as_save_IFS
bec39cab
AC
5992
5993fi
5994fi
5995ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5996if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5998$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5999else
81ecdfbb
RW
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
bec39cab
AC
6002fi
6003
81ecdfbb
RW
6004 if test "x$ac_ct_DLLTOOL" = x; then
6005 DLLTOOL=""
6006 else
6007 case $cross_compiling:$ac_tool_warned in
6008yes:)
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6011ac_tool_warned=yes ;;
6012esac
6013 DLLTOOL=$ac_ct_DLLTOOL
6014 fi
bec39cab
AC
6015else
6016 DLLTOOL="$ac_cv_prog_DLLTOOL"
6017fi
6018
6019if test -n "$ac_tool_prefix"; then
6020 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6021set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
6024if test "${ac_cv_prog_WINDRES+set}" = set; then :
6025 $as_echo_n "(cached) " >&6
bec39cab
AC
6026else
6027 if test -n "$WINDRES"; then
6028 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6029else
6030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033 IFS=$as_save_IFS
6034 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6035 for ac_exec_ext in '' $ac_executable_extensions; do
6036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6037 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6039 break 2
6040 fi
6041done
81ecdfbb
RW
6042 done
6043IFS=$as_save_IFS
bec39cab
AC
6044
6045fi
6046fi
6047WINDRES=$ac_cv_prog_WINDRES
6048if test -n "$WINDRES"; then
81ecdfbb
RW
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6050$as_echo "$WINDRES" >&6; }
bec39cab 6051else
81ecdfbb
RW
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
bec39cab
AC
6054fi
6055
81ecdfbb 6056
bec39cab
AC
6057fi
6058if test -z "$ac_cv_prog_WINDRES"; then
6059 ac_ct_WINDRES=$WINDRES
6060 # Extract the first word of "windres", so it can be a program name with args.
6061set dummy windres; ac_word=$2
81ecdfbb
RW
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6063$as_echo_n "checking for $ac_word... " >&6; }
6064if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6065 $as_echo_n "(cached) " >&6
bec39cab
AC
6066else
6067 if test -n "$ac_ct_WINDRES"; then
6068 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6069else
6070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071for as_dir in $PATH
6072do
6073 IFS=$as_save_IFS
6074 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6075 for ac_exec_ext in '' $ac_executable_extensions; do
6076 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6077 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6079 break 2
6080 fi
6081done
81ecdfbb
RW
6082 done
6083IFS=$as_save_IFS
bec39cab
AC
6084
6085fi
6086fi
6087ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6088if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6090$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6091else
81ecdfbb
RW
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
c906108c 6094fi
bec39cab 6095
81ecdfbb
RW
6096 if test "x$ac_ct_WINDRES" = x; then
6097 WINDRES=""
6098 else
6099 case $cross_compiling:$ac_tool_warned in
6100yes:)
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6103ac_tool_warned=yes ;;
6104esac
6105 WINDRES=$ac_ct_WINDRES
6106 fi
c906108c 6107else
bec39cab 6108 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6109fi
6110
bec39cab
AC
6111
6112# Needed for GNU/Hurd.
6113if test -n "$ac_tool_prefix"; then
6114 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6115set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6117$as_echo_n "checking for $ac_word... " >&6; }
6118if test "${ac_cv_prog_MIG+set}" = set; then :
6119 $as_echo_n "(cached) " >&6
c906108c 6120else
bec39cab
AC
6121 if test -n "$MIG"; then
6122 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6123else
6124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127 IFS=$as_save_IFS
6128 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6129 for ac_exec_ext in '' $ac_executable_extensions; do
6130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6131 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6133 break 2
6134 fi
6135done
81ecdfbb
RW
6136 done
6137IFS=$as_save_IFS
bec39cab 6138
c906108c 6139fi
bec39cab
AC
6140fi
6141MIG=$ac_cv_prog_MIG
6142if test -n "$MIG"; then
81ecdfbb
RW
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6144$as_echo "$MIG" >&6; }
c906108c 6145else
81ecdfbb
RW
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147$as_echo "no" >&6; }
c906108c
SS
6148fi
6149
81ecdfbb 6150
bec39cab
AC
6151fi
6152if test -z "$ac_cv_prog_MIG"; then
6153 ac_ct_MIG=$MIG
6154 # Extract the first word of "mig", so it can be a program name with args.
6155set dummy mig; ac_word=$2
81ecdfbb
RW
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6157$as_echo_n "checking for $ac_word... " >&6; }
6158if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6159 $as_echo_n "(cached) " >&6
bec39cab
AC
6160else
6161 if test -n "$ac_ct_MIG"; then
6162 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6163else
6164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH
6166do
6167 IFS=$as_save_IFS
6168 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6169 for ac_exec_ext in '' $ac_executable_extensions; do
6170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6171 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6173 break 2
6174 fi
6175done
81ecdfbb
RW
6176 done
6177IFS=$as_save_IFS
c906108c 6178
bec39cab
AC
6179fi
6180fi
6181ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6182if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6184$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6185else
81ecdfbb
RW
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
bec39cab 6188fi
c906108c 6189
81ecdfbb
RW
6190 if test "x$ac_ct_MIG" = x; then
6191 MIG=""
6192 else
6193 case $cross_compiling:$ac_tool_warned in
6194yes:)
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6196$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6197ac_tool_warned=yes ;;
6198esac
6199 MIG=$ac_ct_MIG
6200 fi
bec39cab
AC
6201else
6202 MIG="$ac_cv_prog_MIG"
6203fi
c906108c 6204
c906108c 6205
bec39cab
AC
6206# ---------------------- #
6207# Checks for libraries. #
6208# ---------------------- #
c906108c 6209
bec39cab 6210# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6212$as_echo_n "checking for main in -lm... " >&6; }
6213if test "${ac_cv_lib_m_main+set}" = set; then :
6214 $as_echo_n "(cached) " >&6
bec39cab
AC
6215else
6216 ac_check_lib_save_LIBS=$LIBS
6217LIBS="-lm $LIBS"
81ecdfbb 6218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6219/* end confdefs.h. */
c906108c 6220
c906108c 6221
bec39cab
AC
6222int
6223main ()
6224{
81ecdfbb 6225return main ();
bec39cab
AC
6226 ;
6227 return 0;
6228}
6229_ACEOF
81ecdfbb 6230if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6231 ac_cv_lib_m_main=yes
6232else
81ecdfbb 6233 ac_cv_lib_m_main=no
bec39cab 6234fi
81ecdfbb
RW
6235rm -f core conftest.err conftest.$ac_objext \
6236 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6237LIBS=$ac_check_lib_save_LIBS
6238fi
81ecdfbb
RW
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6240$as_echo "$ac_cv_lib_m_main" >&6; }
6241if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6242 cat >>confdefs.h <<_ACEOF
6243#define HAVE_LIBM 1
6244_ACEOF
6245
6246 LIBS="-lm $LIBS"
c906108c 6247
c906108c 6248fi
bec39cab
AC
6249
6250
6251# We need to link with -lw to get `wctype' on Solaris before Solaris
6252# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6253# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6254# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6255ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6256if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6257
c906108c 6258else
81ecdfbb
RW
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6260$as_echo_n "checking for wctype in -lw... " >&6; }
6261if test "${ac_cv_lib_w_wctype+set}" = set; then :
6262 $as_echo_n "(cached) " >&6
bec39cab
AC
6263else
6264 ac_check_lib_save_LIBS=$LIBS
6265LIBS="-lw $LIBS"
81ecdfbb 6266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6267/* end confdefs.h. */
c906108c 6268
81ecdfbb
RW
6269/* Override any GCC internal prototype to avoid an error.
6270 Use char because int might match the return type of a GCC
6271 builtin and then its argument prototype would still apply. */
bec39cab
AC
6272#ifdef __cplusplus
6273extern "C"
6274#endif
bec39cab
AC
6275char wctype ();
6276int
6277main ()
6278{
81ecdfbb 6279return wctype ();
bec39cab
AC
6280 ;
6281 return 0;
6282}
6283_ACEOF
81ecdfbb 6284if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6285 ac_cv_lib_w_wctype=yes
6286else
81ecdfbb 6287 ac_cv_lib_w_wctype=no
bec39cab 6288fi
81ecdfbb
RW
6289rm -f core conftest.err conftest.$ac_objext \
6290 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6291LIBS=$ac_check_lib_save_LIBS
6292fi
81ecdfbb
RW
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6294$as_echo "$ac_cv_lib_w_wctype" >&6; }
6295if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6296 cat >>confdefs.h <<_ACEOF
6297#define HAVE_LIBW 1
6298_ACEOF
c906108c 6299
bec39cab 6300 LIBS="-lw $LIBS"
c906108c 6301
bec39cab 6302fi
c906108c 6303
bec39cab 6304fi
c906108c 6305
ddc9cd0f 6306
bec39cab 6307# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6309$as_echo_n "checking for library containing gethostbyname... " >&6; }
6310if test "${ac_cv_search_gethostbyname+set}" = set; then :
6311 $as_echo_n "(cached) " >&6
bec39cab
AC
6312else
6313 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6315/* end confdefs.h. */
ddc9cd0f 6316
81ecdfbb
RW
6317/* Override any GCC internal prototype to avoid an error.
6318 Use char because int might match the return type of a GCC
6319 builtin and then its argument prototype would still apply. */
bec39cab
AC
6320#ifdef __cplusplus
6321extern "C"
6322#endif
bec39cab
AC
6323char gethostbyname ();
6324int
6325main ()
6326{
81ecdfbb 6327return gethostbyname ();
bec39cab
AC
6328 ;
6329 return 0;
6330}
6331_ACEOF
81ecdfbb
RW
6332for ac_lib in '' nsl; do
6333 if test -z "$ac_lib"; then
6334 ac_res="none required"
6335 else
6336 ac_res=-l$ac_lib
b4e70030 6337 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6338 fi
6339 if ac_fn_c_try_link "$LINENO"; then :
6340 ac_cv_search_gethostbyname=$ac_res
6341fi
6342rm -f core conftest.err conftest.$ac_objext \
6343 conftest$ac_exeext
6344 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6345 break
6346fi
6347done
6348if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6349
bec39cab 6350else
81ecdfbb 6351 ac_cv_search_gethostbyname=no
bec39cab 6352fi
81ecdfbb 6353rm conftest.$ac_ext
bec39cab
AC
6354LIBS=$ac_func_search_save_LIBS
6355fi
81ecdfbb
RW
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6357$as_echo "$ac_cv_search_gethostbyname" >&6; }
6358ac_res=$ac_cv_search_gethostbyname
6359if test "$ac_res" != no; then :
6360 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6361
bec39cab 6362fi
96baa820 6363
c906108c 6364
b4e70030 6365# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6367$as_echo_n "checking for library containing socketpair... " >&6; }
6368if test "${ac_cv_search_socketpair+set}" = set; then :
6369 $as_echo_n "(cached) " >&6
b4e70030
JB
6370else
6371 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6373/* end confdefs.h. */
6374
81ecdfbb
RW
6375/* Override any GCC internal prototype to avoid an error.
6376 Use char because int might match the return type of a GCC
6377 builtin and then its argument prototype would still apply. */
b4e70030
JB
6378#ifdef __cplusplus
6379extern "C"
6380#endif
b4e70030
JB
6381char socketpair ();
6382int
6383main ()
6384{
81ecdfbb 6385return socketpair ();
b4e70030
JB
6386 ;
6387 return 0;
6388}
6389_ACEOF
81ecdfbb
RW
6390for ac_lib in '' socket; do
6391 if test -z "$ac_lib"; then
6392 ac_res="none required"
6393 else
6394 ac_res=-l$ac_lib
b4e70030 6395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6396 fi
6397 if ac_fn_c_try_link "$LINENO"; then :
6398 ac_cv_search_socketpair=$ac_res
6399fi
6400rm -f core conftest.err conftest.$ac_objext \
6401 conftest$ac_exeext
6402 if test "${ac_cv_search_socketpair+set}" = set; then :
6403 break
6404fi
6405done
6406if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6407
b4e70030 6408else
81ecdfbb 6409 ac_cv_search_socketpair=no
b4e70030 6410fi
81ecdfbb 6411rm conftest.$ac_ext
b4e70030
JB
6412LIBS=$ac_func_search_save_LIBS
6413fi
81ecdfbb
RW
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6415$as_echo "$ac_cv_search_socketpair" >&6; }
6416ac_res=$ac_cv_search_socketpair
6417if test "$ac_res" != no; then :
6418 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6419
6420fi
6421
6422
233a11ab 6423# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6424
6425 # See if the user specified whether he wants zlib support or not.
6426
6427# Check whether --with-zlib was given.
6428if test "${with_zlib+set}" = set; then :
6429 withval=$with_zlib;
6430else
6431 with_zlib=auto
6432fi
6433
6434
6435 if test "$with_zlib" != "no"; then
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6437$as_echo_n "checking for library containing zlibVersion... " >&6; }
6438if test "${ac_cv_search_zlibVersion+set}" = set; then :
6439 $as_echo_n "(cached) " >&6
233a11ab
CS
6440else
6441 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6443/* end confdefs.h. */
6444
81ecdfbb
RW
6445/* Override any GCC internal prototype to avoid an error.
6446 Use char because int might match the return type of a GCC
233a11ab 6447 builtin and then its argument prototype would still apply. */
233a11ab
CS
6448#ifdef __cplusplus
6449extern "C"
6450#endif
233a11ab
CS
6451char zlibVersion ();
6452int
6453main ()
6454{
81ecdfbb 6455return zlibVersion ();
233a11ab
CS
6456 ;
6457 return 0;
6458}
6459_ACEOF
81ecdfbb
RW
6460for ac_lib in '' z; do
6461 if test -z "$ac_lib"; then
6462 ac_res="none required"
233a11ab 6463 else
81ecdfbb
RW
6464 ac_res=-l$ac_lib
6465 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6466 fi
81ecdfbb
RW
6467 if ac_fn_c_try_link "$LINENO"; then :
6468 ac_cv_search_zlibVersion=$ac_res
233a11ab 6469fi
81ecdfbb
RW
6470rm -f core conftest.err conftest.$ac_objext \
6471 conftest$ac_exeext
6472 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6473 break
233a11ab 6474fi
81ecdfbb
RW
6475done
6476if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6477
233a11ab 6478else
81ecdfbb 6479 ac_cv_search_zlibVersion=no
233a11ab 6480fi
81ecdfbb
RW
6481rm conftest.$ac_ext
6482LIBS=$ac_func_search_save_LIBS
233a11ab 6483fi
81ecdfbb
RW
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6485$as_echo "$ac_cv_search_zlibVersion" >&6; }
6486ac_res=$ac_cv_search_zlibVersion
6487if test "$ac_res" != no; then :
6488 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6489 for ac_header in zlib.h
6490do :
6491 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6492if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6493 cat >>confdefs.h <<_ACEOF
81ecdfbb 6494#define HAVE_ZLIB_H 1
233a11ab
CS
6495_ACEOF
6496
6497fi
6498
6499done
6500
6501fi
6502
b040ad30
JB
6503 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6504 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6505 fi
6506 fi
6507
233a11ab 6508
77f120bf 6509# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6511$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6512if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6513 $as_echo_n "(cached) " >&6
bec39cab
AC
6514else
6515 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6517/* end confdefs.h. */
c906108c 6518
81ecdfbb
RW
6519/* Override any GCC internal prototype to avoid an error.
6520 Use char because int might match the return type of a GCC
6521 builtin and then its argument prototype would still apply. */
bec39cab
AC
6522#ifdef __cplusplus
6523extern "C"
6524#endif
77f120bf 6525char dlgetmodinfo ();
bec39cab
AC
6526int
6527main ()
6528{
81ecdfbb 6529return dlgetmodinfo ();
bec39cab
AC
6530 ;
6531 return 0;
6532}
6533_ACEOF
81ecdfbb
RW
6534for ac_lib in '' dl xpdl; do
6535 if test -z "$ac_lib"; then
6536 ac_res="none required"
6537 else
6538 ac_res=-l$ac_lib
b4e70030 6539 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6540 fi
6541 if ac_fn_c_try_link "$LINENO"; then :
6542 ac_cv_search_dlgetmodinfo=$ac_res
6543fi
6544rm -f core conftest.err conftest.$ac_objext \
6545 conftest$ac_exeext
6546 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6547 break
6548fi
6549done
6550if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6551
4e8d927d 6552else
81ecdfbb 6553 ac_cv_search_dlgetmodinfo=no
1ba607ad 6554fi
81ecdfbb 6555rm conftest.$ac_ext
bec39cab
AC
6556LIBS=$ac_func_search_save_LIBS
6557fi
81ecdfbb
RW
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6559$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6560ac_res=$ac_cv_search_dlgetmodinfo
6561if test "$ac_res" != no; then :
6562 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6563
8bb2c122 6564fi
8bb2c122 6565
8bb2c122 6566
77f120bf 6567
77f120bf 6568
6c7a06a3 6569
81ecdfbb
RW
6570# Check whether --with-libiconv-prefix was given.
6571if test "${with_libiconv_prefix+set}" = set; then :
6572 withval=$with_libiconv_prefix;
6c7a06a3 6573 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6574 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6575 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6576 done
6577
81ecdfbb
RW
6578fi
6579
6c7a06a3 6580
f18c4681 6581 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6582 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6583
81ecdfbb
RW
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6585$as_echo_n "checking for iconv... " >&6; }
6586if test "${am_cv_func_iconv+set}" = set; then :
6587 $as_echo_n "(cached) " >&6
d542061a 6588else
6c7a06a3
TT
6589
6590 am_cv_func_iconv="no, consider installing GNU libiconv"
6591 am_cv_lib_iconv=no
6592 am_cv_use_build_libiconv=no
f0f20949 6593 am_cv_build_libiconv_path=
4edb1e84
JB
6594
6595 # If libiconv is part of the build tree, then try using it over
6596 # any system iconv.
6597 if test -d ../libiconv; then
f18c4681
JB
6598 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6599 am_save_LIBS="$LIBS"
6600 am_save_CPPFLAGS="$CPPFLAGS"
6601 LIBS="$LIBS $lib_dir/libiconv.a"
6602 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6604/* end confdefs.h. */
6c7a06a3
TT
6605#include <stdlib.h>
6606#include <iconv.h>
d542061a
UW
6607int
6608main ()
6609{
6c7a06a3 6610iconv_t cd = iconv_open("","");
f18c4681
JB
6611 iconv(cd,NULL,NULL,NULL,NULL);
6612 iconv_close(cd);
d542061a
UW
6613 ;
6614 return 0;
6615}
6616_ACEOF
81ecdfbb 6617if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6618 am_cv_use_build_libiconv=yes
f0f20949 6619 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6620 am_cv_lib_iconv=yes
6621 am_cv_func_iconv=yes
d542061a 6622fi
81ecdfbb
RW
6623rm -f core conftest.err conftest.$ac_objext \
6624 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6625 LIBS="$am_save_LIBS"
6626 CPPFLAGS="$am_save_CPPFLAGS"
6627 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6628 break
6629 fi
6630 done
4edb1e84 6631 fi
94ae1714 6632
4edb1e84 6633 # Next, try to find iconv in libc.
6c7a06a3 6634 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6636/* end confdefs.h. */
6c7a06a3
TT
6637#include <stdlib.h>
6638#include <iconv.h>
d542061a
UW
6639int
6640main ()
6641{
6c7a06a3
TT
6642iconv_t cd = iconv_open("","");
6643 iconv(cd,NULL,NULL,NULL,NULL);
6644 iconv_close(cd);
d542061a
UW
6645 ;
6646 return 0;
6647}
6648_ACEOF
81ecdfbb 6649if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6650 am_cv_func_iconv=yes
d542061a 6651fi
81ecdfbb
RW
6652rm -f core conftest.err conftest.$ac_objext \
6653 conftest$ac_exeext conftest.$ac_ext
77f120bf 6654 fi
94ae1714 6655
4edb1e84
JB
6656 # If iconv was not in libc, try -liconv. In this case, arrange to
6657 # look in the libiconv prefix, if it was specified by the user.
6658 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6659 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6660 am_save_LIBS="$LIBS"
6661 if test -n "$LIBICONV_INCLUDE"; then
6662 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6663 LIBS="$LIBS $LIBICONV_LIBDIR"
6664 fi
6665 LIBS="$LIBS -liconv"
81ecdfbb 6666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6667/* end confdefs.h. */
6c7a06a3
TT
6668#include <stdlib.h>
6669#include <iconv.h>
bec39cab
AC
6670int
6671main ()
6672{
6c7a06a3
TT
6673iconv_t cd = iconv_open("","");
6674 iconv(cd,NULL,NULL,NULL,NULL);
6675 iconv_close(cd);
bec39cab
AC
6676 ;
6677 return 0;
6678}
6679_ACEOF
81ecdfbb 6680if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6681 am_cv_lib_iconv=yes
6c7a06a3 6682 am_cv_func_iconv=yes
627af7ea 6683fi
81ecdfbb
RW
6684rm -f core conftest.err conftest.$ac_objext \
6685 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6686 LIBS="$am_save_LIBS"
fc3b640d 6687 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6688 fi
6689
6690fi
81ecdfbb
RW
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6692$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6693
6694 # Set the various flags based on the cache variables. We can't rely
6695 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6696 LIBICONV=
6697 if test "$am_cv_lib_iconv" = yes; then
6698 LIBICONV="-liconv"
94ae1714
TT
6699 else
6700 LIBICONV_LIBDIR=
6701 LIBICONV_INCLUDE=
fc3b640d
TT
6702 fi
6703 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6704 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6705 LIBICONV_LIBDIR=""
fc3b640d
TT
6706 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6707 fi
6708 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6709 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6710
6c7a06a3
TT
6711 if test "$am_cv_func_iconv" = yes; then
6712
81ecdfbb 6713$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6714
81ecdfbb
RW
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6716$as_echo_n "checking for iconv declaration... " >&6; }
6717 if test "${am_cv_proto_iconv+set}" = set; then :
6718 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6719else
6720
81ecdfbb 6721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6722/* end confdefs.h. */
6723
6c7a06a3
TT
6724#include <stdlib.h>
6725#include <iconv.h>
6726extern
b4e70030 6727#ifdef __cplusplus
6c7a06a3 6728"C"
b4e70030 6729#endif
6c7a06a3
TT
6730#if defined(__STDC__) || defined(__cplusplus)
6731size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6732#else
6733size_t iconv();
6734#endif
6735
b4e70030
JB
6736int
6737main ()
6738{
6c7a06a3 6739
b4e70030
JB
6740 ;
6741 return 0;
6742}
6743_ACEOF
81ecdfbb 6744if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6745 am_cv_proto_iconv_arg1=""
4e8d927d 6746else
81ecdfbb 6747 am_cv_proto_iconv_arg1="const"
b4e70030 6748fi
81ecdfbb 6749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6750 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);"
6751fi
6752
6753 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6755 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6756$as_echo "${ac_t:-
6757 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6758
6759cat >>confdefs.h <<_ACEOF
6760#define ICONV_CONST $am_cv_proto_iconv_arg1
6761_ACEOF
6762
6763 fi
6c7a06a3
TT
6764
6765
478aac75
DE
6766# GDB may fork/exec the iconv program to get the list of supported character
6767# sets. Allow the user to specify where to find it.
6768# There are several factors affecting the choice of option name:
6769# - There is already --with-libiconv-prefix but we can't use it, it specifies
6770# the build-time location of libiconv files.
6771# - The program we need to find is iconv, which comes with glibc. The user
6772# doesn't necessarily have libiconv installed. Therefore naming this
6773# --with-libiconv-foo feels wrong.
6774# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6775# defined to work on directories not files (though it really doesn't know
6776# the difference).
6777# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6778# with --with-libiconv-prefix.
6779# Putting these together is why the option name is --with-iconv-bin.
6780
6781
6782# Check whether --with-iconv-bin was given.
6783if test "${with_iconv_bin+set}" = set; then :
6784 withval=$with_iconv_bin; iconv_bin="${withval}"
6785
6786cat >>confdefs.h <<_ACEOF
6787#define ICONV_BIN "${iconv_bin}"
6788_ACEOF
6789
6790
6791 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6792 if test "x$prefix" = xNONE; then
6793 test_prefix=/usr/local
6794 else
6795 test_prefix=$prefix
6796 fi
6797 else
6798 test_prefix=$exec_prefix
6799 fi
6800 value=0
6801 case ${iconv_bin} in
6802 "${test_prefix}"|"${test_prefix}/"*|\
6803 '${exec_prefix}'|'${exec_prefix}/'*)
6804 value=1
6805 ;;
6806 esac
6807
6808cat >>confdefs.h <<_ACEOF
6809#define ICONV_BIN_RELOCATABLE $value
6810_ACEOF
6811
6812
6813
6814fi
6815
6816
6c7a06a3
TT
6817# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6818# There is a very specific comment in /usr/include/curses.h explaining that
6819# termcap routines built into libcurses must not be used.
6820#
6821# The symptoms we observed so far is GDB unexpectedly changing
6822# the terminal settings when tgetent is called - this is particularly
6823# visible as the output is missing carriage returns, and so rapidly
6824# becomes very hard to read.
6825#
6826# The readline configure script has already decided that libtermcap
6827# was enough for its purposes, and so decided to build readline using
6828# libtermcap. Since the TUI mode requires curses, building GDB with
6829# TUI enabled results in both libraries to be used at the same time,
6830# which is not allowed. This basically means that GDB with TUI is
6831# broken on alpha-osf.
6832
6833case $host_os in
6bcc772d
RO
6834 osf* )
6835 if test x"$enable_tui" = xyes; then
81ecdfbb 6836 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6837 fi
6bcc772d 6838 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6839 enable_tui=no
6840 fi
6841 ;;
6842esac
6843
cb01cfba 6844# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6845if test x"$enable_tui" != xno; then
cb01cfba
JB
6846 prefer_curses=yes
6847fi
6848
6849curses_found=no
6850if test x"$prefer_curses" = xyes; then
6851 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6852 # curses library because the latter might not provide all the
6853 # functionality we need. However, this leads to problems on systems
6854 # where the linker searches /usr/local/lib, but the compiler doesn't
6855 # search /usr/local/include, if ncurses is installed in /usr/local. A
6856 # default installation of ncurses on alpha*-dec-osf* will lead to such
6857 # a situation.
81ecdfbb
RW
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6859$as_echo_n "checking for library containing waddstr... " >&6; }
6860if test "${ac_cv_search_waddstr+set}" = set; then :
6861 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6862else
6863 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6865/* end confdefs.h. */
6866
81ecdfbb
RW
6867/* Override any GCC internal prototype to avoid an error.
6868 Use char because int might match the return type of a GCC
6869 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6870#ifdef __cplusplus
6871extern "C"
6872#endif
6c7a06a3
TT
6873char waddstr ();
6874int
6875main ()
6876{
81ecdfbb 6877return waddstr ();
6c7a06a3
TT
6878 ;
6879 return 0;
6880}
6881_ACEOF
81ecdfbb
RW
6882for ac_lib in '' ncurses cursesX curses; do
6883 if test -z "$ac_lib"; then
6884 ac_res="none required"
6885 else
6886 ac_res=-l$ac_lib
6887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6888 fi
6889 if ac_fn_c_try_link "$LINENO"; then :
6890 ac_cv_search_waddstr=$ac_res
6891fi
6892rm -f core conftest.err conftest.$ac_objext \
6893 conftest$ac_exeext
6894 if test "${ac_cv_search_waddstr+set}" = set; then :
6895 break
6896fi
6897done
6898if test "${ac_cv_search_waddstr+set}" = set; then :
6899
6c7a06a3 6900else
81ecdfbb
RW
6901 ac_cv_search_waddstr=no
6902fi
6903rm conftest.$ac_ext
6904LIBS=$ac_func_search_save_LIBS
6905fi
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6907$as_echo "$ac_cv_search_waddstr" >&6; }
6908ac_res=$ac_cv_search_waddstr
6909if test "$ac_res" != no; then :
6910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6911
6912fi
6913
6914
cb01cfba
JB
6915 if test "$ac_cv_search_waddstr" != no; then
6916 curses_found=yes
6917 fi
6918fi
6919
6920# Check whether we should enable the TUI, but only do so if we really
6921# can.
6922if test x"$enable_tui" != xno; then
6923 if test -d $srcdir/tui; then
6924 if test "$curses_found" != no; then
6c7a06a3
TT
6925 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6926 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6927 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6928 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6929 else
6930 if test x"$enable_tui" = xyes; then
81ecdfbb 6931 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6932 else
81ecdfbb
RW
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6934$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6935 fi
6936 fi
6937 fi
6938fi
6939
6940# Since GDB uses Readline, we need termcap functionality. In many
6941# cases this will be provided by the curses library, but some systems
6942# have a seperate termcap library, or no curses library at all.
6943
6944case $host_os in
6945 cygwin*)
6946 if test -d $srcdir/libtermcap; then
6947 LIBS="../libtermcap/libtermcap.a $LIBS"
6948 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6949 fi ;;
6950 go32* | *djgpp*)
6951 ac_cv_search_tgetent="none required"
6952 ;;
6953 *mingw32*)
6954 ac_cv_search_tgetent="none required"
6955 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6956 ;;
6957esac
6958
6959# These are the libraries checked by Readline.
81ecdfbb
RW
6960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6961$as_echo_n "checking for library containing tgetent... " >&6; }
6962if test "${ac_cv_search_tgetent+set}" = set; then :
6963 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6964else
6965 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6967/* end confdefs.h. */
6968
81ecdfbb
RW
6969/* Override any GCC internal prototype to avoid an error.
6970 Use char because int might match the return type of a GCC
6971 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6972#ifdef __cplusplus
6973extern "C"
6974#endif
6c7a06a3
TT
6975char tgetent ();
6976int
6977main ()
6978{
81ecdfbb 6979return tgetent ();
6c7a06a3
TT
6980 ;
6981 return 0;
6982}
6983_ACEOF
81ecdfbb
RW
6984for ac_lib in '' termcap tinfo curses ncurses; do
6985 if test -z "$ac_lib"; then
6986 ac_res="none required"
6987 else
6988 ac_res=-l$ac_lib
6c7a06a3 6989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6990 fi
6991 if ac_fn_c_try_link "$LINENO"; then :
6992 ac_cv_search_tgetent=$ac_res
6993fi
6994rm -f core conftest.err conftest.$ac_objext \
6995 conftest$ac_exeext
6996 if test "${ac_cv_search_tgetent+set}" = set; then :
6997 break
6998fi
6999done
7000if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7001
6c7a06a3 7002else
81ecdfbb 7003 ac_cv_search_tgetent=no
6c7a06a3 7004fi
81ecdfbb 7005rm conftest.$ac_ext
6c7a06a3
TT
7006LIBS=$ac_func_search_save_LIBS
7007fi
81ecdfbb
RW
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7009$as_echo "$ac_cv_search_tgetent" >&6; }
7010ac_res=$ac_cv_search_tgetent
7011if test "$ac_res" != no; then :
7012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7013
06825bd1
MK
7014fi
7015
06825bd1 7016
bec39cab 7017if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7018 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7019fi
7020
3841debe 7021
81ecdfbb
RW
7022# Check whether --with-system-readline was given.
7023if test "${with_system_readline+set}" = set; then :
7024 withval=$with_system_readline;
7025fi
6a30b0a5 7026
6a30b0a5
AS
7027
7028if test "$with_system_readline" = yes; then
7029 READLINE=-lreadline
7030 READLINE_DEPS=
7031 READLINE_CFLAGS=
39037522 7032 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7033else
7034 READLINE='$(READLINE_DIR)/libreadline.a'
7035 READLINE_DEPS='$(READLINE)'
7036 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7037 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7038fi
7039
7040
7041
7042
7043
f997c383
SD
7044# Generate jit-reader.h
7045
7046# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7047TARGET_PTR=
7048
7049# The cast to long int works around a bug in the HP C Compiler
7050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7052# This bug is HP SR number 8606223364.
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7054$as_echo_n "checking size of unsigned long long... " >&6; }
7055if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7056 $as_echo_n "(cached) " >&6
7057else
7058 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7059
7060else
7061 if test "$ac_cv_type_unsigned_long_long" = yes; then
7062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7064{ as_fn_set_status 77
7065as_fn_error "cannot compute sizeof (unsigned long long)
7066See \`config.log' for more details." "$LINENO" 5; }; }
7067 else
7068 ac_cv_sizeof_unsigned_long_long=0
7069 fi
7070fi
7071
7072fi
7073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7074$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7075
7076
7077
7078cat >>confdefs.h <<_ACEOF
7079#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7080_ACEOF
7081
7082
7083# The cast to long int works around a bug in the HP C Compiler
7084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7086# This bug is HP SR number 8606223364.
7087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7088$as_echo_n "checking size of unsigned long... " >&6; }
7089if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7090 $as_echo_n "(cached) " >&6
7091else
7092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7093
7094else
7095 if test "$ac_cv_type_unsigned_long" = yes; then
7096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7098{ as_fn_set_status 77
7099as_fn_error "cannot compute sizeof (unsigned long)
7100See \`config.log' for more details." "$LINENO" 5; }; }
7101 else
7102 ac_cv_sizeof_unsigned_long=0
7103 fi
7104fi
7105
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7108$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7109
7110
7111
7112cat >>confdefs.h <<_ACEOF
7113#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7114_ACEOF
7115
7116
7117# The cast to long int works around a bug in the HP C Compiler
7118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7120# This bug is HP SR number 8606223364.
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7122$as_echo_n "checking size of unsigned __int128... " >&6; }
7123if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7124 $as_echo_n "(cached) " >&6
7125else
7126 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7127
7128else
7129 if test "$ac_cv_type_unsigned___int128" = yes; then
7130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7132{ as_fn_set_status 77
7133as_fn_error "cannot compute sizeof (unsigned __int128)
7134See \`config.log' for more details." "$LINENO" 5; }; }
7135 else
7136 ac_cv_sizeof_unsigned___int128=0
7137 fi
7138fi
7139
7140fi
7141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7142$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7143
7144
7145
7146cat >>confdefs.h <<_ACEOF
7147#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7148_ACEOF
7149
7150
7151
7152if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7153 TARGET_PTR="unsigned long"
7154elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7155 TARGET_PTR="unsigned long long"
7156elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7157 TARGET_PTR="unsigned __int128"
7158else
7159 TARGET_PTR="unsigned long"
7160fi
7161
7162
7163ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7164
7165
a2d08b9e
SD
7166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7167$as_echo_n "checking for library containing dlopen... " >&6; }
7168if test "${ac_cv_search_dlopen+set}" = set; then :
7169 $as_echo_n "(cached) " >&6
7170else
7171 ac_func_search_save_LIBS=$LIBS
7172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7173/* end confdefs.h. */
7174
7175/* Override any GCC internal prototype to avoid an error.
7176 Use char because int might match the return type of a GCC
7177 builtin and then its argument prototype would still apply. */
7178#ifdef __cplusplus
7179extern "C"
7180#endif
7181char dlopen ();
7182int
7183main ()
7184{
7185return dlopen ();
7186 ;
7187 return 0;
7188}
7189_ACEOF
7190for ac_lib in '' dl; do
7191 if test -z "$ac_lib"; then
7192 ac_res="none required"
7193 else
7194 ac_res=-l$ac_lib
7195 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7196 fi
7197 if ac_fn_c_try_link "$LINENO"; then :
7198 ac_cv_search_dlopen=$ac_res
7199fi
7200rm -f core conftest.err conftest.$ac_objext \
7201 conftest$ac_exeext
7202 if test "${ac_cv_search_dlopen+set}" = set; then :
7203 break
7204fi
7205done
7206if test "${ac_cv_search_dlopen+set}" = set; then :
7207
7208else
7209 ac_cv_search_dlopen=no
7210fi
7211rm conftest.$ac_ext
7212LIBS=$ac_func_search_save_LIBS
7213fi
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7215$as_echo "$ac_cv_search_dlopen" >&6; }
7216ac_res=$ac_cv_search_dlopen
7217if test "$ac_res" != no; then :
7218 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7219
7220fi
7221
7222
39037522 7223
b8e0a31c
SD
7224
7225# Check whether --with-jit-reader-dir was given.
7226if test "${with_jit_reader_dir+set}" = set; then :
7227 withval=$with_jit_reader_dir;
7228 JIT_READER_DIR=$withval
7229else
7230 JIT_READER_DIR=${libdir}/gdb
7231fi
7232
7233
7234 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7235 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7236 ac_define_dir=`eval echo $JIT_READER_DIR`
7237 ac_define_dir=`eval echo $ac_define_dir`
7238
7239cat >>confdefs.h <<_ACEOF
7240#define JIT_READER_DIR "$ac_define_dir"
7241_ACEOF
7242
7243
7244
7245
7246 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7247 if test "x$prefix" = xNONE; then
7248 test_prefix=/usr/local
7249 else
7250 test_prefix=$prefix
7251 fi
7252 else
7253 test_prefix=$exec_prefix
7254 fi
7255 value=0
7256 case ${ac_define_dir} in
7257 "${test_prefix}"|"${test_prefix}/"*|\
7258 '${exec_prefix}'|'${exec_prefix}/'*)
7259 value=1
7260 ;;
7261 esac
7262
7263cat >>confdefs.h <<_ACEOF
7264#define JIT_READER_DIR_RELOCATABLE $value
7265_ACEOF
7266
7267
7268
7269
7270
81ecdfbb
RW
7271# Check whether --with-expat was given.
7272if test "${with_expat+set}" = set; then :
7273 withval=$with_expat;
5c39566f
DJ
7274else
7275 with_expat=auto
81ecdfbb
RW
7276fi
7277
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7279$as_echo_n "checking whether to use expat... " >&6; }
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7281$as_echo "$with_expat" >&6; }
5c39566f
DJ
7282
7283if test "${with_expat}" = no; then
81ecdfbb
RW
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7285$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7286 HAVE_LIBEXPAT=no
7287else
7288
3841debe
DJ
7289 if test "X$prefix" = "XNONE"; then
7290 acl_final_prefix="$ac_default_prefix"
7291 else
7292 acl_final_prefix="$prefix"
7293 fi
7294 if test "X$exec_prefix" = "XNONE"; then
7295 acl_final_exec_prefix='${prefix}'
7296 else
7297 acl_final_exec_prefix="$exec_prefix"
7298 fi
7299 acl_save_prefix="$prefix"
7300 prefix="$acl_final_prefix"
7301 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7302 prefix="$acl_save_prefix"
7303
7304
81ecdfbb
RW
7305# Check whether --with-gnu-ld was given.
7306if test "${with_gnu_ld+set}" = set; then :
7307 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7308else
7309 with_gnu_ld=no
81ecdfbb
RW
7310fi
7311
3841debe
DJ
7312# Prepare PATH_SEPARATOR.
7313# The user is always right.
7314if test "${PATH_SEPARATOR+set}" != set; then
7315 echo "#! /bin/sh" >conf$$.sh
7316 echo "exit 0" >>conf$$.sh
7317 chmod +x conf$$.sh
7318 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7319 PATH_SEPARATOR=';'
7320 else
7321 PATH_SEPARATOR=:
7322 fi
7323 rm -f conf$$.sh
7324fi
7325ac_prog=ld
7326if test "$GCC" = yes; then
7327 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7329$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7330 case $host in
7331 *-*-mingw*)
7332 # gcc leaves a trailing carriage return which upsets mingw
7333 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7334 *)
7335 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7336 esac
7337 case $ac_prog in
7338 # Accept absolute paths.
7339 [\\/]* | [A-Za-z]:[\\/]*)
7340 re_direlt='/[^/][^/]*/\.\./'
7341 # Canonicalize the path of ld
7342 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7343 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7344 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7345 done
7346 test -z "$LD" && LD="$ac_prog"
7347 ;;
7348 "")
7349 # If it fails, then pretend we aren't using GCC.
7350 ac_prog=ld
7351 ;;
7352 *)
7353 # If it is relative, then search for the first ld in PATH.
7354 with_gnu_ld=unknown
7355 ;;
7356 esac
7357elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7359$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7360else
81ecdfbb
RW
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7362$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7363fi
81ecdfbb
RW
7364if test "${acl_cv_path_LD+set}" = set; then :
7365 $as_echo_n "(cached) " >&6
3841debe
DJ
7366else
7367 if test -z "$LD"; then
7368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7369 for ac_dir in $PATH; do
7370 test -z "$ac_dir" && ac_dir=.
7371 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7372 acl_cv_path_LD="$ac_dir/$ac_prog"
7373 # Check to see if the program is GNU ld. I'd rather use --version,
7374 # but apparently some GNU ld's only accept -v.
7375 # Break only if it was the GNU/non-GNU ld that we prefer.
7376 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7377 test "$with_gnu_ld" != no && break
7378 else
7379 test "$with_gnu_ld" != yes && break
7380 fi
7381 fi
7382 done
7383 IFS="$ac_save_ifs"
7384else
7385 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7386fi
7387fi
7388
7389LD="$acl_cv_path_LD"
7390if test -n "$LD"; then
81ecdfbb
RW
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7392$as_echo "$LD" >&6; }
3841debe 7393else
81ecdfbb
RW
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
3841debe 7396fi
81ecdfbb
RW
7397test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7399$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7400if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7401 $as_echo_n "(cached) " >&6
3841debe
DJ
7402else
7403 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7404if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7405 acl_cv_prog_gnu_ld=yes
7406else
7407 acl_cv_prog_gnu_ld=no
7408fi
7409fi
81ecdfbb
RW
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7411$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7412with_gnu_ld=$acl_cv_prog_gnu_ld
7413
7414
7415
81ecdfbb
RW
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7417$as_echo_n "checking for shared library run path origin... " >&6; }
7418if test "${acl_cv_rpath+set}" = set; then :
7419 $as_echo_n "(cached) " >&6
3841debe
DJ
7420else
7421
7422 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7423 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7424 . ./conftest.sh
7425 rm -f ./conftest.sh
7426 acl_cv_rpath=done
7427
7428fi
81ecdfbb
RW
7429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7430$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7431 wl="$acl_cv_wl"
7432 libext="$acl_cv_libext"
7433 shlibext="$acl_cv_shlibext"
7434 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7435 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7436 hardcode_direct="$acl_cv_hardcode_direct"
7437 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7438 # Check whether --enable-rpath was given.
7439if test "${enable_rpath+set}" = set; then :
7440 enableval=$enable_rpath; :
3841debe
DJ
7441else
7442 enable_rpath=yes
81ecdfbb
RW
7443fi
7444
3841debe
DJ
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454 use_additional=yes
7455
7456 acl_save_prefix="$prefix"
7457 prefix="$acl_final_prefix"
7458 acl_save_exec_prefix="$exec_prefix"
7459 exec_prefix="$acl_final_exec_prefix"
7460
7461 eval additional_includedir=\"$includedir\"
7462 eval additional_libdir=\"$libdir\"
7463
7464 exec_prefix="$acl_save_exec_prefix"
7465 prefix="$acl_save_prefix"
7466
7467
81ecdfbb
RW
7468# Check whether --with-libexpat-prefix was given.
7469if test "${with_libexpat_prefix+set}" = set; then :
7470 withval=$with_libexpat_prefix;
3841debe
DJ
7471 if test "X$withval" = "Xno"; then
7472 use_additional=no
7473 else
7474 if test "X$withval" = "X"; then
7475
7476 acl_save_prefix="$prefix"
7477 prefix="$acl_final_prefix"
7478 acl_save_exec_prefix="$exec_prefix"
7479 exec_prefix="$acl_final_exec_prefix"
7480
7481 eval additional_includedir=\"$includedir\"
7482 eval additional_libdir=\"$libdir\"
7483
7484 exec_prefix="$acl_save_exec_prefix"
7485 prefix="$acl_save_prefix"
7486
7487 else
7488 additional_includedir="$withval/include"
7489 additional_libdir="$withval/lib"
7490 fi
7491 fi
7492
81ecdfbb
RW
7493fi
7494
3841debe
DJ
7495 LIBEXPAT=
7496 LTLIBEXPAT=
7497 INCEXPAT=
7498 rpathdirs=
7499 ltrpathdirs=
7500 names_already_handled=
7501 names_next_round='expat '
7502 while test -n "$names_next_round"; do
7503 names_this_round="$names_next_round"
7504 names_next_round=
7505 for name in $names_this_round; do
7506 already_handled=
7507 for n in $names_already_handled; do
7508 if test "$n" = "$name"; then
7509 already_handled=yes
7510 break
7511 fi
7512 done
7513 if test -z "$already_handled"; then
7514 names_already_handled="$names_already_handled $name"
7515 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7516 eval value=\"\$HAVE_LIB$uppername\"
7517 if test -n "$value"; then
7518 if test "$value" = yes; then
7519 eval value=\"\$LIB$uppername\"
7520 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7521 eval value=\"\$LTLIB$uppername\"
7522 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7523 else
7524 :
7525 fi
7526 else
7527 found_dir=
7528 found_la=
7529 found_so=
7530 found_a=
7531 if test $use_additional = yes; then
7532 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7533 found_dir="$additional_libdir"
7534 found_so="$additional_libdir/lib$name.$shlibext"
7535 if test -f "$additional_libdir/lib$name.la"; then
7536 found_la="$additional_libdir/lib$name.la"
7537 fi
7538 else
7539 if test -f "$additional_libdir/lib$name.$libext"; then
7540 found_dir="$additional_libdir"
7541 found_a="$additional_libdir/lib$name.$libext"
7542 if test -f "$additional_libdir/lib$name.la"; then
7543 found_la="$additional_libdir/lib$name.la"
7544 fi
7545 fi
7546 fi
7547 fi
7548 if test "X$found_dir" = "X"; then
7549 for x in $LDFLAGS $LTLIBEXPAT; do
7550
7551 acl_save_prefix="$prefix"
7552 prefix="$acl_final_prefix"
7553 acl_save_exec_prefix="$exec_prefix"
7554 exec_prefix="$acl_final_exec_prefix"
7555 eval x=\"$x\"
7556 exec_prefix="$acl_save_exec_prefix"
7557 prefix="$acl_save_prefix"
7558
7559 case "$x" in
7560 -L*)
7561 dir=`echo "X$x" | sed -e 's/^X-L//'`
7562 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7563 found_dir="$dir"
7564 found_so="$dir/lib$name.$shlibext"
7565 if test -f "$dir/lib$name.la"; then
7566 found_la="$dir/lib$name.la"
7567 fi
7568 else
7569 if test -f "$dir/lib$name.$libext"; then
7570 found_dir="$dir"
7571 found_a="$dir/lib$name.$libext"
7572 if test -f "$dir/lib$name.la"; then
7573 found_la="$dir/lib$name.la"
7574 fi
7575 fi
7576 fi
7577 ;;
7578 esac
7579 if test "X$found_dir" != "X"; then
7580 break
7581 fi
7582 done
7583 fi
7584 if test "X$found_dir" != "X"; then
7585 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7586 if test "X$found_so" != "X"; then
7587 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7588 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7589 else
7590 haveit=
7591 for x in $ltrpathdirs; do
7592 if test "X$x" = "X$found_dir"; then
7593 haveit=yes
7594 break
7595 fi
7596 done
7597 if test -z "$haveit"; then
7598 ltrpathdirs="$ltrpathdirs $found_dir"
7599 fi
7600 if test "$hardcode_direct" = yes; then
7601 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7602 else
7603 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7604 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7605 haveit=
7606 for x in $rpathdirs; do
7607 if test "X$x" = "X$found_dir"; then
7608 haveit=yes
7609 break
7610 fi
7611 done
7612 if test -z "$haveit"; then
7613 rpathdirs="$rpathdirs $found_dir"
7614 fi
7615 else
7616 haveit=
7617 for x in $LDFLAGS $LIBEXPAT; do
7618
7619 acl_save_prefix="$prefix"
7620 prefix="$acl_final_prefix"
7621 acl_save_exec_prefix="$exec_prefix"
7622 exec_prefix="$acl_final_exec_prefix"
7623 eval x=\"$x\"
7624 exec_prefix="$acl_save_exec_prefix"
7625 prefix="$acl_save_prefix"
7626
7627 if test "X$x" = "X-L$found_dir"; then
7628 haveit=yes
7629 break
7630 fi
7631 done
7632 if test -z "$haveit"; then
7633 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7634 fi
7635 if test "$hardcode_minus_L" != no; then
7636 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7637 else
7638 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7639 fi
7640 fi
7641 fi
7642 fi
7643 else
7644 if test "X$found_a" != "X"; then
7645 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7646 else
7647 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7648 fi
7649 fi
7650 additional_includedir=
7651 case "$found_dir" in
7652 */lib | */lib/)
7653 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7654 additional_includedir="$basedir/include"
7655 ;;
7656 esac
7657 if test "X$additional_includedir" != "X"; then
7658 if test "X$additional_includedir" != "X/usr/include"; then
7659 haveit=
7660 if test "X$additional_includedir" = "X/usr/local/include"; then
7661 if test -n "$GCC"; then
7662 case $host_os in
7663 linux*) haveit=yes;;
7664 esac
7665 fi
7666 fi
7667 if test -z "$haveit"; then
7668 for x in $CPPFLAGS $INCEXPAT; do
7669
7670 acl_save_prefix="$prefix"
7671 prefix="$acl_final_prefix"
7672 acl_save_exec_prefix="$exec_prefix"
7673 exec_prefix="$acl_final_exec_prefix"
7674 eval x=\"$x\"
7675 exec_prefix="$acl_save_exec_prefix"
7676 prefix="$acl_save_prefix"
7677
7678 if test "X$x" = "X-I$additional_includedir"; then
7679 haveit=yes
7680 break
7681 fi
7682 done
7683 if test -z "$haveit"; then
7684 if test -d "$additional_includedir"; then
7685 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7686 fi
7687 fi
7688 fi
7689 fi
7690 fi
7691 if test -n "$found_la"; then
7692 save_libdir="$libdir"
7693 case "$found_la" in
7694 */* | *\\*) . "$found_la" ;;
7695 *) . "./$found_la" ;;
7696 esac
7697 libdir="$save_libdir"
7698 for dep in $dependency_libs; do
7699 case "$dep" in
7700 -L*)
7701 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7702 if test "X$additional_libdir" != "X/usr/lib"; then
7703 haveit=
7704 if test "X$additional_libdir" = "X/usr/local/lib"; then
7705 if test -n "$GCC"; then
7706 case $host_os in
7707 linux*) haveit=yes;;
7708 esac
7709 fi
7710 fi
7711 if test -z "$haveit"; then
7712 haveit=
7713 for x in $LDFLAGS $LIBEXPAT; do
7714
7715 acl_save_prefix="$prefix"
7716 prefix="$acl_final_prefix"
7717 acl_save_exec_prefix="$exec_prefix"
7718 exec_prefix="$acl_final_exec_prefix"
7719 eval x=\"$x\"
7720 exec_prefix="$acl_save_exec_prefix"
7721 prefix="$acl_save_prefix"
7722
7723 if test "X$x" = "X-L$additional_libdir"; then
7724 haveit=yes
7725 break
7726 fi
7727 done
7728 if test -z "$haveit"; then
7729 if test -d "$additional_libdir"; then
7730 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7731 fi
7732 fi
7733 haveit=
7734 for x in $LDFLAGS $LTLIBEXPAT; do
7735
7736 acl_save_prefix="$prefix"
7737 prefix="$acl_final_prefix"
7738 acl_save_exec_prefix="$exec_prefix"
7739 exec_prefix="$acl_final_exec_prefix"
7740 eval x=\"$x\"
7741 exec_prefix="$acl_save_exec_prefix"
7742 prefix="$acl_save_prefix"
7743
7744 if test "X$x" = "X-L$additional_libdir"; then
7745 haveit=yes
7746 break
7747 fi
7748 done
7749 if test -z "$haveit"; then
7750 if test -d "$additional_libdir"; then
7751 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7752 fi
7753 fi
7754 fi
7755 fi
7756 ;;
7757 -R*)
7758 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7759 if test "$enable_rpath" != no; then
7760 haveit=
7761 for x in $rpathdirs; do
7762 if test "X$x" = "X$dir"; then
7763 haveit=yes
7764 break
7765 fi
7766 done
7767 if test -z "$haveit"; then
7768 rpathdirs="$rpathdirs $dir"
7769 fi
7770 haveit=
7771 for x in $ltrpathdirs; do
7772 if test "X$x" = "X$dir"; then
7773 haveit=yes
7774 break
7775 fi
7776 done
7777 if test -z "$haveit"; then
7778 ltrpathdirs="$ltrpathdirs $dir"
7779 fi
7780 fi
7781 ;;
7782 -l*)
7783 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7784 ;;
7785 *.la)
7786 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7787 ;;
7788 *)
7789 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7790 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7791 ;;
81ecdfbb
RW
7792 esac
7793 done
7794 fi
7795 else
7796 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7797 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7798 fi
7799 fi
7800 fi
7801 done
7802 done
7803 if test "X$rpathdirs" != "X"; then
7804 if test -n "$hardcode_libdir_separator"; then
7805 alldirs=
7806 for found_dir in $rpathdirs; do
7807 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7808 done
7809 acl_save_libdir="$libdir"
7810 libdir="$alldirs"
7811 eval flag=\"$hardcode_libdir_flag_spec\"
7812 libdir="$acl_save_libdir"
7813 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7814 else
7815 for found_dir in $rpathdirs; do
7816 acl_save_libdir="$libdir"
7817 libdir="$found_dir"
7818 eval flag=\"$hardcode_libdir_flag_spec\"
7819 libdir="$acl_save_libdir"
7820 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7821 done
7822 fi
7823 fi
7824 if test "X$ltrpathdirs" != "X"; then
7825 for found_dir in $ltrpathdirs; do
7826 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7827 done
7828 fi
a9322a30
TT
7829
7830
81ecdfbb 7831 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7832
81ecdfbb
RW
7833 for element in $INCEXPAT; do
7834 haveit=
7835 for x in $CPPFLAGS; do
a9322a30 7836
81ecdfbb
RW
7837 acl_save_prefix="$prefix"
7838 prefix="$acl_final_prefix"
7839 acl_save_exec_prefix="$exec_prefix"
7840 exec_prefix="$acl_final_exec_prefix"
7841 eval x=\"$x\"
7842 exec_prefix="$acl_save_exec_prefix"
7843 prefix="$acl_save_prefix"
a8111142 7844
81ecdfbb
RW
7845 if test "X$x" = "X$element"; then
7846 haveit=yes
7847 break
7848 fi
7849 done
7850 if test -z "$haveit"; then
7851 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7852 fi
7853 done
a9322a30
TT
7854
7855
81ecdfbb
RW
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7857$as_echo_n "checking for libexpat... " >&6; }
7858if test "${ac_cv_libexpat+set}" = set; then :
7859 $as_echo_n "(cached) " >&6
bec39cab 7860else
bec39cab 7861
81ecdfbb
RW
7862 ac_save_LIBS="$LIBS"
7863 LIBS="$LIBS $LIBEXPAT"
7864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7865/* end confdefs.h. */
81ecdfbb
RW
7866#include "expat.h"
7867int
7868main ()
7869{
7870XML_Parser p = XML_ParserCreate (0);
7871 ;
7872 return 0;
7873}
bec39cab 7874_ACEOF
81ecdfbb
RW
7875if ac_fn_c_try_link "$LINENO"; then :
7876 ac_cv_libexpat=yes
c906108c 7877else
81ecdfbb 7878 ac_cv_libexpat=no
bec39cab 7879fi
81ecdfbb
RW
7880rm -f core conftest.err conftest.$ac_objext \
7881 conftest$ac_exeext conftest.$ac_ext
7882 LIBS="$ac_save_LIBS"
c906108c 7883
95ca63c4 7884fi
81ecdfbb
RW
7885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7886$as_echo "$ac_cv_libexpat" >&6; }
7887 if test "$ac_cv_libexpat" = yes; then
7888 HAVE_LIBEXPAT=yes
bec39cab 7889
81ecdfbb 7890$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7891
81ecdfbb
RW
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7893$as_echo_n "checking how to link with libexpat... " >&6; }
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7895$as_echo "$LIBEXPAT" >&6; }
7896 else
7897 HAVE_LIBEXPAT=no
7898 CPPFLAGS="$ac_save_CPPFLAGS"
7899 LIBEXPAT=
7900 LTLIBEXPAT=
7901 fi
95ca63c4
CF
7902
7903
7904
7cb9022a
MK
7905
7906
bec39cab 7907
81ecdfbb
RW
7908 if test "$HAVE_LIBEXPAT" != yes; then
7909 if test "$with_expat" = yes; then
7910 as_fn_error "expat is missing or unusable" "$LINENO" 5
7911 else
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7913$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7914 fi
7915 else
7916 save_LIBS=$LIBS
7917 LIBS="$LIBS $LIBEXPAT"
7918 for ac_func in XML_StopParser
7919do :
7920 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7921if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7922 cat >>confdefs.h <<_ACEOF
81ecdfbb 7923#define HAVE_XML_STOPPARSER 1
bec39cab 7924_ACEOF
95ca63c4 7925
bec39cab 7926fi
bec39cab 7927done
95ca63c4 7928
81ecdfbb
RW
7929 LIBS=$save_LIBS
7930 fi
a9322a30
TT
7931fi
7932
a9322a30 7933
a9322a30
TT
7934
7935
ec685c5e 7936
0c4a4063 7937
81ecdfbb
RW
7938# Check whether --with-python was given.
7939if test "${with_python+set}" = set; then :
7940 withval=$with_python;
bec39cab 7941else
81ecdfbb 7942 with_python=auto
bec39cab 7943fi
bec39cab 7944
81ecdfbb
RW
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7946$as_echo_n "checking whether to use python... " >&6; }
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7948$as_echo "$with_python" >&6; }
9a156167 7949
81ecdfbb
RW
7950if test "${with_python}" = no; then
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7952$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7953 have_libpython=no
bec39cab 7954else
81ecdfbb 7955 case "${with_python}" in
8c85a4e2 7956 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7957 if test -d ${with_python}; then
7958 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7959 python_prog="${with_python}/bin/python"
0c4a4063 7960 python_prefix=
9c4ea6c5
JB
7961 # If python does not exit ${with_python}/bin, then try in
7962 # ${with_python}. On Windows/MinGW, this is where the Python
7963 # executable is.
7964 if test ! -x "${python_prog}"; then
7965 python_prog="${with_python}/python"
7966 python_prefix=
7967 fi
e7a30f46 7968 if test ! -x "${python_prog}"; then
ec685c5e
DE
7969 # Fall back to gdb 7.0/7.1 behaviour.
7970 python_prog=missing
0c4a4063 7971 python_prefix=${with_python}
ec685c5e 7972 fi
e7a30f46 7973 elif test -x "${with_python}"; then
ec685c5e
DE
7974 # While we can't run python compiled for $host (unless host == build),
7975 # the user could write a script that provides the needed information,
7976 # so we support that.
ec685c5e 7977 python_prog=${with_python}
0c4a4063 7978 python_prefix=
ec685c5e
DE
7979 else
7980 as_fn_error "invalid value for --with-python" "$LINENO" 5
7981 fi
81ecdfbb 7982 ;;
ec685c5e
DE
7983 */*)
7984 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7985 as_fn_error "invalid value for --with-python" "$LINENO" 5
7986 ;;
ec685c5e
DE
7987 *)
7988 # The user has either specified auto, yes, or the name of the python
7989 # program assumed to be in $PATH.
7990 python_prefix=
7991 case "${with_python}" in
7992 yes | auto)
7993 if test ${build} = ${host}; then
7994 # Extract the first word of "python", so it can be a program name with args.
7995set dummy python; ac_word=$2
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7997$as_echo_n "checking for $ac_word... " >&6; }
7998if test "${ac_cv_path_python_prog_path+set}" = set; then :
7999 $as_echo_n "(cached) " >&6
8000else
8001 case $python_prog_path in
8002 [\\/]* | ?:[\\/]*)
8003 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8004 ;;
8005 *)
8006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8007for as_dir in $PATH
8008do
8009 IFS=$as_save_IFS
8010 test -z "$as_dir" && as_dir=.
8011 for ac_exec_ext in '' $ac_executable_extensions; do
8012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8013 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8015 break 2
8016 fi
8017done
8018 done
8019IFS=$as_save_IFS
8020
8021 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8022 ;;
8023esac
8024fi
8025python_prog_path=$ac_cv_path_python_prog_path
8026if test -n "$python_prog_path"; then
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8028$as_echo "$python_prog_path" >&6; }
8029else
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8031$as_echo "no" >&6; }
8032fi
8033
8034
8035 if test "${python_prog_path}" = missing; then
8036 python_prog=missing
8037 else
8038 python_prog=${python_prog_path}
8039 fi
8040 else
8041 # Not much we can do except assume the cross-compiler will find the
8042 # right files.
8043 python_prog=missing
8044 fi
8045 ;;
8046 *)
8047 # While we can't run python compiled for $host (unless host == build),
8048 # the user could write a script that provides the needed information,
8049 # so we support that.
8050 python_prog="${with_python}"
8051 # Extract the first word of "${python_prog}", so it can be a program name with args.
8052set dummy ${python_prog}; ac_word=$2
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8054$as_echo_n "checking for $ac_word... " >&6; }
8055if test "${ac_cv_path_python_prog_path+set}" = set; then :
8056 $as_echo_n "(cached) " >&6
8057else
8058 case $python_prog_path in
8059 [\\/]* | ?:[\\/]*)
8060 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8061 ;;
8062 *)
8063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8064for as_dir in $PATH
8065do
8066 IFS=$as_save_IFS
8067 test -z "$as_dir" && as_dir=.
8068 for ac_exec_ext in '' $ac_executable_extensions; do
8069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8070 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8072 break 2
8073 fi
8074done
8075 done
8076IFS=$as_save_IFS
8077
8078 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8079 ;;
8080esac
8081fi
8082python_prog_path=$ac_cv_path_python_prog_path
8083if test -n "$python_prog_path"; then
8084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8085$as_echo "$python_prog_path" >&6; }
8086else
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8088$as_echo "no" >&6; }
8089fi
8090
8091
8092 if test "${python_prog_path}" = missing; then
8093 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8094 fi
8095 ;;
8096 esac
81ecdfbb
RW
8097 esac
8098
ec685c5e 8099 if test "${python_prog}" != missing; then
e7a30f46
DE
8100 # We have a python program to use, but it may be too old.
8101 # Don't flag an error for --with-python=auto (the default).
8102 have_python_config=yes
ec685c5e
DE
8103 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8104 if test $? != 0; then
e7a30f46
DE
8105 have_python_config=failed
8106 if test "${with_python}" != auto; then
8107 as_fn_error "failure running python-config --includes" "$LINENO" 5
8108 fi
ec685c5e
DE
8109 fi
8110 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8111 if test $? != 0; then
e7a30f46
DE
8112 have_python_config=failed
8113 if test "${with_python}" != auto; then
8114 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8115 fi
ec685c5e 8116 fi
0c4a4063
DE
8117 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8118 if test $? != 0; then
e7a30f46
DE
8119 have_python_config=failed
8120 if test "${with_python}" != auto; then
8121 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8122 fi
0c4a4063 8123 fi
ec685c5e 8124 else
ac534cba
JB
8125 # We do not have a python executable we can use to determine where
8126 # to find the Python headers and libs. We cannot guess the include
8127 # path from the python_prefix either, because that include path
8128 # depends on the Python version. So, there is nothing much we can
8129 # do except assume that the compiler will be able to find those files.
8130 python_includes=
8131 python_libs=
0c4a4063 8132 have_python_config=no
ec685c5e 8133 fi
bec39cab 8134
ec685c5e
DE
8135 # If we have python-config, only try the configuration it provides.
8136 # Otherwise fallback on the old way of trying different versions of
8137 # python in turn.
81ecdfbb 8138
ec685c5e
DE
8139 have_libpython=no
8140 if test "${have_python_config}" = yes; then
c1039e3c
JB
8141 # Determine the Python version by extracting "-lpython<version>"
8142 # part of the python_libs. <version> is usually X.Y with X and Y
8143 # being decimal numbers, but can also be XY (seen on Windows).
8144 #
8145 # The extraction is performed using sed with a regular expression.
8146 # Initially, the regexp used was using the '?' quantifier to make
8147 # the dot in the version number optional. Unfortunately, this
8148 # does not work with non-GNU versions of sed because, because of
8149 # what looks like a limitation (the '?' quantifier does not work
8150 # with back-references). We work around this limitation by using
8151 # the '*' quantifier instead. It means that, in theory, we might
8152 # match unexpected version strings such as "-lpython2..7", but
8153 # this seems unlikely in practice. And even if that happens,
8154 # an error will be triggered later on, when checking that version
8155 # number.
ec685c5e 8156 python_version=`echo " ${python_libs} " \
c1039e3c 8157 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8158 case "${python_version}" in
8159 python*)
ec685c5e
DE
8160
8161 version=${python_version}
8162
8163 new_CPPFLAGS=${python_includes}
8164 new_LIBS=${python_libs}
81ecdfbb
RW
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8166$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8167 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8168 save_LIBS=$LIBS
ec685c5e
DE
8169 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8170 LIBS="$LIBS $new_LIBS"
8171 found_usable_python=no
81ecdfbb 8172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8173/* end confdefs.h. */
ac534cba 8174#include "Python.h"
81ecdfbb
RW
8175int
8176main ()
8177{
8178Py_Initialize ();
8179 ;
8180 return 0;
8181}
bec39cab 8182_ACEOF
81ecdfbb 8183if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8184 have_libpython=${version}
8185 found_usable_python=yes
ac534cba
JB
8186 PYTHON_CPPFLAGS=$new_CPPFLAGS
8187 PYTHON_LIBS=$new_LIBS
9a156167 8188fi
81ecdfbb
RW
8189rm -f core conftest.err conftest.$ac_objext \
8190 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8191 CPPFLAGS=$save_CPPFLAGS
8192 LIBS=$save_LIBS
ec685c5e
DE
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8194$as_echo "${found_usable_python}" >&6; }
9a156167 8195
0c4a4063
DE
8196 ;;
8197 *)
ec685c5e 8198 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8199 ;;
8200 esac
e7a30f46 8201 elif test "${have_python_config}" != failed; then
ec685c5e 8202 if test "${have_libpython}" = no; then
9a156167 8203
420697bb
TT
8204 version=python2.7
8205
8206 new_CPPFLAGS=${python_includes}
8207 new_LIBS="${python_libs} -lpython2.7"
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"
420697bb
TT
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
420697bb
TT
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
420697bb
TT
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8237$as_echo "${found_usable_python}" >&6; }
8238
8239 fi
8240 if test "${have_libpython}" = no; then
8241
ec685c5e
DE
8242 version=python2.6
8243
8244 new_CPPFLAGS=${python_includes}
8245 new_LIBS="${python_libs} -lpython2.6"
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8247$as_echo_n "checking for ${version}... " >&6; }
8248 save_CPPFLAGS=$CPPFLAGS
8249 save_LIBS=$LIBS
8250 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8251 LIBS="$LIBS $new_LIBS"
8252 found_usable_python=no
8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8254/* end confdefs.h. */
ac534cba 8255#include "Python.h"
ec685c5e
DE
8256int
8257main ()
8258{
8259Py_Initialize ();
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264if ac_fn_c_try_link "$LINENO"; then :
8265 have_libpython=${version}
8266 found_usable_python=yes
ac534cba
JB
8267 PYTHON_CPPFLAGS=$new_CPPFLAGS
8268 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8269fi
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; }
9a156167 8276
81ecdfbb 8277 fi
ec685c5e 8278 if test ${have_libpython} = no; then
9a156167 8279
81ecdfbb 8280 version=python2.5
9a156167 8281
ec685c5e
DE
8282 new_CPPFLAGS=${python_includes}
8283 new_LIBS="${python_libs} -lpython2.5"
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"
81ecdfbb
RW
8294int
8295main ()
8296{
8297Py_Initialize ();
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; }
a9322a30 8314
81ecdfbb 8315 fi
ec685c5e 8316 if test ${have_libpython} = no; then
a9322a30 8317
81ecdfbb 8318 version=python2.4
a9322a30 8319
ec685c5e
DE
8320 new_CPPFLAGS=${python_includes}
8321 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8323$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8324 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8325 save_LIBS=$LIBS
ec685c5e
DE
8326 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8327 LIBS="$LIBS $new_LIBS"
8328 found_usable_python=no
81ecdfbb 8329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8330/* end confdefs.h. */
ac534cba 8331#include "Python.h"
a9322a30
TT
8332int
8333main ()
8334{
81ecdfbb 8335Py_Initialize ();
a9322a30
TT
8336 ;
8337 return 0;
8338}
436868fb 8339_ACEOF
81ecdfbb 8340if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8341 have_libpython=${version}
8342 found_usable_python=yes
ac534cba
JB
8343 PYTHON_CPPFLAGS=$new_CPPFLAGS
8344 PYTHON_LIBS=$new_LIBS
436868fb 8345fi
81ecdfbb
RW
8346rm -f core conftest.err conftest.$ac_objext \
8347 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8348 CPPFLAGS=$save_CPPFLAGS
8349 LIBS=$save_LIBS
ec685c5e
DE
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8351$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8352
ec685c5e
DE
8353 fi
8354 fi
9c4ea6c5 8355 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8356
8357$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8358
9c4ea6c5 8359 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8360
8361$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8362
9c4ea6c5 8363 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8364
8365$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8366
9c4ea6c5 8367 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8368
8369$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8370
81ecdfbb 8371 fi
ec685c5e
DE
8372
8373 if test "${have_libpython}" = no; then
81ecdfbb
RW
8374 case "${with_python}" in
8375 yes)
8376 as_fn_error "python is missing or unusable" "$LINENO" 5
8377 ;;
8378 auto)
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8380$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8381 ;;
8382 *)
8383 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8384 ;;
8385 esac
0c4a4063
DE
8386 else
8387 if test -n "${python_prefix}"; then
8388
8389cat >>confdefs.h <<_ACEOF
8390#define WITH_PYTHON_PATH "${python_prefix}"
8391_ACEOF
8392
8393
8394 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8395 if test "x$prefix" = xNONE; then
8396 test_prefix=/usr/local
8397 else
8398 test_prefix=$prefix
8399 fi
8400 else
8401 test_prefix=$exec_prefix
8402 fi
8403 value=0
8404 case ${python_prefix} in
8405 "${test_prefix}"|"${test_prefix}/"*|\
8406 '${exec_prefix}'|'${exec_prefix}/'*)
8407 value=1
8408 ;;
8409 esac
8410
8411cat >>confdefs.h <<_ACEOF
8412#define PYTHON_PATH_RELOCATABLE $value
8413_ACEOF
8414
8415
8416 fi
81ecdfbb 8417 fi
436868fb 8418fi
436868fb 8419
ec685c5e 8420if test "${have_libpython}" != no; then
436868fb 8421
81ecdfbb 8422$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8423
81ecdfbb
RW
8424 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8425 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8426 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8427 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8428 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8429
81ecdfbb
RW
8430 # Flags needed to compile Python code (taken from python-config --cflags).
8431 # We cannot call python-config directly because it will output whatever was
8432 # used when compiling the Python interpreter itself, including flags which
8433 # would make the python-related objects be compiled differently from the
8434 # rest of GDB (e.g., -O2 and -fPIC).
8435 if test "${GCC}" = yes; then
8436 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8437 fi
436868fb 8438
81ecdfbb
RW
8439 if test "x${tentative_python_cflags}" != x; then
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8441$as_echo_n "checking compiler flags for python code... " >&6; }
8442 for flag in ${tentative_python_cflags}; do
8443 # Check that the compiler accepts it
8444 saved_CFLAGS="$CFLAGS"
8445 CFLAGS="$CFLAGS $flag"
8446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8447/* end confdefs.h. */
81ecdfbb 8448
a9322a30
TT
8449int
8450main ()
8451{
a9322a30
TT
8452
8453 ;
8454 return 0;
8455}
bec39cab 8456_ACEOF
81ecdfbb
RW
8457if ac_fn_c_try_compile "$LINENO"; then :
8458 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8459fi
81ecdfbb
RW
8460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8461 CFLAGS="$saved_CFLAGS"
8462 done
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8464$as_echo "${PYTHON_CFLAGS}" >&6; }
8465 fi
043b6510
JB
8466
8467 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8468 # #if _SGIAPI
8469 # #define siginfo __siginfo
8470 # #endif
8471 # The problem is that including Python causes some XOPEN macros to be
8472 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8473 # to false. So, we work around this issue by defining siginfo ourself
8474 # though the command-line.
8475 case "$gdb_host" in
8476 irix*) if test "${GCC}" = yes; then
8477 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8478 fi
8479 ;;
8480 esac
a8db4212
YPK
8481
8482 # Note that "python -m threading" cannot be used to check for
8483 # threading support due to a bug in Python 2.7.3
8484 # (http://bugs.python.org/issue15567).
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8486$as_echo_n "checking whether python supports threads... " >&6; }
8487 saved_CPPFLAGS="${CPPFLAGS}"
8488 CPPFLAGS="${PYTHON_CPPFLAGS}"
8489 # Note that the test is reversed so that python_has_threads=yes on
8490 # unexpected failures.
8491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h. */
8493
8494#include <Python.h>
8495#ifdef WITH_THREAD
8496# error
8497#endif
8498
8499_ACEOF
8500if ac_fn_c_try_cpp "$LINENO"; then :
8501 python_has_threads=no
8502else
8503 python_has_threads=yes
8504fi
8505rm -f conftest.err conftest.$ac_ext
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8507$as_echo "${python_has_threads}" >&6; }
8508 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8509else
8510 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8511 # included.
8512 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8513 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8514 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8515fi
9a156167 8516
9a156167 8517
ac534cba
JB
8518
8519
a8db4212
YPK
8520# Provide a --enable-libmcheck/--disable-libmcheck set of options
8521# allowing a user to enable this option even when building releases,
8522# or to disable it when building a snapshot.
8523# Check whether --enable-libmcheck was given.
8524if test "${enable_libmcheck+set}" = set; then :
8525 enableval=$enable_libmcheck; case "${enableval}" in
8526 yes | y) ENABLE_LIBMCHECK="yes" ;;
8527 no | n) ENABLE_LIBMCHECK="no" ;;
8528 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8529 esac
8530fi
8531
8532
8533# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8534# but turn it off if Python is enabled with threads, since -lmcheck is
8535# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8536# and for releases.
8537if test -z "${ENABLE_LIBMCHECK}" \
8538 -a \( "${have_libpython}" = "no" \
8539 -o "${python_has_threads}" = "no" \) \
8540 && $development; then
8541 ENABLE_LIBMCHECK=yes
8542fi
8543
8544if test "$ENABLE_LIBMCHECK" = "yes" ; then
8545 if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8547$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
8548 fi
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
8550$as_echo_n "checking for main in -lmcheck... " >&6; }
8551if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8552 $as_echo_n "(cached) " >&6
8553else
8554 ac_check_lib_save_LIBS=$LIBS
8555LIBS="-lmcheck $LIBS"
8556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8557/* end confdefs.h. */
8558
8559
8560int
8561main ()
8562{
8563return main ();
8564 ;
8565 return 0;
8566}
8567_ACEOF
8568if ac_fn_c_try_link "$LINENO"; then :
8569 ac_cv_lib_mcheck_main=yes
8570else
8571 ac_cv_lib_mcheck_main=no
8572fi
8573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext conftest.$ac_ext
8575LIBS=$ac_check_lib_save_LIBS
8576fi
8577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8578$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8579if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8580 cat >>confdefs.h <<_ACEOF
8581#define HAVE_LIBMCHECK 1
8582_ACEOF
8583
8584 LIBS="-lmcheck $LIBS"
8585
8586fi
8587
8588fi
8589
81ecdfbb
RW
8590# ------------------------- #
8591# Checks for header files. #
8592# ------------------------- #
c890192f 8593
81ecdfbb
RW
8594ac_header_dirent=no
8595for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8596 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8598$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8600 $as_echo_n "(cached) " >&6
bec39cab 8601else
81ecdfbb 8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8603/* end confdefs.h. */
81ecdfbb
RW
8604#include <sys/types.h>
8605#include <$ac_hdr>
8606
a9322a30
TT
8607int
8608main ()
8609{
81ecdfbb
RW
8610if ((DIR *) 0)
8611return 0;
a9322a30
TT
8612 ;
8613 return 0;
8614}
bec39cab 8615_ACEOF
81ecdfbb
RW
8616if ac_fn_c_try_compile "$LINENO"; then :
8617 eval "$as_ac_Header=yes"
bec39cab 8618else
81ecdfbb 8619 eval "$as_ac_Header=no"
bec39cab 8620fi
81ecdfbb 8621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8622fi
81ecdfbb
RW
8623eval ac_res=\$$as_ac_Header
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8625$as_echo "$ac_res" >&6; }
8626eval as_val=\$$as_ac_Header
8627 if test "x$as_val" = x""yes; then :
8628 cat >>confdefs.h <<_ACEOF
8629#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8630_ACEOF
bec39cab 8631
81ecdfbb
RW
8632ac_header_dirent=$ac_hdr; break
8633fi
bec39cab 8634
81ecdfbb
RW
8635done
8636# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8637if test $ac_header_dirent = dirent.h; then
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8639$as_echo_n "checking for library containing opendir... " >&6; }
8640if test "${ac_cv_search_opendir+set}" = set; then :
8641 $as_echo_n "(cached) " >&6
c890192f 8642else
81ecdfbb
RW
8643 ac_func_search_save_LIBS=$LIBS
8644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8645/* end confdefs.h. */
8646
8647/* Override any GCC internal prototype to avoid an error.
8648 Use char because int might match the return type of a GCC
8649 builtin and then its argument prototype would still apply. */
8650#ifdef __cplusplus
8651extern "C"
8652#endif
8653char opendir ();
8654int
8655main ()
8656{
8657return opendir ();
8658 ;
8659 return 0;
8660}
bec39cab 8661_ACEOF
81ecdfbb
RW
8662for ac_lib in '' dir; do
8663 if test -z "$ac_lib"; then
8664 ac_res="none required"
8665 else
8666 ac_res=-l$ac_lib
8667 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8668 fi
8669 if ac_fn_c_try_link "$LINENO"; then :
8670 ac_cv_search_opendir=$ac_res
8671fi
8672rm -f core conftest.err conftest.$ac_objext \
8673 conftest$ac_exeext
8674 if test "${ac_cv_search_opendir+set}" = set; then :
8675 break
8676fi
8677done
8678if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8679
81ecdfbb
RW
8680else
8681 ac_cv_search_opendir=no
8682fi
8683rm conftest.$ac_ext
8684LIBS=$ac_func_search_save_LIBS
8685fi
8686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8687$as_echo "$ac_cv_search_opendir" >&6; }
8688ac_res=$ac_cv_search_opendir
8689if test "$ac_res" != no; then :
8690 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8691
bec39cab 8692fi
81ecdfbb 8693
bec39cab 8694else
81ecdfbb
RW
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8696$as_echo_n "checking for library containing opendir... " >&6; }
8697if test "${ac_cv_search_opendir+set}" = set; then :
8698 $as_echo_n "(cached) " >&6
8699else
8700 ac_func_search_save_LIBS=$LIBS
8701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8702/* end confdefs.h. */
81ecdfbb
RW
8703
8704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
8707#ifdef __cplusplus
8708extern "C"
8709#endif
8710char opendir ();
a9322a30
TT
8711int
8712main ()
8713{
81ecdfbb 8714return opendir ();
a9322a30
TT
8715 ;
8716 return 0;
8717}
bec39cab 8718_ACEOF
81ecdfbb
RW
8719for ac_lib in '' x; do
8720 if test -z "$ac_lib"; then
8721 ac_res="none required"
8722 else
8723 ac_res=-l$ac_lib
8724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8725 fi
8726 if ac_fn_c_try_link "$LINENO"; then :
8727 ac_cv_search_opendir=$ac_res
8728fi
8729rm -f core conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext
8731 if test "${ac_cv_search_opendir+set}" = set; then :
8732 break
8733fi
8734done
8735if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8736
81ecdfbb
RW
8737else
8738 ac_cv_search_opendir=no
bec39cab 8739fi
81ecdfbb
RW
8740rm conftest.$ac_ext
8741LIBS=$ac_func_search_save_LIBS
a9322a30 8742fi
81ecdfbb
RW
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8744$as_echo "$ac_cv_search_opendir" >&6; }
8745ac_res=$ac_cv_search_opendir
8746if test "$ac_res" != no; then :
8747 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8748
81ecdfbb 8749fi
bec39cab 8750
81ecdfbb 8751fi
bec39cab 8752
81ecdfbb
RW
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8754$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8755if test "${ac_cv_header_stat_broken+set}" = set; then :
8756 $as_echo_n "(cached) " >&6
9a156167 8757else
81ecdfbb
RW
8758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8759/* end confdefs.h. */
8760#include <sys/types.h>
8761#include <sys/stat.h>
8762
8763#if defined S_ISBLK && defined S_IFDIR
8764extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8765#endif
8766
8767#if defined S_ISBLK && defined S_IFCHR
8768extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8769#endif
8770
8771#if defined S_ISLNK && defined S_IFREG
8772extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8773#endif
8774
8775#if defined S_ISSOCK && defined S_IFREG
8776extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8777#endif
8778
bec39cab 8779_ACEOF
81ecdfbb
RW
8780if ac_fn_c_try_compile "$LINENO"; then :
8781 ac_cv_header_stat_broken=no
8782else
8783 ac_cv_header_stat_broken=yes
8784fi
8785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8786fi
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8788$as_echo "$ac_cv_header_stat_broken" >&6; }
8789if test $ac_cv_header_stat_broken = yes; then
9a156167 8790
81ecdfbb 8791$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8792
bec39cab 8793fi
81ecdfbb
RW
8794
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8796$as_echo_n "checking for ANSI C header files... " >&6; }
8797if test "${ac_cv_header_stdc+set}" = set; then :
8798 $as_echo_n "(cached) " >&6
bec39cab 8799else
81ecdfbb 8800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8801/* end confdefs.h. */
81ecdfbb
RW
8802#include <stdlib.h>
8803#include <stdarg.h>
8804#include <string.h>
8805#include <float.h>
8806
a9322a30
TT
8807int
8808main ()
8809{
a9322a30
TT
8810
8811 ;
8812 return 0;
8813}
bec39cab 8814_ACEOF
81ecdfbb
RW
8815if ac_fn_c_try_compile "$LINENO"; then :
8816 ac_cv_header_stdc=yes
bec39cab 8817else
81ecdfbb 8818 ac_cv_header_stdc=no
a9322a30 8819fi
81ecdfbb 8820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8821
81ecdfbb
RW
8822if test $ac_cv_header_stdc = yes; then
8823 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825/* end confdefs.h. */
8826#include <string.h>
bec39cab 8827
81ecdfbb
RW
8828_ACEOF
8829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8830 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8831
bec39cab 8832else
81ecdfbb
RW
8833 ac_cv_header_stdc=no
8834fi
8835rm -f conftest*
8836
8837fi
8838
8839if test $ac_cv_header_stdc = yes; then
8840 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8842/* end confdefs.h. */
8843#include <stdlib.h>
8844
bec39cab 8845_ACEOF
81ecdfbb
RW
8846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8847 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8848
81ecdfbb
RW
8849else
8850 ac_cv_header_stdc=no
8851fi
8852rm -f conftest*
bec39cab 8853
bec39cab 8854fi
81ecdfbb
RW
8855
8856if test $ac_cv_header_stdc = yes; then
8857 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8858 if test "$cross_compiling" = yes; then :
8859 :
bec39cab 8860else
81ecdfbb 8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8862/* end confdefs.h. */
81ecdfbb
RW
8863#include <ctype.h>
8864#include <stdlib.h>
8865#if ((' ' & 0x0FF) == 0x020)
8866# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8867# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8868#else
8869# define ISLOWER(c) \
8870 (('a' <= (c) && (c) <= 'i') \
8871 || ('j' <= (c) && (c) <= 'r') \
8872 || ('s' <= (c) && (c) <= 'z'))
8873# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8874#endif
8875
8876#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8877int
8878main ()
8879{
81ecdfbb
RW
8880 int i;
8881 for (i = 0; i < 256; i++)
8882 if (XOR (islower (i), ISLOWER (i))
8883 || toupper (i) != TOUPPER (i))
8884 return 2;
a9322a30
TT
8885 return 0;
8886}
bec39cab 8887_ACEOF
81ecdfbb
RW
8888if ac_fn_c_try_run "$LINENO"; then :
8889
bec39cab 8890else
81ecdfbb
RW
8891 ac_cv_header_stdc=no
8892fi
8893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8894 conftest.$ac_objext conftest.beam conftest.$ac_ext
8895fi
bec39cab 8896
bec39cab 8897fi
a9322a30 8898fi
81ecdfbb
RW
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8900$as_echo "$ac_cv_header_stdc" >&6; }
8901if test $ac_cv_header_stdc = yes; then
bec39cab 8902
81ecdfbb 8903$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8904
81ecdfbb 8905fi
bec39cab 8906
81ecdfbb
RW
8907# elf_hp.h is for HP/UX 64-bit shared library support.
8908# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8909# unconditionally, so what's the point in checking these?
8910for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8775fd2d 8911 thread_db.h signal.h stddef.h \
81ecdfbb
RW
8912 stdlib.h string.h memory.h strings.h sys/fault.h \
8913 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8914 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8915 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8916 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8917 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8918 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8919do :
8920 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8921ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8922eval as_val=\$$as_ac_Header
8923 if test "x$as_val" = x""yes; then :
bec39cab 8924 cat >>confdefs.h <<_ACEOF
81ecdfbb 8925#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8926_ACEOF
c906108c 8927
bec39cab 8928fi
81ecdfbb
RW
8929
8930done
8931
8932for ac_header in link.h
8933do :
8934 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8935# include <sys/types.h>
8936#endif
8937#if HAVE_NLIST_H
8938# include <nlist.h>
a9322a30
TT
8939#endif
8940
81ecdfbb
RW
8941"
8942if test "x$ac_cv_header_link_h" = x""yes; then :
8943 cat >>confdefs.h <<_ACEOF
8944#define HAVE_LINK_H 1
bec39cab 8945_ACEOF
bec39cab 8946
a9322a30 8947fi
bec39cab 8948
81ecdfbb 8949done
c906108c 8950
81ecdfbb
RW
8951for ac_header in sys/proc.h
8952do :
8953 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8954# include <sys/param.h>
8955#endif
c906108c 8956
81ecdfbb
RW
8957"
8958if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8959 cat >>confdefs.h <<_ACEOF
81ecdfbb 8960#define HAVE_SYS_PROC_H 1
bec39cab 8961_ACEOF
5ee754fc 8962
bec39cab 8963fi
81ecdfbb
RW
8964
8965done
8966
8967for ac_header in sys/user.h
8968do :
8969 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8970# include <sys/param.h>
a9322a30
TT
8971#endif
8972
81ecdfbb
RW
8973"
8974if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8975 cat >>confdefs.h <<_ACEOF
8976#define HAVE_SYS_USER_H 1
bec39cab 8977_ACEOF
bec39cab 8978
a9322a30 8979fi
bec39cab 8980
81ecdfbb 8981done
5ee754fc 8982
5ee754fc 8983
81ecdfbb
RW
8984# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8985# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8986# think that we don't have <curses.h> if we're using GCC.
8987case $host_os in
8988 solaris2.[789])
8989 if test "$GCC" = yes; then
8990
8991$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8992
8993 fi ;;
8994esac
8995for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8996do :
8997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8998ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8999eval as_val=\$$as_ac_Header
9000 if test "x$as_val" = x""yes; then :
bec39cab 9001 cat >>confdefs.h <<_ACEOF
81ecdfbb 9002#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9003_ACEOF
5ee754fc
MK
9004
9005fi
9006
81ecdfbb 9007done
bec39cab 9008
81ecdfbb
RW
9009for ac_header in term.h
9010do :
9011 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9012# include <curses.h>
9013#endif
bec39cab 9014
81ecdfbb
RW
9015"
9016if test "x$ac_cv_header_term_h" = x""yes; then :
9017 cat >>confdefs.h <<_ACEOF
9018#define HAVE_TERM_H 1
a8111142 9019_ACEOF
a8111142 9020
a8111142 9021fi
a8111142 9022
81ecdfbb 9023done
a8111142
TT
9024
9025
81ecdfbb
RW
9026# ------------------------- #
9027# Checks for declarations. #
9028# ------------------------- #
a9322a30 9029
81ecdfbb
RW
9030ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9031if test "x$ac_cv_have_decl_free" = x""yes; then :
9032 ac_have_decl=1
bec39cab 9033else
81ecdfbb
RW
9034 ac_have_decl=0
9035fi
9036
9037cat >>confdefs.h <<_ACEOF
9038#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9039_ACEOF
81ecdfbb
RW
9040ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9041if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9042 ac_have_decl=1
9043else
9044 ac_have_decl=0
9045fi
9046
9047cat >>confdefs.h <<_ACEOF
9048#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9049_ACEOF
81ecdfbb
RW
9050ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9051if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9052 ac_have_decl=1
bec39cab 9053else
81ecdfbb
RW
9054 ac_have_decl=0
9055fi
bec39cab 9056
81ecdfbb
RW
9057cat >>confdefs.h <<_ACEOF
9058#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9059_ACEOF
81ecdfbb
RW
9060ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
9061if test "x$ac_cv_have_decl_strerror" = x""yes; then :
9062 ac_have_decl=1
9063else
9064 ac_have_decl=0
9065fi
9066
9067cat >>confdefs.h <<_ACEOF
9068#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 9069_ACEOF
81ecdfbb
RW
9070ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
9071if test "x$ac_cv_have_decl_strstr" = x""yes; then :
9072 ac_have_decl=1
bec39cab 9073else
81ecdfbb
RW
9074 ac_have_decl=0
9075fi
5ee754fc 9076
81ecdfbb
RW
9077cat >>confdefs.h <<_ACEOF
9078#define HAVE_DECL_STRSTR $ac_have_decl
9079_ACEOF
9080ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
9081if test "x$ac_cv_have_decl_getopt" = x""yes; then :
9082 ac_have_decl=1
9083else
9084 ac_have_decl=0
5ee754fc 9085fi
81ecdfbb
RW
9086
9087cat >>confdefs.h <<_ACEOF
9088#define HAVE_DECL_GETOPT $ac_have_decl
9089_ACEOF
9090ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9091if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9092 ac_have_decl=1
9093else
9094 ac_have_decl=0
5ee754fc 9095fi
81ecdfbb
RW
9096
9097cat >>confdefs.h <<_ACEOF
9098#define HAVE_DECL_SNPRINTF $ac_have_decl
9099_ACEOF
9100ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9101if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9102 ac_have_decl=1
9103else
9104 ac_have_decl=0
5ee754fc
MK
9105fi
9106
a9322a30 9107cat >>confdefs.h <<_ACEOF
81ecdfbb 9108#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 9109_ACEOF
5ee754fc 9110
5ee754fc 9111
81ecdfbb
RW
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9113$as_echo_n "checking for LC_MESSAGES... " >&6; }
9114if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9115 $as_echo_n "(cached) " >&6
bec39cab 9116else
81ecdfbb 9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9118/* end confdefs.h. */
81ecdfbb 9119#include <locale.h>
a9322a30
TT
9120int
9121main ()
9122{
81ecdfbb 9123return LC_MESSAGES
a9322a30
TT
9124 ;
9125 return 0;
9126}
bec39cab 9127_ACEOF
81ecdfbb
RW
9128if ac_fn_c_try_link "$LINENO"; then :
9129 am_cv_val_LC_MESSAGES=yes
bec39cab 9130else
81ecdfbb
RW
9131 am_cv_val_LC_MESSAGES=no
9132fi
9133rm -f core conftest.err conftest.$ac_objext \
9134 conftest$ac_exeext conftest.$ac_ext
9135fi
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9137$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9138 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9139
81ecdfbb
RW
9140$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9141
9142 fi
9143
9144
9145# ----------------------- #
9146# Checks for structures. #
9147# ----------------------- #
9148
9149ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9150if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9151
9152cat >>confdefs.h <<_ACEOF
9153#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9154_ACEOF
7eb368b3 9155
81ecdfbb 9156
7eb368b3 9157fi
81ecdfbb
RW
9158ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9159if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9160
a9322a30
TT
9161cat >>confdefs.h <<_ACEOF
9162#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9163_ACEOF
9164
a9322a30 9165
7eb368b3
NR
9166fi
9167
7eb368b3 9168
a9322a30
TT
9169# ------------------ #
9170# Checks for types. #
9171# ------------------ #
7eb368b3 9172
81ecdfbb
RW
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9174$as_echo_n "checking return type of signal handlers... " >&6; }
9175if test "${ac_cv_type_signal+set}" = set; then :
9176 $as_echo_n "(cached) " >&6
bec39cab 9177else
81ecdfbb 9178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9179/* end confdefs.h. */
a9322a30
TT
9180#include <sys/types.h>
9181#include <signal.h>
7cb9022a 9182
a9322a30
TT
9183int
9184main ()
9185{
81ecdfbb 9186return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9187 ;
9188 return 0;
9189}
bec39cab 9190_ACEOF
81ecdfbb
RW
9191if ac_fn_c_try_compile "$LINENO"; then :
9192 ac_cv_type_signal=int
bec39cab 9193else
81ecdfbb 9194 ac_cv_type_signal=void
bec39cab 9195fi
81ecdfbb 9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9197fi
81ecdfbb
RW
9198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9199$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9200
a9322a30
TT
9201cat >>confdefs.h <<_ACEOF
9202#define RETSIGTYPE $ac_cv_type_signal
9203_ACEOF
5ee754fc 9204
bec39cab 9205
81ecdfbb 9206ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9207#include <sys/socket.h>
9208
81ecdfbb
RW
9209"
9210if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9211
a9322a30
TT
9212cat >>confdefs.h <<_ACEOF
9213#define HAVE_SOCKLEN_T 1
9214_ACEOF
9215
9216
9217fi
9218
9219
9220# ------------------------------------- #
9221# Checks for compiler characteristics. #
9222# ------------------------------------- #
9223
81ecdfbb
RW
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9225$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9226if test "${ac_cv_c_const+set}" = set; then :
9227 $as_echo_n "(cached) " >&6
a9322a30 9228else
81ecdfbb 9229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9230/* end confdefs.h. */
a9322a30
TT
9231
9232int
9233main ()
9234{
9235/* FIXME: Include the comments suggested by Paul. */
9236#ifndef __cplusplus
9237 /* Ultrix mips cc rejects this. */
9238 typedef int charset[2];
81ecdfbb 9239 const charset cs;
a9322a30 9240 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9241 char const *const *pcpcc;
9242 char **ppc;
a9322a30
TT
9243 /* NEC SVR4.0.2 mips cc rejects this. */
9244 struct point {int x, y;};
9245 static struct point const zero = {0,0};
9246 /* AIX XL C 1.02.0.0 rejects this.
9247 It does not let you subtract one const X* pointer from another in
9248 an arm of an if-expression whose if-part is not a constant
9249 expression */
9250 const char *g = "string";
81ecdfbb 9251 pcpcc = &g + (g ? g-g : 0);
a9322a30 9252 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9253 ++pcpcc;
9254 ppc = (char**) pcpcc;
9255 pcpcc = (char const *const *) ppc;
a9322a30
TT
9256 { /* SCO 3.2v4 cc rejects this. */
9257 char *t;
9258 char const *s = 0 ? (char *) 0 : (char const *) 0;
9259
9260 *t++ = 0;
81ecdfbb 9261 if (s) return 0;
a9322a30
TT
9262 }
9263 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9264 int x[] = {25, 17};
9265 const int *foo = &x[0];
9266 ++foo;
9267 }
9268 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9269 typedef const int *iptr;
9270 iptr p = 0;
9271 ++p;
9272 }
9273 { /* AIX XL C 1.02.0.0 rejects this saying
9274 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9275 struct s { int j; const int *ap[3]; };
9276 struct s *b; b->j = 5;
9277 }
9278 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9279 const int foo = 10;
81ecdfbb 9280 if (!foo) return 0;
a9322a30 9281 }
81ecdfbb 9282 return !cs[0] && !zero.x;
a9322a30
TT
9283#endif
9284
9285 ;
9286 return 0;
9287}
bec39cab 9288_ACEOF
81ecdfbb 9289if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9290 ac_cv_c_const=yes
5ee754fc 9291else
81ecdfbb 9292 ac_cv_c_const=no
5ee754fc 9293fi
81ecdfbb 9294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9295fi
81ecdfbb
RW
9296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9297$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9298if test $ac_cv_c_const = no; then
bec39cab 9299
81ecdfbb 9300$as_echo "#define const /**/" >>confdefs.h
bec39cab 9301
5ee754fc 9302fi
bec39cab 9303
81ecdfbb
RW
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9305$as_echo_n "checking for inline... " >&6; }
9306if test "${ac_cv_c_inline+set}" = set; then :
9307 $as_echo_n "(cached) " >&6
bec39cab 9308else
a9322a30
TT
9309 ac_cv_c_inline=no
9310for ac_kw in inline __inline__ __inline; do
81ecdfbb 9311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9312/* end confdefs.h. */
a9322a30
TT
9313#ifndef __cplusplus
9314typedef int foo_t;
9315static $ac_kw foo_t static_foo () {return 0; }
9316$ac_kw foo_t foo () {return 0; }
9317#endif
9318
bec39cab 9319_ACEOF
81ecdfbb
RW
9320if ac_fn_c_try_compile "$LINENO"; then :
9321 ac_cv_c_inline=$ac_kw
bec39cab 9322fi
81ecdfbb
RW
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9324 test "$ac_cv_c_inline" != no && break
a9322a30 9325done
bec39cab 9326
5ee754fc 9327fi
81ecdfbb
RW
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9329$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9330
a9322a30
TT
9331case $ac_cv_c_inline in
9332 inline | yes) ;;
9333 *)
9334 case $ac_cv_c_inline in
9335 no) ac_val=;;
9336 *) ac_val=$ac_cv_c_inline;;
9337 esac
9338 cat >>confdefs.h <<_ACEOF
9339#ifndef __cplusplus
9340#define inline $ac_val
9341#endif
9342_ACEOF
bec39cab
AC
9343 ;;
9344esac
bec39cab 9345
81ecdfbb
RW
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9347$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9348if test "${ac_cv_c_bigendian+set}" = set; then :
9349 $as_echo_n "(cached) " >&6
bec39cab 9350else
81ecdfbb
RW
9351 ac_cv_c_bigendian=unknown
9352 # See if we're dealing with a universal compiler.
9353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9354/* end confdefs.h. */
9355#ifndef __APPLE_CC__
9356 not a universal capable compiler
9357 #endif
9358 typedef int dummy;
9359
9360_ACEOF
9361if ac_fn_c_try_compile "$LINENO"; then :
9362
9363 # Check for potential -arch flags. It is not universal unless
9364 # there are at least two -arch flags with different values.
9365 ac_arch=
9366 ac_prev=
9367 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9368 if test -n "$ac_prev"; then
9369 case $ac_word in
9370 i?86 | x86_64 | ppc | ppc64)
9371 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9372 ac_arch=$ac_word
9373 else
9374 ac_cv_c_bigendian=universal
9375 break
9376 fi
9377 ;;
9378 esac
9379 ac_prev=
9380 elif test "x$ac_word" = "x-arch"; then
9381 ac_prev=arch
9382 fi
9383 done
9384fi
9385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9386 if test $ac_cv_c_bigendian = unknown; then
9387 # See if sys/param.h defines the BYTE_ORDER macro.
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9389/* end confdefs.h. */
a9322a30 9390#include <sys/types.h>
81ecdfbb 9391 #include <sys/param.h>
a9322a30
TT
9392
9393int
9394main ()
9395{
81ecdfbb
RW
9396#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9397 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9398 && LITTLE_ENDIAN)
9399 bogus endian macros
9400 #endif
a9322a30
TT
9401
9402 ;
9403 return 0;
9404}
bec39cab 9405_ACEOF
81ecdfbb 9406if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9407 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9409/* end confdefs.h. */
a9322a30 9410#include <sys/types.h>
81ecdfbb 9411 #include <sys/param.h>
a9322a30
TT
9412
9413int
9414main ()
9415{
9416#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9417 not big endian
9418 #endif
a9322a30
TT
9419
9420 ;
9421 return 0;
9422}
bec39cab 9423_ACEOF
81ecdfbb 9424if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9425 ac_cv_c_bigendian=yes
5ee754fc 9426else
81ecdfbb 9427 ac_cv_c_bigendian=no
5ee754fc 9428fi
81ecdfbb
RW
9429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9430fi
9431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9432 fi
9433 if test $ac_cv_c_bigendian = unknown; then
9434 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9436/* end confdefs.h. */
9437#include <limits.h>
bec39cab 9438
81ecdfbb
RW
9439int
9440main ()
9441{
9442#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9443 bogus endian macros
9444 #endif
9445
9446 ;
9447 return 0;
9448}
7eb368b3 9449_ACEOF
81ecdfbb
RW
9450if ac_fn_c_try_compile "$LINENO"; then :
9451 # It does; now see whether it defined to _BIG_ENDIAN or not.
9452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9453/* end confdefs.h. */
81ecdfbb
RW
9454#include <limits.h>
9455
7eb368b3
NR
9456int
9457main ()
9458{
81ecdfbb
RW
9459#ifndef _BIG_ENDIAN
9460 not big endian
9461 #endif
9462
7eb368b3
NR
9463 ;
9464 return 0;
9465}
9466_ACEOF
81ecdfbb 9467if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9468 ac_cv_c_bigendian=yes
81ecdfbb
RW
9469else
9470 ac_cv_c_bigendian=no
a9322a30 9471fi
81ecdfbb 9472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9473fi
81ecdfbb
RW
9474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9475 fi
9476 if test $ac_cv_c_bigendian = unknown; then
9477 # Compile a test program.
9478 if test "$cross_compiling" = yes; then :
9479 # Try to guess by grepping values from an object file.
9480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481/* end confdefs.h. */
9482short int ascii_mm[] =
9483 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9484 short int ascii_ii[] =
9485 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9486 int use_ascii (int i) {
9487 return ascii_mm[i] + ascii_ii[i];
9488 }
9489 short int ebcdic_ii[] =
9490 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9491 short int ebcdic_mm[] =
9492 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9493 int use_ebcdic (int i) {
9494 return ebcdic_mm[i] + ebcdic_ii[i];
9495 }
9496 extern int foo;
7eb368b3 9497
81ecdfbb
RW
9498int
9499main ()
9500{
9501return use_ascii (foo) == use_ebcdic (foo);
9502 ;
9503 return 0;
9504}
9505_ACEOF
9506if ac_fn_c_try_compile "$LINENO"; then :
9507 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9508 ac_cv_c_bigendian=yes
9509 fi
9510 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9511 if test "$ac_cv_c_bigendian" = unknown; then
9512 ac_cv_c_bigendian=no
9513 else
9514 # finding both strings is unlikely to happen, but who knows?
9515 ac_cv_c_bigendian=unknown
9516 fi
9517 fi
7eb368b3 9518fi
81ecdfbb 9519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9520else
81ecdfbb 9521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9522/* end confdefs.h. */
81ecdfbb 9523$ac_includes_default
d3ea6809
MM
9524int
9525main ()
9526{
81ecdfbb
RW
9527
9528 /* Are we little or big endian? From Harbison&Steele. */
9529 union
9530 {
9531 long int l;
9532 char c[sizeof (long int)];
9533 } u;
9534 u.l = 1;
9535 return u.c[sizeof (long int) - 1] == 1;
9536
9537 ;
9538 return 0;
d3ea6809
MM
9539}
9540_ACEOF
81ecdfbb 9541if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9542 ac_cv_c_bigendian=no
d3ea6809 9543else
81ecdfbb 9544 ac_cv_c_bigendian=yes
d3ea6809 9545fi
81ecdfbb
RW
9546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9547 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9548fi
a9322a30 9549
81ecdfbb
RW
9550 fi
9551fi
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9553$as_echo "$ac_cv_c_bigendian" >&6; }
9554 case $ac_cv_c_bigendian in #(
9555 yes)
9556 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9557;; #(
9558 no)
9559 ;; #(
9560 universal)
9561
9562$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9563
9564 ;; #(
9565 *)
9566 as_fn_error "unknown endianness
9567 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9568 esac
d3ea6809
MM
9569
9570
a9322a30
TT
9571# ------------------------------ #
9572# Checks for library functions. #
9573# ------------------------------ #
d3ea6809 9574
a9322a30
TT
9575# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9576# for constant arguments. Useless!
81ecdfbb
RW
9577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9578$as_echo_n "checking for working alloca.h... " >&6; }
9579if test "${ac_cv_working_alloca_h+set}" = set; then :
9580 $as_echo_n "(cached) " >&6
d3ea6809 9581else
81ecdfbb 9582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9583/* end confdefs.h. */
a9322a30 9584#include <alloca.h>
bec39cab
AC
9585int
9586main ()
9587{
a9322a30 9588char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9589 if (p) return 0;
bec39cab
AC
9590 ;
9591 return 0;
9592}
9593_ACEOF
81ecdfbb 9594if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9595 ac_cv_working_alloca_h=yes
bec39cab 9596else
81ecdfbb 9597 ac_cv_working_alloca_h=no
bec39cab 9598fi
81ecdfbb
RW
9599rm -f core conftest.err conftest.$ac_objext \
9600 conftest$ac_exeext conftest.$ac_ext
bec39cab 9601fi
81ecdfbb
RW
9602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9603$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9604if test $ac_cv_working_alloca_h = yes; then
9605
81ecdfbb 9606$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9607
c906108c 9608fi
bec39cab 9609
81ecdfbb
RW
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9611$as_echo_n "checking for alloca... " >&6; }
9612if test "${ac_cv_func_alloca_works+set}" = set; then :
9613 $as_echo_n "(cached) " >&6
bec39cab 9614else
81ecdfbb 9615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9616/* end confdefs.h. */
a9322a30
TT
9617#ifdef __GNUC__
9618# define alloca __builtin_alloca
b4e70030 9619#else
a9322a30
TT
9620# ifdef _MSC_VER
9621# include <malloc.h>
9622# define alloca _alloca
9623# else
81ecdfbb 9624# ifdef HAVE_ALLOCA_H
a9322a30
TT
9625# include <alloca.h>
9626# else
9627# ifdef _AIX
9628 #pragma alloca
9629# else
9630# ifndef alloca /* predefined by HP cc +Olibcalls */
9631char *alloca ();
9632# endif
9633# endif
9634# endif
9635# endif
c906108c 9636#endif
97bf5e38 9637
bec39cab
AC
9638int
9639main ()
9640{
a9322a30 9641char *p = (char *) alloca (1);
81ecdfbb 9642 if (p) return 0;
bec39cab
AC
9643 ;
9644 return 0;
9645}
9646_ACEOF
81ecdfbb 9647if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9648 ac_cv_func_alloca_works=yes
bec39cab 9649else
81ecdfbb 9650 ac_cv_func_alloca_works=no
bec39cab 9651fi
81ecdfbb
RW
9652rm -f core conftest.err conftest.$ac_objext \
9653 conftest$ac_exeext conftest.$ac_ext
bec39cab 9654fi
81ecdfbb
RW
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9656$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9657
9658if test $ac_cv_func_alloca_works = yes; then
9659
81ecdfbb 9660$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9661
a9322a30
TT
9662else
9663 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9664# that cause trouble. Some versions do not even contain alloca or
9665# contain a buggy version. If you still want to use their alloca,
9666# use ar to extract alloca.o from them instead of compiling alloca.c.
9667
81ecdfbb 9668ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9669
81ecdfbb 9670$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9671
bec39cab 9672
81ecdfbb
RW
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9674$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9675if test "${ac_cv_os_cray+set}" = set; then :
9676 $as_echo_n "(cached) " >&6
a9322a30 9677else
81ecdfbb 9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9679/* end confdefs.h. */
81ecdfbb 9680#if defined CRAY && ! defined CRAY2
a9322a30
TT
9681webecray
9682#else
9683wenotbecray
9684#endif
9685
9686_ACEOF
9687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9688 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9689 ac_cv_os_cray=yes
9690else
81ecdfbb 9691 ac_cv_os_cray=no
bec39cab 9692fi
81ecdfbb
RW
9693rm -f conftest*
9694
bec39cab 9695fi
81ecdfbb
RW
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9697$as_echo "$ac_cv_os_cray" >&6; }
9698if test $ac_cv_os_cray = yes; then
9699 for ac_func in _getb67 GETB67 getb67; do
9700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9701ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9702eval as_val=\$$as_ac_var
9703 if test "x$as_val" = x""yes; then :
a9322a30
TT
9704
9705cat >>confdefs.h <<_ACEOF
9706#define CRAY_STACKSEG_END $ac_func
bec39cab 9707_ACEOF
c906108c 9708
a9322a30 9709 break
c906108c
SS
9710fi
9711
a9322a30
TT
9712 done
9713fi
bec39cab 9714
81ecdfbb
RW
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9716$as_echo_n "checking stack direction for C alloca... " >&6; }
9717if test "${ac_cv_c_stack_direction+set}" = set; then :
9718 $as_echo_n "(cached) " >&6
a9322a30 9719else
81ecdfbb 9720 if test "$cross_compiling" = yes; then :
a9322a30 9721 ac_cv_c_stack_direction=0
bec39cab 9722else
81ecdfbb 9723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9724/* end confdefs.h. */
81ecdfbb 9725$ac_includes_default
a9322a30
TT
9726int
9727find_stack_direction ()
b4e70030 9728{
a9322a30
TT
9729 static char *addr = 0;
9730 auto char dummy;
9731 if (addr == 0)
9732 {
9733 addr = &dummy;
9734 return find_stack_direction ();
9735 }
9736 else
9737 return (&dummy > addr) ? 1 : -1;
b4e70030 9738}
b757528f 9739
bec39cab
AC
9740int
9741main ()
9742{
81ecdfbb 9743 return find_stack_direction () < 0;
bec39cab
AC
9744}
9745_ACEOF
81ecdfbb 9746if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9747 ac_cv_c_stack_direction=1
9748else
81ecdfbb 9749 ac_cv_c_stack_direction=-1
a9322a30 9750fi
81ecdfbb
RW
9751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9752 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9753fi
a9322a30 9754
81ecdfbb
RW
9755fi
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9757$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9758cat >>confdefs.h <<_ACEOF
9759#define STACK_DIRECTION $ac_cv_c_stack_direction
9760_ACEOF
9761
9762
9763fi
9764
a9322a30 9765for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9766do :
9767 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9768ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9769eval as_val=\$$as_ac_Header
9770 if test "x$as_val" = x""yes; then :
bec39cab 9771 cat >>confdefs.h <<_ACEOF
81ecdfbb 9772#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9773_ACEOF
b757528f 9774
b757528f 9775fi
bec39cab 9776
a9322a30 9777done
a3828db0 9778
a9322a30 9779for ac_func in getpagesize
81ecdfbb
RW
9780do :
9781 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9782if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9783 cat >>confdefs.h <<_ACEOF
81ecdfbb 9784#define HAVE_GETPAGESIZE 1
bec39cab 9785_ACEOF
bcb3dc3d 9786
bcb3dc3d
MK
9787fi
9788done
9789
81ecdfbb
RW
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9791$as_echo_n "checking for working mmap... " >&6; }
9792if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9793 $as_echo_n "(cached) " >&6
a9322a30 9794else
81ecdfbb 9795 if test "$cross_compiling" = yes; then :
a9322a30 9796 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9797else
81ecdfbb 9798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9799/* end confdefs.h. */
a9322a30
TT
9800$ac_includes_default
9801/* malloc might have been renamed as rpl_malloc. */
9802#undef malloc
bec39cab 9803
a9322a30
TT
9804/* Thanks to Mike Haertel and Jim Avera for this test.
9805 Here is a matrix of mmap possibilities:
9806 mmap private not fixed
9807 mmap private fixed at somewhere currently unmapped
9808 mmap private fixed at somewhere already mapped
9809 mmap shared not fixed
9810 mmap shared fixed at somewhere currently unmapped
9811 mmap shared fixed at somewhere already mapped
9812 For private mappings, we should verify that changes cannot be read()
9813 back from the file, nor mmap's back from the file at a different
9814 address. (There have been systems where private was not correctly
9815 implemented like the infamous i386 svr4.0, and systems where the
9816 VM page cache was not coherent with the file system buffer cache
9817 like early versions of FreeBSD and possibly contemporary NetBSD.)
9818 For shared mappings, we should conversely verify that changes get
9819 propagated back to all the places they're supposed to be.
bec39cab 9820
a9322a30
TT
9821 Grep wants private fixed already mapped.
9822 The main things grep needs to know about mmap are:
9823 * does it exist and is it safe to write into the mmap'd area
9824 * how to use it (BSD variants) */
8b9cf735 9825
a9322a30
TT
9826#include <fcntl.h>
9827#include <sys/mman.h>
8b9cf735 9828
81ecdfbb 9829#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9830char *malloc ();
a3828db0
MK
9831#endif
9832
a9322a30 9833/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9834#ifndef HAVE_GETPAGESIZE
a9322a30 9835/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9836# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9837# define HAVE_SYS_PARAM_H 1
9838# endif
9839
9840# ifdef _SC_PAGESIZE
9841# define getpagesize() sysconf(_SC_PAGESIZE)
9842# else /* no _SC_PAGESIZE */
81ecdfbb 9843# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9844# include <sys/param.h>
9845# ifdef EXEC_PAGESIZE
9846# define getpagesize() EXEC_PAGESIZE
9847# else /* no EXEC_PAGESIZE */
9848# ifdef NBPG
9849# define getpagesize() NBPG * CLSIZE
9850# ifndef CLSIZE
9851# define CLSIZE 1
9852# endif /* no CLSIZE */
9853# else /* no NBPG */
9854# ifdef NBPC
9855# define getpagesize() NBPC
9856# else /* no NBPC */
9857# ifdef PAGESIZE
9858# define getpagesize() PAGESIZE
9859# endif /* PAGESIZE */
9860# endif /* no NBPC */
9861# endif /* no NBPG */
9862# endif /* no EXEC_PAGESIZE */
9863# else /* no HAVE_SYS_PARAM_H */
9864# define getpagesize() 8192 /* punt totally */
9865# endif /* no HAVE_SYS_PARAM_H */
9866# endif /* no _SC_PAGESIZE */
9867
9868#endif /* no HAVE_GETPAGESIZE */
9869
bec39cab
AC
9870int
9871main ()
9872{
a9322a30
TT
9873 char *data, *data2, *data3;
9874 int i, pagesize;
9875 int fd;
9876
9877 pagesize = getpagesize ();
9878
9879 /* First, make a file with some known garbage in it. */
9880 data = (char *) malloc (pagesize);
9881 if (!data)
81ecdfbb 9882 return 1;
a9322a30
TT
9883 for (i = 0; i < pagesize; ++i)
9884 *(data + i) = rand ();
9885 umask (0);
9886 fd = creat ("conftest.mmap", 0600);
9887 if (fd < 0)
81ecdfbb 9888 return 1;
a9322a30 9889 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9890 return 1;
a9322a30
TT
9891 close (fd);
9892
9893 /* Next, try to mmap the file at a fixed address which already has
9894 something else allocated at it. If we can, also make sure that
9895 we see the same garbage. */
9896 fd = open ("conftest.mmap", O_RDWR);
9897 if (fd < 0)
81ecdfbb 9898 return 1;
a9322a30
TT
9899 data2 = (char *) malloc (2 * pagesize);
9900 if (!data2)
81ecdfbb
RW
9901 return 1;
9902 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9903 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9904 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9905 return 1;
a9322a30
TT
9906 for (i = 0; i < pagesize; ++i)
9907 if (*(data + i) != *(data2 + i))
81ecdfbb 9908 return 1;
a9322a30
TT
9909
9910 /* Finally, make sure that changes to the mapped area do not
9911 percolate back to the file as seen by read(). (This is a bug on
9912 some variants of i386 svr4.0.) */
9913 for (i = 0; i < pagesize; ++i)
9914 *(data2 + i) = *(data2 + i) + 1;
9915 data3 = (char *) malloc (pagesize);
9916 if (!data3)
81ecdfbb 9917 return 1;
a9322a30 9918 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9919 return 1;
a9322a30
TT
9920 for (i = 0; i < pagesize; ++i)
9921 if (*(data + i) != *(data3 + i))
81ecdfbb 9922 return 1;
a9322a30 9923 close (fd);
81ecdfbb 9924 return 0;
bec39cab
AC
9925}
9926_ACEOF
81ecdfbb 9927if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9928 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9929else
81ecdfbb 9930 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9931fi
81ecdfbb
RW
9932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9933 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9934fi
81ecdfbb 9935
a9322a30 9936fi
81ecdfbb
RW
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9938$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9939if test $ac_cv_func_mmap_fixed_mapped = yes; then
9940
81ecdfbb 9941$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9942
086ec9eb 9943fi
a9322a30 9944rm -f conftest.mmap
a3828db0 9945
81ecdfbb
RW
9946ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9947if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9948
a9322a30
TT
9949else
9950
9951cat >>confdefs.h <<_ACEOF
9952#define pid_t int
bec39cab 9953_ACEOF
086ec9eb
MK
9954
9955fi
9956
81ecdfbb
RW
9957for ac_header in vfork.h
9958do :
9959 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9960if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9961 cat >>confdefs.h <<_ACEOF
81ecdfbb 9962#define HAVE_VFORK_H 1
bec39cab 9963_ACEOF
c906108c
SS
9964
9965fi
a9322a30 9966
a3828db0 9967done
c906108c 9968
a9322a30 9969for ac_func in fork vfork
81ecdfbb
RW
9970do :
9971 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9972ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9973eval as_val=\$$as_ac_var
9974 if test "x$as_val" = x""yes; then :
a3828db0 9975 cat >>confdefs.h <<_ACEOF
81ecdfbb 9976#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9977_ACEOF
b83266a0 9978
97bf5e38 9979fi
a3828db0 9980done
b83266a0 9981
a9322a30 9982if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9984$as_echo_n "checking for working fork... " >&6; }
9985if test "${ac_cv_func_fork_works+set}" = set; then :
9986 $as_echo_n "(cached) " >&6
a9322a30 9987else
81ecdfbb 9988 if test "$cross_compiling" = yes; then :
a9322a30
TT
9989 ac_cv_func_fork_works=cross
9990else
81ecdfbb
RW
9991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9992/* end confdefs.h. */
9993$ac_includes_default
9994int
9995main ()
9996{
9997
9998 /* By Ruediger Kuhlmann. */
9999 return fork () < 0;
10000
10001 ;
10002 return 0;
10003}
a9322a30 10004_ACEOF
81ecdfbb 10005if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10006 ac_cv_func_fork_works=yes
10007else
81ecdfbb 10008 ac_cv_func_fork_works=no
a9322a30 10009fi
81ecdfbb
RW
10010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10011 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10012fi
81ecdfbb 10013
a9322a30 10014fi
81ecdfbb
RW
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10016$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10017
10018else
10019 ac_cv_func_fork_works=$ac_cv_func_fork
10020fi
10021if test "x$ac_cv_func_fork_works" = xcross; then
10022 case $host in
10023 *-*-amigaos* | *-*-msdosdjgpp*)
10024 # Override, as these systems have only a dummy fork() stub
10025 ac_cv_func_fork_works=no
10026 ;;
10027 *)
10028 ac_cv_func_fork_works=yes
10029 ;;
10030 esac
81ecdfbb
RW
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10032$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10033fi
10034ac_cv_func_vfork_works=$ac_cv_func_vfork
10035if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10037$as_echo_n "checking for working vfork... " >&6; }
10038if test "${ac_cv_func_vfork_works+set}" = set; then :
10039 $as_echo_n "(cached) " >&6
a9322a30 10040else
81ecdfbb 10041 if test "$cross_compiling" = yes; then :
a9322a30
TT
10042 ac_cv_func_vfork_works=cross
10043else
81ecdfbb 10044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10045/* end confdefs.h. */
10046/* Thanks to Paul Eggert for this test. */
81ecdfbb 10047$ac_includes_default
a9322a30 10048#include <sys/wait.h>
81ecdfbb 10049#ifdef HAVE_VFORK_H
a9322a30
TT
10050# include <vfork.h>
10051#endif
10052/* On some sparc systems, changes by the child to local and incoming
10053 argument registers are propagated back to the parent. The compiler
10054 is told about this with #include <vfork.h>, but some compilers
10055 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10056 static variable whose address is put into a register that is
10057 clobbered by the vfork. */
10058static void
10059#ifdef __cplusplus
10060sparc_address_test (int arg)
10061# else
10062sparc_address_test (arg) int arg;
10063#endif
10064{
10065 static pid_t child;
10066 if (!child) {
10067 child = vfork ();
10068 if (child < 0) {
10069 perror ("vfork");
10070 _exit(2);
10071 }
10072 if (!child) {
10073 arg = getpid();
10074 write(-1, "", 0);
10075 _exit (arg);
10076 }
10077 }
10078}
10079
10080int
10081main ()
10082{
10083 pid_t parent = getpid ();
10084 pid_t child;
10085
10086 sparc_address_test (0);
10087
10088 child = vfork ();
10089
10090 if (child == 0) {
10091 /* Here is another test for sparc vfork register problems. This
10092 test uses lots of local variables, at least as many local
10093 variables as main has allocated so far including compiler
10094 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10095 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10096 reuse the register of parent for one of the local variables,
10097 since it will think that parent can't possibly be used any more
10098 in this routine. Assigning to the local variable will thus
10099 munge parent in the parent process. */
10100 pid_t
10101 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10102 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10103 /* Convince the compiler that p..p7 are live; otherwise, it might
10104 use the same hardware register for all 8 local variables. */
10105 if (p != p1 || p != p2 || p != p3 || p != p4
10106 || p != p5 || p != p6 || p != p7)
10107 _exit(1);
10108
10109 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10110 from child file descriptors. If the child closes a descriptor
10111 before it execs or exits, this munges the parent's descriptor
10112 as well. Test for this by closing stdout in the child. */
10113 _exit(close(fileno(stdout)) != 0);
10114 } else {
10115 int status;
10116 struct stat st;
10117
10118 while (wait(&status) != child)
10119 ;
81ecdfbb 10120 return (
a9322a30
TT
10121 /* Was there some problem with vforking? */
10122 child < 0
10123
10124 /* Did the child fail? (This shouldn't happen.) */
10125 || status
10126
10127 /* Did the vfork/compiler bug occur? */
10128 || parent != getpid()
10129
10130 /* Did the file descriptor bug occur? */
10131 || fstat(fileno(stdout), &st) != 0
10132 );
10133 }
10134}
10135_ACEOF
81ecdfbb 10136if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10137 ac_cv_func_vfork_works=yes
10138else
81ecdfbb 10139 ac_cv_func_vfork_works=no
a9322a30 10140fi
81ecdfbb
RW
10141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10142 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10143fi
81ecdfbb 10144
a9322a30 10145fi
81ecdfbb
RW
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10147$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10148
10149fi;
10150if test "x$ac_cv_func_fork_works" = xcross; then
10151 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10153$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10154fi
10155
10156if test "x$ac_cv_func_vfork_works" = xyes; then
10157
81ecdfbb 10158$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10159
10160else
10161
81ecdfbb 10162$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10163
10164fi
10165if test "x$ac_cv_func_fork_works" = xyes; then
10166
81ecdfbb 10167$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10168
10169fi
10170
7313baad 10171for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10172 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10173 sbrk setpgid setpgrp setsid \
a9322a30 10174 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10175 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10176 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10177do :
10178 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10179ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10180eval as_val=\$$as_ac_var
10181 if test "x$as_val" = x""yes; then :
6c7a06a3 10182 cat >>confdefs.h <<_ACEOF
81ecdfbb 10183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10184_ACEOF
10185
10186fi
10187done
10188
10189
81ecdfbb
RW
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10191$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10192if test "${am_cv_langinfo_codeset+set}" = set; then :
10193 $as_echo_n "(cached) " >&6
6c7a06a3 10194else
81ecdfbb 10195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10196/* end confdefs.h. */
10197#include <langinfo.h>
10198int
10199main ()
10200{
10201char* cs = nl_langinfo(CODESET);
bec39cab
AC
10202 ;
10203 return 0;
10204}
10205_ACEOF
81ecdfbb 10206if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10207 am_cv_langinfo_codeset=yes
a4db0f07 10208else
81ecdfbb 10209 am_cv_langinfo_codeset=no
a4db0f07 10210fi
81ecdfbb
RW
10211rm -f core conftest.err conftest.$ac_objext \
10212 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10213
a4db0f07 10214fi
81ecdfbb
RW
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10216$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10217 if test $am_cv_langinfo_codeset = yes; then
10218
81ecdfbb 10219$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10220
6c7a06a3 10221 fi
c906108c 10222
06825bd1 10223
a3828db0
MK
10224# Check the return and argument types of ptrace. No canned test for
10225# this, so roll our own.
10226gdb_ptrace_headers='
10227#if HAVE_SYS_TYPES_H
10228# include <sys/types.h>
10229#endif
10230#if HAVE_SYS_PTRACE_H
10231# include <sys/ptrace.h>
10232#endif
10233#if HAVE_UNISTD_H
10234# include <unistd.h>
10235#endif
10236'
10237# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10238ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10239"
10240if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10241 ac_have_decl=1
06825bd1 10242else
81ecdfbb 10243 ac_have_decl=0
06825bd1 10244fi
06825bd1 10245
a3828db0 10246cat >>confdefs.h <<_ACEOF
81ecdfbb 10247#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10248_ACEOF
81ecdfbb 10249if test $ac_have_decl = 1; then :
bec39cab 10250
a3828db0 10251else
a3828db0
MK
10252
10253 : ${gdb_cv_func_ptrace_ret='int'}
10254 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10255
06825bd1
MK
10256fi
10257
064ef605
DJ
10258# Check return type. Varargs (used on GNU/Linux) conflict with the
10259# empty argument list, so check for that explicitly.
81ecdfbb
RW
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10261$as_echo_n "checking return type of ptrace... " >&6; }
10262if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10263 $as_echo_n "(cached) " >&6
bec39cab 10264else
81ecdfbb 10265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10266/* end confdefs.h. */
a3828db0 10267$gdb_ptrace_headers
bec39cab
AC
10268int
10269main ()
10270{
064ef605
DJ
10271extern long ptrace (enum __ptrace_request, ...);
10272 ;
10273 return 0;
10274}
10275_ACEOF
81ecdfbb 10276if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10277 gdb_cv_func_ptrace_ret='long'
10278else
81ecdfbb 10279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10280/* end confdefs.h. */
10281$gdb_ptrace_headers
10282int
10283main ()
10284{
a3828db0 10285extern int ptrace ();
bec39cab
AC
10286 ;
10287 return 0;
10288}
10289_ACEOF
81ecdfbb 10290if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10291 gdb_cv_func_ptrace_ret='int'
70f9f479 10292else
81ecdfbb 10293 gdb_cv_func_ptrace_ret='long'
70f9f479 10294fi
81ecdfbb 10295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10296fi
81ecdfbb 10297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10298fi
81ecdfbb
RW
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10300$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10301
a3828db0
MK
10302cat >>confdefs.h <<_ACEOF
10303#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10304_ACEOF
70f9f479 10305
a3828db0 10306# Check argument types.
81ecdfbb
RW
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10308$as_echo_n "checking types of arguments for ptrace... " >&6; }
10309if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10310 $as_echo_n "(cached) " >&6
bec39cab 10311else
a3828db0 10312
81ecdfbb 10313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10314/* end confdefs.h. */
10315$gdb_ptrace_headers
10316int
10317main ()
10318{
10319extern long ptrace (enum __ptrace_request, ...);
10320 ;
10321 return 0;
10322}
10323_ACEOF
81ecdfbb 10324if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10325 gdb_cv_func_ptrace_args='int,int,long,long'
10326else
064ef605 10327
a3828db0
MK
10328for gdb_arg1 in 'int' 'long'; do
10329 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10330 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10331 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10333/* end confdefs.h. */
a3828db0 10334$gdb_ptrace_headers
bec39cab
AC
10335int
10336main ()
10337{
a3828db0
MK
10338
10339extern $gdb_cv_func_ptrace_ret
10340 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10341
bec39cab
AC
10342 ;
10343 return 0;
10344}
10345_ACEOF
81ecdfbb 10346if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10347 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10348 break 4;
5c7f2947 10349fi
81ecdfbb 10350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10351 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10353/* end confdefs.h. */
a3828db0 10354$gdb_ptrace_headers
bec39cab
AC
10355int
10356main ()
10357{
a3828db0
MK
10358
10359extern $gdb_cv_func_ptrace_ret
10360 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10361
bec39cab
AC
10362 ;
10363 return 0;
10364}
10365_ACEOF
81ecdfbb 10366if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10367
10368gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10369 break 5;
78434e59 10370fi
81ecdfbb 10371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10372 done
10373 done
10374 done
10375 done
10376done
10377# Provide a safe default value.
10378: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10379
064ef605 10380fi
81ecdfbb 10381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10382fi
81ecdfbb
RW
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10384$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10385ac_save_IFS=$IFS; IFS=','
10386set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10387IFS=$ac_save_IFS
10388shift
bec39cab 10389
a3828db0
MK
10390cat >>confdefs.h <<_ACEOF
10391#define PTRACE_TYPE_ARG3 $3
10392_ACEOF
10393
10394if test -n "$5"; then
10395
10396cat >>confdefs.h <<_ACEOF
10397#define PTRACE_TYPE_ARG5 $5
bec39cab 10398_ACEOF
78434e59
MK
10399
10400fi
10401
a3828db0 10402if test "$cross_compiling" = no; then
81ecdfbb
RW
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10404$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10405if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10406 $as_echo_n "(cached) " >&6
a3828db0 10407else
81ecdfbb
RW
10408 if test "$cross_compiling" = yes; then :
10409 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10410else
81ecdfbb 10411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10412/* end confdefs.h. */
81ecdfbb 10413$ac_includes_default
bec39cab
AC
10414int
10415main ()
10416{
a3828db0
MK
10417/* If this system has a BSD-style setpgrp which takes arguments,
10418 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10419 exit successfully. */
81ecdfbb 10420 return setpgrp (1,1) != -1;
bec39cab
AC
10421 ;
10422 return 0;
10423}
10424_ACEOF
81ecdfbb 10425if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10426 ac_cv_func_setpgrp_void=no
c906108c 10427else
81ecdfbb 10428 ac_cv_func_setpgrp_void=yes
c906108c 10429fi
81ecdfbb
RW
10430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10431 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10432fi
81ecdfbb 10433
a3828db0 10434fi
81ecdfbb
RW
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10436$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10437if test $ac_cv_func_setpgrp_void = yes; then
10438
81ecdfbb 10439$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10440
10441fi
a3828db0
MK
10442
10443else
81ecdfbb
RW
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10445$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10446if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10447 $as_echo_n "(cached) " >&6
97bf5e38 10448else
81ecdfbb 10449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10450/* end confdefs.h. */
a3828db0
MK
10451
10452#include <unistd.h>
10453
bec39cab
AC
10454int
10455main ()
10456{
a3828db0
MK
10457
10458 if (setpgrp(1,1) == -1)
10459 exit (0);
10460 else
10461 exit (1);
10462
bec39cab
AC
10463 ;
10464 return 0;
10465}
10466_ACEOF
81ecdfbb 10467if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10468 ac_cv_func_setpgrp_void=no
c906108c 10469else
81ecdfbb 10470 ac_cv_func_setpgrp_void=yes
c906108c 10471fi
81ecdfbb 10472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10473fi
81ecdfbb
RW
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10475$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10476if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10477 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10478
a3828db0 10479fi
c906108c
SS
10480fi
10481
a3828db0
MK
10482# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10483# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10485$as_echo_n "checking for sigsetjmp... " >&6; }
10486if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10487 $as_echo_n "(cached) " >&6
bec39cab 10488else
81ecdfbb 10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10490/* end confdefs.h. */
a3828db0
MK
10491
10492#include <setjmp.h>
10493
bec39cab
AC
10494int
10495main ()
10496{
a3828db0 10497sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10498 ;
10499 return 0;
10500}
10501_ACEOF
81ecdfbb 10502if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10503 gdb_cv_func_sigsetjmp=yes
c906108c 10504else
81ecdfbb 10505 gdb_cv_func_sigsetjmp=no
c906108c 10506fi
81ecdfbb 10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10508fi
81ecdfbb
RW
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10510$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10511if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10512
81ecdfbb 10513$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10514
97bf5e38 10515fi
c906108c 10516
a3828db0
MK
10517# Assume we'll default to using the included libiberty regex.
10518gdb_use_included_regex=yes
10519
10520# However, if the system regex is GNU regex, then default to *not*
10521# using the included regex.
81ecdfbb
RW
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10523$as_echo_n "checking for GNU regex... " >&6; }
10524if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10525 $as_echo_n "(cached) " >&6
bec39cab 10526else
81ecdfbb 10527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10528/* end confdefs.h. */
a3828db0 10529#include <gnu-versions.h>
bec39cab
AC
10530int
10531main ()
10532{
81ecdfbb
RW
10533#define REGEX_INTERFACE_VERSION 1
10534#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10535# error "Version mismatch"
10536#endif
5c45e068
MK
10537 ;
10538 return 0;
10539}
10540_ACEOF
81ecdfbb
RW
10541if ac_fn_c_try_compile "$LINENO"; then :
10542 gdb_cv_have_gnu_regex=yes
5c45e068 10543else
81ecdfbb
RW
10544 gdb_cv_have_gnu_regex=no
10545fi
10546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10547fi
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10549$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10550if test $gdb_cv_have_gnu_regex = yes; then
10551 gdb_use_included_regex=no
5c45e068 10552fi
81ecdfbb
RW
10553
10554
10555# Check whether --with-included-regex was given.
10556if test "${with_included_regex+set}" = set; then :
10557 withval=$with_included_regex; gdb_with_regex=$withval
10558else
10559 gdb_with_regex=$gdb_use_included_regex
c906108c 10560fi
81ecdfbb
RW
10561
10562if test "$gdb_with_regex" = yes; then
10563
10564$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10565
c906108c 10566fi
81ecdfbb
RW
10567
10568# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10569ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10570#include <sys/proc.h>
10571
10572"
10573if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10574
5c45e068 10575cat >>confdefs.h <<_ACEOF
a3828db0 10576#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10577_ACEOF
c906108c 10578
5c45e068 10579
97bf5e38 10580fi
c906108c 10581
5c45e068 10582
a3828db0 10583# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10585$as_echo_n "checking for struct lwp... " >&6; }
10586if test "${gdb_cv_struct_lwp+set}" = set; then :
10587 $as_echo_n "(cached) " >&6
bec39cab 10588else
81ecdfbb 10589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10590/* end confdefs.h. */
a3828db0
MK
10591#include <sys/param.h>
10592#include <sys/lwp.h>
bec39cab
AC
10593int
10594main ()
10595{
a3828db0 10596struct lwp l;
bec39cab
AC
10597 ;
10598 return 0;
10599}
10600_ACEOF
81ecdfbb 10601if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10602 gdb_cv_struct_lwp=yes
c906108c 10603else
81ecdfbb 10604 gdb_cv_struct_lwp=no
c906108c 10605fi
81ecdfbb 10606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10607fi
81ecdfbb
RW
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10609$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10610if test $gdb_cv_struct_lwp = yes; then
c906108c 10611
81ecdfbb 10612$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10613
97bf5e38 10614fi
c906108c 10615
a3828db0 10616# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10618$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10619if test "${gdb_cv_struct_reg+set}" = set; then :
10620 $as_echo_n "(cached) " >&6
bec39cab 10621else
81ecdfbb 10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10623/* end confdefs.h. */
a3828db0
MK
10624#include <sys/types.h>
10625#include <machine/reg.h>
bec39cab
AC
10626int
10627main ()
10628{
a3828db0 10629struct reg r;
bec39cab
AC
10630 ;
10631 return 0;
10632}
10633_ACEOF
81ecdfbb 10634if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10635 gdb_cv_struct_reg=yes
27ca5dad 10636else
81ecdfbb 10637 gdb_cv_struct_reg=no
27ca5dad 10638fi
81ecdfbb 10639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10640fi
81ecdfbb
RW
10641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10642$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10643if test $gdb_cv_struct_reg = yes; then
bec39cab 10644
81ecdfbb 10645$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10646
10647fi
97bf5e38 10648
a3828db0
MK
10649# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10650# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10651ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10652"
10653if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10654
10655cat >>confdefs.h <<_ACEOF
a3828db0 10656#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10657_ACEOF
3862412b 10658
5c45e068 10659
97bf5e38 10660fi
81ecdfbb
RW
10661ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10662"
10663if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10664
10665cat >>confdefs.h <<_ACEOF
a3828db0 10666#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10667_ACEOF
3862412b 10668
5c45e068 10669
97bf5e38 10670fi
3862412b 10671
5c45e068 10672
6fea9e18
L
10673# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10674# Older amd64 Linux's don't have the fs_base and gs_base members of
10675# `struct user_regs_struct'.
10676ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10677"
10678if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10679
10680cat >>confdefs.h <<_ACEOF
10681#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10682_ACEOF
10683
10684
10685fi
10686ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10687"
10688if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10689
10690cat >>confdefs.h <<_ACEOF
10691#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10692_ACEOF
10693
10694
10695fi
10696
10697
a3828db0 10698# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10700$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10701if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10702 $as_echo_n "(cached) " >&6
451928c5 10703else
81ecdfbb 10704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10705/* end confdefs.h. */
a3828db0 10706#include <sys/ptrace.h>
bec39cab
AC
10707int
10708main ()
10709{
a3828db0 10710PTRACE_GETREGS;
bec39cab
AC
10711 ;
10712 return 0;
10713}
10714_ACEOF
81ecdfbb 10715if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10716 gdb_cv_have_ptrace_getregs=yes
451928c5 10717else
81ecdfbb 10718 gdb_cv_have_ptrace_getregs=no
451928c5 10719fi
81ecdfbb 10720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10721fi
10722
81ecdfbb
RW
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10724$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10725if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10726
81ecdfbb 10727$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10728
97bf5e38 10729fi
451928c5 10730
a3828db0 10731# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10733$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10734if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10735 $as_echo_n "(cached) " >&6
451928c5 10736else
81ecdfbb 10737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10738/* end confdefs.h. */
a3828db0 10739#include <sys/ptrace.h>
bec39cab
AC
10740int
10741main ()
10742{
a3828db0 10743PTRACE_GETFPXREGS;
bec39cab
AC
10744 ;
10745 return 0;
10746}
10747_ACEOF
81ecdfbb 10748if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10749 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10750else
81ecdfbb 10751 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10752fi
81ecdfbb 10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10754fi
10755
81ecdfbb
RW
10756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10757$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10758if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10759
81ecdfbb 10760$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10761
97bf5e38 10762fi
451928c5 10763
a3828db0 10764# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10766$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10767if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10768 $as_echo_n "(cached) " >&6
3862412b 10769else
81ecdfbb 10770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10771/* end confdefs.h. */
a3828db0
MK
10772#include <sys/types.h>
10773#include <sys/ptrace.h>
bec39cab
AC
10774int
10775main ()
10776{
a3828db0 10777PT_GETDBREGS;
bec39cab
AC
10778 ;
10779 return 0;
10780}
10781_ACEOF
81ecdfbb 10782if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10783 gdb_cv_have_pt_getdbregs=yes
3862412b 10784else
81ecdfbb 10785 gdb_cv_have_pt_getdbregs=no
3862412b 10786fi
81ecdfbb 10787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10788fi
10789
81ecdfbb
RW
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10791$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10792if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10793
81ecdfbb 10794$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10795
97bf5e38 10796fi
3862412b 10797
a3828db0 10798# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10800$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10801if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10802 $as_echo_n "(cached) " >&6
3862412b 10803else
81ecdfbb 10804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10805/* end confdefs.h. */
a3828db0
MK
10806#include <sys/types.h>
10807#include <sys/ptrace.h>
bec39cab
AC
10808int
10809main ()
10810{
a3828db0 10811PT_GETXMMREGS;
bec39cab
AC
10812 ;
10813 return 0;
10814}
10815_ACEOF
81ecdfbb 10816if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10817 gdb_cv_have_pt_getxmmregs=yes
3862412b 10818else
81ecdfbb 10819 gdb_cv_have_pt_getxmmregs=no
3862412b 10820fi
81ecdfbb 10821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10822fi
10823
81ecdfbb
RW
10824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10825$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10826if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10827
81ecdfbb 10828$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10829
97bf5e38 10830fi
3862412b 10831
eb368090 10832# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10833
10834if test "${target}" = "${host}"; then
10835 case "${host}" in
97bf5e38 10836 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10837
81ecdfbb 10838$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10839
10840 ;;
c162e8c9 10841 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10842
81ecdfbb 10843$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10844
10845 ;;
10846 mips-sgi-irix5*)
10847 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10848
81ecdfbb 10849$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10850
10851 ;;
10852 esac
10853fi
10854
10855if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10857$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10858 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10859 $as_echo_n "(cached) " >&6
bec39cab 10860else
81ecdfbb 10861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10862/* end confdefs.h. */
596c9d4b
KB
10863
10864#define _SYSCALL32
d30c5336
JK
10865/* Needed for new procfs interface on sparc-solaris. */
10866#define _STRUCTURED_PROC 1
596c9d4b 10867#include <sys/procfs.h>
bec39cab
AC
10868int
10869main ()
10870{
97bf5e38 10871pstatus_t avar
bec39cab
AC
10872 ;
10873 return 0;
10874}
10875_ACEOF
81ecdfbb 10876if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10877 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10878else
81ecdfbb 10879 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10880
596c9d4b 10881fi
81ecdfbb 10882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10883fi
10884
97bf5e38 10885 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10886
81ecdfbb 10887$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10888
10889 fi
81ecdfbb
RW
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10891$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10892
81ecdfbb
RW
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10894$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10895 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10896 $as_echo_n "(cached) " >&6
596c9d4b 10897else
81ecdfbb 10898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10899/* end confdefs.h. */
596c9d4b
KB
10900
10901#define _SYSCALL32
d30c5336
JK
10902/* Needed for new procfs interface on sparc-solaris. */
10903#define _STRUCTURED_PROC 1
596c9d4b 10904#include <sys/procfs.h>
bec39cab
AC
10905int
10906main ()
10907{
97bf5e38 10908prrun_t avar
bec39cab
AC
10909 ;
10910 return 0;
10911}
10912_ACEOF
81ecdfbb 10913if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10914 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10915else
81ecdfbb 10916 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10917
596c9d4b 10918fi
81ecdfbb 10919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10920fi
10921
97bf5e38 10922 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10923
81ecdfbb 10924$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10925
10926 fi
81ecdfbb
RW
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10928$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10929
81ecdfbb
RW
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10931$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10932 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10933 $as_echo_n "(cached) " >&6
596c9d4b 10934else
81ecdfbb 10935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10936/* end confdefs.h. */
596c9d4b
KB
10937
10938#define _SYSCALL32
d30c5336
JK
10939/* Needed for new procfs interface on sparc-solaris. */
10940#define _STRUCTURED_PROC 1
596c9d4b 10941#include <sys/procfs.h>
bec39cab
AC
10942int
10943main ()
10944{
97bf5e38 10945gregset_t avar
bec39cab
AC
10946 ;
10947 return 0;
10948}
10949_ACEOF
81ecdfbb 10950if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10951 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10952else
81ecdfbb 10953 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10954
596c9d4b 10955fi
81ecdfbb 10956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10957fi
10958
97bf5e38 10959 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10960
81ecdfbb 10961$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10962
10963 fi
81ecdfbb
RW
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10965$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10966
81ecdfbb
RW
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10968$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10969 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10970 $as_echo_n "(cached) " >&6
d84dd0c5 10971else
81ecdfbb 10972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10973/* end confdefs.h. */
97bf5e38
MK
10974
10975#define _SYSCALL32
d30c5336
JK
10976/* Needed for new procfs interface on sparc-solaris. */
10977#define _STRUCTURED_PROC 1
d84dd0c5 10978#include <sys/procfs.h>
bec39cab
AC
10979int
10980main ()
10981{
97bf5e38 10982fpregset_t avar
bec39cab
AC
10983 ;
10984 return 0;
10985}
10986_ACEOF
81ecdfbb 10987if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10988 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10989else
81ecdfbb 10990 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10991
d84dd0c5 10992fi
81ecdfbb 10993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10994fi
10995
97bf5e38 10996 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10997
81ecdfbb 10998$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10999
97bf5e38 11000 fi
81ecdfbb
RW
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11002$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11003
81ecdfbb
RW
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11005$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11006 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11007 $as_echo_n "(cached) " >&6
c906108c 11008else
81ecdfbb 11009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11010/* end confdefs.h. */
c906108c 11011
97bf5e38 11012#define _SYSCALL32
d30c5336
JK
11013/* Needed for new procfs interface on sparc-solaris. */
11014#define _STRUCTURED_PROC 1
97bf5e38 11015#include <sys/procfs.h>
bec39cab
AC
11016int
11017main ()
11018{
97bf5e38 11019prgregset_t avar
bec39cab
AC
11020 ;
11021 return 0;
11022}
11023_ACEOF
81ecdfbb 11024if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11025 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11026else
81ecdfbb 11027 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11028
c906108c 11029fi
81ecdfbb 11030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11031fi
11032
97bf5e38 11033 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11034
81ecdfbb 11035$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11036
97bf5e38 11037 fi
81ecdfbb
RW
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11039$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11040
81ecdfbb
RW
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11042$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11043 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11044 $as_echo_n "(cached) " >&6
d45fe813 11045else
81ecdfbb 11046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11047/* end confdefs.h. */
97bf5e38
MK
11048
11049#define _SYSCALL32
d30c5336
JK
11050/* Needed for new procfs interface on sparc-solaris. */
11051#define _STRUCTURED_PROC 1
97bf5e38 11052#include <sys/procfs.h>
bec39cab
AC
11053int
11054main ()
11055{
97bf5e38 11056prfpregset_t avar
bec39cab
AC
11057 ;
11058 return 0;
11059}
11060_ACEOF
81ecdfbb 11061if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11062 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11063else
81ecdfbb 11064 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11065
d45fe813 11066fi
81ecdfbb 11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11068fi
11069
97bf5e38 11070 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11071
81ecdfbb 11072$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11073
97bf5e38 11074 fi
81ecdfbb
RW
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11076$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11077
81ecdfbb
RW
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11079$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11080 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11081 $as_echo_n "(cached) " >&6
d45fe813 11082else
81ecdfbb 11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11084/* end confdefs.h. */
97bf5e38
MK
11085
11086#define _SYSCALL32
d30c5336
JK
11087/* Needed for new procfs interface on sparc-solaris. */
11088#define _STRUCTURED_PROC 1
97bf5e38 11089#include <sys/procfs.h>
bec39cab
AC
11090int
11091main ()
11092{
97bf5e38 11093prgregset32_t avar
bec39cab
AC
11094 ;
11095 return 0;
11096}
11097_ACEOF
81ecdfbb 11098if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11099 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11100else
81ecdfbb 11101 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11102
d45fe813 11103fi
81ecdfbb 11104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11105fi
11106
97bf5e38 11107 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11108
81ecdfbb 11109$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11110
97bf5e38 11111 fi
81ecdfbb
RW
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11113$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11114
81ecdfbb
RW
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
11116$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
11117 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
11118 $as_echo_n "(cached) " >&6
d45fe813 11119else
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11121/* end confdefs.h. */
97bf5e38
MK
11122
11123#define _SYSCALL32
d30c5336
JK
11124/* Needed for new procfs interface on sparc-solaris. */
11125#define _STRUCTURED_PROC 1
97bf5e38 11126#include <sys/procfs.h>
bec39cab
AC
11127int
11128main ()
11129{
97bf5e38 11130prfpregset32_t avar
bec39cab
AC
11131 ;
11132 return 0;
11133}
11134_ACEOF
81ecdfbb 11135if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11136 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 11137else
81ecdfbb 11138 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 11139
d45fe813 11140fi
81ecdfbb 11141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11142fi
11143
97bf5e38 11144 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 11145
81ecdfbb 11146$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 11147
97bf5e38 11148 fi
81ecdfbb
RW
11149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
11150$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 11151
81ecdfbb
RW
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11153$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11154 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11155 $as_echo_n "(cached) " >&6
d45fe813 11156else
81ecdfbb 11157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11158/* end confdefs.h. */
97bf5e38 11159
d45fe813 11160#define _SYSCALL32
d30c5336
JK
11161/* Needed for new procfs interface on sparc-solaris. */
11162#define _STRUCTURED_PROC 1
97bf5e38 11163#include <sys/procfs.h>
bec39cab
AC
11164int
11165main ()
11166{
97bf5e38 11167lwpid_t avar
bec39cab
AC
11168 ;
11169 return 0;
11170}
11171_ACEOF
81ecdfbb 11172if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11173 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11174else
81ecdfbb 11175 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11176
d45fe813 11177fi
81ecdfbb 11178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11179fi
11180
97bf5e38 11181 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11182
81ecdfbb 11183$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11184
97bf5e38 11185 fi
81ecdfbb
RW
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11187$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11188
81ecdfbb
RW
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11190$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11191 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11192 $as_echo_n "(cached) " >&6
c906108c 11193else
81ecdfbb 11194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11195/* end confdefs.h. */
c906108c 11196
97bf5e38 11197#define _SYSCALL32
d30c5336
JK
11198/* Needed for new procfs interface on sparc-solaris. */
11199#define _STRUCTURED_PROC 1
97bf5e38 11200#include <sys/procfs.h>
bec39cab
AC
11201int
11202main ()
11203{
97bf5e38 11204psaddr_t avar
bec39cab
AC
11205 ;
11206 return 0;
11207}
11208_ACEOF
81ecdfbb 11209if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11210 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11211else
81ecdfbb 11212 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11213
c906108c 11214fi
81ecdfbb 11215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11216fi
11217
97bf5e38 11218 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11219
81ecdfbb 11220$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11221
97bf5e38 11222 fi
81ecdfbb
RW
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11224$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11225
81ecdfbb
RW
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11227$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11228 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11229 $as_echo_n "(cached) " >&6
c906108c 11230else
81ecdfbb 11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11232/* end confdefs.h. */
c906108c 11233
97bf5e38 11234#define _SYSCALL32
d30c5336
JK
11235/* Needed for new procfs interface on sparc-solaris. */
11236#define _STRUCTURED_PROC 1
97bf5e38 11237#include <sys/procfs.h>
bec39cab
AC
11238int
11239main ()
11240{
97bf5e38 11241prsysent_t avar
bec39cab
AC
11242 ;
11243 return 0;
11244}
11245_ACEOF
81ecdfbb 11246if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11247 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11248else
81ecdfbb 11249 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11250
c906108c 11251fi
81ecdfbb 11252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11253fi
11254
97bf5e38 11255 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11256
81ecdfbb 11257$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11258
97bf5e38 11259 fi
81ecdfbb
RW
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11261$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11262
81ecdfbb
RW
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11264$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11265 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11266 $as_echo_n "(cached) " >&6
c906108c 11267else
81ecdfbb 11268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11269/* end confdefs.h. */
c906108c 11270
97bf5e38 11271#define _SYSCALL32
d30c5336
JK
11272/* Needed for new procfs interface on sparc-solaris. */
11273#define _STRUCTURED_PROC 1
97bf5e38 11274#include <sys/procfs.h>
bec39cab
AC
11275int
11276main ()
11277{
97bf5e38 11278pr_sigset_t avar
bec39cab
AC
11279 ;
11280 return 0;
11281}
11282_ACEOF
81ecdfbb 11283if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11284 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11285else
81ecdfbb 11286 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11287
c906108c 11288fi
81ecdfbb 11289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11290fi
11291
97bf5e38 11292 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11293
81ecdfbb 11294$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11295
97bf5e38 11296 fi
81ecdfbb
RW
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11298$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11299
81ecdfbb
RW
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11301$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11302 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11303 $as_echo_n "(cached) " >&6
c906108c 11304else
81ecdfbb 11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11306/* end confdefs.h. */
c906108c 11307
97bf5e38 11308#define _SYSCALL32
d30c5336
JK
11309/* Needed for new procfs interface on sparc-solaris. */
11310#define _STRUCTURED_PROC 1
97bf5e38 11311#include <sys/procfs.h>
bec39cab
AC
11312int
11313main ()
11314{
97bf5e38 11315pr_sigaction64_t avar
bec39cab
AC
11316 ;
11317 return 0;
11318}
11319_ACEOF
81ecdfbb 11320if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11321 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11322else
81ecdfbb 11323 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11324
c906108c 11325fi
81ecdfbb 11326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11327fi
11328
97bf5e38 11329 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11330
81ecdfbb 11331$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11332
97bf5e38 11333 fi
81ecdfbb
RW
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11335$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11336
81ecdfbb
RW
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11338$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11339 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11340 $as_echo_n "(cached) " >&6
97bf5e38 11341else
81ecdfbb 11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11343/* end confdefs.h. */
97bf5e38
MK
11344
11345#define _SYSCALL32
d30c5336
JK
11346/* Needed for new procfs interface on sparc-solaris. */
11347#define _STRUCTURED_PROC 1
97bf5e38 11348#include <sys/procfs.h>
bec39cab
AC
11349int
11350main ()
11351{
97bf5e38 11352pr_siginfo64_t avar
bec39cab
AC
11353 ;
11354 return 0;
11355}
11356_ACEOF
81ecdfbb 11357if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11358 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11359else
81ecdfbb 11360 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11361
97bf5e38 11362fi
81ecdfbb 11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11364fi
c906108c 11365
97bf5e38 11366 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11367
81ecdfbb 11368$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11369
97bf5e38 11370 fi
81ecdfbb
RW
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11372$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11373
11374
97bf5e38
MK
11375
11376
11377
97bf5e38 11378 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11380$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11381 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11382 $as_echo_n "(cached) " >&6
c906108c 11383else
81ecdfbb 11384 if test "$cross_compiling" = yes; then :
97bf5e38 11385 gdb_cv_prfpregset_t_broken=yes
c906108c 11386else
81ecdfbb 11387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11388/* end confdefs.h. */
97bf5e38
MK
11389#include <sys/procfs.h>
11390 int main ()
11391 {
11392 if (sizeof (prfpregset_t) == sizeof (void *))
11393 return 1;
11394 return 0;
11395 }
bec39cab 11396_ACEOF
81ecdfbb 11397if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11398 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11399else
11400 gdb_cv_prfpregset_t_broken=yes
c906108c 11401fi
81ecdfbb
RW
11402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11403 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11404fi
81ecdfbb 11405
c906108c
SS
11406fi
11407
81ecdfbb
RW
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11409$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11410 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11411
81ecdfbb 11412$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11413
97bf5e38
MK
11414 fi
11415 fi
c906108c 11416
bec39cab 11417
81ecdfbb
RW
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11419$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11420 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11421 $as_echo_n "(cached) " >&6
c906108c 11422else
81ecdfbb 11423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11424/* end confdefs.h. */
97bf5e38
MK
11425#include <unistd.h>
11426#include <sys/types.h>
11427#include <sys/procfs.h>
11428
bec39cab
AC
11429int
11430main ()
11431{
97bf5e38
MK
11432
11433 int dummy;;
11434 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11435
11436 ;
11437 return 0;
11438}
11439_ACEOF
81ecdfbb 11440if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11441 gdb_cv_have_procfs_piocset=yes
c906108c 11442else
81ecdfbb 11443 gdb_cv_have_procfs_piocset=no
c906108c 11444fi
81ecdfbb 11445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11446fi
97bf5e38 11447
81ecdfbb
RW
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11449$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11450 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11451
81ecdfbb 11452$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11453
11454 fi
c906108c 11455fi
c906108c 11456
97bf5e38 11457if test ${host} = ${target} ; then
bec39cab 11458
81ecdfbb
RW
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11460$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11461 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11462 $as_echo_n "(cached) " >&6
bec39cab 11463else
81ecdfbb 11464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11465/* end confdefs.h. */
97bf5e38 11466#include <link.h>
bec39cab
AC
11467int
11468main ()
11469{
97bf5e38 11470struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11471 ;
11472 return 0;
11473}
11474_ACEOF
81ecdfbb 11475if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11476 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11477else
81ecdfbb 11478 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11479fi
81ecdfbb 11480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11481fi
11482
81ecdfbb
RW
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11484$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11485 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11486
81ecdfbb 11487$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11488
11489 fi
11490
bec39cab 11491
81ecdfbb
RW
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11493$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11494 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11495 $as_echo_n "(cached) " >&6
c906108c 11496else
81ecdfbb 11497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11498/* end confdefs.h. */
97bf5e38
MK
11499#include <sys/types.h>
11500#include <link.h>
bec39cab
AC
11501int
11502main ()
11503{
97bf5e38 11504struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11505 ;
11506 return 0;
11507}
11508_ACEOF
81ecdfbb 11509if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11510 gdb_cv_have_struct_link_map_with_lm_members=yes
11511else
81ecdfbb 11512 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11513fi
81ecdfbb 11514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11515fi
c906108c 11516
81ecdfbb
RW
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11518$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11519 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11520
81ecdfbb 11521$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11522
11523 fi
11524
bec39cab 11525
81ecdfbb
RW
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11527$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11528 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11529 $as_echo_n "(cached) " >&6
c906108c 11530else
81ecdfbb 11531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11532/* end confdefs.h. */
97bf5e38
MK
11533#include <sys/types.h>
11534#ifdef HAVE_NLIST_H
11535#include <nlist.h>
11536#endif
11537#include <link.h>
bec39cab
AC
11538int
11539main ()
11540{
97bf5e38 11541struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11542 ;
11543 return 0;
11544}
11545_ACEOF
81ecdfbb 11546if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11547 gdb_cv_have_struct_so_map_with_som_members=yes
11548else
81ecdfbb 11549 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11550fi
81ecdfbb 11551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11552fi
c906108c 11553
81ecdfbb
RW
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11555$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11556 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11557
81ecdfbb 11558$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11559
97bf5e38 11560 fi
c906108c 11561
bec39cab 11562
81ecdfbb
RW
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11564$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11565 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11566 $as_echo_n "(cached) " >&6
97bf5e38 11567else
81ecdfbb 11568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11569/* end confdefs.h. */
97bf5e38
MK
11570#define _SYSCALL32
11571#include <sys/link.h>
bec39cab
AC
11572int
11573main ()
11574{
97bf5e38 11575struct link_map32 l;
bec39cab
AC
11576 ;
11577 return 0;
11578}
11579_ACEOF
81ecdfbb 11580if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11581 gdb_cv_have_struct_link_map32=yes
11582else
81ecdfbb 11583 gdb_cv_have_struct_link_map32=no
97bf5e38 11584fi
81ecdfbb 11585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11586fi
c906108c 11587
81ecdfbb
RW
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11589$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11590 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11591
81ecdfbb 11592$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11593
60ca704f 11594
81ecdfbb 11595$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11596
97bf5e38
MK
11597 fi
11598fi
c906108c 11599
bc8bcb4b 11600# Check if the compiler supports the `long long' type.
c906108c 11601
81ecdfbb
RW
11602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11603$as_echo_n "checking for long long support in compiler... " >&6; }
11604if test "${gdb_cv_c_long_long+set}" = set; then :
11605 $as_echo_n "(cached) " >&6
97bf5e38 11606else
81ecdfbb 11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11608/* end confdefs.h. */
bc8bcb4b 11609extern long long foo;
bec39cab
AC
11610int
11611main ()
11612{
bc8bcb4b 11613switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11614 ;
11615 return 0;
11616}
11617_ACEOF
81ecdfbb 11618if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11619 gdb_cv_c_long_long=yes
11620else
81ecdfbb 11621 gdb_cv_c_long_long=no
97bf5e38 11622fi
81ecdfbb 11623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11624fi
81ecdfbb
RW
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11626$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11627if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11628
81ecdfbb 11629$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11630
11631fi
11632
bc8bcb4b 11633# Check if the compiler and runtime support printing long longs.
97bf5e38 11634
81ecdfbb
RW
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11636$as_echo_n "checking for long long support in printf... " >&6; }
11637if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11638 $as_echo_n "(cached) " >&6
97bf5e38 11639else
81ecdfbb 11640 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11641 gdb_cv_printf_has_long_long=no
11642else
81ecdfbb 11643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11644/* end confdefs.h. */
bc8bcb4b
MK
11645$ac_includes_default
11646int
11647main ()
11648{
11649char buf[32];
97bf5e38
MK
11650 long long l = 0;
11651 l = (l << 16) + 0x0123;
11652 l = (l << 16) + 0x4567;
11653 l = (l << 16) + 0x89ab;
11654 l = (l << 16) + 0xcdef;
11655 sprintf (buf, "0x%016llx", l);
11656 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11657 ;
11658 return 0;
c906108c 11659}
bec39cab 11660_ACEOF
81ecdfbb 11661if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11662 gdb_cv_printf_has_long_long=yes
11663else
81ecdfbb 11664 gdb_cv_printf_has_long_long=no
97bf5e38 11665fi
81ecdfbb
RW
11666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11667 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11668fi
81ecdfbb 11669
97bf5e38 11670fi
81ecdfbb
RW
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11672$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11673if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11674
81ecdfbb 11675$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11676
11677fi
97bf5e38 11678
1a619819
LM
11679# Check if the compiler and runtime support printing decfloats.
11680
81ecdfbb
RW
11681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11682$as_echo_n "checking for decfloat support in printf... " >&6; }
11683if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11684 $as_echo_n "(cached) " >&6
1a619819 11685else
81ecdfbb 11686 if test "$cross_compiling" = yes; then :
1a619819
LM
11687 gdb_cv_printf_has_decfloat=no
11688else
81ecdfbb 11689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11690/* end confdefs.h. */
11691$ac_includes_default
11692int
11693main ()
11694{
11695char buf[64];
11696 _Decimal32 d32 = 1.2345df;
11697 _Decimal64 d64 = 1.2345dd;
11698 _Decimal128 d128 = 1.2345dl;
11699 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11700 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11701 ;
11702 return 0;
11703}
11704_ACEOF
81ecdfbb 11705if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11706 gdb_cv_printf_has_decfloat=yes
11707else
81ecdfbb 11708 gdb_cv_printf_has_decfloat=no
1a619819 11709fi
81ecdfbb
RW
11710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11711 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11712fi
81ecdfbb 11713
1a619819 11714fi
81ecdfbb
RW
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11716$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11717if test $gdb_cv_printf_has_decfloat = yes; then
11718
81ecdfbb 11719$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11720
11721fi
11722
bc8bcb4b
MK
11723# Check if the compiler supports the `long double' type. We can't use
11724# AC_C_LONG_DOUBLE because that one does additional checks on the
11725# constants defined in <float.h> that fail on some systems,
11726# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11727
81ecdfbb
RW
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11729$as_echo_n "checking for long double support in compiler... " >&6; }
11730if test "${gdb_cv_c_long_double+set}" = set; then :
11731 $as_echo_n "(cached) " >&6
97bf5e38 11732else
81ecdfbb 11733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11734/* end confdefs.h. */
97bf5e38 11735long double foo;
bec39cab 11736_ACEOF
81ecdfbb 11737if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11738 gdb_cv_c_long_double=yes
97bf5e38 11739else
81ecdfbb 11740 gdb_cv_c_long_double=no
97bf5e38 11741fi
81ecdfbb 11742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11743fi
81ecdfbb
RW
11744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11745$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11746if test $gdb_cv_c_long_double = yes; then
c906108c 11747
81ecdfbb 11748$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11749
11750fi
11751
bc8bcb4b 11752# Check if the compiler and runtime support printing long doubles.
97bf5e38 11753
81ecdfbb
RW
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11755$as_echo_n "checking for long double support in printf... " >&6; }
11756if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11757 $as_echo_n "(cached) " >&6
97bf5e38 11758else
81ecdfbb 11759 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11760 gdb_cv_printf_has_long_double=no
11761else
81ecdfbb 11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11763/* end confdefs.h. */
bc8bcb4b
MK
11764$ac_includes_default
11765int
11766main ()
11767{
11768char buf[16];
97bf5e38
MK
11769 long double f = 3.141592653;
11770 sprintf (buf, "%Lg", f);
11771 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11772 ;
11773 return 0;
97bf5e38 11774}
bec39cab 11775_ACEOF
81ecdfbb 11776if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11777 gdb_cv_printf_has_long_double=yes
c906108c 11778else
81ecdfbb 11779 gdb_cv_printf_has_long_double=no
c906108c 11780fi
81ecdfbb
RW
11781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11782 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11783fi
81ecdfbb 11784
c906108c 11785fi
81ecdfbb
RW
11786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11787$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11788if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11789
81ecdfbb 11790$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11791
11792fi
97bf5e38 11793
bc8bcb4b 11794# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11795
81ecdfbb
RW
11796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11797$as_echo_n "checking for long double support in scanf... " >&6; }
11798if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11799 $as_echo_n "(cached) " >&6
97bf5e38 11800else
81ecdfbb 11801 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11802 gdb_cv_scanf_has_long_double=no
11803else
81ecdfbb 11804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11805/* end confdefs.h. */
bc8bcb4b
MK
11806#include <stdio.h>
11807int
11808main ()
11809{
11810char *buf = "3.141592653";
97bf5e38
MK
11811 long double f = 0;
11812 sscanf (buf, "%Lg", &f);
11813 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11814 ;
11815 return 0;
97bf5e38 11816}
bec39cab 11817_ACEOF
81ecdfbb 11818if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11819 gdb_cv_scanf_has_long_double=yes
11820else
81ecdfbb 11821 gdb_cv_scanf_has_long_double=no
97bf5e38 11822fi
81ecdfbb
RW
11823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11824 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11825fi
81ecdfbb 11826
c906108c 11827fi
81ecdfbb
RW
11828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11829$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11830if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11831
81ecdfbb 11832$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11833
11834fi
c906108c 11835
438013df
AO
11836case ${host_os} in
11837aix*)
81ecdfbb
RW
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11839$as_echo_n "checking for -bbigtoc option... " >&6; }
11840if test "${gdb_cv_bigtoc+set}" = set; then :
11841 $as_echo_n "(cached) " >&6
438013df 11842else
bec39cab 11843
438013df
AO
11844 SAVE_LDFLAGS=$LDFLAGS
11845
11846 case $GCC in
11847 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11848 *) gdb_cv_bigtoc=-bbigtoc ;;
11849 esac
11850
11851 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11853/* end confdefs.h. */
438013df 11854
bec39cab
AC
11855int
11856main ()
11857{
438013df 11858int i;
bec39cab
AC
11859 ;
11860 return 0;
11861}
11862_ACEOF
81ecdfbb 11863if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11864
81ecdfbb
RW
11865else
11866 gdb_cv_bigtoc=
438013df 11867fi
81ecdfbb
RW
11868rm -f core conftest.err conftest.$ac_objext \
11869 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11870 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11871
bec39cab 11872fi
81ecdfbb
RW
11873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11874$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11875 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11876 ;;
11877esac
11878
38f6b338 11879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11880$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11881dynamic_list=false
11882if test "${gdb_native}" = yes; then
11883 # The dynamically loaded libthread_db needs access to symbols in the gdb
11884 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11885 # may not be supported there.
11886 old_LDFLAGS="$LDFLAGS"
11887 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11888 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11889 LDFLAGS="$LDFLAGS $RDYNAMIC"
11890 if test "${have_libpython}" = no; then
11891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11892/* end confdefs.h. */
11893
11894int
11895main ()
11896{
11897
11898 ;
11899 return 0;
11900}
11901_ACEOF
11902if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11903 dynamic_list=true
11904fi
11905rm -f core conftest.err conftest.$ac_objext \
11906 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11907 else
11908 # Workaround http://bugs.python.org/issue4434 where static
11909 # libpythonX.Y.a would get its symbols required for
11910 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11911 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11912 old_CFLAGS="$CFLAGS"
11913 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11914 if test "$cross_compiling" = yes; then :
3bebe2f2 11915 true
f6528abd 11916else
3bebe2f2
JK
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918/* end confdefs.h. */
11919#include "${have_libpython}/Python.h"
11920int
11921main ()
11922{
11923int err;
38f6b338
JK
11924 Py_Initialize ();
11925 err = PyRun_SimpleString ("import itertools\n");
11926 Py_Finalize ();
11927 return err == 0 ? 0 : 1;
3bebe2f2
JK
11928 ;
11929 return 0;
11930}
11931_ACEOF
11932if ac_fn_c_try_run "$LINENO"; then :
11933 dynamic_list=true
11934fi
11935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11936 conftest.$ac_objext conftest.beam conftest.$ac_ext
11937fi
11938
38f6b338
JK
11939 CFLAGS="$old_CFLAGS"
11940 fi
11941 LDFLAGS="$old_LDFLAGS"
11942fi
11943if $dynamic_list; then
11944 found="-Wl,--dynamic-list"
11945 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11946else
38f6b338
JK
11947 found="-rdynamic"
11948 RDYNAMIC="-rdynamic"
f6528abd 11949fi
f6528abd 11950
38f6b338 11951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11952$as_echo "$found" >&6; }
0407b3f1 11953
f6528abd 11954
0407b3f1 11955if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11956 case ${host_os} in
c906108c 11957 solaris*)
d92419e5
JB
11958 # See if thread_db library is around for Solaris thread debugging.
11959 # Note that we must explicitly test for version 1 of the library
11960 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11961 # the same API.
81ecdfbb
RW
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11963$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11964 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11966$as_echo "yes" >&6; }
60ca704f 11967
81ecdfbb 11968$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11969
3483b318 11970 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11971 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
43c75337
JB
11972 # On SPARC CPUs, we also need to build sparc-sol-thread.
11973 case ${host_cpu} in
11974 sparc*)
11975 CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o"
11976 CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c"
11977 ;;
11978 esac
81ecdfbb
RW
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11980$as_echo_n "checking for dlopen in -ldl... " >&6; }
11981if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11982 $as_echo_n "(cached) " >&6
c906108c 11983else
bec39cab 11984 ac_check_lib_save_LIBS=$LIBS
c906108c 11985LIBS="-ldl $LIBS"
81ecdfbb 11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11987/* end confdefs.h. */
11988
81ecdfbb
RW
11989/* Override any GCC internal prototype to avoid an error.
11990 Use char because int might match the return type of a GCC
11991 builtin and then its argument prototype would still apply. */
bec39cab
AC
11992#ifdef __cplusplus
11993extern "C"
11994#endif
bec39cab
AC
11995char dlopen ();
11996int
11997main ()
11998{
81ecdfbb 11999return dlopen ();
bec39cab
AC
12000 ;
12001 return 0;
12002}
12003_ACEOF
81ecdfbb 12004if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12005 ac_cv_lib_dl_dlopen=yes
12006else
81ecdfbb 12007 ac_cv_lib_dl_dlopen=no
bec39cab 12008fi
81ecdfbb
RW
12009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12011LIBS=$ac_check_lib_save_LIBS
12012fi
81ecdfbb
RW
12013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12014$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12015if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12016 cat >>confdefs.h <<_ACEOF
12017#define HAVE_LIBDL 1
12018_ACEOF
c906108c
SS
12019
12020 LIBS="-ldl $LIBS"
12021
c906108c
SS
12022fi
12023
f6528abd 12024 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12025 # Sun randomly tweaked the prototypes in <proc_service.h>
12026 # at one point.
81ecdfbb
RW
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12028$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12029 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12030 $as_echo_n "(cached) " >&6
c906108c 12031else
bec39cab 12032
81ecdfbb 12033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12034/* end confdefs.h. */
c906108c
SS
12035
12036 #include <proc_service.h>
12037 ps_err_e ps_pdwrite
12038 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12039
bec39cab
AC
12040int
12041main ()
12042{
12043
12044 ;
12045 return 0;
12046}
12047_ACEOF
81ecdfbb 12048if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12049 gdb_cv_proc_service_is_old=no
12050else
81ecdfbb 12051 gdb_cv_proc_service_is_old=yes
c906108c 12052fi
81ecdfbb 12053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12054
c906108c
SS
12055fi
12056
81ecdfbb
RW
12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12058$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12059 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12060
81ecdfbb 12061$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12062
12063 fi
12064 else
81ecdfbb
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12066$as_echo "no" >&6; }
c906108c
SS
12067 fi
12068 ;;
d92419e5 12069 aix*)
81ecdfbb
RW
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12071$as_echo_n "checking for AiX thread debugging library... " >&6; }
12072 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12073 $as_echo_n "(cached) " >&6
bec39cab 12074else
81ecdfbb 12075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12076/* end confdefs.h. */
d92419e5 12077#include <sys/pthdebug.h>
bec39cab
AC
12078int
12079main ()
12080{
d92419e5
JB
12081#ifndef PTHDB_VERSION_3
12082 #error
12083 #endif
bec39cab
AC
12084 ;
12085 return 0;
12086}
12087_ACEOF
81ecdfbb 12088if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12089 gdb_cv_have_aix_thread_debug=yes
12090else
81ecdfbb 12091 gdb_cv_have_aix_thread_debug=no
d92419e5 12092fi
81ecdfbb 12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12094fi
12095
81ecdfbb
RW
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12097$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12098 if test $gdb_cv_have_aix_thread_debug = yes; then
12099 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12100 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12101 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12102
12103 # Older versions of AIX do not provide the declaration for
12104 # the getthrds function (it appears that it was introduced
12105 # with AIX 6.x).
12106 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12107"
12108if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12109 ac_have_decl=1
12110else
12111 ac_have_decl=0
12112fi
12113
12114cat >>confdefs.h <<_ACEOF
12115#define HAVE_DECL_GETTHRDS $ac_have_decl
12116_ACEOF
12117
d92419e5
JB
12118 fi
12119 ;;
c906108c 12120 esac
bec39cab 12121
c906108c
SS
12122fi
12123
3f47be5c 12124if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12126$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12127if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12128 $as_echo_n "(cached) " >&6
bec39cab 12129else
81ecdfbb 12130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12131/* end confdefs.h. */
3f47be5c 12132#include <thread_db.h>
bec39cab
AC
12133int
12134main ()
12135{
3f47be5c 12136int i = TD_NOTALLOC;
bec39cab
AC
12137 ;
12138 return 0;
12139}
12140_ACEOF
81ecdfbb 12141if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12142 gdb_cv_thread_db_h_has_td_notalloc=yes
12143else
81ecdfbb 12144 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12145
3f47be5c 12146fi
81ecdfbb 12147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12148
bec39cab 12149fi
81ecdfbb
RW
12150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12151$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12153$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12154if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12155 $as_echo_n "(cached) " >&6
59f80f10 12156else
81ecdfbb 12157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12158/* end confdefs.h. */
12159#include <thread_db.h>
12160int
12161main ()
12162{
12163int i = TD_VERSION;
12164 ;
12165 return 0;
12166}
12167_ACEOF
81ecdfbb 12168if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12169 gdb_cv_thread_db_h_has_td_version=yes
12170else
81ecdfbb 12171 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12172
12173fi
81ecdfbb 12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12175
12176fi
81ecdfbb
RW
12177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12178$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12180$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12181if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12182 $as_echo_n "(cached) " >&6
59f80f10 12183else
81ecdfbb 12184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12185/* end confdefs.h. */
12186#include <thread_db.h>
12187int
12188main ()
12189{
12190int i = TD_NOTLS;
12191 ;
12192 return 0;
12193}
12194_ACEOF
81ecdfbb 12195if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12196 gdb_cv_thread_db_h_has_td_notls=yes
12197else
81ecdfbb 12198 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12199
12200fi
81ecdfbb 12201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12202
12203fi
81ecdfbb
RW
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12205$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12206fi
12207if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12208
81ecdfbb 12209$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12210
59f80f10
DJ
12211fi
12212if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12213
81ecdfbb 12214$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12215
12216fi
12217if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12218
81ecdfbb 12219$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12220
3f47be5c
EZ
12221fi
12222
b757528f 12223if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12225$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12226if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12227 $as_echo_n "(cached) " >&6
bec39cab 12228else
81ecdfbb 12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12230/* end confdefs.h. */
b757528f 12231#include <sys/syscall.h>
bec39cab
AC
12232int
12233main ()
12234{
b757528f 12235int i = __NR_tkill;
bec39cab
AC
12236 ;
12237 return 0;
12238}
12239_ACEOF
81ecdfbb 12240if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12241 gdb_cv_sys_syscall_h_has_tkill=yes
12242else
81ecdfbb 12243 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12244
b757528f 12245fi
81ecdfbb 12246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12247
bec39cab 12248fi
81ecdfbb
RW
12249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12250$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12251fi
12252if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12253
81ecdfbb 12254$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12255
12256fi
12257
81ecdfbb
RW
12258ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12259"
12260if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12261 ac_have_decl=1
10568435 12262else
81ecdfbb 12263 ac_have_decl=0
10568435 12264fi
10568435
JK
12265
12266cat >>confdefs.h <<_ACEOF
81ecdfbb 12267#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12268_ACEOF
12269
12270
81ecdfbb
RW
12271if test "$cross_compiling" = yes; then :
12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12273/* end confdefs.h. */
12274#include <sys/personality.h>
12275int
12276main ()
12277{
12278
12279# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12280# define ADDR_NO_RANDOMIZE 0x0040000
12281# endif
12282 /* Test the flag could be set and stays set. */
12283 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12284 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12285 return 1
12286 ;
12287 return 0;
12288}
12289_ACEOF
81ecdfbb 12290if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12291 have_personality=true
12292else
81ecdfbb 12293 have_personality=false
10568435 12294fi
81ecdfbb
RW
12295rm -f core conftest.err conftest.$ac_objext \
12296 conftest$ac_exeext conftest.$ac_ext
10568435 12297else
81ecdfbb 12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12299/* end confdefs.h. */
12300#include <sys/personality.h>
12301int
12302main ()
12303{
12304
12305# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12306# define ADDR_NO_RANDOMIZE 0x0040000
12307# endif
12308 /* Test the flag could be set and stays set. */
12309 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12310 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12311 return 1
12312 ;
12313 return 0;
12314}
12315_ACEOF
81ecdfbb 12316if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12317 have_personality=true
12318else
81ecdfbb 12319 have_personality=false
10568435 12320fi
81ecdfbb
RW
12321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12322 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12323fi
81ecdfbb 12324
10568435
JK
12325if $have_personality
12326then
12327
81ecdfbb 12328$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12329
12330fi
12331
fb40c209 12332
f83d8a90
DE
12333# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12334# except that the argument to --with-sysroot is optional.
12335# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12336if test "x$with_sysroot" = xyes; then
12337 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12338fi
bec39cab 12339
81ecdfbb
RW
12340# Check whether --with-sysroot was given.
12341if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12342 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12343else
12344 TARGET_SYSTEM_ROOT=
12345fi
030292b7 12346
030292b7 12347
f83d8a90
DE
12348 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12349 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12350 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12351 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12352
f83d8a90
DE
12353cat >>confdefs.h <<_ACEOF
12354#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12355_ACEOF
bec39cab 12356
030292b7 12357
b14b1491 12358
f83d8a90
DE
12359
12360 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12361 if test "x$prefix" = xNONE; then
12362 test_prefix=/usr/local
12363 else
12364 test_prefix=$prefix
12365 fi
12366 else
12367 test_prefix=$exec_prefix
12368 fi
12369 value=0
12370 case ${ac_define_dir} in
12371 "${test_prefix}"|"${test_prefix}/"*|\
12372 '${exec_prefix}'|'${exec_prefix}/'*)
12373 value=1
12374 ;;
12375 esac
12376
12377cat >>confdefs.h <<_ACEOF
12378#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12379_ACEOF
030292b7
DJ
12380
12381
12382
16e7150e 12383
16e7150e 12384
81ecdfbb
RW
12385# Check whether --with-system-gdbinit was given.
12386if test "${with_system_gdbinit+set}" = set; then :
12387 withval=$with_system_gdbinit;
b14b1491
TT
12388 SYSTEM_GDBINIT=$withval
12389else
12390 SYSTEM_GDBINIT=
81ecdfbb
RW
12391fi
12392
16e7150e
JG
12393
12394 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12395 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12396 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12397 ac_define_dir=`eval echo $ac_define_dir`
12398
12399cat >>confdefs.h <<_ACEOF
12400#define SYSTEM_GDBINIT "$ac_define_dir"
12401_ACEOF
12402
12403
12404
0c4a4063 12405
b14b1491
TT
12406 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12407 if test "x$prefix" = xNONE; then
12408 test_prefix=/usr/local
12409 else
12410 test_prefix=$prefix
12411 fi
12412 else
12413 test_prefix=$exec_prefix
12414 fi
12415 value=0
12416 case ${ac_define_dir} in
12417 "${test_prefix}"|"${test_prefix}/"*|\
12418 '${exec_prefix}'|'${exec_prefix}/'*)
12419 value=1
12420 ;;
12421 esac
16e7150e 12422
b14b1491
TT
12423cat >>confdefs.h <<_ACEOF
12424#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12425_ACEOF
12426
b14b1491 12427
16e7150e 12428
0c4a4063 12429
81ecdfbb
RW
12430# Check whether --enable-werror was given.
12431if test "${enable_werror+set}" = set; then :
12432 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12433 yes | y) ERROR_ON_WARNING="yes" ;;
12434 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12435 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12436 esac
81ecdfbb
RW
12437fi
12438
094a342e 12439
a68ffae9
JK
12440# Enable -Werror by default when using gcc. Turn it off for releases.
12441if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12442 ERROR_ON_WARNING=yes
12443fi
12444
12445WERROR_CFLAGS=""
12446if test "${ERROR_ON_WARNING}" = yes ; then
12447 WERROR_CFLAGS="-Werror"
12448fi
12449
aa79a185
DJ
12450# The entries after -Wno-pointer-sign are disabled warnings which may
12451# be enabled in the future, which can not currently be used to build
12452# GDB.
12453# NOTE: If you change this list, remember to update
3b851bce 12454# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12455build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12456-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12457-Wno-unused -Wunused-value -Wunused-function \
352b3eda
JB
12458-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
12459-Wdeclaration-after-statement"
a3b362c4 12460
3526781e
DJ
12461# Enable -Wno-format by default when using gcc on mingw since many
12462# GCC versions complain about %I64.
12463case "${host}" in
12464 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12465esac
12466
81ecdfbb
RW
12467# Check whether --enable-build-warnings was given.
12468if test "${enable_build_warnings+set}" = set; then :
12469 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12470 yes) ;;
12471 no) build_warnings="-w";;
12472 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12473 build_warnings="${build_warnings} ${t}";;
12474 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12475 build_warnings="${t} ${build_warnings}";;
12476 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12477esac
d4f3574e 12478if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12479 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12480fi
81ecdfbb
RW
12481fi
12482# Check whether --enable-gdb-build-warnings was given.
12483if test "${enable_gdb_build_warnings+set}" = set; then :
12484 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12485 yes) ;;
12486 no) build_warnings="-w";;
12487 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12488 build_warnings="${build_warnings} ${t}";;
12489 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12490 build_warnings="${t} ${build_warnings}";;
12491 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12492esac
12493if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12494 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12495fi
81ecdfbb
RW
12496fi
12497WARN_CFLAGS=""
c906108c
SS
12498if test "x${build_warnings}" != x -a "x$GCC" = xyes
12499then
81ecdfbb
RW
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12501$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12502 # Separate out the -Werror flag as some files just cannot be
12503 # compiled with it enabled.
12504 for w in ${build_warnings}; do
12505 case $w in
12506 -Werr*) WERROR_CFLAGS=-Werror ;;
12507 *) # Check that GCC accepts it
4536bbc6
AC
12508 saved_CFLAGS="$CFLAGS"
12509 CFLAGS="$CFLAGS $w"
81ecdfbb 12510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12511/* end confdefs.h. */
4536bbc6 12512
bec39cab
AC
12513int
12514main ()
12515{
4536bbc6 12516
bec39cab
AC
12517 ;
12518 return 0;
12519}
12520_ACEOF
81ecdfbb 12521if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12522 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12523fi
81ecdfbb 12524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12525 CFLAGS="$saved_CFLAGS"
746a987d
AC
12526 esac
12527 done
81ecdfbb
RW
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12529$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12530fi
12531
12532
104c1213 12533
7a292a7a 12534# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12536$as_echo_n "checking for cygwin... " >&6; }
12537if test "${gdb_cv_os_cygwin+set}" = set; then :
12538 $as_echo_n "(cached) " >&6
bec39cab 12539else
81ecdfbb 12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12541/* end confdefs.h. */
7a292a7a
SS
12542
12543#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12544lose
12545#endif
bec39cab 12546_ACEOF
7a292a7a 12547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12548 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12549 gdb_cv_os_cygwin=yes
12550else
7a292a7a
SS
12551 gdb_cv_os_cygwin=no
12552fi
12553rm -f conftest*
12554
12555fi
81ecdfbb
RW
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12557$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12558
aff38e61 12559
3eb25fda 12560SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12561case ${host} in
95cbc983
AC
12562 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12563 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12564 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12565esac
12566
12567
cd0fc7c3
SS
12568# libreadline needs libuser32.a in a cygwin environment
12569WIN32LIBS=
12570if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12571 WIN32LIBS="-luser32"
12572 case "${target}" in
12573 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12574 ;;
12575 esac
cd0fc7c3 12576fi
c906108c 12577
b4505029
MM
12578# The ser-tcp.c module requires sockets.
12579case ${host} in
12580 *mingw32*)
12581
81ecdfbb 12582$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12583
12584 WIN32LIBS="$WIN32LIBS -lws2_32"
12585 ;;
12586esac
12587
7a292a7a 12588
31d99776
DJ
12589# Add ELF support to GDB, but only if BFD includes ELF support.
12590OLD_CFLAGS=$CFLAGS
12591OLD_LDFLAGS=$LDFLAGS
12592OLD_LIBS=$LIBS
12cd34f3
PA
12593# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12594# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12595# always want our bfd.
12596CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12597LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12598intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12599# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12600if test "$plugins" = "yes"; then
12601 LIBS="-ldl $LIBS"
12602fi
0f72fb1c 12603LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12605$as_echo_n "checking for ELF support in BFD... " >&6; }
12606if test "${gdb_cv_var_elf+set}" = set; then :
12607 $as_echo_n "(cached) " >&6
31d99776 12608else
81ecdfbb 12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12610/* end confdefs.h. */
12611#include <stdlib.h>
12612#include "bfd.h"
12613#include "elf-bfd.h"
12614
12615int
12616main ()
12617{
12618bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12619 ;
12620 return 0;
12621}
12622_ACEOF
81ecdfbb 12623if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12624 gdb_cv_var_elf=yes
12625else
81ecdfbb 12626 gdb_cv_var_elf=no
31d99776 12627fi
81ecdfbb
RW
12628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
31d99776 12630fi
81ecdfbb
RW
12631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12632$as_echo "$gdb_cv_var_elf" >&6; }
31d99776 12633if test $gdb_cv_var_elf = yes; then
55aa24fb 12634 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12635
81ecdfbb 12636$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12637
075ff26d
JK
12638 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12639 if test "$plugins" = "yes"; then
12640 OLD_LIBS="-ldl $OLD_LIBS"
12641 fi
31d99776
DJ
12642fi
12643CFLAGS=$OLD_CFLAGS
12644LDFLAGS=$OLD_LDFLAGS
12645LIBS=$OLD_LIBS
12646
121ce6e5
DJ
12647# Add any host-specific objects to GDB.
12648CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12649
3fc11d3e
JM
12650LIBGUI="../libgui/src/libgui.a"
12651GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12652
12653
7a292a7a 12654
3fc11d3e
JM
12655WIN32LDAPP=
12656
12657
12658
d91670b9 12659case "${host}" in
686a5eed 12660*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12661 configdir="win"
12662 ;;
12663*)
12664 configdir="unix"
12665 ;;
12666esac
3fc11d3e
JM
12667
12668GDBTKLIBS=
12669if test "${enable_gdbtk}" = "yes"; then
12670
d1c3b63a
KS
12671 # Gdbtk must have an absolute path to srcdir in order to run
12672 # properly when not installed.
12673 here=`pwd`
12674 cd ${srcdir}
12675 GDBTK_SRC_DIR=`pwd`
12676 cd $here
12677
bec39cab 12678
5062cc19
KS
12679 #
12680 # Ok, lets find the tcl configuration
12681 # First, look for one uninstalled.
12682 # the alternative search directory is invoked by --with-tcl
12683 #
3fc11d3e 12684
5062cc19
KS
12685 if test x"${no_tcl}" = x ; then
12686 # we reset no_tcl in case something fails here
12687 no_tcl=true
bec39cab 12688
81ecdfbb
RW
12689# Check whether --with-tcl was given.
12690if test "${with_tcl+set}" = set; then :
12691 withval=$with_tcl; with_tclconfig=${withval}
12692fi
12693
12694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12695$as_echo_n "checking for Tcl configuration... " >&6; }
12696 if test "${ac_cv_c_tclconfig+set}" = set; then :
12697 $as_echo_n "(cached) " >&6
3fc11d3e 12698else
bec39cab 12699
3fc11d3e 12700
5062cc19
KS
12701 # First check to see if --with-tcl was specified.
12702 case "${host}" in
12703 *-*-cygwin*) platDir="win" ;;
12704 *) platDir="unix" ;;
12705 esac
12706 if test x"${with_tclconfig}" != x ; then
12707 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12708 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12709 else
81ecdfbb 12710 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12711 fi
12712 fi
12713
12714 # then check for a private Tcl installation
12715 if test x"${ac_cv_c_tclconfig}" = x ; then
12716 for i in \
12717 ../tcl \
12718 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12719 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12720 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12721 ../../tcl \
12722 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12723 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12724 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12725 ../../../tcl \
12726 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12727 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12728 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12729 if test -f "$i/$platDir/tclConfig.sh" ; then
12730 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12731 break
12732 fi
12733 done
12734 fi
12735
12736 # on Darwin, check in Framework installation locations
12737 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12738 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12739 `ls -d /Library/Frameworks 2>/dev/null` \
12740 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12741 `ls -d /System/Library/Frameworks 2>/dev/null` \
12742 ; do
12743 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12744 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12745 break
12746 fi
12747 done
12748 fi
12749
12750 # check in a few common install locations
12751 if test x"${ac_cv_c_tclconfig}" = x ; then
12752 for i in `ls -d ${libdir} 2>/dev/null` \
12753 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12754 `ls -d ${prefix}/lib 2>/dev/null` \
12755 `ls -d /usr/local/lib 2>/dev/null` \
12756 `ls -d /usr/contrib/lib 2>/dev/null` \
12757 `ls -d /usr/lib 2>/dev/null` \
12758 ; do
12759 if test -f "$i/tclConfig.sh" ; then
12760 ac_cv_c_tclconfig=`(cd $i; pwd)`
12761 break
12762 fi
12763 done
12764 fi
3fc11d3e 12765
5062cc19
KS
12766 # check in a few other private locations
12767 if test x"${ac_cv_c_tclconfig}" = x ; then
12768 for i in \
12769 ${srcdir}/../tcl \
12770 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12771 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12772 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12773 if test -f "$i/$platDir/tclConfig.sh" ; then
12774 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12775 break
12776 fi
12777 done
12778 fi
bec39cab 12779
3fc11d3e
JM
12780fi
12781
5062cc19
KS
12782
12783 if test x"${ac_cv_c_tclconfig}" = x ; then
12784 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12786$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12787 else
12788 no_tcl=
12789 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12791$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12792 fi
12793 fi
3fc11d3e 12794
bec39cab 12795
85541719
DE
12796 # If $no_tk is nonempty, then we can't do Tk, and there is no
12797 # point to doing Tcl.
bec39cab 12798
5062cc19
KS
12799 #
12800 # Ok, lets find the tk configuration
12801 # First, look for one uninstalled.
12802 # the alternative search directory is invoked by --with-tk
12803 #
3fc11d3e 12804
5062cc19
KS
12805 if test x"${no_tk}" = x ; then
12806 # we reset no_tk in case something fails here
12807 no_tk=true
bec39cab 12808
81ecdfbb
RW
12809# Check whether --with-tk was given.
12810if test "${with_tk+set}" = set; then :
12811 withval=$with_tk; with_tkconfig=${withval}
12812fi
12813
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12815$as_echo_n "checking for Tk configuration... " >&6; }
12816 if test "${ac_cv_c_tkconfig+set}" = set; then :
12817 $as_echo_n "(cached) " >&6
bec39cab 12818else
3fc11d3e
JM
12819
12820
5062cc19
KS
12821 # First check to see if --with-tkconfig was specified.
12822 if test x"${with_tkconfig}" != x ; then
12823 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12824 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12825 else
81ecdfbb 12826 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12827 fi
12828 fi
3fc11d3e 12829
5062cc19
KS
12830 # then check for a private Tk library
12831 case "${host}" in
12832 *-*-cygwin*) platDir="win" ;;
12833 *) platDir="unix" ;;
12834 esac
12835 if test x"${ac_cv_c_tkconfig}" = x ; then
12836 for i in \
12837 ../tk \
12838 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12839 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12840 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12841 ../../tk \
12842 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12843 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12844 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12845 ../../../tk \
12846 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12847 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12848 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12849 if test -f "$i/$platDir/tkConfig.sh" ; then
12850 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12851 break
12852 fi
12853 done
12854 fi
12855
12856 # on Darwin, check in Framework installation locations
12857 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12858 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12859 `ls -d /Library/Frameworks 2>/dev/null` \
12860 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12861 `ls -d /System/Library/Frameworks 2>/dev/null` \
12862 ; do
12863 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12864 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12865 break
12866 fi
12867 done
12868 fi
12869
12870 # check in a few common install locations
12871 if test x"${ac_cv_c_tkconfig}" = x ; then
12872 for i in `ls -d ${libdir} 2>/dev/null` \
12873 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12874 `ls -d ${prefix}/lib 2>/dev/null` \
12875 `ls -d /usr/local/lib 2>/dev/null` \
12876 `ls -d /usr/contrib/lib 2>/dev/null` \
12877 `ls -d /usr/lib 2>/dev/null` \
12878 ; do
12879 if test -f "$i/tkConfig.sh" ; then
12880 ac_cv_c_tkconfig=`(cd $i; pwd)`
12881 break
12882 fi
12883 done
12884 fi
12885 # check in a few other private locations
12886 if test x"${ac_cv_c_tkconfig}" = x ; then
12887 for i in \
12888 ${srcdir}/../tk \
12889 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12890 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12891 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12892 if test -f "$i/$platDir/tkConfig.sh" ; then
12893 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12894 break
12895 fi
12896 done
12897 fi
3fc11d3e 12898
3fc11d3e
JM
12899fi
12900
12901
5062cc19
KS
12902 if test x"${ac_cv_c_tkconfig}" = x ; then
12903 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12905$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12906 else
12907 no_tk=
12908 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12910$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12911 fi
3fc11d3e 12912 fi
dd2504ab 12913
dd2504ab 12914
85541719
DE
12915 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12916
81ecdfbb
RW
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12918$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12919
12920 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12922$as_echo "loading" >&6; }
85541719
DE
12923 . ${TCL_BIN_DIR}/tclConfig.sh
12924 else
81ecdfbb
RW
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12926$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12927 fi
12928
12929 # eval is required to do the TCL_DBGX substitution
12930 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12931 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12932
12933 # If the TCL_BIN_DIR is the build directory (not the install directory),
12934 # then set the common variable name to the value of the build variables.
12935 # For example, the variable TCL_LIB_SPEC will be set to the value
12936 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12937 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12938 # installed and uninstalled version of Tcl.
12939 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12940 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12941 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12942 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12943 elif test "`uname -s`" = "Darwin"; then
12944 # If Tcl was built as a framework, attempt to use the libraries
12945 # from the framework at the given location so that linking works
a68ffae9 12946 # against Tcl.framework installed in an arbitrary location.
85541719
DE
12947 case ${TCL_DEFS} in
12948 *TCL_FRAMEWORK*)
12949 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12950 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12951 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12952 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12953 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12954 break
12955 fi
12956 done
12957 fi
12958 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12959 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12960 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12961 fi
12962 ;;
12963 esac
12964 fi
12965
12966 # eval is required to do the TCL_DBGX substitution
12967 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12968 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12969 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12970 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986 # Check for in-tree tcl
12987 here=`pwd`
12988 cd ${srcdir}/..
12989 topdir=`pwd`
12990 cd ${here}
12991
12992 intree="no"
12993 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12994 intree="yes"
12995 fi
12996
12997 # Find Tcl private headers
12998 if test x"${intree}" = xno; then
12999
81ecdfbb
RW
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13001$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13002 private_dir=""
13003 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13004 if test -f ${dir}/tclInt.h ; then
13005 private_dir=${dir}
13006 fi
13007
13008 if test x"${private_dir}" = x; then
81ecdfbb 13009 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13010 else
13011 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13013$as_echo "${private_dir}" >&6; }
85541719
DE
13014 fi
13015
13016 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13017 TCL_LIBRARY="${TCL_LIB_SPEC}"
13018 TCL_DEPS=""
13019 else
13020 # If building tcl in the same src tree, private headers
13021 # are not needed, but we need to be sure to use the right
13022 # headers library
13023 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13024 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13025 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13026 fi
13027
13028
13029
13030
13031
81ecdfbb
RW
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13033$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13034
5062cc19 13035 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13037$as_echo "loading" >&6; }
5062cc19 13038 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13039 else
81ecdfbb
RW
13040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13041$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13042 fi
bec39cab 13043
5062cc19
KS
13044 # eval is required to do the TK_DBGX substitution
13045 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13046 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13047
13048 # If the TK_BIN_DIR is the build directory (not the install directory),
13049 # then set the common variable name to the value of the build variables.
13050 # For example, the variable TK_LIB_SPEC will be set to the value
13051 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13052 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13053 # installed and uninstalled version of Tcl.
85541719 13054 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13055 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13056 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13057 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13058 elif test "`uname -s`" = "Darwin"; then
13059 # If Tk was built as a framework, attempt to use the libraries
13060 # from the framework at the given location so that linking works
a68ffae9 13061 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13062 case ${TK_DEFS} in
13063 *TK_FRAMEWORK*)
85541719 13064 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13065 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13066 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13067 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13068 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13069 break
13070 fi
13071 done
13072 fi
85541719 13073 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13074 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13075 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13076 fi
13077 ;;
13078 esac
3fc11d3e
JM
13079 fi
13080
5062cc19
KS
13081 # eval is required to do the TK_DBGX substitution
13082 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13083 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13084 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13085 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13086
3fc11d3e
JM
13087
13088
bec39cab
AC
13089
13090
13091
13092
13093
13094
13095
3fc11d3e 13096
3fc11d3e 13097
bec39cab 13098
bec39cab 13099
85541719
DE
13100 # Check for in-tree Tk
13101 intree="no"
13102 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13103 intree="yes"
13104 fi
3fc11d3e 13105
85541719
DE
13106 # Find Tk private headers
13107 if test x"${intree}" = xno; then
3fc11d3e 13108
81ecdfbb
RW
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13110$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13111 private_dir=""
13112 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13113 if test -f ${dir}/tkInt.h; then
13114 private_dir=${dir}
3fc11d3e 13115 fi
bec39cab 13116
5062cc19 13117 if test x"${private_dir}" = x; then
81ecdfbb 13118 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13119 else
5062cc19 13120 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13122$as_echo "${private_dir}" >&6; }
3fc11d3e 13123 fi
3fc11d3e 13124
85541719
DE
13125 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13126 TK_LIBRARY=${TK_LIB_SPEC}
13127 TK_DEPS=""
13128 else
13129 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13130 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13131 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13132 fi
3fc11d3e
JM
13133
13134
3fc11d3e
JM
13135
13136
3fc11d3e 13137
85541719 13138 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13139
85541719
DE
13140 # Include some libraries that Tcl and Tk want.
13141 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13142 # Yes, the ordering seems wrong here. But it isn't.
13143 # TK_LIBS is the list of libraries that need to be linked
13144 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13145 # were in LIBS then any link tests after this point would
13146 # try to include things like `$(LIBGUI)', which wouldn't work.
13147 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13148
85541719
DE
13149 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13150 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13151 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13152 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13153 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13154 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13155 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13156
85541719
DE
13157 if test x$gdb_cv_os_cygwin = xyes; then
13158 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13159 WIN32LDAPP="-Wl,--subsystem,console"
13160 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13161 fi
ffc6a242 13162
81ecdfbb 13163 subdirs="$subdirs gdbtk"
3ace7edb 13164
85541719 13165 fi
3fc11d3e
JM
13166fi
13167
13168
13169
13170
13171
13172
13173
13174
81ecdfbb
RW
13175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13176$as_echo_n "checking for X... " >&6; }
bec39cab 13177
c906108c 13178
81ecdfbb
RW
13179# Check whether --with-x was given.
13180if test "${with_x+set}" = set; then :
13181 withval=$with_x;
13182fi
c906108c
SS
13183
13184# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13185if test "x$with_x" = xno; then
13186 # The user explicitly disabled X.
13187 have_x=disabled
13188else
81ecdfbb
RW
13189 case $x_includes,$x_libraries in #(
13190 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13191 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13192 $as_echo_n "(cached) " >&6
c906108c
SS
13193else
13194 # One or both of the vars are not set, and there is no cached value.
bec39cab 13195ac_x_includes=no ac_x_libraries=no
81ecdfbb 13196rm -f -r conftest.dir
bec39cab
AC
13197if mkdir conftest.dir; then
13198 cd conftest.dir
bec39cab 13199 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13200incroot:
13201 @echo incroot='${INCROOT}'
13202usrlibdir:
13203 @echo usrlibdir='${USRLIBDIR}'
13204libdir:
13205 @echo libdir='${LIBDIR}'
13206_ACEOF
13207 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13208 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13209 for ac_var in incroot usrlibdir libdir; do
13210 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13211 done
c906108c 13212 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13213 for ac_extension in a so sl dylib la dll; do
13214 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13215 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13216 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13217 fi
13218 done
13219 # Screen out bogus values from the imake configuration. They are
13220 # bogus both because they are the default anyway, and because
13221 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13222 case $ac_im_incroot in
81ecdfbb 13223 /usr/include) ac_x_includes= ;;
bec39cab 13224 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13225 esac
bec39cab 13226 case $ac_im_usrlibdir in
81ecdfbb 13227 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13228 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13229 esac
13230 fi
13231 cd ..
81ecdfbb 13232 rm -f -r conftest.dir
c906108c
SS
13233fi
13234
bec39cab
AC
13235# Standard set of common directories for X headers.
13236# Check X11 before X11Rn because it is often a symlink to the current release.
13237ac_x_header_dirs='
13238/usr/X11/include
81ecdfbb 13239/usr/X11R7/include
bec39cab
AC
13240/usr/X11R6/include
13241/usr/X11R5/include
13242/usr/X11R4/include
13243
13244/usr/include/X11
81ecdfbb 13245/usr/include/X11R7
bec39cab
AC
13246/usr/include/X11R6
13247/usr/include/X11R5
13248/usr/include/X11R4
13249
13250/usr/local/X11/include
81ecdfbb 13251/usr/local/X11R7/include
bec39cab
AC
13252/usr/local/X11R6/include
13253/usr/local/X11R5/include
13254/usr/local/X11R4/include
13255
13256/usr/local/include/X11
81ecdfbb 13257/usr/local/include/X11R7
bec39cab
AC
13258/usr/local/include/X11R6
13259/usr/local/include/X11R5
13260/usr/local/include/X11R4
13261
13262/usr/X386/include
13263/usr/x386/include
13264/usr/XFree86/include/X11
13265
13266/usr/include
13267/usr/local/include
13268/usr/unsupported/include
13269/usr/athena/include
13270/usr/local/x11r5/include
13271/usr/lpp/Xamples/include
13272
13273/usr/openwin/include
13274/usr/openwin/share/include'
13275
13276if test "$ac_x_includes" = no; then
81ecdfbb 13277 # Guess where to find include files, by looking for Xlib.h.
c906108c 13278 # First, try using that file with no special directory specified.
81ecdfbb 13279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13280/* end confdefs.h. */
81ecdfbb 13281#include <X11/Xlib.h>
bec39cab 13282_ACEOF
81ecdfbb 13283if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13284 # We can compile using X headers with no special include directory.
13285ac_x_includes=
13286else
bec39cab 13287 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13288 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13289 ac_x_includes=$ac_dir
13290 break
13291 fi
13292done
c906108c 13293fi
bec39cab
AC
13294rm -f conftest.err conftest.$ac_ext
13295fi # $ac_x_includes = no
c906108c 13296
bec39cab 13297if test "$ac_x_libraries" = no; then
c906108c 13298 # Check for the libraries.
c906108c
SS
13299 # See if we find them without any special options.
13300 # Don't add to $LIBS permanently.
bec39cab 13301 ac_save_LIBS=$LIBS
81ecdfbb
RW
13302 LIBS="-lX11 $LIBS"
13303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13304/* end confdefs.h. */
81ecdfbb 13305#include <X11/Xlib.h>
bec39cab
AC
13306int
13307main ()
13308{
81ecdfbb 13309XrmInitialize ()
bec39cab
AC
13310 ;
13311 return 0;
13312}
13313_ACEOF
81ecdfbb 13314if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13315 LIBS=$ac_save_LIBS
c906108c
SS
13316# We can link X programs with no special library path.
13317ac_x_libraries=
13318else
81ecdfbb
RW
13319 LIBS=$ac_save_LIBS
13320for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13321do
bec39cab 13322 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13323 for ac_extension in a so sl dylib la dll; do
13324 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13325 ac_x_libraries=$ac_dir
13326 break 2
13327 fi
13328 done
13329done
13330fi
81ecdfbb
RW
13331rm -f core conftest.err conftest.$ac_objext \
13332 conftest$ac_exeext conftest.$ac_ext
bec39cab 13333fi # $ac_x_libraries = no
c906108c 13334
81ecdfbb
RW
13335case $ac_x_includes,$ac_x_libraries in #(
13336 no,* | *,no | *\'*)
13337 # Didn't find X, or a directory has "'" in its name.
13338 ac_cv_have_x="have_x=no";; #(
13339 *)
13340 # Record where we found X for the cache.
13341 ac_cv_have_x="have_x=yes\
13342 ac_x_includes='$ac_x_includes'\
13343 ac_x_libraries='$ac_x_libraries'"
13344esac
c906108c 13345fi
81ecdfbb
RW
13346;; #(
13347 *) have_x=yes;;
13348 esac
c906108c
SS
13349 eval "$ac_cv_have_x"
13350fi # $with_x != no
13351
13352if test "$have_x" != yes; then
81ecdfbb
RW
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13354$as_echo "$have_x" >&6; }
c906108c
SS
13355 no_x=yes
13356else
13357 # If each of the values was on the command line, it overrides each guess.
13358 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13359 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13360 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13361 ac_cv_have_x="have_x=yes\
13362 ac_x_includes='$x_includes'\
13363 ac_x_libraries='$x_libraries'"
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13365$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13366fi
13367
13368
bec39cab 13369# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13370# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13371# This code just checks for a few cases where we'd like to ignore those
13372# definitions, even when they're present in the '.mt' file. These cases
13373# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13374# not part of the source tree.
7a292a7a 13375#
81ecdfbb
RW
13376# Check whether --enable-sim was given.
13377if test "${enable_sim+set}" = set; then :
13378 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13379 echo "enableval = ${enableval}";
13380 case "${enableval}" in
13381 yes) ignore_sim=false ;;
13382 no) ignore_sim=true ;;
13383 *) ignore_sim=false ;;
13384 esac
13385else
13386 ignore_sim=false
81ecdfbb
RW
13387fi
13388
7a292a7a
SS
13389
13390if test ! -d "${srcdir}/../sim"; then
13391 ignore_sim=true
13392fi
13393
9b624dbe
UW
13394SIM=
13395SIM_OBS=
13396if test "${ignore_sim}" = "false"; then
13397 if test x"${gdb_sim}" != x ; then
13398 SIM="${gdb_sim}"
13399 SIM_OBS="remote-sim.o"
60ca704f 13400
81ecdfbb 13401$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13402
9b624dbe 13403 fi
7a292a7a
SS
13404fi
13405
13406
13407
c906108c
SS
13408
13409
13410
13411
13412
13413
dfcd3bfb 13414
e56ac5c3
AC
13415
13416
b3a90332
AC
13417
13418
c35f4ffc 13419# List of host floatformats.
bec39cab
AC
13420
13421cat >>confdefs.h <<_ACEOF
c35f4ffc 13422#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13423_ACEOF
c35f4ffc 13424
bec39cab
AC
13425
13426cat >>confdefs.h <<_ACEOF
c35f4ffc 13427#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13428_ACEOF
13429
c35f4ffc 13430
bec39cab 13431cat >>confdefs.h <<_ACEOF
c35f4ffc 13432#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13433_ACEOF
c35f4ffc
AC
13434
13435
c906108c
SS
13436# target_subdir is used by the testsuite to find the target libraries.
13437target_subdir=
13438if test "${host}" != "${target}"; then
13439 target_subdir="${target_alias}/"
13440fi
13441
13442
13443frags=
771b4502 13444if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13445 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13446 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13447 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13448 fi
13449 frags="$frags $host_makefile_frag"
13450else
13451 host_makefile_frag=/dev/null
c906108c 13452fi
c906108c 13453
c906108c
SS
13454
13455
13456
771b4502 13457if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13458# We pick this up from the host configuration file (.mh) because we
13459# do not have a native configuration Makefile fragment.
c906108c
SS
13460nativefile=`sed -n '
13461s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13462' ${host_makefile_frag}`
c906108c
SS
13463fi
13464
13465
b00a8037 13466if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13467
13468cat >>confdefs.h <<_ACEOF
b00a8037 13469#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13470_ACEOF
b00a8037
DJ
13471
13472fi
13473
8dcde887 13474# Enable multi-ice-gdb-server.
81ecdfbb
RW
13475# Check whether --enable-multi-ice was given.
13476if test "${enable_multi_ice+set}" = set; then :
13477 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13478 yes | no)
13479 ;;
81ecdfbb 13480 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13481 esac
81ecdfbb 13482fi
b4e70030 13483
81ecdfbb
RW
13484if test "x$enable_multi_ice" = xyes; then
13485 subdirs="$subdirs multi-ice"
3ace7edb 13486
a85f51e7
DJ
13487fi
13488
496c0e1b
JB
13489# Check whether --enable-gdbserver was given.
13490if test "${enable_gdbserver+set}" = set; then :
13491 enableval=$enable_gdbserver; case "${enableval}" in
13492 yes| no|auto) ;;
13493 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13494esac
13495else
13496 enable_gdbserver=auto
13497fi
13498
13499
13500# We only build gdbserver automatically in a native configuration, and
13501# only if the user did not explicitly disable its build.
13502if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13504$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13505 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13507$as_echo "yes" >&6; }
13508 subdirs="$subdirs gdbserver"
3ace7edb 13509
496c0e1b 13510 gdbserver_build_enabled=yes
8dcde887 13511 else
81ecdfbb
RW
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13513$as_echo "no" >&6; }
8dcde887
MK
13514 fi
13515fi
13516
496c0e1b
JB
13517# If the user explicitly request the gdbserver to be built, verify that
13518# we were in fact able to enable it.
13519if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13520 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13521fi
13522
db985757 13523# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13524# to an empty version.
c906108c
SS
13525
13526files=
13527links=
5a2402b8 13528
c906108c
SS
13529rm -f nm.h
13530if test "${nativefile}" != ""; then
0f475e27
AC
13531 case "${nativefile}" in
13532 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13533 * ) GDB_NM_FILE="${nativefile}"
13534 esac
5a2402b8
AC
13535 files="${files} ${GDB_NM_FILE}"
13536 links="${links} nm.h"
60ca704f
SE
13537
13538cat >>confdefs.h <<_ACEOF
b78960be 13539#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13540_ACEOF
5a2402b8 13541
c906108c 13542fi
5a2402b8
AC
13543
13544
bec39cab
AC
13545ac_sources="$files"
13546ac_dests="$links"
13547while test -n "$ac_sources"; do
13548 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13549 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13550 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13551done
81ecdfbb 13552ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13553
13554
c906108c
SS
13555
13556
c906108c 13557
81ecdfbb 13558$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13559
bec39cab 13560
c971b7fa 13561ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13562
13563ac_config_commands="$ac_config_commands default"
89a34d1b 13564
bec39cab
AC
13565cat >confcache <<\_ACEOF
13566# This file is a shell script that caches the results of configure
13567# tests run on this system so they can be shared between configure
13568# scripts and configure runs, see configure's option --config-cache.
13569# It is not useful on other systems. If it contains results you don't
13570# want to keep, you may remove or edit it.
13571#
13572# config.status only pays attention to the cache file if you give it
13573# the --recheck option to rerun configure.
13574#
13575# `ac_cv_env_foo' variables (set or unset) will be overridden when
13576# loading this file, other *unset* `ac_cv_foo' will be assigned the
13577# following values.
13578
13579_ACEOF
13580
13581# The following way of writing the cache mishandles newlines in values,
13582# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13583# So, we kill variables containing newlines.
bec39cab
AC
13584# Ultrix sh set writes to stderr and can't be redirected directly,
13585# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13586(
13587 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13588 eval ac_val=\$$ac_var
13589 case $ac_val in #(
13590 *${as_nl}*)
13591 case $ac_var in #(
13592 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13593$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13594 esac
13595 case $ac_var in #(
13596 _ | IFS | as_nl) ;; #(
13597 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13598 *) { eval $ac_var=; unset $ac_var;} ;;
13599 esac ;;
13600 esac
13601 done
13602
bec39cab 13603 (set) 2>&1 |
81ecdfbb
RW
13604 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13605 *${as_nl}ac_space=\ *)
13606 # `set' does not quote correctly, so add quotes: double-quote
13607 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13608 sed -n \
13609 "s/'/'\\\\''/g;
13610 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13611 ;; #(
bec39cab
AC
13612 *)
13613 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13614 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13615 ;;
81ecdfbb
RW
13616 esac |
13617 sort
13618) |
bec39cab 13619 sed '
81ecdfbb 13620 /^ac_cv_env_/b end
bec39cab 13621 t clear
81ecdfbb 13622 :clear
bec39cab
AC
13623 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13624 t end
81ecdfbb
RW
13625 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13626 :end' >>confcache
13627if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13628 if test -w "$cache_file"; then
13629 test "x$cache_file" != "x/dev/null" &&
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13631$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13632 cat confcache >$cache_file
13633 else
81ecdfbb
RW
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13635$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13636 fi
13637fi
13638rm -f confcache
13639
13640test "x$prefix" = xNONE && prefix=$ac_default_prefix
13641# Let make expand exec_prefix.
13642test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13643
bec39cab
AC
13644DEFS=-DHAVE_CONFIG_H
13645
13646ac_libobjs=
13647ac_ltlibobjs=
13648for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13649 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13650 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13651 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13652 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13653 # will be set to the directory where LIBOBJS objects are built.
13654 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13655 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13656done
13657LIBOBJS=$ac_libobjs
13658
13659LTLIBOBJS=$ac_ltlibobjs
13660
13661
85981d60 13662if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13663 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13664Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13665fi
a417dc56 13666if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13667 as_fn_error "conditional \"GMAKE\" was never defined.
13668Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13669fi
81ecdfbb
RW
13670
13671
bec39cab 13672: ${CONFIG_STATUS=./config.status}
81ecdfbb 13673ac_write_fail=0
bec39cab
AC
13674ac_clean_files_save=$ac_clean_files
13675ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13677$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13678as_write_fail=0
13679cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13680#! $SHELL
13681# Generated by $as_me.
13682# Run this file to recreate the current configuration.
13683# Compiler output produced by configure, useful for debugging
13684# configure, is in config.log if it exists.
13685
13686debug=false
13687ac_cs_recheck=false
13688ac_cs_silent=false
bec39cab 13689
81ecdfbb
RW
13690SHELL=\${CONFIG_SHELL-$SHELL}
13691export SHELL
13692_ASEOF
13693cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13694## -------------------- ##
13695## M4sh Initialization. ##
13696## -------------------- ##
13697
13698# Be more Bourne compatible
13699DUALCASE=1; export DUALCASE # for MKS sh
13700if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13701 emulate sh
13702 NULLCMD=:
81ecdfbb 13703 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13704 # is contrary to our usage. Disable this feature.
13705 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13706 setopt NO_GLOB_SUBST
13707else
13708 case `(set -o) 2>/dev/null` in #(
13709 *posix*) :
13710 set -o posix ;; #(
13711 *) :
13712 ;;
13713esac
bec39cab 13714fi
bec39cab 13715
81ecdfbb
RW
13716
13717as_nl='
13718'
13719export as_nl
13720# Printing a long string crashes Solaris 7 /usr/bin/printf.
13721as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13722as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13723as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13724# Prefer a ksh shell builtin over an external printf program on Solaris,
13725# but without wasting forks for bash or zsh.
13726if test -z "$BASH_VERSION$ZSH_VERSION" \
13727 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13728 as_echo='print -r --'
13729 as_echo_n='print -rn --'
13730elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13731 as_echo='printf %s\n'
13732 as_echo_n='printf %s'
13733else
13734 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13735 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13736 as_echo_n='/usr/ucb/echo -n'
13737 else
13738 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13739 as_echo_n_body='eval
13740 arg=$1;
13741 case $arg in #(
13742 *"$as_nl"*)
13743 expr "X$arg" : "X\\(.*\\)$as_nl";
13744 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13745 esac;
13746 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13747 '
13748 export as_echo_n_body
13749 as_echo_n='sh -c $as_echo_n_body as_echo'
13750 fi
13751 export as_echo_body
13752 as_echo='sh -c $as_echo_body as_echo'
13753fi
13754
13755# The user is always right.
13756if test "${PATH_SEPARATOR+set}" != set; then
13757 PATH_SEPARATOR=:
13758 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13759 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13760 PATH_SEPARATOR=';'
13761 }
bec39cab
AC
13762fi
13763
13764
81ecdfbb
RW
13765# IFS
13766# We need space, tab and new line, in precisely that order. Quoting is
13767# there to prevent editors from complaining about space-tab.
13768# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13769# splitting by setting IFS to empty value.)
13770IFS=" "" $as_nl"
13771
13772# Find who we are. Look in the path if we contain no directory separator.
13773case $0 in #((
13774 *[\\/]* ) as_myself=$0 ;;
13775 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13776for as_dir in $PATH
13777do
13778 IFS=$as_save_IFS
13779 test -z "$as_dir" && as_dir=.
13780 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13781 done
13782IFS=$as_save_IFS
13783
13784 ;;
13785esac
13786# We did not find ourselves, most probably we were run as `sh COMMAND'
13787# in which case we are not to be found in the path.
13788if test "x$as_myself" = x; then
13789 as_myself=$0
13790fi
13791if test ! -f "$as_myself"; then
13792 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13793 exit 1
13794fi
13795
13796# Unset variables that we do not need and which cause bugs (e.g. in
13797# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13798# suppresses any "Segmentation fault" message there. '((' could
13799# trigger a bug in pdksh 5.2.14.
13800for as_var in BASH_ENV ENV MAIL MAILPATH
13801do eval test x\${$as_var+set} = xset \
13802 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13803done
bec39cab
AC
13804PS1='$ '
13805PS2='> '
13806PS4='+ '
13807
13808# NLS nuisances.
81ecdfbb
RW
13809LC_ALL=C
13810export LC_ALL
13811LANGUAGE=C
13812export LANGUAGE
13813
13814# CDPATH.
13815(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13816
13817
13818# as_fn_error ERROR [LINENO LOG_FD]
13819# ---------------------------------
13820# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13821# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13822# script with status $?, using 1 if that was 0.
13823as_fn_error ()
13824{
13825 as_status=$?; test $as_status -eq 0 && as_status=1
13826 if test "$3"; then
13827 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13828 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13829 fi
13830 $as_echo "$as_me: error: $1" >&2
13831 as_fn_exit $as_status
13832} # as_fn_error
13833
13834
13835# as_fn_set_status STATUS
13836# -----------------------
13837# Set $? to STATUS, without forking.
13838as_fn_set_status ()
13839{
13840 return $1
13841} # as_fn_set_status
13842
13843# as_fn_exit STATUS
13844# -----------------
13845# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13846as_fn_exit ()
13847{
13848 set +e
13849 as_fn_set_status $1
13850 exit $1
13851} # as_fn_exit
13852
13853# as_fn_unset VAR
13854# ---------------
13855# Portably unset VAR.
13856as_fn_unset ()
13857{
13858 { eval $1=; unset $1;}
13859}
13860as_unset=as_fn_unset
13861# as_fn_append VAR VALUE
13862# ----------------------
13863# Append the text in VALUE to the end of the definition contained in VAR. Take
13864# advantage of any shell optimizations that allow amortized linear growth over
13865# repeated appends, instead of the typical quadratic growth present in naive
13866# implementations.
13867if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13868 eval 'as_fn_append ()
13869 {
13870 eval $1+=\$2
13871 }'
13872else
13873 as_fn_append ()
13874 {
13875 eval $1=\$$1\$2
13876 }
13877fi # as_fn_append
13878
13879# as_fn_arith ARG...
13880# ------------------
13881# Perform arithmetic evaluation on the ARGs, and store the result in the
13882# global $as_val. Take advantage of shells that can avoid forks. The arguments
13883# must be portable across $(()) and expr.
13884if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13885 eval 'as_fn_arith ()
13886 {
13887 as_val=$(( $* ))
13888 }'
13889else
13890 as_fn_arith ()
13891 {
13892 as_val=`expr "$@" || test $? -eq 1`
13893 }
13894fi # as_fn_arith
bec39cab 13895
81ecdfbb
RW
13896
13897if expr a : '\(a\)' >/dev/null 2>&1 &&
13898 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13899 as_expr=expr
13900else
13901 as_expr=false
13902fi
13903
81ecdfbb 13904if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13905 as_basename=basename
13906else
13907 as_basename=false
13908fi
13909
81ecdfbb
RW
13910if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13911 as_dirname=dirname
13912else
13913 as_dirname=false
13914fi
bec39cab 13915
81ecdfbb 13916as_me=`$as_basename -- "$0" ||
bec39cab
AC
13917$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13918 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13919 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13920$as_echo X/"$0" |
13921 sed '/^.*\/\([^/][^/]*\)\/*$/{
13922 s//\1/
13923 q
13924 }
13925 /^X\/\(\/\/\)$/{
13926 s//\1/
13927 q
13928 }
13929 /^X\/\(\/\).*/{
13930 s//\1/
13931 q
13932 }
13933 s/.*/./; q'`
b4e70030 13934
b4e70030
JB
13935# Avoid depending upon Character Ranges.
13936as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13937as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13938as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13939as_cr_digits='0123456789'
13940as_cr_alnum=$as_cr_Letters$as_cr_digits
13941
81ecdfbb
RW
13942ECHO_C= ECHO_N= ECHO_T=
13943case `echo -n x` in #(((((
13944-n*)
13945 case `echo 'xy\c'` in
13946 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13947 xy) ECHO_C='\c';;
13948 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13949 ECHO_T=' ';;
13950 esac;;
13951*)
13952 ECHO_N='-n';;
bec39cab
AC
13953esac
13954
81ecdfbb
RW
13955rm -f conf$$ conf$$.exe conf$$.file
13956if test -d conf$$.dir; then
13957 rm -f conf$$.dir/conf$$.file
bec39cab 13958else
81ecdfbb
RW
13959 rm -f conf$$.dir
13960 mkdir conf$$.dir 2>/dev/null
bec39cab 13961fi
81ecdfbb
RW
13962if (echo >conf$$.file) 2>/dev/null; then
13963 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13964 as_ln_s='ln -s'
81ecdfbb
RW
13965 # ... but there are two gotchas:
13966 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13967 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13968 # In both cases, we have to default to `cp -p'.
13969 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13970 as_ln_s='cp -p'
13971 elif ln conf$$.file conf$$ 2>/dev/null; then
13972 as_ln_s=ln
13973 else
13974 as_ln_s='cp -p'
b4e70030 13975 fi
bec39cab
AC
13976else
13977 as_ln_s='cp -p'
13978fi
81ecdfbb
RW
13979rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13980rmdir conf$$.dir 2>/dev/null
13981
13982
13983# as_fn_mkdir_p
13984# -------------
13985# Create "$as_dir" as a directory, including parents if necessary.
13986as_fn_mkdir_p ()
13987{
13988
13989 case $as_dir in #(
13990 -*) as_dir=./$as_dir;;
13991 esac
13992 test -d "$as_dir" || eval $as_mkdir_p || {
13993 as_dirs=
13994 while :; do
13995 case $as_dir in #(
13996 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13997 *) as_qdir=$as_dir;;
13998 esac
13999 as_dirs="'$as_qdir' $as_dirs"
14000 as_dir=`$as_dirname -- "$as_dir" ||
14001$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14002 X"$as_dir" : 'X\(//\)[^/]' \| \
14003 X"$as_dir" : 'X\(//\)$' \| \
14004 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14005$as_echo X"$as_dir" |
14006 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14007 s//\1/
14008 q
14009 }
14010 /^X\(\/\/\)[^/].*/{
14011 s//\1/
14012 q
14013 }
14014 /^X\(\/\/\)$/{
14015 s//\1/
14016 q
14017 }
14018 /^X\(\/\).*/{
14019 s//\1/
14020 q
14021 }
14022 s/.*/./; q'`
14023 test -d "$as_dir" && break
14024 done
14025 test -z "$as_dirs" || eval "mkdir $as_dirs"
14026 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14027
bec39cab 14028
81ecdfbb 14029} # as_fn_mkdir_p
bec39cab 14030if mkdir -p . 2>/dev/null; then
81ecdfbb 14031 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
14032else
14033 test -d ./-p && rmdir ./-p
14034 as_mkdir_p=false
14035fi
14036
81ecdfbb
RW
14037if test -x / >/dev/null 2>&1; then
14038 as_test_x='test -x'
14039else
14040 if ls -dL / >/dev/null 2>&1; then
14041 as_ls_L_option=L
14042 else
14043 as_ls_L_option=
14044 fi
14045 as_test_x='
14046 eval sh -c '\''
14047 if test -d "$1"; then
14048 test -d "$1/.";
14049 else
14050 case $1 in #(
14051 -*)set "./$1";;
14052 esac;
14053 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14054 ???[sx]*):;;*)false;;esac;fi
14055 '\'' sh
14056 '
14057fi
14058as_executable_p=$as_test_x
bec39cab
AC
14059
14060# Sed expression to map a string onto a valid CPP name.
14061as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14062
14063# Sed expression to map a string onto a valid variable name.
14064as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14065
14066
bec39cab 14067exec 6>&1
81ecdfbb
RW
14068## ----------------------------------- ##
14069## Main body of $CONFIG_STATUS script. ##
14070## ----------------------------------- ##
14071_ASEOF
14072test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14073
14074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14075# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 14076# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
14077# values after options handling.
14078ac_log="
bec39cab 14079This file was extended by $as_me, which was
81ecdfbb 14080generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
14081
14082 CONFIG_FILES = $CONFIG_FILES
14083 CONFIG_HEADERS = $CONFIG_HEADERS
14084 CONFIG_LINKS = $CONFIG_LINKS
14085 CONFIG_COMMANDS = $CONFIG_COMMANDS
14086 $ $0 $@
14087
81ecdfbb
RW
14088on `(hostname || uname -n) 2>/dev/null | sed 1q`
14089"
14090
bec39cab
AC
14091_ACEOF
14092
81ecdfbb
RW
14093case $ac_config_files in *"
14094"*) set x $ac_config_files; shift; ac_config_files=$*;;
14095esac
234b45d4 14096
81ecdfbb
RW
14097case $ac_config_headers in *"
14098"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14099esac
b4e70030 14100
b4e70030 14101
81ecdfbb
RW
14102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14103# Files that config.status was made for.
14104config_files="$ac_config_files"
14105config_headers="$ac_config_headers"
14106config_links="$ac_config_links"
14107config_commands="$ac_config_commands"
234b45d4 14108
81ecdfbb 14109_ACEOF
b4e70030 14110
81ecdfbb 14111cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 14112ac_cs_usage="\
81ecdfbb
RW
14113\`$as_me' instantiates files and other configuration actions
14114from templates according to the current configuration. Unless the files
14115and actions are specified as TAGs, all are instantiated by default.
234b45d4 14116
81ecdfbb 14117Usage: $0 [OPTION]... [TAG]...
234b45d4 14118
bec39cab 14119 -h, --help print this help, then exit
81ecdfbb
RW
14120 -V, --version print version number and configuration settings, then exit
14121 -q, --quiet, --silent
14122 do not print progress messages
bec39cab
AC
14123 -d, --debug don't remove temporary files
14124 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
14125 --file=FILE[:TEMPLATE]
14126 instantiate the configuration file FILE
14127 --header=FILE[:TEMPLATE]
14128 instantiate the configuration header FILE
234b45d4 14129
bec39cab
AC
14130Configuration files:
14131$config_files
234b45d4 14132
bec39cab
AC
14133Configuration headers:
14134$config_headers
234b45d4 14135
bec39cab
AC
14136Configuration links:
14137$config_links
234b45d4 14138
bec39cab
AC
14139Configuration commands:
14140$config_commands
14141
81ecdfbb 14142Report bugs to the package provider."
b4e70030 14143
81ecdfbb
RW
14144_ACEOF
14145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
14146ac_cs_version="\\
14147config.status
81ecdfbb
RW
14148configured by $0, generated by GNU Autoconf 2.64,
14149 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 14150
81ecdfbb 14151Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
14152This config.status script is free software; the Free Software Foundation
14153gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
14154
14155ac_pwd='$ac_pwd'
14156srcdir='$srcdir'
14157INSTALL='$INSTALL'
81ecdfbb
RW
14158AWK='$AWK'
14159test -n "\$AWK" || AWK=awk
bec39cab
AC
14160_ACEOF
14161
81ecdfbb
RW
14162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14163# The default lists apply if the user does not specify any file.
bec39cab
AC
14164ac_need_defaults=:
14165while test $# != 0
14166do
14167 case $1 in
14168 --*=*)
81ecdfbb
RW
14169 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14170 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 14171 ac_shift=:
c906108c 14172 ;;
81ecdfbb 14173 *)
bec39cab
AC
14174 ac_option=$1
14175 ac_optarg=$2
14176 ac_shift=shift
c906108c 14177 ;;
bec39cab 14178 esac
c906108c 14179
bec39cab
AC
14180 case $ac_option in
14181 # Handling of the options.
bec39cab
AC
14182 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14183 ac_cs_recheck=: ;;
81ecdfbb
RW
14184 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14185 $as_echo "$ac_cs_version"; exit ;;
14186 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14187 debug=: ;;
14188 --file | --fil | --fi | --f )
14189 $ac_shift
81ecdfbb
RW
14190 case $ac_optarg in
14191 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14192 esac
14193 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14194 ac_need_defaults=false;;
14195 --header | --heade | --head | --hea )
14196 $ac_shift
81ecdfbb
RW
14197 case $ac_optarg in
14198 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14199 esac
14200 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14201 ac_need_defaults=false;;
81ecdfbb
RW
14202 --he | --h)
14203 # Conflict between --help and --header
14204 as_fn_error "ambiguous option: \`$1'
14205Try \`$0 --help' for more information.";;
14206 --help | --hel | -h )
14207 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14209 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14210 ac_cs_silent=: ;;
c906108c 14211
bec39cab 14212 # This is an error.
81ecdfbb
RW
14213 -*) as_fn_error "unrecognized option: \`$1'
14214Try \`$0 --help' for more information." ;;
c906108c 14215
81ecdfbb
RW
14216 *) as_fn_append ac_config_targets " $1"
14217 ac_need_defaults=false ;;
c906108c 14218
bec39cab
AC
14219 esac
14220 shift
14221done
c906108c 14222
bec39cab 14223ac_configure_extra_args=
c906108c 14224
bec39cab
AC
14225if $ac_cs_silent; then
14226 exec 6>/dev/null
14227 ac_configure_extra_args="$ac_configure_extra_args --silent"
14228fi
c906108c 14229
bec39cab 14230_ACEOF
81ecdfbb 14231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14232if \$ac_cs_recheck; then
81ecdfbb
RW
14233 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14234 shift
14235 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14236 CONFIG_SHELL='$SHELL'
14237 export CONFIG_SHELL
14238 exec "\$@"
bec39cab
AC
14239fi
14240
14241_ACEOF
81ecdfbb
RW
14242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14243exec 5>>config.log
14244{
14245 echo
14246 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14247## Running $as_me. ##
14248_ASBOX
14249 $as_echo "$ac_log"
14250} >&5
bec39cab 14251
81ecdfbb
RW
14252_ACEOF
14253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14254#
81ecdfbb 14255# INIT-COMMANDS
c906108c 14256#
a417dc56 14257ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14258
bec39cab
AC
14259_ACEOF
14260
81ecdfbb 14261cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14262
81ecdfbb 14263# Handling of arguments.
bec39cab 14264for ac_config_target in $ac_config_targets
c906108c 14265do
81ecdfbb
RW
14266 case $ac_config_target in
14267 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14268 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14269 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14270 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14271 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14272 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14273 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14274 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14275 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14276
14277 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14278 esac
14279done
14280
81ecdfbb 14281
bec39cab
AC
14282# If the user did not use the arguments to specify the items to instantiate,
14283# then the envvar interface is used. Set only those that are not.
14284# We use the long form for the default assignment because of an extremely
14285# bizarre bug on SunOS 4.1.3.
14286if $ac_need_defaults; then
14287 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14288 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14289 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14290 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14291fi
14292
b4e70030 14293# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14294# simply because there is no reason against having it here, and in addition,
b4e70030 14295# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14296# Hook for its removal unless debugging.
14297# Note that there is a small window in which the directory will not be cleaned:
14298# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14299$debug ||
14300{
81ecdfbb
RW
14301 tmp=
14302 trap 'exit_status=$?
14303 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14304' 0
14305 trap 'as_fn_exit 1' 1 2 13 15
14306}
14307# Create a (secure) tmp directory for tmp files.
14308
14309{
14310 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14311 test -n "$tmp" && test -d "$tmp"
14312} ||
14313{
14314 tmp=./conf$$-$RANDOM
14315 (umask 077 && mkdir "$tmp")
14316} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14317
14318# Set up the scripts for CONFIG_FILES section.
14319# No need to generate them if there are no CONFIG_FILES.
14320# This happens for instance with `./config.status config.h'.
14321if test -n "$CONFIG_FILES"; then
14322
14323if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14324 ac_cs_awk_getline=:
14325 ac_cs_awk_pipe_init=
14326 ac_cs_awk_read_file='
14327 while ((getline aline < (F[key])) > 0)
14328 print(aline)
14329 close(F[key])'
14330 ac_cs_awk_pipe_fini=
14331else
14332 ac_cs_awk_getline=false
14333 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14334 ac_cs_awk_read_file='
14335 print "|#_!!_#|"
14336 print "cat " F[key] " &&"
14337 '$ac_cs_awk_pipe_init
14338 # The final `:' finishes the AND list.
14339 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14340fi
14341ac_cr=`echo X | tr X '\015'`
14342# On cygwin, bash can eat \r inside `` if the user requested igncr.
14343# But we know of no other shell where ac_cr would be empty at this
14344# point, so we can use a bashism as a fallback.
14345if test "x$ac_cr" = x; then
14346 eval ac_cr=\$\'\\r\'
14347fi
14348ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14349if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14350 ac_cs_awk_cr='\r'
14351else
14352 ac_cs_awk_cr=$ac_cr
14353fi
14354
14355echo 'BEGIN {' >"$tmp/subs1.awk" &&
14356_ACEOF
14357
14358# Create commands to substitute file output variables.
14359{
14360 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14361 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14362 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14363 echo "_ACAWK" &&
14364 echo "_ACEOF"
14365} >conf$$files.sh &&
14366. ./conf$$files.sh ||
14367 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14368rm -f conf$$files.sh
14369
14370{
14371 echo "cat >conf$$subs.awk <<_ACEOF" &&
14372 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14373 echo "_ACEOF"
14374} >conf$$subs.sh ||
14375 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14376ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14377ac_delim='%!_!# '
14378for ac_last_try in false false false false false :; do
14379 . ./conf$$subs.sh ||
14380 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14381
14382 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14383 if test $ac_delim_n = $ac_delim_num; then
14384 break
14385 elif $ac_last_try; then
14386 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14387 else
14388 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14389 fi
14390done
14391rm -f conf$$subs.sh
14392
14393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14394cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14395_ACEOF
14396sed -n '
14397h
14398s/^/S["/; s/!.*/"]=/
14399p
14400g
14401s/^[^!]*!//
14402:repl
14403t repl
14404s/'"$ac_delim"'$//
14405t delim
14406:nl
14407h
14408s/\(.\{148\}\).*/\1/
14409t more1
14410s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14411p
14412n
14413b repl
14414:more1
14415s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14416p
14417g
14418s/.\{148\}//
14419t nl
14420:delim
14421h
14422s/\(.\{148\}\).*/\1/
14423t more2
14424s/["\\]/\\&/g; s/^/"/; s/$/"/
14425p
14426b
14427:more2
14428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14429p
14430g
14431s/.\{148\}//
14432t delim
14433' <conf$$subs.awk | sed '
14434/^[^""]/{
14435 N
14436 s/\n//
14437}
14438' >>$CONFIG_STATUS || ac_write_fail=1
14439rm -f conf$$subs.awk
14440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14441_ACAWK
14442cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14443 for (key in S) S_is_set[key] = 1
14444 FS = "\a"
14445 \$ac_cs_awk_pipe_init
14446}
14447{
14448 line = $ 0
14449 nfields = split(line, field, "@")
14450 substed = 0
14451 len = length(field[1])
14452 for (i = 2; i < nfields; i++) {
14453 key = field[i]
14454 keylen = length(key)
14455 if (S_is_set[key]) {
14456 value = S[key]
14457 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14458 len += length(value) + length(field[++i])
14459 substed = 1
14460 } else
14461 len += 1 + keylen
14462 }
14463 if (nfields == 3 && !substed) {
14464 key = field[2]
14465 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14466 \$ac_cs_awk_read_file
14467 next
14468 }
14469 }
14470 print line
b4e70030 14471}
81ecdfbb
RW
14472\$ac_cs_awk_pipe_fini
14473_ACAWK
14474_ACEOF
14475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14476if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14477 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14478else
14479 cat
14480fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14481 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14482_ACEOF
14483
14484# VPATH may cause trouble with some makes, so we remove $(srcdir),
14485# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14486# trailing colons and then remove the whole line if VPATH becomes empty
14487# (actually we leave an empty line to preserve line numbers).
14488if test "x$srcdir" = x.; then
14489 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14490s/:*\$(srcdir):*/:/
14491s/:*\${srcdir}:*/:/
14492s/:*@srcdir@:*/:/
14493s/^\([^=]*=[ ]*\):*/\1/
14494s/:*$//
14495s/^[^=]*=[ ]*$//
14496}'
14497fi
14498
14499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14500fi # test -n "$CONFIG_FILES"
14501
14502# Set up the scripts for CONFIG_HEADERS section.
14503# No need to generate them if there are no CONFIG_HEADERS.
14504# This happens for instance with `./config.status Makefile'.
14505if test -n "$CONFIG_HEADERS"; then
14506cat >"$tmp/defines.awk" <<\_ACAWK ||
14507BEGIN {
14508_ACEOF
14509
14510# Transform confdefs.h into an awk script `defines.awk', embedded as
14511# here-document in config.status, that substitutes the proper values into
14512# config.h.in to produce config.h.
4e8d927d 14513
81ecdfbb
RW
14514# Create a delimiter string that does not exist in confdefs.h, to ease
14515# handling of long lines.
14516ac_delim='%!_!# '
14517for ac_last_try in false false :; do
14518 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14519 if test -z "$ac_t"; then
14520 break
14521 elif $ac_last_try; then
14522 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14523 else
14524 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14525 fi
14526done
4e8d927d 14527
81ecdfbb
RW
14528# For the awk script, D is an array of macro values keyed by name,
14529# likewise P contains macro parameters if any. Preserve backslash
14530# newline sequences.
14531
14532ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14533sed -n '
14534s/.\{148\}/&'"$ac_delim"'/g
14535t rset
14536:rset
14537s/^[ ]*#[ ]*define[ ][ ]*/ /
14538t def
14539d
14540:def
14541s/\\$//
14542t bsnl
14543s/["\\]/\\&/g
14544s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14545D["\1"]=" \3"/p
14546s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14547d
14548:bsnl
14549s/["\\]/\\&/g
14550s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14551D["\1"]=" \3\\\\\\n"\\/p
14552t cont
14553s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14554t cont
14555d
14556:cont
14557n
14558s/.\{148\}/&'"$ac_delim"'/g
14559t clear
14560:clear
14561s/\\$//
14562t bsnlc
14563s/["\\]/\\&/g; s/^/"/; s/$/"/p
14564d
14565:bsnlc
14566s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14567b cont
14568' <confdefs.h | sed '
14569s/'"$ac_delim"'/"\\\
14570"/g' >>$CONFIG_STATUS || ac_write_fail=1
14571
14572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14573 for (key in D) D_is_set[key] = 1
14574 FS = "\a"
14575}
14576/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14577 line = \$ 0
14578 split(line, arg, " ")
14579 if (arg[1] == "#") {
14580 defundef = arg[2]
14581 mac1 = arg[3]
14582 } else {
14583 defundef = substr(arg[1], 2)
14584 mac1 = arg[2]
14585 }
14586 split(mac1, mac2, "(") #)
14587 macro = mac2[1]
14588 prefix = substr(line, 1, index(line, defundef) - 1)
14589 if (D_is_set[macro]) {
14590 # Preserve the white space surrounding the "#".
14591 print prefix "define", macro P[macro] D[macro]
14592 next
14593 } else {
14594 # Replace #undef with comments. This is necessary, for example,
14595 # in the case of _POSIX_SOURCE, which is predefined and required
14596 # on some systems where configure will not decide to define it.
14597 if (defundef == "undef") {
14598 print "/*", prefix defundef, macro, "*/"
14599 next
14600 }
14601 }
b4e70030 14602}
81ecdfbb
RW
14603{ print }
14604_ACAWK
b4e70030 14605_ACEOF
81ecdfbb
RW
14606cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14607 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14608fi # test -n "$CONFIG_HEADERS"
4e8d927d 14609
4e8d927d 14610
81ecdfbb
RW
14611eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14612shift
14613for ac_tag
14614do
14615 case $ac_tag in
14616 :[FHLC]) ac_mode=$ac_tag; continue;;
14617 esac
14618 case $ac_mode$ac_tag in
14619 :[FHL]*:*);;
14620 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14621 :[FH]-) ac_tag=-:-;;
14622 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14623 esac
14624 ac_save_IFS=$IFS
14625 IFS=:
14626 set x $ac_tag
14627 IFS=$ac_save_IFS
14628 shift
14629 ac_file=$1
14630 shift
4e8d927d 14631
81ecdfbb
RW
14632 case $ac_mode in
14633 :L) ac_source=$1;;
14634 :[FH])
14635 ac_file_inputs=
14636 for ac_f
14637 do
14638 case $ac_f in
14639 -) ac_f="$tmp/stdin";;
14640 *) # Look for the file first in the build tree, then in the source tree
14641 # (if the path is not absolute). The absolute path cannot be DOS-style,
14642 # because $ac_f cannot contain `:'.
14643 test -f "$ac_f" ||
14644 case $ac_f in
14645 [\\/$]*) false;;
14646 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14647 esac ||
14648 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14649 esac
14650 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14651 as_fn_append ac_file_inputs " '$ac_f'"
14652 done
14653
14654 # Let's still pretend it is `configure' which instantiates (i.e., don't
14655 # use $as_me), people would be surprised to read:
14656 # /* config.h. Generated by config.status. */
14657 configure_input='Generated from '`
14658 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14659 `' by configure.'
14660 if test x"$ac_file" != x-; then
14661 configure_input="$ac_file. $configure_input"
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14663$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14664 fi
81ecdfbb
RW
14665 # Neutralize special characters interpreted by sed in replacement strings.
14666 case $configure_input in #(
14667 *\&* | *\|* | *\\* )
14668 ac_sed_conf_input=`$as_echo "$configure_input" |
14669 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14670 *) ac_sed_conf_input=$configure_input;;
14671 esac
4e8d927d 14672
81ecdfbb
RW
14673 case $ac_tag in
14674 *:-:* | *:-) cat >"$tmp/stdin" \
14675 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14676 esac
14677 ;;
c906108c
SS
14678 esac
14679
81ecdfbb 14680 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14681$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14682 X"$ac_file" : 'X\(//\)[^/]' \| \
14683 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14684 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14685$as_echo X"$ac_file" |
14686 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14687 s//\1/
14688 q
14689 }
14690 /^X\(\/\/\)[^/].*/{
14691 s//\1/
14692 q
14693 }
14694 /^X\(\/\/\)$/{
14695 s//\1/
14696 q
14697 }
14698 /^X\(\/\).*/{
14699 s//\1/
14700 q
14701 }
14702 s/.*/./; q'`
14703 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14704 ac_builddir=.
14705
81ecdfbb
RW
14706case "$ac_dir" in
14707.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14708*)
14709 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14710 # A ".." for each directory in $ac_dir_suffix.
14711 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14712 case $ac_top_builddir_sub in
14713 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14714 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14715 esac ;;
14716esac
14717ac_abs_top_builddir=$ac_pwd
14718ac_abs_builddir=$ac_pwd$ac_dir_suffix
14719# for backward compatibility:
14720ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14721
14722case $srcdir in
81ecdfbb 14723 .) # We are building in place.
bec39cab 14724 ac_srcdir=.
81ecdfbb
RW
14725 ac_top_srcdir=$ac_top_builddir_sub
14726 ac_abs_top_srcdir=$ac_pwd ;;
14727 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14728 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14729 ac_top_srcdir=$srcdir
14730 ac_abs_top_srcdir=$srcdir ;;
14731 *) # Relative name.
14732 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14733 ac_top_srcdir=$ac_top_build_prefix$srcdir
14734 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14735esac
81ecdfbb 14736ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14737
c906108c 14738
81ecdfbb
RW
14739 case $ac_mode in
14740 :F)
14741 #
14742 # CONFIG_FILE
14743 #
c906108c 14744
bec39cab
AC
14745 case $INSTALL in
14746 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14747 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14748 esac
81ecdfbb 14749_ACEOF
121ce6e5 14750
81ecdfbb
RW
14751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14752# If the template does not know about datarootdir, expand it.
14753# FIXME: This hack should be removed a few years after 2.60.
14754ac_datarootdir_hack=; ac_datarootdir_seen=
14755ac_sed_dataroot='
14756/datarootdir/ {
14757 p
14758 q
14759}
14760/@datadir@/p
14761/@docdir@/p
14762/@infodir@/p
14763/@localedir@/p
14764/@mandir@/p'
14765case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14766*datarootdir*) ac_datarootdir_seen=yes;;
14767*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14769$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14770_ACEOF
14771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14772 ac_datarootdir_hack='
14773 s&@datadir@&$datadir&g
14774 s&@docdir@&$docdir&g
14775 s&@infodir@&$infodir&g
14776 s&@localedir@&$localedir&g
14777 s&@mandir@&$mandir&g
14778 s&\\\${datarootdir}&$datarootdir&g' ;;
14779esac
4e8d927d 14780_ACEOF
81ecdfbb
RW
14781
14782# Neutralize VPATH when `$srcdir' = `.'.
14783# Shell code in configure.ac might set extrasub.
14784# FIXME: do we really want to maintain this feature?
14785cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14786ac_sed_extra="$ac_vpsub
bec39cab
AC
14787$extrasub
14788_ACEOF
81ecdfbb 14789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14790:t
14791/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14792s|@configure_input@|$ac_sed_conf_input|;t t
14793s&@top_builddir@&$ac_top_builddir_sub&;t t
14794s&@top_build_prefix@&$ac_top_build_prefix&;t t
14795s&@srcdir@&$ac_srcdir&;t t
14796s&@abs_srcdir@&$ac_abs_srcdir&;t t
14797s&@top_srcdir@&$ac_top_srcdir&;t t
14798s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14799s&@builddir@&$ac_builddir&;t t
14800s&@abs_builddir@&$ac_abs_builddir&;t t
14801s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14802s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14803$ac_datarootdir_hack
14804"
14805eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14806if $ac_cs_awk_getline; then
14807 $AWK -f "$tmp/subs.awk"
14808else
14809 $AWK -f "$tmp/subs.awk" | $SHELL
14810fi >$tmp/out \
14811 || as_fn_error "could not create $ac_file" "$LINENO" 5
14812
14813test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14814 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14815 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14817which seems to be undefined. Please make sure it is defined." >&5
14818$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14819which seems to be undefined. Please make sure it is defined." >&2;}
14820
14821 rm -f "$tmp/stdin"
bec39cab 14822 case $ac_file in
81ecdfbb
RW
14823 -) cat "$tmp/out" && rm -f "$tmp/out";;
14824 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14825 esac \
14826 || as_fn_error "could not create $ac_file" "$LINENO" 5
14827 ;;
14828 :H)
14829 #
14830 # CONFIG_HEADER
14831 #
bec39cab 14832 if test x"$ac_file" != x-; then
81ecdfbb
RW
14833 {
14834 $as_echo "/* $configure_input */" \
14835 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14836 } >"$tmp/config.h" \
14837 || as_fn_error "could not create $ac_file" "$LINENO" 5
14838 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14840$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14841 else
81ecdfbb
RW
14842 rm -f "$ac_file"
14843 mv "$tmp/config.h" "$ac_file" \
14844 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14845 fi
14846 else
81ecdfbb
RW
14847 $as_echo "/* $configure_input */" \
14848 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14849 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14850 fi
81ecdfbb
RW
14851 ;;
14852 :L)
14853 #
14854 # CONFIG_LINK
14855 #
c906108c 14856
81ecdfbb
RW
14857 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14858 :
b4e70030 14859 else
81ecdfbb
RW
14860 # Prefer the file from the source tree if names are identical.
14861 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14862 ac_source=$srcdir/$ac_source
14863 fi
b4e70030 14864
81ecdfbb
RW
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14866$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14867
81ecdfbb
RW
14868 if test ! -r "$ac_source"; then
14869 as_fn_error "$ac_source: file not found" "$LINENO" 5
14870 fi
14871 rm -f "$ac_file"
bec39cab 14872
81ecdfbb
RW
14873 # Try a relative symlink, then a hard link, then a copy.
14874 case $srcdir in
14875 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14876 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14877 esac
14878 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14879 ln "$ac_source" "$ac_file" 2>/dev/null ||
14880 cp -p "$ac_source" "$ac_file" ||
14881 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14882 fi
14883 ;;
14884 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14885$as_echo "$as_me: executing $ac_file commands" >&6;}
14886 ;;
c906108c 14887 esac
b4e70030 14888
bec39cab 14889
81ecdfbb
RW
14890 case $ac_file$ac_mode in
14891 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14892 "default":C)
c906108c
SS
14893case x$CONFIG_HEADERS in
14894xconfig.h:config.in)
14895echo > stamp-h ;;
14896esac
bec39cab 14897 ;;
81ecdfbb 14898
bec39cab 14899 esac
81ecdfbb 14900done # for ac_tag
c906108c 14901
bec39cab 14902
81ecdfbb 14903as_fn_exit 0
bec39cab 14904_ACEOF
bec39cab
AC
14905ac_clean_files=$ac_clean_files_save
14906
81ecdfbb
RW
14907test $ac_write_fail = 0 ||
14908 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14909
bec39cab
AC
14910
14911# configure is writing to config.log, and then calls config.status.
14912# config.status does its own redirection, appending to config.log.
14913# Unfortunately, on DOS this fails, as config.log is still kept open
14914# by configure, so config.status won't be able to write to it; its
14915# output is simply discarded. So we exec the FD to /dev/null,
14916# effectively closing config.log, so it can be properly (re)opened and
14917# appended to by config.status. When coming back to configure, we
14918# need to make the FD available again.
14919if test "$no_create" != yes; then
14920 ac_cs_success=:
14921 ac_config_status_args=
14922 test "$silent" = yes &&
14923 ac_config_status_args="$ac_config_status_args --quiet"
14924 exec 5>/dev/null
14925 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14926 exec 5>>config.log
14927 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14928 # would make configure fail if this is the last instruction.
81ecdfbb 14929 $ac_cs_success || as_fn_exit $?
bec39cab 14930fi
c906108c 14931
bec39cab 14932#
81ecdfbb 14933# CONFIG_SUBDIRS section.
bec39cab 14934#
c906108c
SS
14935if test "$no_recursion" != yes; then
14936
81ecdfbb
RW
14937 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14938 # so they do not pile up.
c906108c
SS
14939 ac_sub_configure_args=
14940 ac_prev=
fdc59709
PB
14941 eval "set x $ac_configure_args"
14942 shift
14943 for ac_arg
14944 do
c906108c
SS
14945 if test -n "$ac_prev"; then
14946 ac_prev=
14947 continue
14948 fi
bec39cab 14949 case $ac_arg in
c906108c
SS
14950 -cache-file | --cache-file | --cache-fil | --cache-fi \
14951 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14952 ac_prev=cache_file ;;
14953 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14954 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14955 | --c=*)
14956 ;;
14957 --config-cache | -C)
c906108c
SS
14958 ;;
14959 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14960 ac_prev=srcdir ;;
14961 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14962 ;;
bec39cab
AC
14963 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14964 ac_prev=prefix ;;
14965 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14966 ;;
81ecdfbb
RW
14967 --disable-option-checking)
14968 ;;
fdc59709
PB
14969 *)
14970 case $ac_arg in
81ecdfbb 14971 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14972 esac
81ecdfbb 14973 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14974 esac
14975 done
14976
bec39cab
AC
14977 # Always prepend --prefix to ensure using the same prefix
14978 # in subdir configurations.
fdc59709
PB
14979 ac_arg="--prefix=$prefix"
14980 case $ac_arg in
81ecdfbb 14981 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14982 esac
81ecdfbb
RW
14983 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14984
14985 # Pass --silent
14986 if test "$silent" = yes; then
14987 ac_sub_configure_args="--silent $ac_sub_configure_args"
14988 fi
14989
14990 # Always prepend --disable-option-checking to silence warnings, since
14991 # different subdirs can have different --enable and --with options.
14992 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14993
b4e70030 14994 ac_popdir=`pwd`
bec39cab 14995 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14996
14997 # Do not complain, so a configure script can configure whichever
14998 # parts of a large source tree are present.
fdc59709 14999 test -d "$srcdir/$ac_dir" || continue
c906108c 15000
81ecdfbb
RW
15001 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
15002 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
15003 $as_echo "$ac_msg" >&6
15004 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15005 ac_builddir=.
15006
81ecdfbb
RW
15007case "$ac_dir" in
15008.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15009*)
15010 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15011 # A ".." for each directory in $ac_dir_suffix.
15012 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15013 case $ac_top_builddir_sub in
15014 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15015 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15016 esac ;;
15017esac
15018ac_abs_top_builddir=$ac_pwd
15019ac_abs_builddir=$ac_pwd$ac_dir_suffix
15020# for backward compatibility:
15021ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15022
15023case $srcdir in
81ecdfbb 15024 .) # We are building in place.
bec39cab 15025 ac_srcdir=.
81ecdfbb
RW
15026 ac_top_srcdir=$ac_top_builddir_sub
15027 ac_abs_top_srcdir=$ac_pwd ;;
15028 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15029 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15030 ac_top_srcdir=$srcdir
15031 ac_abs_top_srcdir=$srcdir ;;
15032 *) # Relative name.
15033 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15034 ac_top_srcdir=$ac_top_build_prefix$srcdir
15035 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15036esac
81ecdfbb 15037ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 15038
c906108c 15039
fdc59709 15040 cd "$ac_dir"
c906108c
SS
15041
15042 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
15043 if test -f "$ac_srcdir/configure.gnu"; then
15044 ac_sub_configure=$ac_srcdir/configure.gnu
15045 elif test -f "$ac_srcdir/configure"; then
15046 ac_sub_configure=$ac_srcdir/configure
15047 elif test -f "$ac_srcdir/configure.in"; then
15048 # This should be Cygnus configure.
15049 ac_sub_configure=$ac_aux_dir/configure
c906108c 15050 else
81ecdfbb
RW
15051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
15052$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
15053 ac_sub_configure=
15054 fi
15055
15056 # The recursion is here.
15057 if test -n "$ac_sub_configure"; then
c906108c 15058 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
15059 case $cache_file in
15060 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
15061 *) # Relative name.
15062 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 15063 esac
c906108c 15064
81ecdfbb
RW
15065 { $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
15066$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 15067 # The eval makes quoting arguments work.
fdc59709
PB
15068 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
15069 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 15070 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
15071 fi
15072
fdc59709 15073 cd "$ac_popdir"
c906108c
SS
15074 done
15075fi
81ecdfbb
RW
15076if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15078$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15079fi
c906108c
SS
15080
15081
15082exit 0
This page took 2.954072 seconds and 4 git commands to generate.