]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
[thirdparty/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
608e2dbb
TT
644LTLIBLZMA
645LIBLZMA
646HAVE_LIBLZMA
81ecdfbb
RW
647WIN32LIBS
648SER_HARDWIRE
649WERROR_CFLAGS
650WARN_CFLAGS
651SYSTEM_GDBINIT
81ecdfbb
RW
652TARGET_SYSTEM_ROOT
653CONFIG_LDFLAGS
f6528abd 654RDYNAMIC
81ecdfbb 655ALLOCA
ac534cba
JB
656PYTHON_LIBS
657PYTHON_CPPFLAGS
81ecdfbb 658PYTHON_CFLAGS
ec685c5e 659python_prog_path
81ecdfbb
RW
660LTLIBEXPAT
661LIBEXPAT
662HAVE_LIBEXPAT
b8e0a31c 663JIT_READER_DIR
f997c383 664TARGET_PTR
39037522 665READLINE_TEXI_INCFLAG
81ecdfbb
RW
666READLINE_CFLAGS
667READLINE_DEPS
668READLINE
669MIG
670WINDRES
671DLLTOOL
c971b7fa 672AR
81ecdfbb
RW
673YFLAGS
674YACC
c971b7fa 675RANLIB
81ecdfbb 676LN_S
c971b7fa
PA
677INSTALL_DATA
678INSTALL_SCRIPT
679INSTALL_PROGRAM
680AWK
81ecdfbb
RW
681REPORT_BUGS_TEXI
682REPORT_BUGS_TO
683PKGVERSION
684TARGET_OBS
685subdirs
686GDB_DATADIR
687DEBUGDIR
5048e516
JK
688MAKEINFO_EXTRA_FLAGS
689MAKEINFOFLAGS
690MAKEINFO
81ecdfbb
RW
691PACKAGE
692GNULIB_STDINT_H
81ecdfbb
RW
693CATOBJEXT
694GENCAT
695INSTOBJEXT
696DATADIRNAME
697CATALOGS
698POSUB
699GMSGFMT
700XGETTEXT
701INCINTL
702LIBINTL_DEP
703LIBINTL
704USE_NLS
705SET_MAKE
706GMAKE_FALSE
707GMAKE_TRUE
708MAKE
709CCDEPMODE
710DEPDIR
711am__leading_dot
712target_os
713target_vendor
714target_cpu
715target
716host_os
717host_vendor
718host_cpu
719host
720build_os
721build_vendor
722build_cpu
723build
c971b7fa
PA
724EGREP
725GREP
726CPP
81ecdfbb
RW
727OBJEXT
728EXEEXT
729ac_ct_CC
730CPPFLAGS
731LDFLAGS
732CFLAGS
733CC
734MAINT
735MAINTAINER_MODE_FALSE
736MAINTAINER_MODE_TRUE
737target_alias
738host_alias
739build_alias
740LIBS
741ECHO_T
742ECHO_N
743ECHO_C
744DEFS
745mandir
746localedir
747libdir
748psdir
749pdfdir
750dvidir
751htmldir
752infodir
753docdir
754oldincludedir
755includedir
756localstatedir
757sharedstatedir
758sysconfdir
759datadir
760datarootdir
761libexecdir
762sbindir
763bindir
764program_transform_name
765prefix
766exec_prefix
767PACKAGE_URL
768PACKAGE_BUGREPORT
769PACKAGE_STRING
770PACKAGE_VERSION
771PACKAGE_TARNAME
772PACKAGE_NAME
773PATH_SEPARATOR
774SHELL'
a4ce5b0d 775ac_subst_files='host_makefile_frag'
81ecdfbb
RW
776ac_user_opts='
777enable_option_checking
778enable_maintainer_mode
da2f07f1
JK
779enable_plugins
780enable_largefile
81ecdfbb
RW
781with_separate_debug_dir
782with_gdb_datadir
783with_relocated_sources
7349ff92 784with_auto_load_dir
bccbefd2 785with_auto_load_safe_path
81ecdfbb
RW
786enable_targets
787enable_64_bit_bfd
788enable_gdbcli
789enable_gdbmi
790enable_tui
791enable_gdbtk
05e7c244 792with_libunwind_ia64
81ecdfbb
RW
793with_curses
794enable_profiling
795with_pkgversion
796with_bugurl
b040ad30 797with_zlib
81ecdfbb 798with_libiconv_prefix
478aac75 799with_iconv_bin
81ecdfbb 800with_system_readline
b8e0a31c 801with_jit_reader_dir
81ecdfbb
RW
802with_expat
803with_gnu_ld
804enable_rpath
805with_libexpat_prefix
806with_python
a8db4212 807enable_libmcheck
81ecdfbb
RW
808with_included_regex
809with_sysroot
810with_system_gdbinit
811enable_werror
812enable_build_warnings
813enable_gdb_build_warnings
608e2dbb
TT
814with_lzma
815with_liblzma_prefix
81ecdfbb
RW
816with_tcl
817with_tk
818with_x
819enable_sim
820enable_multi_ice
496c0e1b 821enable_gdbserver
81ecdfbb
RW
822'
823 ac_precious_vars='build_alias
824host_alias
825target_alias
826CC
827CFLAGS
828LDFLAGS
829LIBS
830CPPFLAGS
831CPP
f06e05e0
JK
832MAKEINFO
833MAKEINFOFLAGS
81ecdfbb
RW
834YACC
835YFLAGS
836XMKMF'
5ae98d25 837ac_subdirs_all='testsuite
81ecdfbb
RW
838gdbtk
839multi-ice
840gdbserver'
c906108c
SS
841
842# Initialize some variables set by options.
bec39cab
AC
843ac_init_help=
844ac_init_version=false
81ecdfbb
RW
845ac_unrecognized_opts=
846ac_unrecognized_sep=
c906108c
SS
847# The variables have the same names as the options, with
848# dashes changed to underlines.
bec39cab 849cache_file=/dev/null
c906108c 850exec_prefix=NONE
c906108c 851no_create=
c906108c
SS
852no_recursion=
853prefix=NONE
854program_prefix=NONE
855program_suffix=NONE
856program_transform_name=s,x,x,
857silent=
858site=
859srcdir=
c906108c
SS
860verbose=
861x_includes=NONE
862x_libraries=NONE
bec39cab
AC
863
864# Installation directory options.
865# These are left unexpanded so users can "make install exec_prefix=/foo"
866# and all the variables that are supposed to be based on exec_prefix
867# by default will actually change.
868# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 869# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
870bindir='${exec_prefix}/bin'
871sbindir='${exec_prefix}/sbin'
872libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
873datarootdir='${prefix}/share'
874datadir='${datarootdir}'
c906108c
SS
875sysconfdir='${prefix}/etc'
876sharedstatedir='${prefix}/com'
877localstatedir='${prefix}/var'
c906108c
SS
878includedir='${prefix}/include'
879oldincludedir='/usr/include'
81ecdfbb
RW
880docdir='${datarootdir}/doc/${PACKAGE}'
881infodir='${datarootdir}/info'
882htmldir='${docdir}'
883dvidir='${docdir}'
884pdfdir='${docdir}'
885psdir='${docdir}'
886libdir='${exec_prefix}/lib'
887localedir='${datarootdir}/locale'
888mandir='${datarootdir}/man'
c906108c 889
c906108c 890ac_prev=
81ecdfbb 891ac_dashdash=
c906108c
SS
892for ac_option
893do
c906108c
SS
894 # If the previous option needs an argument, assign it.
895 if test -n "$ac_prev"; then
81ecdfbb 896 eval $ac_prev=\$ac_option
c906108c
SS
897 ac_prev=
898 continue
899 fi
900
81ecdfbb
RW
901 case $ac_option in
902 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
903 *) ac_optarg=yes ;;
904 esac
c906108c
SS
905
906 # Accept the important Cygnus configure options, so we can diagnose typos.
907
81ecdfbb
RW
908 case $ac_dashdash$ac_option in
909 --)
910 ac_dashdash=yes ;;
c906108c
SS
911
912 -bindir | --bindir | --bindi | --bind | --bin | --bi)
913 ac_prev=bindir ;;
914 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 915 bindir=$ac_optarg ;;
c906108c
SS
916
917 -build | --build | --buil | --bui | --bu)
bec39cab 918 ac_prev=build_alias ;;
c906108c 919 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 920 build_alias=$ac_optarg ;;
c906108c
SS
921
922 -cache-file | --cache-file | --cache-fil | --cache-fi \
923 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
924 ac_prev=cache_file ;;
925 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
926 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
927 cache_file=$ac_optarg ;;
928
929 --config-cache | -C)
930 cache_file=config.cache ;;
c906108c 931
81ecdfbb 932 -datadir | --datadir | --datadi | --datad)
c906108c 933 ac_prev=datadir ;;
81ecdfbb 934 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 935 datadir=$ac_optarg ;;
c906108c 936
81ecdfbb
RW
937 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
938 | --dataroo | --dataro | --datar)
939 ac_prev=datarootdir ;;
940 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
941 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
942 datarootdir=$ac_optarg ;;
943
c906108c 944 -disable-* | --disable-*)
81ecdfbb 945 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 946 # Reject names that are not valid shell variable names.
81ecdfbb
RW
947 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
948 as_fn_error "invalid feature name: $ac_useropt"
949 ac_useropt_orig=$ac_useropt
950 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951 case $ac_user_opts in
952 *"
953"enable_$ac_useropt"
954"*) ;;
955 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
956 ac_unrecognized_sep=', ';;
957 esac
958 eval enable_$ac_useropt=no ;;
959
960 -docdir | --docdir | --docdi | --doc | --do)
961 ac_prev=docdir ;;
962 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
963 docdir=$ac_optarg ;;
964
965 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
966 ac_prev=dvidir ;;
967 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
968 dvidir=$ac_optarg ;;
c906108c
SS
969
970 -enable-* | --enable-*)
81ecdfbb 971 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 972 # Reject names that are not valid shell variable names.
81ecdfbb
RW
973 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
974 as_fn_error "invalid feature name: $ac_useropt"
975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977 case $ac_user_opts in
978 *"
979"enable_$ac_useropt"
980"*) ;;
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
b4e70030 983 esac
81ecdfbb 984 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
985
986 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
987 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
988 | --exec | --exe | --ex)
989 ac_prev=exec_prefix ;;
990 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
991 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
992 | --exec=* | --exe=* | --ex=*)
bec39cab 993 exec_prefix=$ac_optarg ;;
c906108c
SS
994
995 -gas | --gas | --ga | --g)
996 # Obsolete; use --with-gas.
997 with_gas=yes ;;
998
bec39cab
AC
999 -help | --help | --hel | --he | -h)
1000 ac_init_help=long ;;
1001 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1002 ac_init_help=recursive ;;
1003 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1004 ac_init_help=short ;;
c906108c
SS
1005
1006 -host | --host | --hos | --ho)
bec39cab 1007 ac_prev=host_alias ;;
c906108c 1008 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1009 host_alias=$ac_optarg ;;
c906108c 1010
81ecdfbb
RW
1011 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1012 ac_prev=htmldir ;;
1013 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1014 | --ht=*)
1015 htmldir=$ac_optarg ;;
1016
c906108c
SS
1017 -includedir | --includedir | --includedi | --included | --include \
1018 | --includ | --inclu | --incl | --inc)
1019 ac_prev=includedir ;;
1020 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1021 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1022 includedir=$ac_optarg ;;
c906108c
SS
1023
1024 -infodir | --infodir | --infodi | --infod | --info | --inf)
1025 ac_prev=infodir ;;
1026 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1027 infodir=$ac_optarg ;;
c906108c
SS
1028
1029 -libdir | --libdir | --libdi | --libd)
1030 ac_prev=libdir ;;
1031 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1032 libdir=$ac_optarg ;;
c906108c
SS
1033
1034 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1035 | --libexe | --libex | --libe)
1036 ac_prev=libexecdir ;;
1037 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1038 | --libexe=* | --libex=* | --libe=*)
bec39cab 1039 libexecdir=$ac_optarg ;;
c906108c 1040
81ecdfbb
RW
1041 -localedir | --localedir | --localedi | --localed | --locale)
1042 ac_prev=localedir ;;
1043 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1044 localedir=$ac_optarg ;;
1045
c906108c 1046 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1047 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1048 ac_prev=localstatedir ;;
1049 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1050 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1051 localstatedir=$ac_optarg ;;
c906108c
SS
1052
1053 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1054 ac_prev=mandir ;;
1055 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1056 mandir=$ac_optarg ;;
c906108c
SS
1057
1058 -nfp | --nfp | --nf)
1059 # Obsolete; use --without-fp.
1060 with_fp=no ;;
1061
1062 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1063 | --no-cr | --no-c | -n)
c906108c
SS
1064 no_create=yes ;;
1065
1066 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1067 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1068 no_recursion=yes ;;
1069
1070 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1071 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1072 | --oldin | --oldi | --old | --ol | --o)
1073 ac_prev=oldincludedir ;;
1074 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1075 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1076 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1077 oldincludedir=$ac_optarg ;;
c906108c
SS
1078
1079 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1080 ac_prev=prefix ;;
1081 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1082 prefix=$ac_optarg ;;
c906108c
SS
1083
1084 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1085 | --program-pre | --program-pr | --program-p)
1086 ac_prev=program_prefix ;;
1087 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1088 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1089 program_prefix=$ac_optarg ;;
c906108c
SS
1090
1091 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1092 | --program-suf | --program-su | --program-s)
1093 ac_prev=program_suffix ;;
1094 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1095 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1096 program_suffix=$ac_optarg ;;
c906108c
SS
1097
1098 -program-transform-name | --program-transform-name \
1099 | --program-transform-nam | --program-transform-na \
1100 | --program-transform-n | --program-transform- \
1101 | --program-transform | --program-transfor \
1102 | --program-transfo | --program-transf \
1103 | --program-trans | --program-tran \
1104 | --progr-tra | --program-tr | --program-t)
1105 ac_prev=program_transform_name ;;
1106 -program-transform-name=* | --program-transform-name=* \
1107 | --program-transform-nam=* | --program-transform-na=* \
1108 | --program-transform-n=* | --program-transform-=* \
1109 | --program-transform=* | --program-transfor=* \
1110 | --program-transfo=* | --program-transf=* \
1111 | --program-trans=* | --program-tran=* \
1112 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1113 program_transform_name=$ac_optarg ;;
c906108c 1114
81ecdfbb
RW
1115 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1116 ac_prev=pdfdir ;;
1117 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1118 pdfdir=$ac_optarg ;;
1119
1120 -psdir | --psdir | --psdi | --psd | --ps)
1121 ac_prev=psdir ;;
1122 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1123 psdir=$ac_optarg ;;
1124
c906108c
SS
1125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 silent=yes ;;
1128
1129 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1130 ac_prev=sbindir ;;
1131 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1132 | --sbi=* | --sb=*)
bec39cab 1133 sbindir=$ac_optarg ;;
c906108c
SS
1134
1135 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1136 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1137 | --sharedst | --shareds | --shared | --share | --shar \
1138 | --sha | --sh)
1139 ac_prev=sharedstatedir ;;
1140 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1141 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1142 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1143 | --sha=* | --sh=*)
bec39cab 1144 sharedstatedir=$ac_optarg ;;
c906108c
SS
1145
1146 -site | --site | --sit)
1147 ac_prev=site ;;
1148 -site=* | --site=* | --sit=*)
bec39cab 1149 site=$ac_optarg ;;
3ace7edb 1150
c906108c
SS
1151 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1152 ac_prev=srcdir ;;
1153 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1154 srcdir=$ac_optarg ;;
c906108c
SS
1155
1156 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1157 | --syscon | --sysco | --sysc | --sys | --sy)
1158 ac_prev=sysconfdir ;;
1159 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1160 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1161 sysconfdir=$ac_optarg ;;
c906108c
SS
1162
1163 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1164 ac_prev=target_alias ;;
c906108c 1165 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1166 target_alias=$ac_optarg ;;
c906108c
SS
1167
1168 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1169 verbose=yes ;;
1170
bec39cab
AC
1171 -version | --version | --versio | --versi | --vers | -V)
1172 ac_init_version=: ;;
c906108c
SS
1173
1174 -with-* | --with-*)
81ecdfbb 1175 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1176 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1178 as_fn_error "invalid package name: $ac_useropt"
1179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"with_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
b4e70030 1187 esac
81ecdfbb 1188 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1189
1190 -without-* | --without-*)
81ecdfbb 1191 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1192 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194 as_fn_error "invalid package name: $ac_useropt"
1195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199"with_$ac_useropt"
1200"*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=no ;;
c906108c
SS
1205
1206 --x)
1207 # Obsolete; use --with-x.
1208 with_x=yes ;;
1209
1210 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1211 | --x-incl | --x-inc | --x-in | --x-i)
1212 ac_prev=x_includes ;;
1213 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1214 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1215 x_includes=$ac_optarg ;;
c906108c
SS
1216
1217 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1218 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1219 ac_prev=x_libraries ;;
1220 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1221 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1222 x_libraries=$ac_optarg ;;
c906108c 1223
81ecdfbb
RW
1224 -*) as_fn_error "unrecognized option: \`$ac_option'
1225Try \`$0 --help' for more information."
c906108c
SS
1226 ;;
1227
bec39cab
AC
1228 *=*)
1229 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1230 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1231 case $ac_envvar in #(
1232 '' | [0-9]* | *[!_$as_cr_alnum]* )
1233 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1234 esac
1235 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1236 export $ac_envvar ;;
1237
c906108c 1238 *)
bec39cab 1239 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1240 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1241 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1242 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1243 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1244 ;;
1245
1246 esac
1247done
1248
1249if test -n "$ac_prev"; then
bec39cab 1250 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1251 as_fn_error "missing argument to $ac_option"
c906108c 1252fi
c906108c 1253
81ecdfbb
RW
1254if test -n "$ac_unrecognized_opts"; then
1255 case $enable_option_checking in
1256 no) ;;
1257 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1258 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1259 esac
81ecdfbb 1260fi
b4e70030 1261
81ecdfbb
RW
1262# Check all directory arguments for consistency.
1263for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1264 datadir sysconfdir sharedstatedir localstatedir includedir \
1265 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1266 libdir localedir mandir
b4e70030 1267do
81ecdfbb
RW
1268 eval ac_val=\$$ac_var
1269 # Remove trailing slashes.
1270 case $ac_val in
1271 */ )
1272 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1273 eval $ac_var=\$ac_val;;
1274 esac
1275 # Be sure to have absolute directory names.
b4e70030 1276 case $ac_val in
81ecdfbb
RW
1277 [\\/$]* | ?:[\\/]* ) continue;;
1278 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1279 esac
81ecdfbb 1280 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1281done
1282
bec39cab
AC
1283# There might be people who depend on the old broken behavior: `$host'
1284# used to hold the argument of --host etc.
1285# FIXME: To remove some day.
1286build=$build_alias
1287host=$host_alias
1288target=$target_alias
1289
1290# FIXME: To remove some day.
1291if test "x$host_alias" != x; then
1292 if test "x$build_alias" = x; then
1293 cross_compiling=maybe
81ecdfbb 1294 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1295 If a cross compiler is detected then cross compile mode will be used." >&2
1296 elif test "x$build_alias" != "x$host_alias"; then
1297 cross_compiling=yes
1298 fi
1299fi
c906108c 1300
bec39cab
AC
1301ac_tool_prefix=
1302test -n "$host_alias" && ac_tool_prefix=$host_alias-
1303
1304test "$silent" = yes && exec 6>/dev/null
c906108c 1305
c906108c 1306
81ecdfbb
RW
1307ac_pwd=`pwd` && test -n "$ac_pwd" &&
1308ac_ls_di=`ls -di .` &&
1309ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1310 as_fn_error "working directory cannot be determined"
1311test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1312 as_fn_error "pwd does not report name of working directory"
1313
1314
c906108c
SS
1315# Find the source files, if location was not specified.
1316if test -z "$srcdir"; then
1317 ac_srcdir_defaulted=yes
81ecdfbb
RW
1318 # Try the directory containing this script, then the parent directory.
1319 ac_confdir=`$as_dirname -- "$as_myself" ||
1320$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1321 X"$as_myself" : 'X\(//\)[^/]' \| \
1322 X"$as_myself" : 'X\(//\)$' \| \
1323 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1324$as_echo X"$as_myself" |
1325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)[^/].*/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\).*/{
1338 s//\1/
1339 q
1340 }
1341 s/.*/./; q'`
c906108c 1342 srcdir=$ac_confdir
81ecdfbb 1343 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1344 srcdir=..
1345 fi
1346else
1347 ac_srcdir_defaulted=no
1348fi
81ecdfbb
RW
1349if test ! -r "$srcdir/$ac_unique_file"; then
1350 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1351 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1352fi
1353ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1354ac_abs_confdir=`(
1355 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1356 pwd)`
1357# When building in place, set srcdir=.
1358if test "$ac_abs_confdir" = "$ac_pwd"; then
1359 srcdir=.
1360fi
1361# Remove unnecessary trailing slashes from srcdir.
1362# Double slashes in file names in object file debugging info
1363# mess up M-x gdb in Emacs.
1364case $srcdir in
1365*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1366esac
1367for ac_var in $ac_precious_vars; do
1368 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_env_${ac_var}_value=\$${ac_var}
1370 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1372done
c906108c 1373
bec39cab
AC
1374#
1375# Report the --help message.
1376#
1377if test "$ac_init_help" = "long"; then
1378 # Omit some internal or obsolete options to make the list less imposing.
1379 # This message is too long to be a string in the A/UX 3.1 sh.
1380 cat <<_ACEOF
1381\`configure' configures this package to adapt to many kinds of systems.
1382
1383Usage: $0 [OPTION]... [VAR=VALUE]...
1384
1385To assign environment variables (e.g., CC, CFLAGS...), specify them as
1386VAR=VALUE. See below for descriptions of some of the useful variables.
1387
1388Defaults for the options are specified in brackets.
1389
1390Configuration:
1391 -h, --help display this help and exit
1392 --help=short display options specific to this package
1393 --help=recursive display the short help of all the included packages
1394 -V, --version display version information and exit
1395 -q, --quiet, --silent do not print \`checking...' messages
1396 --cache-file=FILE cache test results in FILE [disabled]
1397 -C, --config-cache alias for \`--cache-file=config.cache'
1398 -n, --no-create do not create output files
1399 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1400
bec39cab
AC
1401Installation directories:
1402 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1403 [$ac_default_prefix]
bec39cab 1404 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1405 [PREFIX]
bec39cab
AC
1406
1407By default, \`make install' will install all the files in
1408\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1409an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1410for instance \`--prefix=\$HOME'.
1411
1412For better control, use the options below.
1413
1414Fine tuning of the installation directories:
81ecdfbb
RW
1415 --bindir=DIR user executables [EPREFIX/bin]
1416 --sbindir=DIR system admin executables [EPREFIX/sbin]
1417 --libexecdir=DIR program executables [EPREFIX/libexec]
1418 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1419 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1420 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1421 --libdir=DIR object code libraries [EPREFIX/lib]
1422 --includedir=DIR C header files [PREFIX/include]
1423 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1424 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1425 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1426 --infodir=DIR info documentation [DATAROOTDIR/info]
1427 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1428 --mandir=DIR man documentation [DATAROOTDIR/man]
1429 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1430 --htmldir=DIR html documentation [DOCDIR]
1431 --dvidir=DIR dvi documentation [DOCDIR]
1432 --pdfdir=DIR pdf documentation [DOCDIR]
1433 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1434_ACEOF
1435
1436 cat <<\_ACEOF
1437
9009e1ae
MR
1438Program names:
1439 --program-prefix=PREFIX prepend PREFIX to installed program names
1440 --program-suffix=SUFFIX append SUFFIX to installed program names
1441 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1442
bec39cab
AC
1443X features:
1444 --x-includes=DIR X include files are in DIR
1445 --x-libraries=DIR X library files are in DIR
1446
1447System types:
1448 --build=BUILD configure for building on BUILD [guessed]
1449 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1450 --target=TARGET configure for building compilers for TARGET [HOST]
1451_ACEOF
1452fi
1453
1454if test -n "$ac_init_help"; then
1455
1456 cat <<\_ACEOF
1457
1458Optional Features:
81ecdfbb 1459 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1460 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1461 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1462 --enable-maintainer-mode enable make rules and dependencies not useful
1463 (and sometimes confusing) to the casual installer
da2f07f1
JK
1464 --enable-plugins Enable support for plugins (defaults no)
1465 --disable-largefile omit support for large files
a1220294
TT
1466 --enable-targets=TARGETS
1467 alternative target configurations
c0993dbe 1468 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1469 --disable-gdbcli disable command-line interface (CLI)
1470 --disable-gdbmi disable machine-interface (MI)
1471 --enable-tui enable full-screen terminal user interface (TUI)
1472 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1473 --enable-profiling enable profiling of GDB
3841debe 1474 --disable-rpath do not hardcode runtime library paths
a8db4212 1475 --enable-libmcheck Try building GDB with -lmcheck if available
a1220294 1476 --enable-werror treat compile warnings as errors
32c1c914 1477 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1478 --enable-gdb-build-warnings
32c1c914 1479 enable GDB specific build-time compiler warnings if
a1220294 1480 gcc is used
32c1c914 1481 --enable-sim link gdb with simulator
bec39cab 1482 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1483 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1484 is auto)
bec39cab
AC
1485
1486Optional Packages:
1487 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1488 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1489 --with-separate-debug-dir=PATH
32c1c914 1490 look for global separate debug info in this path
62e4f60c 1491 [LIBDIR/debug]
b14b1491
TT
1492 --with-gdb-datadir=PATH look for global separate data files in this path
1493 [DATADIR/gdb]
29b0e8a2 1494 --with-relocated-sources=PATH
32c1c914 1495 automatically relocate this path for source files
7349ff92 1496 --with-auto-load-dir=PATH
aff139ff 1497 directories from which to load auto-loaded scripts
1564a261 1498 [$debugdir:$datadir/auto-load]
bccbefd2 1499 --with-auto-load-safe-path=PATH
aff139ff 1500 directories safe to hold auto-loaded files
7349ff92 1501 [--with-auto-load-dir]
bccbefd2
JK
1502 --without-auto-load-safe-path
1503 do not restrict auto-loaded files locations
05e7c244 1504 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1505 --with-curses use the curses library instead of the termcap
1506 library
c16158bc
JM
1507 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1508 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1509 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1510 --with-libiconv-prefix=DIR
1511 search for libiconv in DIR/include and DIR/lib
478aac75 1512 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1513 --with-system-readline use installed readline library
b8e0a31c
SD
1514 --with-jit-reader-dir=PATH
1515 directory to load the JIT readers from
5c39566f 1516 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1517 --with-gnu-ld assume the C compiler uses GNU ld default=no
1518 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1519 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1520 --with-python[=PYTHON] include python support
1521 (auto/yes/no/<python-program>)
a1220294
TT
1522 --without-included-regex
1523 don't use included regex; this is the default on
1524 systems with version 2 of the GNU C library (use
1525 with caution on other system)
81ecdfbb 1526 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1527 --with-system-gdbinit=PATH
32c1c914 1528 automatically load a system-wide gdbinit file
608e2dbb
TT
1529 --with-lzma support lzma compression (auto/yes/no)
1530 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1531 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1532 --with-tcl directory containing tcl configuration (tclConfig.sh)
1533 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1534 --with-x use the X Window System
bec39cab
AC
1535
1536Some influential environment variables:
1537 CC C compiler command
1538 CFLAGS C compiler flags
1539 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1540 nonstandard directory <lib dir>
81ecdfbb
RW
1541 LIBS libraries to pass to the linker, e.g. -l<library>
1542 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1543 you have headers in a nonstandard directory <include dir>
bec39cab 1544 CPP C preprocessor
f06e05e0
JK
1545 MAKEINFO Parent configure detects if it is of sufficient version.
1546 MAKEINFOFLAGS
1547 Parameters for MAKEINFO.
81ecdfbb
RW
1548 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1549 the first program found out of: `bison -y', `byacc', `yacc'.
1550 YFLAGS The list of arguments that will be passed by default to $YACC.
1551 This script will default YFLAGS to the empty string to avoid a
1552 default value of `-d' given by some make applications.
1553 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1554
1555Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.
1557
81ecdfbb 1558Report bugs to the package provider.
bec39cab 1559_ACEOF
81ecdfbb 1560ac_status=$?
bec39cab
AC
1561fi
1562
1563if test "$ac_init_help" = "recursive"; then
1564 # If there are subdirs, report their specific --help.
bec39cab 1565 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1566 test -d "$ac_dir" ||
1567 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1568 continue
bec39cab
AC
1569 ac_builddir=.
1570
81ecdfbb
RW
1571case "$ac_dir" in
1572.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573*)
1574 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1575 # A ".." for each directory in $ac_dir_suffix.
1576 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1577 case $ac_top_builddir_sub in
1578 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1580 esac ;;
1581esac
1582ac_abs_top_builddir=$ac_pwd
1583ac_abs_builddir=$ac_pwd$ac_dir_suffix
1584# for backward compatibility:
1585ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1586
1587case $srcdir in
81ecdfbb 1588 .) # We are building in place.
bec39cab 1589 ac_srcdir=.
81ecdfbb
RW
1590 ac_top_srcdir=$ac_top_builddir_sub
1591 ac_abs_top_srcdir=$ac_pwd ;;
1592 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1593 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1594 ac_top_srcdir=$srcdir
1595 ac_abs_top_srcdir=$srcdir ;;
1596 *) # Relative name.
1597 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1598 ac_top_srcdir=$ac_top_build_prefix$srcdir
1599 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1600esac
81ecdfbb 1601ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1602
81ecdfbb
RW
1603 cd "$ac_dir" || { ac_status=$?; continue; }
1604 # Check for guested configure.
1605 if test -f "$ac_srcdir/configure.gnu"; then
1606 echo &&
1607 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1608 elif test -f "$ac_srcdir/configure"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1611 else
81ecdfbb
RW
1612 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1613 fi || ac_status=$?
1614 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1615 done
1616fi
1617
81ecdfbb 1618test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1619if $ac_init_version; then
1620 cat <<\_ACEOF
81ecdfbb
RW
1621configure
1622generated by GNU Autoconf 2.64
bec39cab 1623
81ecdfbb 1624Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1625This configure script is free software; the Free Software Foundation
1626gives unlimited permission to copy, distribute and modify it.
1627_ACEOF
81ecdfbb 1628 exit
bec39cab 1629fi
bec39cab 1630
81ecdfbb
RW
1631## ------------------------ ##
1632## Autoconf initialization. ##
1633## ------------------------ ##
bec39cab 1634
81ecdfbb
RW
1635# ac_fn_c_try_compile LINENO
1636# --------------------------
1637# Try to compile conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_compile ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext
1642 if { { ac_try="$ac_compile"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_compile") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest.$ac_objext; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1665
81ecdfbb
RW
1666 ac_retval=1
1667fi
1668 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1669 return $ac_retval
1670
1671} # ac_fn_c_try_compile
1672
1673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
bec39cab 1677{
81ecdfbb
RW
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694 test $ac_status = 0; } >/dev/null && {
1695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1702
81ecdfbb
RW
1703 ac_retval=1
1704fi
1705 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1706 return $ac_retval
bec39cab 1707
81ecdfbb 1708} # ac_fn_c_try_cpp
bec39cab 1709
81ecdfbb
RW
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
1721if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
bec39cab 1744
81ecdfbb
RW
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
1757rm -f conftest.err conftest.$ac_ext
1758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
bec39cab 1760
81ecdfbb
RW
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1780 ;;
1781esac
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1783$as_echo_n "checking for $2... " >&6; }
1784if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1785 $as_echo_n "(cached) " >&6
1786else
1787 eval "$3=\$ac_header_compiler"
1788fi
1789eval ac_res=\$$3
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1791$as_echo "$ac_res" >&6; }
1792fi
1793 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1794
81ecdfbb 1795} # ac_fn_c_check_header_mongrel
bec39cab 1796
81ecdfbb
RW
1797# ac_fn_c_try_run LINENO
1798# ----------------------
1799# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1800# that executables *can* be run.
1801ac_fn_c_try_run ()
1802{
1803 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1804 if { { ac_try="$ac_link"
1805case "(($ac_try" in
1806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807 *) ac_try_echo=$ac_try;;
1808esac
1809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810$as_echo "$ac_try_echo"; } >&5
1811 (eval "$ac_link") 2>&5
1812 ac_status=$?
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1815 { { case "(($ac_try" in
1816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1817 *) ac_try_echo=$ac_try;;
1818esac
1819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1820$as_echo "$ac_try_echo"; } >&5
1821 (eval "$ac_try") 2>&5
1822 ac_status=$?
1823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1824 test $ac_status = 0; }; }; then :
1825 ac_retval=0
1826else
1827 $as_echo "$as_me: program exited with status $ac_status" >&5
1828 $as_echo "$as_me: failed program was:" >&5
1829sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1830
81ecdfbb
RW
1831 ac_retval=$ac_status
1832fi
1833 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1834 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1835 return $ac_retval
bec39cab 1836
81ecdfbb 1837} # ac_fn_c_try_run
bec39cab 1838
81ecdfbb
RW
1839# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1840# -------------------------------------------------------
1841# Tests whether HEADER exists and can be compiled using the include files in
1842# INCLUDES, setting the cache variable VAR accordingly.
1843ac_fn_c_check_header_compile ()
1844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
1848if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1849 $as_echo_n "(cached) " >&6
1850else
1851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1852/* end confdefs.h. */
1853$4
1854#include <$2>
bec39cab 1855_ACEOF
81ecdfbb
RW
1856if ac_fn_c_try_compile "$LINENO"; then :
1857 eval "$3=yes"
1858else
1859 eval "$3=no"
1860fi
1861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1867
81ecdfbb 1868} # ac_fn_c_check_header_compile
bec39cab 1869
81ecdfbb
RW
1870# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1871# --------------------------------------------
1872# Tries to find the compile-time value of EXPR in a program that includes
1873# INCLUDES, setting VAR accordingly. Returns whether the value could be
1874# computed
1875ac_fn_c_compute_int ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if test "$cross_compiling" = yes; then
1879 # Depending upon the size, compute the lo and hi bounds.
1880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883int
1884main ()
1885{
1886static int test_array [1 - 2 * !(($2) >= 0)];
1887test_array [0] = 0
bec39cab 1888
81ecdfbb
RW
1889 ;
1890 return 0;
1891}
1892_ACEOF
1893if ac_fn_c_try_compile "$LINENO"; then :
1894 ac_lo=0 ac_mid=0
1895 while :; do
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899int
1900main ()
1901{
1902static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1903test_array [0] = 0
bec39cab 1904
81ecdfbb
RW
1905 ;
1906 return 0;
1907}
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 ac_hi=$ac_mid; break
1911else
1912 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1913 if test $ac_lo -le $ac_mid; then
1914 ac_lo= ac_hi=
1915 break
1916 fi
1917 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1918fi
81ecdfbb
RW
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920 done
c906108c 1921else
81ecdfbb
RW
1922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923/* end confdefs.h. */
1924$4
1925int
1926main ()
1927{
1928static int test_array [1 - 2 * !(($2) < 0)];
1929test_array [0] = 0
bec39cab 1930
81ecdfbb
RW
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 ac_hi=-1 ac_mid=-1
1937 while :; do
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1945test_array [0] = 0
bec39cab 1946
81ecdfbb
RW
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 ac_lo=$ac_mid; break
1953else
1954 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1955 if test $ac_mid -le $ac_hi; then
1956 ac_lo= ac_hi=
1957 break
1958 fi
1959 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962 done
1963else
1964 ac_lo= ac_hi=
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969# Binary search between lo and hi bounds.
1970while test "x$ac_lo" != "x$ac_hi"; do
1971 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973/* end confdefs.h. */
1974$4
1975int
1976main ()
1977{
1978static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1979test_array [0] = 0
bec39cab 1980
81ecdfbb
RW
1981 ;
1982 return 0;
1983}
1984_ACEOF
1985if ac_fn_c_try_compile "$LINENO"; then :
1986 ac_hi=$ac_mid
1987else
1988 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1991done
1992case $ac_lo in #((
1993?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1994'') ac_retval=1 ;;
1995esac
1996 else
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000static long int longval () { return $2; }
2001static unsigned long int ulongval () { return $2; }
2002#include <stdio.h>
2003#include <stdlib.h>
2004int
2005main ()
2006{
bec39cab 2007
81ecdfbb
RW
2008 FILE *f = fopen ("conftest.val", "w");
2009 if (! f)
2010 return 1;
2011 if (($2) < 0)
2012 {
2013 long int i = longval ();
2014 if (i != ($2))
2015 return 1;
2016 fprintf (f, "%ld", i);
2017 }
2018 else
2019 {
2020 unsigned long int i = ulongval ();
2021 if (i != ($2))
2022 return 1;
2023 fprintf (f, "%lu", i);
2024 }
2025 /* Do not output a trailing newline, as this causes \r\n confusion
2026 on some platforms. */
2027 return ferror (f) || fclose (f) != 0;
bec39cab 2028
81ecdfbb
RW
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_run "$LINENO"; then :
2034 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2035else
2036 ac_retval=1
2037fi
2038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2039 conftest.$ac_objext conftest.beam conftest.$ac_ext
2040rm -f conftest.val
bec39cab 2041
81ecdfbb
RW
2042 fi
2043 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2044 return $ac_retval
bec39cab 2045
81ecdfbb 2046} # ac_fn_c_compute_int
bec39cab 2047
c971b7fa
PA
2048# ac_fn_c_try_link LINENO
2049# -----------------------
2050# Try to link conftest.$ac_ext, and return whether this succeeded.
2051ac_fn_c_try_link ()
2052{
2053 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054 rm -f conftest.$ac_objext conftest$ac_exeext
2055 if { { ac_try="$ac_link"
2056case "(($ac_try" in
2057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2058 *) ac_try_echo=$ac_try;;
2059esac
2060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2061$as_echo "$ac_try_echo"; } >&5
2062 (eval "$ac_link") 2>conftest.err
2063 ac_status=$?
2064 if test -s conftest.err; then
2065 grep -v '^ *+' conftest.err >conftest.er1
2066 cat conftest.er1 >&5
2067 mv -f conftest.er1 conftest.err
2068 fi
2069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2070 test $ac_status = 0; } && {
2071 test -z "$ac_c_werror_flag" ||
2072 test ! -s conftest.err
2073 } && test -s conftest$ac_exeext && {
2074 test "$cross_compiling" = yes ||
2075 $as_test_x conftest$ac_exeext
2076 }; then :
2077 ac_retval=0
2078else
2079 $as_echo "$as_me: failed program was:" >&5
2080sed 's/^/| /' conftest.$ac_ext >&5
2081
2082 ac_retval=1
2083fi
2084 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2085 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2086 # interfere with the next link command; also delete a directory that is
2087 # left behind by Apple's compiler. We do this before executing the actions.
2088 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2089 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2090 return $ac_retval
2091
2092} # ac_fn_c_try_link
2093
55a8c076
YQ
2094# ac_fn_c_check_func LINENO FUNC VAR
2095# ----------------------------------
2096# Tests whether FUNC exists, setting the cache variable VAR accordingly
2097ac_fn_c_check_func ()
81ecdfbb
RW
2098{
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2101$as_echo_n "checking for $2... " >&6; }
2102if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2103 $as_echo_n "(cached) " >&6
2104else
81ecdfbb
RW
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
55a8c076
YQ
2107/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2108 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2109#define $2 innocuous_$2
2110
2111/* System header to define __stub macros and hopefully few prototypes,
2112 which can conflict with char $2 (); below.
2113 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2114 <limits.h> exists even on freestanding compilers. */
2115
2116#ifdef __STDC__
2117# include <limits.h>
2118#else
2119# include <assert.h>
2120#endif
2121
2122#undef $2
2123
2124/* Override any GCC internal prototype to avoid an error.
2125 Use char because int might match the return type of a GCC
2126 builtin and then its argument prototype would still apply. */
2127#ifdef __cplusplus
2128extern "C"
2129#endif
2130char $2 ();
2131/* The GNU C library defines this for functions which it implements
2132 to always fail with ENOSYS. Some functions are actually named
2133 something starting with __ and the normal name is an alias. */
2134#if defined __stub_$2 || defined __stub___$2
2135choke me
2136#endif
2137
2138int
2139main ()
2140{
2141return $2 ();
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_link "$LINENO"; then :
2147 eval "$3=yes"
2148else
2149 eval "$3=no"
2150fi
2151rm -f core conftest.err conftest.$ac_objext \
2152 conftest$ac_exeext conftest.$ac_ext
2153fi
2154eval ac_res=\$$3
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2156$as_echo "$ac_res" >&6; }
2157 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2158
2159} # ac_fn_c_check_func
2160
770d76d7
PA
2161# ac_fn_c_check_decl LINENO SYMBOL VAR
2162# ------------------------------------
2163# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2164ac_fn_c_check_decl ()
2165{
2166 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2167 as_decl_name=`echo $2|sed 's/ *(.*//'`
2168 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2170$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2171if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2172 $as_echo_n "(cached) " >&6
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176$4
2177int
2178main ()
2179{
2180#ifndef $as_decl_name
2181#ifdef __cplusplus
2182 (void) $as_decl_use;
2183#else
2184 (void) $as_decl_name;
2185#endif
2186#endif
2187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 eval "$3=yes"
2194else
2195 eval "$3=no"
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198fi
2199eval ac_res=\$$3
2200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2201$as_echo "$ac_res" >&6; }
2202 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2203
2204} # ac_fn_c_check_decl
2205
55a8c076
YQ
2206# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2207# ----------------------------------------------------
2208# Tries to find if the field MEMBER exists in type AGGR, after including
2209# INCLUDES, setting cache variable VAR accordingly.
2210ac_fn_c_check_member ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2214$as_echo_n "checking for $2.$3... " >&6; }
2215if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2216 $as_echo_n "(cached) " >&6
2217else
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220$5
2221int
2222main ()
2223{
2224static $2 ac_aggr;
2225if (ac_aggr.$3)
2226return 0;
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_compile "$LINENO"; then :
2232 eval "$4=yes"
2233else
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h. */
2236$5
2237int
2238main ()
2239{
2240static $2 ac_aggr;
2241if (sizeof ac_aggr.$3)
2242return 0;
2243 ;
2244 return 0;
2245}
2246_ACEOF
2247if ac_fn_c_try_compile "$LINENO"; then :
2248 eval "$4=yes"
2249else
2250 eval "$4=no"
2251fi
2252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2253fi
2254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255fi
2256eval ac_res=\$$4
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258$as_echo "$ac_res" >&6; }
2259 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2260
2261} # ac_fn_c_check_member
2262
2263# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2264# -------------------------------------------
2265# Tests whether TYPE exists after having included INCLUDES, setting cache
2266# variable VAR accordingly.
2267ac_fn_c_check_type ()
2268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2271$as_echo_n "checking for $2... " >&6; }
2272if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2273 $as_echo_n "(cached) " >&6
2274else
2275 eval "$3=no"
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$4
2279int
2280main ()
2281{
2282if (sizeof ($2))
2283 return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291$4
2292int
2293main ()
2294{
2295if (sizeof (($2)))
2296 return 0;
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2302
81ecdfbb
RW
2303else
2304 eval "$3=yes"
2305fi
2306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307fi
2308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309fi
2310eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
2313 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2314
81ecdfbb
RW
2315} # ac_fn_c_check_type
2316cat >config.log <<_ACEOF
2317This file contains any messages produced by compilers while
2318running configure, to aid debugging if configure makes a mistake.
d5af19ba 2319
81ecdfbb
RW
2320It was created by $as_me, which was
2321generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2322
81ecdfbb 2323 $ $0 $@
413ccac7 2324
81ecdfbb
RW
2325_ACEOF
2326exec 5>>config.log
2327{
2328cat <<_ASUNAME
2329## --------- ##
2330## Platform. ##
2331## --------- ##
413ccac7 2332
81ecdfbb
RW
2333hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2334uname -m = `(uname -m) 2>/dev/null || echo unknown`
2335uname -r = `(uname -r) 2>/dev/null || echo unknown`
2336uname -s = `(uname -s) 2>/dev/null || echo unknown`
2337uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2338
81ecdfbb
RW
2339/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2340/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2341
81ecdfbb
RW
2342/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2343/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2344/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2345/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2346/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2347/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2348/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2349
81ecdfbb 2350_ASUNAME
bec39cab 2351
bec39cab
AC
2352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2353for as_dir in $PATH
2354do
2355 IFS=$as_save_IFS
2356 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2357 $as_echo "PATH: $as_dir"
2358 done
2359IFS=$as_save_IFS
bec39cab 2360
81ecdfbb 2361} >&5
bec39cab 2362
81ecdfbb 2363cat >&5 <<_ACEOF
bec39cab 2364
bec39cab 2365
81ecdfbb
RW
2366## ----------- ##
2367## Core tests. ##
2368## ----------- ##
2369
2370_ACEOF
2371
2372
2373# Keep a trace of the command line.
2374# Strip out --no-create and --no-recursion so they do not pile up.
2375# Strip out --silent because we don't want to record it for future runs.
2376# Also quote any args containing shell meta-characters.
2377# Make two passes to allow for proper duplicate-argument suppression.
2378ac_configure_args=
2379ac_configure_args0=
2380ac_configure_args1=
2381ac_must_keep_next=false
2382for ac_pass in 1 2
2383do
2384 for ac_arg
2385 do
2386 case $ac_arg in
2387 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2388 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2389 | -silent | --silent | --silen | --sile | --sil)
2390 continue ;;
2391 *\'*)
2392 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2393 esac
2394 case $ac_pass in
2395 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2396 2)
2397 as_fn_append ac_configure_args1 " '$ac_arg'"
2398 if test $ac_must_keep_next = true; then
2399 ac_must_keep_next=false # Got value, back to normal.
2400 else
2401 case $ac_arg in
2402 *=* | --config-cache | -C | -disable-* | --disable-* \
2403 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2404 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2405 | -with-* | --with-* | -without-* | --without-* | --x)
2406 case "$ac_configure_args0 " in
2407 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2408 esac
2409 ;;
2410 -* ) ac_must_keep_next=true ;;
2411 esac
2412 fi
2413 as_fn_append ac_configure_args " '$ac_arg'"
2414 ;;
2415 esac
2416 done
2417done
2418{ ac_configure_args0=; unset ac_configure_args0;}
2419{ ac_configure_args1=; unset ac_configure_args1;}
2420
2421# When interrupted or exit'd, cleanup temporary files, and complete
2422# config.log. We remove comments because anyway the quotes in there
2423# would cause problems or look ugly.
2424# WARNING: Use '\'' to represent an apostrophe within the trap.
2425# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2426trap 'exit_status=$?
2427 # Save into config.log some information that might help in debugging.
2428 {
2429 echo
2430
2431 cat <<\_ASBOX
2432## ---------------- ##
2433## Cache variables. ##
2434## ---------------- ##
2435_ASBOX
2436 echo
2437 # The following way of writing the cache mishandles newlines in values,
2438(
2439 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2440 eval ac_val=\$$ac_var
2441 case $ac_val in #(
2442 *${as_nl}*)
2443 case $ac_var in #(
2444 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2445$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2446 esac
2447 case $ac_var in #(
2448 _ | IFS | as_nl) ;; #(
2449 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2450 *) { eval $ac_var=; unset $ac_var;} ;;
2451 esac ;;
2452 esac
2453 done
2454 (set) 2>&1 |
2455 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2456 *${as_nl}ac_space=\ *)
2457 sed -n \
2458 "s/'\''/'\''\\\\'\'''\''/g;
2459 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2460 ;; #(
2461 *)
2462 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2463 ;;
2464 esac |
2465 sort
2466)
2467 echo
2468
2469 cat <<\_ASBOX
2470## ----------------- ##
2471## Output variables. ##
2472## ----------------- ##
2473_ASBOX
2474 echo
2475 for ac_var in $ac_subst_vars
2476 do
2477 eval ac_val=\$$ac_var
2478 case $ac_val in
2479 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2480 esac
2481 $as_echo "$ac_var='\''$ac_val'\''"
2482 done | sort
2483 echo
2484
2485 if test -n "$ac_subst_files"; then
2486 cat <<\_ASBOX
2487## ------------------- ##
2488## File substitutions. ##
2489## ------------------- ##
2490_ASBOX
2491 echo
2492 for ac_var in $ac_subst_files
2493 do
2494 eval ac_val=\$$ac_var
2495 case $ac_val in
2496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2497 esac
2498 $as_echo "$ac_var='\''$ac_val'\''"
2499 done | sort
2500 echo
2501 fi
2502
2503 if test -s confdefs.h; then
2504 cat <<\_ASBOX
2505## ----------- ##
2506## confdefs.h. ##
2507## ----------- ##
2508_ASBOX
2509 echo
2510 cat confdefs.h
2511 echo
2512 fi
2513 test "$ac_signal" != 0 &&
2514 $as_echo "$as_me: caught signal $ac_signal"
2515 $as_echo "$as_me: exit $exit_status"
2516 } >&5
2517 rm -f core *.core core.conftest.* &&
2518 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2519 exit $exit_status
2520' 0
2521for ac_signal in 1 2 13 15; do
2522 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2523done
2524ac_signal=0
2525
2526# confdefs.h avoids OS command line length limits that DEFS can exceed.
2527rm -f -r conftest* confdefs.h
2528
2529$as_echo "/* confdefs.h */" > confdefs.h
2530
2531# Predefined preprocessor variables.
2532
2533cat >>confdefs.h <<_ACEOF
2534#define PACKAGE_NAME "$PACKAGE_NAME"
2535_ACEOF
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2539_ACEOF
2540
2541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_VERSION "$PACKAGE_VERSION"
2543_ACEOF
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_STRING "$PACKAGE_STRING"
2547_ACEOF
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2551_ACEOF
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_URL "$PACKAGE_URL"
2555_ACEOF
2556
2557
2558# Let the site file select an alternate cache file if it wants to.
2559# Prefer an explicitly selected file to automatically selected ones.
2560ac_site_file1=NONE
2561ac_site_file2=NONE
2562if test -n "$CONFIG_SITE"; then
2563 ac_site_file1=$CONFIG_SITE
2564elif test "x$prefix" != xNONE; then
2565 ac_site_file1=$prefix/share/config.site
2566 ac_site_file2=$prefix/etc/config.site
2567else
2568 ac_site_file1=$ac_default_prefix/share/config.site
2569 ac_site_file2=$ac_default_prefix/etc/config.site
2570fi
2571for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2572do
2573 test "x$ac_site_file" = xNONE && continue
2574 if test -r "$ac_site_file"; then
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2576$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2577 sed 's/^/| /' "$ac_site_file" >&5
2578 . "$ac_site_file"
2579 fi
2580done
2581
2582if test -r "$cache_file"; then
2583 # Some versions of bash will fail to source /dev/null (special
2584 # files actually), so we avoid doing that.
2585 if test -f "$cache_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2587$as_echo "$as_me: loading cache $cache_file" >&6;}
2588 case $cache_file in
2589 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2590 *) . "./$cache_file";;
2591 esac
2592 fi
2593else
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2595$as_echo "$as_me: creating cache $cache_file" >&6;}
2596 >$cache_file
bec39cab
AC
2597fi
2598
81ecdfbb
RW
2599# Check that the precious variables saved in the cache have kept the same
2600# value.
2601ac_cache_corrupted=false
2602for ac_var in $ac_precious_vars; do
2603 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2604 eval ac_new_set=\$ac_env_${ac_var}_set
2605 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2606 eval ac_new_val=\$ac_env_${ac_var}_value
2607 case $ac_old_set,$ac_new_set in
2608 set,)
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2610$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2611 ac_cache_corrupted=: ;;
2612 ,set)
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2614$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2615 ac_cache_corrupted=: ;;
2616 ,);;
2617 *)
2618 if test "x$ac_old_val" != "x$ac_new_val"; then
2619 # differences in whitespace do not lead to failure.
2620 ac_old_val_w=`echo x $ac_old_val`
2621 ac_new_val_w=`echo x $ac_new_val`
2622 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2624$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2625 ac_cache_corrupted=:
2626 else
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2628$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2629 eval $ac_var=\$ac_old_val
2630 fi
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2632$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2634$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2635 fi;;
2636 esac
2637 # Pass precious variables to config.status.
2638 if test "$ac_new_set" = set; then
2639 case $ac_new_val in
2640 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2641 *) ac_arg=$ac_var=$ac_new_val ;;
2642 esac
2643 case " $ac_configure_args " in
2644 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2645 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2646 esac
2647 fi
2648done
2649if $ac_cache_corrupted; then
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2653$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2654 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2655fi
2656## -------------------- ##
2657## Main body of script. ##
2658## -------------------- ##
2659
2660ac_ext=c
2661ac_cpp='$CPP $CPPFLAGS'
2662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2664ac_compiler_gnu=$ac_cv_c_compiler_gnu
2665
2666
2667
2668
2669
2670ac_config_headers="$ac_config_headers config.h:config.in"
2671
2672
2673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2674$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2675 # Check whether --enable-maintainer-mode was given.
2676if test "${enable_maintainer_mode+set}" = set; then :
2677 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2678else
2679 USE_MAINTAINER_MODE=no
2680fi
2681
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2683$as_echo "$USE_MAINTAINER_MODE" >&6; }
2684 if test $USE_MAINTAINER_MODE = yes; then
2685 MAINTAINER_MODE_TRUE=
2686 MAINTAINER_MODE_FALSE='#'
2687else
2688 MAINTAINER_MODE_TRUE='#'
2689 MAINTAINER_MODE_FALSE=
2690fi
2691
2692 MAINT=$MAINTAINER_MODE_TRUE
2693
2694
2695
f5f1cdb6
JK
2696# Provide more thorough testing by -lmcheck.
2697# Set it to 'true' for development snapshots, 'false' for releases or
2698# pre-releases.
2699development=true
2700
81ecdfbb
RW
2701ac_ext=c
2702ac_cpp='$CPP $CPPFLAGS'
2703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2705ac_compiler_gnu=$ac_cv_c_compiler_gnu
2706if test -n "$ac_tool_prefix"; then
2707 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2708set dummy ${ac_tool_prefix}gcc; ac_word=$2
2709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2710$as_echo_n "checking for $ac_word... " >&6; }
2711if test "${ac_cv_prog_CC+set}" = set; then :
2712 $as_echo_n "(cached) " >&6
c906108c
SS
2713else
2714 if test -n "$CC"; then
2715 ac_cv_prog_CC="$CC" # Let the user override the test.
2716else
bec39cab
AC
2717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2718for as_dir in $PATH
2719do
2720 IFS=$as_save_IFS
2721 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2722 for ac_exec_ext in '' $ac_executable_extensions; do
2723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2724 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2726 break 2
2727 fi
2728done
81ecdfbb
RW
2729 done
2730IFS=$as_save_IFS
bec39cab 2731
c906108c
SS
2732fi
2733fi
bec39cab 2734CC=$ac_cv_prog_CC
c906108c 2735if test -n "$CC"; then
81ecdfbb
RW
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2737$as_echo "$CC" >&6; }
c906108c 2738else
81ecdfbb
RW
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2740$as_echo "no" >&6; }
c906108c
SS
2741fi
2742
81ecdfbb 2743
b4e70030
JB
2744fi
2745if test -z "$ac_cv_prog_CC"; then
2746 ac_ct_CC=$CC
81ecdfbb
RW
2747 # Extract the first word of "gcc", so it can be a program name with args.
2748set dummy gcc; ac_word=$2
2749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2750$as_echo_n "checking for $ac_word... " >&6; }
2751if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2752 $as_echo_n "(cached) " >&6
b4e70030
JB
2753else
2754 if test -n "$ac_ct_CC"; then
2755 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2756else
2757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2758for as_dir in $PATH
2759do
2760 IFS=$as_save_IFS
2761 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2762 for ac_exec_ext in '' $ac_executable_extensions; do
2763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2764 ac_cv_prog_ac_ct_CC="gcc"
2765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2766 break 2
4e8d927d 2767 fi
b4e70030 2768done
81ecdfbb
RW
2769 done
2770IFS=$as_save_IFS
b4e70030
JB
2771
2772fi
2773fi
2774ac_ct_CC=$ac_cv_prog_ac_ct_CC
2775if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2777$as_echo "$ac_ct_CC" >&6; }
b4e70030 2778else
81ecdfbb
RW
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2780$as_echo "no" >&6; }
b4e70030
JB
2781fi
2782
81ecdfbb
RW
2783 if test "x$ac_ct_CC" = x; then
2784 CC=""
2785 else
2786 case $cross_compiling:$ac_tool_warned in
2787yes:)
2788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2790ac_tool_warned=yes ;;
2791esac
2792 CC=$ac_ct_CC
2793 fi
b4e70030
JB
2794else
2795 CC="$ac_cv_prog_CC"
2796fi
2797
c906108c 2798if test -z "$CC"; then
81ecdfbb
RW
2799 if test -n "$ac_tool_prefix"; then
2800 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2801set dummy ${ac_tool_prefix}cc; ac_word=$2
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2803$as_echo_n "checking for $ac_word... " >&6; }
2804if test "${ac_cv_prog_CC+set}" = set; then :
2805 $as_echo_n "(cached) " >&6
c906108c
SS
2806else
2807 if test -n "$CC"; then
2808 ac_cv_prog_CC="$CC" # Let the user override the test.
2809else
bec39cab
AC
2810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2811for as_dir in $PATH
2812do
2813 IFS=$as_save_IFS
2814 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2815 for ac_exec_ext in '' $ac_executable_extensions; do
2816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2817 ac_cv_prog_CC="${ac_tool_prefix}cc"
2818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2819 break 2
2820 fi
2821done
81ecdfbb
RW
2822 done
2823IFS=$as_save_IFS
2824
2825fi
2826fi
2827CC=$ac_cv_prog_CC
2828if test -n "$CC"; then
2829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2830$as_echo "$CC" >&6; }
2831else
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2833$as_echo "no" >&6; }
2834fi
2835
2836
2837 fi
2838fi
2839if test -z "$CC"; then
2840 # Extract the first word of "cc", so it can be a program name with args.
2841set dummy cc; ac_word=$2
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2843$as_echo_n "checking for $ac_word... " >&6; }
2844if test "${ac_cv_prog_CC+set}" = set; then :
2845 $as_echo_n "(cached) " >&6
2846else
2847 if test -n "$CC"; then
2848 ac_cv_prog_CC="$CC" # Let the user override the test.
2849else
2850 ac_prog_rejected=no
2851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2852for as_dir in $PATH
2853do
2854 IFS=$as_save_IFS
2855 test -z "$as_dir" && as_dir=.
2856 for ac_exec_ext in '' $ac_executable_extensions; do
2857 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2858 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2859 ac_prog_rejected=yes
2860 continue
2861 fi
2862 ac_cv_prog_CC="cc"
2863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2864 break 2
2865 fi
2866done
2867 done
2868IFS=$as_save_IFS
bec39cab 2869
c906108c
SS
2870if test $ac_prog_rejected = yes; then
2871 # We found a bogon in the path, so make sure we never use it.
2872 set dummy $ac_cv_prog_CC
2873 shift
bec39cab 2874 if test $# != 0; then
c906108c
SS
2875 # We chose a different compiler from the bogus one.
2876 # However, it has the same basename, so the bogon will be chosen
2877 # first if we set CC to just the basename; use the full file name.
2878 shift
bec39cab 2879 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2880 fi
2881fi
2882fi
2883fi
bec39cab 2884CC=$ac_cv_prog_CC
c906108c 2885if test -n "$CC"; then
81ecdfbb
RW
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2887$as_echo "$CC" >&6; }
c906108c 2888else
81ecdfbb
RW
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2890$as_echo "no" >&6; }
c906108c
SS
2891fi
2892
81ecdfbb 2893
bec39cab
AC
2894fi
2895if test -z "$CC"; then
2896 if test -n "$ac_tool_prefix"; then
81ecdfbb 2897 for ac_prog in cl.exe
bec39cab
AC
2898 do
2899 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2900set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2902$as_echo_n "checking for $ac_word... " >&6; }
2903if test "${ac_cv_prog_CC+set}" = set; then :
2904 $as_echo_n "(cached) " >&6
c906108c
SS
2905else
2906 if test -n "$CC"; then
2907 ac_cv_prog_CC="$CC" # Let the user override the test.
2908else
bec39cab
AC
2909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2910for as_dir in $PATH
2911do
2912 IFS=$as_save_IFS
2913 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2914 for ac_exec_ext in '' $ac_executable_extensions; do
2915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2916 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2918 break 2
2919 fi
2920done
81ecdfbb
RW
2921 done
2922IFS=$as_save_IFS
bec39cab 2923
c906108c
SS
2924fi
2925fi
bec39cab 2926CC=$ac_cv_prog_CC
c906108c 2927if test -n "$CC"; then
81ecdfbb
RW
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2929$as_echo "$CC" >&6; }
c906108c 2930else
81ecdfbb
RW
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2932$as_echo "no" >&6; }
c906108c 2933fi
bec39cab 2934
81ecdfbb 2935
bec39cab
AC
2936 test -n "$CC" && break
2937 done
2938fi
2939if test -z "$CC"; then
2940 ac_ct_CC=$CC
81ecdfbb 2941 for ac_prog in cl.exe
bec39cab
AC
2942do
2943 # Extract the first word of "$ac_prog", so it can be a program name with args.
2944set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2946$as_echo_n "checking for $ac_word... " >&6; }
2947if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2948 $as_echo_n "(cached) " >&6
bec39cab
AC
2949else
2950 if test -n "$ac_ct_CC"; then
2951 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2952else
2953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2954for as_dir in $PATH
2955do
2956 IFS=$as_save_IFS
2957 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2958 for ac_exec_ext in '' $ac_executable_extensions; do
2959 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2960 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2962 break 2
c906108c 2963 fi
bec39cab 2964done
81ecdfbb
RW
2965 done
2966IFS=$as_save_IFS
bec39cab
AC
2967
2968fi
2969fi
2970ac_ct_CC=$ac_cv_prog_ac_ct_CC
2971if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2973$as_echo "$ac_ct_CC" >&6; }
bec39cab 2974else
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976$as_echo "no" >&6; }
c906108c
SS
2977fi
2978
81ecdfbb 2979
bec39cab
AC
2980 test -n "$ac_ct_CC" && break
2981done
c906108c 2982
81ecdfbb
RW
2983 if test "x$ac_ct_CC" = x; then
2984 CC=""
2985 else
2986 case $cross_compiling:$ac_tool_warned in
2987yes:)
2988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2990ac_tool_warned=yes ;;
2991esac
2992 CC=$ac_ct_CC
2993 fi
bec39cab
AC
2994fi
2995
2996fi
2997
2998
81ecdfbb
RW
2999test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3001as_fn_error "no acceptable C compiler found in \$PATH
3002See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3003
3004# Provide some information about the compiler.
81ecdfbb
RW
3005$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3006set X $ac_compile
3007ac_compiler=$2
3008for ac_option in --version -v -V -qversion; do
3009 { { ac_try="$ac_compiler $ac_option >&5"
3010case "(($ac_try" in
3011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3012 *) ac_try_echo=$ac_try;;
3013esac
3014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3015$as_echo "$ac_try_echo"; } >&5
3016 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3017 ac_status=$?
81ecdfbb
RW
3018 if test -s conftest.err; then
3019 sed '10a\
3020... rest of stderr output deleted ...
3021 10q' conftest.err >conftest.er1
3022 cat conftest.er1 >&5
3023 rm -f conftest.er1 conftest.err
3024 fi
3025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3026 test $ac_status = 0; }
3027done
bec39cab 3028
81ecdfbb 3029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3030/* end confdefs.h. */
3031
3032int
3033main ()
3034{
3035
3036 ;
3037 return 0;
3038}
3039_ACEOF
3040ac_clean_files_save=$ac_clean_files
81ecdfbb 3041ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3042# Try to create an executable without -o first, disregard a.out.
3043# It will help us diagnose broken compilers, and finding out an intuition
3044# of exeext.
81ecdfbb
RW
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3046$as_echo_n "checking for C compiler default output file name... " >&6; }
3047ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3048
3049# The possible output files:
3050ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3051
3052ac_rmfiles=
3053for ac_file in $ac_files
3054do
3055 case $ac_file in
3056 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3057 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3058 esac
3059done
3060rm -f $ac_rmfiles
3061
3062if { { ac_try="$ac_link_default"
3063case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066esac
3067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3068$as_echo "$ac_try_echo"; } >&5
3069 (eval "$ac_link_default") 2>&5
3070 ac_status=$?
3071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3072 test $ac_status = 0; }; then :
3073 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3074# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3075# in a Makefile. We should not override ac_cv_exeext if it was cached,
3076# so that the user can short-circuit this test for compilers unknown to
3077# Autoconf.
3078for ac_file in $ac_files ''
bec39cab
AC
3079do
3080 test -f "$ac_file" || continue
3081 case $ac_file in
81ecdfbb 3082 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3083 ;;
3084 [ab].out )
3085 # We found the default executable, but exeext='' is most
3086 # certainly right.
3087 break;;
3088 *.* )
81ecdfbb
RW
3089 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3090 then :; else
3091 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3092 fi
3093 # We set ac_cv_exeext here because the later test for it is not
3094 # safe: cross compilers may not add the suffix if given an `-o'
3095 # argument, so we may need to know it at that point already.
3096 # Even if this section looks crufty: it has the advantage of
3097 # actually working.
b4e70030
JB
3098 break;;
3099 * )
3100 break;;
bec39cab
AC
3101 esac
3102done
81ecdfbb
RW
3103test "$ac_cv_exeext" = no && ac_cv_exeext=
3104
bec39cab 3105else
81ecdfbb
RW
3106 ac_file=''
3107fi
3108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3109$as_echo "$ac_file" >&6; }
3110if test -z "$ac_file"; then :
3111 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3112sed 's/^/| /' conftest.$ac_ext >&5
3113
81ecdfbb
RW
3114{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3116{ as_fn_set_status 77
3117as_fn_error "C compiler cannot create executables
3118See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3119fi
b4e70030 3120ac_exeext=$ac_cv_exeext
b4e70030 3121
81ecdfbb 3122# Check that the compiler produces executables we can run. If not, either
bec39cab 3123# the compiler is broken, or we cross compile.
81ecdfbb
RW
3124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3125$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3126# If not cross compiling, check that we can run a simple program.
3127if test "$cross_compiling" != yes; then
3128 if { ac_try='./$ac_file'
81ecdfbb
RW
3129 { { case "(($ac_try" in
3130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3131 *) ac_try_echo=$ac_try;;
3132esac
3133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3134$as_echo "$ac_try_echo"; } >&5
3135 (eval "$ac_try") 2>&5
bec39cab 3136 ac_status=$?
81ecdfbb
RW
3137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3138 test $ac_status = 0; }; }; then
bec39cab 3139 cross_compiling=no
c906108c 3140 else
bec39cab
AC
3141 if test "$cross_compiling" = maybe; then
3142 cross_compiling=yes
3143 else
81ecdfbb
RW
3144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3146as_fn_error "cannot run C compiled programs.
bec39cab 3147If you meant to cross compile, use \`--host'.
81ecdfbb 3148See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3149 fi
c906108c 3150 fi
bec39cab 3151fi
81ecdfbb
RW
3152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3153$as_echo "yes" >&6; }
bec39cab 3154
81ecdfbb 3155rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3156ac_clean_files=$ac_clean_files_save
81ecdfbb 3157# Check that the compiler produces executables we can run. If not, either
b4e70030 3158# the compiler is broken, or we cross compile.
81ecdfbb
RW
3159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3160$as_echo_n "checking whether we are cross compiling... " >&6; }
3161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3162$as_echo "$cross_compiling" >&6; }
3163
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3165$as_echo_n "checking for suffix of executables... " >&6; }
3166if { { ac_try="$ac_link"
3167case "(($ac_try" in
3168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3169 *) ac_try_echo=$ac_try;;
3170esac
3171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3172$as_echo "$ac_try_echo"; } >&5
3173 (eval "$ac_link") 2>&5
bec39cab 3174 ac_status=$?
81ecdfbb
RW
3175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3176 test $ac_status = 0; }; then :
b4e70030
JB
3177 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3178# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3179# work properly (i.e., refer to `conftest.exe'), while it won't with
3180# `rm'.
3181for ac_file in conftest.exe conftest conftest.*; do
3182 test -f "$ac_file" || continue
3183 case $ac_file in
81ecdfbb 3184 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3185 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3186 break;;
3187 * ) break;;
3188 esac
3189done
c906108c 3190else
81ecdfbb
RW
3191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3193as_fn_error "cannot compute suffix of executables: cannot compile and link
3194See \`config.log' for more details." "$LINENO" 5; }
c906108c 3195fi
b4e70030 3196rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3198$as_echo "$ac_cv_exeext" >&6; }
c906108c 3199
b4e70030 3200rm -f conftest.$ac_ext
bec39cab
AC
3201EXEEXT=$ac_cv_exeext
3202ac_exeext=$EXEEXT
81ecdfbb
RW
3203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3204$as_echo_n "checking for suffix of object files... " >&6; }
3205if test "${ac_cv_objext+set}" = set; then :
3206 $as_echo_n "(cached) " >&6
bec39cab 3207else
81ecdfbb 3208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3209/* end confdefs.h. */
3210
3211int
3212main ()
3213{
3214
3215 ;
3216 return 0;
3217}
3218_ACEOF
3219rm -f conftest.o conftest.obj
81ecdfbb
RW
3220if { { ac_try="$ac_compile"
3221case "(($ac_try" in
3222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3223 *) ac_try_echo=$ac_try;;
3224esac
3225eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3226$as_echo "$ac_try_echo"; } >&5
3227 (eval "$ac_compile") 2>&5
3228 ac_status=$?
3229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3230 test $ac_status = 0; }; then :
3231 for ac_file in conftest.o conftest.obj conftest.*; do
3232 test -f "$ac_file" || continue;
bec39cab 3233 case $ac_file in
81ecdfbb 3234 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3235 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3236 break;;
3237 esac
3238done
c906108c 3239else
81ecdfbb 3240 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3241sed 's/^/| /' conftest.$ac_ext >&5
3242
81ecdfbb
RW
3243{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3245as_fn_error "cannot compute suffix of object files: cannot compile
3246See \`config.log' for more details." "$LINENO" 5; }
c906108c 3247fi
b4e70030 3248rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3249fi
81ecdfbb
RW
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3251$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3252OBJEXT=$ac_cv_objext
3253ac_objext=$OBJEXT
81ecdfbb
RW
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3255$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3256if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3257 $as_echo_n "(cached) " >&6
c906108c 3258else
81ecdfbb 3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3260/* end confdefs.h. */
3261
3262int
3263main ()
3264{
3265#ifndef __GNUC__
3266 choke me
3267#endif
3268
3269 ;
3270 return 0;
3271}
3272_ACEOF
81ecdfbb 3273if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3274 ac_compiler_gnu=yes
3275else
81ecdfbb 3276 ac_compiler_gnu=no
bec39cab 3277fi
81ecdfbb 3278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3279ac_cv_c_compiler_gnu=$ac_compiler_gnu
3280
3281fi
81ecdfbb
RW
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3283$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3284if test $ac_compiler_gnu = yes; then
3285 GCC=yes
3286else
3287 GCC=
3288fi
bec39cab
AC
3289ac_test_CFLAGS=${CFLAGS+set}
3290ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3292$as_echo_n "checking whether $CC accepts -g... " >&6; }
3293if test "${ac_cv_prog_cc_g+set}" = set; then :
3294 $as_echo_n "(cached) " >&6
bec39cab 3295else
81ecdfbb
RW
3296 ac_save_c_werror_flag=$ac_c_werror_flag
3297 ac_c_werror_flag=yes
3298 ac_cv_prog_cc_g=no
3299 CFLAGS="-g"
3300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3301/* end confdefs.h. */
3302
3303int
3304main ()
3305{
3306
3307 ;
3308 return 0;
3309}
3310_ACEOF
81ecdfbb 3311if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3312 ac_cv_prog_cc_g=yes
3313else
81ecdfbb
RW
3314 CFLAGS=""
3315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316/* end confdefs.h. */
3317
3318int
3319main ()
3320{
3321
3322 ;
3323 return 0;
3324}
3325_ACEOF
3326if ac_fn_c_try_compile "$LINENO"; then :
3327
3328else
3329 ac_c_werror_flag=$ac_save_c_werror_flag
3330 CFLAGS="-g"
3331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3332/* end confdefs.h. */
3333
3334int
3335main ()
3336{
c906108c 3337
81ecdfbb
RW
3338 ;
3339 return 0;
3340}
3341_ACEOF
3342if ac_fn_c_try_compile "$LINENO"; then :
3343 ac_cv_prog_cc_g=yes
3344fi
3345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3346fi
3347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3348fi
81ecdfbb
RW
3349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3350 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3351fi
81ecdfbb
RW
3352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3353$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3354if test "$ac_test_CFLAGS" = set; then
bec39cab 3355 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3356elif test $ac_cv_prog_cc_g = yes; then
3357 if test "$GCC" = yes; then
3358 CFLAGS="-g -O2"
3359 else
3360 CFLAGS="-g"
3361 fi
3362else
3363 if test "$GCC" = yes; then
3364 CFLAGS="-O2"
3365 else
3366 CFLAGS=
3367 fi
3368fi
81ecdfbb
RW
3369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3370$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3371if test "${ac_cv_prog_cc_c89+set}" = set; then :
3372 $as_echo_n "(cached) " >&6
bec39cab 3373else
81ecdfbb 3374 ac_cv_prog_cc_c89=no
bec39cab 3375ac_save_CC=$CC
81ecdfbb 3376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3377/* end confdefs.h. */
c906108c
SS
3378#include <stdarg.h>
3379#include <stdio.h>
3380#include <sys/types.h>
3381#include <sys/stat.h>
3382/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3383struct buf { int x; };
3384FILE * (*rcsopen) (struct buf *, struct stat *, int);
3385static char *e (p, i)
3386 char **p;
3387 int i;
3388{
3389 return p[i];
3390}
3391static char *f (char * (*g) (char **, int), char **p, ...)
3392{
3393 char *s;
3394 va_list v;
3395 va_start (v,p);
3396 s = g (p, va_arg (v,int));
3397 va_end (v);
3398 return s;
3399}
bec39cab
AC
3400
3401/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3402 function prototypes and stuff, but not '\xHH' hex character constants.
3403 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3404 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3405 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3406 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3407 that's true only with -std. */
bec39cab
AC
3408int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3409
81ecdfbb
RW
3410/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3411 inside strings and character constants. */
3412#define FOO(x) 'x'
3413int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3414
c906108c
SS
3415int test (int i, double x);
3416struct s1 {int (*f) (int a);};
3417struct s2 {int (*f) (double a);};
3418int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3419int argc;
3420char **argv;
bec39cab
AC
3421int
3422main ()
3423{
c906108c 3424return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3425 ;
3426 return 0;
3427}
3428_ACEOF
81ecdfbb
RW
3429for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3430 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3431do
3432 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3433 if ac_fn_c_try_compile "$LINENO"; then :
3434 ac_cv_prog_cc_c89=$ac_arg
c906108c 3435fi
81ecdfbb
RW
3436rm -f core conftest.err conftest.$ac_objext
3437 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3438done
81ecdfbb 3439rm -f conftest.$ac_ext
bec39cab 3440CC=$ac_save_CC
c906108c
SS
3441
3442fi
81ecdfbb
RW
3443# AC_CACHE_VAL
3444case "x$ac_cv_prog_cc_c89" in
3445 x)
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3447$as_echo "none needed" >&6; } ;;
3448 xno)
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3450$as_echo "unsupported" >&6; } ;;
bec39cab 3451 *)
81ecdfbb
RW
3452 CC="$CC $ac_cv_prog_cc_c89"
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3454$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3455esac
81ecdfbb 3456if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3457
b4e70030
JB
3458fi
3459
bec39cab
AC
3460ac_ext=c
3461ac_cpp='$CPP $CPPFLAGS'
3462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3464ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3465
60ca704f 3466
bec39cab
AC
3467ac_ext=c
3468ac_cpp='$CPP $CPPFLAGS'
3469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3471ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3473$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3474# On Suns, sometimes $CPP names a directory.
3475if test -n "$CPP" && test -d "$CPP"; then
3476 CPP=
8bb2c122 3477fi
bec39cab 3478if test -z "$CPP"; then
81ecdfbb
RW
3479 if test "${ac_cv_prog_CPP+set}" = set; then :
3480 $as_echo_n "(cached) " >&6
bec39cab
AC
3481else
3482 # Double quotes because CPP needs to be expanded
3483 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3484 do
3485 ac_preproc_ok=false
3486for ac_c_preproc_warn_flag in '' yes
3487do
3488 # Use a header file that comes with gcc, so configuring glibc
3489 # with a fresh cross-compiler works.
3490 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3491 # <limits.h> exists even on freestanding compilers.
3492 # On the NeXT, cc -E runs the code through the compiler's parser,
3493 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3495/* end confdefs.h. */
3496#ifdef __STDC__
3497# include <limits.h>
3498#else
3499# include <assert.h>
3500#endif
3501 Syntax error
3502_ACEOF
81ecdfbb 3503if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3504
81ecdfbb 3505else
bec39cab
AC
3506 # Broken: fails on valid input.
3507continue
3508fi
3509rm -f conftest.err conftest.$ac_ext
3510
81ecdfbb 3511 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3512 # can be detected and how.
81ecdfbb 3513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3514/* end confdefs.h. */
3515#include <ac_nonexistent.h>
3516_ACEOF
81ecdfbb 3517if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3518 # Broken: success on invalid input.
3519continue
8bb2c122 3520else
bec39cab
AC
3521 # Passes both tests.
3522ac_preproc_ok=:
3523break
8bb2c122 3524fi
bec39cab 3525rm -f conftest.err conftest.$ac_ext
8bb2c122 3526
bec39cab
AC
3527done
3528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3529rm -f conftest.err conftest.$ac_ext
81ecdfbb 3530if $ac_preproc_ok; then :
bec39cab
AC
3531 break
3532fi
8bb2c122 3533
bec39cab
AC
3534 done
3535 ac_cv_prog_CPP=$CPP
ddc9cd0f 3536
c906108c 3537fi
bec39cab
AC
3538 CPP=$ac_cv_prog_CPP
3539else
3540 ac_cv_prog_CPP=$CPP
c906108c 3541fi
81ecdfbb
RW
3542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3543$as_echo "$CPP" >&6; }
bec39cab
AC
3544ac_preproc_ok=false
3545for ac_c_preproc_warn_flag in '' yes
3546do
3547 # Use a header file that comes with gcc, so configuring glibc
3548 # with a fresh cross-compiler works.
3549 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3550 # <limits.h> exists even on freestanding compilers.
3551 # On the NeXT, cc -E runs the code through the compiler's parser,
3552 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
3560 Syntax error
3561_ACEOF
81ecdfbb 3562if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3563
81ecdfbb 3564else
bec39cab
AC
3565 # Broken: fails on valid input.
3566continue
3567fi
3568rm -f conftest.err conftest.$ac_ext
3569
81ecdfbb 3570 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3571 # can be detected and how.
81ecdfbb 3572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3573/* end confdefs.h. */
3574#include <ac_nonexistent.h>
3575_ACEOF
81ecdfbb 3576if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3577 # Broken: success on invalid input.
3578continue
c906108c 3579else
bec39cab
AC
3580 # Passes both tests.
3581ac_preproc_ok=:
3582break
c906108c 3583fi
bec39cab 3584rm -f conftest.err conftest.$ac_ext
c906108c 3585
bec39cab
AC
3586done
3587# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3588rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3589if $ac_preproc_ok; then :
3590
c906108c 3591else
81ecdfbb
RW
3592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3594as_fn_error "C preprocessor \"$CPP\" fails sanity check
3595See \`config.log' for more details." "$LINENO" 5; }
c906108c 3596fi
c906108c 3597
bec39cab
AC
3598ac_ext=c
3599ac_cpp='$CPP $CPPFLAGS'
3600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3602ac_compiler_gnu=$ac_cv_c_compiler_gnu
3603
3604
81ecdfbb
RW
3605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3606$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3607if test "${ac_cv_path_GREP+set}" = set; then :
3608 $as_echo_n "(cached) " >&6
4e8d927d 3609else
81ecdfbb
RW
3610 if test -z "$GREP"; then
3611 ac_path_GREP_found=false
3612 # Loop through the user's path and test for each of PROGNAME-LIST
3613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
3618 for ac_prog in grep ggrep; do
3619 for ac_exec_ext in '' $ac_executable_extensions; do
3620 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3621 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3622# Check for GNU ac_path_GREP and select it if it is found.
3623 # Check for GNU $ac_path_GREP
3624case `"$ac_path_GREP" --version 2>&1` in
3625*GNU*)
3626 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3627*)
3628 ac_count=0
3629 $as_echo_n 0123456789 >"conftest.in"
3630 while :
3631 do
3632 cat "conftest.in" "conftest.in" >"conftest.tmp"
3633 mv "conftest.tmp" "conftest.in"
3634 cp "conftest.in" "conftest.nl"
3635 $as_echo 'GREP' >> "conftest.nl"
3636 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3637 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3638 as_fn_arith $ac_count + 1 && ac_count=$as_val
3639 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3640 # Best one so far, save it but keep looking for a better one
3641 ac_cv_path_GREP="$ac_path_GREP"
3642 ac_path_GREP_max=$ac_count
bec39cab 3643 fi
81ecdfbb
RW
3644 # 10*(2^10) chars as input seems more than enough
3645 test $ac_count -gt 10 && break
3646 done
3647 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3648esac
bec39cab 3649
81ecdfbb
RW
3650 $ac_path_GREP_found && break 3
3651 done
3652 done
3653 done
3654IFS=$as_save_IFS
3655 if test -z "$ac_cv_path_GREP"; then
3656 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3657 fi
c906108c 3658else
81ecdfbb 3659 ac_cv_path_GREP=$GREP
c906108c 3660fi
c906108c 3661
81ecdfbb
RW
3662fi
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3664$as_echo "$ac_cv_path_GREP" >&6; }
3665 GREP="$ac_cv_path_GREP"
c906108c 3666
c906108c 3667
81ecdfbb
RW
3668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3669$as_echo_n "checking for egrep... " >&6; }
3670if test "${ac_cv_path_EGREP+set}" = set; then :
3671 $as_echo_n "(cached) " >&6
783e057b 3672else
81ecdfbb
RW
3673 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3674 then ac_cv_path_EGREP="$GREP -E"
3675 else
3676 if test -z "$EGREP"; then
3677 ac_path_EGREP_found=false
3678 # Loop through the user's path and test for each of PROGNAME-LIST
3679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3684 for ac_prog in egrep; do
3685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3687 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3688# Check for GNU ac_path_EGREP and select it if it is found.
3689 # Check for GNU $ac_path_EGREP
3690case `"$ac_path_EGREP" --version 2>&1` in
3691*GNU*)
3692 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3693*)
3694 ac_count=0
3695 $as_echo_n 0123456789 >"conftest.in"
3696 while :
3697 do
3698 cat "conftest.in" "conftest.in" >"conftest.tmp"
3699 mv "conftest.tmp" "conftest.in"
3700 cp "conftest.in" "conftest.nl"
3701 $as_echo 'EGREP' >> "conftest.nl"
3702 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3703 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3704 as_fn_arith $ac_count + 1 && ac_count=$as_val
3705 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3706 # Best one so far, save it but keep looking for a better one
3707 ac_cv_path_EGREP="$ac_path_EGREP"
3708 ac_path_EGREP_max=$ac_count
3709 fi
3710 # 10*(2^10) chars as input seems more than enough
3711 test $ac_count -gt 10 && break
3712 done
3713 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3714esac
bec39cab 3715
81ecdfbb
RW
3716 $ac_path_EGREP_found && break 3
3717 done
3718 done
3719 done
3720IFS=$as_save_IFS
3721 if test -z "$ac_cv_path_EGREP"; then
3722 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3723 fi
783e057b 3724else
81ecdfbb 3725 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3726fi
3727
81ecdfbb 3728 fi
783e057b 3729fi
81ecdfbb
RW
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3731$as_echo "$ac_cv_path_EGREP" >&6; }
3732 EGREP="$ac_cv_path_EGREP"
3733
783e057b 3734
81ecdfbb
RW
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3736$as_echo_n "checking for ANSI C header files... " >&6; }
3737if test "${ac_cv_header_stdc+set}" = set; then :
3738 $as_echo_n "(cached) " >&6
783e057b 3739else
81ecdfbb 3740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3741/* end confdefs.h. */
783e057b 3742#include <stdlib.h>
bec39cab 3743#include <stdarg.h>
783e057b
DJ
3744#include <string.h>
3745#include <float.h>
c906108c 3746
bec39cab
AC
3747int
3748main ()
3749{
c906108c 3750
bec39cab
AC
3751 ;
3752 return 0;
3753}
3754_ACEOF
81ecdfbb 3755if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3756 ac_cv_header_stdc=yes
c906108c 3757else
81ecdfbb 3758 ac_cv_header_stdc=no
c906108c 3759fi
81ecdfbb 3760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3761
783e057b
DJ
3762if test $ac_cv_header_stdc = yes; then
3763 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3765/* end confdefs.h. */
3766#include <string.h>
c906108c 3767
783e057b
DJ
3768_ACEOF
3769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3770 $EGREP "memchr" >/dev/null 2>&1; then :
3771
c906108c 3772else
783e057b 3773 ac_cv_header_stdc=no
c906108c 3774fi
783e057b 3775rm -f conftest*
c906108c
SS
3776
3777fi
3778
783e057b
DJ
3779if test $ac_cv_header_stdc = yes; then
3780 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3782/* end confdefs.h. */
3783#include <stdlib.h>
bec39cab 3784
783e057b
DJ
3785_ACEOF
3786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3787 $EGREP "free" >/dev/null 2>&1; then :
3788
bec39cab 3789else
783e057b 3790 ac_cv_header_stdc=no
bec39cab 3791fi
783e057b 3792rm -f conftest*
bec39cab
AC
3793
3794fi
bec39cab 3795
783e057b
DJ
3796if test $ac_cv_header_stdc = yes; then
3797 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3798 if test "$cross_compiling" = yes; then :
783e057b 3799 :
bec39cab 3800else
81ecdfbb 3801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3802/* end confdefs.h. */
3803#include <ctype.h>
81ecdfbb 3804#include <stdlib.h>
783e057b
DJ
3805#if ((' ' & 0x0FF) == 0x020)
3806# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3807# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3808#else
3809# define ISLOWER(c) \
3810 (('a' <= (c) && (c) <= 'i') \
3811 || ('j' <= (c) && (c) <= 'r') \
3812 || ('s' <= (c) && (c) <= 'z'))
3813# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3814#endif
3815
3816#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3817int
3818main ()
3819{
3820 int i;
3821 for (i = 0; i < 256; i++)
3822 if (XOR (islower (i), ISLOWER (i))
3823 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3824 return 2;
3825 return 0;
783e057b
DJ
3826}
3827_ACEOF
81ecdfbb 3828if ac_fn_c_try_run "$LINENO"; then :
783e057b 3829
81ecdfbb
RW
3830else
3831 ac_cv_header_stdc=no
783e057b 3832fi
81ecdfbb
RW
3833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3834 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3835fi
81ecdfbb 3836
783e057b
DJ
3837fi
3838fi
81ecdfbb
RW
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3840$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3841if test $ac_cv_header_stdc = yes; then
3842
81ecdfbb 3843$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3844
3845fi
3846
3847# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3848for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3849 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3850do :
3851 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3852ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3853"
3854eval as_val=\$$as_ac_Header
3855 if test "x$as_val" = x""yes; then :
783e057b 3856 cat >>confdefs.h <<_ACEOF
81ecdfbb 3857#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3858_ACEOF
3859
3860fi
3861
3862done
3863
3864
3865
81ecdfbb
RW
3866 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3867if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3868 MINIX=yes
3869else
3870 MINIX=
3871fi
3872
3873
3874 if test "$MINIX" = yes; then
3875
81ecdfbb 3876$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3877
3878
81ecdfbb 3879$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3880
3881
81ecdfbb 3882$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3883
3884 fi
3885
3886
81ecdfbb
RW
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3888$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3889if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3890 $as_echo_n "(cached) " >&6
783e057b 3891else
81ecdfbb 3892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3893/* end confdefs.h. */
3894
c971b7fa
PA
3895# define __EXTENSIONS__ 1
3896 $ac_includes_default
783e057b
DJ
3897int
3898main ()
3899{
3900
3901 ;
3902 return 0;
3903}
3904_ACEOF
81ecdfbb 3905if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3906 ac_cv_safe_to_define___extensions__=yes
3907else
81ecdfbb 3908 ac_cv_safe_to_define___extensions__=no
783e057b 3909fi
81ecdfbb 3910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3911fi
81ecdfbb
RW
3912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3913$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3914 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3915 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3916
81ecdfbb 3917 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3918
81ecdfbb 3919 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3920
81ecdfbb 3921 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3922
81ecdfbb 3923 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3924
3925
c971b7fa
PA
3926ac_aux_dir=
3927for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3928 for ac_t in install-sh install.sh shtool; do
3929 if test -f "$ac_dir/$ac_t"; then
3930 ac_aux_dir=$ac_dir
3931 ac_install_sh="$ac_aux_dir/$ac_t -c"
3932 break 2
3933 fi
3934 done
3935done
3936if test -z "$ac_aux_dir"; then
3937 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3938fi
770d76d7 3939
c971b7fa
PA
3940# These three variables are undocumented and unsupported,
3941# and are intended to be withdrawn in a future Autoconf release.
3942# They can cause serious problems if a builder's source tree is in a directory
3943# whose full name contains unusual characters.
3944ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3945ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3946ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3947
770d76d7 3948
c971b7fa
PA
3949# Make sure we can run config.sub.
3950$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3951 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3952
c971b7fa
PA
3953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3954$as_echo_n "checking build system type... " >&6; }
3955if test "${ac_cv_build+set}" = set; then :
3956 $as_echo_n "(cached) " >&6
770d76d7 3957else
c971b7fa
PA
3958 ac_build_alias=$build_alias
3959test "x$ac_build_alias" = x &&
3960 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3961test "x$ac_build_alias" = x &&
3962 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3963ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3964 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3965
770d76d7 3966fi
c971b7fa
PA
3967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3968$as_echo "$ac_cv_build" >&6; }
3969case $ac_cv_build in
3970*-*-*) ;;
3971*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3972esac
c971b7fa
PA
3973build=$ac_cv_build
3974ac_save_IFS=$IFS; IFS='-'
3975set x $ac_cv_build
3976shift
3977build_cpu=$1
3978build_vendor=$2
3979shift; shift
3980# Remember, the first character of IFS is used to create $*,
3981# except with old shells:
3982build_os=$*
3983IFS=$ac_save_IFS
3984case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3985
3986
c971b7fa
PA
3987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3988$as_echo_n "checking host system type... " >&6; }
3989if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3990 $as_echo_n "(cached) " >&6
3991else
c971b7fa
PA
3992 if test "x$host_alias" = x; then
3993 ac_cv_host=$ac_cv_build
81ecdfbb 3994else
c971b7fa
PA
3995 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3996 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3997fi
81ecdfbb
RW
3998
3999fi
c971b7fa
PA
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4001$as_echo "$ac_cv_host" >&6; }
4002case $ac_cv_host in
4003*-*-*) ;;
4004*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4005esac
c971b7fa
PA
4006host=$ac_cv_host
4007ac_save_IFS=$IFS; IFS='-'
4008set x $ac_cv_host
4009shift
4010host_cpu=$1
4011host_vendor=$2
4012shift; shift
4013# Remember, the first character of IFS is used to create $*,
4014# except with old shells:
4015host_os=$*
4016IFS=$ac_save_IFS
4017case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4018
4019
4020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4021$as_echo_n "checking target system type... " >&6; }
4022if test "${ac_cv_target+set}" = set; then :
4023 $as_echo_n "(cached) " >&6
4024else
4025 if test "x$target_alias" = x; then
4026 ac_cv_target=$ac_cv_host
4027else
4028 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4029 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4030fi
4031
4032fi
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4034$as_echo "$ac_cv_target" >&6; }
4035case $ac_cv_target in
4036*-*-*) ;;
4037*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4038esac
4039target=$ac_cv_target
4040ac_save_IFS=$IFS; IFS='-'
4041set x $ac_cv_target
4042shift
4043target_cpu=$1
4044target_vendor=$2
4045shift; shift
4046# Remember, the first character of IFS is used to create $*,
4047# except with old shells:
4048target_os=$*
4049IFS=$ac_save_IFS
4050case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4051
4052
4053# The aliases save the names the user supplied, while $host etc.
4054# will get canonicalized.
4055test -n "$target_alias" &&
4056 test "$program_prefix$program_suffix$program_transform_name" = \
4057 NONENONEs,x,x, &&
4058 program_prefix=${target_alias}-
4059
4060# The tests for host and target for $enable_largefile require
4061# canonical names.
4062
4063
81ecdfbb 4064
da2f07f1
JK
4065# As the $enable_largefile decision depends on --enable-plugins we must set it
4066# even in directories otherwise not depending on the $plugins option.
4067
4068
4069# Check whether --enable-plugins was given.
4070if test "${enable_plugins+set}" = set; then :
4071 enableval=$enable_plugins; case "${enableval}" in
4072 yes | "") plugins=yes ;;
4073 no) plugins=no ;;
4074 *) plugins=yes ;;
4075 esac
4076else
4077 plugins=no
4078fi
4079
4080
4081
4082case "${host}" in
4083 sparc-*-solaris*|i[3-7]86-*-solaris*)
4084 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4085 # are mutually exclusive; and without procfs support, the bfd/ elf module
4086 # cannot provide certain routines such as elfcore_write_prpsinfo
4087 # or elfcore_write_prstatus. So unless the user explicitly requested
4088 # large-file support through the --enable-largefile switch, disable
4089 # large-file support in favor of procfs support.
4090 test "${target}" = "${host}" -a "x$plugins" = xno \
4091 && : ${enable_largefile="no"}
4092 ;;
4093esac
4094
4095# Check whether --enable-largefile was given.
4096if test "${enable_largefile+set}" = set; then :
4097 enableval=$enable_largefile;
4098fi
4099
4100if test "$enable_largefile" != no; then
4101
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4103$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4104if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4105 $as_echo_n "(cached) " >&6
4106else
4107 ac_cv_sys_largefile_CC=no
4108 if test "$GCC" != yes; then
4109 ac_save_CC=$CC
4110 while :; do
4111 # IRIX 6.2 and later do not support large files by default,
4112 # so use the C compiler's -n32 option if that helps.
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114/* end confdefs.h. */
4115#include <sys/types.h>
4116 /* Check that off_t can represent 2**63 - 1 correctly.
4117 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4118 since some C++ compilers masquerading as C compilers
4119 incorrectly reject 9223372036854775807. */
4120#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4121 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4122 && LARGE_OFF_T % 2147483647 == 1)
4123 ? 1 : -1];
4124int
4125main ()
4126{
4127
4128 ;
4129 return 0;
4130}
4131_ACEOF
4132 if ac_fn_c_try_compile "$LINENO"; then :
4133 break
4134fi
4135rm -f core conftest.err conftest.$ac_objext
4136 CC="$CC -n32"
4137 if ac_fn_c_try_compile "$LINENO"; then :
4138 ac_cv_sys_largefile_CC=' -n32'; break
4139fi
4140rm -f core conftest.err conftest.$ac_objext
4141 break
4142 done
4143 CC=$ac_save_CC
4144 rm -f conftest.$ac_ext
4145 fi
4146fi
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4148$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4149 if test "$ac_cv_sys_largefile_CC" != no; then
4150 CC=$CC$ac_cv_sys_largefile_CC
4151 fi
4152
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4154$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4155if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4156 $as_echo_n "(cached) " >&6
4157else
4158 while :; do
4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4160/* end confdefs.h. */
4161#include <sys/types.h>
4162 /* Check that off_t can represent 2**63 - 1 correctly.
4163 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4164 since some C++ compilers masquerading as C compilers
4165 incorrectly reject 9223372036854775807. */
4166#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4167 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4168 && LARGE_OFF_T % 2147483647 == 1)
4169 ? 1 : -1];
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
4178if ac_fn_c_try_compile "$LINENO"; then :
4179 ac_cv_sys_file_offset_bits=no; break
4180fi
4181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4183/* end confdefs.h. */
4184#define _FILE_OFFSET_BITS 64
4185#include <sys/types.h>
4186 /* Check that off_t can represent 2**63 - 1 correctly.
4187 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4188 since some C++ compilers masquerading as C compilers
4189 incorrectly reject 9223372036854775807. */
4190#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4191 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4192 && LARGE_OFF_T % 2147483647 == 1)
4193 ? 1 : -1];
4194int
4195main ()
4196{
4197
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202if ac_fn_c_try_compile "$LINENO"; then :
4203 ac_cv_sys_file_offset_bits=64; break
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206 ac_cv_sys_file_offset_bits=unknown
4207 break
4208done
4209fi
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4211$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4212case $ac_cv_sys_file_offset_bits in #(
4213 no | unknown) ;;
4214 *)
4215cat >>confdefs.h <<_ACEOF
4216#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4217_ACEOF
4218;;
4219esac
4220rm -rf conftest*
4221 if test $ac_cv_sys_file_offset_bits = unknown; then
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4223$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4224if test "${ac_cv_sys_large_files+set}" = set; then :
4225 $as_echo_n "(cached) " >&6
4226else
4227 while :; do
4228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229/* end confdefs.h. */
4230#include <sys/types.h>
4231 /* Check that off_t can represent 2**63 - 1 correctly.
4232 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4233 since some C++ compilers masquerading as C compilers
4234 incorrectly reject 9223372036854775807. */
4235#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4236 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4237 && LARGE_OFF_T % 2147483647 == 1)
4238 ? 1 : -1];
4239int
4240main ()
4241{
4242
4243 ;
4244 return 0;
4245}
4246_ACEOF
4247if ac_fn_c_try_compile "$LINENO"; then :
4248 ac_cv_sys_large_files=no; break
4249fi
4250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252/* end confdefs.h. */
4253#define _LARGE_FILES 1
4254#include <sys/types.h>
4255 /* Check that off_t can represent 2**63 - 1 correctly.
4256 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4257 since some C++ compilers masquerading as C compilers
4258 incorrectly reject 9223372036854775807. */
4259#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4260 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4261 && LARGE_OFF_T % 2147483647 == 1)
4262 ? 1 : -1];
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
4271if ac_fn_c_try_compile "$LINENO"; then :
4272 ac_cv_sys_large_files=1; break
4273fi
4274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275 ac_cv_sys_large_files=unknown
4276 break
4277done
4278fi
4279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4280$as_echo "$ac_cv_sys_large_files" >&6; }
4281case $ac_cv_sys_large_files in #(
4282 no | unknown) ;;
4283 *)
4284cat >>confdefs.h <<_ACEOF
4285#define _LARGE_FILES $ac_cv_sys_large_files
4286_ACEOF
4287;;
4288esac
4289rm -rf conftest*
4290 fi
4291fi
4292
4293
4294
81ecdfbb
RW
4295
4296
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4298$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4299if test "${am_cv_prog_cc_stdc+set}" = set; then :
4300 $as_echo_n "(cached) " >&6
4301else
4302 am_cv_prog_cc_stdc=no
4303ac_save_CC="$CC"
4304# Don't try gcc -ansi; that turns off useful extensions and
4305# breaks some systems' header files.
4306# AIX -qlanglvl=ansi
4307# Ultrix and OSF/1 -std1
4308# HP-UX 10.20 and later -Ae
4309# HP-UX older versions -Aa -D_HPUX_SOURCE
4310# SVR4 -Xc -D__EXTENSIONS__
4311for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4312do
783e057b 4313 CC="$ac_save_CC $ac_arg"
81ecdfbb 4314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4315/* end confdefs.h. */
4316#include <stdarg.h>
4317#include <stdio.h>
4318#include <sys/types.h>
4319#include <sys/stat.h>
4320/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4321struct buf { int x; };
4322FILE * (*rcsopen) (struct buf *, struct stat *, int);
4323static char *e (p, i)
4324 char **p;
4325 int i;
4326{
4327 return p[i];
4328}
4329static char *f (char * (*g) (char **, int), char **p, ...)
4330{
4331 char *s;
4332 va_list v;
4333 va_start (v,p);
4334 s = g (p, va_arg (v,int));
4335 va_end (v);
4336 return s;
4337}
4338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344
4345int
4346main ()
4347{
4348
4349return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
81ecdfbb 4355if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4356 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4357fi
81ecdfbb 4358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4359done
4360CC="$ac_save_CC"
4361
4362fi
4363
4364if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4366$as_echo "none needed" >&6; }
783e057b 4367else
81ecdfbb
RW
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4369$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4370fi
4371case "x$am_cv_prog_cc_stdc" in
4372 x|xno) ;;
4373 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4374esac
4375
4376
4377ac_aux_dir=
81ecdfbb
RW
4378for ac_dir in .. "$srcdir"/..; do
4379 for ac_t in install-sh install.sh shtool; do
4380 if test -f "$ac_dir/$ac_t"; then
4381 ac_aux_dir=$ac_dir
4382 ac_install_sh="$ac_aux_dir/$ac_t -c"
4383 break 2
4384 fi
4385 done
783e057b
DJ
4386done
4387if test -z "$ac_aux_dir"; then
81ecdfbb 4388 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4389fi
81ecdfbb
RW
4390
4391# These three variables are undocumented and unsupported,
4392# and are intended to be withdrawn in a future Autoconf release.
4393# They can cause serious problems if a builder's source tree is in a directory
4394# whose full name contains unusual characters.
4395ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4396ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4397ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4398
783e057b 4399
783e057b 4400
9009e1ae
MR
4401test "$program_prefix" != NONE &&
4402 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4403# Use a double $ so make ignores it.
4404test "$program_suffix" != NONE &&
4405 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4406# Double any \ or $.
4407# By default was `s,x,x', remove it if useless.
4408ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4409program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4410
81ecdfbb 4411
a417dc56
RW
4412# Dependency checking.
4413rm -rf .tst 2>/dev/null
4414mkdir .tst 2>/dev/null
4415if test -d .tst; then
4416 am__leading_dot=.
4417else
4418 am__leading_dot=_
4419fi
4420rmdir .tst 2>/dev/null
4421
4422DEPDIR="${am__leading_dot}deps"
4423
81ecdfbb 4424ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4425
4426
4427depcc="$CC" am_compiler_list=
4428
4429am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4431$as_echo_n "checking dependency style of $depcc... " >&6; }
4432if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4433 $as_echo_n "(cached) " >&6
a417dc56
RW
4434else
4435 if test -f "$am_depcomp"; then
4436 # We make a subdir and do the tests there. Otherwise we can end up
4437 # making bogus files that we don't know about and never remove. For
4438 # instance it was reported that on HP-UX the gcc test will end up
4439 # making a dummy file named `D' -- because `-MD' means `put the output
4440 # in D'.
4441 mkdir conftest.dir
4442 # Copy depcomp to subdir because otherwise we won't find it if we're
4443 # using a relative directory.
4444 cp "$am_depcomp" conftest.dir
4445 cd conftest.dir
4446 # We will build objects and dependencies in a subdirectory because
4447 # it helps to detect inapplicable dependency modes. For instance
4448 # both Tru64's cc and ICC support -MD to output dependencies as a
4449 # side effect of compilation, but ICC will put the dependencies in
4450 # the current directory while Tru64 will put them in the object
4451 # directory.
4452 mkdir sub
4453
4454 am_cv_CC_dependencies_compiler_type=none
4455 if test "$am_compiler_list" = ""; then
4456 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4457 fi
4458 for depmode in $am_compiler_list; do
4459 if test $depmode = none; then break; fi
4460
81ecdfbb 4461 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4462 # Setup a source with many dependencies, because some compilers
4463 # like to wrap large dependency lists on column 80 (with \), and
4464 # we should not choose a depcomp mode which is confused by this.
4465 #
4466 # We need to recreate these files for each test, as the compiler may
4467 # overwrite some of them when testing with obscure command lines.
4468 # This happens at least with the AIX C compiler.
4469 : > sub/conftest.c
4470 for i in 1 2 3 4 5 6; do
4471 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4472 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4473 # Solaris 8's {/usr,}/bin/sh.
4474 touch sub/conftst$i.h
4475 done
4476 echo "include sub/conftest.Po" > confmf
4477
4478 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4479 # mode. It turns out that the SunPro C++ compiler does not properly
4480 # handle `-M -o', and we need to detect this.
4481 depcmd="depmode=$depmode \
4482 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4483 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4484 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4485 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4486 if env $depcmd > conftest.err 2>&1 &&
4487 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4488 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4489 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4490 # icc doesn't choke on unknown options, it will just issue warnings
4491 # or remarks (even with -Werror). So we grep stderr for any message
4492 # that says an option was ignored or not supported.
4493 # When given -MP, icc 7.0 and 7.1 complain thusly:
4494 # icc: Command line warning: ignoring option '-M'; no argument required
4495 # The diagnosis changed in icc 8.0:
4496 # icc: Command line remark: option '-MP' not supported
4497 if (grep 'ignoring option' conftest.err ||
4498 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4499 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4500 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4501 break
4502 fi
4503 fi
81ecdfbb 4504 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4505 sed -e 's/^/| /' < conftest.err >&5
4506 done
4507
4508 cd ..
4509 rm -rf conftest.dir
4510else
4511 am_cv_CC_dependencies_compiler_type=none
4512fi
4513
4514fi
81ecdfbb
RW
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4516$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4517if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4518then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4519else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4520
4521fi
4522
4523
4524# Check for the 'make' the user wants to use.
4525for ac_prog in make
4526do
4527 # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_prog_MAKE+set}" = set; then :
4532 $as_echo_n "(cached) " >&6
a417dc56
RW
4533else
4534 if test -n "$MAKE"; then
4535 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4536else
4537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4544 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4546 break 2
4547 fi
4548done
81ecdfbb
RW
4549 done
4550IFS=$as_save_IFS
a417dc56
RW
4551
4552fi
4553fi
4554MAKE=$ac_cv_prog_MAKE
4555if test -n "$MAKE"; then
81ecdfbb
RW
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4557$as_echo "$MAKE" >&6; }
a417dc56 4558else
81ecdfbb
RW
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
a417dc56
RW
4561fi
4562
81ecdfbb 4563
a417dc56
RW
4564 test -n "$MAKE" && break
4565done
4566
4567MAKE_IS_GNU=
4568case "`$MAKE --version 2>&1 | sed 1q`" in
4569 *GNU*)
4570 MAKE_IS_GNU=yes
4571 ;;
4572esac
81ecdfbb 4573 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4574 GMAKE_TRUE=
4575 GMAKE_FALSE='#'
4576else
4577 GMAKE_TRUE='#'
4578 GMAKE_FALSE=
4579fi
4580
81ecdfbb
RW
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4582$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4583set x ${MAKE-make}
4584ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4585if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4586 $as_echo_n "(cached) " >&6
a417dc56
RW
4587else
4588 cat >conftest.make <<\_ACEOF
81ecdfbb 4589SHELL = /bin/sh
a417dc56 4590all:
81ecdfbb 4591 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4592_ACEOF
4593# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4594case `${MAKE-make} -f conftest.make 2>/dev/null` in
4595 *@@@%%%=?*=@@@%%%*)
4596 eval ac_cv_prog_make_${ac_make}_set=yes;;
4597 *)
4598 eval ac_cv_prog_make_${ac_make}_set=no;;
4599esac
a417dc56
RW
4600rm -f conftest.make
4601fi
81ecdfbb
RW
4602if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4604$as_echo "yes" >&6; }
a417dc56
RW
4605 SET_MAKE=
4606else
81ecdfbb
RW
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4608$as_echo "no" >&6; }
a417dc56
RW
4609 SET_MAKE="MAKE=${MAKE-make}"
4610fi
4611
4612
c971b7fa
PA
4613# Configure gnulib. We need to build gnulib under some other
4614# directory not "gnulib", to avoid the problem of both GDB and
4615# GDBserver wanting to build it in the same directory, when building
4616# in the source dir.
783e057b 4617
c971b7fa
PA
4618 in_src="gnulib"
4619 in_build="build-gnulib"
4620
4621 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4622 # so they do not pile up.
4623 ac_sub_configure_args=
4624 ac_prev=
4625 eval "set x $ac_configure_args"
4626 shift
4627 for ac_arg
4628 do
4629 if test -n "$ac_prev"; then
4630 ac_prev=
4631 continue
4632 fi
4633 case $ac_arg in
4634 -cache-file | --cache-file | --cache-fil | --cache-fi \
4635 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4636 ac_prev=cache_file ;;
4637 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4638 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4639 | --c=*)
4640 ;;
4641 --config-cache | -C)
4642 ;;
4643 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4644 ac_prev=srcdir ;;
4645 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4646 ;;
4647 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4648 ac_prev=prefix ;;
4649 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4650 ;;
4651 --disable-option-checking)
4652 ;;
4653 *)
4654 case $ac_arg in
4655 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4656 esac
4657 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4658 esac
4659 done
4660
4661 # Always prepend --prefix to ensure using the same prefix
4662 # in subdir configurations.
4663 ac_arg="--prefix=$prefix"
4664 case $ac_arg in
4665 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4666 esac
4667 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4668
4669 # Pass --silent
4670 if test "$silent" = yes; then
4671 ac_sub_configure_args="--silent $ac_sub_configure_args"
4672 fi
4673
4674 # Always prepend --disable-option-checking to silence warnings, since
4675 # different subdirs can have different --enable and --with options.
4676 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4677
4678 ac_popdir=`pwd`
4679 ac_dir=$in_build
4680
4681 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4682 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4683 $as_echo "$ac_msg" >&6
4684 as_dir="$ac_dir"; as_fn_mkdir_p
4685
38ea300a
PA
4686 case $srcdir in
4687 [\\/]* | ?:[\\/]* )
4688 ac_srcdir=$srcdir/$in_src ;;
4689 *) # Relative name.
4690 ac_srcdir=../$srcdir/$in_src ;;
4691 esac
c971b7fa
PA
4692
4693 cd "$ac_dir"
4694
4695 ac_sub_configure=$ac_srcdir/configure
4696
4697 # Make the cache file name correct relative to the subdirectory.
4698 case $cache_file in
4699 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4700 *) # Relative name.
4701 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4702 esac
4703
4704 { $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
4705$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4706 # The eval makes quoting arguments work.
4707 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4708 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4709 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4710
4711 cd "$ac_popdir"
783e057b 4712
c971b7fa
PA
4713
4714
4715CONFIG_OBS=
4716CONFIG_DEPS=
4717CONFIG_SRCS=
4718ENABLE_CFLAGS=
4719
4720CONFIG_ALL=
4721CONFIG_CLEAN=
4722CONFIG_INSTALL=
4723CONFIG_UNINSTALL=
4724
4725# If we haven't got the data from the intl directory,
4726# assume NLS is disabled.
4727USE_NLS=no
4728LIBINTL=
4729LIBINTL_DEP=
4730INCINTL=
4731XGETTEXT=
4732GMSGFMT=
4733POSUB=
783e057b
DJ
4734
4735if test -f ../intl/config.intl; then
4736 . ../intl/config.intl
4737fi
81ecdfbb
RW
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4739$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4740if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4742$as_echo "no" >&6; }
783e057b 4743else
81ecdfbb
RW
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4745$as_echo "yes" >&6; }
783e057b 4746
81ecdfbb 4747$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4748
4749
81ecdfbb
RW
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4751$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4752 # Look for .po and .gmo files in the source directory.
4753 CATALOGS=
4754 XLINGUAS=
4755 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4756 # If there aren't any .gmo files the shell will give us the
4757 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4758 # weeded out.
4759 case "$cat" in *\**)
4760 continue;;
4761 esac
4762 # The quadruple backslash is collapsed to a double backslash
4763 # by the backticks, then collapsed again by the double quotes,
4764 # leaving us with one backslash in the sed expression (right
4765 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4766 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4767 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4768 # The user is allowed to set LINGUAS to a list of languages to
4769 # install catalogs for. If it's empty that means "all of them."
4770 if test "x$LINGUAS" = x; then
4771 CATALOGS="$CATALOGS $cat"
4772 XLINGUAS="$XLINGUAS $lang"
4773 else
4774 case "$LINGUAS" in *$lang*)
4775 CATALOGS="$CATALOGS $cat"
4776 XLINGUAS="$XLINGUAS $lang"
4777 ;;
4778 esac
e28b3332
DJ
4779 fi
4780 done
c971b7fa
PA
4781 LINGUAS="$XLINGUAS"
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4783$as_echo "$LINGUAS" >&6; }
4784
4785
4786 DATADIRNAME=share
4787
4788 INSTOBJEXT=.mo
4789
4790 GENCAT=gencat
4791
4792 CATOBJEXT=.gmo
e28b3332 4793
e28b3332
DJ
4794fi
4795
c971b7fa
PA
4796localedir='${datadir}/locale'
4797
4798
4799if test x"$USE_NLS" = xyes; then
4800 CONFIG_ALL="$CONFIG_ALL all-po"
4801 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4802 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4803 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4804fi
e28b3332 4805
c971b7fa
PA
4806GNULIB=build-gnulib/import
4807
4808# For Makefile dependencies.
4809GNULIB_STDINT_H=
4810if test x"$STDINT_H" != x; then
4811 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4812fi
4813
4814
c971b7fa
PA
4815PACKAGE=gdb
4816
4817cat >>confdefs.h <<_ACEOF
4818#define PACKAGE "$PACKAGE"
4819_ACEOF
4820
4821
4822
4823# We never need to detect it in this sub-configure.
4824# But preserve it for config.status --recheck.
4825
4826
4827
4828MAKEINFO_EXTRA_FLAGS=""
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4830$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4831if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4832 $as_echo_n "(cached) " >&6
4833else
4834 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4835 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4836 gdb_cv_have_makeinfo_click=yes
4837 else
4838 gdb_cv_have_makeinfo_click=no
4839 fi
4840fi
4841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4842$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4843if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4844 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4845fi
e28b3332
DJ
4846
4847
bec39cab
AC
4848
4849
81ecdfbb
RW
4850# Check whether --with-separate-debug-dir was given.
4851if test "${with_separate_debug_dir+set}" = set; then :
4852 withval=$with_separate_debug_dir;
b14b1491
TT
4853 DEBUGDIR=$withval
4854else
4855 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4856fi
4857
20e95c23 4858
783e057b
DJ
4859 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4860 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4861 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4862 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4863
783e057b
DJ
4864cat >>confdefs.h <<_ACEOF
4865#define DEBUGDIR "$ac_define_dir"
20e95c23 4866_ACEOF
20e95c23 4867
20e95c23 4868
20e95c23 4869
0c4a4063 4870
b14b1491
TT
4871 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4872 if test "x$prefix" = xNONE; then
4873 test_prefix=/usr/local
4874 else
4875 test_prefix=$prefix
4876 fi
783e057b 4877 else
b14b1491 4878 test_prefix=$exec_prefix
783e057b 4879 fi
b14b1491
TT
4880 value=0
4881 case ${ac_define_dir} in
4882 "${test_prefix}"|"${test_prefix}/"*|\
4883 '${exec_prefix}'|'${exec_prefix}/'*)
4884 value=1
4885 ;;
4886 esac
4887
4888cat >>confdefs.h <<_ACEOF
4889#define DEBUGDIR_RELOCATABLE $value
4890_ACEOF
4891
4892
4893
0c4a4063 4894
f83d8a90
DE
4895# We can't pass paths as command line arguments.
4896# Mingw32 tries to be clever and will convert the paths for us.
4897# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4898# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4899# This breaks GDB's relocatable path conversions since paths passed in
4900# config.h would not get so translated, the path prefixes no longer match.
4901
4902 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4903 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4904 ac_define_dir=`eval echo $bindir`
4905 ac_define_dir=`eval echo $ac_define_dir`
4906
4907cat >>confdefs.h <<_ACEOF
4908#define BINDIR "$ac_define_dir"
4909_ACEOF
4910
4911
4912
b14b1491
TT
4913# GDB's datadir relocation
4914
4915
4916
81ecdfbb
RW
4917# Check whether --with-gdb-datadir was given.
4918if test "${with_gdb_datadir+set}" = set; then :
4919 withval=$with_gdb_datadir;
b14b1491 4920 GDB_DATADIR=$withval
20e95c23 4921else
b14b1491 4922 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4923fi
4924
20e95c23 4925
b14b1491
TT
4926 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4927 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4928 ac_define_dir=`eval echo $GDB_DATADIR`
4929 ac_define_dir=`eval echo $ac_define_dir`
4930
4931cat >>confdefs.h <<_ACEOF
4932#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4933_ACEOF
4934
b14b1491
TT
4935
4936
0c4a4063 4937
b14b1491
TT
4938 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4939 if test "x$prefix" = xNONE; then
4940 test_prefix=/usr/local
4941 else
4942 test_prefix=$prefix
4943 fi
4944 else
4945 test_prefix=$exec_prefix
4946 fi
4947 value=0
4948 case ${ac_define_dir} in
4949 "${test_prefix}"|"${test_prefix}/"*|\
4950 '${exec_prefix}'|'${exec_prefix}/'*)
4951 value=1
4952 ;;
4953 esac
4954
4955cat >>confdefs.h <<_ACEOF
4956#define GDB_DATADIR_RELOCATABLE $value
4957_ACEOF
4958
4959
783e057b 4960
20e95c23 4961
0c4a4063 4962
81ecdfbb
RW
4963# Check whether --with-relocated-sources was given.
4964if test "${with_relocated_sources+set}" = set; then :
4965 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4966
4967 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4968 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4969 ac_define_dir=`eval echo $reloc_srcdir`
4970 ac_define_dir=`eval echo $ac_define_dir`
4971
4972cat >>confdefs.h <<_ACEOF
4973#define RELOC_SRCDIR "$ac_define_dir"
4974_ACEOF
4975
4976
4977
81ecdfbb
RW
4978fi
4979
29b0e8a2 4980
7349ff92
JK
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4982$as_echo_n "checking for default auto-load directory... " >&6; }
4983
4984# Check whether --with-auto-load-dir was given.
4985if test "${with_auto_load_dir+set}" = set; then :
4986 withval=$with_auto_load_dir;
4987else
1564a261 4988 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
4989fi
4990
1564a261 4991escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
4992
4993 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4994 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4995 ac_define_dir=`eval echo $escape_dir`
4996 ac_define_dir=`eval echo $ac_define_dir`
4997
4998cat >>confdefs.h <<_ACEOF
4999#define AUTO_LOAD_DIR "$ac_define_dir"
5000_ACEOF
5001
5002
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5004$as_echo "$with_auto_load_dir" >&6; }
5005
bccbefd2
JK
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5007$as_echo_n "checking for default auto-load safe-path... " >&6; }
5008
5009# Check whether --with-auto-load-safe-path was given.
5010if test "${with_auto_load_safe_path+set}" = set; then :
5011 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5012 with_auto_load_safe_path="/"
5013 fi
bccbefd2 5014else
7349ff92 5015 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5016fi
5017
1564a261 5018escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5019
5020 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5021 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5022 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5023 ac_define_dir=`eval echo $ac_define_dir`
5024
5025cat >>confdefs.h <<_ACEOF
6dea1fbd 5026#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5027_ACEOF
5028
5029
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5031$as_echo "$with_auto_load_safe_path" >&6; }
5032
29b0e8a2 5033
20e95c23 5034
5ae98d25 5035subdirs="$subdirs testsuite"
20e95c23
DJ
5036
5037
783e057b 5038# Check whether to support alternative target configurations
81ecdfbb
RW
5039# Check whether --enable-targets was given.
5040if test "${enable_targets+set}" = set; then :
5041 enableval=$enable_targets; case "${enableval}" in
5042 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5043 ;;
5044 no) enable_targets= ;;
5045 *) enable_targets=$enableval ;;
5046esac
81ecdfbb
RW
5047fi
5048
20e95c23 5049
783e057b 5050# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5051# Check whether --enable-64-bit-bfd was given.
5052if test "${enable_64_bit_bfd+set}" = set; then :
5053 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5054 yes) want64=true ;;
5055 no) want64=false ;;
81ecdfbb 5056 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5057esac
5058else
5059 want64=false
81ecdfbb
RW
5060fi
5061
783e057b
DJ
5062# Provide defaults for some variables set by the per-host and per-target
5063# configuration.
5064gdb_host_obs=posix-hdep.o
20e95c23 5065
783e057b
DJ
5066if test "${target}" = "${host}"; then
5067 gdb_native=yes
5068else
5069 gdb_native=no
5070fi
20e95c23 5071
783e057b 5072. $srcdir/configure.host
20e95c23 5073
783e057b 5074# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5075
783e057b
DJ
5076TARGET_OBS=
5077all_targets=
20e95c23 5078
783e057b 5079for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5080do
783e057b
DJ
5081 if test "$targ_alias" = "all"; then
5082 all_targets=true
5083 else
5084 # Canonicalize the secondary target names.
5085 result=`$ac_config_sub $targ_alias 2>/dev/null`
5086 if test -n "$result"; then
5087 targ=$result
5088 else
5089 targ=$targ_alias
5090 fi
20e95c23 5091
783e057b 5092 . ${srcdir}/configure.tgt
20e95c23 5093
bf307134
JB
5094 if test -z "${gdb_target_obs}"; then :
5095 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5096fi
5097
783e057b
DJ
5098 # Target-specific object files
5099 for i in ${gdb_target_obs}; do
5100 case " $TARGET_OBS " in
5101 *" ${i} "*) ;;
5102 *)
5103 TARGET_OBS="$TARGET_OBS ${i}"
5104 ;;
5105 esac
5106 done
20e95c23 5107
783e057b
DJ
5108 # Check whether this target needs 64-bit CORE_ADDR
5109 if test x${want64} = xfalse; then
5110 . ${srcdir}/../bfd/config.bfd
5111 fi
5112 fi
20e95c23
DJ
5113done
5114
783e057b
DJ
5115if test x${all_targets} = xtrue; then
5116
5117 # We want all 64-bit targets if we either:
5118 # - run on a 64-bit host or
5119 # - already require 64-bit support for some other target or
5120 # - the --enable-64-bit-bfd option was supplied
5121 # Otherwise we only support all 32-bit targets.
5122 #
5123 # NOTE: This test must be in sync with the corresponding
5124 # tests in BFD!
20e95c23 5125
783e057b 5126 if test x${want64} = xfalse; then
81ecdfbb
RW
5127 # The cast to long int works around a bug in the HP C Compiler
5128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5130# This bug is HP SR number 8606223364.
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5132$as_echo_n "checking size of long... " >&6; }
5133if test "${ac_cv_sizeof_long+set}" = set; then :
5134 $as_echo_n "(cached) " >&6
c0993dbe 5135else
81ecdfbb 5136 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5137
81ecdfbb
RW
5138else
5139 if test "$ac_cv_type_long" = yes; then
5140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5142{ as_fn_set_status 77
5143as_fn_error "cannot compute sizeof (long)
5144See \`config.log' for more details." "$LINENO" 5; }; }
5145 else
5146 ac_cv_sizeof_long=0
5147 fi
c0993dbe 5148fi
81ecdfbb 5149
c0993dbe 5150fi
81ecdfbb
RW
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5152$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5153
c0993dbe 5154
c0993dbe 5155
c0993dbe
UW
5156cat >>confdefs.h <<_ACEOF
5157#define SIZEOF_LONG $ac_cv_sizeof_long
5158_ACEOF
5159
5160
5161 if test "x${ac_cv_sizeof_long}" = "x8"; then
5162 want64=true
5163 fi
5164 fi
5165 if test x${want64} = xtrue; then
5166 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5167 else
5168 TARGET_OBS='$(ALL_TARGET_OBS)'
5169 fi
5170fi
5171
5172
5173
5174# For other settings, only the main target counts.
5175gdb_sim=
5176gdb_osabi=
5177build_gdbserver=
5178targ=$target; . ${srcdir}/configure.tgt
5179
5180# Fetch the default architecture and default target vector from BFD.
5181targ=$target; . $srcdir/../bfd/config.bfd
5182
5183# We only want the first architecture, so strip off the others if
5184# there is more than one.
5185targ_archs=`echo $targ_archs | sed 's/ .*//'`
5186
5187if test "x$targ_archs" != x; then
5188
5189cat >>confdefs.h <<_ACEOF
5190#define DEFAULT_BFD_ARCH $targ_archs
5191_ACEOF
5192
5193fi
5194if test "x$targ_defvec" != x; then
5195
5196cat >>confdefs.h <<_ACEOF
5197#define DEFAULT_BFD_VEC $targ_defvec
5198_ACEOF
5199
5200fi
5201
c0993dbe
UW
5202# The CLI cannot be disabled yet, but may be in the future.
5203
5204# Enable CLI.
81ecdfbb
RW
5205# Check whether --enable-gdbcli was given.
5206if test "${enable_gdbcli+set}" = set; then :
5207 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5208 yes)
5209 ;;
5210 no)
81ecdfbb 5211 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5212 *)
81ecdfbb 5213 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5214 esac
5215else
5216 enable_gdbcli=yes
81ecdfbb
RW
5217fi
5218
c0993dbe
UW
5219if test x"$enable_gdbcli" = xyes; then
5220 if test -d $srcdir/cli; then
5221 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5222 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5223 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5224 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5225 fi
5226fi
5227
5228# Enable MI.
81ecdfbb
RW
5229# Check whether --enable-gdbmi was given.
5230if test "${enable_gdbmi+set}" = set; then :
5231 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5232 yes | no)
5233 ;;
5234 *)
81ecdfbb 5235 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5236 esac
5237else
5238 enable_gdbmi=yes
81ecdfbb
RW
5239fi
5240
c0993dbe
UW
5241if test x"$enable_gdbmi" = xyes; then
5242 if test -d $srcdir/mi; then
5243 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5244 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5245 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5246 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5247 fi
5248fi
5249
5250# Enable TUI.
81ecdfbb
RW
5251# Check whether --enable-tui was given.
5252if test "${enable_tui+set}" = set; then :
5253 enableval=$enable_tui; case $enableval in
3ca64bd3 5254 yes | no | auto)
c0993dbe
UW
5255 ;;
5256 *)
81ecdfbb 5257 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5258 esac
5259else
3ca64bd3 5260 enable_tui=auto
81ecdfbb
RW
5261fi
5262
c0993dbe
UW
5263
5264# Enable gdbtk.
81ecdfbb
RW
5265# Check whether --enable-gdbtk was given.
5266if test "${enable_gdbtk+set}" = set; then :
5267 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5268 yes | no)
5269 ;;
5270 *)
81ecdfbb 5271 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5272 esac
5273else
5062cc19 5274 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5275 enable_gdbtk=yes
5276 else
5277 enable_gdbtk=no
5278 fi
81ecdfbb
RW
5279fi
5280
c0993dbe
UW
5281# We unconditionally disable gdbtk tests on selected platforms.
5282case $host_os in
5283 go32* | windows*)
81ecdfbb
RW
5284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5285$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5286 enable_gdbtk=no ;;
5287esac
5288
05e7c244 5289# Libunwind support for ia64.
bec39cab 5290
05e7c244
JK
5291
5292# Check whether --with-libunwind-ia64 was given.
5293if test "${with_libunwind_ia64+set}" = set; then :
5294 withval=$with_libunwind_ia64;
bec39cab 5295else
05e7c244
JK
5296 with_libunwind_ia64=auto
5297fi
bec39cab 5298
05e7c244
JK
5299
5300# Backward compatibility option.
5301if test "${with_libunwind+set}" = set; then
5302 if test x"$with_libunwind_ia64" != xauto; then
5303 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5304 fi
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5306$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5307 with_libunwind_ia64="$with_libunwind"
5308fi
5309
5310case "$with_libunwind_ia64" in
5311 yes | no)
5312 ;;
5313 auto)
5314 for ac_header in libunwind-ia64.h
81ecdfbb 5315do :
b54a8fd7
PA
5316 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5317if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5318 cat >>confdefs.h <<_ACEOF
b54a8fd7 5319#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5320_ACEOF
5321
5322fi
5323
5324done
5325
05e7c244
JK
5326 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5327 ;;
5328 *)
5329 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5330 ;;
5331esac
bec39cab 5332
05e7c244 5333if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5334 for ac_header in libunwind-ia64.h
81ecdfbb 5335do :
b54a8fd7
PA
5336 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5337if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5338 cat >>confdefs.h <<_ACEOF
b54a8fd7 5339#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5340_ACEOF
5341
5342fi
5343
5344done
5345
05e7c244
JK
5346 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5347 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5348 fi
5349 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5350 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5351 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5352fi
5353
cb01cfba
JB
5354opt_curses=no
5355
81ecdfbb
RW
5356# Check whether --with-curses was given.
5357if test "${with_curses+set}" = set; then :
5358 withval=$with_curses; opt_curses=$withval
5359fi
5360
cb01cfba 5361
76a39ba7 5362prefer_curses=no
cb01cfba 5363if test "$opt_curses" = "yes"; then
76a39ba7 5364 prefer_curses=yes
cb01cfba
JB
5365fi
5366
a9322a30 5367# Profiling support.
81ecdfbb
RW
5368# Check whether --enable-profiling was given.
5369if test "${enable_profiling+set}" = set; then :
5370 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5371 yes | no)
5372 ;;
5373 *)
81ecdfbb 5374 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5375 esac
5376else
5377 enable_profiling=no
81ecdfbb 5378fi
bec39cab 5379
a9322a30
TT
5380
5381for ac_func in monstartup _mcleanup
81ecdfbb
RW
5382do :
5383 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5384ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5385eval as_val=\$$as_ac_var
5386 if test "x$as_val" = x""yes; then :
5387 cat >>confdefs.h <<_ACEOF
5388#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5389_ACEOF
a9322a30 5390
81ecdfbb
RW
5391fi
5392done
a9322a30 5393
81ecdfbb
RW
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5395$as_echo_n "checking for _etext... " >&6; }
5396if test "${ac_cv_var__etext+set}" = set; then :
5397 $as_echo_n "(cached) " >&6
5398else
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400/* end confdefs.h. */
5401#include <stdlib.h>
5402extern char _etext;
a9322a30
TT
5403
5404int
5405main ()
5406{
5407free (&_etext);
5408 ;
5409 return 0;
5410}
bec39cab 5411_ACEOF
81ecdfbb 5412if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5413 ac_cv_var__etext=yes
bec39cab 5414else
81ecdfbb 5415 ac_cv_var__etext=no
bec39cab 5416fi
81ecdfbb
RW
5417rm -f core conftest.err conftest.$ac_objext \
5418 conftest$ac_exeext conftest.$ac_ext
bec39cab 5419fi
81ecdfbb
RW
5420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5421$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5422if test $ac_cv_var__etext = yes; then
60ca704f 5423
81ecdfbb 5424$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5425
bec39cab 5426fi
81ecdfbb
RW
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5428$as_echo_n "checking for etext... " >&6; }
5429if test "${ac_cv_var_etext+set}" = set; then :
5430 $as_echo_n "(cached) " >&6
bec39cab 5431else
81ecdfbb 5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5433/* end confdefs.h. */
a9322a30
TT
5434#include <stdlib.h>
5435extern char etext;
bec39cab
AC
5436
5437int
5438main ()
5439{
a9322a30 5440free (&etext);
bec39cab
AC
5441 ;
5442 return 0;
5443}
5444_ACEOF
81ecdfbb 5445if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5446 ac_cv_var_etext=yes
bec39cab 5447else
81ecdfbb 5448 ac_cv_var_etext=no
bec39cab 5449fi
81ecdfbb
RW
5450rm -f core conftest.err conftest.$ac_objext \
5451 conftest$ac_exeext conftest.$ac_ext
bec39cab 5452fi
81ecdfbb
RW
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5454$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5455if test $ac_cv_var_etext = yes; then
5456
81ecdfbb 5457$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5458
5459fi
a9322a30
TT
5460if test "$enable_profiling" = yes ; then
5461 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5462 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5463 fi
5464 PROFILE_CFLAGS=-pg
5465 OLD_CFLAGS="$CFLAGS"
5466 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5467
81ecdfbb
RW
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5469$as_echo_n "checking whether $CC supports -pg... " >&6; }
5470if test "${ac_cv_cc_supports_pg+set}" = set; then :
5471 $as_echo_n "(cached) " >&6
bec39cab 5472else
81ecdfbb 5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5474/* end confdefs.h. */
bec39cab
AC
5475
5476int
5477main ()
5478{
a9322a30 5479int x;
bec39cab
AC
5480 ;
5481 return 0;
5482}
5483_ACEOF
81ecdfbb 5484if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5485 ac_cv_cc_supports_pg=yes
bec39cab 5486else
81ecdfbb 5487 ac_cv_cc_supports_pg=no
bec39cab 5488fi
81ecdfbb 5489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5490fi
81ecdfbb
RW
5491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5492$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5493
a9322a30 5494 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5495 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5496 fi
bec39cab 5497
a9322a30 5498 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5499fi
5500
c16158bc
JM
5501
5502
81ecdfbb
RW
5503# Check whether --with-pkgversion was given.
5504if test "${with_pkgversion+set}" = set; then :
5505 withval=$with_pkgversion; case "$withval" in
5506 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5507 no) PKGVERSION= ;;
5508 *) PKGVERSION="($withval) " ;;
5509 esac
5510else
5511 PKGVERSION="(GDB) "
5512
81ecdfbb 5513fi
c16158bc
JM
5514
5515
5516
5517
81ecdfbb
RW
5518
5519# Check whether --with-bugurl was given.
5520if test "${with_bugurl+set}" = set; then :
5521 withval=$with_bugurl; case "$withval" in
5522 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5523 no) BUGURL=
5524 ;;
5525 *) BUGURL="$withval"
5526 ;;
5527 esac
5528else
5529 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5530
81ecdfbb
RW
5531fi
5532
c16158bc
JM
5533 case ${BUGURL} in
5534 "")
5535 REPORT_BUGS_TO=
5536 REPORT_BUGS_TEXI=
5537 ;;
5538 *)
5539 REPORT_BUGS_TO="<$BUGURL>"
5540 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5541 ;;
5542 esac;
5543
5544
5545
5546
5547cat >>confdefs.h <<_ACEOF
5548#define PKGVERSION "$PKGVERSION"
5549_ACEOF
5550
5551
5552cat >>confdefs.h <<_ACEOF
5553#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5554_ACEOF
5555
5556
bec39cab
AC
5557# --------------------- #
5558# Checks for programs. #
5559# --------------------- #
5560
5561for ac_prog in gawk mawk nawk awk
5562do
5563 # Extract the first word of "$ac_prog", so it can be a program name with args.
5564set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5566$as_echo_n "checking for $ac_word... " >&6; }
5567if test "${ac_cv_prog_AWK+set}" = set; then :
5568 $as_echo_n "(cached) " >&6
bec39cab
AC
5569else
5570 if test -n "$AWK"; then
5571 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5572else
5573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576 IFS=$as_save_IFS
5577 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5578 for ac_exec_ext in '' $ac_executable_extensions; do
5579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5580 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5582 break 2
5583 fi
5584done
81ecdfbb
RW
5585 done
5586IFS=$as_save_IFS
bec39cab
AC
5587
5588fi
5589fi
5590AWK=$ac_cv_prog_AWK
5591if test -n "$AWK"; then
81ecdfbb
RW
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5593$as_echo "$AWK" >&6; }
bec39cab 5594else
81ecdfbb
RW
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5596$as_echo "no" >&6; }
bec39cab
AC
5597fi
5598
bec39cab 5599
81ecdfbb 5600 test -n "$AWK" && break
bec39cab
AC
5601done
5602
c971b7fa
PA
5603# Find a good install program. We prefer a C program (faster),
5604# so one script is as good as another. But avoid the broken or
5605# incompatible versions:
5606# SysV /etc/install, /usr/sbin/install
5607# SunOS /usr/etc/install
5608# IRIX /sbin/install
5609# AIX /bin/install
5610# AmigaOS /C/install, which installs bootblocks on floppy discs
5611# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5612# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5613# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5614# OS/2's system install, which has a completely different semantic
5615# ./install, which can be erroneously created by make from ./install.sh.
5616# Reject install programs that cannot install multiple files.
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5618$as_echo_n "checking for a BSD-compatible install... " >&6; }
5619if test -z "$INSTALL"; then
5620if test "${ac_cv_path_install+set}" = set; then :
5621 $as_echo_n "(cached) " >&6
5622else
5623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626 IFS=$as_save_IFS
5627 test -z "$as_dir" && as_dir=.
5628 # Account for people who put trailing slashes in PATH elements.
5629case $as_dir/ in #((
5630 ./ | .// | /[cC]/* | \
5631 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5632 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5633 /usr/ucb/* ) ;;
5634 *)
5635 # OSF1 and SCO ODT 3.0 have their own names for install.
5636 # Don't use installbsd from OSF since it installs stuff as root
5637 # by default.
5638 for ac_prog in ginstall scoinst install; do
5639 for ac_exec_ext in '' $ac_executable_extensions; do
5640 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5641 if test $ac_prog = install &&
5642 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5643 # AIX install. It has an incompatible calling convention.
5644 :
5645 elif test $ac_prog = install &&
5646 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5647 # program-specific install script used by HP pwplus--don't use.
5648 :
5649 else
5650 rm -rf conftest.one conftest.two conftest.dir
5651 echo one > conftest.one
5652 echo two > conftest.two
5653 mkdir conftest.dir
5654 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5655 test -s conftest.one && test -s conftest.two &&
5656 test -s conftest.dir/conftest.one &&
5657 test -s conftest.dir/conftest.two
5658 then
5659 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5660 break 3
5661 fi
5662 fi
5663 fi
5664 done
5665 done
5666 ;;
5667esac
5668
5669 done
5670IFS=$as_save_IFS
5671
5672rm -rf conftest.one conftest.two conftest.dir
5673
5674fi
5675 if test "${ac_cv_path_install+set}" = set; then
5676 INSTALL=$ac_cv_path_install
5677 else
5678 # As a last resort, use the slow shell script. Don't cache a
5679 # value for INSTALL within a source directory, because that will
5680 # break other packages using the cache if that directory is
5681 # removed, or if the value is a relative name.
5682 INSTALL=$ac_install_sh
5683 fi
5684fi
5685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5686$as_echo "$INSTALL" >&6; }
5687
5688# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5689# It thinks the first close brace ends the variable substitution.
5690test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5691
5692test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5693
5694test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5695
81ecdfbb
RW
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5697$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5698LN_S=$as_ln_s
5699if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5701$as_echo "yes" >&6; }
bec39cab 5702else
81ecdfbb
RW
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5704$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5705fi
5706
5707if test -n "$ac_tool_prefix"; then
5708 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5709set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_prog_RANLIB+set}" = set; then :
5713 $as_echo_n "(cached) " >&6
bec39cab
AC
5714else
5715 if test -n "$RANLIB"; then
5716 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5717else
5718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719for as_dir in $PATH
5720do
5721 IFS=$as_save_IFS
5722 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5723 for ac_exec_ext in '' $ac_executable_extensions; do
5724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5725 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5727 break 2
5728 fi
5729done
81ecdfbb
RW
5730 done
5731IFS=$as_save_IFS
bec39cab
AC
5732
5733fi
5734fi
5735RANLIB=$ac_cv_prog_RANLIB
5736if test -n "$RANLIB"; then
81ecdfbb
RW
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5738$as_echo "$RANLIB" >&6; }
bec39cab 5739else
81ecdfbb
RW
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
bec39cab
AC
5742fi
5743
81ecdfbb 5744
bec39cab
AC
5745fi
5746if test -z "$ac_cv_prog_RANLIB"; then
5747 ac_ct_RANLIB=$RANLIB
5748 # Extract the first word of "ranlib", so it can be a program name with args.
5749set dummy ranlib; ac_word=$2
81ecdfbb
RW
5750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
5752if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5753 $as_echo_n "(cached) " >&6
bec39cab
AC
5754else
5755 if test -n "$ac_ct_RANLIB"; then
5756 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5757else
5758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761 IFS=$as_save_IFS
5762 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5763 for ac_exec_ext in '' $ac_executable_extensions; do
5764 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5765 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5767 break 2
5768 fi
5769done
81ecdfbb
RW
5770 done
5771IFS=$as_save_IFS
bec39cab 5772
bec39cab
AC
5773fi
5774fi
5775ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5776if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5778$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5779else
81ecdfbb
RW
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
bec39cab
AC
5782fi
5783
81ecdfbb
RW
5784 if test "x$ac_ct_RANLIB" = x; then
5785 RANLIB=":"
5786 else
5787 case $cross_compiling:$ac_tool_warned in
5788yes:)
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5791ac_tool_warned=yes ;;
5792esac
5793 RANLIB=$ac_ct_RANLIB
5794 fi
bec39cab
AC
5795else
5796 RANLIB="$ac_cv_prog_RANLIB"
5797fi
5798
5799for ac_prog in 'bison -y' byacc
5800do
5801 # Extract the first word of "$ac_prog", so it can be a program name with args.
5802set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5804$as_echo_n "checking for $ac_word... " >&6; }
5805if test "${ac_cv_prog_YACC+set}" = set; then :
5806 $as_echo_n "(cached) " >&6
bec39cab
AC
5807else
5808 if test -n "$YACC"; then
5809 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5810else
5811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814 IFS=$as_save_IFS
5815 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5816 for ac_exec_ext in '' $ac_executable_extensions; do
5817 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5818 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5820 break 2
5821 fi
5822done
81ecdfbb
RW
5823 done
5824IFS=$as_save_IFS
bec39cab
AC
5825
5826fi
5827fi
5828YACC=$ac_cv_prog_YACC
5829if test -n "$YACC"; then
81ecdfbb
RW
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5831$as_echo "$YACC" >&6; }
bec39cab 5832else
81ecdfbb
RW
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834$as_echo "no" >&6; }
bec39cab
AC
5835fi
5836
81ecdfbb 5837
bec39cab
AC
5838 test -n "$YACC" && break
5839done
5840test -n "$YACC" || YACC="yacc"
5841
5842
5843if test -n "$ac_tool_prefix"; then
5844 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5845set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if test "${ac_cv_prog_AR+set}" = set; then :
5849 $as_echo_n "(cached) " >&6
bec39cab
AC
5850else
5851 if test -n "$AR"; then
5852 ac_cv_prog_AR="$AR" # Let the user override the test.
5853else
5854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857 IFS=$as_save_IFS
5858 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5859 for ac_exec_ext in '' $ac_executable_extensions; do
5860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5861 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5863 break 2
5864 fi
5865done
81ecdfbb
RW
5866 done
5867IFS=$as_save_IFS
bec39cab
AC
5868
5869fi
5870fi
5871AR=$ac_cv_prog_AR
5872if test -n "$AR"; then
81ecdfbb
RW
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5874$as_echo "$AR" >&6; }
bec39cab 5875else
81ecdfbb
RW
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
bec39cab
AC
5878fi
5879
81ecdfbb 5880
bec39cab
AC
5881fi
5882if test -z "$ac_cv_prog_AR"; then
5883 ac_ct_AR=$AR
5884 # Extract the first word of "ar", so it can be a program name with args.
5885set dummy ar; ac_word=$2
81ecdfbb
RW
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5889 $as_echo_n "(cached) " >&6
bec39cab
AC
5890else
5891 if test -n "$ac_ct_AR"; then
5892 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5893else
5894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5895for as_dir in $PATH
5896do
5897 IFS=$as_save_IFS
5898 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5899 for ac_exec_ext in '' $ac_executable_extensions; do
5900 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5901 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5903 break 2
5904 fi
5905done
81ecdfbb
RW
5906 done
5907IFS=$as_save_IFS
bec39cab
AC
5908
5909fi
5910fi
5911ac_ct_AR=$ac_cv_prog_ac_ct_AR
5912if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5914$as_echo "$ac_ct_AR" >&6; }
bec39cab 5915else
81ecdfbb
RW
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5917$as_echo "no" >&6; }
bec39cab
AC
5918fi
5919
81ecdfbb
RW
5920 if test "x$ac_ct_AR" = x; then
5921 AR=""
5922 else
5923 case $cross_compiling:$ac_tool_warned in
5924yes:)
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5927ac_tool_warned=yes ;;
5928esac
5929 AR=$ac_ct_AR
5930 fi
bec39cab
AC
5931else
5932 AR="$ac_cv_prog_AR"
5933fi
5934
5935if test -n "$ac_tool_prefix"; then
5936 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5937set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5939$as_echo_n "checking for $ac_word... " >&6; }
5940if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5941 $as_echo_n "(cached) " >&6
bec39cab
AC
5942else
5943 if test -n "$DLLTOOL"; then
5944 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5945else
5946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949 IFS=$as_save_IFS
5950 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5951 for ac_exec_ext in '' $ac_executable_extensions; do
5952 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5953 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5955 break 2
5956 fi
5957done
81ecdfbb
RW
5958 done
5959IFS=$as_save_IFS
bec39cab
AC
5960
5961fi
5962fi
5963DLLTOOL=$ac_cv_prog_DLLTOOL
5964if test -n "$DLLTOOL"; then
81ecdfbb
RW
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5966$as_echo "$DLLTOOL" >&6; }
bec39cab 5967else
81ecdfbb
RW
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
bec39cab
AC
5970fi
5971
81ecdfbb 5972
bec39cab
AC
5973fi
5974if test -z "$ac_cv_prog_DLLTOOL"; then
5975 ac_ct_DLLTOOL=$DLLTOOL
5976 # Extract the first word of "dlltool", so it can be a program name with args.
5977set dummy dlltool; ac_word=$2
81ecdfbb
RW
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5981 $as_echo_n "(cached) " >&6
bec39cab
AC
5982else
5983 if test -n "$ac_ct_DLLTOOL"; then
5984 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5991 for ac_exec_ext in '' $ac_executable_extensions; do
5992 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5993 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5995 break 2
5996 fi
5997done
81ecdfbb
RW
5998 done
5999IFS=$as_save_IFS
bec39cab
AC
6000
6001fi
6002fi
6003ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6004if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6006$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6007else
81ecdfbb
RW
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
bec39cab
AC
6010fi
6011
81ecdfbb
RW
6012 if test "x$ac_ct_DLLTOOL" = x; then
6013 DLLTOOL=""
6014 else
6015 case $cross_compiling:$ac_tool_warned in
6016yes:)
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6019ac_tool_warned=yes ;;
6020esac
6021 DLLTOOL=$ac_ct_DLLTOOL
6022 fi
bec39cab
AC
6023else
6024 DLLTOOL="$ac_cv_prog_DLLTOOL"
6025fi
6026
6027if test -n "$ac_tool_prefix"; then
6028 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6029set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if test "${ac_cv_prog_WINDRES+set}" = set; then :
6033 $as_echo_n "(cached) " >&6
bec39cab
AC
6034else
6035 if test -n "$WINDRES"; then
6036 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6043 for ac_exec_ext in '' $ac_executable_extensions; do
6044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6045 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6047 break 2
6048 fi
6049done
81ecdfbb
RW
6050 done
6051IFS=$as_save_IFS
bec39cab
AC
6052
6053fi
6054fi
6055WINDRES=$ac_cv_prog_WINDRES
6056if test -n "$WINDRES"; then
81ecdfbb
RW
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6058$as_echo "$WINDRES" >&6; }
bec39cab 6059else
81ecdfbb
RW
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
bec39cab
AC
6062fi
6063
81ecdfbb 6064
bec39cab
AC
6065fi
6066if test -z "$ac_cv_prog_WINDRES"; then
6067 ac_ct_WINDRES=$WINDRES
6068 # Extract the first word of "windres", so it can be a program name with args.
6069set dummy windres; ac_word=$2
81ecdfbb
RW
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
6072if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6073 $as_echo_n "(cached) " >&6
bec39cab
AC
6074else
6075 if test -n "$ac_ct_WINDRES"; then
6076 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6077else
6078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH
6080do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6083 for ac_exec_ext in '' $ac_executable_extensions; do
6084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6085 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6087 break 2
6088 fi
6089done
81ecdfbb
RW
6090 done
6091IFS=$as_save_IFS
bec39cab
AC
6092
6093fi
6094fi
6095ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6096if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6098$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6099else
81ecdfbb
RW
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
c906108c 6102fi
bec39cab 6103
81ecdfbb
RW
6104 if test "x$ac_ct_WINDRES" = x; then
6105 WINDRES=""
6106 else
6107 case $cross_compiling:$ac_tool_warned in
6108yes:)
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6111ac_tool_warned=yes ;;
6112esac
6113 WINDRES=$ac_ct_WINDRES
6114 fi
c906108c 6115else
bec39cab 6116 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6117fi
6118
bec39cab
AC
6119
6120# Needed for GNU/Hurd.
6121if test -n "$ac_tool_prefix"; then
6122 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6123set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6125$as_echo_n "checking for $ac_word... " >&6; }
6126if test "${ac_cv_prog_MIG+set}" = set; then :
6127 $as_echo_n "(cached) " >&6
c906108c 6128else
bec39cab
AC
6129 if test -n "$MIG"; then
6130 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6131else
6132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133for as_dir in $PATH
6134do
6135 IFS=$as_save_IFS
6136 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6137 for ac_exec_ext in '' $ac_executable_extensions; do
6138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6139 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6141 break 2
6142 fi
6143done
81ecdfbb
RW
6144 done
6145IFS=$as_save_IFS
bec39cab 6146
c906108c 6147fi
bec39cab
AC
6148fi
6149MIG=$ac_cv_prog_MIG
6150if test -n "$MIG"; then
81ecdfbb
RW
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6152$as_echo "$MIG" >&6; }
c906108c 6153else
81ecdfbb
RW
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6155$as_echo "no" >&6; }
c906108c
SS
6156fi
6157
81ecdfbb 6158
bec39cab
AC
6159fi
6160if test -z "$ac_cv_prog_MIG"; then
6161 ac_ct_MIG=$MIG
6162 # Extract the first word of "mig", so it can be a program name with args.
6163set dummy mig; ac_word=$2
81ecdfbb
RW
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6167 $as_echo_n "(cached) " >&6
bec39cab
AC
6168else
6169 if test -n "$ac_ct_MIG"; then
6170 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6171else
6172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6177 for ac_exec_ext in '' $ac_executable_extensions; do
6178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6179 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6181 break 2
6182 fi
6183done
81ecdfbb
RW
6184 done
6185IFS=$as_save_IFS
c906108c 6186
bec39cab
AC
6187fi
6188fi
6189ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6190if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6192$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6193else
81ecdfbb
RW
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
bec39cab 6196fi
c906108c 6197
81ecdfbb
RW
6198 if test "x$ac_ct_MIG" = x; then
6199 MIG=""
6200 else
6201 case $cross_compiling:$ac_tool_warned in
6202yes:)
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6205ac_tool_warned=yes ;;
6206esac
6207 MIG=$ac_ct_MIG
6208 fi
bec39cab
AC
6209else
6210 MIG="$ac_cv_prog_MIG"
6211fi
c906108c 6212
c906108c 6213
bec39cab
AC
6214# ---------------------- #
6215# Checks for libraries. #
6216# ---------------------- #
c906108c 6217
bec39cab 6218# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6220$as_echo_n "checking for main in -lm... " >&6; }
6221if test "${ac_cv_lib_m_main+set}" = set; then :
6222 $as_echo_n "(cached) " >&6
bec39cab
AC
6223else
6224 ac_check_lib_save_LIBS=$LIBS
6225LIBS="-lm $LIBS"
81ecdfbb 6226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6227/* end confdefs.h. */
c906108c 6228
c906108c 6229
bec39cab
AC
6230int
6231main ()
6232{
81ecdfbb 6233return main ();
bec39cab
AC
6234 ;
6235 return 0;
6236}
6237_ACEOF
81ecdfbb 6238if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6239 ac_cv_lib_m_main=yes
6240else
81ecdfbb 6241 ac_cv_lib_m_main=no
bec39cab 6242fi
81ecdfbb
RW
6243rm -f core conftest.err conftest.$ac_objext \
6244 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6245LIBS=$ac_check_lib_save_LIBS
6246fi
81ecdfbb
RW
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6248$as_echo "$ac_cv_lib_m_main" >&6; }
6249if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6250 cat >>confdefs.h <<_ACEOF
6251#define HAVE_LIBM 1
6252_ACEOF
6253
6254 LIBS="-lm $LIBS"
c906108c 6255
c906108c 6256fi
bec39cab
AC
6257
6258
6259# We need to link with -lw to get `wctype' on Solaris before Solaris
6260# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6261# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6262# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6263ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6264if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6265
c906108c 6266else
81ecdfbb
RW
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6268$as_echo_n "checking for wctype in -lw... " >&6; }
6269if test "${ac_cv_lib_w_wctype+set}" = set; then :
6270 $as_echo_n "(cached) " >&6
bec39cab
AC
6271else
6272 ac_check_lib_save_LIBS=$LIBS
6273LIBS="-lw $LIBS"
81ecdfbb 6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6275/* end confdefs.h. */
c906108c 6276
81ecdfbb
RW
6277/* Override any GCC internal prototype to avoid an error.
6278 Use char because int might match the return type of a GCC
6279 builtin and then its argument prototype would still apply. */
bec39cab
AC
6280#ifdef __cplusplus
6281extern "C"
6282#endif
bec39cab
AC
6283char wctype ();
6284int
6285main ()
6286{
81ecdfbb 6287return wctype ();
bec39cab
AC
6288 ;
6289 return 0;
6290}
6291_ACEOF
81ecdfbb 6292if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6293 ac_cv_lib_w_wctype=yes
6294else
81ecdfbb 6295 ac_cv_lib_w_wctype=no
bec39cab 6296fi
81ecdfbb
RW
6297rm -f core conftest.err conftest.$ac_objext \
6298 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6299LIBS=$ac_check_lib_save_LIBS
6300fi
81ecdfbb
RW
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6302$as_echo "$ac_cv_lib_w_wctype" >&6; }
6303if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6304 cat >>confdefs.h <<_ACEOF
6305#define HAVE_LIBW 1
6306_ACEOF
c906108c 6307
bec39cab 6308 LIBS="-lw $LIBS"
c906108c 6309
bec39cab 6310fi
c906108c 6311
bec39cab 6312fi
c906108c 6313
ddc9cd0f 6314
bec39cab 6315# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6317$as_echo_n "checking for library containing gethostbyname... " >&6; }
6318if test "${ac_cv_search_gethostbyname+set}" = set; then :
6319 $as_echo_n "(cached) " >&6
bec39cab
AC
6320else
6321 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6323/* end confdefs.h. */
ddc9cd0f 6324
81ecdfbb
RW
6325/* Override any GCC internal prototype to avoid an error.
6326 Use char because int might match the return type of a GCC
6327 builtin and then its argument prototype would still apply. */
bec39cab
AC
6328#ifdef __cplusplus
6329extern "C"
6330#endif
bec39cab
AC
6331char gethostbyname ();
6332int
6333main ()
6334{
81ecdfbb 6335return gethostbyname ();
bec39cab
AC
6336 ;
6337 return 0;
6338}
6339_ACEOF
81ecdfbb
RW
6340for ac_lib in '' nsl; do
6341 if test -z "$ac_lib"; then
6342 ac_res="none required"
6343 else
6344 ac_res=-l$ac_lib
b4e70030 6345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6346 fi
6347 if ac_fn_c_try_link "$LINENO"; then :
6348 ac_cv_search_gethostbyname=$ac_res
6349fi
6350rm -f core conftest.err conftest.$ac_objext \
6351 conftest$ac_exeext
6352 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6353 break
6354fi
6355done
6356if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6357
bec39cab 6358else
81ecdfbb 6359 ac_cv_search_gethostbyname=no
bec39cab 6360fi
81ecdfbb 6361rm conftest.$ac_ext
bec39cab
AC
6362LIBS=$ac_func_search_save_LIBS
6363fi
81ecdfbb
RW
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6365$as_echo "$ac_cv_search_gethostbyname" >&6; }
6366ac_res=$ac_cv_search_gethostbyname
6367if test "$ac_res" != no; then :
6368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6369
bec39cab 6370fi
96baa820 6371
c906108c 6372
b4e70030 6373# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6375$as_echo_n "checking for library containing socketpair... " >&6; }
6376if test "${ac_cv_search_socketpair+set}" = set; then :
6377 $as_echo_n "(cached) " >&6
b4e70030
JB
6378else
6379 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6381/* end confdefs.h. */
6382
81ecdfbb
RW
6383/* Override any GCC internal prototype to avoid an error.
6384 Use char because int might match the return type of a GCC
6385 builtin and then its argument prototype would still apply. */
b4e70030
JB
6386#ifdef __cplusplus
6387extern "C"
6388#endif
b4e70030
JB
6389char socketpair ();
6390int
6391main ()
6392{
81ecdfbb 6393return socketpair ();
b4e70030
JB
6394 ;
6395 return 0;
6396}
6397_ACEOF
81ecdfbb
RW
6398for ac_lib in '' socket; do
6399 if test -z "$ac_lib"; then
6400 ac_res="none required"
6401 else
6402 ac_res=-l$ac_lib
b4e70030 6403 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6404 fi
6405 if ac_fn_c_try_link "$LINENO"; then :
6406 ac_cv_search_socketpair=$ac_res
6407fi
6408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext
6410 if test "${ac_cv_search_socketpair+set}" = set; then :
6411 break
6412fi
6413done
6414if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6415
b4e70030 6416else
81ecdfbb 6417 ac_cv_search_socketpair=no
b4e70030 6418fi
81ecdfbb 6419rm conftest.$ac_ext
b4e70030
JB
6420LIBS=$ac_func_search_save_LIBS
6421fi
81ecdfbb
RW
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6423$as_echo "$ac_cv_search_socketpair" >&6; }
6424ac_res=$ac_cv_search_socketpair
6425if test "$ac_res" != no; then :
6426 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6427
6428fi
6429
6430
233a11ab 6431# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6432
6433 # See if the user specified whether he wants zlib support or not.
6434
6435# Check whether --with-zlib was given.
6436if test "${with_zlib+set}" = set; then :
6437 withval=$with_zlib;
6438else
6439 with_zlib=auto
6440fi
6441
6442
6443 if test "$with_zlib" != "no"; then
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6445$as_echo_n "checking for library containing zlibVersion... " >&6; }
6446if test "${ac_cv_search_zlibVersion+set}" = set; then :
6447 $as_echo_n "(cached) " >&6
233a11ab
CS
6448else
6449 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6451/* end confdefs.h. */
6452
81ecdfbb
RW
6453/* Override any GCC internal prototype to avoid an error.
6454 Use char because int might match the return type of a GCC
233a11ab 6455 builtin and then its argument prototype would still apply. */
233a11ab
CS
6456#ifdef __cplusplus
6457extern "C"
6458#endif
233a11ab
CS
6459char zlibVersion ();
6460int
6461main ()
6462{
81ecdfbb 6463return zlibVersion ();
233a11ab
CS
6464 ;
6465 return 0;
6466}
6467_ACEOF
81ecdfbb
RW
6468for ac_lib in '' z; do
6469 if test -z "$ac_lib"; then
6470 ac_res="none required"
233a11ab 6471 else
81ecdfbb
RW
6472 ac_res=-l$ac_lib
6473 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6474 fi
81ecdfbb
RW
6475 if ac_fn_c_try_link "$LINENO"; then :
6476 ac_cv_search_zlibVersion=$ac_res
233a11ab 6477fi
81ecdfbb
RW
6478rm -f core conftest.err conftest.$ac_objext \
6479 conftest$ac_exeext
6480 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6481 break
233a11ab 6482fi
81ecdfbb
RW
6483done
6484if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6485
233a11ab 6486else
81ecdfbb 6487 ac_cv_search_zlibVersion=no
233a11ab 6488fi
81ecdfbb
RW
6489rm conftest.$ac_ext
6490LIBS=$ac_func_search_save_LIBS
233a11ab 6491fi
81ecdfbb
RW
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6493$as_echo "$ac_cv_search_zlibVersion" >&6; }
6494ac_res=$ac_cv_search_zlibVersion
6495if test "$ac_res" != no; then :
6496 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6497 for ac_header in zlib.h
6498do :
6499 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6500if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6501 cat >>confdefs.h <<_ACEOF
81ecdfbb 6502#define HAVE_ZLIB_H 1
233a11ab
CS
6503_ACEOF
6504
6505fi
6506
6507done
6508
6509fi
6510
b040ad30
JB
6511 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6512 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6513 fi
6514 fi
6515
233a11ab 6516
77f120bf 6517# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6519$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6520if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6521 $as_echo_n "(cached) " >&6
bec39cab
AC
6522else
6523 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6525/* end confdefs.h. */
c906108c 6526
81ecdfbb
RW
6527/* Override any GCC internal prototype to avoid an error.
6528 Use char because int might match the return type of a GCC
6529 builtin and then its argument prototype would still apply. */
bec39cab
AC
6530#ifdef __cplusplus
6531extern "C"
6532#endif
77f120bf 6533char dlgetmodinfo ();
bec39cab
AC
6534int
6535main ()
6536{
81ecdfbb 6537return dlgetmodinfo ();
bec39cab
AC
6538 ;
6539 return 0;
6540}
6541_ACEOF
81ecdfbb
RW
6542for ac_lib in '' dl xpdl; do
6543 if test -z "$ac_lib"; then
6544 ac_res="none required"
6545 else
6546 ac_res=-l$ac_lib
b4e70030 6547 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6548 fi
6549 if ac_fn_c_try_link "$LINENO"; then :
6550 ac_cv_search_dlgetmodinfo=$ac_res
6551fi
6552rm -f core conftest.err conftest.$ac_objext \
6553 conftest$ac_exeext
6554 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6555 break
6556fi
6557done
6558if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6559
4e8d927d 6560else
81ecdfbb 6561 ac_cv_search_dlgetmodinfo=no
1ba607ad 6562fi
81ecdfbb 6563rm conftest.$ac_ext
bec39cab
AC
6564LIBS=$ac_func_search_save_LIBS
6565fi
81ecdfbb
RW
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6567$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6568ac_res=$ac_cv_search_dlgetmodinfo
6569if test "$ac_res" != no; then :
6570 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6571
8bb2c122 6572fi
8bb2c122 6573
8bb2c122 6574
77f120bf 6575
77f120bf 6576
6c7a06a3 6577
81ecdfbb
RW
6578# Check whether --with-libiconv-prefix was given.
6579if test "${with_libiconv_prefix+set}" = set; then :
6580 withval=$with_libiconv_prefix;
6c7a06a3 6581 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6582 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6583 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6584 done
6585
81ecdfbb
RW
6586fi
6587
6c7a06a3 6588
f18c4681 6589 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6590 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6591
81ecdfbb
RW
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6593$as_echo_n "checking for iconv... " >&6; }
6594if test "${am_cv_func_iconv+set}" = set; then :
6595 $as_echo_n "(cached) " >&6
d542061a 6596else
6c7a06a3
TT
6597
6598 am_cv_func_iconv="no, consider installing GNU libiconv"
6599 am_cv_lib_iconv=no
6600 am_cv_use_build_libiconv=no
f0f20949 6601 am_cv_build_libiconv_path=
4edb1e84
JB
6602
6603 # If libiconv is part of the build tree, then try using it over
6604 # any system iconv.
6605 if test -d ../libiconv; then
f18c4681
JB
6606 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6607 am_save_LIBS="$LIBS"
6608 am_save_CPPFLAGS="$CPPFLAGS"
6609 LIBS="$LIBS $lib_dir/libiconv.a"
6610 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6612/* end confdefs.h. */
6c7a06a3
TT
6613#include <stdlib.h>
6614#include <iconv.h>
d542061a
UW
6615int
6616main ()
6617{
6c7a06a3 6618iconv_t cd = iconv_open("","");
f18c4681
JB
6619 iconv(cd,NULL,NULL,NULL,NULL);
6620 iconv_close(cd);
d542061a
UW
6621 ;
6622 return 0;
6623}
6624_ACEOF
81ecdfbb 6625if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6626 am_cv_use_build_libiconv=yes
f0f20949 6627 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6628 am_cv_lib_iconv=yes
6629 am_cv_func_iconv=yes
d542061a 6630fi
81ecdfbb
RW
6631rm -f core conftest.err conftest.$ac_objext \
6632 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6633 LIBS="$am_save_LIBS"
6634 CPPFLAGS="$am_save_CPPFLAGS"
6635 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6636 break
6637 fi
6638 done
4edb1e84 6639 fi
94ae1714 6640
4edb1e84 6641 # Next, try to find iconv in libc.
6c7a06a3 6642 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6644/* end confdefs.h. */
6c7a06a3
TT
6645#include <stdlib.h>
6646#include <iconv.h>
d542061a
UW
6647int
6648main ()
6649{
6c7a06a3
TT
6650iconv_t cd = iconv_open("","");
6651 iconv(cd,NULL,NULL,NULL,NULL);
6652 iconv_close(cd);
d542061a
UW
6653 ;
6654 return 0;
6655}
6656_ACEOF
81ecdfbb 6657if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6658 am_cv_func_iconv=yes
d542061a 6659fi
81ecdfbb
RW
6660rm -f core conftest.err conftest.$ac_objext \
6661 conftest$ac_exeext conftest.$ac_ext
77f120bf 6662 fi
94ae1714 6663
4edb1e84
JB
6664 # If iconv was not in libc, try -liconv. In this case, arrange to
6665 # look in the libiconv prefix, if it was specified by the user.
6666 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6667 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6668 am_save_LIBS="$LIBS"
6669 if test -n "$LIBICONV_INCLUDE"; then
6670 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6671 LIBS="$LIBS $LIBICONV_LIBDIR"
6672 fi
6673 LIBS="$LIBS -liconv"
81ecdfbb 6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6675/* end confdefs.h. */
6c7a06a3
TT
6676#include <stdlib.h>
6677#include <iconv.h>
bec39cab
AC
6678int
6679main ()
6680{
6c7a06a3
TT
6681iconv_t cd = iconv_open("","");
6682 iconv(cd,NULL,NULL,NULL,NULL);
6683 iconv_close(cd);
bec39cab
AC
6684 ;
6685 return 0;
6686}
6687_ACEOF
81ecdfbb 6688if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6689 am_cv_lib_iconv=yes
6c7a06a3 6690 am_cv_func_iconv=yes
627af7ea 6691fi
81ecdfbb
RW
6692rm -f core conftest.err conftest.$ac_objext \
6693 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6694 LIBS="$am_save_LIBS"
fc3b640d 6695 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6696 fi
6697
6698fi
81ecdfbb
RW
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6700$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6701
6702 # Set the various flags based on the cache variables. We can't rely
6703 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6704 LIBICONV=
6705 if test "$am_cv_lib_iconv" = yes; then
6706 LIBICONV="-liconv"
94ae1714
TT
6707 else
6708 LIBICONV_LIBDIR=
6709 LIBICONV_INCLUDE=
fc3b640d
TT
6710 fi
6711 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6712 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6713 LIBICONV_LIBDIR=""
fc3b640d
TT
6714 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6715 fi
6716 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6717 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6718
6c7a06a3
TT
6719 if test "$am_cv_func_iconv" = yes; then
6720
81ecdfbb 6721$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6722
81ecdfbb
RW
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6724$as_echo_n "checking for iconv declaration... " >&6; }
6725 if test "${am_cv_proto_iconv+set}" = set; then :
6726 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6727else
6728
81ecdfbb 6729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6730/* end confdefs.h. */
6731
6c7a06a3
TT
6732#include <stdlib.h>
6733#include <iconv.h>
6734extern
b4e70030 6735#ifdef __cplusplus
6c7a06a3 6736"C"
b4e70030 6737#endif
6c7a06a3
TT
6738#if defined(__STDC__) || defined(__cplusplus)
6739size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6740#else
6741size_t iconv();
6742#endif
6743
b4e70030
JB
6744int
6745main ()
6746{
6c7a06a3 6747
b4e70030
JB
6748 ;
6749 return 0;
6750}
6751_ACEOF
81ecdfbb 6752if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6753 am_cv_proto_iconv_arg1=""
4e8d927d 6754else
81ecdfbb 6755 am_cv_proto_iconv_arg1="const"
b4e70030 6756fi
81ecdfbb 6757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6758 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);"
6759fi
6760
6761 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6763 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6764$as_echo "${ac_t:-
6765 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6766
6767cat >>confdefs.h <<_ACEOF
6768#define ICONV_CONST $am_cv_proto_iconv_arg1
6769_ACEOF
6770
6771 fi
6c7a06a3
TT
6772
6773
478aac75
DE
6774# GDB may fork/exec the iconv program to get the list of supported character
6775# sets. Allow the user to specify where to find it.
6776# There are several factors affecting the choice of option name:
6777# - There is already --with-libiconv-prefix but we can't use it, it specifies
6778# the build-time location of libiconv files.
6779# - The program we need to find is iconv, which comes with glibc. The user
6780# doesn't necessarily have libiconv installed. Therefore naming this
6781# --with-libiconv-foo feels wrong.
6782# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6783# defined to work on directories not files (though it really doesn't know
6784# the difference).
6785# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6786# with --with-libiconv-prefix.
6787# Putting these together is why the option name is --with-iconv-bin.
6788
6789
6790# Check whether --with-iconv-bin was given.
6791if test "${with_iconv_bin+set}" = set; then :
6792 withval=$with_iconv_bin; iconv_bin="${withval}"
6793
6794cat >>confdefs.h <<_ACEOF
6795#define ICONV_BIN "${iconv_bin}"
6796_ACEOF
6797
6798
6799 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6800 if test "x$prefix" = xNONE; then
6801 test_prefix=/usr/local
6802 else
6803 test_prefix=$prefix
6804 fi
6805 else
6806 test_prefix=$exec_prefix
6807 fi
6808 value=0
6809 case ${iconv_bin} in
6810 "${test_prefix}"|"${test_prefix}/"*|\
6811 '${exec_prefix}'|'${exec_prefix}/'*)
6812 value=1
6813 ;;
6814 esac
6815
6816cat >>confdefs.h <<_ACEOF
6817#define ICONV_BIN_RELOCATABLE $value
6818_ACEOF
6819
6820
6821
6822fi
6823
6824
6c7a06a3
TT
6825# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6826# There is a very specific comment in /usr/include/curses.h explaining that
6827# termcap routines built into libcurses must not be used.
6828#
6829# The symptoms we observed so far is GDB unexpectedly changing
6830# the terminal settings when tgetent is called - this is particularly
6831# visible as the output is missing carriage returns, and so rapidly
6832# becomes very hard to read.
6833#
6834# The readline configure script has already decided that libtermcap
6835# was enough for its purposes, and so decided to build readline using
6836# libtermcap. Since the TUI mode requires curses, building GDB with
6837# TUI enabled results in both libraries to be used at the same time,
6838# which is not allowed. This basically means that GDB with TUI is
6839# broken on alpha-osf.
6840
6841case $host_os in
6bcc772d
RO
6842 osf* )
6843 if test x"$enable_tui" = xyes; then
81ecdfbb 6844 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6845 fi
6bcc772d 6846 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6847 enable_tui=no
6848 fi
6849 ;;
6850esac
6851
cb01cfba 6852# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6853if test x"$enable_tui" != xno; then
cb01cfba
JB
6854 prefer_curses=yes
6855fi
6856
6857curses_found=no
6858if test x"$prefer_curses" = xyes; then
6859 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6860 # curses library because the latter might not provide all the
6861 # functionality we need. However, this leads to problems on systems
6862 # where the linker searches /usr/local/lib, but the compiler doesn't
6863 # search /usr/local/include, if ncurses is installed in /usr/local. A
6864 # default installation of ncurses on alpha*-dec-osf* will lead to such
6865 # a situation.
81ecdfbb
RW
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6867$as_echo_n "checking for library containing waddstr... " >&6; }
6868if test "${ac_cv_search_waddstr+set}" = set; then :
6869 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6870else
6871 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6873/* end confdefs.h. */
6874
81ecdfbb
RW
6875/* Override any GCC internal prototype to avoid an error.
6876 Use char because int might match the return type of a GCC
6877 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6878#ifdef __cplusplus
6879extern "C"
6880#endif
6c7a06a3
TT
6881char waddstr ();
6882int
6883main ()
6884{
81ecdfbb 6885return waddstr ();
6c7a06a3
TT
6886 ;
6887 return 0;
6888}
6889_ACEOF
81ecdfbb
RW
6890for ac_lib in '' ncurses cursesX curses; do
6891 if test -z "$ac_lib"; then
6892 ac_res="none required"
6893 else
6894 ac_res=-l$ac_lib
6895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6896 fi
6897 if ac_fn_c_try_link "$LINENO"; then :
6898 ac_cv_search_waddstr=$ac_res
6899fi
6900rm -f core conftest.err conftest.$ac_objext \
6901 conftest$ac_exeext
6902 if test "${ac_cv_search_waddstr+set}" = set; then :
6903 break
6904fi
6905done
6906if test "${ac_cv_search_waddstr+set}" = set; then :
6907
6c7a06a3 6908else
81ecdfbb
RW
6909 ac_cv_search_waddstr=no
6910fi
6911rm conftest.$ac_ext
6912LIBS=$ac_func_search_save_LIBS
6913fi
6914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6915$as_echo "$ac_cv_search_waddstr" >&6; }
6916ac_res=$ac_cv_search_waddstr
6917if test "$ac_res" != no; then :
6918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6919
6920fi
6921
6922
cb01cfba
JB
6923 if test "$ac_cv_search_waddstr" != no; then
6924 curses_found=yes
6925 fi
6926fi
6927
6928# Check whether we should enable the TUI, but only do so if we really
6929# can.
6930if test x"$enable_tui" != xno; then
6931 if test -d $srcdir/tui; then
6932 if test "$curses_found" != no; then
6c7a06a3
TT
6933 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6934 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6935 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6936 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6937 else
6938 if test x"$enable_tui" = xyes; then
81ecdfbb 6939 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6940 else
81ecdfbb
RW
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6942$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6943 fi
6944 fi
6945 fi
6946fi
6947
6948# Since GDB uses Readline, we need termcap functionality. In many
6949# cases this will be provided by the curses library, but some systems
6950# have a seperate termcap library, or no curses library at all.
6951
6952case $host_os in
6953 cygwin*)
6954 if test -d $srcdir/libtermcap; then
6955 LIBS="../libtermcap/libtermcap.a $LIBS"
6956 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6957 fi ;;
6958 go32* | *djgpp*)
6959 ac_cv_search_tgetent="none required"
6960 ;;
6961 *mingw32*)
6962 ac_cv_search_tgetent="none required"
6963 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6964 ;;
6965esac
6966
6967# These are the libraries checked by Readline.
81ecdfbb
RW
6968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6969$as_echo_n "checking for library containing tgetent... " >&6; }
6970if test "${ac_cv_search_tgetent+set}" = set; then :
6971 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6972else
6973 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6975/* end confdefs.h. */
6976
81ecdfbb
RW
6977/* Override any GCC internal prototype to avoid an error.
6978 Use char because int might match the return type of a GCC
6979 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6980#ifdef __cplusplus
6981extern "C"
6982#endif
6c7a06a3
TT
6983char tgetent ();
6984int
6985main ()
6986{
81ecdfbb 6987return tgetent ();
6c7a06a3
TT
6988 ;
6989 return 0;
6990}
6991_ACEOF
81ecdfbb
RW
6992for ac_lib in '' termcap tinfo curses ncurses; do
6993 if test -z "$ac_lib"; then
6994 ac_res="none required"
6995 else
6996 ac_res=-l$ac_lib
6c7a06a3 6997 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6998 fi
6999 if ac_fn_c_try_link "$LINENO"; then :
7000 ac_cv_search_tgetent=$ac_res
7001fi
7002rm -f core conftest.err conftest.$ac_objext \
7003 conftest$ac_exeext
7004 if test "${ac_cv_search_tgetent+set}" = set; then :
7005 break
7006fi
7007done
7008if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7009
6c7a06a3 7010else
81ecdfbb 7011 ac_cv_search_tgetent=no
6c7a06a3 7012fi
81ecdfbb 7013rm conftest.$ac_ext
6c7a06a3
TT
7014LIBS=$ac_func_search_save_LIBS
7015fi
81ecdfbb
RW
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7017$as_echo "$ac_cv_search_tgetent" >&6; }
7018ac_res=$ac_cv_search_tgetent
7019if test "$ac_res" != no; then :
7020 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7021
06825bd1
MK
7022fi
7023
06825bd1 7024
bec39cab 7025if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7026 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7027fi
7028
3841debe 7029
81ecdfbb
RW
7030# Check whether --with-system-readline was given.
7031if test "${with_system_readline+set}" = set; then :
7032 withval=$with_system_readline;
7033fi
6a30b0a5 7034
6a30b0a5
AS
7035
7036if test "$with_system_readline" = yes; then
7037 READLINE=-lreadline
7038 READLINE_DEPS=
7039 READLINE_CFLAGS=
39037522 7040 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7041else
7042 READLINE='$(READLINE_DIR)/libreadline.a'
7043 READLINE_DEPS='$(READLINE)'
7044 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7045 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7046fi
7047
7048
7049
7050
7051
f997c383
SD
7052# Generate jit-reader.h
7053
7054# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7055TARGET_PTR=
7056
7057# The cast to long int works around a bug in the HP C Compiler
7058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7060# This bug is HP SR number 8606223364.
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7062$as_echo_n "checking size of unsigned long long... " >&6; }
7063if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7064 $as_echo_n "(cached) " >&6
7065else
7066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7067
7068else
7069 if test "$ac_cv_type_unsigned_long_long" = yes; then
7070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7072{ as_fn_set_status 77
7073as_fn_error "cannot compute sizeof (unsigned long long)
7074See \`config.log' for more details." "$LINENO" 5; }; }
7075 else
7076 ac_cv_sizeof_unsigned_long_long=0
7077 fi
7078fi
7079
7080fi
7081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7082$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7083
7084
7085
7086cat >>confdefs.h <<_ACEOF
7087#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7088_ACEOF
7089
7090
7091# The cast to long int works around a bug in the HP C Compiler
7092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7094# This bug is HP SR number 8606223364.
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7096$as_echo_n "checking size of unsigned long... " >&6; }
7097if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7101
7102else
7103 if test "$ac_cv_type_unsigned_long" = yes; then
7104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7106{ as_fn_set_status 77
7107as_fn_error "cannot compute sizeof (unsigned long)
7108See \`config.log' for more details." "$LINENO" 5; }; }
7109 else
7110 ac_cv_sizeof_unsigned_long=0
7111 fi
7112fi
7113
7114fi
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7116$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7117
7118
7119
7120cat >>confdefs.h <<_ACEOF
7121#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7122_ACEOF
7123
7124
7125# The cast to long int works around a bug in the HP C Compiler
7126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7128# This bug is HP SR number 8606223364.
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7130$as_echo_n "checking size of unsigned __int128... " >&6; }
7131if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7132 $as_echo_n "(cached) " >&6
7133else
7134 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7135
7136else
7137 if test "$ac_cv_type_unsigned___int128" = yes; then
7138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7140{ as_fn_set_status 77
7141as_fn_error "cannot compute sizeof (unsigned __int128)
7142See \`config.log' for more details." "$LINENO" 5; }; }
7143 else
7144 ac_cv_sizeof_unsigned___int128=0
7145 fi
7146fi
7147
7148fi
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7150$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7151
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7156_ACEOF
7157
7158
7159
7160if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7161 TARGET_PTR="unsigned long"
7162elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7163 TARGET_PTR="unsigned long long"
7164elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7165 TARGET_PTR="unsigned __int128"
7166else
7167 TARGET_PTR="unsigned long"
7168fi
7169
7170
7171ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7172
7173
a2d08b9e
SD
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7175$as_echo_n "checking for library containing dlopen... " >&6; }
7176if test "${ac_cv_search_dlopen+set}" = set; then :
7177 $as_echo_n "(cached) " >&6
7178else
7179 ac_func_search_save_LIBS=$LIBS
7180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7181/* end confdefs.h. */
7182
7183/* Override any GCC internal prototype to avoid an error.
7184 Use char because int might match the return type of a GCC
7185 builtin and then its argument prototype would still apply. */
7186#ifdef __cplusplus
7187extern "C"
7188#endif
7189char dlopen ();
7190int
7191main ()
7192{
7193return dlopen ();
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198for ac_lib in '' dl; do
7199 if test -z "$ac_lib"; then
7200 ac_res="none required"
7201 else
7202 ac_res=-l$ac_lib
7203 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7204 fi
7205 if ac_fn_c_try_link "$LINENO"; then :
7206 ac_cv_search_dlopen=$ac_res
7207fi
7208rm -f core conftest.err conftest.$ac_objext \
7209 conftest$ac_exeext
7210 if test "${ac_cv_search_dlopen+set}" = set; then :
7211 break
7212fi
7213done
7214if test "${ac_cv_search_dlopen+set}" = set; then :
7215
7216else
7217 ac_cv_search_dlopen=no
7218fi
7219rm conftest.$ac_ext
7220LIBS=$ac_func_search_save_LIBS
7221fi
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7223$as_echo "$ac_cv_search_dlopen" >&6; }
7224ac_res=$ac_cv_search_dlopen
7225if test "$ac_res" != no; then :
7226 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7227
7228fi
7229
7230
39037522 7231
b8e0a31c
SD
7232
7233# Check whether --with-jit-reader-dir was given.
7234if test "${with_jit_reader_dir+set}" = set; then :
7235 withval=$with_jit_reader_dir;
7236 JIT_READER_DIR=$withval
7237else
7238 JIT_READER_DIR=${libdir}/gdb
7239fi
7240
7241
7242 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7243 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7244 ac_define_dir=`eval echo $JIT_READER_DIR`
7245 ac_define_dir=`eval echo $ac_define_dir`
7246
7247cat >>confdefs.h <<_ACEOF
7248#define JIT_READER_DIR "$ac_define_dir"
7249_ACEOF
7250
7251
7252
7253
7254 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7255 if test "x$prefix" = xNONE; then
7256 test_prefix=/usr/local
7257 else
7258 test_prefix=$prefix
7259 fi
7260 else
7261 test_prefix=$exec_prefix
7262 fi
7263 value=0
7264 case ${ac_define_dir} in
7265 "${test_prefix}"|"${test_prefix}/"*|\
7266 '${exec_prefix}'|'${exec_prefix}/'*)
7267 value=1
7268 ;;
7269 esac
7270
7271cat >>confdefs.h <<_ACEOF
7272#define JIT_READER_DIR_RELOCATABLE $value
7273_ACEOF
7274
7275
7276
7277
7278
81ecdfbb
RW
7279# Check whether --with-expat was given.
7280if test "${with_expat+set}" = set; then :
7281 withval=$with_expat;
5c39566f
DJ
7282else
7283 with_expat=auto
81ecdfbb
RW
7284fi
7285
7286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7287$as_echo_n "checking whether to use expat... " >&6; }
7288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7289$as_echo "$with_expat" >&6; }
5c39566f
DJ
7290
7291if test "${with_expat}" = no; then
81ecdfbb
RW
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7293$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7294 HAVE_LIBEXPAT=no
7295else
7296
3841debe
DJ
7297 if test "X$prefix" = "XNONE"; then
7298 acl_final_prefix="$ac_default_prefix"
7299 else
7300 acl_final_prefix="$prefix"
7301 fi
7302 if test "X$exec_prefix" = "XNONE"; then
7303 acl_final_exec_prefix='${prefix}'
7304 else
7305 acl_final_exec_prefix="$exec_prefix"
7306 fi
7307 acl_save_prefix="$prefix"
7308 prefix="$acl_final_prefix"
7309 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7310 prefix="$acl_save_prefix"
7311
7312
81ecdfbb
RW
7313# Check whether --with-gnu-ld was given.
7314if test "${with_gnu_ld+set}" = set; then :
7315 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7316else
7317 with_gnu_ld=no
81ecdfbb
RW
7318fi
7319
3841debe
DJ
7320# Prepare PATH_SEPARATOR.
7321# The user is always right.
7322if test "${PATH_SEPARATOR+set}" != set; then
7323 echo "#! /bin/sh" >conf$$.sh
7324 echo "exit 0" >>conf$$.sh
7325 chmod +x conf$$.sh
7326 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7327 PATH_SEPARATOR=';'
7328 else
7329 PATH_SEPARATOR=:
7330 fi
7331 rm -f conf$$.sh
7332fi
7333ac_prog=ld
7334if test "$GCC" = yes; then
7335 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7337$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7338 case $host in
7339 *-*-mingw*)
7340 # gcc leaves a trailing carriage return which upsets mingw
7341 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7342 *)
7343 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7344 esac
7345 case $ac_prog in
7346 # Accept absolute paths.
7347 [\\/]* | [A-Za-z]:[\\/]*)
7348 re_direlt='/[^/][^/]*/\.\./'
7349 # Canonicalize the path of ld
7350 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7351 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7352 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7353 done
7354 test -z "$LD" && LD="$ac_prog"
7355 ;;
7356 "")
7357 # If it fails, then pretend we aren't using GCC.
7358 ac_prog=ld
7359 ;;
7360 *)
7361 # If it is relative, then search for the first ld in PATH.
7362 with_gnu_ld=unknown
7363 ;;
7364 esac
7365elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7367$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7368else
81ecdfbb
RW
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7370$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7371fi
81ecdfbb
RW
7372if test "${acl_cv_path_LD+set}" = set; then :
7373 $as_echo_n "(cached) " >&6
3841debe
DJ
7374else
7375 if test -z "$LD"; then
7376 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7377 for ac_dir in $PATH; do
7378 test -z "$ac_dir" && ac_dir=.
7379 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7380 acl_cv_path_LD="$ac_dir/$ac_prog"
7381 # Check to see if the program is GNU ld. I'd rather use --version,
7382 # but apparently some GNU ld's only accept -v.
7383 # Break only if it was the GNU/non-GNU ld that we prefer.
7384 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7385 test "$with_gnu_ld" != no && break
7386 else
7387 test "$with_gnu_ld" != yes && break
7388 fi
7389 fi
7390 done
7391 IFS="$ac_save_ifs"
7392else
7393 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7394fi
7395fi
7396
7397LD="$acl_cv_path_LD"
7398if test -n "$LD"; then
81ecdfbb
RW
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7400$as_echo "$LD" >&6; }
3841debe 7401else
81ecdfbb
RW
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403$as_echo "no" >&6; }
3841debe 7404fi
81ecdfbb
RW
7405test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7407$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7408if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7409 $as_echo_n "(cached) " >&6
3841debe
DJ
7410else
7411 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7412if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7413 acl_cv_prog_gnu_ld=yes
7414else
7415 acl_cv_prog_gnu_ld=no
7416fi
7417fi
81ecdfbb
RW
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7419$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7420with_gnu_ld=$acl_cv_prog_gnu_ld
7421
7422
7423
81ecdfbb
RW
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7425$as_echo_n "checking for shared library run path origin... " >&6; }
7426if test "${acl_cv_rpath+set}" = set; then :
7427 $as_echo_n "(cached) " >&6
3841debe
DJ
7428else
7429
7430 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7431 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7432 . ./conftest.sh
7433 rm -f ./conftest.sh
7434 acl_cv_rpath=done
7435
7436fi
81ecdfbb
RW
7437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7438$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7439 wl="$acl_cv_wl"
7440 libext="$acl_cv_libext"
7441 shlibext="$acl_cv_shlibext"
7442 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7443 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7444 hardcode_direct="$acl_cv_hardcode_direct"
7445 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7446 # Check whether --enable-rpath was given.
7447if test "${enable_rpath+set}" = set; then :
7448 enableval=$enable_rpath; :
3841debe
DJ
7449else
7450 enable_rpath=yes
81ecdfbb
RW
7451fi
7452
3841debe
DJ
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462 use_additional=yes
7463
7464 acl_save_prefix="$prefix"
7465 prefix="$acl_final_prefix"
7466 acl_save_exec_prefix="$exec_prefix"
7467 exec_prefix="$acl_final_exec_prefix"
7468
7469 eval additional_includedir=\"$includedir\"
7470 eval additional_libdir=\"$libdir\"
7471
7472 exec_prefix="$acl_save_exec_prefix"
7473 prefix="$acl_save_prefix"
7474
7475
81ecdfbb
RW
7476# Check whether --with-libexpat-prefix was given.
7477if test "${with_libexpat_prefix+set}" = set; then :
7478 withval=$with_libexpat_prefix;
3841debe
DJ
7479 if test "X$withval" = "Xno"; then
7480 use_additional=no
7481 else
7482 if test "X$withval" = "X"; then
7483
7484 acl_save_prefix="$prefix"
7485 prefix="$acl_final_prefix"
7486 acl_save_exec_prefix="$exec_prefix"
7487 exec_prefix="$acl_final_exec_prefix"
7488
7489 eval additional_includedir=\"$includedir\"
7490 eval additional_libdir=\"$libdir\"
7491
7492 exec_prefix="$acl_save_exec_prefix"
7493 prefix="$acl_save_prefix"
7494
7495 else
7496 additional_includedir="$withval/include"
7497 additional_libdir="$withval/lib"
7498 fi
7499 fi
7500
81ecdfbb
RW
7501fi
7502
3841debe
DJ
7503 LIBEXPAT=
7504 LTLIBEXPAT=
7505 INCEXPAT=
7506 rpathdirs=
7507 ltrpathdirs=
7508 names_already_handled=
7509 names_next_round='expat '
7510 while test -n "$names_next_round"; do
7511 names_this_round="$names_next_round"
7512 names_next_round=
7513 for name in $names_this_round; do
7514 already_handled=
7515 for n in $names_already_handled; do
7516 if test "$n" = "$name"; then
7517 already_handled=yes
7518 break
7519 fi
7520 done
7521 if test -z "$already_handled"; then
7522 names_already_handled="$names_already_handled $name"
7523 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7524 eval value=\"\$HAVE_LIB$uppername\"
7525 if test -n "$value"; then
7526 if test "$value" = yes; then
7527 eval value=\"\$LIB$uppername\"
7528 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7529 eval value=\"\$LTLIB$uppername\"
7530 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7531 else
7532 :
7533 fi
7534 else
7535 found_dir=
7536 found_la=
7537 found_so=
7538 found_a=
7539 if test $use_additional = yes; then
7540 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7541 found_dir="$additional_libdir"
7542 found_so="$additional_libdir/lib$name.$shlibext"
7543 if test -f "$additional_libdir/lib$name.la"; then
7544 found_la="$additional_libdir/lib$name.la"
7545 fi
7546 else
7547 if test -f "$additional_libdir/lib$name.$libext"; then
7548 found_dir="$additional_libdir"
7549 found_a="$additional_libdir/lib$name.$libext"
7550 if test -f "$additional_libdir/lib$name.la"; then
7551 found_la="$additional_libdir/lib$name.la"
7552 fi
7553 fi
7554 fi
7555 fi
7556 if test "X$found_dir" = "X"; then
7557 for x in $LDFLAGS $LTLIBEXPAT; do
7558
7559 acl_save_prefix="$prefix"
7560 prefix="$acl_final_prefix"
7561 acl_save_exec_prefix="$exec_prefix"
7562 exec_prefix="$acl_final_exec_prefix"
7563 eval x=\"$x\"
7564 exec_prefix="$acl_save_exec_prefix"
7565 prefix="$acl_save_prefix"
7566
7567 case "$x" in
7568 -L*)
7569 dir=`echo "X$x" | sed -e 's/^X-L//'`
7570 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7571 found_dir="$dir"
7572 found_so="$dir/lib$name.$shlibext"
7573 if test -f "$dir/lib$name.la"; then
7574 found_la="$dir/lib$name.la"
7575 fi
7576 else
7577 if test -f "$dir/lib$name.$libext"; then
7578 found_dir="$dir"
7579 found_a="$dir/lib$name.$libext"
7580 if test -f "$dir/lib$name.la"; then
7581 found_la="$dir/lib$name.la"
7582 fi
7583 fi
7584 fi
7585 ;;
7586 esac
7587 if test "X$found_dir" != "X"; then
7588 break
7589 fi
7590 done
7591 fi
7592 if test "X$found_dir" != "X"; then
7593 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7594 if test "X$found_so" != "X"; then
7595 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7596 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7597 else
7598 haveit=
7599 for x in $ltrpathdirs; do
7600 if test "X$x" = "X$found_dir"; then
7601 haveit=yes
7602 break
7603 fi
7604 done
7605 if test -z "$haveit"; then
7606 ltrpathdirs="$ltrpathdirs $found_dir"
7607 fi
7608 if test "$hardcode_direct" = yes; then
7609 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7610 else
7611 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7612 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7613 haveit=
7614 for x in $rpathdirs; do
7615 if test "X$x" = "X$found_dir"; then
7616 haveit=yes
7617 break
7618 fi
7619 done
7620 if test -z "$haveit"; then
7621 rpathdirs="$rpathdirs $found_dir"
7622 fi
7623 else
7624 haveit=
7625 for x in $LDFLAGS $LIBEXPAT; do
7626
7627 acl_save_prefix="$prefix"
7628 prefix="$acl_final_prefix"
7629 acl_save_exec_prefix="$exec_prefix"
7630 exec_prefix="$acl_final_exec_prefix"
7631 eval x=\"$x\"
7632 exec_prefix="$acl_save_exec_prefix"
7633 prefix="$acl_save_prefix"
7634
7635 if test "X$x" = "X-L$found_dir"; then
7636 haveit=yes
7637 break
7638 fi
7639 done
7640 if test -z "$haveit"; then
7641 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7642 fi
7643 if test "$hardcode_minus_L" != no; then
7644 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7645 else
7646 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7647 fi
7648 fi
7649 fi
7650 fi
7651 else
7652 if test "X$found_a" != "X"; then
7653 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7654 else
7655 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7656 fi
7657 fi
7658 additional_includedir=
7659 case "$found_dir" in
7660 */lib | */lib/)
7661 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7662 additional_includedir="$basedir/include"
7663 ;;
7664 esac
7665 if test "X$additional_includedir" != "X"; then
7666 if test "X$additional_includedir" != "X/usr/include"; then
7667 haveit=
7668 if test "X$additional_includedir" = "X/usr/local/include"; then
7669 if test -n "$GCC"; then
7670 case $host_os in
7671 linux*) haveit=yes;;
7672 esac
7673 fi
7674 fi
7675 if test -z "$haveit"; then
7676 for x in $CPPFLAGS $INCEXPAT; do
7677
7678 acl_save_prefix="$prefix"
7679 prefix="$acl_final_prefix"
7680 acl_save_exec_prefix="$exec_prefix"
7681 exec_prefix="$acl_final_exec_prefix"
7682 eval x=\"$x\"
7683 exec_prefix="$acl_save_exec_prefix"
7684 prefix="$acl_save_prefix"
7685
7686 if test "X$x" = "X-I$additional_includedir"; then
7687 haveit=yes
7688 break
7689 fi
7690 done
7691 if test -z "$haveit"; then
7692 if test -d "$additional_includedir"; then
7693 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7694 fi
7695 fi
7696 fi
7697 fi
7698 fi
7699 if test -n "$found_la"; then
7700 save_libdir="$libdir"
7701 case "$found_la" in
7702 */* | *\\*) . "$found_la" ;;
7703 *) . "./$found_la" ;;
7704 esac
7705 libdir="$save_libdir"
7706 for dep in $dependency_libs; do
7707 case "$dep" in
7708 -L*)
7709 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7710 if test "X$additional_libdir" != "X/usr/lib"; then
7711 haveit=
7712 if test "X$additional_libdir" = "X/usr/local/lib"; then
7713 if test -n "$GCC"; then
7714 case $host_os in
7715 linux*) haveit=yes;;
7716 esac
7717 fi
7718 fi
7719 if test -z "$haveit"; then
7720 haveit=
7721 for x in $LDFLAGS $LIBEXPAT; do
7722
7723 acl_save_prefix="$prefix"
7724 prefix="$acl_final_prefix"
7725 acl_save_exec_prefix="$exec_prefix"
7726 exec_prefix="$acl_final_exec_prefix"
7727 eval x=\"$x\"
7728 exec_prefix="$acl_save_exec_prefix"
7729 prefix="$acl_save_prefix"
7730
7731 if test "X$x" = "X-L$additional_libdir"; then
7732 haveit=yes
7733 break
7734 fi
7735 done
7736 if test -z "$haveit"; then
7737 if test -d "$additional_libdir"; then
7738 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7739 fi
7740 fi
7741 haveit=
7742 for x in $LDFLAGS $LTLIBEXPAT; do
7743
7744 acl_save_prefix="$prefix"
7745 prefix="$acl_final_prefix"
7746 acl_save_exec_prefix="$exec_prefix"
7747 exec_prefix="$acl_final_exec_prefix"
7748 eval x=\"$x\"
7749 exec_prefix="$acl_save_exec_prefix"
7750 prefix="$acl_save_prefix"
7751
7752 if test "X$x" = "X-L$additional_libdir"; then
7753 haveit=yes
7754 break
7755 fi
7756 done
7757 if test -z "$haveit"; then
7758 if test -d "$additional_libdir"; then
7759 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7760 fi
7761 fi
7762 fi
7763 fi
7764 ;;
7765 -R*)
7766 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7767 if test "$enable_rpath" != no; then
7768 haveit=
7769 for x in $rpathdirs; do
7770 if test "X$x" = "X$dir"; then
7771 haveit=yes
7772 break
7773 fi
7774 done
7775 if test -z "$haveit"; then
7776 rpathdirs="$rpathdirs $dir"
7777 fi
7778 haveit=
7779 for x in $ltrpathdirs; do
7780 if test "X$x" = "X$dir"; then
7781 haveit=yes
7782 break
7783 fi
7784 done
7785 if test -z "$haveit"; then
7786 ltrpathdirs="$ltrpathdirs $dir"
7787 fi
7788 fi
7789 ;;
7790 -l*)
7791 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7792 ;;
7793 *.la)
7794 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7795 ;;
7796 *)
7797 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7798 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7799 ;;
81ecdfbb
RW
7800 esac
7801 done
7802 fi
7803 else
7804 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7805 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7806 fi
7807 fi
7808 fi
7809 done
7810 done
7811 if test "X$rpathdirs" != "X"; then
7812 if test -n "$hardcode_libdir_separator"; then
7813 alldirs=
7814 for found_dir in $rpathdirs; do
7815 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7816 done
7817 acl_save_libdir="$libdir"
7818 libdir="$alldirs"
7819 eval flag=\"$hardcode_libdir_flag_spec\"
7820 libdir="$acl_save_libdir"
7821 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7822 else
7823 for found_dir in $rpathdirs; do
7824 acl_save_libdir="$libdir"
7825 libdir="$found_dir"
7826 eval flag=\"$hardcode_libdir_flag_spec\"
7827 libdir="$acl_save_libdir"
7828 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7829 done
7830 fi
7831 fi
7832 if test "X$ltrpathdirs" != "X"; then
7833 for found_dir in $ltrpathdirs; do
7834 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7835 done
7836 fi
a9322a30
TT
7837
7838
81ecdfbb 7839 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7840
81ecdfbb
RW
7841 for element in $INCEXPAT; do
7842 haveit=
7843 for x in $CPPFLAGS; do
a9322a30 7844
81ecdfbb
RW
7845 acl_save_prefix="$prefix"
7846 prefix="$acl_final_prefix"
7847 acl_save_exec_prefix="$exec_prefix"
7848 exec_prefix="$acl_final_exec_prefix"
7849 eval x=\"$x\"
7850 exec_prefix="$acl_save_exec_prefix"
7851 prefix="$acl_save_prefix"
a8111142 7852
81ecdfbb
RW
7853 if test "X$x" = "X$element"; then
7854 haveit=yes
7855 break
7856 fi
7857 done
7858 if test -z "$haveit"; then
7859 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7860 fi
7861 done
a9322a30
TT
7862
7863
81ecdfbb
RW
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7865$as_echo_n "checking for libexpat... " >&6; }
7866if test "${ac_cv_libexpat+set}" = set; then :
7867 $as_echo_n "(cached) " >&6
bec39cab 7868else
bec39cab 7869
81ecdfbb
RW
7870 ac_save_LIBS="$LIBS"
7871 LIBS="$LIBS $LIBEXPAT"
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7873/* end confdefs.h. */
81ecdfbb
RW
7874#include "expat.h"
7875int
7876main ()
7877{
7878XML_Parser p = XML_ParserCreate (0);
7879 ;
7880 return 0;
7881}
bec39cab 7882_ACEOF
81ecdfbb
RW
7883if ac_fn_c_try_link "$LINENO"; then :
7884 ac_cv_libexpat=yes
c906108c 7885else
81ecdfbb 7886 ac_cv_libexpat=no
bec39cab 7887fi
81ecdfbb
RW
7888rm -f core conftest.err conftest.$ac_objext \
7889 conftest$ac_exeext conftest.$ac_ext
7890 LIBS="$ac_save_LIBS"
c906108c 7891
95ca63c4 7892fi
81ecdfbb
RW
7893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7894$as_echo "$ac_cv_libexpat" >&6; }
7895 if test "$ac_cv_libexpat" = yes; then
7896 HAVE_LIBEXPAT=yes
bec39cab 7897
81ecdfbb 7898$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7899
81ecdfbb
RW
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7901$as_echo_n "checking how to link with libexpat... " >&6; }
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7903$as_echo "$LIBEXPAT" >&6; }
7904 else
7905 HAVE_LIBEXPAT=no
7906 CPPFLAGS="$ac_save_CPPFLAGS"
7907 LIBEXPAT=
7908 LTLIBEXPAT=
7909 fi
95ca63c4
CF
7910
7911
7912
7cb9022a
MK
7913
7914
bec39cab 7915
81ecdfbb
RW
7916 if test "$HAVE_LIBEXPAT" != yes; then
7917 if test "$with_expat" = yes; then
7918 as_fn_error "expat is missing or unusable" "$LINENO" 5
7919 else
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7921$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7922 fi
7923 else
7924 save_LIBS=$LIBS
7925 LIBS="$LIBS $LIBEXPAT"
7926 for ac_func in XML_StopParser
7927do :
7928 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7929if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7930 cat >>confdefs.h <<_ACEOF
81ecdfbb 7931#define HAVE_XML_STOPPARSER 1
bec39cab 7932_ACEOF
95ca63c4 7933
bec39cab 7934fi
bec39cab 7935done
95ca63c4 7936
81ecdfbb
RW
7937 LIBS=$save_LIBS
7938 fi
a9322a30
TT
7939fi
7940
a9322a30 7941
a9322a30
TT
7942
7943
ec685c5e 7944
0c4a4063 7945
81ecdfbb
RW
7946# Check whether --with-python was given.
7947if test "${with_python+set}" = set; then :
7948 withval=$with_python;
bec39cab 7949else
81ecdfbb 7950 with_python=auto
bec39cab 7951fi
bec39cab 7952
81ecdfbb
RW
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7954$as_echo_n "checking whether to use python... " >&6; }
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7956$as_echo "$with_python" >&6; }
9a156167 7957
81ecdfbb
RW
7958if test "${with_python}" = no; then
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7960$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7961 have_libpython=no
bec39cab 7962else
81ecdfbb 7963 case "${with_python}" in
8c85a4e2 7964 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7965 if test -d ${with_python}; then
7966 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7967 python_prog="${with_python}/bin/python"
0c4a4063 7968 python_prefix=
9c4ea6c5
JB
7969 # If python does not exit ${with_python}/bin, then try in
7970 # ${with_python}. On Windows/MinGW, this is where the Python
7971 # executable is.
7972 if test ! -x "${python_prog}"; then
7973 python_prog="${with_python}/python"
7974 python_prefix=
7975 fi
e7a30f46 7976 if test ! -x "${python_prog}"; then
ec685c5e
DE
7977 # Fall back to gdb 7.0/7.1 behaviour.
7978 python_prog=missing
0c4a4063 7979 python_prefix=${with_python}
ec685c5e 7980 fi
e7a30f46 7981 elif test -x "${with_python}"; then
ec685c5e
DE
7982 # While we can't run python compiled for $host (unless host == build),
7983 # the user could write a script that provides the needed information,
7984 # so we support that.
ec685c5e 7985 python_prog=${with_python}
0c4a4063 7986 python_prefix=
ec685c5e
DE
7987 else
7988 as_fn_error "invalid value for --with-python" "$LINENO" 5
7989 fi
81ecdfbb 7990 ;;
ec685c5e
DE
7991 */*)
7992 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7993 as_fn_error "invalid value for --with-python" "$LINENO" 5
7994 ;;
ec685c5e
DE
7995 *)
7996 # The user has either specified auto, yes, or the name of the python
7997 # program assumed to be in $PATH.
7998 python_prefix=
7999 case "${with_python}" in
8000 yes | auto)
8001 if test ${build} = ${host}; then
8002 # Extract the first word of "python", so it can be a program name with args.
8003set dummy python; ac_word=$2
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8005$as_echo_n "checking for $ac_word... " >&6; }
8006if test "${ac_cv_path_python_prog_path+set}" = set; then :
8007 $as_echo_n "(cached) " >&6
8008else
8009 case $python_prog_path in
8010 [\\/]* | ?:[\\/]*)
8011 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8012 ;;
8013 *)
8014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8015for as_dir in $PATH
8016do
8017 IFS=$as_save_IFS
8018 test -z "$as_dir" && as_dir=.
8019 for ac_exec_ext in '' $ac_executable_extensions; do
8020 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8021 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8023 break 2
8024 fi
8025done
8026 done
8027IFS=$as_save_IFS
8028
8029 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8030 ;;
8031esac
8032fi
8033python_prog_path=$ac_cv_path_python_prog_path
8034if test -n "$python_prog_path"; then
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8036$as_echo "$python_prog_path" >&6; }
8037else
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8039$as_echo "no" >&6; }
8040fi
8041
8042
8043 if test "${python_prog_path}" = missing; then
8044 python_prog=missing
8045 else
8046 python_prog=${python_prog_path}
8047 fi
8048 else
8049 # Not much we can do except assume the cross-compiler will find the
8050 # right files.
8051 python_prog=missing
8052 fi
8053 ;;
8054 *)
8055 # While we can't run python compiled for $host (unless host == build),
8056 # the user could write a script that provides the needed information,
8057 # so we support that.
8058 python_prog="${with_python}"
8059 # Extract the first word of "${python_prog}", so it can be a program name with args.
8060set dummy ${python_prog}; ac_word=$2
8061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8062$as_echo_n "checking for $ac_word... " >&6; }
8063if test "${ac_cv_path_python_prog_path+set}" = set; then :
8064 $as_echo_n "(cached) " >&6
8065else
8066 case $python_prog_path in
8067 [\\/]* | ?:[\\/]*)
8068 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8069 ;;
8070 *)
8071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8072for as_dir in $PATH
8073do
8074 IFS=$as_save_IFS
8075 test -z "$as_dir" && as_dir=.
8076 for ac_exec_ext in '' $ac_executable_extensions; do
8077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8078 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8080 break 2
8081 fi
8082done
8083 done
8084IFS=$as_save_IFS
8085
8086 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8087 ;;
8088esac
8089fi
8090python_prog_path=$ac_cv_path_python_prog_path
8091if test -n "$python_prog_path"; then
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8093$as_echo "$python_prog_path" >&6; }
8094else
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096$as_echo "no" >&6; }
8097fi
8098
8099
8100 if test "${python_prog_path}" = missing; then
8101 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8102 fi
8103 ;;
8104 esac
81ecdfbb
RW
8105 esac
8106
ec685c5e 8107 if test "${python_prog}" != missing; then
e7a30f46
DE
8108 # We have a python program to use, but it may be too old.
8109 # Don't flag an error for --with-python=auto (the default).
8110 have_python_config=yes
ec685c5e
DE
8111 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8112 if test $? != 0; then
e7a30f46
DE
8113 have_python_config=failed
8114 if test "${with_python}" != auto; then
8115 as_fn_error "failure running python-config --includes" "$LINENO" 5
8116 fi
ec685c5e
DE
8117 fi
8118 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8119 if test $? != 0; then
e7a30f46
DE
8120 have_python_config=failed
8121 if test "${with_python}" != auto; then
8122 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8123 fi
ec685c5e 8124 fi
0c4a4063
DE
8125 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8126 if test $? != 0; then
e7a30f46
DE
8127 have_python_config=failed
8128 if test "${with_python}" != auto; then
8129 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8130 fi
0c4a4063 8131 fi
ec685c5e 8132 else
ac534cba
JB
8133 # We do not have a python executable we can use to determine where
8134 # to find the Python headers and libs. We cannot guess the include
8135 # path from the python_prefix either, because that include path
8136 # depends on the Python version. So, there is nothing much we can
8137 # do except assume that the compiler will be able to find those files.
8138 python_includes=
8139 python_libs=
0c4a4063 8140 have_python_config=no
ec685c5e 8141 fi
bec39cab 8142
ec685c5e
DE
8143 # If we have python-config, only try the configuration it provides.
8144 # Otherwise fallback on the old way of trying different versions of
8145 # python in turn.
81ecdfbb 8146
ec685c5e
DE
8147 have_libpython=no
8148 if test "${have_python_config}" = yes; then
c1039e3c
JB
8149 # Determine the Python version by extracting "-lpython<version>"
8150 # part of the python_libs. <version> is usually X.Y with X and Y
8151 # being decimal numbers, but can also be XY (seen on Windows).
8152 #
8153 # The extraction is performed using sed with a regular expression.
8154 # Initially, the regexp used was using the '?' quantifier to make
8155 # the dot in the version number optional. Unfortunately, this
8156 # does not work with non-GNU versions of sed because, because of
8157 # what looks like a limitation (the '?' quantifier does not work
8158 # with back-references). We work around this limitation by using
8159 # the '*' quantifier instead. It means that, in theory, we might
8160 # match unexpected version strings such as "-lpython2..7", but
8161 # this seems unlikely in practice. And even if that happens,
8162 # an error will be triggered later on, when checking that version
8163 # number.
ec685c5e 8164 python_version=`echo " ${python_libs} " \
c1039e3c 8165 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8166 case "${python_version}" in
8167 python*)
ec685c5e
DE
8168
8169 version=${python_version}
8170
8171 new_CPPFLAGS=${python_includes}
8172 new_LIBS=${python_libs}
81ecdfbb
RW
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8174$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8175 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8176 save_LIBS=$LIBS
ec685c5e
DE
8177 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8178 LIBS="$LIBS $new_LIBS"
8179 found_usable_python=no
81ecdfbb 8180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8181/* end confdefs.h. */
ac534cba 8182#include "Python.h"
81ecdfbb
RW
8183int
8184main ()
8185{
8186Py_Initialize ();
8187 ;
8188 return 0;
8189}
bec39cab 8190_ACEOF
81ecdfbb 8191if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8192 have_libpython=${version}
8193 found_usable_python=yes
ac534cba
JB
8194 PYTHON_CPPFLAGS=$new_CPPFLAGS
8195 PYTHON_LIBS=$new_LIBS
9a156167 8196fi
81ecdfbb
RW
8197rm -f core conftest.err conftest.$ac_objext \
8198 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8199 CPPFLAGS=$save_CPPFLAGS
8200 LIBS=$save_LIBS
ec685c5e
DE
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8202$as_echo "${found_usable_python}" >&6; }
9a156167 8203
0c4a4063
DE
8204 ;;
8205 *)
ec685c5e 8206 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8207 ;;
8208 esac
e7a30f46 8209 elif test "${have_python_config}" != failed; then
ec685c5e 8210 if test "${have_libpython}" = no; then
9a156167 8211
420697bb
TT
8212 version=python2.7
8213
8214 new_CPPFLAGS=${python_includes}
8215 new_LIBS="${python_libs} -lpython2.7"
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8217$as_echo_n "checking for ${version}... " >&6; }
8218 save_CPPFLAGS=$CPPFLAGS
8219 save_LIBS=$LIBS
8220 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8221 LIBS="$LIBS $new_LIBS"
8222 found_usable_python=no
8223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8224/* end confdefs.h. */
ac534cba 8225#include "Python.h"
420697bb
TT
8226int
8227main ()
8228{
8229Py_Initialize ();
8230 ;
8231 return 0;
8232}
8233_ACEOF
8234if ac_fn_c_try_link "$LINENO"; then :
8235 have_libpython=${version}
8236 found_usable_python=yes
ac534cba
JB
8237 PYTHON_CPPFLAGS=$new_CPPFLAGS
8238 PYTHON_LIBS=$new_LIBS
420697bb
TT
8239fi
8240rm -f core conftest.err conftest.$ac_objext \
8241 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8242 CPPFLAGS=$save_CPPFLAGS
8243 LIBS=$save_LIBS
420697bb
TT
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8245$as_echo "${found_usable_python}" >&6; }
8246
8247 fi
8248 if test "${have_libpython}" = no; then
8249
ec685c5e
DE
8250 version=python2.6
8251
8252 new_CPPFLAGS=${python_includes}
8253 new_LIBS="${python_libs} -lpython2.6"
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8255$as_echo_n "checking for ${version}... " >&6; }
8256 save_CPPFLAGS=$CPPFLAGS
8257 save_LIBS=$LIBS
8258 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8259 LIBS="$LIBS $new_LIBS"
8260 found_usable_python=no
8261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8262/* end confdefs.h. */
ac534cba 8263#include "Python.h"
ec685c5e
DE
8264int
8265main ()
8266{
8267Py_Initialize ();
8268 ;
8269 return 0;
8270}
8271_ACEOF
8272if ac_fn_c_try_link "$LINENO"; then :
8273 have_libpython=${version}
8274 found_usable_python=yes
ac534cba
JB
8275 PYTHON_CPPFLAGS=$new_CPPFLAGS
8276 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8277fi
8278rm -f core conftest.err conftest.$ac_objext \
8279 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8280 CPPFLAGS=$save_CPPFLAGS
8281 LIBS=$save_LIBS
ec685c5e
DE
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8283$as_echo "${found_usable_python}" >&6; }
9a156167 8284
81ecdfbb 8285 fi
ec685c5e 8286 if test ${have_libpython} = no; then
9a156167 8287
81ecdfbb 8288 version=python2.5
9a156167 8289
ec685c5e
DE
8290 new_CPPFLAGS=${python_includes}
8291 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8293$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8294 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8295 save_LIBS=$LIBS
ec685c5e
DE
8296 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8297 LIBS="$LIBS $new_LIBS"
8298 found_usable_python=no
81ecdfbb 8299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8300/* end confdefs.h. */
ac534cba 8301#include "Python.h"
81ecdfbb
RW
8302int
8303main ()
8304{
8305Py_Initialize ();
8306 ;
8307 return 0;
8308}
436868fb 8309_ACEOF
81ecdfbb 8310if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8311 have_libpython=${version}
8312 found_usable_python=yes
ac534cba
JB
8313 PYTHON_CPPFLAGS=$new_CPPFLAGS
8314 PYTHON_LIBS=$new_LIBS
436868fb 8315fi
81ecdfbb
RW
8316rm -f core conftest.err conftest.$ac_objext \
8317 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8318 CPPFLAGS=$save_CPPFLAGS
8319 LIBS=$save_LIBS
ec685c5e
DE
8320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8321$as_echo "${found_usable_python}" >&6; }
a9322a30 8322
81ecdfbb 8323 fi
ec685c5e 8324 if test ${have_libpython} = no; then
a9322a30 8325
81ecdfbb 8326 version=python2.4
a9322a30 8327
ec685c5e
DE
8328 new_CPPFLAGS=${python_includes}
8329 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8331$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8332 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8333 save_LIBS=$LIBS
ec685c5e
DE
8334 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8335 LIBS="$LIBS $new_LIBS"
8336 found_usable_python=no
81ecdfbb 8337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8338/* end confdefs.h. */
ac534cba 8339#include "Python.h"
a9322a30
TT
8340int
8341main ()
8342{
81ecdfbb 8343Py_Initialize ();
a9322a30
TT
8344 ;
8345 return 0;
8346}
436868fb 8347_ACEOF
81ecdfbb 8348if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8349 have_libpython=${version}
8350 found_usable_python=yes
ac534cba
JB
8351 PYTHON_CPPFLAGS=$new_CPPFLAGS
8352 PYTHON_LIBS=$new_LIBS
436868fb 8353fi
81ecdfbb
RW
8354rm -f core conftest.err conftest.$ac_objext \
8355 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8356 CPPFLAGS=$save_CPPFLAGS
8357 LIBS=$save_LIBS
ec685c5e
DE
8358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8359$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8360
ec685c5e
DE
8361 fi
8362 fi
9c4ea6c5 8363 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8364
8365$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8366
9c4ea6c5 8367 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8368
8369$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8370
9c4ea6c5 8371 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8372
8373$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8374
9c4ea6c5 8375 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8376
8377$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8378
81ecdfbb 8379 fi
ec685c5e
DE
8380
8381 if test "${have_libpython}" = no; then
81ecdfbb
RW
8382 case "${with_python}" in
8383 yes)
8384 as_fn_error "python is missing or unusable" "$LINENO" 5
8385 ;;
8386 auto)
8387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8388$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8389 ;;
8390 *)
8391 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8392 ;;
8393 esac
0c4a4063
DE
8394 else
8395 if test -n "${python_prefix}"; then
8396
8397cat >>confdefs.h <<_ACEOF
8398#define WITH_PYTHON_PATH "${python_prefix}"
8399_ACEOF
8400
8401
8402 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8403 if test "x$prefix" = xNONE; then
8404 test_prefix=/usr/local
8405 else
8406 test_prefix=$prefix
8407 fi
8408 else
8409 test_prefix=$exec_prefix
8410 fi
8411 value=0
8412 case ${python_prefix} in
8413 "${test_prefix}"|"${test_prefix}/"*|\
8414 '${exec_prefix}'|'${exec_prefix}/'*)
8415 value=1
8416 ;;
8417 esac
8418
8419cat >>confdefs.h <<_ACEOF
8420#define PYTHON_PATH_RELOCATABLE $value
8421_ACEOF
8422
8423
8424 fi
81ecdfbb 8425 fi
436868fb 8426fi
436868fb 8427
ec685c5e 8428if test "${have_libpython}" != no; then
436868fb 8429
81ecdfbb 8430$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8431
81ecdfbb
RW
8432 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8433 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8434 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8435 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8436 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8437
81ecdfbb
RW
8438 # Flags needed to compile Python code (taken from python-config --cflags).
8439 # We cannot call python-config directly because it will output whatever was
8440 # used when compiling the Python interpreter itself, including flags which
8441 # would make the python-related objects be compiled differently from the
8442 # rest of GDB (e.g., -O2 and -fPIC).
8443 if test "${GCC}" = yes; then
8444 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8445 fi
436868fb 8446
81ecdfbb
RW
8447 if test "x${tentative_python_cflags}" != x; then
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8449$as_echo_n "checking compiler flags for python code... " >&6; }
8450 for flag in ${tentative_python_cflags}; do
8451 # Check that the compiler accepts it
8452 saved_CFLAGS="$CFLAGS"
8453 CFLAGS="$CFLAGS $flag"
8454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8455/* end confdefs.h. */
81ecdfbb 8456
a9322a30
TT
8457int
8458main ()
8459{
a9322a30
TT
8460
8461 ;
8462 return 0;
8463}
bec39cab 8464_ACEOF
81ecdfbb
RW
8465if ac_fn_c_try_compile "$LINENO"; then :
8466 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8467fi
81ecdfbb
RW
8468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8469 CFLAGS="$saved_CFLAGS"
8470 done
8471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8472$as_echo "${PYTHON_CFLAGS}" >&6; }
8473 fi
043b6510
JB
8474
8475 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8476 # #if _SGIAPI
8477 # #define siginfo __siginfo
8478 # #endif
8479 # The problem is that including Python causes some XOPEN macros to be
8480 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8481 # to false. So, we work around this issue by defining siginfo ourself
8482 # though the command-line.
c83393b9
JB
8483 #
8484 # On x64 Windows, Python's include headers, and pyconfig.h in
8485 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8486 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8487 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8488 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8489 # The issue was reported to the Python community, but still isn't
8490 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8491
043b6510
JB
8492 case "$gdb_host" in
8493 irix*) if test "${GCC}" = yes; then
8494 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8495 fi
8496 ;;
c83393b9
JB
8497 mingw64)
8498 if test "${GCC}" = yes; then
8499 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8500 fi
8501 ;;
043b6510 8502 esac
a8db4212
YPK
8503
8504 # Note that "python -m threading" cannot be used to check for
8505 # threading support due to a bug in Python 2.7.3
8506 # (http://bugs.python.org/issue15567).
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8508$as_echo_n "checking whether python supports threads... " >&6; }
8509 saved_CPPFLAGS="${CPPFLAGS}"
8510 CPPFLAGS="${PYTHON_CPPFLAGS}"
8511 # Note that the test is reversed so that python_has_threads=yes on
8512 # unexpected failures.
8513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8514/* end confdefs.h. */
8515
8516#include <Python.h>
8517#ifdef WITH_THREAD
8518# error
8519#endif
8520
8521_ACEOF
8522if ac_fn_c_try_cpp "$LINENO"; then :
8523 python_has_threads=no
8524else
8525 python_has_threads=yes
8526fi
8527rm -f conftest.err conftest.$ac_ext
8528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8529$as_echo "${python_has_threads}" >&6; }
8530 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8531else
8532 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8533 # included.
8534 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8535 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8536 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8537fi
9a156167 8538
9a156167 8539
ac534cba
JB
8540
8541
a8db4212
YPK
8542# Provide a --enable-libmcheck/--disable-libmcheck set of options
8543# allowing a user to enable this option even when building releases,
8544# or to disable it when building a snapshot.
8545# Check whether --enable-libmcheck was given.
8546if test "${enable_libmcheck+set}" = set; then :
8547 enableval=$enable_libmcheck; case "${enableval}" in
8548 yes | y) ENABLE_LIBMCHECK="yes" ;;
8549 no | n) ENABLE_LIBMCHECK="no" ;;
8550 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8551 esac
8552fi
8553
8554
8555# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8556# but turn it off if Python is enabled with threads, since -lmcheck is
8557# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8558# and for releases.
8559if test -z "${ENABLE_LIBMCHECK}" \
8560 -a \( "${have_libpython}" = "no" \
8561 -o "${python_has_threads}" = "no" \) \
8562 && $development; then
8563 ENABLE_LIBMCHECK=yes
8564fi
8565
8566if test "$ENABLE_LIBMCHECK" = "yes" ; then
8567 if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8569$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
8570 fi
8571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
8572$as_echo_n "checking for main in -lmcheck... " >&6; }
8573if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8574 $as_echo_n "(cached) " >&6
8575else
8576 ac_check_lib_save_LIBS=$LIBS
8577LIBS="-lmcheck $LIBS"
8578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8579/* end confdefs.h. */
8580
8581
8582int
8583main ()
8584{
8585return main ();
8586 ;
8587 return 0;
8588}
8589_ACEOF
8590if ac_fn_c_try_link "$LINENO"; then :
8591 ac_cv_lib_mcheck_main=yes
8592else
8593 ac_cv_lib_mcheck_main=no
8594fi
8595rm -f core conftest.err conftest.$ac_objext \
8596 conftest$ac_exeext conftest.$ac_ext
8597LIBS=$ac_check_lib_save_LIBS
8598fi
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8600$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8601if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8602 cat >>confdefs.h <<_ACEOF
8603#define HAVE_LIBMCHECK 1
8604_ACEOF
8605
8606 LIBS="-lmcheck $LIBS"
8607
8608fi
8609
8610fi
8611
81ecdfbb
RW
8612# ------------------------- #
8613# Checks for header files. #
8614# ------------------------- #
c890192f 8615
81ecdfbb
RW
8616ac_header_dirent=no
8617for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8618 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8620$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8621if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8622 $as_echo_n "(cached) " >&6
bec39cab 8623else
81ecdfbb 8624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8625/* end confdefs.h. */
81ecdfbb
RW
8626#include <sys/types.h>
8627#include <$ac_hdr>
8628
a9322a30
TT
8629int
8630main ()
8631{
81ecdfbb
RW
8632if ((DIR *) 0)
8633return 0;
a9322a30
TT
8634 ;
8635 return 0;
8636}
bec39cab 8637_ACEOF
81ecdfbb
RW
8638if ac_fn_c_try_compile "$LINENO"; then :
8639 eval "$as_ac_Header=yes"
bec39cab 8640else
81ecdfbb 8641 eval "$as_ac_Header=no"
bec39cab 8642fi
81ecdfbb 8643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8644fi
81ecdfbb
RW
8645eval ac_res=\$$as_ac_Header
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8647$as_echo "$ac_res" >&6; }
8648eval as_val=\$$as_ac_Header
8649 if test "x$as_val" = x""yes; then :
8650 cat >>confdefs.h <<_ACEOF
8651#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8652_ACEOF
bec39cab 8653
81ecdfbb
RW
8654ac_header_dirent=$ac_hdr; break
8655fi
bec39cab 8656
81ecdfbb
RW
8657done
8658# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8659if test $ac_header_dirent = dirent.h; then
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8661$as_echo_n "checking for library containing opendir... " >&6; }
8662if test "${ac_cv_search_opendir+set}" = set; then :
8663 $as_echo_n "(cached) " >&6
c890192f 8664else
81ecdfbb
RW
8665 ac_func_search_save_LIBS=$LIBS
8666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8667/* end confdefs.h. */
8668
8669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
8672#ifdef __cplusplus
8673extern "C"
8674#endif
8675char opendir ();
8676int
8677main ()
8678{
8679return opendir ();
8680 ;
8681 return 0;
8682}
bec39cab 8683_ACEOF
81ecdfbb
RW
8684for ac_lib in '' dir; do
8685 if test -z "$ac_lib"; then
8686 ac_res="none required"
8687 else
8688 ac_res=-l$ac_lib
8689 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8690 fi
8691 if ac_fn_c_try_link "$LINENO"; then :
8692 ac_cv_search_opendir=$ac_res
8693fi
8694rm -f core conftest.err conftest.$ac_objext \
8695 conftest$ac_exeext
8696 if test "${ac_cv_search_opendir+set}" = set; then :
8697 break
8698fi
8699done
8700if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8701
81ecdfbb
RW
8702else
8703 ac_cv_search_opendir=no
8704fi
8705rm conftest.$ac_ext
8706LIBS=$ac_func_search_save_LIBS
8707fi
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8709$as_echo "$ac_cv_search_opendir" >&6; }
8710ac_res=$ac_cv_search_opendir
8711if test "$ac_res" != no; then :
8712 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8713
bec39cab 8714fi
81ecdfbb 8715
bec39cab 8716else
81ecdfbb
RW
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8718$as_echo_n "checking for library containing opendir... " >&6; }
8719if test "${ac_cv_search_opendir+set}" = set; then :
8720 $as_echo_n "(cached) " >&6
8721else
8722 ac_func_search_save_LIBS=$LIBS
8723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8724/* end confdefs.h. */
81ecdfbb
RW
8725
8726/* Override any GCC internal prototype to avoid an error.
8727 Use char because int might match the return type of a GCC
8728 builtin and then its argument prototype would still apply. */
8729#ifdef __cplusplus
8730extern "C"
8731#endif
8732char opendir ();
a9322a30
TT
8733int
8734main ()
8735{
81ecdfbb 8736return opendir ();
a9322a30
TT
8737 ;
8738 return 0;
8739}
bec39cab 8740_ACEOF
81ecdfbb
RW
8741for ac_lib in '' x; do
8742 if test -z "$ac_lib"; then
8743 ac_res="none required"
8744 else
8745 ac_res=-l$ac_lib
8746 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8747 fi
8748 if ac_fn_c_try_link "$LINENO"; then :
8749 ac_cv_search_opendir=$ac_res
8750fi
8751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext
8753 if test "${ac_cv_search_opendir+set}" = set; then :
8754 break
8755fi
8756done
8757if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8758
81ecdfbb
RW
8759else
8760 ac_cv_search_opendir=no
bec39cab 8761fi
81ecdfbb
RW
8762rm conftest.$ac_ext
8763LIBS=$ac_func_search_save_LIBS
a9322a30 8764fi
81ecdfbb
RW
8765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8766$as_echo "$ac_cv_search_opendir" >&6; }
8767ac_res=$ac_cv_search_opendir
8768if test "$ac_res" != no; then :
8769 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8770
81ecdfbb 8771fi
bec39cab 8772
81ecdfbb 8773fi
bec39cab 8774
81ecdfbb
RW
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8776$as_echo_n "checking for ANSI C header files... " >&6; }
8777if test "${ac_cv_header_stdc+set}" = set; then :
8778 $as_echo_n "(cached) " >&6
bec39cab 8779else
81ecdfbb 8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8781/* end confdefs.h. */
81ecdfbb
RW
8782#include <stdlib.h>
8783#include <stdarg.h>
8784#include <string.h>
8785#include <float.h>
8786
a9322a30
TT
8787int
8788main ()
8789{
a9322a30
TT
8790
8791 ;
8792 return 0;
8793}
bec39cab 8794_ACEOF
81ecdfbb
RW
8795if ac_fn_c_try_compile "$LINENO"; then :
8796 ac_cv_header_stdc=yes
bec39cab 8797else
81ecdfbb 8798 ac_cv_header_stdc=no
a9322a30 8799fi
81ecdfbb 8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8801
81ecdfbb
RW
8802if test $ac_cv_header_stdc = yes; then
8803 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805/* end confdefs.h. */
8806#include <string.h>
bec39cab 8807
81ecdfbb
RW
8808_ACEOF
8809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8810 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8811
bec39cab 8812else
81ecdfbb
RW
8813 ac_cv_header_stdc=no
8814fi
8815rm -f conftest*
8816
8817fi
8818
8819if test $ac_cv_header_stdc = yes; then
8820 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8822/* end confdefs.h. */
8823#include <stdlib.h>
8824
bec39cab 8825_ACEOF
81ecdfbb
RW
8826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8827 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8828
81ecdfbb
RW
8829else
8830 ac_cv_header_stdc=no
8831fi
8832rm -f conftest*
bec39cab 8833
bec39cab 8834fi
81ecdfbb
RW
8835
8836if test $ac_cv_header_stdc = yes; then
8837 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8838 if test "$cross_compiling" = yes; then :
8839 :
bec39cab 8840else
81ecdfbb 8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8842/* end confdefs.h. */
81ecdfbb
RW
8843#include <ctype.h>
8844#include <stdlib.h>
8845#if ((' ' & 0x0FF) == 0x020)
8846# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8847# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8848#else
8849# define ISLOWER(c) \
8850 (('a' <= (c) && (c) <= 'i') \
8851 || ('j' <= (c) && (c) <= 'r') \
8852 || ('s' <= (c) && (c) <= 'z'))
8853# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8854#endif
8855
8856#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8857int
8858main ()
8859{
81ecdfbb
RW
8860 int i;
8861 for (i = 0; i < 256; i++)
8862 if (XOR (islower (i), ISLOWER (i))
8863 || toupper (i) != TOUPPER (i))
8864 return 2;
a9322a30
TT
8865 return 0;
8866}
bec39cab 8867_ACEOF
81ecdfbb
RW
8868if ac_fn_c_try_run "$LINENO"; then :
8869
bec39cab 8870else
81ecdfbb
RW
8871 ac_cv_header_stdc=no
8872fi
8873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8874 conftest.$ac_objext conftest.beam conftest.$ac_ext
8875fi
bec39cab 8876
bec39cab 8877fi
a9322a30 8878fi
81ecdfbb
RW
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8880$as_echo "$ac_cv_header_stdc" >&6; }
8881if test $ac_cv_header_stdc = yes; then
bec39cab 8882
81ecdfbb 8883$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8884
81ecdfbb 8885fi
bec39cab 8886
81ecdfbb 8887# elf_hp.h is for HP/UX 64-bit shared library support.
81ecdfbb 8888for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8775fd2d 8889 thread_db.h signal.h stddef.h \
81ecdfbb
RW
8890 stdlib.h string.h memory.h strings.h sys/fault.h \
8891 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8892 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8893 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8894 sys/types.h sys/wait.h wait.h termios.h termio.h \
e68227b9 8895 sgtty.h unistd.h elf_hp.h locale.h \
945bf713 8896 dlfcn.h sys/socket.h sys/un.h linux/perf_event.h
81ecdfbb
RW
8897do :
8898 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8899ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8900eval as_val=\$$as_ac_Header
8901 if test "x$as_val" = x""yes; then :
bec39cab 8902 cat >>confdefs.h <<_ACEOF
81ecdfbb 8903#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8904_ACEOF
c906108c 8905
bec39cab 8906fi
81ecdfbb
RW
8907
8908done
8909
8910for ac_header in link.h
8911do :
8912 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8913# include <sys/types.h>
8914#endif
8915#if HAVE_NLIST_H
8916# include <nlist.h>
a9322a30
TT
8917#endif
8918
81ecdfbb
RW
8919"
8920if test "x$ac_cv_header_link_h" = x""yes; then :
8921 cat >>confdefs.h <<_ACEOF
8922#define HAVE_LINK_H 1
bec39cab 8923_ACEOF
bec39cab 8924
a9322a30 8925fi
bec39cab 8926
81ecdfbb 8927done
c906108c 8928
81ecdfbb
RW
8929for ac_header in sys/proc.h
8930do :
8931 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8932# include <sys/param.h>
8933#endif
c906108c 8934
81ecdfbb
RW
8935"
8936if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8937 cat >>confdefs.h <<_ACEOF
81ecdfbb 8938#define HAVE_SYS_PROC_H 1
bec39cab 8939_ACEOF
5ee754fc 8940
bec39cab 8941fi
81ecdfbb
RW
8942
8943done
8944
8945for ac_header in sys/user.h
8946do :
8947 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8948# include <sys/param.h>
a9322a30
TT
8949#endif
8950
81ecdfbb
RW
8951"
8952if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8953 cat >>confdefs.h <<_ACEOF
8954#define HAVE_SYS_USER_H 1
bec39cab 8955_ACEOF
bec39cab 8956
a9322a30 8957fi
bec39cab 8958
81ecdfbb 8959done
5ee754fc 8960
5ee754fc 8961
81ecdfbb
RW
8962# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8963# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8964# think that we don't have <curses.h> if we're using GCC.
8965case $host_os in
8966 solaris2.[789])
8967 if test "$GCC" = yes; then
8968
8969$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8970
8971 fi ;;
8972esac
8973for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8974do :
8975 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8976ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8977eval as_val=\$$as_ac_Header
8978 if test "x$as_val" = x""yes; then :
bec39cab 8979 cat >>confdefs.h <<_ACEOF
81ecdfbb 8980#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8981_ACEOF
5ee754fc
MK
8982
8983fi
8984
81ecdfbb 8985done
bec39cab 8986
81ecdfbb
RW
8987for ac_header in term.h
8988do :
8989 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8990# include <curses.h>
8991#endif
bec39cab 8992
81ecdfbb
RW
8993"
8994if test "x$ac_cv_header_term_h" = x""yes; then :
8995 cat >>confdefs.h <<_ACEOF
8996#define HAVE_TERM_H 1
a8111142 8997_ACEOF
a8111142 8998
a8111142 8999fi
a8111142 9000
81ecdfbb 9001done
a8111142
TT
9002
9003
81ecdfbb
RW
9004# ------------------------- #
9005# Checks for declarations. #
9006# ------------------------- #
a9322a30 9007
81ecdfbb
RW
9008ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9009if test "x$ac_cv_have_decl_free" = x""yes; then :
9010 ac_have_decl=1
bec39cab 9011else
81ecdfbb
RW
9012 ac_have_decl=0
9013fi
9014
9015cat >>confdefs.h <<_ACEOF
9016#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9017_ACEOF
81ecdfbb
RW
9018ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9019if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9020 ac_have_decl=1
9021else
9022 ac_have_decl=0
9023fi
9024
9025cat >>confdefs.h <<_ACEOF
9026#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9027_ACEOF
81ecdfbb
RW
9028ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9029if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9030 ac_have_decl=1
bec39cab 9031else
81ecdfbb
RW
9032 ac_have_decl=0
9033fi
bec39cab 9034
81ecdfbb
RW
9035cat >>confdefs.h <<_ACEOF
9036#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9037_ACEOF
81ecdfbb
RW
9038ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
9039if test "x$ac_cv_have_decl_strerror" = x""yes; then :
9040 ac_have_decl=1
9041else
9042 ac_have_decl=0
9043fi
9044
9045cat >>confdefs.h <<_ACEOF
9046#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 9047_ACEOF
81ecdfbb
RW
9048ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
9049if test "x$ac_cv_have_decl_strstr" = x""yes; then :
9050 ac_have_decl=1
bec39cab 9051else
81ecdfbb
RW
9052 ac_have_decl=0
9053fi
5ee754fc 9054
81ecdfbb
RW
9055cat >>confdefs.h <<_ACEOF
9056#define HAVE_DECL_STRSTR $ac_have_decl
9057_ACEOF
9058ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
9059if test "x$ac_cv_have_decl_getopt" = x""yes; then :
9060 ac_have_decl=1
9061else
9062 ac_have_decl=0
5ee754fc 9063fi
81ecdfbb
RW
9064
9065cat >>confdefs.h <<_ACEOF
9066#define HAVE_DECL_GETOPT $ac_have_decl
9067_ACEOF
9068ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9069if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9070 ac_have_decl=1
9071else
9072 ac_have_decl=0
5ee754fc 9073fi
81ecdfbb
RW
9074
9075cat >>confdefs.h <<_ACEOF
9076#define HAVE_DECL_SNPRINTF $ac_have_decl
9077_ACEOF
9078ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9079if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9080 ac_have_decl=1
9081else
9082 ac_have_decl=0
5ee754fc
MK
9083fi
9084
a9322a30 9085cat >>confdefs.h <<_ACEOF
81ecdfbb 9086#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 9087_ACEOF
5ee754fc 9088
5ee754fc 9089
81ecdfbb
RW
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9091$as_echo_n "checking for LC_MESSAGES... " >&6; }
9092if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9093 $as_echo_n "(cached) " >&6
bec39cab 9094else
81ecdfbb 9095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9096/* end confdefs.h. */
81ecdfbb 9097#include <locale.h>
a9322a30
TT
9098int
9099main ()
9100{
81ecdfbb 9101return LC_MESSAGES
a9322a30
TT
9102 ;
9103 return 0;
9104}
bec39cab 9105_ACEOF
81ecdfbb
RW
9106if ac_fn_c_try_link "$LINENO"; then :
9107 am_cv_val_LC_MESSAGES=yes
bec39cab 9108else
81ecdfbb
RW
9109 am_cv_val_LC_MESSAGES=no
9110fi
9111rm -f core conftest.err conftest.$ac_objext \
9112 conftest$ac_exeext conftest.$ac_ext
9113fi
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9115$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9116 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9117
81ecdfbb
RW
9118$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9119
9120 fi
9121
9122
9123# ----------------------- #
9124# Checks for structures. #
9125# ----------------------- #
9126
9127ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9128if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9129
9130cat >>confdefs.h <<_ACEOF
9131#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9132_ACEOF
7eb368b3 9133
81ecdfbb 9134
7eb368b3 9135fi
81ecdfbb
RW
9136ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9137if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9138
a9322a30
TT
9139cat >>confdefs.h <<_ACEOF
9140#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9141_ACEOF
9142
a9322a30 9143
7eb368b3
NR
9144fi
9145
7eb368b3 9146
a9322a30
TT
9147# ------------------ #
9148# Checks for types. #
9149# ------------------ #
7eb368b3 9150
81ecdfbb
RW
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9152$as_echo_n "checking return type of signal handlers... " >&6; }
9153if test "${ac_cv_type_signal+set}" = set; then :
9154 $as_echo_n "(cached) " >&6
bec39cab 9155else
81ecdfbb 9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9157/* end confdefs.h. */
a9322a30
TT
9158#include <sys/types.h>
9159#include <signal.h>
7cb9022a 9160
a9322a30
TT
9161int
9162main ()
9163{
81ecdfbb 9164return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9165 ;
9166 return 0;
9167}
bec39cab 9168_ACEOF
81ecdfbb
RW
9169if ac_fn_c_try_compile "$LINENO"; then :
9170 ac_cv_type_signal=int
bec39cab 9171else
81ecdfbb 9172 ac_cv_type_signal=void
bec39cab 9173fi
81ecdfbb 9174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9175fi
81ecdfbb
RW
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9177$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9178
a9322a30
TT
9179cat >>confdefs.h <<_ACEOF
9180#define RETSIGTYPE $ac_cv_type_signal
9181_ACEOF
5ee754fc 9182
bec39cab 9183
81ecdfbb 9184ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9185#include <sys/socket.h>
9186
81ecdfbb
RW
9187"
9188if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9189
a9322a30
TT
9190cat >>confdefs.h <<_ACEOF
9191#define HAVE_SOCKLEN_T 1
9192_ACEOF
9193
9194
9195fi
9196
9197
9198# ------------------------------------- #
9199# Checks for compiler characteristics. #
9200# ------------------------------------- #
9201
81ecdfbb
RW
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9203$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9204if test "${ac_cv_c_const+set}" = set; then :
9205 $as_echo_n "(cached) " >&6
a9322a30 9206else
81ecdfbb 9207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9208/* end confdefs.h. */
a9322a30
TT
9209
9210int
9211main ()
9212{
9213/* FIXME: Include the comments suggested by Paul. */
9214#ifndef __cplusplus
9215 /* Ultrix mips cc rejects this. */
9216 typedef int charset[2];
81ecdfbb 9217 const charset cs;
a9322a30 9218 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9219 char const *const *pcpcc;
9220 char **ppc;
a9322a30
TT
9221 /* NEC SVR4.0.2 mips cc rejects this. */
9222 struct point {int x, y;};
9223 static struct point const zero = {0,0};
9224 /* AIX XL C 1.02.0.0 rejects this.
9225 It does not let you subtract one const X* pointer from another in
9226 an arm of an if-expression whose if-part is not a constant
9227 expression */
9228 const char *g = "string";
81ecdfbb 9229 pcpcc = &g + (g ? g-g : 0);
a9322a30 9230 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9231 ++pcpcc;
9232 ppc = (char**) pcpcc;
9233 pcpcc = (char const *const *) ppc;
a9322a30
TT
9234 { /* SCO 3.2v4 cc rejects this. */
9235 char *t;
9236 char const *s = 0 ? (char *) 0 : (char const *) 0;
9237
9238 *t++ = 0;
81ecdfbb 9239 if (s) return 0;
a9322a30
TT
9240 }
9241 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9242 int x[] = {25, 17};
9243 const int *foo = &x[0];
9244 ++foo;
9245 }
9246 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9247 typedef const int *iptr;
9248 iptr p = 0;
9249 ++p;
9250 }
9251 { /* AIX XL C 1.02.0.0 rejects this saying
9252 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9253 struct s { int j; const int *ap[3]; };
9254 struct s *b; b->j = 5;
9255 }
9256 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9257 const int foo = 10;
81ecdfbb 9258 if (!foo) return 0;
a9322a30 9259 }
81ecdfbb 9260 return !cs[0] && !zero.x;
a9322a30
TT
9261#endif
9262
9263 ;
9264 return 0;
9265}
bec39cab 9266_ACEOF
81ecdfbb 9267if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9268 ac_cv_c_const=yes
5ee754fc 9269else
81ecdfbb 9270 ac_cv_c_const=no
5ee754fc 9271fi
81ecdfbb 9272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9273fi
81ecdfbb
RW
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9275$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9276if test $ac_cv_c_const = no; then
bec39cab 9277
81ecdfbb 9278$as_echo "#define const /**/" >>confdefs.h
bec39cab 9279
5ee754fc 9280fi
bec39cab 9281
81ecdfbb
RW
9282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9283$as_echo_n "checking for inline... " >&6; }
9284if test "${ac_cv_c_inline+set}" = set; then :
9285 $as_echo_n "(cached) " >&6
bec39cab 9286else
a9322a30
TT
9287 ac_cv_c_inline=no
9288for ac_kw in inline __inline__ __inline; do
81ecdfbb 9289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9290/* end confdefs.h. */
a9322a30
TT
9291#ifndef __cplusplus
9292typedef int foo_t;
9293static $ac_kw foo_t static_foo () {return 0; }
9294$ac_kw foo_t foo () {return 0; }
9295#endif
9296
bec39cab 9297_ACEOF
81ecdfbb
RW
9298if ac_fn_c_try_compile "$LINENO"; then :
9299 ac_cv_c_inline=$ac_kw
bec39cab 9300fi
81ecdfbb
RW
9301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9302 test "$ac_cv_c_inline" != no && break
a9322a30 9303done
bec39cab 9304
5ee754fc 9305fi
81ecdfbb
RW
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9307$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9308
a9322a30
TT
9309case $ac_cv_c_inline in
9310 inline | yes) ;;
9311 *)
9312 case $ac_cv_c_inline in
9313 no) ac_val=;;
9314 *) ac_val=$ac_cv_c_inline;;
9315 esac
9316 cat >>confdefs.h <<_ACEOF
9317#ifndef __cplusplus
9318#define inline $ac_val
9319#endif
9320_ACEOF
bec39cab
AC
9321 ;;
9322esac
bec39cab 9323
81ecdfbb
RW
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9325$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9326if test "${ac_cv_c_bigendian+set}" = set; then :
9327 $as_echo_n "(cached) " >&6
bec39cab 9328else
81ecdfbb
RW
9329 ac_cv_c_bigendian=unknown
9330 # See if we're dealing with a universal compiler.
9331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9332/* end confdefs.h. */
9333#ifndef __APPLE_CC__
9334 not a universal capable compiler
9335 #endif
9336 typedef int dummy;
9337
9338_ACEOF
9339if ac_fn_c_try_compile "$LINENO"; then :
9340
9341 # Check for potential -arch flags. It is not universal unless
9342 # there are at least two -arch flags with different values.
9343 ac_arch=
9344 ac_prev=
9345 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9346 if test -n "$ac_prev"; then
9347 case $ac_word in
9348 i?86 | x86_64 | ppc | ppc64)
9349 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9350 ac_arch=$ac_word
9351 else
9352 ac_cv_c_bigendian=universal
9353 break
9354 fi
9355 ;;
9356 esac
9357 ac_prev=
9358 elif test "x$ac_word" = "x-arch"; then
9359 ac_prev=arch
9360 fi
9361 done
9362fi
9363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9364 if test $ac_cv_c_bigendian = unknown; then
9365 # See if sys/param.h defines the BYTE_ORDER macro.
9366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9367/* end confdefs.h. */
a9322a30 9368#include <sys/types.h>
81ecdfbb 9369 #include <sys/param.h>
a9322a30
TT
9370
9371int
9372main ()
9373{
81ecdfbb
RW
9374#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9375 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9376 && LITTLE_ENDIAN)
9377 bogus endian macros
9378 #endif
a9322a30
TT
9379
9380 ;
9381 return 0;
9382}
bec39cab 9383_ACEOF
81ecdfbb 9384if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9385 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9387/* end confdefs.h. */
a9322a30 9388#include <sys/types.h>
81ecdfbb 9389 #include <sys/param.h>
a9322a30
TT
9390
9391int
9392main ()
9393{
9394#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9395 not big endian
9396 #endif
a9322a30
TT
9397
9398 ;
9399 return 0;
9400}
bec39cab 9401_ACEOF
81ecdfbb 9402if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9403 ac_cv_c_bigendian=yes
5ee754fc 9404else
81ecdfbb 9405 ac_cv_c_bigendian=no
5ee754fc 9406fi
81ecdfbb
RW
9407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9408fi
9409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9410 fi
9411 if test $ac_cv_c_bigendian = unknown; then
9412 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9414/* end confdefs.h. */
9415#include <limits.h>
bec39cab 9416
81ecdfbb
RW
9417int
9418main ()
9419{
9420#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9421 bogus endian macros
9422 #endif
9423
9424 ;
9425 return 0;
9426}
7eb368b3 9427_ACEOF
81ecdfbb
RW
9428if ac_fn_c_try_compile "$LINENO"; then :
9429 # It does; now see whether it defined to _BIG_ENDIAN or not.
9430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9431/* end confdefs.h. */
81ecdfbb
RW
9432#include <limits.h>
9433
7eb368b3
NR
9434int
9435main ()
9436{
81ecdfbb
RW
9437#ifndef _BIG_ENDIAN
9438 not big endian
9439 #endif
9440
7eb368b3
NR
9441 ;
9442 return 0;
9443}
9444_ACEOF
81ecdfbb 9445if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9446 ac_cv_c_bigendian=yes
81ecdfbb
RW
9447else
9448 ac_cv_c_bigendian=no
a9322a30 9449fi
81ecdfbb 9450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9451fi
81ecdfbb
RW
9452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9453 fi
9454 if test $ac_cv_c_bigendian = unknown; then
9455 # Compile a test program.
9456 if test "$cross_compiling" = yes; then :
9457 # Try to guess by grepping values from an object file.
9458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9459/* end confdefs.h. */
9460short int ascii_mm[] =
9461 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9462 short int ascii_ii[] =
9463 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9464 int use_ascii (int i) {
9465 return ascii_mm[i] + ascii_ii[i];
9466 }
9467 short int ebcdic_ii[] =
9468 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9469 short int ebcdic_mm[] =
9470 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9471 int use_ebcdic (int i) {
9472 return ebcdic_mm[i] + ebcdic_ii[i];
9473 }
9474 extern int foo;
7eb368b3 9475
81ecdfbb
RW
9476int
9477main ()
9478{
9479return use_ascii (foo) == use_ebcdic (foo);
9480 ;
9481 return 0;
9482}
9483_ACEOF
9484if ac_fn_c_try_compile "$LINENO"; then :
9485 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9486 ac_cv_c_bigendian=yes
9487 fi
9488 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9489 if test "$ac_cv_c_bigendian" = unknown; then
9490 ac_cv_c_bigendian=no
9491 else
9492 # finding both strings is unlikely to happen, but who knows?
9493 ac_cv_c_bigendian=unknown
9494 fi
9495 fi
7eb368b3 9496fi
81ecdfbb 9497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9498else
81ecdfbb 9499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9500/* end confdefs.h. */
81ecdfbb 9501$ac_includes_default
d3ea6809
MM
9502int
9503main ()
9504{
81ecdfbb
RW
9505
9506 /* Are we little or big endian? From Harbison&Steele. */
9507 union
9508 {
9509 long int l;
9510 char c[sizeof (long int)];
9511 } u;
9512 u.l = 1;
9513 return u.c[sizeof (long int) - 1] == 1;
9514
9515 ;
9516 return 0;
d3ea6809
MM
9517}
9518_ACEOF
81ecdfbb 9519if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9520 ac_cv_c_bigendian=no
d3ea6809 9521else
81ecdfbb 9522 ac_cv_c_bigendian=yes
d3ea6809 9523fi
81ecdfbb
RW
9524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9525 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9526fi
a9322a30 9527
81ecdfbb
RW
9528 fi
9529fi
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9531$as_echo "$ac_cv_c_bigendian" >&6; }
9532 case $ac_cv_c_bigendian in #(
9533 yes)
9534 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9535;; #(
9536 no)
9537 ;; #(
9538 universal)
9539
9540$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9541
9542 ;; #(
9543 *)
9544 as_fn_error "unknown endianness
9545 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9546 esac
d3ea6809
MM
9547
9548
a9322a30
TT
9549# ------------------------------ #
9550# Checks for library functions. #
9551# ------------------------------ #
d3ea6809 9552
a9322a30
TT
9553# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9554# for constant arguments. Useless!
81ecdfbb
RW
9555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9556$as_echo_n "checking for working alloca.h... " >&6; }
9557if test "${ac_cv_working_alloca_h+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
d3ea6809 9559else
81ecdfbb 9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9561/* end confdefs.h. */
a9322a30 9562#include <alloca.h>
bec39cab
AC
9563int
9564main ()
9565{
a9322a30 9566char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9567 if (p) return 0;
bec39cab
AC
9568 ;
9569 return 0;
9570}
9571_ACEOF
81ecdfbb 9572if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9573 ac_cv_working_alloca_h=yes
bec39cab 9574else
81ecdfbb 9575 ac_cv_working_alloca_h=no
bec39cab 9576fi
81ecdfbb
RW
9577rm -f core conftest.err conftest.$ac_objext \
9578 conftest$ac_exeext conftest.$ac_ext
bec39cab 9579fi
81ecdfbb
RW
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9581$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9582if test $ac_cv_working_alloca_h = yes; then
9583
81ecdfbb 9584$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9585
c906108c 9586fi
bec39cab 9587
81ecdfbb
RW
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9589$as_echo_n "checking for alloca... " >&6; }
9590if test "${ac_cv_func_alloca_works+set}" = set; then :
9591 $as_echo_n "(cached) " >&6
bec39cab 9592else
81ecdfbb 9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9594/* end confdefs.h. */
a9322a30
TT
9595#ifdef __GNUC__
9596# define alloca __builtin_alloca
b4e70030 9597#else
a9322a30
TT
9598# ifdef _MSC_VER
9599# include <malloc.h>
9600# define alloca _alloca
9601# else
81ecdfbb 9602# ifdef HAVE_ALLOCA_H
a9322a30
TT
9603# include <alloca.h>
9604# else
9605# ifdef _AIX
9606 #pragma alloca
9607# else
9608# ifndef alloca /* predefined by HP cc +Olibcalls */
9609char *alloca ();
9610# endif
9611# endif
9612# endif
9613# endif
c906108c 9614#endif
97bf5e38 9615
bec39cab
AC
9616int
9617main ()
9618{
a9322a30 9619char *p = (char *) alloca (1);
81ecdfbb 9620 if (p) return 0;
bec39cab
AC
9621 ;
9622 return 0;
9623}
9624_ACEOF
81ecdfbb 9625if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9626 ac_cv_func_alloca_works=yes
bec39cab 9627else
81ecdfbb 9628 ac_cv_func_alloca_works=no
bec39cab 9629fi
81ecdfbb
RW
9630rm -f core conftest.err conftest.$ac_objext \
9631 conftest$ac_exeext conftest.$ac_ext
bec39cab 9632fi
81ecdfbb
RW
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9634$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9635
9636if test $ac_cv_func_alloca_works = yes; then
9637
81ecdfbb 9638$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9639
a9322a30
TT
9640else
9641 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9642# that cause trouble. Some versions do not even contain alloca or
9643# contain a buggy version. If you still want to use their alloca,
9644# use ar to extract alloca.o from them instead of compiling alloca.c.
9645
81ecdfbb 9646ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9647
81ecdfbb 9648$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9649
bec39cab 9650
81ecdfbb
RW
9651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9652$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9653if test "${ac_cv_os_cray+set}" = set; then :
9654 $as_echo_n "(cached) " >&6
a9322a30 9655else
81ecdfbb 9656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9657/* end confdefs.h. */
81ecdfbb 9658#if defined CRAY && ! defined CRAY2
a9322a30
TT
9659webecray
9660#else
9661wenotbecray
9662#endif
9663
9664_ACEOF
9665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9666 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9667 ac_cv_os_cray=yes
9668else
81ecdfbb 9669 ac_cv_os_cray=no
bec39cab 9670fi
81ecdfbb
RW
9671rm -f conftest*
9672
bec39cab 9673fi
81ecdfbb
RW
9674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9675$as_echo "$ac_cv_os_cray" >&6; }
9676if test $ac_cv_os_cray = yes; then
9677 for ac_func in _getb67 GETB67 getb67; do
9678 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9679ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9680eval as_val=\$$as_ac_var
9681 if test "x$as_val" = x""yes; then :
a9322a30
TT
9682
9683cat >>confdefs.h <<_ACEOF
9684#define CRAY_STACKSEG_END $ac_func
bec39cab 9685_ACEOF
c906108c 9686
a9322a30 9687 break
c906108c
SS
9688fi
9689
a9322a30
TT
9690 done
9691fi
bec39cab 9692
81ecdfbb
RW
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9694$as_echo_n "checking stack direction for C alloca... " >&6; }
9695if test "${ac_cv_c_stack_direction+set}" = set; then :
9696 $as_echo_n "(cached) " >&6
a9322a30 9697else
81ecdfbb 9698 if test "$cross_compiling" = yes; then :
a9322a30 9699 ac_cv_c_stack_direction=0
bec39cab 9700else
81ecdfbb 9701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9702/* end confdefs.h. */
81ecdfbb 9703$ac_includes_default
a9322a30
TT
9704int
9705find_stack_direction ()
b4e70030 9706{
a9322a30
TT
9707 static char *addr = 0;
9708 auto char dummy;
9709 if (addr == 0)
9710 {
9711 addr = &dummy;
9712 return find_stack_direction ();
9713 }
9714 else
9715 return (&dummy > addr) ? 1 : -1;
b4e70030 9716}
b757528f 9717
bec39cab
AC
9718int
9719main ()
9720{
81ecdfbb 9721 return find_stack_direction () < 0;
bec39cab
AC
9722}
9723_ACEOF
81ecdfbb 9724if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9725 ac_cv_c_stack_direction=1
9726else
81ecdfbb 9727 ac_cv_c_stack_direction=-1
a9322a30 9728fi
81ecdfbb
RW
9729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9730 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9731fi
a9322a30 9732
81ecdfbb
RW
9733fi
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9735$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9736cat >>confdefs.h <<_ACEOF
9737#define STACK_DIRECTION $ac_cv_c_stack_direction
9738_ACEOF
9739
9740
9741fi
9742
a9322a30 9743for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9744do :
9745 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9746ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9747eval as_val=\$$as_ac_Header
9748 if test "x$as_val" = x""yes; then :
bec39cab 9749 cat >>confdefs.h <<_ACEOF
81ecdfbb 9750#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9751_ACEOF
b757528f 9752
b757528f 9753fi
bec39cab 9754
a9322a30 9755done
a3828db0 9756
a9322a30 9757for ac_func in getpagesize
81ecdfbb
RW
9758do :
9759 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9760if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9761 cat >>confdefs.h <<_ACEOF
81ecdfbb 9762#define HAVE_GETPAGESIZE 1
bec39cab 9763_ACEOF
bcb3dc3d 9764
bcb3dc3d
MK
9765fi
9766done
9767
81ecdfbb
RW
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9769$as_echo_n "checking for working mmap... " >&6; }
9770if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9771 $as_echo_n "(cached) " >&6
a9322a30 9772else
81ecdfbb 9773 if test "$cross_compiling" = yes; then :
a9322a30 9774 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9775else
81ecdfbb 9776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9777/* end confdefs.h. */
a9322a30
TT
9778$ac_includes_default
9779/* malloc might have been renamed as rpl_malloc. */
9780#undef malloc
bec39cab 9781
a9322a30
TT
9782/* Thanks to Mike Haertel and Jim Avera for this test.
9783 Here is a matrix of mmap possibilities:
9784 mmap private not fixed
9785 mmap private fixed at somewhere currently unmapped
9786 mmap private fixed at somewhere already mapped
9787 mmap shared not fixed
9788 mmap shared fixed at somewhere currently unmapped
9789 mmap shared fixed at somewhere already mapped
9790 For private mappings, we should verify that changes cannot be read()
9791 back from the file, nor mmap's back from the file at a different
9792 address. (There have been systems where private was not correctly
9793 implemented like the infamous i386 svr4.0, and systems where the
9794 VM page cache was not coherent with the file system buffer cache
9795 like early versions of FreeBSD and possibly contemporary NetBSD.)
9796 For shared mappings, we should conversely verify that changes get
9797 propagated back to all the places they're supposed to be.
bec39cab 9798
a9322a30
TT
9799 Grep wants private fixed already mapped.
9800 The main things grep needs to know about mmap are:
9801 * does it exist and is it safe to write into the mmap'd area
9802 * how to use it (BSD variants) */
8b9cf735 9803
a9322a30
TT
9804#include <fcntl.h>
9805#include <sys/mman.h>
8b9cf735 9806
81ecdfbb 9807#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9808char *malloc ();
a3828db0
MK
9809#endif
9810
a9322a30 9811/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9812#ifndef HAVE_GETPAGESIZE
a9322a30 9813/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9814# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9815# define HAVE_SYS_PARAM_H 1
9816# endif
9817
9818# ifdef _SC_PAGESIZE
9819# define getpagesize() sysconf(_SC_PAGESIZE)
9820# else /* no _SC_PAGESIZE */
81ecdfbb 9821# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9822# include <sys/param.h>
9823# ifdef EXEC_PAGESIZE
9824# define getpagesize() EXEC_PAGESIZE
9825# else /* no EXEC_PAGESIZE */
9826# ifdef NBPG
9827# define getpagesize() NBPG * CLSIZE
9828# ifndef CLSIZE
9829# define CLSIZE 1
9830# endif /* no CLSIZE */
9831# else /* no NBPG */
9832# ifdef NBPC
9833# define getpagesize() NBPC
9834# else /* no NBPC */
9835# ifdef PAGESIZE
9836# define getpagesize() PAGESIZE
9837# endif /* PAGESIZE */
9838# endif /* no NBPC */
9839# endif /* no NBPG */
9840# endif /* no EXEC_PAGESIZE */
9841# else /* no HAVE_SYS_PARAM_H */
9842# define getpagesize() 8192 /* punt totally */
9843# endif /* no HAVE_SYS_PARAM_H */
9844# endif /* no _SC_PAGESIZE */
9845
9846#endif /* no HAVE_GETPAGESIZE */
9847
bec39cab
AC
9848int
9849main ()
9850{
a9322a30
TT
9851 char *data, *data2, *data3;
9852 int i, pagesize;
9853 int fd;
9854
9855 pagesize = getpagesize ();
9856
9857 /* First, make a file with some known garbage in it. */
9858 data = (char *) malloc (pagesize);
9859 if (!data)
81ecdfbb 9860 return 1;
a9322a30
TT
9861 for (i = 0; i < pagesize; ++i)
9862 *(data + i) = rand ();
9863 umask (0);
9864 fd = creat ("conftest.mmap", 0600);
9865 if (fd < 0)
81ecdfbb 9866 return 1;
a9322a30 9867 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9868 return 1;
a9322a30
TT
9869 close (fd);
9870
9871 /* Next, try to mmap the file at a fixed address which already has
9872 something else allocated at it. If we can, also make sure that
9873 we see the same garbage. */
9874 fd = open ("conftest.mmap", O_RDWR);
9875 if (fd < 0)
81ecdfbb 9876 return 1;
a9322a30
TT
9877 data2 = (char *) malloc (2 * pagesize);
9878 if (!data2)
81ecdfbb
RW
9879 return 1;
9880 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9881 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9882 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9883 return 1;
a9322a30
TT
9884 for (i = 0; i < pagesize; ++i)
9885 if (*(data + i) != *(data2 + i))
81ecdfbb 9886 return 1;
a9322a30
TT
9887
9888 /* Finally, make sure that changes to the mapped area do not
9889 percolate back to the file as seen by read(). (This is a bug on
9890 some variants of i386 svr4.0.) */
9891 for (i = 0; i < pagesize; ++i)
9892 *(data2 + i) = *(data2 + i) + 1;
9893 data3 = (char *) malloc (pagesize);
9894 if (!data3)
81ecdfbb 9895 return 1;
a9322a30 9896 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9897 return 1;
a9322a30
TT
9898 for (i = 0; i < pagesize; ++i)
9899 if (*(data + i) != *(data3 + i))
81ecdfbb 9900 return 1;
a9322a30 9901 close (fd);
81ecdfbb 9902 return 0;
bec39cab
AC
9903}
9904_ACEOF
81ecdfbb 9905if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9906 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9907else
81ecdfbb 9908 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9909fi
81ecdfbb
RW
9910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9911 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9912fi
81ecdfbb 9913
a9322a30 9914fi
81ecdfbb
RW
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9916$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9917if test $ac_cv_func_mmap_fixed_mapped = yes; then
9918
81ecdfbb 9919$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9920
086ec9eb 9921fi
a9322a30 9922rm -f conftest.mmap
a3828db0 9923
81ecdfbb
RW
9924ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9925if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9926
a9322a30
TT
9927else
9928
9929cat >>confdefs.h <<_ACEOF
9930#define pid_t int
bec39cab 9931_ACEOF
086ec9eb
MK
9932
9933fi
9934
81ecdfbb
RW
9935for ac_header in vfork.h
9936do :
9937 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9938if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9939 cat >>confdefs.h <<_ACEOF
81ecdfbb 9940#define HAVE_VFORK_H 1
bec39cab 9941_ACEOF
c906108c
SS
9942
9943fi
a9322a30 9944
a3828db0 9945done
c906108c 9946
a9322a30 9947for ac_func in fork vfork
81ecdfbb
RW
9948do :
9949 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9950ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9951eval as_val=\$$as_ac_var
9952 if test "x$as_val" = x""yes; then :
a3828db0 9953 cat >>confdefs.h <<_ACEOF
81ecdfbb 9954#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9955_ACEOF
b83266a0 9956
97bf5e38 9957fi
a3828db0 9958done
b83266a0 9959
a9322a30 9960if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9962$as_echo_n "checking for working fork... " >&6; }
9963if test "${ac_cv_func_fork_works+set}" = set; then :
9964 $as_echo_n "(cached) " >&6
a9322a30 9965else
81ecdfbb 9966 if test "$cross_compiling" = yes; then :
a9322a30
TT
9967 ac_cv_func_fork_works=cross
9968else
81ecdfbb
RW
9969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9970/* end confdefs.h. */
9971$ac_includes_default
9972int
9973main ()
9974{
9975
9976 /* By Ruediger Kuhlmann. */
9977 return fork () < 0;
9978
9979 ;
9980 return 0;
9981}
a9322a30 9982_ACEOF
81ecdfbb 9983if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9984 ac_cv_func_fork_works=yes
9985else
81ecdfbb 9986 ac_cv_func_fork_works=no
a9322a30 9987fi
81ecdfbb
RW
9988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9989 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9990fi
81ecdfbb 9991
a9322a30 9992fi
81ecdfbb
RW
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9994$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9995
9996else
9997 ac_cv_func_fork_works=$ac_cv_func_fork
9998fi
9999if test "x$ac_cv_func_fork_works" = xcross; then
10000 case $host in
10001 *-*-amigaos* | *-*-msdosdjgpp*)
10002 # Override, as these systems have only a dummy fork() stub
10003 ac_cv_func_fork_works=no
10004 ;;
10005 *)
10006 ac_cv_func_fork_works=yes
10007 ;;
10008 esac
81ecdfbb
RW
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10010$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10011fi
10012ac_cv_func_vfork_works=$ac_cv_func_vfork
10013if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10015$as_echo_n "checking for working vfork... " >&6; }
10016if test "${ac_cv_func_vfork_works+set}" = set; then :
10017 $as_echo_n "(cached) " >&6
a9322a30 10018else
81ecdfbb 10019 if test "$cross_compiling" = yes; then :
a9322a30
TT
10020 ac_cv_func_vfork_works=cross
10021else
81ecdfbb 10022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10023/* end confdefs.h. */
10024/* Thanks to Paul Eggert for this test. */
81ecdfbb 10025$ac_includes_default
a9322a30 10026#include <sys/wait.h>
81ecdfbb 10027#ifdef HAVE_VFORK_H
a9322a30
TT
10028# include <vfork.h>
10029#endif
10030/* On some sparc systems, changes by the child to local and incoming
10031 argument registers are propagated back to the parent. The compiler
10032 is told about this with #include <vfork.h>, but some compilers
10033 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10034 static variable whose address is put into a register that is
10035 clobbered by the vfork. */
10036static void
10037#ifdef __cplusplus
10038sparc_address_test (int arg)
10039# else
10040sparc_address_test (arg) int arg;
10041#endif
10042{
10043 static pid_t child;
10044 if (!child) {
10045 child = vfork ();
10046 if (child < 0) {
10047 perror ("vfork");
10048 _exit(2);
10049 }
10050 if (!child) {
10051 arg = getpid();
10052 write(-1, "", 0);
10053 _exit (arg);
10054 }
10055 }
10056}
10057
10058int
10059main ()
10060{
10061 pid_t parent = getpid ();
10062 pid_t child;
10063
10064 sparc_address_test (0);
10065
10066 child = vfork ();
10067
10068 if (child == 0) {
10069 /* Here is another test for sparc vfork register problems. This
10070 test uses lots of local variables, at least as many local
10071 variables as main has allocated so far including compiler
10072 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10073 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10074 reuse the register of parent for one of the local variables,
10075 since it will think that parent can't possibly be used any more
10076 in this routine. Assigning to the local variable will thus
10077 munge parent in the parent process. */
10078 pid_t
10079 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10080 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10081 /* Convince the compiler that p..p7 are live; otherwise, it might
10082 use the same hardware register for all 8 local variables. */
10083 if (p != p1 || p != p2 || p != p3 || p != p4
10084 || p != p5 || p != p6 || p != p7)
10085 _exit(1);
10086
10087 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10088 from child file descriptors. If the child closes a descriptor
10089 before it execs or exits, this munges the parent's descriptor
10090 as well. Test for this by closing stdout in the child. */
10091 _exit(close(fileno(stdout)) != 0);
10092 } else {
10093 int status;
10094 struct stat st;
10095
10096 while (wait(&status) != child)
10097 ;
81ecdfbb 10098 return (
a9322a30
TT
10099 /* Was there some problem with vforking? */
10100 child < 0
10101
10102 /* Did the child fail? (This shouldn't happen.) */
10103 || status
10104
10105 /* Did the vfork/compiler bug occur? */
10106 || parent != getpid()
10107
10108 /* Did the file descriptor bug occur? */
10109 || fstat(fileno(stdout), &st) != 0
10110 );
10111 }
10112}
10113_ACEOF
81ecdfbb 10114if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10115 ac_cv_func_vfork_works=yes
10116else
81ecdfbb 10117 ac_cv_func_vfork_works=no
a9322a30 10118fi
81ecdfbb
RW
10119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10120 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10121fi
81ecdfbb 10122
a9322a30 10123fi
81ecdfbb
RW
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10125$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10126
10127fi;
10128if test "x$ac_cv_func_fork_works" = xcross; then
10129 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10131$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10132fi
10133
10134if test "x$ac_cv_func_vfork_works" = xyes; then
10135
81ecdfbb 10136$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10137
10138else
10139
81ecdfbb 10140$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10141
10142fi
10143if test "x$ac_cv_func_fork_works" = xyes; then
10144
81ecdfbb 10145$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10146
10147fi
10148
7313baad 10149for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10150 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10151 sbrk setpgid setpgrp setsid \
a9322a30 10152 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10153 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10154 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10155do :
10156 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10157ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10158eval as_val=\$$as_ac_var
10159 if test "x$as_val" = x""yes; then :
6c7a06a3 10160 cat >>confdefs.h <<_ACEOF
81ecdfbb 10161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10162_ACEOF
10163
10164fi
10165done
10166
10167
81ecdfbb
RW
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10169$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10170if test "${am_cv_langinfo_codeset+set}" = set; then :
10171 $as_echo_n "(cached) " >&6
6c7a06a3 10172else
81ecdfbb 10173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10174/* end confdefs.h. */
10175#include <langinfo.h>
10176int
10177main ()
10178{
10179char* cs = nl_langinfo(CODESET);
bec39cab
AC
10180 ;
10181 return 0;
10182}
10183_ACEOF
81ecdfbb 10184if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10185 am_cv_langinfo_codeset=yes
a4db0f07 10186else
81ecdfbb 10187 am_cv_langinfo_codeset=no
a4db0f07 10188fi
81ecdfbb
RW
10189rm -f core conftest.err conftest.$ac_objext \
10190 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10191
a4db0f07 10192fi
81ecdfbb
RW
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10194$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10195 if test $am_cv_langinfo_codeset = yes; then
10196
81ecdfbb 10197$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10198
6c7a06a3 10199 fi
c906108c 10200
06825bd1 10201
a3828db0
MK
10202# Check the return and argument types of ptrace. No canned test for
10203# this, so roll our own.
10204gdb_ptrace_headers='
10205#if HAVE_SYS_TYPES_H
10206# include <sys/types.h>
10207#endif
10208#if HAVE_SYS_PTRACE_H
10209# include <sys/ptrace.h>
10210#endif
10211#if HAVE_UNISTD_H
10212# include <unistd.h>
10213#endif
10214'
10215# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10216ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10217"
10218if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10219 ac_have_decl=1
06825bd1 10220else
81ecdfbb 10221 ac_have_decl=0
06825bd1 10222fi
06825bd1 10223
a3828db0 10224cat >>confdefs.h <<_ACEOF
81ecdfbb 10225#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10226_ACEOF
81ecdfbb 10227if test $ac_have_decl = 1; then :
bec39cab 10228
a3828db0 10229else
a3828db0
MK
10230
10231 : ${gdb_cv_func_ptrace_ret='int'}
10232 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10233
06825bd1
MK
10234fi
10235
064ef605
DJ
10236# Check return type. Varargs (used on GNU/Linux) conflict with the
10237# empty argument list, so check for that explicitly.
81ecdfbb
RW
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10239$as_echo_n "checking return type of ptrace... " >&6; }
10240if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10241 $as_echo_n "(cached) " >&6
bec39cab 10242else
81ecdfbb 10243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10244/* end confdefs.h. */
a3828db0 10245$gdb_ptrace_headers
bec39cab
AC
10246int
10247main ()
10248{
064ef605
DJ
10249extern long ptrace (enum __ptrace_request, ...);
10250 ;
10251 return 0;
10252}
10253_ACEOF
81ecdfbb 10254if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10255 gdb_cv_func_ptrace_ret='long'
10256else
81ecdfbb 10257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10258/* end confdefs.h. */
10259$gdb_ptrace_headers
10260int
10261main ()
10262{
a3828db0 10263extern int ptrace ();
bec39cab
AC
10264 ;
10265 return 0;
10266}
10267_ACEOF
81ecdfbb 10268if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10269 gdb_cv_func_ptrace_ret='int'
70f9f479 10270else
81ecdfbb 10271 gdb_cv_func_ptrace_ret='long'
70f9f479 10272fi
81ecdfbb 10273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10274fi
81ecdfbb 10275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10276fi
81ecdfbb
RW
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10278$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10279
a3828db0
MK
10280cat >>confdefs.h <<_ACEOF
10281#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10282_ACEOF
70f9f479 10283
a3828db0 10284# Check argument types.
81ecdfbb
RW
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10286$as_echo_n "checking types of arguments for ptrace... " >&6; }
10287if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10288 $as_echo_n "(cached) " >&6
bec39cab 10289else
a3828db0 10290
81ecdfbb 10291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10292/* end confdefs.h. */
10293$gdb_ptrace_headers
10294int
10295main ()
10296{
10297extern long ptrace (enum __ptrace_request, ...);
10298 ;
10299 return 0;
10300}
10301_ACEOF
81ecdfbb 10302if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10303 gdb_cv_func_ptrace_args='int,int,long,long'
10304else
064ef605 10305
a3828db0
MK
10306for gdb_arg1 in 'int' 'long'; do
10307 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10308 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10309 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10311/* end confdefs.h. */
a3828db0 10312$gdb_ptrace_headers
bec39cab
AC
10313int
10314main ()
10315{
a3828db0
MK
10316
10317extern $gdb_cv_func_ptrace_ret
10318 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10319
bec39cab
AC
10320 ;
10321 return 0;
10322}
10323_ACEOF
81ecdfbb 10324if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10325 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10326 break 4;
5c7f2947 10327fi
81ecdfbb 10328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10329 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10331/* end confdefs.h. */
a3828db0 10332$gdb_ptrace_headers
bec39cab
AC
10333int
10334main ()
10335{
a3828db0
MK
10336
10337extern $gdb_cv_func_ptrace_ret
10338 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10339
bec39cab
AC
10340 ;
10341 return 0;
10342}
10343_ACEOF
81ecdfbb 10344if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10345
10346gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10347 break 5;
78434e59 10348fi
81ecdfbb 10349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10350 done
10351 done
10352 done
10353 done
10354done
10355# Provide a safe default value.
10356: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10357
064ef605 10358fi
81ecdfbb 10359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10360fi
81ecdfbb
RW
10361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10362$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10363ac_save_IFS=$IFS; IFS=','
10364set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10365IFS=$ac_save_IFS
10366shift
bec39cab 10367
a3828db0
MK
10368cat >>confdefs.h <<_ACEOF
10369#define PTRACE_TYPE_ARG3 $3
10370_ACEOF
10371
10372if test -n "$5"; then
10373
10374cat >>confdefs.h <<_ACEOF
10375#define PTRACE_TYPE_ARG5 $5
bec39cab 10376_ACEOF
78434e59
MK
10377
10378fi
10379
a3828db0 10380if test "$cross_compiling" = no; then
81ecdfbb
RW
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10382$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10383if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10384 $as_echo_n "(cached) " >&6
a3828db0 10385else
81ecdfbb
RW
10386 if test "$cross_compiling" = yes; then :
10387 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10388else
81ecdfbb 10389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10390/* end confdefs.h. */
81ecdfbb 10391$ac_includes_default
bec39cab
AC
10392int
10393main ()
10394{
a3828db0
MK
10395/* If this system has a BSD-style setpgrp which takes arguments,
10396 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10397 exit successfully. */
81ecdfbb 10398 return setpgrp (1,1) != -1;
bec39cab
AC
10399 ;
10400 return 0;
10401}
10402_ACEOF
81ecdfbb 10403if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10404 ac_cv_func_setpgrp_void=no
c906108c 10405else
81ecdfbb 10406 ac_cv_func_setpgrp_void=yes
c906108c 10407fi
81ecdfbb
RW
10408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10409 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10410fi
81ecdfbb 10411
a3828db0 10412fi
81ecdfbb
RW
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10414$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10415if test $ac_cv_func_setpgrp_void = yes; then
10416
81ecdfbb 10417$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10418
10419fi
a3828db0
MK
10420
10421else
81ecdfbb
RW
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10423$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10424if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10425 $as_echo_n "(cached) " >&6
97bf5e38 10426else
81ecdfbb 10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10428/* end confdefs.h. */
a3828db0
MK
10429
10430#include <unistd.h>
10431
bec39cab
AC
10432int
10433main ()
10434{
a3828db0
MK
10435
10436 if (setpgrp(1,1) == -1)
10437 exit (0);
10438 else
10439 exit (1);
10440
bec39cab
AC
10441 ;
10442 return 0;
10443}
10444_ACEOF
81ecdfbb 10445if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10446 ac_cv_func_setpgrp_void=no
c906108c 10447else
81ecdfbb 10448 ac_cv_func_setpgrp_void=yes
c906108c 10449fi
81ecdfbb 10450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10451fi
81ecdfbb
RW
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10453$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10454if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10455 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10456
a3828db0 10457fi
c906108c
SS
10458fi
10459
a3828db0
MK
10460# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10461# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10463$as_echo_n "checking for sigsetjmp... " >&6; }
10464if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10465 $as_echo_n "(cached) " >&6
bec39cab 10466else
81ecdfbb 10467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10468/* end confdefs.h. */
a3828db0
MK
10469
10470#include <setjmp.h>
10471
bec39cab
AC
10472int
10473main ()
10474{
a3828db0 10475sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10476 ;
10477 return 0;
10478}
10479_ACEOF
81ecdfbb 10480if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10481 gdb_cv_func_sigsetjmp=yes
c906108c 10482else
81ecdfbb 10483 gdb_cv_func_sigsetjmp=no
c906108c 10484fi
81ecdfbb 10485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10486fi
81ecdfbb
RW
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10488$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10489if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10490
81ecdfbb 10491$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10492
97bf5e38 10493fi
c906108c 10494
a3828db0
MK
10495# Assume we'll default to using the included libiberty regex.
10496gdb_use_included_regex=yes
10497
10498# However, if the system regex is GNU regex, then default to *not*
10499# using the included regex.
81ecdfbb
RW
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10501$as_echo_n "checking for GNU regex... " >&6; }
10502if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10503 $as_echo_n "(cached) " >&6
bec39cab 10504else
81ecdfbb 10505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10506/* end confdefs.h. */
a3828db0 10507#include <gnu-versions.h>
bec39cab
AC
10508int
10509main ()
10510{
81ecdfbb
RW
10511#define REGEX_INTERFACE_VERSION 1
10512#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10513# error "Version mismatch"
10514#endif
5c45e068
MK
10515 ;
10516 return 0;
10517}
10518_ACEOF
81ecdfbb
RW
10519if ac_fn_c_try_compile "$LINENO"; then :
10520 gdb_cv_have_gnu_regex=yes
5c45e068 10521else
81ecdfbb
RW
10522 gdb_cv_have_gnu_regex=no
10523fi
10524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10525fi
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10527$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10528if test $gdb_cv_have_gnu_regex = yes; then
10529 gdb_use_included_regex=no
5c45e068 10530fi
81ecdfbb
RW
10531
10532
10533# Check whether --with-included-regex was given.
10534if test "${with_included_regex+set}" = set; then :
10535 withval=$with_included_regex; gdb_with_regex=$withval
10536else
10537 gdb_with_regex=$gdb_use_included_regex
c906108c 10538fi
81ecdfbb
RW
10539
10540if test "$gdb_with_regex" = yes; then
10541
10542$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10543
c906108c 10544fi
81ecdfbb
RW
10545
10546# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10547ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10548#include <sys/proc.h>
10549
10550"
10551if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10552
5c45e068 10553cat >>confdefs.h <<_ACEOF
a3828db0 10554#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10555_ACEOF
c906108c 10556
5c45e068 10557
97bf5e38 10558fi
c906108c 10559
5c45e068 10560
a3828db0 10561# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10563$as_echo_n "checking for struct lwp... " >&6; }
10564if test "${gdb_cv_struct_lwp+set}" = set; then :
10565 $as_echo_n "(cached) " >&6
bec39cab 10566else
81ecdfbb 10567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10568/* end confdefs.h. */
a3828db0
MK
10569#include <sys/param.h>
10570#include <sys/lwp.h>
bec39cab
AC
10571int
10572main ()
10573{
a3828db0 10574struct lwp l;
bec39cab
AC
10575 ;
10576 return 0;
10577}
10578_ACEOF
81ecdfbb 10579if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10580 gdb_cv_struct_lwp=yes
c906108c 10581else
81ecdfbb 10582 gdb_cv_struct_lwp=no
c906108c 10583fi
81ecdfbb 10584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10585fi
81ecdfbb
RW
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10587$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10588if test $gdb_cv_struct_lwp = yes; then
c906108c 10589
81ecdfbb 10590$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10591
97bf5e38 10592fi
c906108c 10593
a3828db0 10594# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10596$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10597if test "${gdb_cv_struct_reg+set}" = set; then :
10598 $as_echo_n "(cached) " >&6
bec39cab 10599else
81ecdfbb 10600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10601/* end confdefs.h. */
a3828db0
MK
10602#include <sys/types.h>
10603#include <machine/reg.h>
bec39cab
AC
10604int
10605main ()
10606{
a3828db0 10607struct reg r;
bec39cab
AC
10608 ;
10609 return 0;
10610}
10611_ACEOF
81ecdfbb 10612if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10613 gdb_cv_struct_reg=yes
27ca5dad 10614else
81ecdfbb 10615 gdb_cv_struct_reg=no
27ca5dad 10616fi
81ecdfbb 10617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10618fi
81ecdfbb
RW
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10620$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10621if test $gdb_cv_struct_reg = yes; then
bec39cab 10622
81ecdfbb 10623$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10624
10625fi
97bf5e38 10626
a3828db0
MK
10627# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10628# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10629ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10630"
10631if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10632
10633cat >>confdefs.h <<_ACEOF
a3828db0 10634#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10635_ACEOF
3862412b 10636
5c45e068 10637
97bf5e38 10638fi
81ecdfbb
RW
10639ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10640"
10641if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10642
10643cat >>confdefs.h <<_ACEOF
a3828db0 10644#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10645_ACEOF
3862412b 10646
5c45e068 10647
97bf5e38 10648fi
3862412b 10649
5c45e068 10650
6fea9e18
L
10651# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10652# Older amd64 Linux's don't have the fs_base and gs_base members of
10653# `struct user_regs_struct'.
10654ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10655"
10656if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10657
10658cat >>confdefs.h <<_ACEOF
10659#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10660_ACEOF
10661
10662
10663fi
10664ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10665"
10666if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10667
10668cat >>confdefs.h <<_ACEOF
10669#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10670_ACEOF
10671
10672
10673fi
10674
10675
a3828db0 10676# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10678$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10679if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10680 $as_echo_n "(cached) " >&6
451928c5 10681else
81ecdfbb 10682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10683/* end confdefs.h. */
a3828db0 10684#include <sys/ptrace.h>
bec39cab
AC
10685int
10686main ()
10687{
a3828db0 10688PTRACE_GETREGS;
bec39cab
AC
10689 ;
10690 return 0;
10691}
10692_ACEOF
81ecdfbb 10693if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10694 gdb_cv_have_ptrace_getregs=yes
451928c5 10695else
81ecdfbb 10696 gdb_cv_have_ptrace_getregs=no
451928c5 10697fi
81ecdfbb 10698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10699fi
10700
81ecdfbb
RW
10701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10702$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10703if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10704
81ecdfbb 10705$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10706
97bf5e38 10707fi
451928c5 10708
a3828db0 10709# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10711$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10712if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10713 $as_echo_n "(cached) " >&6
451928c5 10714else
81ecdfbb 10715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10716/* end confdefs.h. */
a3828db0 10717#include <sys/ptrace.h>
bec39cab
AC
10718int
10719main ()
10720{
a3828db0 10721PTRACE_GETFPXREGS;
bec39cab
AC
10722 ;
10723 return 0;
10724}
10725_ACEOF
81ecdfbb 10726if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10727 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10728else
81ecdfbb 10729 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10730fi
81ecdfbb 10731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10732fi
10733
81ecdfbb
RW
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10735$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10736if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10737
81ecdfbb 10738$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10739
97bf5e38 10740fi
451928c5 10741
a3828db0 10742# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10744$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10745if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10746 $as_echo_n "(cached) " >&6
3862412b 10747else
81ecdfbb 10748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10749/* end confdefs.h. */
a3828db0
MK
10750#include <sys/types.h>
10751#include <sys/ptrace.h>
bec39cab
AC
10752int
10753main ()
10754{
a3828db0 10755PT_GETDBREGS;
bec39cab
AC
10756 ;
10757 return 0;
10758}
10759_ACEOF
81ecdfbb 10760if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10761 gdb_cv_have_pt_getdbregs=yes
3862412b 10762else
81ecdfbb 10763 gdb_cv_have_pt_getdbregs=no
3862412b 10764fi
81ecdfbb 10765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10766fi
10767
81ecdfbb
RW
10768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10769$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10770if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10771
81ecdfbb 10772$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10773
97bf5e38 10774fi
3862412b 10775
a3828db0 10776# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10778$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10779if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10780 $as_echo_n "(cached) " >&6
3862412b 10781else
81ecdfbb 10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10783/* end confdefs.h. */
a3828db0
MK
10784#include <sys/types.h>
10785#include <sys/ptrace.h>
bec39cab
AC
10786int
10787main ()
10788{
a3828db0 10789PT_GETXMMREGS;
bec39cab
AC
10790 ;
10791 return 0;
10792}
10793_ACEOF
81ecdfbb 10794if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10795 gdb_cv_have_pt_getxmmregs=yes
3862412b 10796else
81ecdfbb 10797 gdb_cv_have_pt_getxmmregs=no
3862412b 10798fi
81ecdfbb 10799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10800fi
10801
81ecdfbb
RW
10802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10803$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10804if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10805
81ecdfbb 10806$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10807
97bf5e38 10808fi
3862412b 10809
eb368090 10810# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10811
10812if test "${target}" = "${host}"; then
10813 case "${host}" in
97bf5e38 10814 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10815
81ecdfbb 10816$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10817
10818 ;;
c162e8c9 10819 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10820
81ecdfbb 10821$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10822
10823 ;;
10824 mips-sgi-irix5*)
10825 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10826
81ecdfbb 10827$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10828
10829 ;;
10830 esac
10831fi
10832
10833if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10835$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10836 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10837 $as_echo_n "(cached) " >&6
bec39cab 10838else
81ecdfbb 10839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10840/* end confdefs.h. */
596c9d4b
KB
10841
10842#define _SYSCALL32
d30c5336
JK
10843/* Needed for new procfs interface on sparc-solaris. */
10844#define _STRUCTURED_PROC 1
596c9d4b 10845#include <sys/procfs.h>
bec39cab
AC
10846int
10847main ()
10848{
97bf5e38 10849pstatus_t avar
bec39cab
AC
10850 ;
10851 return 0;
10852}
10853_ACEOF
81ecdfbb 10854if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10855 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10856else
81ecdfbb 10857 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10858
596c9d4b 10859fi
81ecdfbb 10860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10861fi
10862
97bf5e38 10863 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10864
81ecdfbb 10865$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10866
10867 fi
81ecdfbb
RW
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10869$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10870
81ecdfbb
RW
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10872$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10873 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10874 $as_echo_n "(cached) " >&6
596c9d4b 10875else
81ecdfbb 10876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10877/* end confdefs.h. */
596c9d4b
KB
10878
10879#define _SYSCALL32
d30c5336
JK
10880/* Needed for new procfs interface on sparc-solaris. */
10881#define _STRUCTURED_PROC 1
596c9d4b 10882#include <sys/procfs.h>
bec39cab
AC
10883int
10884main ()
10885{
97bf5e38 10886prrun_t avar
bec39cab
AC
10887 ;
10888 return 0;
10889}
10890_ACEOF
81ecdfbb 10891if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10892 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10893else
81ecdfbb 10894 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10895
596c9d4b 10896fi
81ecdfbb 10897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10898fi
10899
97bf5e38 10900 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10901
81ecdfbb 10902$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10903
10904 fi
81ecdfbb
RW
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10906$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10907
81ecdfbb
RW
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10909$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10910 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10911 $as_echo_n "(cached) " >&6
596c9d4b 10912else
81ecdfbb 10913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10914/* end confdefs.h. */
596c9d4b
KB
10915
10916#define _SYSCALL32
d30c5336
JK
10917/* Needed for new procfs interface on sparc-solaris. */
10918#define _STRUCTURED_PROC 1
596c9d4b 10919#include <sys/procfs.h>
bec39cab
AC
10920int
10921main ()
10922{
97bf5e38 10923gregset_t avar
bec39cab
AC
10924 ;
10925 return 0;
10926}
10927_ACEOF
81ecdfbb 10928if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10929 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10930else
81ecdfbb 10931 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10932
596c9d4b 10933fi
81ecdfbb 10934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10935fi
10936
97bf5e38 10937 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10938
81ecdfbb 10939$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10940
10941 fi
81ecdfbb
RW
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10943$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10944
81ecdfbb
RW
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10946$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10947 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10948 $as_echo_n "(cached) " >&6
d84dd0c5 10949else
81ecdfbb 10950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10951/* end confdefs.h. */
97bf5e38
MK
10952
10953#define _SYSCALL32
d30c5336
JK
10954/* Needed for new procfs interface on sparc-solaris. */
10955#define _STRUCTURED_PROC 1
d84dd0c5 10956#include <sys/procfs.h>
bec39cab
AC
10957int
10958main ()
10959{
97bf5e38 10960fpregset_t avar
bec39cab
AC
10961 ;
10962 return 0;
10963}
10964_ACEOF
81ecdfbb 10965if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10966 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10967else
81ecdfbb 10968 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10969
d84dd0c5 10970fi
81ecdfbb 10971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10972fi
10973
97bf5e38 10974 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10975
81ecdfbb 10976$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10977
97bf5e38 10978 fi
81ecdfbb
RW
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10980$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10981
81ecdfbb
RW
10982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10983$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10984 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10985 $as_echo_n "(cached) " >&6
c906108c 10986else
81ecdfbb 10987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10988/* end confdefs.h. */
c906108c 10989
97bf5e38 10990#define _SYSCALL32
d30c5336
JK
10991/* Needed for new procfs interface on sparc-solaris. */
10992#define _STRUCTURED_PROC 1
97bf5e38 10993#include <sys/procfs.h>
bec39cab
AC
10994int
10995main ()
10996{
97bf5e38 10997prgregset_t avar
bec39cab
AC
10998 ;
10999 return 0;
11000}
11001_ACEOF
81ecdfbb 11002if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11003 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11004else
81ecdfbb 11005 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11006
c906108c 11007fi
81ecdfbb 11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11009fi
11010
97bf5e38 11011 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11012
81ecdfbb 11013$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11014
97bf5e38 11015 fi
81ecdfbb
RW
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11017$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11018
81ecdfbb
RW
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11020$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11021 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11022 $as_echo_n "(cached) " >&6
d45fe813 11023else
81ecdfbb 11024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11025/* end confdefs.h. */
97bf5e38
MK
11026
11027#define _SYSCALL32
d30c5336
JK
11028/* Needed for new procfs interface on sparc-solaris. */
11029#define _STRUCTURED_PROC 1
97bf5e38 11030#include <sys/procfs.h>
bec39cab
AC
11031int
11032main ()
11033{
97bf5e38 11034prfpregset_t avar
bec39cab
AC
11035 ;
11036 return 0;
11037}
11038_ACEOF
81ecdfbb 11039if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11040 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11041else
81ecdfbb 11042 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11043
d45fe813 11044fi
81ecdfbb 11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11046fi
11047
97bf5e38 11048 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11049
81ecdfbb 11050$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11051
97bf5e38 11052 fi
81ecdfbb
RW
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11054$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11055
81ecdfbb
RW
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11057$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11058 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11059 $as_echo_n "(cached) " >&6
d45fe813 11060else
81ecdfbb 11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11062/* end confdefs.h. */
97bf5e38
MK
11063
11064#define _SYSCALL32
d30c5336
JK
11065/* Needed for new procfs interface on sparc-solaris. */
11066#define _STRUCTURED_PROC 1
97bf5e38 11067#include <sys/procfs.h>
bec39cab
AC
11068int
11069main ()
11070{
97bf5e38 11071prgregset32_t avar
bec39cab
AC
11072 ;
11073 return 0;
11074}
11075_ACEOF
81ecdfbb 11076if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11077 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11078else
81ecdfbb 11079 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11080
d45fe813 11081fi
81ecdfbb 11082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11083fi
11084
97bf5e38 11085 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11086
81ecdfbb 11087$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11088
97bf5e38 11089 fi
81ecdfbb
RW
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11091$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11092
81ecdfbb
RW
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
11094$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
11095 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
11096 $as_echo_n "(cached) " >&6
d45fe813 11097else
81ecdfbb 11098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11099/* end confdefs.h. */
97bf5e38
MK
11100
11101#define _SYSCALL32
d30c5336
JK
11102/* Needed for new procfs interface on sparc-solaris. */
11103#define _STRUCTURED_PROC 1
97bf5e38 11104#include <sys/procfs.h>
bec39cab
AC
11105int
11106main ()
11107{
97bf5e38 11108prfpregset32_t avar
bec39cab
AC
11109 ;
11110 return 0;
11111}
11112_ACEOF
81ecdfbb 11113if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11114 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 11115else
81ecdfbb 11116 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 11117
d45fe813 11118fi
81ecdfbb 11119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11120fi
11121
97bf5e38 11122 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 11123
81ecdfbb 11124$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 11125
97bf5e38 11126 fi
81ecdfbb
RW
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
11128$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 11129
81ecdfbb
RW
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11131$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11132 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11133 $as_echo_n "(cached) " >&6
d45fe813 11134else
81ecdfbb 11135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11136/* end confdefs.h. */
97bf5e38 11137
d45fe813 11138#define _SYSCALL32
d30c5336
JK
11139/* Needed for new procfs interface on sparc-solaris. */
11140#define _STRUCTURED_PROC 1
97bf5e38 11141#include <sys/procfs.h>
bec39cab
AC
11142int
11143main ()
11144{
97bf5e38 11145lwpid_t avar
bec39cab
AC
11146 ;
11147 return 0;
11148}
11149_ACEOF
81ecdfbb 11150if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11151 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11152else
81ecdfbb 11153 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11154
d45fe813 11155fi
81ecdfbb 11156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11157fi
11158
97bf5e38 11159 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11160
81ecdfbb 11161$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11162
97bf5e38 11163 fi
81ecdfbb
RW
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11165$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11166
81ecdfbb
RW
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11168$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11169 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11170 $as_echo_n "(cached) " >&6
c906108c 11171else
81ecdfbb 11172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11173/* end confdefs.h. */
c906108c 11174
97bf5e38 11175#define _SYSCALL32
d30c5336
JK
11176/* Needed for new procfs interface on sparc-solaris. */
11177#define _STRUCTURED_PROC 1
97bf5e38 11178#include <sys/procfs.h>
bec39cab
AC
11179int
11180main ()
11181{
97bf5e38 11182psaddr_t avar
bec39cab
AC
11183 ;
11184 return 0;
11185}
11186_ACEOF
81ecdfbb 11187if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11188 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11189else
81ecdfbb 11190 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11191
c906108c 11192fi
81ecdfbb 11193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11194fi
11195
97bf5e38 11196 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11197
81ecdfbb 11198$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11199
97bf5e38 11200 fi
81ecdfbb
RW
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11202$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11203
81ecdfbb
RW
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11205$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11206 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11207 $as_echo_n "(cached) " >&6
c906108c 11208else
81ecdfbb 11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11210/* end confdefs.h. */
c906108c 11211
97bf5e38 11212#define _SYSCALL32
d30c5336
JK
11213/* Needed for new procfs interface on sparc-solaris. */
11214#define _STRUCTURED_PROC 1
97bf5e38 11215#include <sys/procfs.h>
bec39cab
AC
11216int
11217main ()
11218{
97bf5e38 11219prsysent_t avar
bec39cab
AC
11220 ;
11221 return 0;
11222}
11223_ACEOF
81ecdfbb 11224if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11225 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11226else
81ecdfbb 11227 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11228
c906108c 11229fi
81ecdfbb 11230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11231fi
11232
97bf5e38 11233 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11234
81ecdfbb 11235$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11236
97bf5e38 11237 fi
81ecdfbb
RW
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11239$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11240
81ecdfbb
RW
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11242$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11243 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11244 $as_echo_n "(cached) " >&6
c906108c 11245else
81ecdfbb 11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11247/* end confdefs.h. */
c906108c 11248
97bf5e38 11249#define _SYSCALL32
d30c5336
JK
11250/* Needed for new procfs interface on sparc-solaris. */
11251#define _STRUCTURED_PROC 1
97bf5e38 11252#include <sys/procfs.h>
bec39cab
AC
11253int
11254main ()
11255{
97bf5e38 11256pr_sigset_t avar
bec39cab
AC
11257 ;
11258 return 0;
11259}
11260_ACEOF
81ecdfbb 11261if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11262 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11263else
81ecdfbb 11264 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11265
c906108c 11266fi
81ecdfbb 11267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11268fi
11269
97bf5e38 11270 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11271
81ecdfbb 11272$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11273
97bf5e38 11274 fi
81ecdfbb
RW
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11276$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11277
81ecdfbb
RW
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11279$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11280 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11281 $as_echo_n "(cached) " >&6
c906108c 11282else
81ecdfbb 11283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11284/* end confdefs.h. */
c906108c 11285
97bf5e38 11286#define _SYSCALL32
d30c5336
JK
11287/* Needed for new procfs interface on sparc-solaris. */
11288#define _STRUCTURED_PROC 1
97bf5e38 11289#include <sys/procfs.h>
bec39cab
AC
11290int
11291main ()
11292{
97bf5e38 11293pr_sigaction64_t avar
bec39cab
AC
11294 ;
11295 return 0;
11296}
11297_ACEOF
81ecdfbb 11298if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11299 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11300else
81ecdfbb 11301 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11302
c906108c 11303fi
81ecdfbb 11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11305fi
11306
97bf5e38 11307 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11308
81ecdfbb 11309$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11310
97bf5e38 11311 fi
81ecdfbb
RW
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11313$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11314
81ecdfbb
RW
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11316$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11317 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11318 $as_echo_n "(cached) " >&6
97bf5e38 11319else
81ecdfbb 11320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11321/* end confdefs.h. */
97bf5e38
MK
11322
11323#define _SYSCALL32
d30c5336
JK
11324/* Needed for new procfs interface on sparc-solaris. */
11325#define _STRUCTURED_PROC 1
97bf5e38 11326#include <sys/procfs.h>
bec39cab
AC
11327int
11328main ()
11329{
97bf5e38 11330pr_siginfo64_t avar
bec39cab
AC
11331 ;
11332 return 0;
11333}
11334_ACEOF
81ecdfbb 11335if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11336 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11337else
81ecdfbb 11338 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11339
97bf5e38 11340fi
81ecdfbb 11341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11342fi
c906108c 11343
97bf5e38 11344 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11345
81ecdfbb 11346$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11347
97bf5e38 11348 fi
81ecdfbb
RW
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11350$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11351
11352
97bf5e38
MK
11353
11354
11355
97bf5e38 11356 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11358$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11359 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11360 $as_echo_n "(cached) " >&6
c906108c 11361else
81ecdfbb 11362 if test "$cross_compiling" = yes; then :
97bf5e38 11363 gdb_cv_prfpregset_t_broken=yes
c906108c 11364else
81ecdfbb 11365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11366/* end confdefs.h. */
97bf5e38
MK
11367#include <sys/procfs.h>
11368 int main ()
11369 {
11370 if (sizeof (prfpregset_t) == sizeof (void *))
11371 return 1;
11372 return 0;
11373 }
bec39cab 11374_ACEOF
81ecdfbb 11375if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11376 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11377else
11378 gdb_cv_prfpregset_t_broken=yes
c906108c 11379fi
81ecdfbb
RW
11380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11381 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11382fi
81ecdfbb 11383
c906108c
SS
11384fi
11385
81ecdfbb
RW
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11387$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11388 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11389
81ecdfbb 11390$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11391
97bf5e38
MK
11392 fi
11393 fi
c906108c 11394
bec39cab 11395
81ecdfbb
RW
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11397$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11398 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11399 $as_echo_n "(cached) " >&6
c906108c 11400else
81ecdfbb 11401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11402/* end confdefs.h. */
97bf5e38
MK
11403#include <unistd.h>
11404#include <sys/types.h>
11405#include <sys/procfs.h>
11406
bec39cab
AC
11407int
11408main ()
11409{
97bf5e38
MK
11410
11411 int dummy;;
11412 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11413
11414 ;
11415 return 0;
11416}
11417_ACEOF
81ecdfbb 11418if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11419 gdb_cv_have_procfs_piocset=yes
c906108c 11420else
81ecdfbb 11421 gdb_cv_have_procfs_piocset=no
c906108c 11422fi
81ecdfbb 11423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11424fi
97bf5e38 11425
81ecdfbb
RW
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11427$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11428 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11429
81ecdfbb 11430$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11431
11432 fi
c906108c 11433fi
c906108c 11434
97bf5e38 11435if test ${host} = ${target} ; then
bec39cab 11436
81ecdfbb
RW
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11438$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11439 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11440 $as_echo_n "(cached) " >&6
bec39cab 11441else
81ecdfbb 11442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11443/* end confdefs.h. */
97bf5e38 11444#include <link.h>
bec39cab
AC
11445int
11446main ()
11447{
97bf5e38 11448struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11449 ;
11450 return 0;
11451}
11452_ACEOF
81ecdfbb 11453if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11454 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11455else
81ecdfbb 11456 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11457fi
81ecdfbb 11458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11459fi
11460
81ecdfbb
RW
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11462$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11463 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11464
81ecdfbb 11465$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11466
11467 fi
11468
bec39cab 11469
81ecdfbb
RW
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11471$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11472 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11473 $as_echo_n "(cached) " >&6
c906108c 11474else
81ecdfbb 11475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11476/* end confdefs.h. */
97bf5e38
MK
11477#include <sys/types.h>
11478#include <link.h>
bec39cab
AC
11479int
11480main ()
11481{
97bf5e38 11482struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11483 ;
11484 return 0;
11485}
11486_ACEOF
81ecdfbb 11487if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11488 gdb_cv_have_struct_link_map_with_lm_members=yes
11489else
81ecdfbb 11490 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11491fi
81ecdfbb 11492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11493fi
c906108c 11494
81ecdfbb
RW
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11496$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11497 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11498
81ecdfbb 11499$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11500
11501 fi
11502
bec39cab 11503
81ecdfbb
RW
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11505$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11506 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11507 $as_echo_n "(cached) " >&6
c906108c 11508else
81ecdfbb 11509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11510/* end confdefs.h. */
97bf5e38
MK
11511#include <sys/types.h>
11512#ifdef HAVE_NLIST_H
11513#include <nlist.h>
11514#endif
11515#include <link.h>
bec39cab
AC
11516int
11517main ()
11518{
97bf5e38 11519struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11520 ;
11521 return 0;
11522}
11523_ACEOF
81ecdfbb 11524if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11525 gdb_cv_have_struct_so_map_with_som_members=yes
11526else
81ecdfbb 11527 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11528fi
81ecdfbb 11529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11530fi
c906108c 11531
81ecdfbb
RW
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11533$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11534 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11535
81ecdfbb 11536$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11537
97bf5e38 11538 fi
c906108c 11539
bec39cab 11540
81ecdfbb
RW
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11542$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11543 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11544 $as_echo_n "(cached) " >&6
97bf5e38 11545else
81ecdfbb 11546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11547/* end confdefs.h. */
97bf5e38
MK
11548#define _SYSCALL32
11549#include <sys/link.h>
bec39cab
AC
11550int
11551main ()
11552{
97bf5e38 11553struct link_map32 l;
bec39cab
AC
11554 ;
11555 return 0;
11556}
11557_ACEOF
81ecdfbb 11558if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11559 gdb_cv_have_struct_link_map32=yes
11560else
81ecdfbb 11561 gdb_cv_have_struct_link_map32=no
97bf5e38 11562fi
81ecdfbb 11563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11564fi
c906108c 11565
81ecdfbb
RW
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11567$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11568 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11569
81ecdfbb 11570$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11571
60ca704f 11572
81ecdfbb 11573$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11574
97bf5e38
MK
11575 fi
11576fi
c906108c 11577
bc8bcb4b 11578# Check if the compiler supports the `long long' type.
c906108c 11579
81ecdfbb
RW
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11581$as_echo_n "checking for long long support in compiler... " >&6; }
11582if test "${gdb_cv_c_long_long+set}" = set; then :
11583 $as_echo_n "(cached) " >&6
97bf5e38 11584else
81ecdfbb 11585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11586/* end confdefs.h. */
bc8bcb4b 11587extern long long foo;
bec39cab
AC
11588int
11589main ()
11590{
bc8bcb4b 11591switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11592 ;
11593 return 0;
11594}
11595_ACEOF
81ecdfbb 11596if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11597 gdb_cv_c_long_long=yes
11598else
81ecdfbb 11599 gdb_cv_c_long_long=no
97bf5e38 11600fi
81ecdfbb 11601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11602fi
81ecdfbb
RW
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11604$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11605if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11606
81ecdfbb 11607$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11608
11609fi
11610
bc8bcb4b 11611# Check if the compiler and runtime support printing long longs.
97bf5e38 11612
81ecdfbb
RW
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11614$as_echo_n "checking for long long support in printf... " >&6; }
11615if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11616 $as_echo_n "(cached) " >&6
97bf5e38 11617else
81ecdfbb 11618 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11619 gdb_cv_printf_has_long_long=no
11620else
81ecdfbb 11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11622/* end confdefs.h. */
bc8bcb4b
MK
11623$ac_includes_default
11624int
11625main ()
11626{
11627char buf[32];
97bf5e38
MK
11628 long long l = 0;
11629 l = (l << 16) + 0x0123;
11630 l = (l << 16) + 0x4567;
11631 l = (l << 16) + 0x89ab;
11632 l = (l << 16) + 0xcdef;
11633 sprintf (buf, "0x%016llx", l);
11634 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11635 ;
11636 return 0;
c906108c 11637}
bec39cab 11638_ACEOF
81ecdfbb 11639if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11640 gdb_cv_printf_has_long_long=yes
11641else
81ecdfbb 11642 gdb_cv_printf_has_long_long=no
97bf5e38 11643fi
81ecdfbb
RW
11644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11645 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11646fi
81ecdfbb 11647
97bf5e38 11648fi
81ecdfbb
RW
11649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11650$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11651if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11652
81ecdfbb 11653$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11654
11655fi
97bf5e38 11656
1a619819
LM
11657# Check if the compiler and runtime support printing decfloats.
11658
81ecdfbb
RW
11659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11660$as_echo_n "checking for decfloat support in printf... " >&6; }
11661if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11662 $as_echo_n "(cached) " >&6
1a619819 11663else
81ecdfbb 11664 if test "$cross_compiling" = yes; then :
1a619819
LM
11665 gdb_cv_printf_has_decfloat=no
11666else
81ecdfbb 11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11668/* end confdefs.h. */
11669$ac_includes_default
11670int
11671main ()
11672{
11673char buf[64];
11674 _Decimal32 d32 = 1.2345df;
11675 _Decimal64 d64 = 1.2345dd;
11676 _Decimal128 d128 = 1.2345dl;
11677 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11678 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11679 ;
11680 return 0;
11681}
11682_ACEOF
81ecdfbb 11683if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11684 gdb_cv_printf_has_decfloat=yes
11685else
81ecdfbb 11686 gdb_cv_printf_has_decfloat=no
1a619819 11687fi
81ecdfbb
RW
11688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11690fi
81ecdfbb 11691
1a619819 11692fi
81ecdfbb
RW
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11694$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11695if test $gdb_cv_printf_has_decfloat = yes; then
11696
81ecdfbb 11697$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11698
11699fi
11700
bc8bcb4b
MK
11701# Check if the compiler supports the `long double' type. We can't use
11702# AC_C_LONG_DOUBLE because that one does additional checks on the
11703# constants defined in <float.h> that fail on some systems,
11704# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11705
81ecdfbb
RW
11706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11707$as_echo_n "checking for long double support in compiler... " >&6; }
11708if test "${gdb_cv_c_long_double+set}" = set; then :
11709 $as_echo_n "(cached) " >&6
97bf5e38 11710else
81ecdfbb 11711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11712/* end confdefs.h. */
97bf5e38 11713long double foo;
bec39cab 11714_ACEOF
81ecdfbb 11715if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11716 gdb_cv_c_long_double=yes
97bf5e38 11717else
81ecdfbb 11718 gdb_cv_c_long_double=no
97bf5e38 11719fi
81ecdfbb 11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11721fi
81ecdfbb
RW
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11723$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11724if test $gdb_cv_c_long_double = yes; then
c906108c 11725
81ecdfbb 11726$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11727
11728fi
11729
bc8bcb4b 11730# Check if the compiler and runtime support printing long doubles.
97bf5e38 11731
81ecdfbb
RW
11732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11733$as_echo_n "checking for long double support in printf... " >&6; }
11734if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11735 $as_echo_n "(cached) " >&6
97bf5e38 11736else
81ecdfbb 11737 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11738 gdb_cv_printf_has_long_double=no
11739else
81ecdfbb 11740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11741/* end confdefs.h. */
bc8bcb4b
MK
11742$ac_includes_default
11743int
11744main ()
11745{
11746char buf[16];
97bf5e38
MK
11747 long double f = 3.141592653;
11748 sprintf (buf, "%Lg", f);
11749 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11750 ;
11751 return 0;
97bf5e38 11752}
bec39cab 11753_ACEOF
81ecdfbb 11754if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11755 gdb_cv_printf_has_long_double=yes
c906108c 11756else
81ecdfbb 11757 gdb_cv_printf_has_long_double=no
c906108c 11758fi
81ecdfbb
RW
11759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11760 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11761fi
81ecdfbb 11762
c906108c 11763fi
81ecdfbb
RW
11764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11765$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11766if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11767
81ecdfbb 11768$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11769
11770fi
97bf5e38 11771
bc8bcb4b 11772# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11773
81ecdfbb
RW
11774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11775$as_echo_n "checking for long double support in scanf... " >&6; }
11776if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11777 $as_echo_n "(cached) " >&6
97bf5e38 11778else
81ecdfbb 11779 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11780 gdb_cv_scanf_has_long_double=no
11781else
81ecdfbb 11782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11783/* end confdefs.h. */
bc8bcb4b
MK
11784#include <stdio.h>
11785int
11786main ()
11787{
11788char *buf = "3.141592653";
97bf5e38
MK
11789 long double f = 0;
11790 sscanf (buf, "%Lg", &f);
11791 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11792 ;
11793 return 0;
97bf5e38 11794}
bec39cab 11795_ACEOF
81ecdfbb 11796if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11797 gdb_cv_scanf_has_long_double=yes
11798else
81ecdfbb 11799 gdb_cv_scanf_has_long_double=no
97bf5e38 11800fi
81ecdfbb
RW
11801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11802 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11803fi
81ecdfbb 11804
c906108c 11805fi
81ecdfbb
RW
11806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11807$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11808if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11809
81ecdfbb 11810$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11811
11812fi
c906108c 11813
438013df
AO
11814case ${host_os} in
11815aix*)
81ecdfbb
RW
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11817$as_echo_n "checking for -bbigtoc option... " >&6; }
11818if test "${gdb_cv_bigtoc+set}" = set; then :
11819 $as_echo_n "(cached) " >&6
438013df 11820else
bec39cab 11821
438013df
AO
11822 SAVE_LDFLAGS=$LDFLAGS
11823
11824 case $GCC in
11825 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11826 *) gdb_cv_bigtoc=-bbigtoc ;;
11827 esac
11828
11829 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11831/* end confdefs.h. */
438013df 11832
bec39cab
AC
11833int
11834main ()
11835{
438013df 11836int i;
bec39cab
AC
11837 ;
11838 return 0;
11839}
11840_ACEOF
81ecdfbb 11841if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11842
81ecdfbb
RW
11843else
11844 gdb_cv_bigtoc=
438013df 11845fi
81ecdfbb
RW
11846rm -f core conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11848 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11849
bec39cab 11850fi
81ecdfbb
RW
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11852$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11853 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11854 ;;
11855esac
11856
38f6b338 11857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11858$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11859dynamic_list=false
11860if test "${gdb_native}" = yes; then
11861 # The dynamically loaded libthread_db needs access to symbols in the gdb
11862 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11863 # may not be supported there.
11864 old_LDFLAGS="$LDFLAGS"
11865 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11866 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11867 LDFLAGS="$LDFLAGS $RDYNAMIC"
11868 if test "${have_libpython}" = no; then
11869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11870/* end confdefs.h. */
11871
11872int
11873main ()
11874{
11875
11876 ;
11877 return 0;
11878}
11879_ACEOF
11880if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11881 dynamic_list=true
11882fi
11883rm -f core conftest.err conftest.$ac_objext \
11884 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11885 else
11886 # Workaround http://bugs.python.org/issue4434 where static
11887 # libpythonX.Y.a would get its symbols required for
11888 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11889 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11890 old_CFLAGS="$CFLAGS"
11891 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11892 if test "$cross_compiling" = yes; then :
3bebe2f2 11893 true
f6528abd 11894else
3bebe2f2
JK
11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11896/* end confdefs.h. */
11897#include "${have_libpython}/Python.h"
11898int
11899main ()
11900{
11901int err;
38f6b338
JK
11902 Py_Initialize ();
11903 err = PyRun_SimpleString ("import itertools\n");
11904 Py_Finalize ();
11905 return err == 0 ? 0 : 1;
3bebe2f2
JK
11906 ;
11907 return 0;
11908}
11909_ACEOF
11910if ac_fn_c_try_run "$LINENO"; then :
11911 dynamic_list=true
11912fi
11913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11914 conftest.$ac_objext conftest.beam conftest.$ac_ext
11915fi
11916
38f6b338
JK
11917 CFLAGS="$old_CFLAGS"
11918 fi
11919 LDFLAGS="$old_LDFLAGS"
11920fi
11921if $dynamic_list; then
11922 found="-Wl,--dynamic-list"
11923 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11924else
38f6b338
JK
11925 found="-rdynamic"
11926 RDYNAMIC="-rdynamic"
f6528abd 11927fi
f6528abd 11928
38f6b338 11929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11930$as_echo "$found" >&6; }
0407b3f1 11931
f6528abd 11932
0407b3f1 11933if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11934 case ${host_os} in
c906108c 11935 solaris*)
d92419e5
JB
11936 # See if thread_db library is around for Solaris thread debugging.
11937 # Note that we must explicitly test for version 1 of the library
11938 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11939 # the same API.
81ecdfbb
RW
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11941$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11942 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11944$as_echo "yes" >&6; }
60ca704f 11945
81ecdfbb 11946$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11947
3483b318 11948 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11949 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
43c75337
JB
11950 # On SPARC CPUs, we also need to build sparc-sol-thread.
11951 case ${host_cpu} in
11952 sparc*)
11953 CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o"
11954 CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c"
11955 ;;
11956 esac
81ecdfbb
RW
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11958$as_echo_n "checking for dlopen in -ldl... " >&6; }
11959if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11960 $as_echo_n "(cached) " >&6
c906108c 11961else
bec39cab 11962 ac_check_lib_save_LIBS=$LIBS
c906108c 11963LIBS="-ldl $LIBS"
81ecdfbb 11964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11965/* end confdefs.h. */
11966
81ecdfbb
RW
11967/* Override any GCC internal prototype to avoid an error.
11968 Use char because int might match the return type of a GCC
11969 builtin and then its argument prototype would still apply. */
bec39cab
AC
11970#ifdef __cplusplus
11971extern "C"
11972#endif
bec39cab
AC
11973char dlopen ();
11974int
11975main ()
11976{
81ecdfbb 11977return dlopen ();
bec39cab
AC
11978 ;
11979 return 0;
11980}
11981_ACEOF
81ecdfbb 11982if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11983 ac_cv_lib_dl_dlopen=yes
11984else
81ecdfbb 11985 ac_cv_lib_dl_dlopen=no
bec39cab 11986fi
81ecdfbb
RW
11987rm -f core conftest.err conftest.$ac_objext \
11988 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11989LIBS=$ac_check_lib_save_LIBS
11990fi
81ecdfbb
RW
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11992$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11993if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11994 cat >>confdefs.h <<_ACEOF
11995#define HAVE_LIBDL 1
11996_ACEOF
c906108c
SS
11997
11998 LIBS="-ldl $LIBS"
11999
c906108c
SS
12000fi
12001
f6528abd 12002 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12003 # Sun randomly tweaked the prototypes in <proc_service.h>
12004 # at one point.
81ecdfbb
RW
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12006$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12007 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12008 $as_echo_n "(cached) " >&6
c906108c 12009else
bec39cab 12010
81ecdfbb 12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12012/* end confdefs.h. */
c906108c
SS
12013
12014 #include <proc_service.h>
12015 ps_err_e ps_pdwrite
12016 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12017
bec39cab
AC
12018int
12019main ()
12020{
12021
12022 ;
12023 return 0;
12024}
12025_ACEOF
81ecdfbb 12026if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12027 gdb_cv_proc_service_is_old=no
12028else
81ecdfbb 12029 gdb_cv_proc_service_is_old=yes
c906108c 12030fi
81ecdfbb 12031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12032
c906108c
SS
12033fi
12034
81ecdfbb
RW
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12036$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12037 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12038
81ecdfbb 12039$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12040
12041 fi
12042 else
81ecdfbb
RW
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12044$as_echo "no" >&6; }
c906108c
SS
12045 fi
12046 ;;
d92419e5 12047 aix*)
81ecdfbb
RW
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12049$as_echo_n "checking for AiX thread debugging library... " >&6; }
12050 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12051 $as_echo_n "(cached) " >&6
bec39cab 12052else
81ecdfbb 12053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12054/* end confdefs.h. */
d92419e5 12055#include <sys/pthdebug.h>
bec39cab
AC
12056int
12057main ()
12058{
d92419e5
JB
12059#ifndef PTHDB_VERSION_3
12060 #error
12061 #endif
bec39cab
AC
12062 ;
12063 return 0;
12064}
12065_ACEOF
81ecdfbb 12066if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12067 gdb_cv_have_aix_thread_debug=yes
12068else
81ecdfbb 12069 gdb_cv_have_aix_thread_debug=no
d92419e5 12070fi
81ecdfbb 12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12072fi
12073
81ecdfbb
RW
12074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12075$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12076 if test $gdb_cv_have_aix_thread_debug = yes; then
12077 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12078 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12079 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12080
12081 # Older versions of AIX do not provide the declaration for
12082 # the getthrds function (it appears that it was introduced
12083 # with AIX 6.x).
12084 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12085"
12086if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12087 ac_have_decl=1
12088else
12089 ac_have_decl=0
12090fi
12091
12092cat >>confdefs.h <<_ACEOF
12093#define HAVE_DECL_GETTHRDS $ac_have_decl
12094_ACEOF
12095
d92419e5
JB
12096 fi
12097 ;;
c906108c 12098 esac
bec39cab 12099
c906108c
SS
12100fi
12101
3f47be5c 12102if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12104$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12105if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12106 $as_echo_n "(cached) " >&6
bec39cab 12107else
81ecdfbb 12108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12109/* end confdefs.h. */
3f47be5c 12110#include <thread_db.h>
bec39cab
AC
12111int
12112main ()
12113{
3f47be5c 12114int i = TD_NOTALLOC;
bec39cab
AC
12115 ;
12116 return 0;
12117}
12118_ACEOF
81ecdfbb 12119if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12120 gdb_cv_thread_db_h_has_td_notalloc=yes
12121else
81ecdfbb 12122 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12123
3f47be5c 12124fi
81ecdfbb 12125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12126
bec39cab 12127fi
81ecdfbb
RW
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12129$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12131$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12132if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12133 $as_echo_n "(cached) " >&6
59f80f10 12134else
81ecdfbb 12135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12136/* end confdefs.h. */
12137#include <thread_db.h>
12138int
12139main ()
12140{
12141int i = TD_VERSION;
12142 ;
12143 return 0;
12144}
12145_ACEOF
81ecdfbb 12146if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12147 gdb_cv_thread_db_h_has_td_version=yes
12148else
81ecdfbb 12149 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12150
12151fi
81ecdfbb 12152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12153
12154fi
81ecdfbb
RW
12155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12156$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12158$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12159if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12160 $as_echo_n "(cached) " >&6
59f80f10 12161else
81ecdfbb 12162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12163/* end confdefs.h. */
12164#include <thread_db.h>
12165int
12166main ()
12167{
12168int i = TD_NOTLS;
12169 ;
12170 return 0;
12171}
12172_ACEOF
81ecdfbb 12173if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12174 gdb_cv_thread_db_h_has_td_notls=yes
12175else
81ecdfbb 12176 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12177
12178fi
81ecdfbb 12179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12180
12181fi
81ecdfbb
RW
12182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12183$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12184fi
12185if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12186
81ecdfbb 12187$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12188
59f80f10
DJ
12189fi
12190if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12191
81ecdfbb 12192$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12193
12194fi
12195if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12196
81ecdfbb 12197$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12198
3f47be5c
EZ
12199fi
12200
b757528f 12201if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12203$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12204if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12205 $as_echo_n "(cached) " >&6
bec39cab 12206else
81ecdfbb 12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12208/* end confdefs.h. */
b757528f 12209#include <sys/syscall.h>
bec39cab
AC
12210int
12211main ()
12212{
b757528f 12213int i = __NR_tkill;
bec39cab
AC
12214 ;
12215 return 0;
12216}
12217_ACEOF
81ecdfbb 12218if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12219 gdb_cv_sys_syscall_h_has_tkill=yes
12220else
81ecdfbb 12221 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12222
b757528f 12223fi
81ecdfbb 12224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12225
bec39cab 12226fi
81ecdfbb
RW
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12228$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12229fi
12230if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12231
81ecdfbb 12232$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12233
12234fi
12235
81ecdfbb
RW
12236ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12237"
12238if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12239 ac_have_decl=1
10568435 12240else
81ecdfbb 12241 ac_have_decl=0
10568435 12242fi
10568435
JK
12243
12244cat >>confdefs.h <<_ACEOF
81ecdfbb 12245#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12246_ACEOF
12247
12248
81ecdfbb
RW
12249if test "$cross_compiling" = yes; then :
12250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12251/* end confdefs.h. */
12252#include <sys/personality.h>
12253int
12254main ()
12255{
12256
12257# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12258# define ADDR_NO_RANDOMIZE 0x0040000
12259# endif
12260 /* Test the flag could be set and stays set. */
12261 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12262 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12263 return 1
12264 ;
12265 return 0;
12266}
12267_ACEOF
81ecdfbb 12268if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12269 have_personality=true
12270else
81ecdfbb 12271 have_personality=false
10568435 12272fi
81ecdfbb
RW
12273rm -f core conftest.err conftest.$ac_objext \
12274 conftest$ac_exeext conftest.$ac_ext
10568435 12275else
81ecdfbb 12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12277/* end confdefs.h. */
12278#include <sys/personality.h>
12279int
12280main ()
12281{
12282
12283# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12284# define ADDR_NO_RANDOMIZE 0x0040000
12285# endif
12286 /* Test the flag could be set and stays set. */
12287 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12288 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12289 return 1
12290 ;
12291 return 0;
12292}
12293_ACEOF
81ecdfbb 12294if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12295 have_personality=true
12296else
81ecdfbb 12297 have_personality=false
10568435 12298fi
81ecdfbb
RW
12299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12300 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12301fi
81ecdfbb 12302
10568435
JK
12303if $have_personality
12304then
12305
81ecdfbb 12306$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12307
12308fi
12309
fb40c209 12310
f83d8a90
DE
12311# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12312# except that the argument to --with-sysroot is optional.
12313# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12314if test "x$with_sysroot" = xyes; then
12315 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12316fi
bec39cab 12317
81ecdfbb
RW
12318# Check whether --with-sysroot was given.
12319if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12320 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12321else
12322 TARGET_SYSTEM_ROOT=
12323fi
030292b7 12324
030292b7 12325
f83d8a90
DE
12326 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12327 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12328 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12329 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12330
f83d8a90
DE
12331cat >>confdefs.h <<_ACEOF
12332#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12333_ACEOF
bec39cab 12334
030292b7 12335
b14b1491 12336
f83d8a90
DE
12337
12338 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12339 if test "x$prefix" = xNONE; then
12340 test_prefix=/usr/local
12341 else
12342 test_prefix=$prefix
12343 fi
12344 else
12345 test_prefix=$exec_prefix
12346 fi
12347 value=0
12348 case ${ac_define_dir} in
12349 "${test_prefix}"|"${test_prefix}/"*|\
12350 '${exec_prefix}'|'${exec_prefix}/'*)
12351 value=1
12352 ;;
12353 esac
12354
12355cat >>confdefs.h <<_ACEOF
12356#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12357_ACEOF
030292b7
DJ
12358
12359
12360
16e7150e 12361
16e7150e 12362
81ecdfbb
RW
12363# Check whether --with-system-gdbinit was given.
12364if test "${with_system_gdbinit+set}" = set; then :
12365 withval=$with_system_gdbinit;
b14b1491
TT
12366 SYSTEM_GDBINIT=$withval
12367else
12368 SYSTEM_GDBINIT=
81ecdfbb
RW
12369fi
12370
16e7150e
JG
12371
12372 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12373 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12374 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12375 ac_define_dir=`eval echo $ac_define_dir`
12376
12377cat >>confdefs.h <<_ACEOF
12378#define SYSTEM_GDBINIT "$ac_define_dir"
12379_ACEOF
12380
12381
12382
0c4a4063 12383
b14b1491
TT
12384 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12385 if test "x$prefix" = xNONE; then
12386 test_prefix=/usr/local
12387 else
12388 test_prefix=$prefix
12389 fi
12390 else
12391 test_prefix=$exec_prefix
12392 fi
12393 value=0
12394 case ${ac_define_dir} in
12395 "${test_prefix}"|"${test_prefix}/"*|\
12396 '${exec_prefix}'|'${exec_prefix}/'*)
12397 value=1
12398 ;;
12399 esac
16e7150e 12400
b14b1491
TT
12401cat >>confdefs.h <<_ACEOF
12402#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12403_ACEOF
12404
b14b1491 12405
16e7150e 12406
0c4a4063 12407
81ecdfbb
RW
12408# Check whether --enable-werror was given.
12409if test "${enable_werror+set}" = set; then :
12410 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12411 yes | y) ERROR_ON_WARNING="yes" ;;
12412 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12413 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12414 esac
81ecdfbb
RW
12415fi
12416
094a342e 12417
a68ffae9
JK
12418# Enable -Werror by default when using gcc. Turn it off for releases.
12419if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12420 ERROR_ON_WARNING=yes
12421fi
12422
12423WERROR_CFLAGS=""
12424if test "${ERROR_ON_WARNING}" = yes ; then
12425 WERROR_CFLAGS="-Werror"
12426fi
12427
aa79a185
DJ
12428# The entries after -Wno-pointer-sign are disabled warnings which may
12429# be enabled in the future, which can not currently be used to build
12430# GDB.
12431# NOTE: If you change this list, remember to update
3b851bce 12432# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12433build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12434-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12435-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12436-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
d4fb63e1 12437-Wdeclaration-after-statement -Wempty-body"
a3b362c4 12438
3526781e
DJ
12439# Enable -Wno-format by default when using gcc on mingw since many
12440# GCC versions complain about %I64.
12441case "${host}" in
12442 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12443esac
12444
81ecdfbb
RW
12445# Check whether --enable-build-warnings was given.
12446if test "${enable_build_warnings+set}" = set; then :
12447 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12448 yes) ;;
12449 no) build_warnings="-w";;
12450 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12451 build_warnings="${build_warnings} ${t}";;
12452 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12453 build_warnings="${t} ${build_warnings}";;
12454 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12455esac
d4f3574e 12456if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12457 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12458fi
81ecdfbb
RW
12459fi
12460# Check whether --enable-gdb-build-warnings was given.
12461if test "${enable_gdb_build_warnings+set}" = set; then :
12462 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12463 yes) ;;
12464 no) build_warnings="-w";;
12465 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12466 build_warnings="${build_warnings} ${t}";;
12467 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12468 build_warnings="${t} ${build_warnings}";;
12469 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12470esac
12471if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12472 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12473fi
81ecdfbb
RW
12474fi
12475WARN_CFLAGS=""
c906108c
SS
12476if test "x${build_warnings}" != x -a "x$GCC" = xyes
12477then
81ecdfbb
RW
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12479$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12480 # Separate out the -Werror flag as some files just cannot be
12481 # compiled with it enabled.
12482 for w in ${build_warnings}; do
12483 case $w in
12484 -Werr*) WERROR_CFLAGS=-Werror ;;
12485 *) # Check that GCC accepts it
4536bbc6
AC
12486 saved_CFLAGS="$CFLAGS"
12487 CFLAGS="$CFLAGS $w"
81ecdfbb 12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12489/* end confdefs.h. */
4536bbc6 12490
bec39cab
AC
12491int
12492main ()
12493{
4536bbc6 12494
bec39cab
AC
12495 ;
12496 return 0;
12497}
12498_ACEOF
81ecdfbb 12499if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12500 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12501fi
81ecdfbb 12502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12503 CFLAGS="$saved_CFLAGS"
746a987d
AC
12504 esac
12505 done
81ecdfbb
RW
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12507$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12508fi
12509
12510
104c1213 12511
7a292a7a 12512# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12514$as_echo_n "checking for cygwin... " >&6; }
12515if test "${gdb_cv_os_cygwin+set}" = set; then :
12516 $as_echo_n "(cached) " >&6
bec39cab 12517else
81ecdfbb 12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12519/* end confdefs.h. */
7a292a7a
SS
12520
12521#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12522lose
12523#endif
bec39cab 12524_ACEOF
7a292a7a 12525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12526 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12527 gdb_cv_os_cygwin=yes
12528else
7a292a7a
SS
12529 gdb_cv_os_cygwin=no
12530fi
12531rm -f conftest*
12532
12533fi
81ecdfbb
RW
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12535$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12536
aff38e61 12537
3eb25fda 12538SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12539case ${host} in
95cbc983
AC
12540 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12541 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12542 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12543esac
12544
12545
cd0fc7c3
SS
12546# libreadline needs libuser32.a in a cygwin environment
12547WIN32LIBS=
12548if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12549 WIN32LIBS="-luser32"
12550 case "${target}" in
12551 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12552 ;;
12553 esac
cd0fc7c3 12554fi
c906108c 12555
b4505029
MM
12556# The ser-tcp.c module requires sockets.
12557case ${host} in
12558 *mingw32*)
12559
81ecdfbb 12560$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12561
12562 WIN32LIBS="$WIN32LIBS -lws2_32"
12563 ;;
12564esac
12565
7a292a7a 12566
31d99776
DJ
12567# Add ELF support to GDB, but only if BFD includes ELF support.
12568OLD_CFLAGS=$CFLAGS
12569OLD_LDFLAGS=$LDFLAGS
12570OLD_LIBS=$LIBS
12cd34f3
PA
12571# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12572# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12573# always want our bfd.
12574CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12575LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12576intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12577# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12578if test "$plugins" = "yes"; then
12579 LIBS="-ldl $LIBS"
12580fi
0f72fb1c 12581LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12583$as_echo_n "checking for ELF support in BFD... " >&6; }
12584if test "${gdb_cv_var_elf+set}" = set; then :
12585 $as_echo_n "(cached) " >&6
31d99776 12586else
81ecdfbb 12587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12588/* end confdefs.h. */
12589#include <stdlib.h>
12590#include "bfd.h"
12591#include "elf-bfd.h"
12592
12593int
12594main ()
12595{
12596bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12597 ;
12598 return 0;
12599}
12600_ACEOF
81ecdfbb 12601if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12602 gdb_cv_var_elf=yes
12603else
81ecdfbb 12604 gdb_cv_var_elf=no
31d99776 12605fi
81ecdfbb
RW
12606rm -f core conftest.err conftest.$ac_objext \
12607 conftest$ac_exeext conftest.$ac_ext
31d99776 12608fi
81ecdfbb
RW
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12610$as_echo "$gdb_cv_var_elf" >&6; }
31d99776 12611if test $gdb_cv_var_elf = yes; then
55aa24fb 12612 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12613
81ecdfbb 12614$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12615
075ff26d
JK
12616 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12617 if test "$plugins" = "yes"; then
12618 OLD_LIBS="-ldl $OLD_LIBS"
12619 fi
31d99776
DJ
12620fi
12621CFLAGS=$OLD_CFLAGS
12622LDFLAGS=$OLD_LDFLAGS
12623LIBS=$OLD_LIBS
12624
121ce6e5
DJ
12625# Add any host-specific objects to GDB.
12626CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12627
608e2dbb
TT
12628# If building on ELF, look for lzma support for embedded compressed debug info.
12629if test $gdb_cv_var_elf = yes; then
12630
12631# Check whether --with-lzma was given.
12632if test "${with_lzma+set}" = set; then :
12633 withval=$with_lzma;
12634else
12635 with_lzma=auto
12636fi
12637
12638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
12639$as_echo_n "checking whether to use lzma... " >&6; }
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
12641$as_echo "$with_lzma" >&6; }
12642
12643 if test "${with_lzma}" != no; then
12644
12645
12646
12647
12648
12649
12650
12651
12652 use_additional=yes
12653
12654 acl_save_prefix="$prefix"
12655 prefix="$acl_final_prefix"
12656 acl_save_exec_prefix="$exec_prefix"
12657 exec_prefix="$acl_final_exec_prefix"
12658
12659 eval additional_includedir=\"$includedir\"
12660 eval additional_libdir=\"$libdir\"
12661
12662 exec_prefix="$acl_save_exec_prefix"
12663 prefix="$acl_save_prefix"
12664
12665
12666# Check whether --with-liblzma-prefix was given.
12667if test "${with_liblzma_prefix+set}" = set; then :
12668 withval=$with_liblzma_prefix;
12669 if test "X$withval" = "Xno"; then
12670 use_additional=no
12671 else
12672 if test "X$withval" = "X"; then
12673
12674 acl_save_prefix="$prefix"
12675 prefix="$acl_final_prefix"
12676 acl_save_exec_prefix="$exec_prefix"
12677 exec_prefix="$acl_final_exec_prefix"
12678
12679 eval additional_includedir=\"$includedir\"
12680 eval additional_libdir=\"$libdir\"
12681
12682 exec_prefix="$acl_save_exec_prefix"
12683 prefix="$acl_save_prefix"
12684
12685 else
12686 additional_includedir="$withval/include"
12687 additional_libdir="$withval/lib"
12688 fi
12689 fi
12690
12691fi
12692
12693 LIBLZMA=
12694 LTLIBLZMA=
12695 INCLZMA=
12696 rpathdirs=
12697 ltrpathdirs=
12698 names_already_handled=
12699 names_next_round='lzma '
12700 while test -n "$names_next_round"; do
12701 names_this_round="$names_next_round"
12702 names_next_round=
12703 for name in $names_this_round; do
12704 already_handled=
12705 for n in $names_already_handled; do
12706 if test "$n" = "$name"; then
12707 already_handled=yes
12708 break
12709 fi
12710 done
12711 if test -z "$already_handled"; then
12712 names_already_handled="$names_already_handled $name"
12713 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12714 eval value=\"\$HAVE_LIB$uppername\"
12715 if test -n "$value"; then
12716 if test "$value" = yes; then
12717 eval value=\"\$LIB$uppername\"
12718 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
12719 eval value=\"\$LTLIB$uppername\"
12720 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
12721 else
12722 :
12723 fi
12724 else
12725 found_dir=
12726 found_la=
12727 found_so=
12728 found_a=
12729 if test $use_additional = yes; then
12730 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
12731 found_dir="$additional_libdir"
12732 found_so="$additional_libdir/lib$name.$shlibext"
12733 if test -f "$additional_libdir/lib$name.la"; then
12734 found_la="$additional_libdir/lib$name.la"
12735 fi
12736 else
12737 if test -f "$additional_libdir/lib$name.$libext"; then
12738 found_dir="$additional_libdir"
12739 found_a="$additional_libdir/lib$name.$libext"
12740 if test -f "$additional_libdir/lib$name.la"; then
12741 found_la="$additional_libdir/lib$name.la"
12742 fi
12743 fi
12744 fi
12745 fi
12746 if test "X$found_dir" = "X"; then
12747 for x in $LDFLAGS $LTLIBLZMA; do
12748
12749 acl_save_prefix="$prefix"
12750 prefix="$acl_final_prefix"
12751 acl_save_exec_prefix="$exec_prefix"
12752 exec_prefix="$acl_final_exec_prefix"
12753 eval x=\"$x\"
12754 exec_prefix="$acl_save_exec_prefix"
12755 prefix="$acl_save_prefix"
12756
12757 case "$x" in
12758 -L*)
12759 dir=`echo "X$x" | sed -e 's/^X-L//'`
12760 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
12761 found_dir="$dir"
12762 found_so="$dir/lib$name.$shlibext"
12763 if test -f "$dir/lib$name.la"; then
12764 found_la="$dir/lib$name.la"
12765 fi
12766 else
12767 if test -f "$dir/lib$name.$libext"; then
12768 found_dir="$dir"
12769 found_a="$dir/lib$name.$libext"
12770 if test -f "$dir/lib$name.la"; then
12771 found_la="$dir/lib$name.la"
12772 fi
12773 fi
12774 fi
12775 ;;
12776 esac
12777 if test "X$found_dir" != "X"; then
12778 break
12779 fi
12780 done
12781 fi
12782 if test "X$found_dir" != "X"; then
12783 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
12784 if test "X$found_so" != "X"; then
12785 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12786 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12787 else
12788 haveit=
12789 for x in $ltrpathdirs; do
12790 if test "X$x" = "X$found_dir"; then
12791 haveit=yes
12792 break
12793 fi
12794 done
12795 if test -z "$haveit"; then
12796 ltrpathdirs="$ltrpathdirs $found_dir"
12797 fi
12798 if test "$hardcode_direct" = yes; then
12799 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12800 else
12801 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12803 haveit=
12804 for x in $rpathdirs; do
12805 if test "X$x" = "X$found_dir"; then
12806 haveit=yes
12807 break
12808 fi
12809 done
12810 if test -z "$haveit"; then
12811 rpathdirs="$rpathdirs $found_dir"
12812 fi
12813 else
12814 haveit=
12815 for x in $LDFLAGS $LIBLZMA; do
12816
12817 acl_save_prefix="$prefix"
12818 prefix="$acl_final_prefix"
12819 acl_save_exec_prefix="$exec_prefix"
12820 exec_prefix="$acl_final_exec_prefix"
12821 eval x=\"$x\"
12822 exec_prefix="$acl_save_exec_prefix"
12823 prefix="$acl_save_prefix"
12824
12825 if test "X$x" = "X-L$found_dir"; then
12826 haveit=yes
12827 break
12828 fi
12829 done
12830 if test -z "$haveit"; then
12831 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
12832 fi
12833 if test "$hardcode_minus_L" != no; then
12834 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12835 else
12836 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
12837 fi
12838 fi
12839 fi
12840 fi
12841 else
12842 if test "X$found_a" != "X"; then
12843 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
12844 else
12845 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
12846 fi
12847 fi
12848 additional_includedir=
12849 case "$found_dir" in
12850 */lib | */lib/)
12851 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12852 additional_includedir="$basedir/include"
12853 ;;
12854 esac
12855 if test "X$additional_includedir" != "X"; then
12856 if test "X$additional_includedir" != "X/usr/include"; then
12857 haveit=
12858 if test "X$additional_includedir" = "X/usr/local/include"; then
12859 if test -n "$GCC"; then
12860 case $host_os in
12861 linux*) haveit=yes;;
12862 esac
12863 fi
12864 fi
12865 if test -z "$haveit"; then
12866 for x in $CPPFLAGS $INCLZMA; do
12867
12868 acl_save_prefix="$prefix"
12869 prefix="$acl_final_prefix"
12870 acl_save_exec_prefix="$exec_prefix"
12871 exec_prefix="$acl_final_exec_prefix"
12872 eval x=\"$x\"
12873 exec_prefix="$acl_save_exec_prefix"
12874 prefix="$acl_save_prefix"
12875
12876 if test "X$x" = "X-I$additional_includedir"; then
12877 haveit=yes
12878 break
12879 fi
12880 done
12881 if test -z "$haveit"; then
12882 if test -d "$additional_includedir"; then
12883 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
12884 fi
12885 fi
12886 fi
12887 fi
12888 fi
12889 if test -n "$found_la"; then
12890 save_libdir="$libdir"
12891 case "$found_la" in
12892 */* | *\\*) . "$found_la" ;;
12893 *) . "./$found_la" ;;
12894 esac
12895 libdir="$save_libdir"
12896 for dep in $dependency_libs; do
12897 case "$dep" in
12898 -L*)
12899 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12900 if test "X$additional_libdir" != "X/usr/lib"; then
12901 haveit=
12902 if test "X$additional_libdir" = "X/usr/local/lib"; then
12903 if test -n "$GCC"; then
12904 case $host_os in
12905 linux*) haveit=yes;;
12906 esac
12907 fi
12908 fi
12909 if test -z "$haveit"; then
12910 haveit=
12911 for x in $LDFLAGS $LIBLZMA; do
12912
12913 acl_save_prefix="$prefix"
12914 prefix="$acl_final_prefix"
12915 acl_save_exec_prefix="$exec_prefix"
12916 exec_prefix="$acl_final_exec_prefix"
12917 eval x=\"$x\"
12918 exec_prefix="$acl_save_exec_prefix"
12919 prefix="$acl_save_prefix"
12920
12921 if test "X$x" = "X-L$additional_libdir"; then
12922 haveit=yes
12923 break
12924 fi
12925 done
12926 if test -z "$haveit"; then
12927 if test -d "$additional_libdir"; then
12928 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
12929 fi
12930 fi
12931 haveit=
12932 for x in $LDFLAGS $LTLIBLZMA; do
12933
12934 acl_save_prefix="$prefix"
12935 prefix="$acl_final_prefix"
12936 acl_save_exec_prefix="$exec_prefix"
12937 exec_prefix="$acl_final_exec_prefix"
12938 eval x=\"$x\"
12939 exec_prefix="$acl_save_exec_prefix"
12940 prefix="$acl_save_prefix"
12941
12942 if test "X$x" = "X-L$additional_libdir"; then
12943 haveit=yes
12944 break
12945 fi
12946 done
12947 if test -z "$haveit"; then
12948 if test -d "$additional_libdir"; then
12949 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
12950 fi
12951 fi
12952 fi
12953 fi
12954 ;;
12955 -R*)
12956 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12957 if test "$enable_rpath" != no; then
12958 haveit=
12959 for x in $rpathdirs; do
12960 if test "X$x" = "X$dir"; then
12961 haveit=yes
12962 break
12963 fi
12964 done
12965 if test -z "$haveit"; then
12966 rpathdirs="$rpathdirs $dir"
12967 fi
12968 haveit=
12969 for x in $ltrpathdirs; do
12970 if test "X$x" = "X$dir"; then
12971 haveit=yes
12972 break
12973 fi
12974 done
12975 if test -z "$haveit"; then
12976 ltrpathdirs="$ltrpathdirs $dir"
12977 fi
12978 fi
12979 ;;
12980 -l*)
12981 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12982 ;;
12983 *.la)
12984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12985 ;;
12986 *)
12987 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
12988 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
12989 ;;
12990 esac
12991 done
12992 fi
12993 else
12994 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
12995 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
12996 fi
12997 fi
12998 fi
12999 done
13000 done
13001 if test "X$rpathdirs" != "X"; then
13002 if test -n "$hardcode_libdir_separator"; then
13003 alldirs=
13004 for found_dir in $rpathdirs; do
13005 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13006 done
13007 acl_save_libdir="$libdir"
13008 libdir="$alldirs"
13009 eval flag=\"$hardcode_libdir_flag_spec\"
13010 libdir="$acl_save_libdir"
13011 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13012 else
13013 for found_dir in $rpathdirs; do
13014 acl_save_libdir="$libdir"
13015 libdir="$found_dir"
13016 eval flag=\"$hardcode_libdir_flag_spec\"
13017 libdir="$acl_save_libdir"
13018 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13019 done
13020 fi
13021 fi
13022 if test "X$ltrpathdirs" != "X"; then
13023 for found_dir in $ltrpathdirs; do
13024 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13025 done
13026 fi
13027
13028
13029 ac_save_CPPFLAGS="$CPPFLAGS"
13030
13031 for element in $INCLZMA; do
13032 haveit=
13033 for x in $CPPFLAGS; do
13034
13035 acl_save_prefix="$prefix"
13036 prefix="$acl_final_prefix"
13037 acl_save_exec_prefix="$exec_prefix"
13038 exec_prefix="$acl_final_exec_prefix"
13039 eval x=\"$x\"
13040 exec_prefix="$acl_save_exec_prefix"
13041 prefix="$acl_save_prefix"
13042
13043 if test "X$x" = "X$element"; then
13044 haveit=yes
13045 break
13046 fi
13047 done
13048 if test -z "$haveit"; then
13049 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13050 fi
13051 done
13052
13053
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13055$as_echo_n "checking for liblzma... " >&6; }
13056if test "${ac_cv_liblzma+set}" = set; then :
13057 $as_echo_n "(cached) " >&6
13058else
13059
13060 ac_save_LIBS="$LIBS"
13061 LIBS="$LIBS $LIBLZMA"
13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063/* end confdefs.h. */
13064#include "lzma.h"
13065int
13066main ()
13067{
13068lzma_index_iter iter;
13069 lzma_index_iter_init (&iter, 0);
13070 lzma_mf_is_supported (LZMA_MF_HC3);
13071 ;
13072 return 0;
13073}
13074_ACEOF
13075if ac_fn_c_try_link "$LINENO"; then :
13076 ac_cv_liblzma=yes
13077else
13078 ac_cv_liblzma=no
13079fi
13080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
13082 LIBS="$ac_save_LIBS"
13083
13084fi
13085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13086$as_echo "$ac_cv_liblzma" >&6; }
13087 if test "$ac_cv_liblzma" = yes; then
13088 HAVE_LIBLZMA=yes
13089
13090$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13091
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13093$as_echo_n "checking how to link with liblzma... " >&6; }
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13095$as_echo "$LIBLZMA" >&6; }
13096 else
13097 HAVE_LIBLZMA=no
13098 CPPFLAGS="$ac_save_CPPFLAGS"
13099 LIBLZMA=
13100 LTLIBLZMA=
13101 fi
13102
13103
13104
13105
13106
13107
13108 if test "$HAVE_LIBLZMA" != yes; then
13109 if test "$with_lzma" = yes; then
13110 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13111 fi
13112 fi
13113 fi
13114fi
13115
3fc11d3e
JM
13116LIBGUI="../libgui/src/libgui.a"
13117GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13118
13119
7a292a7a 13120
3fc11d3e
JM
13121WIN32LDAPP=
13122
13123
13124
d91670b9 13125case "${host}" in
686a5eed 13126*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13127 configdir="win"
13128 ;;
13129*)
13130 configdir="unix"
13131 ;;
13132esac
3fc11d3e
JM
13133
13134GDBTKLIBS=
13135if test "${enable_gdbtk}" = "yes"; then
13136
d1c3b63a
KS
13137 # Gdbtk must have an absolute path to srcdir in order to run
13138 # properly when not installed.
13139 here=`pwd`
13140 cd ${srcdir}
13141 GDBTK_SRC_DIR=`pwd`
13142 cd $here
13143
bec39cab 13144
5062cc19
KS
13145 #
13146 # Ok, lets find the tcl configuration
13147 # First, look for one uninstalled.
13148 # the alternative search directory is invoked by --with-tcl
13149 #
3fc11d3e 13150
5062cc19
KS
13151 if test x"${no_tcl}" = x ; then
13152 # we reset no_tcl in case something fails here
13153 no_tcl=true
bec39cab 13154
81ecdfbb
RW
13155# Check whether --with-tcl was given.
13156if test "${with_tcl+set}" = set; then :
13157 withval=$with_tcl; with_tclconfig=${withval}
13158fi
13159
13160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13161$as_echo_n "checking for Tcl configuration... " >&6; }
13162 if test "${ac_cv_c_tclconfig+set}" = set; then :
13163 $as_echo_n "(cached) " >&6
3fc11d3e 13164else
bec39cab 13165
3fc11d3e 13166
5062cc19
KS
13167 # First check to see if --with-tcl was specified.
13168 case "${host}" in
13169 *-*-cygwin*) platDir="win" ;;
13170 *) platDir="unix" ;;
13171 esac
13172 if test x"${with_tclconfig}" != x ; then
13173 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13174 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13175 else
81ecdfbb 13176 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13177 fi
13178 fi
13179
13180 # then check for a private Tcl installation
13181 if test x"${ac_cv_c_tclconfig}" = x ; then
13182 for i in \
13183 ../tcl \
13184 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13185 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13186 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13187 ../../tcl \
13188 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13189 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13190 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13191 ../../../tcl \
13192 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13193 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13194 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13195 if test -f "$i/$platDir/tclConfig.sh" ; then
13196 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13197 break
13198 fi
13199 done
13200 fi
13201
13202 # on Darwin, check in Framework installation locations
13203 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13204 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13205 `ls -d /Library/Frameworks 2>/dev/null` \
13206 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13207 `ls -d /System/Library/Frameworks 2>/dev/null` \
13208 ; do
13209 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13210 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13211 break
13212 fi
13213 done
13214 fi
13215
13216 # check in a few common install locations
13217 if test x"${ac_cv_c_tclconfig}" = x ; then
13218 for i in `ls -d ${libdir} 2>/dev/null` \
13219 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13220 `ls -d ${prefix}/lib 2>/dev/null` \
13221 `ls -d /usr/local/lib 2>/dev/null` \
13222 `ls -d /usr/contrib/lib 2>/dev/null` \
13223 `ls -d /usr/lib 2>/dev/null` \
13224 ; do
13225 if test -f "$i/tclConfig.sh" ; then
13226 ac_cv_c_tclconfig=`(cd $i; pwd)`
13227 break
13228 fi
13229 done
13230 fi
3fc11d3e 13231
5062cc19
KS
13232 # check in a few other private locations
13233 if test x"${ac_cv_c_tclconfig}" = x ; then
13234 for i in \
13235 ${srcdir}/../tcl \
13236 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13237 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13238 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13239 if test -f "$i/$platDir/tclConfig.sh" ; then
13240 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13241 break
13242 fi
13243 done
13244 fi
bec39cab 13245
3fc11d3e
JM
13246fi
13247
5062cc19
KS
13248
13249 if test x"${ac_cv_c_tclconfig}" = x ; then
13250 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13252$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13253 else
13254 no_tcl=
13255 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13257$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13258 fi
13259 fi
3fc11d3e 13260
bec39cab 13261
85541719
DE
13262 # If $no_tk is nonempty, then we can't do Tk, and there is no
13263 # point to doing Tcl.
bec39cab 13264
5062cc19
KS
13265 #
13266 # Ok, lets find the tk configuration
13267 # First, look for one uninstalled.
13268 # the alternative search directory is invoked by --with-tk
13269 #
3fc11d3e 13270
5062cc19
KS
13271 if test x"${no_tk}" = x ; then
13272 # we reset no_tk in case something fails here
13273 no_tk=true
bec39cab 13274
81ecdfbb
RW
13275# Check whether --with-tk was given.
13276if test "${with_tk+set}" = set; then :
13277 withval=$with_tk; with_tkconfig=${withval}
13278fi
13279
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13281$as_echo_n "checking for Tk configuration... " >&6; }
13282 if test "${ac_cv_c_tkconfig+set}" = set; then :
13283 $as_echo_n "(cached) " >&6
bec39cab 13284else
3fc11d3e
JM
13285
13286
5062cc19
KS
13287 # First check to see if --with-tkconfig was specified.
13288 if test x"${with_tkconfig}" != x ; then
13289 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13290 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13291 else
81ecdfbb 13292 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13293 fi
13294 fi
3fc11d3e 13295
5062cc19
KS
13296 # then check for a private Tk library
13297 case "${host}" in
13298 *-*-cygwin*) platDir="win" ;;
13299 *) platDir="unix" ;;
13300 esac
13301 if test x"${ac_cv_c_tkconfig}" = x ; then
13302 for i in \
13303 ../tk \
13304 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13305 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13306 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13307 ../../tk \
13308 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13309 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13310 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13311 ../../../tk \
13312 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13313 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13314 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13315 if test -f "$i/$platDir/tkConfig.sh" ; then
13316 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13317 break
13318 fi
13319 done
13320 fi
13321
13322 # on Darwin, check in Framework installation locations
13323 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13324 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13325 `ls -d /Library/Frameworks 2>/dev/null` \
13326 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13327 `ls -d /System/Library/Frameworks 2>/dev/null` \
13328 ; do
13329 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13330 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13331 break
13332 fi
13333 done
13334 fi
13335
13336 # check in a few common install locations
13337 if test x"${ac_cv_c_tkconfig}" = x ; then
13338 for i in `ls -d ${libdir} 2>/dev/null` \
13339 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13340 `ls -d ${prefix}/lib 2>/dev/null` \
13341 `ls -d /usr/local/lib 2>/dev/null` \
13342 `ls -d /usr/contrib/lib 2>/dev/null` \
13343 `ls -d /usr/lib 2>/dev/null` \
13344 ; do
13345 if test -f "$i/tkConfig.sh" ; then
13346 ac_cv_c_tkconfig=`(cd $i; pwd)`
13347 break
13348 fi
13349 done
13350 fi
13351 # check in a few other private locations
13352 if test x"${ac_cv_c_tkconfig}" = x ; then
13353 for i in \
13354 ${srcdir}/../tk \
13355 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13356 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13357 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13358 if test -f "$i/$platDir/tkConfig.sh" ; then
13359 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13360 break
13361 fi
13362 done
13363 fi
3fc11d3e 13364
3fc11d3e
JM
13365fi
13366
13367
5062cc19
KS
13368 if test x"${ac_cv_c_tkconfig}" = x ; then
13369 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13371$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13372 else
13373 no_tk=
13374 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13376$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13377 fi
3fc11d3e 13378 fi
dd2504ab 13379
dd2504ab 13380
85541719
DE
13381 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13382
81ecdfbb
RW
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13384$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13385
13386 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13388$as_echo "loading" >&6; }
85541719
DE
13389 . ${TCL_BIN_DIR}/tclConfig.sh
13390 else
81ecdfbb
RW
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13392$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13393 fi
13394
13395 # eval is required to do the TCL_DBGX substitution
13396 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13397 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13398
13399 # If the TCL_BIN_DIR is the build directory (not the install directory),
13400 # then set the common variable name to the value of the build variables.
13401 # For example, the variable TCL_LIB_SPEC will be set to the value
13402 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13403 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13404 # installed and uninstalled version of Tcl.
13405 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13406 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13407 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13408 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13409 elif test "`uname -s`" = "Darwin"; then
13410 # If Tcl was built as a framework, attempt to use the libraries
13411 # from the framework at the given location so that linking works
a68ffae9 13412 # against Tcl.framework installed in an arbitrary location.
85541719
DE
13413 case ${TCL_DEFS} in
13414 *TCL_FRAMEWORK*)
13415 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13416 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13417 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13418 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13419 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13420 break
13421 fi
13422 done
13423 fi
13424 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13425 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13426 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13427 fi
13428 ;;
13429 esac
13430 fi
13431
13432 # eval is required to do the TCL_DBGX substitution
13433 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13434 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13435 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13436 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452 # Check for in-tree tcl
13453 here=`pwd`
13454 cd ${srcdir}/..
13455 topdir=`pwd`
13456 cd ${here}
13457
13458 intree="no"
13459 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13460 intree="yes"
13461 fi
13462
13463 # Find Tcl private headers
13464 if test x"${intree}" = xno; then
13465
81ecdfbb
RW
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13467$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13468 private_dir=""
13469 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13470 if test -f ${dir}/tclInt.h ; then
13471 private_dir=${dir}
13472 fi
13473
13474 if test x"${private_dir}" = x; then
81ecdfbb 13475 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13476 else
13477 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13479$as_echo "${private_dir}" >&6; }
85541719
DE
13480 fi
13481
13482 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13483 TCL_LIBRARY="${TCL_LIB_SPEC}"
13484 TCL_DEPS=""
13485 else
13486 # If building tcl in the same src tree, private headers
13487 # are not needed, but we need to be sure to use the right
13488 # headers library
13489 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13490 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13491 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13492 fi
13493
13494
13495
13496
13497
81ecdfbb
RW
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13499$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13500
5062cc19 13501 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13503$as_echo "loading" >&6; }
5062cc19 13504 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13505 else
81ecdfbb
RW
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13507$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13508 fi
bec39cab 13509
5062cc19
KS
13510 # eval is required to do the TK_DBGX substitution
13511 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13512 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13513
13514 # If the TK_BIN_DIR is the build directory (not the install directory),
13515 # then set the common variable name to the value of the build variables.
13516 # For example, the variable TK_LIB_SPEC will be set to the value
13517 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13518 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13519 # installed and uninstalled version of Tcl.
85541719 13520 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13521 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13522 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13523 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13524 elif test "`uname -s`" = "Darwin"; then
13525 # If Tk was built as a framework, attempt to use the libraries
13526 # from the framework at the given location so that linking works
a68ffae9 13527 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13528 case ${TK_DEFS} in
13529 *TK_FRAMEWORK*)
85541719 13530 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13531 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13532 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13533 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13534 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13535 break
13536 fi
13537 done
13538 fi
85541719 13539 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13540 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13541 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13542 fi
13543 ;;
13544 esac
3fc11d3e
JM
13545 fi
13546
5062cc19
KS
13547 # eval is required to do the TK_DBGX substitution
13548 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13549 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13550 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13551 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13552
3fc11d3e
JM
13553
13554
bec39cab
AC
13555
13556
13557
13558
13559
13560
13561
3fc11d3e 13562
3fc11d3e 13563
bec39cab 13564
bec39cab 13565
85541719
DE
13566 # Check for in-tree Tk
13567 intree="no"
13568 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13569 intree="yes"
13570 fi
3fc11d3e 13571
85541719
DE
13572 # Find Tk private headers
13573 if test x"${intree}" = xno; then
3fc11d3e 13574
81ecdfbb
RW
13575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13576$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13577 private_dir=""
13578 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13579 if test -f ${dir}/tkInt.h; then
13580 private_dir=${dir}
3fc11d3e 13581 fi
bec39cab 13582
5062cc19 13583 if test x"${private_dir}" = x; then
81ecdfbb 13584 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13585 else
5062cc19 13586 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13588$as_echo "${private_dir}" >&6; }
3fc11d3e 13589 fi
3fc11d3e 13590
85541719
DE
13591 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13592 TK_LIBRARY=${TK_LIB_SPEC}
13593 TK_DEPS=""
13594 else
13595 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13596 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13597 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13598 fi
3fc11d3e
JM
13599
13600
3fc11d3e
JM
13601
13602
3fc11d3e 13603
85541719 13604 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13605
85541719
DE
13606 # Include some libraries that Tcl and Tk want.
13607 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13608 # Yes, the ordering seems wrong here. But it isn't.
13609 # TK_LIBS is the list of libraries that need to be linked
13610 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13611 # were in LIBS then any link tests after this point would
13612 # try to include things like `$(LIBGUI)', which wouldn't work.
13613 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13614
85541719
DE
13615 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13616 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13617 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13618 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13619 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13620 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13621 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13622
85541719
DE
13623 if test x$gdb_cv_os_cygwin = xyes; then
13624 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13625 WIN32LDAPP="-Wl,--subsystem,console"
13626 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13627 fi
ffc6a242 13628
81ecdfbb 13629 subdirs="$subdirs gdbtk"
3ace7edb 13630
85541719 13631 fi
3fc11d3e
JM
13632fi
13633
13634
13635
13636
13637
13638
13639
13640
81ecdfbb
RW
13641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13642$as_echo_n "checking for X... " >&6; }
bec39cab 13643
c906108c 13644
81ecdfbb
RW
13645# Check whether --with-x was given.
13646if test "${with_x+set}" = set; then :
13647 withval=$with_x;
13648fi
c906108c
SS
13649
13650# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13651if test "x$with_x" = xno; then
13652 # The user explicitly disabled X.
13653 have_x=disabled
13654else
81ecdfbb
RW
13655 case $x_includes,$x_libraries in #(
13656 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13657 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13658 $as_echo_n "(cached) " >&6
c906108c
SS
13659else
13660 # One or both of the vars are not set, and there is no cached value.
bec39cab 13661ac_x_includes=no ac_x_libraries=no
81ecdfbb 13662rm -f -r conftest.dir
bec39cab
AC
13663if mkdir conftest.dir; then
13664 cd conftest.dir
bec39cab 13665 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13666incroot:
13667 @echo incroot='${INCROOT}'
13668usrlibdir:
13669 @echo usrlibdir='${USRLIBDIR}'
13670libdir:
13671 @echo libdir='${LIBDIR}'
13672_ACEOF
13673 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13674 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13675 for ac_var in incroot usrlibdir libdir; do
13676 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13677 done
c906108c 13678 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13679 for ac_extension in a so sl dylib la dll; do
13680 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13681 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13682 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13683 fi
13684 done
13685 # Screen out bogus values from the imake configuration. They are
13686 # bogus both because they are the default anyway, and because
13687 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13688 case $ac_im_incroot in
81ecdfbb 13689 /usr/include) ac_x_includes= ;;
bec39cab 13690 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13691 esac
bec39cab 13692 case $ac_im_usrlibdir in
81ecdfbb 13693 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13694 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13695 esac
13696 fi
13697 cd ..
81ecdfbb 13698 rm -f -r conftest.dir
c906108c
SS
13699fi
13700
bec39cab
AC
13701# Standard set of common directories for X headers.
13702# Check X11 before X11Rn because it is often a symlink to the current release.
13703ac_x_header_dirs='
13704/usr/X11/include
81ecdfbb 13705/usr/X11R7/include
bec39cab
AC
13706/usr/X11R6/include
13707/usr/X11R5/include
13708/usr/X11R4/include
13709
13710/usr/include/X11
81ecdfbb 13711/usr/include/X11R7
bec39cab
AC
13712/usr/include/X11R6
13713/usr/include/X11R5
13714/usr/include/X11R4
13715
13716/usr/local/X11/include
81ecdfbb 13717/usr/local/X11R7/include
bec39cab
AC
13718/usr/local/X11R6/include
13719/usr/local/X11R5/include
13720/usr/local/X11R4/include
13721
13722/usr/local/include/X11
81ecdfbb 13723/usr/local/include/X11R7
bec39cab
AC
13724/usr/local/include/X11R6
13725/usr/local/include/X11R5
13726/usr/local/include/X11R4
13727
13728/usr/X386/include
13729/usr/x386/include
13730/usr/XFree86/include/X11
13731
13732/usr/include
13733/usr/local/include
13734/usr/unsupported/include
13735/usr/athena/include
13736/usr/local/x11r5/include
13737/usr/lpp/Xamples/include
13738
13739/usr/openwin/include
13740/usr/openwin/share/include'
13741
13742if test "$ac_x_includes" = no; then
81ecdfbb 13743 # Guess where to find include files, by looking for Xlib.h.
c906108c 13744 # First, try using that file with no special directory specified.
81ecdfbb 13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13746/* end confdefs.h. */
81ecdfbb 13747#include <X11/Xlib.h>
bec39cab 13748_ACEOF
81ecdfbb 13749if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13750 # We can compile using X headers with no special include directory.
13751ac_x_includes=
13752else
bec39cab 13753 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13754 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13755 ac_x_includes=$ac_dir
13756 break
13757 fi
13758done
c906108c 13759fi
bec39cab
AC
13760rm -f conftest.err conftest.$ac_ext
13761fi # $ac_x_includes = no
c906108c 13762
bec39cab 13763if test "$ac_x_libraries" = no; then
c906108c 13764 # Check for the libraries.
c906108c
SS
13765 # See if we find them without any special options.
13766 # Don't add to $LIBS permanently.
bec39cab 13767 ac_save_LIBS=$LIBS
81ecdfbb
RW
13768 LIBS="-lX11 $LIBS"
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13770/* end confdefs.h. */
81ecdfbb 13771#include <X11/Xlib.h>
bec39cab
AC
13772int
13773main ()
13774{
81ecdfbb 13775XrmInitialize ()
bec39cab
AC
13776 ;
13777 return 0;
13778}
13779_ACEOF
81ecdfbb 13780if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13781 LIBS=$ac_save_LIBS
c906108c
SS
13782# We can link X programs with no special library path.
13783ac_x_libraries=
13784else
81ecdfbb
RW
13785 LIBS=$ac_save_LIBS
13786for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13787do
bec39cab 13788 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13789 for ac_extension in a so sl dylib la dll; do
13790 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13791 ac_x_libraries=$ac_dir
13792 break 2
13793 fi
13794 done
13795done
13796fi
81ecdfbb
RW
13797rm -f core conftest.err conftest.$ac_objext \
13798 conftest$ac_exeext conftest.$ac_ext
bec39cab 13799fi # $ac_x_libraries = no
c906108c 13800
81ecdfbb
RW
13801case $ac_x_includes,$ac_x_libraries in #(
13802 no,* | *,no | *\'*)
13803 # Didn't find X, or a directory has "'" in its name.
13804 ac_cv_have_x="have_x=no";; #(
13805 *)
13806 # Record where we found X for the cache.
13807 ac_cv_have_x="have_x=yes\
13808 ac_x_includes='$ac_x_includes'\
13809 ac_x_libraries='$ac_x_libraries'"
13810esac
c906108c 13811fi
81ecdfbb
RW
13812;; #(
13813 *) have_x=yes;;
13814 esac
c906108c
SS
13815 eval "$ac_cv_have_x"
13816fi # $with_x != no
13817
13818if test "$have_x" != yes; then
81ecdfbb
RW
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13820$as_echo "$have_x" >&6; }
c906108c
SS
13821 no_x=yes
13822else
13823 # If each of the values was on the command line, it overrides each guess.
13824 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13825 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13826 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13827 ac_cv_have_x="have_x=yes\
13828 ac_x_includes='$x_includes'\
13829 ac_x_libraries='$x_libraries'"
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13831$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13832fi
13833
13834
bec39cab 13835# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13836# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13837# This code just checks for a few cases where we'd like to ignore those
13838# definitions, even when they're present in the '.mt' file. These cases
13839# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13840# not part of the source tree.
7a292a7a 13841#
81ecdfbb
RW
13842# Check whether --enable-sim was given.
13843if test "${enable_sim+set}" = set; then :
13844 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13845 echo "enableval = ${enableval}";
13846 case "${enableval}" in
13847 yes) ignore_sim=false ;;
13848 no) ignore_sim=true ;;
13849 *) ignore_sim=false ;;
13850 esac
13851else
13852 ignore_sim=false
81ecdfbb
RW
13853fi
13854
7a292a7a
SS
13855
13856if test ! -d "${srcdir}/../sim"; then
13857 ignore_sim=true
13858fi
13859
9b624dbe
UW
13860SIM=
13861SIM_OBS=
13862if test "${ignore_sim}" = "false"; then
13863 if test x"${gdb_sim}" != x ; then
13864 SIM="${gdb_sim}"
13865 SIM_OBS="remote-sim.o"
60ca704f 13866
81ecdfbb 13867$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13868
9b624dbe 13869 fi
7a292a7a
SS
13870fi
13871
13872
13873
c906108c
SS
13874
13875
13876
13877
13878
13879
dfcd3bfb 13880
e56ac5c3
AC
13881
13882
b3a90332
AC
13883
13884
c35f4ffc 13885# List of host floatformats.
bec39cab
AC
13886
13887cat >>confdefs.h <<_ACEOF
c35f4ffc 13888#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13889_ACEOF
c35f4ffc 13890
bec39cab
AC
13891
13892cat >>confdefs.h <<_ACEOF
c35f4ffc 13893#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13894_ACEOF
13895
c35f4ffc 13896
bec39cab 13897cat >>confdefs.h <<_ACEOF
c35f4ffc 13898#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13899_ACEOF
c35f4ffc
AC
13900
13901
c906108c
SS
13902# target_subdir is used by the testsuite to find the target libraries.
13903target_subdir=
13904if test "${host}" != "${target}"; then
13905 target_subdir="${target_alias}/"
13906fi
13907
13908
13909frags=
771b4502 13910if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13911 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13912 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13913 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13914 fi
13915 frags="$frags $host_makefile_frag"
13916else
13917 host_makefile_frag=/dev/null
c906108c 13918fi
c906108c 13919
c906108c
SS
13920
13921
13922
771b4502 13923if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13924# We pick this up from the host configuration file (.mh) because we
13925# do not have a native configuration Makefile fragment.
c906108c
SS
13926nativefile=`sed -n '
13927s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13928' ${host_makefile_frag}`
c906108c
SS
13929fi
13930
13931
b00a8037 13932if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13933
13934cat >>confdefs.h <<_ACEOF
b00a8037 13935#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13936_ACEOF
b00a8037
DJ
13937
13938fi
13939
8dcde887 13940# Enable multi-ice-gdb-server.
81ecdfbb
RW
13941# Check whether --enable-multi-ice was given.
13942if test "${enable_multi_ice+set}" = set; then :
13943 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13944 yes | no)
13945 ;;
81ecdfbb 13946 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13947 esac
81ecdfbb 13948fi
b4e70030 13949
81ecdfbb
RW
13950if test "x$enable_multi_ice" = xyes; then
13951 subdirs="$subdirs multi-ice"
3ace7edb 13952
a85f51e7
DJ
13953fi
13954
496c0e1b
JB
13955# Check whether --enable-gdbserver was given.
13956if test "${enable_gdbserver+set}" = set; then :
13957 enableval=$enable_gdbserver; case "${enableval}" in
13958 yes| no|auto) ;;
13959 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13960esac
13961else
13962 enable_gdbserver=auto
13963fi
13964
13965
13966# We only build gdbserver automatically in a native configuration, and
13967# only if the user did not explicitly disable its build.
13968if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13970$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13971 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13973$as_echo "yes" >&6; }
13974 subdirs="$subdirs gdbserver"
3ace7edb 13975
496c0e1b 13976 gdbserver_build_enabled=yes
8dcde887 13977 else
81ecdfbb
RW
13978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13979$as_echo "no" >&6; }
8dcde887
MK
13980 fi
13981fi
13982
496c0e1b
JB
13983# If the user explicitly request the gdbserver to be built, verify that
13984# we were in fact able to enable it.
13985if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13986 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13987fi
13988
db985757 13989# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13990# to an empty version.
c906108c
SS
13991
13992files=
13993links=
5a2402b8 13994
c906108c
SS
13995rm -f nm.h
13996if test "${nativefile}" != ""; then
0f475e27
AC
13997 case "${nativefile}" in
13998 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13999 * ) GDB_NM_FILE="${nativefile}"
14000 esac
5a2402b8
AC
14001 files="${files} ${GDB_NM_FILE}"
14002 links="${links} nm.h"
60ca704f
SE
14003
14004cat >>confdefs.h <<_ACEOF
b78960be 14005#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14006_ACEOF
5a2402b8 14007
c906108c 14008fi
5a2402b8
AC
14009
14010
bec39cab
AC
14011ac_sources="$files"
14012ac_dests="$links"
14013while test -n "$ac_sources"; do
14014 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14015 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14016 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14017done
81ecdfbb 14018ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14019
14020
c906108c
SS
14021
14022
c906108c 14023
81ecdfbb 14024$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14025
bec39cab 14026
c971b7fa 14027ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
14028
14029ac_config_commands="$ac_config_commands default"
89a34d1b 14030
bec39cab
AC
14031cat >confcache <<\_ACEOF
14032# This file is a shell script that caches the results of configure
14033# tests run on this system so they can be shared between configure
14034# scripts and configure runs, see configure's option --config-cache.
14035# It is not useful on other systems. If it contains results you don't
14036# want to keep, you may remove or edit it.
14037#
14038# config.status only pays attention to the cache file if you give it
14039# the --recheck option to rerun configure.
14040#
14041# `ac_cv_env_foo' variables (set or unset) will be overridden when
14042# loading this file, other *unset* `ac_cv_foo' will be assigned the
14043# following values.
14044
14045_ACEOF
14046
14047# The following way of writing the cache mishandles newlines in values,
14048# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14049# So, we kill variables containing newlines.
bec39cab
AC
14050# Ultrix sh set writes to stderr and can't be redirected directly,
14051# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14052(
14053 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14054 eval ac_val=\$$ac_var
14055 case $ac_val in #(
14056 *${as_nl}*)
14057 case $ac_var in #(
14058 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14059$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14060 esac
14061 case $ac_var in #(
14062 _ | IFS | as_nl) ;; #(
14063 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14064 *) { eval $ac_var=; unset $ac_var;} ;;
14065 esac ;;
14066 esac
14067 done
14068
bec39cab 14069 (set) 2>&1 |
81ecdfbb
RW
14070 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14071 *${as_nl}ac_space=\ *)
14072 # `set' does not quote correctly, so add quotes: double-quote
14073 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14074 sed -n \
14075 "s/'/'\\\\''/g;
14076 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14077 ;; #(
bec39cab
AC
14078 *)
14079 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14080 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14081 ;;
81ecdfbb
RW
14082 esac |
14083 sort
14084) |
bec39cab 14085 sed '
81ecdfbb 14086 /^ac_cv_env_/b end
bec39cab 14087 t clear
81ecdfbb 14088 :clear
bec39cab
AC
14089 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14090 t end
81ecdfbb
RW
14091 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14092 :end' >>confcache
14093if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14094 if test -w "$cache_file"; then
14095 test "x$cache_file" != "x/dev/null" &&
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14097$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14098 cat confcache >$cache_file
14099 else
81ecdfbb
RW
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14101$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14102 fi
14103fi
14104rm -f confcache
14105
14106test "x$prefix" = xNONE && prefix=$ac_default_prefix
14107# Let make expand exec_prefix.
14108test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14109
bec39cab
AC
14110DEFS=-DHAVE_CONFIG_H
14111
14112ac_libobjs=
14113ac_ltlibobjs=
14114for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14115 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14116 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14117 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14118 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14119 # will be set to the directory where LIBOBJS objects are built.
14120 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14121 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14122done
14123LIBOBJS=$ac_libobjs
14124
14125LTLIBOBJS=$ac_ltlibobjs
14126
14127
85981d60 14128if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14129 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14130Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14131fi
a417dc56 14132if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14133 as_fn_error "conditional \"GMAKE\" was never defined.
14134Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14135fi
81ecdfbb
RW
14136
14137
bec39cab 14138: ${CONFIG_STATUS=./config.status}
81ecdfbb 14139ac_write_fail=0
bec39cab
AC
14140ac_clean_files_save=$ac_clean_files
14141ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14143$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14144as_write_fail=0
14145cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14146#! $SHELL
14147# Generated by $as_me.
14148# Run this file to recreate the current configuration.
14149# Compiler output produced by configure, useful for debugging
14150# configure, is in config.log if it exists.
14151
14152debug=false
14153ac_cs_recheck=false
14154ac_cs_silent=false
bec39cab 14155
81ecdfbb
RW
14156SHELL=\${CONFIG_SHELL-$SHELL}
14157export SHELL
14158_ASEOF
14159cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14160## -------------------- ##
14161## M4sh Initialization. ##
14162## -------------------- ##
14163
14164# Be more Bourne compatible
14165DUALCASE=1; export DUALCASE # for MKS sh
14166if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14167 emulate sh
14168 NULLCMD=:
81ecdfbb 14169 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14170 # is contrary to our usage. Disable this feature.
14171 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14172 setopt NO_GLOB_SUBST
14173else
14174 case `(set -o) 2>/dev/null` in #(
14175 *posix*) :
14176 set -o posix ;; #(
14177 *) :
14178 ;;
14179esac
bec39cab 14180fi
bec39cab 14181
81ecdfbb
RW
14182
14183as_nl='
14184'
14185export as_nl
14186# Printing a long string crashes Solaris 7 /usr/bin/printf.
14187as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14188as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14189as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14190# Prefer a ksh shell builtin over an external printf program on Solaris,
14191# but without wasting forks for bash or zsh.
14192if test -z "$BASH_VERSION$ZSH_VERSION" \
14193 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14194 as_echo='print -r --'
14195 as_echo_n='print -rn --'
14196elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14197 as_echo='printf %s\n'
14198 as_echo_n='printf %s'
14199else
14200 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14201 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14202 as_echo_n='/usr/ucb/echo -n'
14203 else
14204 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14205 as_echo_n_body='eval
14206 arg=$1;
14207 case $arg in #(
14208 *"$as_nl"*)
14209 expr "X$arg" : "X\\(.*\\)$as_nl";
14210 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14211 esac;
14212 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14213 '
14214 export as_echo_n_body
14215 as_echo_n='sh -c $as_echo_n_body as_echo'
14216 fi
14217 export as_echo_body
14218 as_echo='sh -c $as_echo_body as_echo'
14219fi
14220
14221# The user is always right.
14222if test "${PATH_SEPARATOR+set}" != set; then
14223 PATH_SEPARATOR=:
14224 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14225 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14226 PATH_SEPARATOR=';'
14227 }
bec39cab
AC
14228fi
14229
14230
81ecdfbb
RW
14231# IFS
14232# We need space, tab and new line, in precisely that order. Quoting is
14233# there to prevent editors from complaining about space-tab.
14234# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14235# splitting by setting IFS to empty value.)
14236IFS=" "" $as_nl"
14237
14238# Find who we are. Look in the path if we contain no directory separator.
14239case $0 in #((
14240 *[\\/]* ) as_myself=$0 ;;
14241 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14242for as_dir in $PATH
14243do
14244 IFS=$as_save_IFS
14245 test -z "$as_dir" && as_dir=.
14246 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14247 done
14248IFS=$as_save_IFS
14249
14250 ;;
14251esac
14252# We did not find ourselves, most probably we were run as `sh COMMAND'
14253# in which case we are not to be found in the path.
14254if test "x$as_myself" = x; then
14255 as_myself=$0
14256fi
14257if test ! -f "$as_myself"; then
14258 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14259 exit 1
14260fi
14261
14262# Unset variables that we do not need and which cause bugs (e.g. in
14263# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14264# suppresses any "Segmentation fault" message there. '((' could
14265# trigger a bug in pdksh 5.2.14.
14266for as_var in BASH_ENV ENV MAIL MAILPATH
14267do eval test x\${$as_var+set} = xset \
14268 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14269done
bec39cab
AC
14270PS1='$ '
14271PS2='> '
14272PS4='+ '
14273
14274# NLS nuisances.
81ecdfbb
RW
14275LC_ALL=C
14276export LC_ALL
14277LANGUAGE=C
14278export LANGUAGE
14279
14280# CDPATH.
14281(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14282
14283
14284# as_fn_error ERROR [LINENO LOG_FD]
14285# ---------------------------------
14286# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14287# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14288# script with status $?, using 1 if that was 0.
14289as_fn_error ()
14290{
14291 as_status=$?; test $as_status -eq 0 && as_status=1
14292 if test "$3"; then
14293 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14294 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14295 fi
14296 $as_echo "$as_me: error: $1" >&2
14297 as_fn_exit $as_status
14298} # as_fn_error
14299
14300
14301# as_fn_set_status STATUS
14302# -----------------------
14303# Set $? to STATUS, without forking.
14304as_fn_set_status ()
14305{
14306 return $1
14307} # as_fn_set_status
14308
14309# as_fn_exit STATUS
14310# -----------------
14311# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14312as_fn_exit ()
14313{
14314 set +e
14315 as_fn_set_status $1
14316 exit $1
14317} # as_fn_exit
14318
14319# as_fn_unset VAR
14320# ---------------
14321# Portably unset VAR.
14322as_fn_unset ()
14323{
14324 { eval $1=; unset $1;}
14325}
14326as_unset=as_fn_unset
14327# as_fn_append VAR VALUE
14328# ----------------------
14329# Append the text in VALUE to the end of the definition contained in VAR. Take
14330# advantage of any shell optimizations that allow amortized linear growth over
14331# repeated appends, instead of the typical quadratic growth present in naive
14332# implementations.
14333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14334 eval 'as_fn_append ()
14335 {
14336 eval $1+=\$2
14337 }'
14338else
14339 as_fn_append ()
14340 {
14341 eval $1=\$$1\$2
14342 }
14343fi # as_fn_append
14344
14345# as_fn_arith ARG...
14346# ------------------
14347# Perform arithmetic evaluation on the ARGs, and store the result in the
14348# global $as_val. Take advantage of shells that can avoid forks. The arguments
14349# must be portable across $(()) and expr.
14350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14351 eval 'as_fn_arith ()
14352 {
14353 as_val=$(( $* ))
14354 }'
14355else
14356 as_fn_arith ()
14357 {
14358 as_val=`expr "$@" || test $? -eq 1`
14359 }
14360fi # as_fn_arith
bec39cab 14361
81ecdfbb
RW
14362
14363if expr a : '\(a\)' >/dev/null 2>&1 &&
14364 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
14365 as_expr=expr
14366else
14367 as_expr=false
14368fi
14369
81ecdfbb 14370if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
14371 as_basename=basename
14372else
14373 as_basename=false
14374fi
14375
81ecdfbb
RW
14376if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14377 as_dirname=dirname
14378else
14379 as_dirname=false
14380fi
bec39cab 14381
81ecdfbb 14382as_me=`$as_basename -- "$0" ||
bec39cab
AC
14383$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14384 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
14385 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14386$as_echo X/"$0" |
14387 sed '/^.*\/\([^/][^/]*\)\/*$/{
14388 s//\1/
14389 q
14390 }
14391 /^X\/\(\/\/\)$/{
14392 s//\1/
14393 q
14394 }
14395 /^X\/\(\/\).*/{
14396 s//\1/
14397 q
14398 }
14399 s/.*/./; q'`
b4e70030 14400
b4e70030
JB
14401# Avoid depending upon Character Ranges.
14402as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14403as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14404as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14405as_cr_digits='0123456789'
14406as_cr_alnum=$as_cr_Letters$as_cr_digits
14407
81ecdfbb
RW
14408ECHO_C= ECHO_N= ECHO_T=
14409case `echo -n x` in #(((((
14410-n*)
14411 case `echo 'xy\c'` in
14412 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14413 xy) ECHO_C='\c';;
14414 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14415 ECHO_T=' ';;
14416 esac;;
14417*)
14418 ECHO_N='-n';;
bec39cab
AC
14419esac
14420
81ecdfbb
RW
14421rm -f conf$$ conf$$.exe conf$$.file
14422if test -d conf$$.dir; then
14423 rm -f conf$$.dir/conf$$.file
bec39cab 14424else
81ecdfbb
RW
14425 rm -f conf$$.dir
14426 mkdir conf$$.dir 2>/dev/null
bec39cab 14427fi
81ecdfbb
RW
14428if (echo >conf$$.file) 2>/dev/null; then
14429 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 14430 as_ln_s='ln -s'
81ecdfbb
RW
14431 # ... but there are two gotchas:
14432 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14433 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14434 # In both cases, we have to default to `cp -p'.
14435 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14436 as_ln_s='cp -p'
14437 elif ln conf$$.file conf$$ 2>/dev/null; then
14438 as_ln_s=ln
14439 else
14440 as_ln_s='cp -p'
b4e70030 14441 fi
bec39cab
AC
14442else
14443 as_ln_s='cp -p'
14444fi
81ecdfbb
RW
14445rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14446rmdir conf$$.dir 2>/dev/null
14447
14448
14449# as_fn_mkdir_p
14450# -------------
14451# Create "$as_dir" as a directory, including parents if necessary.
14452as_fn_mkdir_p ()
14453{
14454
14455 case $as_dir in #(
14456 -*) as_dir=./$as_dir;;
14457 esac
14458 test -d "$as_dir" || eval $as_mkdir_p || {
14459 as_dirs=
14460 while :; do
14461 case $as_dir in #(
14462 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14463 *) as_qdir=$as_dir;;
14464 esac
14465 as_dirs="'$as_qdir' $as_dirs"
14466 as_dir=`$as_dirname -- "$as_dir" ||
14467$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14468 X"$as_dir" : 'X\(//\)[^/]' \| \
14469 X"$as_dir" : 'X\(//\)$' \| \
14470 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14471$as_echo X"$as_dir" |
14472 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14473 s//\1/
14474 q
14475 }
14476 /^X\(\/\/\)[^/].*/{
14477 s//\1/
14478 q
14479 }
14480 /^X\(\/\/\)$/{
14481 s//\1/
14482 q
14483 }
14484 /^X\(\/\).*/{
14485 s//\1/
14486 q
14487 }
14488 s/.*/./; q'`
14489 test -d "$as_dir" && break
14490 done
14491 test -z "$as_dirs" || eval "mkdir $as_dirs"
14492 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14493
bec39cab 14494
81ecdfbb 14495} # as_fn_mkdir_p
bec39cab 14496if mkdir -p . 2>/dev/null; then
81ecdfbb 14497 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
14498else
14499 test -d ./-p && rmdir ./-p
14500 as_mkdir_p=false
14501fi
14502
81ecdfbb
RW
14503if test -x / >/dev/null 2>&1; then
14504 as_test_x='test -x'
14505else
14506 if ls -dL / >/dev/null 2>&1; then
14507 as_ls_L_option=L
14508 else
14509 as_ls_L_option=
14510 fi
14511 as_test_x='
14512 eval sh -c '\''
14513 if test -d "$1"; then
14514 test -d "$1/.";
14515 else
14516 case $1 in #(
14517 -*)set "./$1";;
14518 esac;
14519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14520 ???[sx]*):;;*)false;;esac;fi
14521 '\'' sh
14522 '
14523fi
14524as_executable_p=$as_test_x
bec39cab
AC
14525
14526# Sed expression to map a string onto a valid CPP name.
14527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14528
14529# Sed expression to map a string onto a valid variable name.
14530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14531
14532
bec39cab 14533exec 6>&1
81ecdfbb
RW
14534## ----------------------------------- ##
14535## Main body of $CONFIG_STATUS script. ##
14536## ----------------------------------- ##
14537_ASEOF
14538test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14539
14540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14541# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 14542# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
14543# values after options handling.
14544ac_log="
bec39cab 14545This file was extended by $as_me, which was
81ecdfbb 14546generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
14547
14548 CONFIG_FILES = $CONFIG_FILES
14549 CONFIG_HEADERS = $CONFIG_HEADERS
14550 CONFIG_LINKS = $CONFIG_LINKS
14551 CONFIG_COMMANDS = $CONFIG_COMMANDS
14552 $ $0 $@
14553
81ecdfbb
RW
14554on `(hostname || uname -n) 2>/dev/null | sed 1q`
14555"
14556
bec39cab
AC
14557_ACEOF
14558
81ecdfbb
RW
14559case $ac_config_files in *"
14560"*) set x $ac_config_files; shift; ac_config_files=$*;;
14561esac
234b45d4 14562
81ecdfbb
RW
14563case $ac_config_headers in *"
14564"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14565esac
b4e70030 14566
b4e70030 14567
81ecdfbb
RW
14568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14569# Files that config.status was made for.
14570config_files="$ac_config_files"
14571config_headers="$ac_config_headers"
14572config_links="$ac_config_links"
14573config_commands="$ac_config_commands"
234b45d4 14574
81ecdfbb 14575_ACEOF
b4e70030 14576
81ecdfbb 14577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 14578ac_cs_usage="\
81ecdfbb
RW
14579\`$as_me' instantiates files and other configuration actions
14580from templates according to the current configuration. Unless the files
14581and actions are specified as TAGs, all are instantiated by default.
234b45d4 14582
81ecdfbb 14583Usage: $0 [OPTION]... [TAG]...
234b45d4 14584
bec39cab 14585 -h, --help print this help, then exit
81ecdfbb
RW
14586 -V, --version print version number and configuration settings, then exit
14587 -q, --quiet, --silent
14588 do not print progress messages
bec39cab
AC
14589 -d, --debug don't remove temporary files
14590 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
14591 --file=FILE[:TEMPLATE]
14592 instantiate the configuration file FILE
14593 --header=FILE[:TEMPLATE]
14594 instantiate the configuration header FILE
234b45d4 14595
bec39cab
AC
14596Configuration files:
14597$config_files
234b45d4 14598
bec39cab
AC
14599Configuration headers:
14600$config_headers
234b45d4 14601
bec39cab
AC
14602Configuration links:
14603$config_links
234b45d4 14604
bec39cab
AC
14605Configuration commands:
14606$config_commands
14607
81ecdfbb 14608Report bugs to the package provider."
b4e70030 14609
81ecdfbb
RW
14610_ACEOF
14611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
14612ac_cs_version="\\
14613config.status
81ecdfbb
RW
14614configured by $0, generated by GNU Autoconf 2.64,
14615 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 14616
81ecdfbb 14617Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
14618This config.status script is free software; the Free Software Foundation
14619gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
14620
14621ac_pwd='$ac_pwd'
14622srcdir='$srcdir'
14623INSTALL='$INSTALL'
81ecdfbb
RW
14624AWK='$AWK'
14625test -n "\$AWK" || AWK=awk
bec39cab
AC
14626_ACEOF
14627
81ecdfbb
RW
14628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14629# The default lists apply if the user does not specify any file.
bec39cab
AC
14630ac_need_defaults=:
14631while test $# != 0
14632do
14633 case $1 in
14634 --*=*)
81ecdfbb
RW
14635 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14636 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 14637 ac_shift=:
c906108c 14638 ;;
81ecdfbb 14639 *)
bec39cab
AC
14640 ac_option=$1
14641 ac_optarg=$2
14642 ac_shift=shift
c906108c 14643 ;;
bec39cab 14644 esac
c906108c 14645
bec39cab
AC
14646 case $ac_option in
14647 # Handling of the options.
bec39cab
AC
14648 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14649 ac_cs_recheck=: ;;
81ecdfbb
RW
14650 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14651 $as_echo "$ac_cs_version"; exit ;;
14652 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14653 debug=: ;;
14654 --file | --fil | --fi | --f )
14655 $ac_shift
81ecdfbb
RW
14656 case $ac_optarg in
14657 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14658 esac
14659 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14660 ac_need_defaults=false;;
14661 --header | --heade | --head | --hea )
14662 $ac_shift
81ecdfbb
RW
14663 case $ac_optarg in
14664 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14665 esac
14666 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14667 ac_need_defaults=false;;
81ecdfbb
RW
14668 --he | --h)
14669 # Conflict between --help and --header
14670 as_fn_error "ambiguous option: \`$1'
14671Try \`$0 --help' for more information.";;
14672 --help | --hel | -h )
14673 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14674 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14675 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14676 ac_cs_silent=: ;;
c906108c 14677
bec39cab 14678 # This is an error.
81ecdfbb
RW
14679 -*) as_fn_error "unrecognized option: \`$1'
14680Try \`$0 --help' for more information." ;;
c906108c 14681
81ecdfbb
RW
14682 *) as_fn_append ac_config_targets " $1"
14683 ac_need_defaults=false ;;
c906108c 14684
bec39cab
AC
14685 esac
14686 shift
14687done
c906108c 14688
bec39cab 14689ac_configure_extra_args=
c906108c 14690
bec39cab
AC
14691if $ac_cs_silent; then
14692 exec 6>/dev/null
14693 ac_configure_extra_args="$ac_configure_extra_args --silent"
14694fi
c906108c 14695
bec39cab 14696_ACEOF
81ecdfbb 14697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14698if \$ac_cs_recheck; then
81ecdfbb
RW
14699 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14700 shift
14701 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14702 CONFIG_SHELL='$SHELL'
14703 export CONFIG_SHELL
14704 exec "\$@"
bec39cab
AC
14705fi
14706
14707_ACEOF
81ecdfbb
RW
14708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14709exec 5>>config.log
14710{
14711 echo
14712 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14713## Running $as_me. ##
14714_ASBOX
14715 $as_echo "$ac_log"
14716} >&5
bec39cab 14717
81ecdfbb
RW
14718_ACEOF
14719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14720#
81ecdfbb 14721# INIT-COMMANDS
c906108c 14722#
a417dc56 14723ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14724
bec39cab
AC
14725_ACEOF
14726
81ecdfbb 14727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14728
81ecdfbb 14729# Handling of arguments.
bec39cab 14730for ac_config_target in $ac_config_targets
c906108c 14731do
81ecdfbb
RW
14732 case $ac_config_target in
14733 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14734 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14735 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14736 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14737 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14738 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14739 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14740 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14741 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14742
14743 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14744 esac
14745done
14746
81ecdfbb 14747
bec39cab
AC
14748# If the user did not use the arguments to specify the items to instantiate,
14749# then the envvar interface is used. Set only those that are not.
14750# We use the long form for the default assignment because of an extremely
14751# bizarre bug on SunOS 4.1.3.
14752if $ac_need_defaults; then
14753 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14754 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14755 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14756 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14757fi
14758
b4e70030 14759# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14760# simply because there is no reason against having it here, and in addition,
b4e70030 14761# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14762# Hook for its removal unless debugging.
14763# Note that there is a small window in which the directory will not be cleaned:
14764# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14765$debug ||
14766{
81ecdfbb
RW
14767 tmp=
14768 trap 'exit_status=$?
14769 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14770' 0
14771 trap 'as_fn_exit 1' 1 2 13 15
14772}
14773# Create a (secure) tmp directory for tmp files.
14774
14775{
14776 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14777 test -n "$tmp" && test -d "$tmp"
14778} ||
14779{
14780 tmp=./conf$$-$RANDOM
14781 (umask 077 && mkdir "$tmp")
14782} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14783
14784# Set up the scripts for CONFIG_FILES section.
14785# No need to generate them if there are no CONFIG_FILES.
14786# This happens for instance with `./config.status config.h'.
14787if test -n "$CONFIG_FILES"; then
14788
14789if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14790 ac_cs_awk_getline=:
14791 ac_cs_awk_pipe_init=
14792 ac_cs_awk_read_file='
14793 while ((getline aline < (F[key])) > 0)
14794 print(aline)
14795 close(F[key])'
14796 ac_cs_awk_pipe_fini=
14797else
14798 ac_cs_awk_getline=false
14799 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14800 ac_cs_awk_read_file='
14801 print "|#_!!_#|"
14802 print "cat " F[key] " &&"
14803 '$ac_cs_awk_pipe_init
14804 # The final `:' finishes the AND list.
14805 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14806fi
14807ac_cr=`echo X | tr X '\015'`
14808# On cygwin, bash can eat \r inside `` if the user requested igncr.
14809# But we know of no other shell where ac_cr would be empty at this
14810# point, so we can use a bashism as a fallback.
14811if test "x$ac_cr" = x; then
14812 eval ac_cr=\$\'\\r\'
14813fi
14814ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14815if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14816 ac_cs_awk_cr='\r'
14817else
14818 ac_cs_awk_cr=$ac_cr
14819fi
14820
14821echo 'BEGIN {' >"$tmp/subs1.awk" &&
14822_ACEOF
14823
14824# Create commands to substitute file output variables.
14825{
14826 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14827 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14828 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14829 echo "_ACAWK" &&
14830 echo "_ACEOF"
14831} >conf$$files.sh &&
14832. ./conf$$files.sh ||
14833 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14834rm -f conf$$files.sh
14835
14836{
14837 echo "cat >conf$$subs.awk <<_ACEOF" &&
14838 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14839 echo "_ACEOF"
14840} >conf$$subs.sh ||
14841 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14842ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14843ac_delim='%!_!# '
14844for ac_last_try in false false false false false :; do
14845 . ./conf$$subs.sh ||
14846 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14847
14848 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14849 if test $ac_delim_n = $ac_delim_num; then
14850 break
14851 elif $ac_last_try; then
14852 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14853 else
14854 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14855 fi
14856done
14857rm -f conf$$subs.sh
14858
14859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14860cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14861_ACEOF
14862sed -n '
14863h
14864s/^/S["/; s/!.*/"]=/
14865p
14866g
14867s/^[^!]*!//
14868:repl
14869t repl
14870s/'"$ac_delim"'$//
14871t delim
14872:nl
14873h
14874s/\(.\{148\}\).*/\1/
14875t more1
14876s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14877p
14878n
14879b repl
14880:more1
14881s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14882p
14883g
14884s/.\{148\}//
14885t nl
14886:delim
14887h
14888s/\(.\{148\}\).*/\1/
14889t more2
14890s/["\\]/\\&/g; s/^/"/; s/$/"/
14891p
14892b
14893:more2
14894s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14895p
14896g
14897s/.\{148\}//
14898t delim
14899' <conf$$subs.awk | sed '
14900/^[^""]/{
14901 N
14902 s/\n//
14903}
14904' >>$CONFIG_STATUS || ac_write_fail=1
14905rm -f conf$$subs.awk
14906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14907_ACAWK
14908cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14909 for (key in S) S_is_set[key] = 1
14910 FS = "\a"
14911 \$ac_cs_awk_pipe_init
14912}
14913{
14914 line = $ 0
14915 nfields = split(line, field, "@")
14916 substed = 0
14917 len = length(field[1])
14918 for (i = 2; i < nfields; i++) {
14919 key = field[i]
14920 keylen = length(key)
14921 if (S_is_set[key]) {
14922 value = S[key]
14923 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14924 len += length(value) + length(field[++i])
14925 substed = 1
14926 } else
14927 len += 1 + keylen
14928 }
14929 if (nfields == 3 && !substed) {
14930 key = field[2]
14931 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14932 \$ac_cs_awk_read_file
14933 next
14934 }
14935 }
14936 print line
b4e70030 14937}
81ecdfbb
RW
14938\$ac_cs_awk_pipe_fini
14939_ACAWK
14940_ACEOF
14941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14942if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14943 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14944else
14945 cat
14946fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14947 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14948_ACEOF
14949
14950# VPATH may cause trouble with some makes, so we remove $(srcdir),
14951# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14952# trailing colons and then remove the whole line if VPATH becomes empty
14953# (actually we leave an empty line to preserve line numbers).
14954if test "x$srcdir" = x.; then
14955 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14956s/:*\$(srcdir):*/:/
14957s/:*\${srcdir}:*/:/
14958s/:*@srcdir@:*/:/
14959s/^\([^=]*=[ ]*\):*/\1/
14960s/:*$//
14961s/^[^=]*=[ ]*$//
14962}'
14963fi
14964
14965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14966fi # test -n "$CONFIG_FILES"
14967
14968# Set up the scripts for CONFIG_HEADERS section.
14969# No need to generate them if there are no CONFIG_HEADERS.
14970# This happens for instance with `./config.status Makefile'.
14971if test -n "$CONFIG_HEADERS"; then
14972cat >"$tmp/defines.awk" <<\_ACAWK ||
14973BEGIN {
14974_ACEOF
14975
14976# Transform confdefs.h into an awk script `defines.awk', embedded as
14977# here-document in config.status, that substitutes the proper values into
14978# config.h.in to produce config.h.
4e8d927d 14979
81ecdfbb
RW
14980# Create a delimiter string that does not exist in confdefs.h, to ease
14981# handling of long lines.
14982ac_delim='%!_!# '
14983for ac_last_try in false false :; do
14984 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14985 if test -z "$ac_t"; then
14986 break
14987 elif $ac_last_try; then
14988 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14989 else
14990 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14991 fi
14992done
4e8d927d 14993
81ecdfbb
RW
14994# For the awk script, D is an array of macro values keyed by name,
14995# likewise P contains macro parameters if any. Preserve backslash
14996# newline sequences.
14997
14998ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14999sed -n '
15000s/.\{148\}/&'"$ac_delim"'/g
15001t rset
15002:rset
15003s/^[ ]*#[ ]*define[ ][ ]*/ /
15004t def
15005d
15006:def
15007s/\\$//
15008t bsnl
15009s/["\\]/\\&/g
15010s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15011D["\1"]=" \3"/p
15012s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15013d
15014:bsnl
15015s/["\\]/\\&/g
15016s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15017D["\1"]=" \3\\\\\\n"\\/p
15018t cont
15019s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15020t cont
15021d
15022:cont
15023n
15024s/.\{148\}/&'"$ac_delim"'/g
15025t clear
15026:clear
15027s/\\$//
15028t bsnlc
15029s/["\\]/\\&/g; s/^/"/; s/$/"/p
15030d
15031:bsnlc
15032s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15033b cont
15034' <confdefs.h | sed '
15035s/'"$ac_delim"'/"\\\
15036"/g' >>$CONFIG_STATUS || ac_write_fail=1
15037
15038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15039 for (key in D) D_is_set[key] = 1
15040 FS = "\a"
15041}
15042/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15043 line = \$ 0
15044 split(line, arg, " ")
15045 if (arg[1] == "#") {
15046 defundef = arg[2]
15047 mac1 = arg[3]
15048 } else {
15049 defundef = substr(arg[1], 2)
15050 mac1 = arg[2]
15051 }
15052 split(mac1, mac2, "(") #)
15053 macro = mac2[1]
15054 prefix = substr(line, 1, index(line, defundef) - 1)
15055 if (D_is_set[macro]) {
15056 # Preserve the white space surrounding the "#".
15057 print prefix "define", macro P[macro] D[macro]
15058 next
15059 } else {
15060 # Replace #undef with comments. This is necessary, for example,
15061 # in the case of _POSIX_SOURCE, which is predefined and required
15062 # on some systems where configure will not decide to define it.
15063 if (defundef == "undef") {
15064 print "/*", prefix defundef, macro, "*/"
15065 next
15066 }
15067 }
b4e70030 15068}
81ecdfbb
RW
15069{ print }
15070_ACAWK
b4e70030 15071_ACEOF
81ecdfbb
RW
15072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15073 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15074fi # test -n "$CONFIG_HEADERS"
4e8d927d 15075
4e8d927d 15076
81ecdfbb
RW
15077eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15078shift
15079for ac_tag
15080do
15081 case $ac_tag in
15082 :[FHLC]) ac_mode=$ac_tag; continue;;
15083 esac
15084 case $ac_mode$ac_tag in
15085 :[FHL]*:*);;
15086 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15087 :[FH]-) ac_tag=-:-;;
15088 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15089 esac
15090 ac_save_IFS=$IFS
15091 IFS=:
15092 set x $ac_tag
15093 IFS=$ac_save_IFS
15094 shift
15095 ac_file=$1
15096 shift
4e8d927d 15097
81ecdfbb
RW
15098 case $ac_mode in
15099 :L) ac_source=$1;;
15100 :[FH])
15101 ac_file_inputs=
15102 for ac_f
15103 do
15104 case $ac_f in
15105 -) ac_f="$tmp/stdin";;
15106 *) # Look for the file first in the build tree, then in the source tree
15107 # (if the path is not absolute). The absolute path cannot be DOS-style,
15108 # because $ac_f cannot contain `:'.
15109 test -f "$ac_f" ||
15110 case $ac_f in
15111 [\\/$]*) false;;
15112 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15113 esac ||
15114 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15115 esac
15116 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15117 as_fn_append ac_file_inputs " '$ac_f'"
15118 done
15119
15120 # Let's still pretend it is `configure' which instantiates (i.e., don't
15121 # use $as_me), people would be surprised to read:
15122 # /* config.h. Generated by config.status. */
15123 configure_input='Generated from '`
15124 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15125 `' by configure.'
15126 if test x"$ac_file" != x-; then
15127 configure_input="$ac_file. $configure_input"
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15129$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15130 fi
81ecdfbb
RW
15131 # Neutralize special characters interpreted by sed in replacement strings.
15132 case $configure_input in #(
15133 *\&* | *\|* | *\\* )
15134 ac_sed_conf_input=`$as_echo "$configure_input" |
15135 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15136 *) ac_sed_conf_input=$configure_input;;
15137 esac
4e8d927d 15138
81ecdfbb
RW
15139 case $ac_tag in
15140 *:-:* | *:-) cat >"$tmp/stdin" \
15141 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15142 esac
15143 ;;
c906108c
SS
15144 esac
15145
81ecdfbb 15146 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15147$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15148 X"$ac_file" : 'X\(//\)[^/]' \| \
15149 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15150 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15151$as_echo X"$ac_file" |
15152 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15153 s//\1/
15154 q
15155 }
15156 /^X\(\/\/\)[^/].*/{
15157 s//\1/
15158 q
15159 }
15160 /^X\(\/\/\)$/{
15161 s//\1/
15162 q
15163 }
15164 /^X\(\/\).*/{
15165 s//\1/
15166 q
15167 }
15168 s/.*/./; q'`
15169 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15170 ac_builddir=.
15171
81ecdfbb
RW
15172case "$ac_dir" in
15173.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15174*)
15175 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15176 # A ".." for each directory in $ac_dir_suffix.
15177 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15178 case $ac_top_builddir_sub in
15179 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15180 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15181 esac ;;
15182esac
15183ac_abs_top_builddir=$ac_pwd
15184ac_abs_builddir=$ac_pwd$ac_dir_suffix
15185# for backward compatibility:
15186ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15187
15188case $srcdir in
81ecdfbb 15189 .) # We are building in place.
bec39cab 15190 ac_srcdir=.
81ecdfbb
RW
15191 ac_top_srcdir=$ac_top_builddir_sub
15192 ac_abs_top_srcdir=$ac_pwd ;;
15193 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15194 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15195 ac_top_srcdir=$srcdir
15196 ac_abs_top_srcdir=$srcdir ;;
15197 *) # Relative name.
15198 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15199 ac_top_srcdir=$ac_top_build_prefix$srcdir
15200 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15201esac
81ecdfbb 15202ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15203
c906108c 15204
81ecdfbb
RW
15205 case $ac_mode in
15206 :F)
15207 #
15208 # CONFIG_FILE
15209 #
c906108c 15210
bec39cab
AC
15211 case $INSTALL in
15212 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15213 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15214 esac
81ecdfbb 15215_ACEOF
121ce6e5 15216
81ecdfbb
RW
15217cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15218# If the template does not know about datarootdir, expand it.
15219# FIXME: This hack should be removed a few years after 2.60.
15220ac_datarootdir_hack=; ac_datarootdir_seen=
15221ac_sed_dataroot='
15222/datarootdir/ {
15223 p
15224 q
15225}
15226/@datadir@/p
15227/@docdir@/p
15228/@infodir@/p
15229/@localedir@/p
15230/@mandir@/p'
15231case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15232*datarootdir*) ac_datarootdir_seen=yes;;
15233*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15234 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15235$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15236_ACEOF
15237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15238 ac_datarootdir_hack='
15239 s&@datadir@&$datadir&g
15240 s&@docdir@&$docdir&g
15241 s&@infodir@&$infodir&g
15242 s&@localedir@&$localedir&g
15243 s&@mandir@&$mandir&g
15244 s&\\\${datarootdir}&$datarootdir&g' ;;
15245esac
4e8d927d 15246_ACEOF
81ecdfbb
RW
15247
15248# Neutralize VPATH when `$srcdir' = `.'.
15249# Shell code in configure.ac might set extrasub.
15250# FIXME: do we really want to maintain this feature?
15251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15252ac_sed_extra="$ac_vpsub
bec39cab
AC
15253$extrasub
15254_ACEOF
81ecdfbb 15255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
15256:t
15257/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
15258s|@configure_input@|$ac_sed_conf_input|;t t
15259s&@top_builddir@&$ac_top_builddir_sub&;t t
15260s&@top_build_prefix@&$ac_top_build_prefix&;t t
15261s&@srcdir@&$ac_srcdir&;t t
15262s&@abs_srcdir@&$ac_abs_srcdir&;t t
15263s&@top_srcdir@&$ac_top_srcdir&;t t
15264s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15265s&@builddir@&$ac_builddir&;t t
15266s&@abs_builddir@&$ac_abs_builddir&;t t
15267s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15268s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
15269$ac_datarootdir_hack
15270"
15271eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15272if $ac_cs_awk_getline; then
15273 $AWK -f "$tmp/subs.awk"
15274else
15275 $AWK -f "$tmp/subs.awk" | $SHELL
15276fi >$tmp/out \
15277 || as_fn_error "could not create $ac_file" "$LINENO" 5
15278
15279test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15280 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15281 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15283which seems to be undefined. Please make sure it is defined." >&5
15284$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15285which seems to be undefined. Please make sure it is defined." >&2;}
15286
15287 rm -f "$tmp/stdin"
bec39cab 15288 case $ac_file in
81ecdfbb
RW
15289 -) cat "$tmp/out" && rm -f "$tmp/out";;
15290 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15291 esac \
15292 || as_fn_error "could not create $ac_file" "$LINENO" 5
15293 ;;
15294 :H)
15295 #
15296 # CONFIG_HEADER
15297 #
bec39cab 15298 if test x"$ac_file" != x-; then
81ecdfbb
RW
15299 {
15300 $as_echo "/* $configure_input */" \
15301 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15302 } >"$tmp/config.h" \
15303 || as_fn_error "could not create $ac_file" "$LINENO" 5
15304 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15306$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 15307 else
81ecdfbb
RW
15308 rm -f "$ac_file"
15309 mv "$tmp/config.h" "$ac_file" \
15310 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
15311 fi
15312 else
81ecdfbb
RW
15313 $as_echo "/* $configure_input */" \
15314 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15315 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 15316 fi
81ecdfbb
RW
15317 ;;
15318 :L)
15319 #
15320 # CONFIG_LINK
15321 #
c906108c 15322
81ecdfbb
RW
15323 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15324 :
b4e70030 15325 else
81ecdfbb
RW
15326 # Prefer the file from the source tree if names are identical.
15327 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15328 ac_source=$srcdir/$ac_source
15329 fi
b4e70030 15330
81ecdfbb
RW
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15332$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 15333
81ecdfbb
RW
15334 if test ! -r "$ac_source"; then
15335 as_fn_error "$ac_source: file not found" "$LINENO" 5
15336 fi
15337 rm -f "$ac_file"
bec39cab 15338
81ecdfbb
RW
15339 # Try a relative symlink, then a hard link, then a copy.
15340 case $srcdir in
15341 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15342 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15343 esac
15344 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15345 ln "$ac_source" "$ac_file" 2>/dev/null ||
15346 cp -p "$ac_source" "$ac_file" ||
15347 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15348 fi
15349 ;;
15350 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15351$as_echo "$as_me: executing $ac_file commands" >&6;}
15352 ;;
c906108c 15353 esac
b4e70030 15354
bec39cab 15355
81ecdfbb
RW
15356 case $ac_file$ac_mode in
15357 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 15358 "default":C)
c906108c
SS
15359case x$CONFIG_HEADERS in
15360xconfig.h:config.in)
15361echo > stamp-h ;;
15362esac
bec39cab 15363 ;;
81ecdfbb 15364
bec39cab 15365 esac
81ecdfbb 15366done # for ac_tag
c906108c 15367
bec39cab 15368
81ecdfbb 15369as_fn_exit 0
bec39cab 15370_ACEOF
bec39cab
AC
15371ac_clean_files=$ac_clean_files_save
15372
81ecdfbb
RW
15373test $ac_write_fail = 0 ||
15374 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
15375
bec39cab
AC
15376
15377# configure is writing to config.log, and then calls config.status.
15378# config.status does its own redirection, appending to config.log.
15379# Unfortunately, on DOS this fails, as config.log is still kept open
15380# by configure, so config.status won't be able to write to it; its
15381# output is simply discarded. So we exec the FD to /dev/null,
15382# effectively closing config.log, so it can be properly (re)opened and
15383# appended to by config.status. When coming back to configure, we
15384# need to make the FD available again.
15385if test "$no_create" != yes; then
15386 ac_cs_success=:
15387 ac_config_status_args=
15388 test "$silent" = yes &&
15389 ac_config_status_args="$ac_config_status_args --quiet"
15390 exec 5>/dev/null
15391 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15392 exec 5>>config.log
15393 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15394 # would make configure fail if this is the last instruction.
81ecdfbb 15395 $ac_cs_success || as_fn_exit $?
bec39cab 15396fi
c906108c 15397
bec39cab 15398#
81ecdfbb 15399# CONFIG_SUBDIRS section.
bec39cab 15400#
c906108c
SS
15401if test "$no_recursion" != yes; then
15402
81ecdfbb
RW
15403 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
15404 # so they do not pile up.
c906108c
SS
15405 ac_sub_configure_args=
15406 ac_prev=
fdc59709
PB
15407 eval "set x $ac_configure_args"
15408 shift
15409 for ac_arg
15410 do
c906108c
SS
15411 if test -n "$ac_prev"; then
15412 ac_prev=
15413 continue
15414 fi
bec39cab 15415 case $ac_arg in
c906108c
SS
15416 -cache-file | --cache-file | --cache-fil | --cache-fi \
15417 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
15418 ac_prev=cache_file ;;
15419 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
15420 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
15421 | --c=*)
15422 ;;
15423 --config-cache | -C)
c906108c
SS
15424 ;;
15425 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
15426 ac_prev=srcdir ;;
15427 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
15428 ;;
bec39cab
AC
15429 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
15430 ac_prev=prefix ;;
15431 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
15432 ;;
81ecdfbb
RW
15433 --disable-option-checking)
15434 ;;
fdc59709
PB
15435 *)
15436 case $ac_arg in
81ecdfbb 15437 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 15438 esac
81ecdfbb 15439 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
15440 esac
15441 done
15442
bec39cab
AC
15443 # Always prepend --prefix to ensure using the same prefix
15444 # in subdir configurations.
fdc59709
PB
15445 ac_arg="--prefix=$prefix"
15446 case $ac_arg in
81ecdfbb 15447 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 15448 esac
81ecdfbb
RW
15449 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
15450
15451 # Pass --silent
15452 if test "$silent" = yes; then
15453 ac_sub_configure_args="--silent $ac_sub_configure_args"
15454 fi
15455
15456 # Always prepend --disable-option-checking to silence warnings, since
15457 # different subdirs can have different --enable and --with options.
15458 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 15459
b4e70030 15460 ac_popdir=`pwd`
bec39cab 15461 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
15462
15463 # Do not complain, so a configure script can configure whichever
15464 # parts of a large source tree are present.
fdc59709 15465 test -d "$srcdir/$ac_dir" || continue
c906108c 15466
81ecdfbb
RW
15467 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
15468 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
15469 $as_echo "$ac_msg" >&6
15470 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15471 ac_builddir=.
15472
81ecdfbb
RW
15473case "$ac_dir" in
15474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15475*)
15476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15477 # A ".." for each directory in $ac_dir_suffix.
15478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15479 case $ac_top_builddir_sub in
15480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15482 esac ;;
15483esac
15484ac_abs_top_builddir=$ac_pwd
15485ac_abs_builddir=$ac_pwd$ac_dir_suffix
15486# for backward compatibility:
15487ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15488
15489case $srcdir in
81ecdfbb 15490 .) # We are building in place.
bec39cab 15491 ac_srcdir=.
81ecdfbb
RW
15492 ac_top_srcdir=$ac_top_builddir_sub
15493 ac_abs_top_srcdir=$ac_pwd ;;
15494 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15495 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15496 ac_top_srcdir=$srcdir
15497 ac_abs_top_srcdir=$srcdir ;;
15498 *) # Relative name.
15499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15500 ac_top_srcdir=$ac_top_build_prefix$srcdir
15501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15502esac
81ecdfbb 15503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 15504
c906108c 15505
fdc59709 15506 cd "$ac_dir"
c906108c
SS
15507
15508 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
15509 if test -f "$ac_srcdir/configure.gnu"; then
15510 ac_sub_configure=$ac_srcdir/configure.gnu
15511 elif test -f "$ac_srcdir/configure"; then
15512 ac_sub_configure=$ac_srcdir/configure
15513 elif test -f "$ac_srcdir/configure.in"; then
15514 # This should be Cygnus configure.
15515 ac_sub_configure=$ac_aux_dir/configure
c906108c 15516 else
81ecdfbb
RW
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
15518$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
15519 ac_sub_configure=
15520 fi
15521
15522 # The recursion is here.
15523 if test -n "$ac_sub_configure"; then
c906108c 15524 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
15525 case $cache_file in
15526 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
15527 *) # Relative name.
15528 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 15529 esac
c906108c 15530
81ecdfbb
RW
15531 { $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
15532$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 15533 # The eval makes quoting arguments work.
fdc59709
PB
15534 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
15535 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 15536 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
15537 fi
15538
fdc59709 15539 cd "$ac_popdir"
c906108c
SS
15540 done
15541fi
81ecdfbb
RW
15542if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15544$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15545fi
c906108c
SS
15546
15547
15548exit 0