* symtab.c (symbol_set_names): Correctly set 'name' on symbol when
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
81ecdfbb
RW
592enable_option_checking=no
593ac_subst_vars='am__EXEEXT_FALSE
594am__EXEEXT_TRUE
595gltests_LTLIBOBJS
596gltests_LIBOBJS
597gl_LTLIBOBJS
598gl_LIBOBJS
599LTLIBOBJS
600LIBOBJS
601GDB_NM_FILE
602frags
603target_subdir
604CONFIG_UNINSTALL
605CONFIG_INSTALL
606CONFIG_CLEAN
607CONFIG_ALL
608CONFIG_SRCS
609CONFIG_DEPS
610CONFIG_OBS
611PROFILE_CFLAGS
612ENABLE_CFLAGS
613SIM_OBS
614SIM
615XMKMF
616GDBTK_SRC_DIR
617GDBTK_CFLAGS
618GDBTKLIBS
619X_LIBS
620X_LDFLAGS
621X_CFLAGS
622TK_XINCLUDES
623TK_DEPS
624TK_LIBRARY
625TK_INCLUDE
626TK_STUB_LIB_SPEC
627TK_STUB_LIB_FLAG
628TK_STUB_LIB_FILE
629TK_LIB_SPEC
630TK_LIB_FLAG
631TK_LIB_FILE
632TK_SRC_DIR
633TK_BIN_DIR
634TK_VERSION
635TCL_DEPS
636TCL_LIBRARY
637TCL_INCLUDE
638TCL_STUB_LIB_SPEC
639TCL_STUB_LIB_FLAG
640TCL_STUB_LIB_FILE
641TCL_LIB_SPEC
642TCL_LIB_FLAG
643TCL_LIB_FILE
644TCL_SRC_DIR
645TCL_BIN_DIR
646TCL_PATCH_LEVEL
647TCL_VERSION
648WIN32LDAPP
649GUI_CFLAGS_X
650LIBGUI
651WIN32LIBS
652SER_HARDWIRE
653WERROR_CFLAGS
654WARN_CFLAGS
655SYSTEM_GDBINIT
656TARGET_SYSTEM_ROOT_DEFINE
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
659ALLOCA
660PYTHON_CFLAGS
661LTLIBEXPAT
662LIBEXPAT
663HAVE_LIBEXPAT
664READLINE_CFLAGS
665READLINE_DEPS
666READLINE
667MIG
668WINDRES
669DLLTOOL
670AR
671YFLAGS
672YACC
673LN_S
674REPORT_BUGS_TEXI
675REPORT_BUGS_TO
676PKGVERSION
677TARGET_OBS
678subdirs
679GDB_DATADIR
680DEBUGDIR
681am__fastdepCC_FALSE
682am__fastdepCC_TRUE
683AMDEPBACKSLASH
684AMDEP_FALSE
685AMDEP_TRUE
686am__quote
687am__include
688am__untar
689am__tar
690AMTAR
691AWK
692mkdir_p
693MKDIR_P
694INSTALL_STRIP_PROGRAM
695STRIP
696install_sh
697MAKEINFO
698AUTOHEADER
699AUTOMAKE
700AUTOCONF
701ACLOCAL
702VERSION
703CYGPATH_W
704am__isrc
705INSTALL_DATA
706INSTALL_SCRIPT
707INSTALL_PROGRAM
708PACKAGE
709GNULIB_STDINT_H
710LIBGNU_LTLIBDEPS
711LIBGNU_LIBDEPS
712NEXT_WCHAR_H
713HAVE_WCHAR_H
714WCHAR_H
715REPLACE_WCWIDTH
716HAVE_DECL_WCWIDTH
717GNULIB_WCWIDTH
718NEXT_STRING_H
719STDINT_H
720WINT_T_SUFFIX
721WCHAR_T_SUFFIX
722SIZE_T_SUFFIX
723SIG_ATOMIC_T_SUFFIX
724PTRDIFF_T_SUFFIX
725HAVE_SIGNED_WINT_T
726HAVE_SIGNED_WCHAR_T
727HAVE_SIGNED_SIG_ATOMIC_T
728BITSIZEOF_WINT_T
729BITSIZEOF_WCHAR_T
730BITSIZEOF_SIZE_T
731BITSIZEOF_SIG_ATOMIC_T
732BITSIZEOF_PTRDIFF_T
733HAVE_SYS_BITYPES_H
734HAVE_SYS_INTTYPES_H
735HAVE_STDINT_H
736NEXT_STDINT_H
737INCLUDE_NEXT
738HAVE_SYS_TYPES_H
739HAVE_INTTYPES_H
740HAVE_UNSIGNED_LONG_LONG_INT
741HAVE_LONG_LONG_INT
742REPLACE_STRSTR
743REPLACE_STRCASESTR
744REPLACE_MEMMEM
745REPLACE_STRSIGNAL
746REPLACE_STRERROR
747HAVE_DECL_STRSIGNAL
748HAVE_DECL_STRERROR
749HAVE_DECL_STRTOK_R
750HAVE_STRCASESTR
751HAVE_STRSEP
752HAVE_STRPBRK
753HAVE_DECL_STRNLEN
754HAVE_DECL_STRNDUP
755HAVE_STRNDUP
756HAVE_DECL_STRDUP
757HAVE_STRCHRNUL
758HAVE_STPNCPY
759HAVE_STPCPY
760HAVE_DECL_MEMRCHR
761HAVE_MEMPCPY
762HAVE_DECL_MEMMEM
763GNULIB_STRSIGNAL
764GNULIB_STRERROR
765GNULIB_MBSTOK_R
766GNULIB_MBSSEP
767GNULIB_MBSSPN
768GNULIB_MBSPBRK
769GNULIB_MBSCSPN
770GNULIB_MBSCASESTR
771GNULIB_MBSPCASECMP
772GNULIB_MBSNCASECMP
773GNULIB_MBSCASECMP
774GNULIB_MBSSTR
775GNULIB_MBSRCHR
776GNULIB_MBSCHR
777GNULIB_MBSNLEN
778GNULIB_MBSLEN
779GNULIB_STRTOK_R
780GNULIB_STRCASESTR
781GNULIB_STRSTR
782GNULIB_STRSEP
783GNULIB_STRPBRK
784GNULIB_STRNLEN
785GNULIB_STRNDUP
786GNULIB_STRDUP
787GNULIB_STRCHRNUL
788GNULIB_STPNCPY
789GNULIB_STPCPY
790GNULIB_MEMRCHR
791GNULIB_MEMPCPY
792GNULIB_MEMMEM
793GL_COND_LIBTOOL_FALSE
794GL_COND_LIBTOOL_TRUE
795CATOBJEXT
796GENCAT
797INSTOBJEXT
798DATADIRNAME
799CATALOGS
800POSUB
801GMSGFMT
802XGETTEXT
803INCINTL
804LIBINTL_DEP
805LIBINTL
806USE_NLS
807SET_MAKE
808GMAKE_FALSE
809GMAKE_TRUE
810MAKE
811CCDEPMODE
812DEPDIR
813am__leading_dot
814target_os
815target_vendor
816target_cpu
817target
818host_os
819host_vendor
820host_cpu
821host
822build_os
823build_vendor
824build_cpu
825build
826RANLIB
827EGREP
828GREP
829CPP
830OBJEXT
831EXEEXT
832ac_ct_CC
833CPPFLAGS
834LDFLAGS
835CFLAGS
836CC
837MAINT
838MAINTAINER_MODE_FALSE
839MAINTAINER_MODE_TRUE
840target_alias
841host_alias
842build_alias
843LIBS
844ECHO_T
845ECHO_N
846ECHO_C
847DEFS
848mandir
849localedir
850libdir
851psdir
852pdfdir
853dvidir
854htmldir
855infodir
856docdir
857oldincludedir
858includedir
859localstatedir
860sharedstatedir
861sysconfdir
862datadir
863datarootdir
864libexecdir
865sbindir
866bindir
867program_transform_name
868prefix
869exec_prefix
870PACKAGE_URL
871PACKAGE_BUGREPORT
872PACKAGE_STRING
873PACKAGE_VERSION
874PACKAGE_TARNAME
875PACKAGE_NAME
876PATH_SEPARATOR
877SHELL'
a4ce5b0d 878ac_subst_files='host_makefile_frag'
81ecdfbb
RW
879ac_user_opts='
880enable_option_checking
881enable_maintainer_mode
da2f07f1
JK
882enable_plugins
883enable_largefile
81ecdfbb
RW
884enable_dependency_tracking
885with_separate_debug_dir
886with_gdb_datadir
887with_relocated_sources
888enable_targets
889enable_64_bit_bfd
890enable_gdbcli
891enable_gdbmi
892enable_tui
893enable_gdbtk
894with_libunwind
895with_curses
896enable_profiling
897with_pkgversion
898with_bugurl
899with_libiconv_prefix
900with_system_readline
901with_expat
902with_gnu_ld
903enable_rpath
904with_libexpat_prefix
905with_python
906with_included_regex
907with_sysroot
908with_system_gdbinit
909enable_werror
910enable_build_warnings
911enable_gdb_build_warnings
912with_tcl
913with_tk
914with_x
915enable_sim
916enable_multi_ice
81ecdfbb
RW
917'
918 ac_precious_vars='build_alias
919host_alias
920target_alias
921CC
922CFLAGS
923LDFLAGS
924LIBS
925CPPFLAGS
926CPP
927YACC
928YFLAGS
929XMKMF'
930ac_subdirs_all='doc testsuite
931gdbtk
932multi-ice
933gdbserver'
c906108c
SS
934
935# Initialize some variables set by options.
bec39cab
AC
936ac_init_help=
937ac_init_version=false
81ecdfbb
RW
938ac_unrecognized_opts=
939ac_unrecognized_sep=
c906108c
SS
940# The variables have the same names as the options, with
941# dashes changed to underlines.
bec39cab 942cache_file=/dev/null
c906108c 943exec_prefix=NONE
c906108c 944no_create=
c906108c
SS
945no_recursion=
946prefix=NONE
947program_prefix=NONE
948program_suffix=NONE
949program_transform_name=s,x,x,
950silent=
951site=
952srcdir=
c906108c
SS
953verbose=
954x_includes=NONE
955x_libraries=NONE
bec39cab
AC
956
957# Installation directory options.
958# These are left unexpanded so users can "make install exec_prefix=/foo"
959# and all the variables that are supposed to be based on exec_prefix
960# by default will actually change.
961# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 962# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
963bindir='${exec_prefix}/bin'
964sbindir='${exec_prefix}/sbin'
965libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
966datarootdir='${prefix}/share'
967datadir='${datarootdir}'
c906108c
SS
968sysconfdir='${prefix}/etc'
969sharedstatedir='${prefix}/com'
970localstatedir='${prefix}/var'
c906108c
SS
971includedir='${prefix}/include'
972oldincludedir='/usr/include'
81ecdfbb
RW
973docdir='${datarootdir}/doc/${PACKAGE}'
974infodir='${datarootdir}/info'
975htmldir='${docdir}'
976dvidir='${docdir}'
977pdfdir='${docdir}'
978psdir='${docdir}'
979libdir='${exec_prefix}/lib'
980localedir='${datarootdir}/locale'
981mandir='${datarootdir}/man'
c906108c 982
c906108c 983ac_prev=
81ecdfbb 984ac_dashdash=
c906108c
SS
985for ac_option
986do
c906108c
SS
987 # If the previous option needs an argument, assign it.
988 if test -n "$ac_prev"; then
81ecdfbb 989 eval $ac_prev=\$ac_option
c906108c
SS
990 ac_prev=
991 continue
992 fi
993
81ecdfbb
RW
994 case $ac_option in
995 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
996 *) ac_optarg=yes ;;
997 esac
c906108c
SS
998
999 # Accept the important Cygnus configure options, so we can diagnose typos.
1000
81ecdfbb
RW
1001 case $ac_dashdash$ac_option in
1002 --)
1003 ac_dashdash=yes ;;
c906108c
SS
1004
1005 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1006 ac_prev=bindir ;;
1007 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1008 bindir=$ac_optarg ;;
c906108c
SS
1009
1010 -build | --build | --buil | --bui | --bu)
bec39cab 1011 ac_prev=build_alias ;;
c906108c 1012 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1013 build_alias=$ac_optarg ;;
c906108c
SS
1014
1015 -cache-file | --cache-file | --cache-fil | --cache-fi \
1016 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1017 ac_prev=cache_file ;;
1018 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1019 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1020 cache_file=$ac_optarg ;;
1021
1022 --config-cache | -C)
1023 cache_file=config.cache ;;
c906108c 1024
81ecdfbb 1025 -datadir | --datadir | --datadi | --datad)
c906108c 1026 ac_prev=datadir ;;
81ecdfbb 1027 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1028 datadir=$ac_optarg ;;
c906108c 1029
81ecdfbb
RW
1030 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1031 | --dataroo | --dataro | --datar)
1032 ac_prev=datarootdir ;;
1033 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1034 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1035 datarootdir=$ac_optarg ;;
1036
c906108c 1037 -disable-* | --disable-*)
81ecdfbb 1038 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1039 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1045 *"
1046"enable_$ac_useropt"
1047"*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=no ;;
1052
1053 -docdir | --docdir | --docdi | --doc | --do)
1054 ac_prev=docdir ;;
1055 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1056 docdir=$ac_optarg ;;
1057
1058 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1059 ac_prev=dvidir ;;
1060 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1061 dvidir=$ac_optarg ;;
c906108c
SS
1062
1063 -enable-* | --enable-*)
81ecdfbb 1064 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1065 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1066 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1067 as_fn_error "invalid feature name: $ac_useropt"
1068 ac_useropt_orig=$ac_useropt
1069 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1070 case $ac_user_opts in
1071 *"
1072"enable_$ac_useropt"
1073"*) ;;
1074 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1075 ac_unrecognized_sep=', ';;
b4e70030 1076 esac
81ecdfbb 1077 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1078
1079 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1080 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1081 | --exec | --exe | --ex)
1082 ac_prev=exec_prefix ;;
1083 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1084 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1085 | --exec=* | --exe=* | --ex=*)
bec39cab 1086 exec_prefix=$ac_optarg ;;
c906108c
SS
1087
1088 -gas | --gas | --ga | --g)
1089 # Obsolete; use --with-gas.
1090 with_gas=yes ;;
1091
bec39cab
AC
1092 -help | --help | --hel | --he | -h)
1093 ac_init_help=long ;;
1094 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1095 ac_init_help=recursive ;;
1096 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1097 ac_init_help=short ;;
c906108c
SS
1098
1099 -host | --host | --hos | --ho)
bec39cab 1100 ac_prev=host_alias ;;
c906108c 1101 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1102 host_alias=$ac_optarg ;;
c906108c 1103
81ecdfbb
RW
1104 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1105 ac_prev=htmldir ;;
1106 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1107 | --ht=*)
1108 htmldir=$ac_optarg ;;
1109
c906108c
SS
1110 -includedir | --includedir | --includedi | --included | --include \
1111 | --includ | --inclu | --incl | --inc)
1112 ac_prev=includedir ;;
1113 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1114 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1115 includedir=$ac_optarg ;;
c906108c
SS
1116
1117 -infodir | --infodir | --infodi | --infod | --info | --inf)
1118 ac_prev=infodir ;;
1119 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1120 infodir=$ac_optarg ;;
c906108c
SS
1121
1122 -libdir | --libdir | --libdi | --libd)
1123 ac_prev=libdir ;;
1124 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1125 libdir=$ac_optarg ;;
c906108c
SS
1126
1127 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1128 | --libexe | --libex | --libe)
1129 ac_prev=libexecdir ;;
1130 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1131 | --libexe=* | --libex=* | --libe=*)
bec39cab 1132 libexecdir=$ac_optarg ;;
c906108c 1133
81ecdfbb
RW
1134 -localedir | --localedir | --localedi | --localed | --locale)
1135 ac_prev=localedir ;;
1136 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1137 localedir=$ac_optarg ;;
1138
c906108c 1139 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1140 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1141 ac_prev=localstatedir ;;
1142 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1143 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1144 localstatedir=$ac_optarg ;;
c906108c
SS
1145
1146 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1147 ac_prev=mandir ;;
1148 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1149 mandir=$ac_optarg ;;
c906108c
SS
1150
1151 -nfp | --nfp | --nf)
1152 # Obsolete; use --without-fp.
1153 with_fp=no ;;
1154
1155 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1156 | --no-cr | --no-c | -n)
c906108c
SS
1157 no_create=yes ;;
1158
1159 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1160 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1161 no_recursion=yes ;;
1162
1163 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1164 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1165 | --oldin | --oldi | --old | --ol | --o)
1166 ac_prev=oldincludedir ;;
1167 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1168 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1169 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1170 oldincludedir=$ac_optarg ;;
c906108c
SS
1171
1172 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1173 ac_prev=prefix ;;
1174 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1175 prefix=$ac_optarg ;;
c906108c
SS
1176
1177 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1178 | --program-pre | --program-pr | --program-p)
1179 ac_prev=program_prefix ;;
1180 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1181 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1182 program_prefix=$ac_optarg ;;
c906108c
SS
1183
1184 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1185 | --program-suf | --program-su | --program-s)
1186 ac_prev=program_suffix ;;
1187 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1188 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1189 program_suffix=$ac_optarg ;;
c906108c
SS
1190
1191 -program-transform-name | --program-transform-name \
1192 | --program-transform-nam | --program-transform-na \
1193 | --program-transform-n | --program-transform- \
1194 | --program-transform | --program-transfor \
1195 | --program-transfo | --program-transf \
1196 | --program-trans | --program-tran \
1197 | --progr-tra | --program-tr | --program-t)
1198 ac_prev=program_transform_name ;;
1199 -program-transform-name=* | --program-transform-name=* \
1200 | --program-transform-nam=* | --program-transform-na=* \
1201 | --program-transform-n=* | --program-transform-=* \
1202 | --program-transform=* | --program-transfor=* \
1203 | --program-transfo=* | --program-transf=* \
1204 | --program-trans=* | --program-tran=* \
1205 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1206 program_transform_name=$ac_optarg ;;
c906108c 1207
81ecdfbb
RW
1208 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1209 ac_prev=pdfdir ;;
1210 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1211 pdfdir=$ac_optarg ;;
1212
1213 -psdir | --psdir | --psdi | --psd | --ps)
1214 ac_prev=psdir ;;
1215 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1216 psdir=$ac_optarg ;;
1217
c906108c
SS
1218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1219 | -silent | --silent | --silen | --sile | --sil)
1220 silent=yes ;;
1221
1222 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1223 ac_prev=sbindir ;;
1224 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1225 | --sbi=* | --sb=*)
bec39cab 1226 sbindir=$ac_optarg ;;
c906108c
SS
1227
1228 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1229 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1230 | --sharedst | --shareds | --shared | --share | --shar \
1231 | --sha | --sh)
1232 ac_prev=sharedstatedir ;;
1233 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1234 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1235 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1236 | --sha=* | --sh=*)
bec39cab 1237 sharedstatedir=$ac_optarg ;;
c906108c
SS
1238
1239 -site | --site | --sit)
1240 ac_prev=site ;;
1241 -site=* | --site=* | --sit=*)
bec39cab 1242 site=$ac_optarg ;;
3ace7edb 1243
c906108c
SS
1244 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1245 ac_prev=srcdir ;;
1246 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1247 srcdir=$ac_optarg ;;
c906108c
SS
1248
1249 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1250 | --syscon | --sysco | --sysc | --sys | --sy)
1251 ac_prev=sysconfdir ;;
1252 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1253 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1254 sysconfdir=$ac_optarg ;;
c906108c
SS
1255
1256 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1257 ac_prev=target_alias ;;
c906108c 1258 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1259 target_alias=$ac_optarg ;;
c906108c
SS
1260
1261 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1262 verbose=yes ;;
1263
bec39cab
AC
1264 -version | --version | --versio | --versi | --vers | -V)
1265 ac_init_version=: ;;
c906108c
SS
1266
1267 -with-* | --with-*)
81ecdfbb 1268 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1269 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1270 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1271 as_fn_error "invalid package name: $ac_useropt"
1272 ac_useropt_orig=$ac_useropt
1273 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1274 case $ac_user_opts in
1275 *"
1276"with_$ac_useropt"
1277"*) ;;
1278 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1279 ac_unrecognized_sep=', ';;
b4e70030 1280 esac
81ecdfbb 1281 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1282
1283 -without-* | --without-*)
81ecdfbb 1284 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1285 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1286 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1287 as_fn_error "invalid package name: $ac_useropt"
1288 ac_useropt_orig=$ac_useropt
1289 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1290 case $ac_user_opts in
1291 *"
1292"with_$ac_useropt"
1293"*) ;;
1294 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1295 ac_unrecognized_sep=', ';;
1296 esac
1297 eval with_$ac_useropt=no ;;
c906108c
SS
1298
1299 --x)
1300 # Obsolete; use --with-x.
1301 with_x=yes ;;
1302
1303 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1304 | --x-incl | --x-inc | --x-in | --x-i)
1305 ac_prev=x_includes ;;
1306 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1307 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1308 x_includes=$ac_optarg ;;
c906108c
SS
1309
1310 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1311 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1312 ac_prev=x_libraries ;;
1313 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1314 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1315 x_libraries=$ac_optarg ;;
c906108c 1316
81ecdfbb
RW
1317 -*) as_fn_error "unrecognized option: \`$ac_option'
1318Try \`$0 --help' for more information."
c906108c
SS
1319 ;;
1320
bec39cab
AC
1321 *=*)
1322 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1323 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1324 case $ac_envvar in #(
1325 '' | [0-9]* | *[!_$as_cr_alnum]* )
1326 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1327 esac
1328 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1329 export $ac_envvar ;;
1330
c906108c 1331 *)
bec39cab 1332 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1333 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1334 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1335 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1336 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1337 ;;
1338
1339 esac
1340done
1341
1342if test -n "$ac_prev"; then
bec39cab 1343 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1344 as_fn_error "missing argument to $ac_option"
c906108c 1345fi
c906108c 1346
81ecdfbb
RW
1347if test -n "$ac_unrecognized_opts"; then
1348 case $enable_option_checking in
1349 no) ;;
1350 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1351 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1352 esac
81ecdfbb 1353fi
b4e70030 1354
81ecdfbb
RW
1355# Check all directory arguments for consistency.
1356for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1357 datadir sysconfdir sharedstatedir localstatedir includedir \
1358 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1359 libdir localedir mandir
b4e70030 1360do
81ecdfbb
RW
1361 eval ac_val=\$$ac_var
1362 # Remove trailing slashes.
1363 case $ac_val in
1364 */ )
1365 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1366 eval $ac_var=\$ac_val;;
1367 esac
1368 # Be sure to have absolute directory names.
b4e70030 1369 case $ac_val in
81ecdfbb
RW
1370 [\\/$]* | ?:[\\/]* ) continue;;
1371 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1372 esac
81ecdfbb 1373 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1374done
1375
bec39cab
AC
1376# There might be people who depend on the old broken behavior: `$host'
1377# used to hold the argument of --host etc.
1378# FIXME: To remove some day.
1379build=$build_alias
1380host=$host_alias
1381target=$target_alias
1382
1383# FIXME: To remove some day.
1384if test "x$host_alias" != x; then
1385 if test "x$build_alias" = x; then
1386 cross_compiling=maybe
81ecdfbb 1387 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1388 If a cross compiler is detected then cross compile mode will be used." >&2
1389 elif test "x$build_alias" != "x$host_alias"; then
1390 cross_compiling=yes
1391 fi
1392fi
c906108c 1393
bec39cab
AC
1394ac_tool_prefix=
1395test -n "$host_alias" && ac_tool_prefix=$host_alias-
1396
1397test "$silent" = yes && exec 6>/dev/null
c906108c 1398
c906108c 1399
81ecdfbb
RW
1400ac_pwd=`pwd` && test -n "$ac_pwd" &&
1401ac_ls_di=`ls -di .` &&
1402ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1403 as_fn_error "working directory cannot be determined"
1404test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1405 as_fn_error "pwd does not report name of working directory"
1406
1407
c906108c
SS
1408# Find the source files, if location was not specified.
1409if test -z "$srcdir"; then
1410 ac_srcdir_defaulted=yes
81ecdfbb
RW
1411 # Try the directory containing this script, then the parent directory.
1412 ac_confdir=`$as_dirname -- "$as_myself" ||
1413$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1414 X"$as_myself" : 'X\(//\)[^/]' \| \
1415 X"$as_myself" : 'X\(//\)$' \| \
1416 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1417$as_echo X"$as_myself" |
1418 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1419 s//\1/
1420 q
1421 }
1422 /^X\(\/\/\)[^/].*/{
1423 s//\1/
1424 q
1425 }
1426 /^X\(\/\/\)$/{
1427 s//\1/
1428 q
1429 }
1430 /^X\(\/\).*/{
1431 s//\1/
1432 q
1433 }
1434 s/.*/./; q'`
c906108c 1435 srcdir=$ac_confdir
81ecdfbb 1436 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1437 srcdir=..
1438 fi
1439else
1440 ac_srcdir_defaulted=no
1441fi
81ecdfbb
RW
1442if test ! -r "$srcdir/$ac_unique_file"; then
1443 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1444 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1445fi
1446ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1447ac_abs_confdir=`(
1448 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1449 pwd)`
1450# When building in place, set srcdir=.
1451if test "$ac_abs_confdir" = "$ac_pwd"; then
1452 srcdir=.
1453fi
1454# Remove unnecessary trailing slashes from srcdir.
1455# Double slashes in file names in object file debugging info
1456# mess up M-x gdb in Emacs.
1457case $srcdir in
1458*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1459esac
1460for ac_var in $ac_precious_vars; do
1461 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_env_${ac_var}_value=\$${ac_var}
1463 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1464 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1465done
c906108c 1466
bec39cab
AC
1467#
1468# Report the --help message.
1469#
1470if test "$ac_init_help" = "long"; then
1471 # Omit some internal or obsolete options to make the list less imposing.
1472 # This message is too long to be a string in the A/UX 3.1 sh.
1473 cat <<_ACEOF
1474\`configure' configures this package to adapt to many kinds of systems.
1475
1476Usage: $0 [OPTION]... [VAR=VALUE]...
1477
1478To assign environment variables (e.g., CC, CFLAGS...), specify them as
1479VAR=VALUE. See below for descriptions of some of the useful variables.
1480
1481Defaults for the options are specified in brackets.
1482
1483Configuration:
1484 -h, --help display this help and exit
1485 --help=short display options specific to this package
1486 --help=recursive display the short help of all the included packages
1487 -V, --version display version information and exit
1488 -q, --quiet, --silent do not print \`checking...' messages
1489 --cache-file=FILE cache test results in FILE [disabled]
1490 -C, --config-cache alias for \`--cache-file=config.cache'
1491 -n, --no-create do not create output files
1492 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1493
bec39cab
AC
1494Installation directories:
1495 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1496 [$ac_default_prefix]
bec39cab 1497 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1498 [PREFIX]
bec39cab
AC
1499
1500By default, \`make install' will install all the files in
1501\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1502an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1503for instance \`--prefix=\$HOME'.
1504
1505For better control, use the options below.
1506
1507Fine tuning of the installation directories:
81ecdfbb
RW
1508 --bindir=DIR user executables [EPREFIX/bin]
1509 --sbindir=DIR system admin executables [EPREFIX/sbin]
1510 --libexecdir=DIR program executables [EPREFIX/libexec]
1511 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1512 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1513 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1514 --libdir=DIR object code libraries [EPREFIX/lib]
1515 --includedir=DIR C header files [PREFIX/include]
1516 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1517 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1518 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1519 --infodir=DIR info documentation [DATAROOTDIR/info]
1520 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1521 --mandir=DIR man documentation [DATAROOTDIR/man]
1522 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1523 --htmldir=DIR html documentation [DOCDIR]
1524 --dvidir=DIR dvi documentation [DOCDIR]
1525 --pdfdir=DIR pdf documentation [DOCDIR]
1526 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1527_ACEOF
1528
1529 cat <<\_ACEOF
1530
1531Program names:
1532 --program-prefix=PREFIX prepend PREFIX to installed program names
1533 --program-suffix=SUFFIX append SUFFIX to installed program names
1534 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1535
1536X features:
1537 --x-includes=DIR X include files are in DIR
1538 --x-libraries=DIR X library files are in DIR
1539
1540System types:
1541 --build=BUILD configure for building on BUILD [guessed]
1542 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1543 --target=TARGET configure for building compilers for TARGET [HOST]
1544_ACEOF
1545fi
1546
1547if test -n "$ac_init_help"; then
1548
1549 cat <<\_ACEOF
1550
1551Optional Features:
81ecdfbb 1552 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1553 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1554 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1555 --enable-maintainer-mode enable make rules and dependencies not useful
1556 (and sometimes confusing) to the casual installer
da2f07f1
JK
1557 --enable-plugins Enable support for plugins (defaults no)
1558 --disable-largefile omit support for large files
e28b3332
DJ
1559 --disable-dependency-tracking speeds up one-time build
1560 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1561 --enable-targets=TARGETS
1562 alternative target configurations
c0993dbe 1563 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1564 --disable-gdbcli disable command-line interface (CLI)
1565 --disable-gdbmi disable machine-interface (MI)
1566 --enable-tui enable full-screen terminal user interface (TUI)
1567 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1568 --enable-profiling enable profiling of GDB
3841debe 1569 --disable-rpath do not hardcode runtime library paths
a1220294 1570 --enable-werror treat compile warnings as errors
32c1c914 1571 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1572 --enable-gdb-build-warnings
32c1c914 1573 enable GDB specific build-time compiler warnings if
a1220294 1574 gcc is used
32c1c914 1575 --enable-sim link gdb with simulator
bec39cab
AC
1576 --enable-multi-ice build the multi-ice-gdb-server
1577
1578Optional Packages:
1579 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1580 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1581 --with-separate-debug-dir=PATH
32c1c914 1582 look for global separate debug info in this path
62e4f60c 1583 [LIBDIR/debug]
b14b1491
TT
1584 --with-gdb-datadir=PATH look for global separate data files in this path
1585 [DATADIR/gdb]
29b0e8a2 1586 --with-relocated-sources=PATH
32c1c914
TT
1587 automatically relocate this path for source files
1588 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1589 --with-curses use the curses library instead of the termcap
1590 library
c16158bc
JM
1591 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1592 --with-bugurl=URL Direct users to URL to report a bug
a1220294
TT
1593 --with-libiconv-prefix=DIR
1594 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1595 --with-system-readline use installed readline library
5c39566f 1596 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1597 --with-gnu-ld assume the C compiler uses GNU ld default=no
1598 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1599 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 1600 --with-python include python support (auto/yes/no/<path>)
a1220294
TT
1601 --without-included-regex
1602 don't use included regex; this is the default on
1603 systems with version 2 of the GNU C library (use
1604 with caution on other system)
81ecdfbb 1605 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1606 --with-system-gdbinit=PATH
32c1c914 1607 automatically load a system-wide gdbinit file
5062cc19
KS
1608 --with-tcl directory containing tcl configuration (tclConfig.sh)
1609 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1610 --with-x use the X Window System
bec39cab
AC
1611
1612Some influential environment variables:
1613 CC C compiler command
1614 CFLAGS C compiler flags
1615 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1616 nonstandard directory <lib dir>
81ecdfbb
RW
1617 LIBS libraries to pass to the linker, e.g. -l<library>
1618 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1619 you have headers in a nonstandard directory <include dir>
bec39cab 1620 CPP C preprocessor
81ecdfbb
RW
1621 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1622 the first program found out of: `bison -y', `byacc', `yacc'.
1623 YFLAGS The list of arguments that will be passed by default to $YACC.
1624 This script will default YFLAGS to the empty string to avoid a
1625 default value of `-d' given by some make applications.
1626 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1627
1628Use these variables to override the choices made by `configure' or to help
1629it to find libraries and programs with nonstandard names/locations.
1630
81ecdfbb 1631Report bugs to the package provider.
bec39cab 1632_ACEOF
81ecdfbb 1633ac_status=$?
bec39cab
AC
1634fi
1635
1636if test "$ac_init_help" = "recursive"; then
1637 # If there are subdirs, report their specific --help.
bec39cab 1638 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1639 test -d "$ac_dir" ||
1640 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1641 continue
bec39cab
AC
1642 ac_builddir=.
1643
81ecdfbb
RW
1644case "$ac_dir" in
1645.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1646*)
1647 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1648 # A ".." for each directory in $ac_dir_suffix.
1649 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1650 case $ac_top_builddir_sub in
1651 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1652 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1653 esac ;;
1654esac
1655ac_abs_top_builddir=$ac_pwd
1656ac_abs_builddir=$ac_pwd$ac_dir_suffix
1657# for backward compatibility:
1658ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1659
1660case $srcdir in
81ecdfbb 1661 .) # We are building in place.
bec39cab 1662 ac_srcdir=.
81ecdfbb
RW
1663 ac_top_srcdir=$ac_top_builddir_sub
1664 ac_abs_top_srcdir=$ac_pwd ;;
1665 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1666 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1667 ac_top_srcdir=$srcdir
1668 ac_abs_top_srcdir=$srcdir ;;
1669 *) # Relative name.
1670 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1671 ac_top_srcdir=$ac_top_build_prefix$srcdir
1672 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1673esac
81ecdfbb 1674ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1675
81ecdfbb
RW
1676 cd "$ac_dir" || { ac_status=$?; continue; }
1677 # Check for guested configure.
1678 if test -f "$ac_srcdir/configure.gnu"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1681 elif test -f "$ac_srcdir/configure"; then
1682 echo &&
1683 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1684 else
81ecdfbb
RW
1685 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1686 fi || ac_status=$?
1687 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1688 done
1689fi
1690
81ecdfbb 1691test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1692if $ac_init_version; then
1693 cat <<\_ACEOF
81ecdfbb
RW
1694configure
1695generated by GNU Autoconf 2.64
bec39cab 1696
81ecdfbb 1697Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1698This configure script is free software; the Free Software Foundation
1699gives unlimited permission to copy, distribute and modify it.
1700_ACEOF
81ecdfbb 1701 exit
bec39cab 1702fi
bec39cab 1703
81ecdfbb
RW
1704## ------------------------ ##
1705## Autoconf initialization. ##
1706## ------------------------ ##
bec39cab 1707
81ecdfbb
RW
1708# ac_fn_c_try_compile LINENO
1709# --------------------------
1710# Try to compile conftest.$ac_ext, and return whether this succeeded.
1711ac_fn_c_try_compile ()
1712{
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 rm -f conftest.$ac_objext
1715 if { { ac_try="$ac_compile"
1716case "(($ac_try" in
1717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718 *) ac_try_echo=$ac_try;;
1719esac
1720eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721$as_echo "$ac_try_echo"; } >&5
1722 (eval "$ac_compile") 2>conftest.err
1723 ac_status=$?
1724 if test -s conftest.err; then
1725 grep -v '^ *+' conftest.err >conftest.er1
1726 cat conftest.er1 >&5
1727 mv -f conftest.er1 conftest.err
1728 fi
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; } && {
1731 test -z "$ac_c_werror_flag" ||
1732 test ! -s conftest.err
1733 } && test -s conftest.$ac_objext; then :
1734 ac_retval=0
1735else
1736 $as_echo "$as_me: failed program was:" >&5
1737sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1738
81ecdfbb
RW
1739 ac_retval=1
1740fi
1741 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1742 return $ac_retval
1743
1744} # ac_fn_c_try_compile
1745
1746# ac_fn_c_try_cpp LINENO
1747# ----------------------
1748# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1749ac_fn_c_try_cpp ()
bec39cab 1750{
81ecdfbb
RW
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 if { { ac_try="$ac_cpp conftest.$ac_ext"
1753case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756esac
1757eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758$as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1760 ac_status=$?
1761 if test -s conftest.err; then
1762 grep -v '^ *+' conftest.err >conftest.er1
1763 cat conftest.er1 >&5
1764 mv -f conftest.er1 conftest.err
1765 fi
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } >/dev/null && {
1768 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1769 test ! -s conftest.err
1770 }; then :
1771 ac_retval=0
1772else
1773 $as_echo "$as_me: failed program was:" >&5
1774sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1775
81ecdfbb
RW
1776 ac_retval=1
1777fi
1778 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1779 return $ac_retval
bec39cab 1780
81ecdfbb 1781} # ac_fn_c_try_cpp
bec39cab 1782
81ecdfbb
RW
1783# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1784# -------------------------------------------------------
1785# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1786# the include files in INCLUDES and setting the cache variable VAR
1787# accordingly.
1788ac_fn_c_check_header_mongrel ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1793$as_echo_n "checking for $2... " >&6; }
1794if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1795 $as_echo_n "(cached) " >&6
1796fi
1797eval ac_res=\$$3
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1799$as_echo "$ac_res" >&6; }
1800else
1801 # Is the header compilable?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1803$as_echo_n "checking $2 usability... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806$4
1807#include <$2>
1808_ACEOF
1809if ac_fn_c_try_compile "$LINENO"; then :
1810 ac_header_compiler=yes
1811else
1812 ac_header_compiler=no
1813fi
1814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1816$as_echo "$ac_header_compiler" >&6; }
bec39cab 1817
81ecdfbb
RW
1818# Is the header present?
1819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1820$as_echo_n "checking $2 presence... " >&6; }
1821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822/* end confdefs.h. */
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_cpp "$LINENO"; then :
1826 ac_header_preproc=yes
1827else
1828 ac_header_preproc=no
1829fi
1830rm -f conftest.err conftest.$ac_ext
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1832$as_echo "$ac_header_preproc" >&6; }
bec39cab 1833
81ecdfbb
RW
1834# So? What about this header?
1835case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1836 yes:no: )
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1838$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1840$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1841 ;;
1842 no:yes:* )
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1844$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1846$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1848$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1850$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1852$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1853 ;;
1854esac
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
1857if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1858 $as_echo_n "(cached) " >&6
1859else
1860 eval "$3=\$ac_header_compiler"
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
1865fi
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_mongrel
bec39cab 1869
81ecdfbb
RW
1870# ac_fn_c_try_run LINENO
1871# ----------------------
1872# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1873# that executables *can* be run.
1874ac_fn_c_try_run ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 if { { ac_try="$ac_link"
1878case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_link") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1888 { { case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_try") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; }; }; then :
1898 ac_retval=0
1899else
1900 $as_echo "$as_me: program exited with status $ac_status" >&5
1901 $as_echo "$as_me: failed program was:" >&5
1902sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1903
81ecdfbb
RW
1904 ac_retval=$ac_status
1905fi
1906 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1907 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908 return $ac_retval
bec39cab 1909
81ecdfbb 1910} # ac_fn_c_try_run
bec39cab 1911
81ecdfbb
RW
1912# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1913# -------------------------------------------------------
1914# Tests whether HEADER exists and can be compiled using the include files in
1915# INCLUDES, setting the cache variable VAR accordingly.
1916ac_fn_c_check_header_compile ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
1921if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1922 $as_echo_n "(cached) " >&6
1923else
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927#include <$2>
bec39cab 1928_ACEOF
81ecdfbb
RW
1929if ac_fn_c_try_compile "$LINENO"; then :
1930 eval "$3=yes"
1931else
1932 eval "$3=no"
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1935fi
1936eval ac_res=\$$3
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938$as_echo "$ac_res" >&6; }
1939 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1940
81ecdfbb 1941} # ac_fn_c_check_header_compile
bec39cab 1942
81ecdfbb
RW
1943# ac_fn_c_try_link LINENO
1944# -----------------------
1945# Try to link conftest.$ac_ext, and return whether this succeeded.
1946ac_fn_c_try_link ()
b4e70030 1947{
81ecdfbb
RW
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 rm -f conftest.$ac_objext conftest$ac_exeext
1950 if { { ac_try="$ac_link"
1951case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957 (eval "$ac_link") 2>conftest.err
1958 ac_status=$?
1959 if test -s conftest.err; then
1960 grep -v '^ *+' conftest.err >conftest.er1
1961 cat conftest.er1 >&5
1962 mv -f conftest.er1 conftest.err
1963 fi
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && {
1966 test -z "$ac_c_werror_flag" ||
1967 test ! -s conftest.err
1968 } && test -s conftest$ac_exeext && {
1969 test "$cross_compiling" = yes ||
1970 $as_test_x conftest$ac_exeext
1971 }; then :
1972 ac_retval=0
1973else
1974 $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1976
81ecdfbb
RW
1977 ac_retval=1
1978fi
1979 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1980 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1981 # interfere with the next link command; also delete a directory that is
1982 # left behind by Apple's compiler. We do this before executing the actions.
1983 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985 return $ac_retval
bec39cab 1986
81ecdfbb 1987} # ac_fn_c_try_link
bec39cab 1988
81ecdfbb
RW
1989# ac_fn_c_check_func LINENO FUNC VAR
1990# ----------------------------------
1991# Tests whether FUNC exists, setting the cache variable VAR accordingly
1992ac_fn_c_check_func ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1996$as_echo_n "checking for $2... " >&6; }
1997if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1998 $as_echo_n "(cached) " >&6
1999else
2000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2003 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2004#define $2 innocuous_$2
bec39cab 2005
81ecdfbb
RW
2006/* System header to define __stub macros and hopefully few prototypes,
2007 which can conflict with char $2 (); below.
2008 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2009 <limits.h> exists even on freestanding compilers. */
bec39cab 2010
81ecdfbb
RW
2011#ifdef __STDC__
2012# include <limits.h>
2013#else
2014# include <assert.h>
2015#endif
bec39cab 2016
81ecdfbb 2017#undef $2
bec39cab 2018
81ecdfbb
RW
2019/* Override any GCC internal prototype to avoid an error.
2020 Use char because int might match the return type of a GCC
2021 builtin and then its argument prototype would still apply. */
2022#ifdef __cplusplus
2023extern "C"
2024#endif
2025char $2 ();
2026/* The GNU C library defines this for functions which it implements
2027 to always fail with ENOSYS. Some functions are actually named
2028 something starting with __ and the normal name is an alias. */
2029#if defined __stub_$2 || defined __stub___$2
2030choke me
2031#endif
bec39cab 2032
81ecdfbb
RW
2033int
2034main ()
2035{
2036return $2 ();
2037 ;
2038 return 0;
2039}
bec39cab 2040_ACEOF
81ecdfbb
RW
2041if ac_fn_c_try_link "$LINENO"; then :
2042 eval "$3=yes"
2043else
2044 eval "$3=no"
2045fi
2046rm -f core conftest.err conftest.$ac_objext \
2047 conftest$ac_exeext conftest.$ac_ext
2048fi
2049eval ac_res=\$$3
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051$as_echo "$ac_res" >&6; }
2052 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2053
81ecdfbb 2054} # ac_fn_c_check_func
bec39cab 2055
81ecdfbb
RW
2056# ac_fn_c_check_decl LINENO SYMBOL VAR
2057# ------------------------------------
2058# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2059ac_fn_c_check_decl ()
2060{
2061 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2063$as_echo_n "checking whether $2 is declared... " >&6; }
2064if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2065 $as_echo_n "(cached) " >&6
2066else
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073#ifndef $2
2074 (void) $2;
2075#endif
bec39cab 2076
81ecdfbb
RW
2077 ;
2078 return 0;
2079}
bec39cab 2080_ACEOF
81ecdfbb
RW
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 eval "$3=yes"
2083else
2084 eval "$3=no"
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088eval ac_res=\$$3
2089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090$as_echo "$ac_res" >&6; }
2091 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2092
81ecdfbb 2093} # ac_fn_c_check_decl
bec39cab 2094
81ecdfbb
RW
2095# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096# --------------------------------------------
2097# Tries to find the compile-time value of EXPR in a program that includes
2098# INCLUDES, setting VAR accordingly. Returns whether the value could be
2099# computed
2100ac_fn_c_compute_int ()
2101{
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 if test "$cross_compiling" = yes; then
2104 # Depending upon the size, compute the lo and hi bounds.
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) >= 0)];
2112test_array [0] = 0
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_lo=0 ac_mid=0
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2128test_array [0] = 0
bec39cab 2129
81ecdfbb
RW
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=$ac_mid; break
2136else
2137 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2138 if test $ac_lo -le $ac_mid; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2143fi
81ecdfbb
RW
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
c906108c 2146else
81ecdfbb
RW
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) < 0)];
2154test_array [0] = 0
bec39cab 2155
81ecdfbb
RW
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_hi=-1 ac_mid=-1
2162 while :; do
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2170test_array [0] = 0
bec39cab 2171
81ecdfbb
RW
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_lo=$ac_mid; break
2178else
2179 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180 if test $ac_mid -le $ac_hi; then
2181 ac_lo= ac_hi=
2182 break
2183 fi
2184 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 done
2188else
2189 ac_lo= ac_hi=
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194# Binary search between lo and hi bounds.
2195while test "x$ac_lo" != "x$ac_hi"; do
2196 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2204test_array [0] = 0
bec39cab 2205
81ecdfbb
RW
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"; then :
2211 ac_hi=$ac_mid
2212else
2213 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216done
2217case $ac_lo in #((
2218?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2219'') ac_retval=1 ;;
2220esac
2221 else
2222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h. */
2224$4
2225static long int longval () { return $2; }
2226static unsigned long int ulongval () { return $2; }
2227#include <stdio.h>
2228#include <stdlib.h>
2229int
2230main ()
2231{
bec39cab 2232
81ecdfbb
RW
2233 FILE *f = fopen ("conftest.val", "w");
2234 if (! f)
2235 return 1;
2236 if (($2) < 0)
2237 {
2238 long int i = longval ();
2239 if (i != ($2))
2240 return 1;
2241 fprintf (f, "%ld", i);
2242 }
2243 else
2244 {
2245 unsigned long int i = ulongval ();
2246 if (i != ($2))
2247 return 1;
2248 fprintf (f, "%lu", i);
2249 }
2250 /* Do not output a trailing newline, as this causes \r\n confusion
2251 on some platforms. */
2252 return ferror (f) || fclose (f) != 0;
bec39cab 2253
81ecdfbb
RW
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_run "$LINENO"; then :
2259 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2260else
2261 ac_retval=1
2262fi
2263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2264 conftest.$ac_objext conftest.beam conftest.$ac_ext
2265rm -f conftest.val
bec39cab 2266
81ecdfbb
RW
2267 fi
2268 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2269 return $ac_retval
bec39cab 2270
81ecdfbb 2271} # ac_fn_c_compute_int
bec39cab 2272
81ecdfbb
RW
2273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
2282if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
2326 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2327
81ecdfbb 2328} # ac_fn_c_check_member
bec39cab 2329
81ecdfbb
RW
2330# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2331# -------------------------------------------
2332# Tests whether TYPE exists after having included INCLUDES, setting cache
2333# variable VAR accordingly.
2334ac_fn_c_check_type ()
2335{
2336 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2338$as_echo_n "checking for $2... " >&6; }
2339if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2340 $as_echo_n "(cached) " >&6
2341else
2342 eval "$3=no"
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$4
2346int
2347main ()
2348{
2349if (sizeof ($2))
2350 return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$4
2359int
2360main ()
2361{
2362if (sizeof (($2)))
2363 return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2369
81ecdfbb
RW
2370else
2371 eval "$3=yes"
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2376fi
2377eval ac_res=\$$3
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2379$as_echo "$ac_res" >&6; }
2380 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2381
81ecdfbb
RW
2382} # ac_fn_c_check_type
2383cat >config.log <<_ACEOF
2384This file contains any messages produced by compilers while
2385running configure, to aid debugging if configure makes a mistake.
d5af19ba 2386
81ecdfbb
RW
2387It was created by $as_me, which was
2388generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2389
81ecdfbb 2390 $ $0 $@
413ccac7 2391
81ecdfbb
RW
2392_ACEOF
2393exec 5>>config.log
2394{
2395cat <<_ASUNAME
2396## --------- ##
2397## Platform. ##
2398## --------- ##
413ccac7 2399
81ecdfbb
RW
2400hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2401uname -m = `(uname -m) 2>/dev/null || echo unknown`
2402uname -r = `(uname -r) 2>/dev/null || echo unknown`
2403uname -s = `(uname -s) 2>/dev/null || echo unknown`
2404uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2405
81ecdfbb
RW
2406/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2407/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2408
81ecdfbb
RW
2409/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2410/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2411/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2412/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2413/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2414/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2415/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2416
81ecdfbb 2417_ASUNAME
bec39cab 2418
bec39cab
AC
2419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2420for as_dir in $PATH
2421do
2422 IFS=$as_save_IFS
2423 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2424 $as_echo "PATH: $as_dir"
2425 done
2426IFS=$as_save_IFS
bec39cab 2427
81ecdfbb 2428} >&5
bec39cab 2429
81ecdfbb 2430cat >&5 <<_ACEOF
bec39cab 2431
bec39cab 2432
81ecdfbb
RW
2433## ----------- ##
2434## Core tests. ##
2435## ----------- ##
2436
2437_ACEOF
2438
2439
2440# Keep a trace of the command line.
2441# Strip out --no-create and --no-recursion so they do not pile up.
2442# Strip out --silent because we don't want to record it for future runs.
2443# Also quote any args containing shell meta-characters.
2444# Make two passes to allow for proper duplicate-argument suppression.
2445ac_configure_args=
2446ac_configure_args0=
2447ac_configure_args1=
2448ac_must_keep_next=false
2449for ac_pass in 1 2
2450do
2451 for ac_arg
2452 do
2453 case $ac_arg in
2454 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2456 | -silent | --silent | --silen | --sile | --sil)
2457 continue ;;
2458 *\'*)
2459 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2460 esac
2461 case $ac_pass in
2462 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2463 2)
2464 as_fn_append ac_configure_args1 " '$ac_arg'"
2465 if test $ac_must_keep_next = true; then
2466 ac_must_keep_next=false # Got value, back to normal.
2467 else
2468 case $ac_arg in
2469 *=* | --config-cache | -C | -disable-* | --disable-* \
2470 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2471 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2472 | -with-* | --with-* | -without-* | --without-* | --x)
2473 case "$ac_configure_args0 " in
2474 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2475 esac
2476 ;;
2477 -* ) ac_must_keep_next=true ;;
2478 esac
2479 fi
2480 as_fn_append ac_configure_args " '$ac_arg'"
2481 ;;
2482 esac
2483 done
2484done
2485{ ac_configure_args0=; unset ac_configure_args0;}
2486{ ac_configure_args1=; unset ac_configure_args1;}
2487
2488# When interrupted or exit'd, cleanup temporary files, and complete
2489# config.log. We remove comments because anyway the quotes in there
2490# would cause problems or look ugly.
2491# WARNING: Use '\'' to represent an apostrophe within the trap.
2492# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2493trap 'exit_status=$?
2494 # Save into config.log some information that might help in debugging.
2495 {
2496 echo
2497
2498 cat <<\_ASBOX
2499## ---------------- ##
2500## Cache variables. ##
2501## ---------------- ##
2502_ASBOX
2503 echo
2504 # The following way of writing the cache mishandles newlines in values,
2505(
2506 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2507 eval ac_val=\$$ac_var
2508 case $ac_val in #(
2509 *${as_nl}*)
2510 case $ac_var in #(
2511 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2512$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2513 esac
2514 case $ac_var in #(
2515 _ | IFS | as_nl) ;; #(
2516 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2517 *) { eval $ac_var=; unset $ac_var;} ;;
2518 esac ;;
2519 esac
2520 done
2521 (set) 2>&1 |
2522 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2523 *${as_nl}ac_space=\ *)
2524 sed -n \
2525 "s/'\''/'\''\\\\'\'''\''/g;
2526 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2527 ;; #(
2528 *)
2529 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2530 ;;
2531 esac |
2532 sort
2533)
2534 echo
2535
2536 cat <<\_ASBOX
2537## ----------------- ##
2538## Output variables. ##
2539## ----------------- ##
2540_ASBOX
2541 echo
2542 for ac_var in $ac_subst_vars
2543 do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in
2546 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2547 esac
2548 $as_echo "$ac_var='\''$ac_val'\''"
2549 done | sort
2550 echo
2551
2552 if test -n "$ac_subst_files"; then
2553 cat <<\_ASBOX
2554## ------------------- ##
2555## File substitutions. ##
2556## ------------------- ##
2557_ASBOX
2558 echo
2559 for ac_var in $ac_subst_files
2560 do
2561 eval ac_val=\$$ac_var
2562 case $ac_val in
2563 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2564 esac
2565 $as_echo "$ac_var='\''$ac_val'\''"
2566 done | sort
2567 echo
2568 fi
2569
2570 if test -s confdefs.h; then
2571 cat <<\_ASBOX
2572## ----------- ##
2573## confdefs.h. ##
2574## ----------- ##
2575_ASBOX
2576 echo
2577 cat confdefs.h
2578 echo
2579 fi
2580 test "$ac_signal" != 0 &&
2581 $as_echo "$as_me: caught signal $ac_signal"
2582 $as_echo "$as_me: exit $exit_status"
2583 } >&5
2584 rm -f core *.core core.conftest.* &&
2585 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2586 exit $exit_status
2587' 0
2588for ac_signal in 1 2 13 15; do
2589 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2590done
2591ac_signal=0
2592
2593# confdefs.h avoids OS command line length limits that DEFS can exceed.
2594rm -f -r conftest* confdefs.h
2595
2596$as_echo "/* confdefs.h */" > confdefs.h
2597
2598# Predefined preprocessor variables.
2599
2600cat >>confdefs.h <<_ACEOF
2601#define PACKAGE_NAME "$PACKAGE_NAME"
2602_ACEOF
2603
2604cat >>confdefs.h <<_ACEOF
2605#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2606_ACEOF
2607
2608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_VERSION "$PACKAGE_VERSION"
2610_ACEOF
2611
2612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_STRING "$PACKAGE_STRING"
2614_ACEOF
2615
2616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2618_ACEOF
2619
2620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_URL "$PACKAGE_URL"
2622_ACEOF
2623
2624
2625# Let the site file select an alternate cache file if it wants to.
2626# Prefer an explicitly selected file to automatically selected ones.
2627ac_site_file1=NONE
2628ac_site_file2=NONE
2629if test -n "$CONFIG_SITE"; then
2630 ac_site_file1=$CONFIG_SITE
2631elif test "x$prefix" != xNONE; then
2632 ac_site_file1=$prefix/share/config.site
2633 ac_site_file2=$prefix/etc/config.site
2634else
2635 ac_site_file1=$ac_default_prefix/share/config.site
2636 ac_site_file2=$ac_default_prefix/etc/config.site
2637fi
2638for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2639do
2640 test "x$ac_site_file" = xNONE && continue
2641 if test -r "$ac_site_file"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2643$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2644 sed 's/^/| /' "$ac_site_file" >&5
2645 . "$ac_site_file"
2646 fi
2647done
2648
2649if test -r "$cache_file"; then
2650 # Some versions of bash will fail to source /dev/null (special
2651 # files actually), so we avoid doing that.
2652 if test -f "$cache_file"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2654$as_echo "$as_me: loading cache $cache_file" >&6;}
2655 case $cache_file in
2656 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2657 *) . "./$cache_file";;
2658 esac
2659 fi
2660else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2662$as_echo "$as_me: creating cache $cache_file" >&6;}
2663 >$cache_file
bec39cab
AC
2664fi
2665
81ecdfbb
RW
2666gl_header_list="$gl_header_list stdint.h"
2667gl_header_list="$gl_header_list wchar.h"
2668gl_header_list="$gl_header_list string.h"
2669# Check that the precious variables saved in the cache have kept the same
2670# value.
2671ac_cache_corrupted=false
2672for ac_var in $ac_precious_vars; do
2673 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2674 eval ac_new_set=\$ac_env_${ac_var}_set
2675 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2676 eval ac_new_val=\$ac_env_${ac_var}_value
2677 case $ac_old_set,$ac_new_set in
2678 set,)
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2680$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2681 ac_cache_corrupted=: ;;
2682 ,set)
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2684$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2685 ac_cache_corrupted=: ;;
2686 ,);;
2687 *)
2688 if test "x$ac_old_val" != "x$ac_new_val"; then
2689 # differences in whitespace do not lead to failure.
2690 ac_old_val_w=`echo x $ac_old_val`
2691 ac_new_val_w=`echo x $ac_new_val`
2692 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2694$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2695 ac_cache_corrupted=:
2696 else
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2698$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2699 eval $ac_var=\$ac_old_val
2700 fi
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2702$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2704$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2705 fi;;
2706 esac
2707 # Pass precious variables to config.status.
2708 if test "$ac_new_set" = set; then
2709 case $ac_new_val in
2710 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2711 *) ac_arg=$ac_var=$ac_new_val ;;
2712 esac
2713 case " $ac_configure_args " in
2714 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2715 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2716 esac
2717 fi
2718done
2719if $ac_cache_corrupted; then
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2723$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2724 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2725fi
2726## -------------------- ##
2727## Main body of script. ##
2728## -------------------- ##
2729
2730ac_ext=c
2731ac_cpp='$CPP $CPPFLAGS'
2732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2734ac_compiler_gnu=$ac_cv_c_compiler_gnu
2735
2736
2737
2738
2739
2740ac_config_headers="$ac_config_headers config.h:config.in"
2741
2742
2743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2744$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2745 # Check whether --enable-maintainer-mode was given.
2746if test "${enable_maintainer_mode+set}" = set; then :
2747 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2748else
2749 USE_MAINTAINER_MODE=no
2750fi
2751
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2753$as_echo "$USE_MAINTAINER_MODE" >&6; }
2754 if test $USE_MAINTAINER_MODE = yes; then
2755 MAINTAINER_MODE_TRUE=
2756 MAINTAINER_MODE_FALSE='#'
2757else
2758 MAINTAINER_MODE_TRUE='#'
2759 MAINTAINER_MODE_FALSE=
2760fi
2761
2762 MAINT=$MAINTAINER_MODE_TRUE
2763
2764
2765
2766ac_ext=c
2767ac_cpp='$CPP $CPPFLAGS'
2768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2770ac_compiler_gnu=$ac_cv_c_compiler_gnu
2771if test -n "$ac_tool_prefix"; then
2772 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2773set dummy ${ac_tool_prefix}gcc; ac_word=$2
2774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2775$as_echo_n "checking for $ac_word... " >&6; }
2776if test "${ac_cv_prog_CC+set}" = set; then :
2777 $as_echo_n "(cached) " >&6
c906108c
SS
2778else
2779 if test -n "$CC"; then
2780 ac_cv_prog_CC="$CC" # Let the user override the test.
2781else
bec39cab
AC
2782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783for as_dir in $PATH
2784do
2785 IFS=$as_save_IFS
2786 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2787 for ac_exec_ext in '' $ac_executable_extensions; do
2788 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2789 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2791 break 2
2792 fi
2793done
81ecdfbb
RW
2794 done
2795IFS=$as_save_IFS
bec39cab 2796
c906108c
SS
2797fi
2798fi
bec39cab 2799CC=$ac_cv_prog_CC
c906108c 2800if test -n "$CC"; then
81ecdfbb
RW
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2802$as_echo "$CC" >&6; }
c906108c 2803else
81ecdfbb
RW
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
c906108c
SS
2806fi
2807
81ecdfbb 2808
b4e70030
JB
2809fi
2810if test -z "$ac_cv_prog_CC"; then
2811 ac_ct_CC=$CC
81ecdfbb
RW
2812 # Extract the first word of "gcc", so it can be a program name with args.
2813set dummy gcc; ac_word=$2
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815$as_echo_n "checking for $ac_word... " >&6; }
2816if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2817 $as_echo_n "(cached) " >&6
b4e70030
JB
2818else
2819 if test -n "$ac_ct_CC"; then
2820 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2821else
2822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823for as_dir in $PATH
2824do
2825 IFS=$as_save_IFS
2826 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2827 for ac_exec_ext in '' $ac_executable_extensions; do
2828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2829 ac_cv_prog_ac_ct_CC="gcc"
2830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2831 break 2
4e8d927d 2832 fi
b4e70030 2833done
81ecdfbb
RW
2834 done
2835IFS=$as_save_IFS
b4e70030
JB
2836
2837fi
2838fi
2839ac_ct_CC=$ac_cv_prog_ac_ct_CC
2840if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2842$as_echo "$ac_ct_CC" >&6; }
b4e70030 2843else
81ecdfbb
RW
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845$as_echo "no" >&6; }
b4e70030
JB
2846fi
2847
81ecdfbb
RW
2848 if test "x$ac_ct_CC" = x; then
2849 CC=""
2850 else
2851 case $cross_compiling:$ac_tool_warned in
2852yes:)
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2855ac_tool_warned=yes ;;
2856esac
2857 CC=$ac_ct_CC
2858 fi
b4e70030
JB
2859else
2860 CC="$ac_cv_prog_CC"
2861fi
2862
c906108c 2863if test -z "$CC"; then
81ecdfbb
RW
2864 if test -n "$ac_tool_prefix"; then
2865 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2866set dummy ${ac_tool_prefix}cc; ac_word=$2
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2868$as_echo_n "checking for $ac_word... " >&6; }
2869if test "${ac_cv_prog_CC+set}" = set; then :
2870 $as_echo_n "(cached) " >&6
c906108c
SS
2871else
2872 if test -n "$CC"; then
2873 ac_cv_prog_CC="$CC" # Let the user override the test.
2874else
bec39cab
AC
2875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876for as_dir in $PATH
2877do
2878 IFS=$as_save_IFS
2879 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2880 for ac_exec_ext in '' $ac_executable_extensions; do
2881 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2882 ac_cv_prog_CC="${ac_tool_prefix}cc"
2883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2884 break 2
2885 fi
2886done
81ecdfbb
RW
2887 done
2888IFS=$as_save_IFS
2889
2890fi
2891fi
2892CC=$ac_cv_prog_CC
2893if test -n "$CC"; then
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2895$as_echo "$CC" >&6; }
2896else
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2898$as_echo "no" >&6; }
2899fi
2900
2901
2902 fi
2903fi
2904if test -z "$CC"; then
2905 # Extract the first word of "cc", so it can be a program name with args.
2906set dummy cc; ac_word=$2
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2908$as_echo_n "checking for $ac_word... " >&6; }
2909if test "${ac_cv_prog_CC+set}" = set; then :
2910 $as_echo_n "(cached) " >&6
2911else
2912 if test -n "$CC"; then
2913 ac_cv_prog_CC="$CC" # Let the user override the test.
2914else
2915 ac_prog_rejected=no
2916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2917for as_dir in $PATH
2918do
2919 IFS=$as_save_IFS
2920 test -z "$as_dir" && as_dir=.
2921 for ac_exec_ext in '' $ac_executable_extensions; do
2922 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2923 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2924 ac_prog_rejected=yes
2925 continue
2926 fi
2927 ac_cv_prog_CC="cc"
2928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2929 break 2
2930 fi
2931done
2932 done
2933IFS=$as_save_IFS
bec39cab 2934
c906108c
SS
2935if test $ac_prog_rejected = yes; then
2936 # We found a bogon in the path, so make sure we never use it.
2937 set dummy $ac_cv_prog_CC
2938 shift
bec39cab 2939 if test $# != 0; then
c906108c
SS
2940 # We chose a different compiler from the bogus one.
2941 # However, it has the same basename, so the bogon will be chosen
2942 # first if we set CC to just the basename; use the full file name.
2943 shift
bec39cab 2944 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2945 fi
2946fi
2947fi
2948fi
bec39cab 2949CC=$ac_cv_prog_CC
c906108c 2950if test -n "$CC"; then
81ecdfbb
RW
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2952$as_echo "$CC" >&6; }
c906108c 2953else
81ecdfbb
RW
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2955$as_echo "no" >&6; }
c906108c
SS
2956fi
2957
81ecdfbb 2958
bec39cab
AC
2959fi
2960if test -z "$CC"; then
2961 if test -n "$ac_tool_prefix"; then
81ecdfbb 2962 for ac_prog in cl.exe
bec39cab
AC
2963 do
2964 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2967$as_echo_n "checking for $ac_word... " >&6; }
2968if test "${ac_cv_prog_CC+set}" = set; then :
2969 $as_echo_n "(cached) " >&6
c906108c
SS
2970else
2971 if test -n "$CC"; then
2972 ac_cv_prog_CC="$CC" # Let the user override the test.
2973else
bec39cab
AC
2974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2975for as_dir in $PATH
2976do
2977 IFS=$as_save_IFS
2978 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2979 for ac_exec_ext in '' $ac_executable_extensions; do
2980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2981 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2983 break 2
2984 fi
2985done
81ecdfbb
RW
2986 done
2987IFS=$as_save_IFS
bec39cab 2988
c906108c
SS
2989fi
2990fi
bec39cab 2991CC=$ac_cv_prog_CC
c906108c 2992if test -n "$CC"; then
81ecdfbb
RW
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2994$as_echo "$CC" >&6; }
c906108c 2995else
81ecdfbb
RW
2996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2997$as_echo "no" >&6; }
c906108c 2998fi
bec39cab 2999
81ecdfbb 3000
bec39cab
AC
3001 test -n "$CC" && break
3002 done
3003fi
3004if test -z "$CC"; then
3005 ac_ct_CC=$CC
81ecdfbb 3006 for ac_prog in cl.exe
bec39cab
AC
3007do
3008 # Extract the first word of "$ac_prog", so it can be a program name with args.
3009set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3011$as_echo_n "checking for $ac_word... " >&6; }
3012if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3013 $as_echo_n "(cached) " >&6
bec39cab
AC
3014else
3015 if test -n "$ac_ct_CC"; then
3016 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3017else
3018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3019for as_dir in $PATH
3020do
3021 IFS=$as_save_IFS
3022 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3023 for ac_exec_ext in '' $ac_executable_extensions; do
3024 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3025 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3027 break 2
c906108c 3028 fi
bec39cab 3029done
81ecdfbb
RW
3030 done
3031IFS=$as_save_IFS
bec39cab
AC
3032
3033fi
3034fi
3035ac_ct_CC=$ac_cv_prog_ac_ct_CC
3036if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3038$as_echo "$ac_ct_CC" >&6; }
bec39cab 3039else
81ecdfbb
RW
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3041$as_echo "no" >&6; }
c906108c
SS
3042fi
3043
81ecdfbb 3044
bec39cab
AC
3045 test -n "$ac_ct_CC" && break
3046done
c906108c 3047
81ecdfbb
RW
3048 if test "x$ac_ct_CC" = x; then
3049 CC=""
3050 else
3051 case $cross_compiling:$ac_tool_warned in
3052yes:)
3053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3055ac_tool_warned=yes ;;
3056esac
3057 CC=$ac_ct_CC
3058 fi
bec39cab
AC
3059fi
3060
3061fi
3062
3063
81ecdfbb
RW
3064test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3066as_fn_error "no acceptable C compiler found in \$PATH
3067See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3068
3069# Provide some information about the compiler.
81ecdfbb
RW
3070$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3071set X $ac_compile
3072ac_compiler=$2
3073for ac_option in --version -v -V -qversion; do
3074 { { ac_try="$ac_compiler $ac_option >&5"
3075case "(($ac_try" in
3076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077 *) ac_try_echo=$ac_try;;
3078esac
3079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3080$as_echo "$ac_try_echo"; } >&5
3081 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3082 ac_status=$?
81ecdfbb
RW
3083 if test -s conftest.err; then
3084 sed '10a\
3085... rest of stderr output deleted ...
3086 10q' conftest.err >conftest.er1
3087 cat conftest.er1 >&5
3088 rm -f conftest.er1 conftest.err
3089 fi
3090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3091 test $ac_status = 0; }
3092done
bec39cab 3093
81ecdfbb 3094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3095/* end confdefs.h. */
3096
3097int
3098main ()
3099{
3100
3101 ;
3102 return 0;
3103}
3104_ACEOF
3105ac_clean_files_save=$ac_clean_files
81ecdfbb 3106ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3107# Try to create an executable without -o first, disregard a.out.
3108# It will help us diagnose broken compilers, and finding out an intuition
3109# of exeext.
81ecdfbb
RW
3110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3111$as_echo_n "checking for C compiler default output file name... " >&6; }
3112ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3113
3114# The possible output files:
3115ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3116
3117ac_rmfiles=
3118for ac_file in $ac_files
3119do
3120 case $ac_file in
3121 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3122 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3123 esac
3124done
3125rm -f $ac_rmfiles
3126
3127if { { ac_try="$ac_link_default"
3128case "(($ac_try" in
3129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3130 *) ac_try_echo=$ac_try;;
3131esac
3132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3133$as_echo "$ac_try_echo"; } >&5
3134 (eval "$ac_link_default") 2>&5
3135 ac_status=$?
3136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3137 test $ac_status = 0; }; then :
3138 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3139# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3140# in a Makefile. We should not override ac_cv_exeext if it was cached,
3141# so that the user can short-circuit this test for compilers unknown to
3142# Autoconf.
3143for ac_file in $ac_files ''
bec39cab
AC
3144do
3145 test -f "$ac_file" || continue
3146 case $ac_file in
81ecdfbb 3147 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3148 ;;
3149 [ab].out )
3150 # We found the default executable, but exeext='' is most
3151 # certainly right.
3152 break;;
3153 *.* )
81ecdfbb
RW
3154 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3155 then :; else
3156 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3157 fi
3158 # We set ac_cv_exeext here because the later test for it is not
3159 # safe: cross compilers may not add the suffix if given an `-o'
3160 # argument, so we may need to know it at that point already.
3161 # Even if this section looks crufty: it has the advantage of
3162 # actually working.
b4e70030
JB
3163 break;;
3164 * )
3165 break;;
bec39cab
AC
3166 esac
3167done
81ecdfbb
RW
3168test "$ac_cv_exeext" = no && ac_cv_exeext=
3169
bec39cab 3170else
81ecdfbb
RW
3171 ac_file=''
3172fi
3173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3174$as_echo "$ac_file" >&6; }
3175if test -z "$ac_file"; then :
3176 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3177sed 's/^/| /' conftest.$ac_ext >&5
3178
81ecdfbb
RW
3179{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3181{ as_fn_set_status 77
3182as_fn_error "C compiler cannot create executables
3183See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3184fi
b4e70030 3185ac_exeext=$ac_cv_exeext
b4e70030 3186
81ecdfbb 3187# Check that the compiler produces executables we can run. If not, either
bec39cab 3188# the compiler is broken, or we cross compile.
81ecdfbb
RW
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3190$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3191# If not cross compiling, check that we can run a simple program.
3192if test "$cross_compiling" != yes; then
3193 if { ac_try='./$ac_file'
81ecdfbb
RW
3194 { { case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3199$as_echo "$ac_try_echo"; } >&5
3200 (eval "$ac_try") 2>&5
bec39cab 3201 ac_status=$?
81ecdfbb
RW
3202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3203 test $ac_status = 0; }; }; then
bec39cab 3204 cross_compiling=no
c906108c 3205 else
bec39cab
AC
3206 if test "$cross_compiling" = maybe; then
3207 cross_compiling=yes
3208 else
81ecdfbb
RW
3209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3211as_fn_error "cannot run C compiled programs.
bec39cab 3212If you meant to cross compile, use \`--host'.
81ecdfbb 3213See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3214 fi
c906108c 3215 fi
bec39cab 3216fi
81ecdfbb
RW
3217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3218$as_echo "yes" >&6; }
bec39cab 3219
81ecdfbb 3220rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3221ac_clean_files=$ac_clean_files_save
81ecdfbb 3222# Check that the compiler produces executables we can run. If not, either
b4e70030 3223# the compiler is broken, or we cross compile.
81ecdfbb
RW
3224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3225$as_echo_n "checking whether we are cross compiling... " >&6; }
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3227$as_echo "$cross_compiling" >&6; }
3228
3229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3230$as_echo_n "checking for suffix of executables... " >&6; }
3231if { { ac_try="$ac_link"
3232case "(($ac_try" in
3233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3234 *) ac_try_echo=$ac_try;;
3235esac
3236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3237$as_echo "$ac_try_echo"; } >&5
3238 (eval "$ac_link") 2>&5
bec39cab 3239 ac_status=$?
81ecdfbb
RW
3240 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3241 test $ac_status = 0; }; then :
b4e70030
JB
3242 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3243# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3244# work properly (i.e., refer to `conftest.exe'), while it won't with
3245# `rm'.
3246for ac_file in conftest.exe conftest conftest.*; do
3247 test -f "$ac_file" || continue
3248 case $ac_file in
81ecdfbb 3249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3250 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3251 break;;
3252 * ) break;;
3253 esac
3254done
c906108c 3255else
81ecdfbb
RW
3256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3258as_fn_error "cannot compute suffix of executables: cannot compile and link
3259See \`config.log' for more details." "$LINENO" 5; }
c906108c 3260fi
b4e70030 3261rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3263$as_echo "$ac_cv_exeext" >&6; }
c906108c 3264
b4e70030 3265rm -f conftest.$ac_ext
bec39cab
AC
3266EXEEXT=$ac_cv_exeext
3267ac_exeext=$EXEEXT
81ecdfbb
RW
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3269$as_echo_n "checking for suffix of object files... " >&6; }
3270if test "${ac_cv_objext+set}" = set; then :
3271 $as_echo_n "(cached) " >&6
bec39cab 3272else
81ecdfbb 3273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3274/* end confdefs.h. */
3275
3276int
3277main ()
3278{
3279
3280 ;
3281 return 0;
3282}
3283_ACEOF
3284rm -f conftest.o conftest.obj
81ecdfbb
RW
3285if { { ac_try="$ac_compile"
3286case "(($ac_try" in
3287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288 *) ac_try_echo=$ac_try;;
3289esac
3290eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3291$as_echo "$ac_try_echo"; } >&5
3292 (eval "$ac_compile") 2>&5
3293 ac_status=$?
3294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3295 test $ac_status = 0; }; then :
3296 for ac_file in conftest.o conftest.obj conftest.*; do
3297 test -f "$ac_file" || continue;
bec39cab 3298 case $ac_file in
81ecdfbb 3299 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3300 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3301 break;;
3302 esac
3303done
c906108c 3304else
81ecdfbb 3305 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3306sed 's/^/| /' conftest.$ac_ext >&5
3307
81ecdfbb
RW
3308{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3310as_fn_error "cannot compute suffix of object files: cannot compile
3311See \`config.log' for more details." "$LINENO" 5; }
c906108c 3312fi
b4e70030 3313rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3314fi
81ecdfbb
RW
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3316$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3317OBJEXT=$ac_cv_objext
3318ac_objext=$OBJEXT
81ecdfbb
RW
3319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3320$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3321if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3322 $as_echo_n "(cached) " >&6
c906108c 3323else
81ecdfbb 3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3325/* end confdefs.h. */
3326
3327int
3328main ()
3329{
3330#ifndef __GNUC__
3331 choke me
3332#endif
3333
3334 ;
3335 return 0;
3336}
3337_ACEOF
81ecdfbb 3338if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3339 ac_compiler_gnu=yes
3340else
81ecdfbb 3341 ac_compiler_gnu=no
bec39cab 3342fi
81ecdfbb 3343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3344ac_cv_c_compiler_gnu=$ac_compiler_gnu
3345
3346fi
81ecdfbb
RW
3347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3348$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3349if test $ac_compiler_gnu = yes; then
3350 GCC=yes
3351else
3352 GCC=
3353fi
bec39cab
AC
3354ac_test_CFLAGS=${CFLAGS+set}
3355ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3357$as_echo_n "checking whether $CC accepts -g... " >&6; }
3358if test "${ac_cv_prog_cc_g+set}" = set; then :
3359 $as_echo_n "(cached) " >&6
bec39cab 3360else
81ecdfbb
RW
3361 ac_save_c_werror_flag=$ac_c_werror_flag
3362 ac_c_werror_flag=yes
3363 ac_cv_prog_cc_g=no
3364 CFLAGS="-g"
3365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3366/* end confdefs.h. */
3367
3368int
3369main ()
3370{
3371
3372 ;
3373 return 0;
3374}
3375_ACEOF
81ecdfbb 3376if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3377 ac_cv_prog_cc_g=yes
3378else
81ecdfbb
RW
3379 CFLAGS=""
3380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3381/* end confdefs.h. */
3382
3383int
3384main ()
3385{
3386
3387 ;
3388 return 0;
3389}
3390_ACEOF
3391if ac_fn_c_try_compile "$LINENO"; then :
3392
3393else
3394 ac_c_werror_flag=$ac_save_c_werror_flag
3395 CFLAGS="-g"
3396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3397/* end confdefs.h. */
3398
3399int
3400main ()
3401{
c906108c 3402
81ecdfbb
RW
3403 ;
3404 return 0;
3405}
3406_ACEOF
3407if ac_fn_c_try_compile "$LINENO"; then :
3408 ac_cv_prog_cc_g=yes
3409fi
3410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3411fi
3412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3413fi
81ecdfbb
RW
3414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3415 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3416fi
81ecdfbb
RW
3417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3418$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3419if test "$ac_test_CFLAGS" = set; then
bec39cab 3420 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3421elif test $ac_cv_prog_cc_g = yes; then
3422 if test "$GCC" = yes; then
3423 CFLAGS="-g -O2"
3424 else
3425 CFLAGS="-g"
3426 fi
3427else
3428 if test "$GCC" = yes; then
3429 CFLAGS="-O2"
3430 else
3431 CFLAGS=
3432 fi
3433fi
81ecdfbb
RW
3434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3435$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3436if test "${ac_cv_prog_cc_c89+set}" = set; then :
3437 $as_echo_n "(cached) " >&6
bec39cab 3438else
81ecdfbb 3439 ac_cv_prog_cc_c89=no
bec39cab 3440ac_save_CC=$CC
81ecdfbb 3441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3442/* end confdefs.h. */
c906108c
SS
3443#include <stdarg.h>
3444#include <stdio.h>
3445#include <sys/types.h>
3446#include <sys/stat.h>
3447/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3448struct buf { int x; };
3449FILE * (*rcsopen) (struct buf *, struct stat *, int);
3450static char *e (p, i)
3451 char **p;
3452 int i;
3453{
3454 return p[i];
3455}
3456static char *f (char * (*g) (char **, int), char **p, ...)
3457{
3458 char *s;
3459 va_list v;
3460 va_start (v,p);
3461 s = g (p, va_arg (v,int));
3462 va_end (v);
3463 return s;
3464}
bec39cab
AC
3465
3466/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3467 function prototypes and stuff, but not '\xHH' hex character constants.
3468 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3469 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3470 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3471 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3472 that's true only with -std. */
bec39cab
AC
3473int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3474
81ecdfbb
RW
3475/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3476 inside strings and character constants. */
3477#define FOO(x) 'x'
3478int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3479
c906108c
SS
3480int test (int i, double x);
3481struct s1 {int (*f) (int a);};
3482struct s2 {int (*f) (double a);};
3483int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3484int argc;
3485char **argv;
bec39cab
AC
3486int
3487main ()
3488{
c906108c 3489return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3490 ;
3491 return 0;
3492}
3493_ACEOF
81ecdfbb
RW
3494for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3495 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3496do
3497 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3498 if ac_fn_c_try_compile "$LINENO"; then :
3499 ac_cv_prog_cc_c89=$ac_arg
c906108c 3500fi
81ecdfbb
RW
3501rm -f core conftest.err conftest.$ac_objext
3502 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3503done
81ecdfbb 3504rm -f conftest.$ac_ext
bec39cab 3505CC=$ac_save_CC
c906108c
SS
3506
3507fi
81ecdfbb
RW
3508# AC_CACHE_VAL
3509case "x$ac_cv_prog_cc_c89" in
3510 x)
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3512$as_echo "none needed" >&6; } ;;
3513 xno)
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3515$as_echo "unsupported" >&6; } ;;
bec39cab 3516 *)
81ecdfbb
RW
3517 CC="$CC $ac_cv_prog_cc_c89"
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3519$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3520esac
81ecdfbb 3521if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3522
b4e70030
JB
3523fi
3524
bec39cab
AC
3525ac_ext=c
3526ac_cpp='$CPP $CPPFLAGS'
3527ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3528ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3529ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3530
60ca704f 3531
bec39cab
AC
3532ac_ext=c
3533ac_cpp='$CPP $CPPFLAGS'
3534ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3535ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3536ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3538$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3539# On Suns, sometimes $CPP names a directory.
3540if test -n "$CPP" && test -d "$CPP"; then
3541 CPP=
8bb2c122 3542fi
bec39cab 3543if test -z "$CPP"; then
81ecdfbb
RW
3544 if test "${ac_cv_prog_CPP+set}" = set; then :
3545 $as_echo_n "(cached) " >&6
bec39cab
AC
3546else
3547 # Double quotes because CPP needs to be expanded
3548 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3549 do
3550 ac_preproc_ok=false
3551for ac_c_preproc_warn_flag in '' yes
3552do
3553 # Use a header file that comes with gcc, so configuring glibc
3554 # with a fresh cross-compiler works.
3555 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3556 # <limits.h> exists even on freestanding compilers.
3557 # On the NeXT, cc -E runs the code through the compiler's parser,
3558 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3560/* end confdefs.h. */
3561#ifdef __STDC__
3562# include <limits.h>
3563#else
3564# include <assert.h>
3565#endif
3566 Syntax error
3567_ACEOF
81ecdfbb 3568if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3569
81ecdfbb 3570else
bec39cab
AC
3571 # Broken: fails on valid input.
3572continue
3573fi
3574rm -f conftest.err conftest.$ac_ext
3575
81ecdfbb 3576 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3577 # can be detected and how.
81ecdfbb 3578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3579/* end confdefs.h. */
3580#include <ac_nonexistent.h>
3581_ACEOF
81ecdfbb 3582if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3583 # Broken: success on invalid input.
3584continue
8bb2c122 3585else
bec39cab
AC
3586 # Passes both tests.
3587ac_preproc_ok=:
3588break
8bb2c122 3589fi
bec39cab 3590rm -f conftest.err conftest.$ac_ext
8bb2c122 3591
bec39cab
AC
3592done
3593# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3594rm -f conftest.err conftest.$ac_ext
81ecdfbb 3595if $ac_preproc_ok; then :
bec39cab
AC
3596 break
3597fi
8bb2c122 3598
bec39cab
AC
3599 done
3600 ac_cv_prog_CPP=$CPP
ddc9cd0f 3601
c906108c 3602fi
bec39cab
AC
3603 CPP=$ac_cv_prog_CPP
3604else
3605 ac_cv_prog_CPP=$CPP
c906108c 3606fi
81ecdfbb
RW
3607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3608$as_echo "$CPP" >&6; }
bec39cab
AC
3609ac_preproc_ok=false
3610for ac_c_preproc_warn_flag in '' yes
3611do
3612 # Use a header file that comes with gcc, so configuring glibc
3613 # with a fresh cross-compiler works.
3614 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3615 # <limits.h> exists even on freestanding compilers.
3616 # On the NeXT, cc -E runs the code through the compiler's parser,
3617 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3619/* end confdefs.h. */
3620#ifdef __STDC__
3621# include <limits.h>
3622#else
3623# include <assert.h>
3624#endif
3625 Syntax error
3626_ACEOF
81ecdfbb 3627if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3628
81ecdfbb 3629else
bec39cab
AC
3630 # Broken: fails on valid input.
3631continue
3632fi
3633rm -f conftest.err conftest.$ac_ext
3634
81ecdfbb 3635 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3636 # can be detected and how.
81ecdfbb 3637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3638/* end confdefs.h. */
3639#include <ac_nonexistent.h>
3640_ACEOF
81ecdfbb 3641if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3642 # Broken: success on invalid input.
3643continue
c906108c 3644else
bec39cab
AC
3645 # Passes both tests.
3646ac_preproc_ok=:
3647break
c906108c 3648fi
bec39cab 3649rm -f conftest.err conftest.$ac_ext
c906108c 3650
bec39cab
AC
3651done
3652# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3653rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3654if $ac_preproc_ok; then :
3655
c906108c 3656else
81ecdfbb
RW
3657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3659as_fn_error "C preprocessor \"$CPP\" fails sanity check
3660See \`config.log' for more details." "$LINENO" 5; }
c906108c 3661fi
c906108c 3662
bec39cab
AC
3663ac_ext=c
3664ac_cpp='$CPP $CPPFLAGS'
3665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3667ac_compiler_gnu=$ac_cv_c_compiler_gnu
3668
3669
81ecdfbb
RW
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3671$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3672if test "${ac_cv_path_GREP+set}" = set; then :
3673 $as_echo_n "(cached) " >&6
4e8d927d 3674else
81ecdfbb
RW
3675 if test -z "$GREP"; then
3676 ac_path_GREP_found=false
3677 # Loop through the user's path and test for each of PROGNAME-LIST
3678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
3683 for ac_prog in grep ggrep; do
3684 for ac_exec_ext in '' $ac_executable_extensions; do
3685 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3686 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3687# Check for GNU ac_path_GREP and select it if it is found.
3688 # Check for GNU $ac_path_GREP
3689case `"$ac_path_GREP" --version 2>&1` in
3690*GNU*)
3691 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3692*)
3693 ac_count=0
3694 $as_echo_n 0123456789 >"conftest.in"
3695 while :
3696 do
3697 cat "conftest.in" "conftest.in" >"conftest.tmp"
3698 mv "conftest.tmp" "conftest.in"
3699 cp "conftest.in" "conftest.nl"
3700 $as_echo 'GREP' >> "conftest.nl"
3701 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3702 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3703 as_fn_arith $ac_count + 1 && ac_count=$as_val
3704 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3705 # Best one so far, save it but keep looking for a better one
3706 ac_cv_path_GREP="$ac_path_GREP"
3707 ac_path_GREP_max=$ac_count
bec39cab 3708 fi
81ecdfbb
RW
3709 # 10*(2^10) chars as input seems more than enough
3710 test $ac_count -gt 10 && break
3711 done
3712 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3713esac
bec39cab 3714
81ecdfbb
RW
3715 $ac_path_GREP_found && break 3
3716 done
3717 done
3718 done
3719IFS=$as_save_IFS
3720 if test -z "$ac_cv_path_GREP"; then
3721 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3722 fi
c906108c 3723else
81ecdfbb 3724 ac_cv_path_GREP=$GREP
c906108c 3725fi
c906108c 3726
81ecdfbb
RW
3727fi
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3729$as_echo "$ac_cv_path_GREP" >&6; }
3730 GREP="$ac_cv_path_GREP"
c906108c 3731
c906108c 3732
81ecdfbb
RW
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3734$as_echo_n "checking for egrep... " >&6; }
3735if test "${ac_cv_path_EGREP+set}" = set; then :
3736 $as_echo_n "(cached) " >&6
783e057b 3737else
81ecdfbb
RW
3738 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3739 then ac_cv_path_EGREP="$GREP -E"
3740 else
3741 if test -z "$EGREP"; then
3742 ac_path_EGREP_found=false
3743 # Loop through the user's path and test for each of PROGNAME-LIST
3744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3749 for ac_prog in egrep; do
3750 for ac_exec_ext in '' $ac_executable_extensions; do
3751 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3752 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3753# Check for GNU ac_path_EGREP and select it if it is found.
3754 # Check for GNU $ac_path_EGREP
3755case `"$ac_path_EGREP" --version 2>&1` in
3756*GNU*)
3757 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3758*)
3759 ac_count=0
3760 $as_echo_n 0123456789 >"conftest.in"
3761 while :
3762 do
3763 cat "conftest.in" "conftest.in" >"conftest.tmp"
3764 mv "conftest.tmp" "conftest.in"
3765 cp "conftest.in" "conftest.nl"
3766 $as_echo 'EGREP' >> "conftest.nl"
3767 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3768 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3769 as_fn_arith $ac_count + 1 && ac_count=$as_val
3770 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3771 # Best one so far, save it but keep looking for a better one
3772 ac_cv_path_EGREP="$ac_path_EGREP"
3773 ac_path_EGREP_max=$ac_count
3774 fi
3775 # 10*(2^10) chars as input seems more than enough
3776 test $ac_count -gt 10 && break
3777 done
3778 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3779esac
bec39cab 3780
81ecdfbb
RW
3781 $ac_path_EGREP_found && break 3
3782 done
3783 done
3784 done
3785IFS=$as_save_IFS
3786 if test -z "$ac_cv_path_EGREP"; then
3787 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3788 fi
783e057b 3789else
81ecdfbb 3790 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3791fi
3792
81ecdfbb 3793 fi
783e057b 3794fi
81ecdfbb
RW
3795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3796$as_echo "$ac_cv_path_EGREP" >&6; }
3797 EGREP="$ac_cv_path_EGREP"
3798
783e057b 3799
81ecdfbb
RW
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3801$as_echo_n "checking for ANSI C header files... " >&6; }
3802if test "${ac_cv_header_stdc+set}" = set; then :
3803 $as_echo_n "(cached) " >&6
783e057b 3804else
81ecdfbb 3805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3806/* end confdefs.h. */
783e057b 3807#include <stdlib.h>
bec39cab 3808#include <stdarg.h>
783e057b
DJ
3809#include <string.h>
3810#include <float.h>
c906108c 3811
bec39cab
AC
3812int
3813main ()
3814{
c906108c 3815
bec39cab
AC
3816 ;
3817 return 0;
3818}
3819_ACEOF
81ecdfbb 3820if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3821 ac_cv_header_stdc=yes
c906108c 3822else
81ecdfbb 3823 ac_cv_header_stdc=no
c906108c 3824fi
81ecdfbb 3825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3826
783e057b
DJ
3827if test $ac_cv_header_stdc = yes; then
3828 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3830/* end confdefs.h. */
3831#include <string.h>
c906108c 3832
783e057b
DJ
3833_ACEOF
3834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3835 $EGREP "memchr" >/dev/null 2>&1; then :
3836
c906108c 3837else
783e057b 3838 ac_cv_header_stdc=no
c906108c 3839fi
783e057b 3840rm -f conftest*
c906108c
SS
3841
3842fi
3843
783e057b
DJ
3844if test $ac_cv_header_stdc = yes; then
3845 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3847/* end confdefs.h. */
3848#include <stdlib.h>
bec39cab 3849
783e057b
DJ
3850_ACEOF
3851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3852 $EGREP "free" >/dev/null 2>&1; then :
3853
bec39cab 3854else
783e057b 3855 ac_cv_header_stdc=no
bec39cab 3856fi
783e057b 3857rm -f conftest*
bec39cab
AC
3858
3859fi
bec39cab 3860
783e057b
DJ
3861if test $ac_cv_header_stdc = yes; then
3862 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3863 if test "$cross_compiling" = yes; then :
783e057b 3864 :
bec39cab 3865else
81ecdfbb 3866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3867/* end confdefs.h. */
3868#include <ctype.h>
81ecdfbb 3869#include <stdlib.h>
783e057b
DJ
3870#if ((' ' & 0x0FF) == 0x020)
3871# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3872# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3873#else
3874# define ISLOWER(c) \
3875 (('a' <= (c) && (c) <= 'i') \
3876 || ('j' <= (c) && (c) <= 'r') \
3877 || ('s' <= (c) && (c) <= 'z'))
3878# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3879#endif
3880
3881#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3882int
3883main ()
3884{
3885 int i;
3886 for (i = 0; i < 256; i++)
3887 if (XOR (islower (i), ISLOWER (i))
3888 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3889 return 2;
3890 return 0;
783e057b
DJ
3891}
3892_ACEOF
81ecdfbb 3893if ac_fn_c_try_run "$LINENO"; then :
783e057b 3894
81ecdfbb
RW
3895else
3896 ac_cv_header_stdc=no
783e057b 3897fi
81ecdfbb
RW
3898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3899 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3900fi
81ecdfbb 3901
783e057b
DJ
3902fi
3903fi
81ecdfbb
RW
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3905$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3906if test $ac_cv_header_stdc = yes; then
3907
81ecdfbb 3908$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3909
3910fi
3911
3912# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3913for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3914 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3915do :
3916 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3917ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3918"
3919eval as_val=\$$as_ac_Header
3920 if test "x$as_val" = x""yes; then :
783e057b 3921 cat >>confdefs.h <<_ACEOF
81ecdfbb 3922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3923_ACEOF
3924
3925fi
3926
3927done
3928
3929
3930
81ecdfbb
RW
3931 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3932if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3933 MINIX=yes
3934else
3935 MINIX=
3936fi
3937
3938
3939 if test "$MINIX" = yes; then
3940
81ecdfbb 3941$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3942
3943
81ecdfbb 3944$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3945
3946
81ecdfbb 3947$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3948
3949 fi
3950
3951
81ecdfbb
RW
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3953$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3954if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3955 $as_echo_n "(cached) " >&6
783e057b 3956else
81ecdfbb 3957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3958/* end confdefs.h. */
3959
3960# define __EXTENSIONS__ 1
3961 $ac_includes_default
3962int
3963main ()
3964{
3965
3966 ;
3967 return 0;
3968}
3969_ACEOF
81ecdfbb 3970if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3971 ac_cv_safe_to_define___extensions__=yes
3972else
81ecdfbb 3973 ac_cv_safe_to_define___extensions__=no
783e057b 3974fi
81ecdfbb 3975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3976fi
81ecdfbb
RW
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3978$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3979 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3980 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3981
81ecdfbb 3982 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3983
81ecdfbb 3984 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3985
81ecdfbb 3986 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3987
81ecdfbb 3988 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3989
3990
81ecdfbb
RW
3991if test -n "$ac_tool_prefix"; then
3992 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3993set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3995$as_echo_n "checking for $ac_word... " >&6; }
3996if test "${ac_cv_prog_RANLIB+set}" = set; then :
3997 $as_echo_n "(cached) " >&6
3998else
3999 if test -n "$RANLIB"; then
4000 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4001else
4002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4003for as_dir in $PATH
4004do
4005 IFS=$as_save_IFS
4006 test -z "$as_dir" && as_dir=.
4007 for ac_exec_ext in '' $ac_executable_extensions; do
4008 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4009 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4011 break 2
4012 fi
4013done
4014 done
4015IFS=$as_save_IFS
783e057b 4016
81ecdfbb
RW
4017fi
4018fi
4019RANLIB=$ac_cv_prog_RANLIB
4020if test -n "$RANLIB"; then
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4022$as_echo "$RANLIB" >&6; }
4023else
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4025$as_echo "no" >&6; }
4026fi
783e057b
DJ
4027
4028
81ecdfbb
RW
4029fi
4030if test -z "$ac_cv_prog_RANLIB"; then
4031 ac_ct_RANLIB=$RANLIB
4032 # Extract the first word of "ranlib", so it can be a program name with args.
4033set dummy ranlib; ac_word=$2
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035$as_echo_n "checking for $ac_word... " >&6; }
4036if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4037 $as_echo_n "(cached) " >&6
783e057b 4038else
81ecdfbb
RW
4039 if test -n "$ac_ct_RANLIB"; then
4040 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4041else
4042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4043for as_dir in $PATH
4044do
4045 IFS=$as_save_IFS
4046 test -z "$as_dir" && as_dir=.
4047 for ac_exec_ext in '' $ac_executable_extensions; do
4048 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4049 ac_cv_prog_ac_ct_RANLIB="ranlib"
4050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4051 break 2
4052 fi
4053done
4054 done
4055IFS=$as_save_IFS
4056
4057fi
4058fi
4059ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4060if test -n "$ac_ct_RANLIB"; then
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4062$as_echo "$ac_ct_RANLIB" >&6; }
4063else
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4065$as_echo "no" >&6; }
4066fi
4067
4068 if test "x$ac_ct_RANLIB" = x; then
4069 RANLIB=":"
4070 else
4071 case $cross_compiling:$ac_tool_warned in
4072yes:)
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4075ac_tool_warned=yes ;;
4076esac
4077 RANLIB=$ac_ct_RANLIB
4078 fi
4079else
4080 RANLIB="$ac_cv_prog_RANLIB"
4081fi
4082
4083
4084
4085
4086
4087
4088
da2f07f1
JK
4089# As the $enable_largefile decision depends on --enable-plugins we must set it
4090# even in directories otherwise not depending on the $plugins option.
4091
4092
4093# Check whether --enable-plugins was given.
4094if test "${enable_plugins+set}" = set; then :
4095 enableval=$enable_plugins; case "${enableval}" in
4096 yes | "") plugins=yes ;;
4097 no) plugins=no ;;
4098 *) plugins=yes ;;
4099 esac
4100else
4101 plugins=no
4102fi
4103
4104
4105
4106case "${host}" in
4107 sparc-*-solaris*|i[3-7]86-*-solaris*)
4108 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4109 # are mutually exclusive; and without procfs support, the bfd/ elf module
4110 # cannot provide certain routines such as elfcore_write_prpsinfo
4111 # or elfcore_write_prstatus. So unless the user explicitly requested
4112 # large-file support through the --enable-largefile switch, disable
4113 # large-file support in favor of procfs support.
4114 test "${target}" = "${host}" -a "x$plugins" = xno \
4115 && : ${enable_largefile="no"}
4116 ;;
4117esac
4118
4119# Check whether --enable-largefile was given.
4120if test "${enable_largefile+set}" = set; then :
4121 enableval=$enable_largefile;
4122fi
4123
4124if test "$enable_largefile" != no; then
4125
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4127$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4128if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4129 $as_echo_n "(cached) " >&6
4130else
4131 ac_cv_sys_largefile_CC=no
4132 if test "$GCC" != yes; then
4133 ac_save_CC=$CC
4134 while :; do
4135 # IRIX 6.2 and later do not support large files by default,
4136 # so use the C compiler's -n32 option if that helps.
4137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <sys/types.h>
4140 /* Check that off_t can represent 2**63 - 1 correctly.
4141 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4142 since some C++ compilers masquerading as C compilers
4143 incorrectly reject 9223372036854775807. */
4144#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4145 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4146 && LARGE_OFF_T % 2147483647 == 1)
4147 ? 1 : -1];
4148int
4149main ()
4150{
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
4156 if ac_fn_c_try_compile "$LINENO"; then :
4157 break
4158fi
4159rm -f core conftest.err conftest.$ac_objext
4160 CC="$CC -n32"
4161 if ac_fn_c_try_compile "$LINENO"; then :
4162 ac_cv_sys_largefile_CC=' -n32'; break
4163fi
4164rm -f core conftest.err conftest.$ac_objext
4165 break
4166 done
4167 CC=$ac_save_CC
4168 rm -f conftest.$ac_ext
4169 fi
4170fi
4171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4172$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4173 if test "$ac_cv_sys_largefile_CC" != no; then
4174 CC=$CC$ac_cv_sys_largefile_CC
4175 fi
4176
4177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4178$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4179if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4180 $as_echo_n "(cached) " >&6
4181else
4182 while :; do
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184/* end confdefs.h. */
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=no; break
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4207/* end confdefs.h. */
4208#define _FILE_OFFSET_BITS 64
4209#include <sys/types.h>
4210 /* Check that off_t can represent 2**63 - 1 correctly.
4211 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4212 since some C++ compilers masquerading as C compilers
4213 incorrectly reject 9223372036854775807. */
4214#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4215 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4216 && LARGE_OFF_T % 2147483647 == 1)
4217 ? 1 : -1];
4218int
4219main ()
4220{
4221
4222 ;
4223 return 0;
4224}
4225_ACEOF
4226if ac_fn_c_try_compile "$LINENO"; then :
4227 ac_cv_sys_file_offset_bits=64; break
4228fi
4229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_cv_sys_file_offset_bits=unknown
4231 break
4232done
4233fi
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4235$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4236case $ac_cv_sys_file_offset_bits in #(
4237 no | unknown) ;;
4238 *)
4239cat >>confdefs.h <<_ACEOF
4240#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4241_ACEOF
4242;;
4243esac
4244rm -rf conftest*
4245 if test $ac_cv_sys_file_offset_bits = unknown; then
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4247$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4248if test "${ac_cv_sys_large_files+set}" = set; then :
4249 $as_echo_n "(cached) " >&6
4250else
4251 while :; do
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253/* end confdefs.h. */
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=no; break
4273fi
4274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276/* end confdefs.h. */
4277#define _LARGE_FILES 1
4278#include <sys/types.h>
4279 /* Check that off_t can represent 2**63 - 1 correctly.
4280 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4281 since some C++ compilers masquerading as C compilers
4282 incorrectly reject 9223372036854775807. */
4283#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4284 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4285 && LARGE_OFF_T % 2147483647 == 1)
4286 ? 1 : -1];
4287int
4288main ()
4289{
4290
4291 ;
4292 return 0;
4293}
4294_ACEOF
4295if ac_fn_c_try_compile "$LINENO"; then :
4296 ac_cv_sys_large_files=1; break
4297fi
4298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299 ac_cv_sys_large_files=unknown
4300 break
4301done
4302fi
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4304$as_echo "$ac_cv_sys_large_files" >&6; }
4305case $ac_cv_sys_large_files in #(
4306 no | unknown) ;;
4307 *)
4308cat >>confdefs.h <<_ACEOF
4309#define _LARGE_FILES $ac_cv_sys_large_files
4310_ACEOF
4311;;
4312esac
4313rm -rf conftest*
4314 fi
4315fi
4316
4317
4318
81ecdfbb
RW
4319
4320
4321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4322$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4323if test "${am_cv_prog_cc_stdc+set}" = set; then :
4324 $as_echo_n "(cached) " >&6
4325else
4326 am_cv_prog_cc_stdc=no
4327ac_save_CC="$CC"
4328# Don't try gcc -ansi; that turns off useful extensions and
4329# breaks some systems' header files.
4330# AIX -qlanglvl=ansi
4331# Ultrix and OSF/1 -std1
4332# HP-UX 10.20 and later -Ae
4333# HP-UX older versions -Aa -D_HPUX_SOURCE
4334# SVR4 -Xc -D__EXTENSIONS__
4335for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4336do
783e057b 4337 CC="$ac_save_CC $ac_arg"
81ecdfbb 4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4339/* end confdefs.h. */
4340#include <stdarg.h>
4341#include <stdio.h>
4342#include <sys/types.h>
4343#include <sys/stat.h>
4344/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4345struct buf { int x; };
4346FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347static char *e (p, i)
4348 char **p;
4349 int i;
4350{
4351 return p[i];
4352}
4353static char *f (char * (*g) (char **, int), char **p, ...)
4354{
4355 char *s;
4356 va_list v;
4357 va_start (v,p);
4358 s = g (p, va_arg (v,int));
4359 va_end (v);
4360 return s;
4361}
4362int test (int i, double x);
4363struct s1 {int (*f) (int a);};
4364struct s2 {int (*f) (double a);};
4365int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366int argc;
4367char **argv;
4368
4369int
4370main ()
4371{
4372
4373return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4374
4375 ;
4376 return 0;
4377}
4378_ACEOF
81ecdfbb 4379if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4380 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4381fi
81ecdfbb 4382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4383done
4384CC="$ac_save_CC"
4385
4386fi
4387
4388if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4390$as_echo "none needed" >&6; }
783e057b 4391else
81ecdfbb
RW
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4393$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4394fi
4395case "x$am_cv_prog_cc_stdc" in
4396 x|xno) ;;
4397 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4398esac
4399
4400
4401ac_aux_dir=
81ecdfbb
RW
4402for ac_dir in .. "$srcdir"/..; do
4403 for ac_t in install-sh install.sh shtool; do
4404 if test -f "$ac_dir/$ac_t"; then
4405 ac_aux_dir=$ac_dir
4406 ac_install_sh="$ac_aux_dir/$ac_t -c"
4407 break 2
4408 fi
4409 done
783e057b
DJ
4410done
4411if test -z "$ac_aux_dir"; then
81ecdfbb 4412 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4413fi
81ecdfbb
RW
4414
4415# These three variables are undocumented and unsupported,
4416# and are intended to be withdrawn in a future Autoconf release.
4417# They can cause serious problems if a builder's source tree is in a directory
4418# whose full name contains unusual characters.
4419ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4420ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4421ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4422
783e057b
DJ
4423
4424# Make sure we can run config.sub.
81ecdfbb
RW
4425$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4426 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4427
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4429$as_echo_n "checking build system type... " >&6; }
4430if test "${ac_cv_build+set}" = set; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 ac_build_alias=$build_alias
4434test "x$ac_build_alias" = x &&
4435 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4436test "x$ac_build_alias" = x &&
4437 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4438ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4439 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4440
4441fi
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4443$as_echo "$ac_cv_build" >&6; }
4444case $ac_cv_build in
4445*-*-*) ;;
4446*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4447esac
783e057b 4448build=$ac_cv_build
81ecdfbb
RW
4449ac_save_IFS=$IFS; IFS='-'
4450set x $ac_cv_build
4451shift
4452build_cpu=$1
4453build_vendor=$2
4454shift; shift
4455# Remember, the first character of IFS is used to create $*,
4456# except with old shells:
4457build_os=$*
4458IFS=$ac_save_IFS
4459case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4460
4461
81ecdfbb
RW
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4463$as_echo_n "checking host system type... " >&6; }
4464if test "${ac_cv_host+set}" = set; then :
4465 $as_echo_n "(cached) " >&6
4466else
4467 if test "x$host_alias" = x; then
4468 ac_cv_host=$ac_cv_build
783e057b 4469else
81ecdfbb
RW
4470 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4471 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4472fi
783e057b
DJ
4473
4474fi
81ecdfbb
RW
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4476$as_echo "$ac_cv_host" >&6; }
4477case $ac_cv_host in
4478*-*-*) ;;
4479*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4480esac
783e057b 4481host=$ac_cv_host
81ecdfbb
RW
4482ac_save_IFS=$IFS; IFS='-'
4483set x $ac_cv_host
4484shift
4485host_cpu=$1
4486host_vendor=$2
4487shift; shift
4488# Remember, the first character of IFS is used to create $*,
4489# except with old shells:
4490host_os=$*
4491IFS=$ac_save_IFS
4492case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4493
4494
81ecdfbb
RW
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4496$as_echo_n "checking target system type... " >&6; }
4497if test "${ac_cv_target+set}" = set; then :
4498 $as_echo_n "(cached) " >&6
783e057b 4499else
81ecdfbb
RW
4500 if test "x$target_alias" = x; then
4501 ac_cv_target=$ac_cv_host
4502else
4503 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4504 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4505fi
bec39cab
AC
4506
4507fi
81ecdfbb
RW
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4509$as_echo "$ac_cv_target" >&6; }
4510case $ac_cv_target in
4511*-*-*) ;;
4512*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4513esac
783e057b 4514target=$ac_cv_target
81ecdfbb
RW
4515ac_save_IFS=$IFS; IFS='-'
4516set x $ac_cv_target
4517shift
4518target_cpu=$1
4519target_vendor=$2
4520shift; shift
4521# Remember, the first character of IFS is used to create $*,
4522# except with old shells:
4523target_os=$*
4524IFS=$ac_save_IFS
4525case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4526
4527
4528# The aliases save the names the user supplied, while $host etc.
4529# will get canonicalized.
4530test -n "$target_alias" &&
4531 test "$program_prefix$program_suffix$program_transform_name" = \
4532 NONENONEs,x,x, &&
4533 program_prefix=${target_alias}-
4534
81ecdfbb 4535
a417dc56
RW
4536# Dependency checking.
4537rm -rf .tst 2>/dev/null
4538mkdir .tst 2>/dev/null
4539if test -d .tst; then
4540 am__leading_dot=.
4541else
4542 am__leading_dot=_
4543fi
4544rmdir .tst 2>/dev/null
4545
4546DEPDIR="${am__leading_dot}deps"
4547
81ecdfbb 4548ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4549
4550
4551depcc="$CC" am_compiler_list=
4552
4553am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4555$as_echo_n "checking dependency style of $depcc... " >&6; }
4556if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4557 $as_echo_n "(cached) " >&6
a417dc56
RW
4558else
4559 if test -f "$am_depcomp"; then
4560 # We make a subdir and do the tests there. Otherwise we can end up
4561 # making bogus files that we don't know about and never remove. For
4562 # instance it was reported that on HP-UX the gcc test will end up
4563 # making a dummy file named `D' -- because `-MD' means `put the output
4564 # in D'.
4565 mkdir conftest.dir
4566 # Copy depcomp to subdir because otherwise we won't find it if we're
4567 # using a relative directory.
4568 cp "$am_depcomp" conftest.dir
4569 cd conftest.dir
4570 # We will build objects and dependencies in a subdirectory because
4571 # it helps to detect inapplicable dependency modes. For instance
4572 # both Tru64's cc and ICC support -MD to output dependencies as a
4573 # side effect of compilation, but ICC will put the dependencies in
4574 # the current directory while Tru64 will put them in the object
4575 # directory.
4576 mkdir sub
4577
4578 am_cv_CC_dependencies_compiler_type=none
4579 if test "$am_compiler_list" = ""; then
4580 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4581 fi
4582 for depmode in $am_compiler_list; do
4583 if test $depmode = none; then break; fi
4584
81ecdfbb 4585 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4586 # Setup a source with many dependencies, because some compilers
4587 # like to wrap large dependency lists on column 80 (with \), and
4588 # we should not choose a depcomp mode which is confused by this.
4589 #
4590 # We need to recreate these files for each test, as the compiler may
4591 # overwrite some of them when testing with obscure command lines.
4592 # This happens at least with the AIX C compiler.
4593 : > sub/conftest.c
4594 for i in 1 2 3 4 5 6; do
4595 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4596 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4597 # Solaris 8's {/usr,}/bin/sh.
4598 touch sub/conftst$i.h
4599 done
4600 echo "include sub/conftest.Po" > confmf
4601
4602 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4603 # mode. It turns out that the SunPro C++ compiler does not properly
4604 # handle `-M -o', and we need to detect this.
4605 depcmd="depmode=$depmode \
4606 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4607 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4608 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4609 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4610 if env $depcmd > conftest.err 2>&1 &&
4611 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4612 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4613 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4614 # icc doesn't choke on unknown options, it will just issue warnings
4615 # or remarks (even with -Werror). So we grep stderr for any message
4616 # that says an option was ignored or not supported.
4617 # When given -MP, icc 7.0 and 7.1 complain thusly:
4618 # icc: Command line warning: ignoring option '-M'; no argument required
4619 # The diagnosis changed in icc 8.0:
4620 # icc: Command line remark: option '-MP' not supported
4621 if (grep 'ignoring option' conftest.err ||
4622 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4623 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4624 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4625 break
4626 fi
4627 fi
81ecdfbb 4628 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4629 sed -e 's/^/| /' < conftest.err >&5
4630 done
4631
4632 cd ..
4633 rm -rf conftest.dir
4634else
4635 am_cv_CC_dependencies_compiler_type=none
4636fi
4637
4638fi
81ecdfbb
RW
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4640$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4641if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4642then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4643else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4644
4645fi
4646
4647
4648# Check for the 'make' the user wants to use.
4649for ac_prog in make
4650do
4651 # Extract the first word of "$ac_prog", so it can be a program name with args.
4652set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if test "${ac_cv_prog_MAKE+set}" = set; then :
4656 $as_echo_n "(cached) " >&6
a417dc56
RW
4657else
4658 if test -n "$MAKE"; then
4659 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4660else
4661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662for as_dir in $PATH
4663do
4664 IFS=$as_save_IFS
4665 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4666 for ac_exec_ext in '' $ac_executable_extensions; do
4667 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4668 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4670 break 2
4671 fi
4672done
81ecdfbb
RW
4673 done
4674IFS=$as_save_IFS
a417dc56
RW
4675
4676fi
4677fi
4678MAKE=$ac_cv_prog_MAKE
4679if test -n "$MAKE"; then
81ecdfbb
RW
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4681$as_echo "$MAKE" >&6; }
a417dc56 4682else
81ecdfbb
RW
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4684$as_echo "no" >&6; }
a417dc56
RW
4685fi
4686
81ecdfbb 4687
a417dc56
RW
4688 test -n "$MAKE" && break
4689done
4690
4691MAKE_IS_GNU=
4692case "`$MAKE --version 2>&1 | sed 1q`" in
4693 *GNU*)
4694 MAKE_IS_GNU=yes
4695 ;;
4696esac
81ecdfbb 4697 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4698 GMAKE_TRUE=
4699 GMAKE_FALSE='#'
4700else
4701 GMAKE_TRUE='#'
4702 GMAKE_FALSE=
4703fi
4704
81ecdfbb
RW
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4706$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4707set x ${MAKE-make}
4708ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4709if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4710 $as_echo_n "(cached) " >&6
a417dc56
RW
4711else
4712 cat >conftest.make <<\_ACEOF
81ecdfbb 4713SHELL = /bin/sh
a417dc56 4714all:
81ecdfbb 4715 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4716_ACEOF
4717# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4718case `${MAKE-make} -f conftest.make 2>/dev/null` in
4719 *@@@%%%=?*=@@@%%%*)
4720 eval ac_cv_prog_make_${ac_make}_set=yes;;
4721 *)
4722 eval ac_cv_prog_make_${ac_make}_set=no;;
4723esac
a417dc56
RW
4724rm -f conftest.make
4725fi
81ecdfbb
RW
4726if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4728$as_echo "yes" >&6; }
a417dc56
RW
4729 SET_MAKE=
4730else
81ecdfbb
RW
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
a417dc56
RW
4733 SET_MAKE="MAKE=${MAKE-make}"
4734fi
4735
4736
783e057b
DJ
4737
4738CONFIG_OBS=
4739CONFIG_DEPS=
4740CONFIG_SRCS=
4741ENABLE_CFLAGS=
4742
4743CONFIG_ALL=
4744CONFIG_CLEAN=
4745CONFIG_INSTALL=
4746CONFIG_UNINSTALL=
4747
4748# If we haven't got the data from the intl directory,
4749# assume NLS is disabled.
4750USE_NLS=no
4751LIBINTL=
4752LIBINTL_DEP=
4753INCINTL=
4754XGETTEXT=
4755GMSGFMT=
4756POSUB=
4757
4758if test -f ../intl/config.intl; then
4759 . ../intl/config.intl
4760fi
81ecdfbb
RW
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4762$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4763if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765$as_echo "no" >&6; }
783e057b 4766else
81ecdfbb
RW
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4768$as_echo "yes" >&6; }
783e057b 4769
81ecdfbb 4770$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4771
4772
81ecdfbb
RW
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4774$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4775 # Look for .po and .gmo files in the source directory.
4776 CATALOGS=
4777 XLINGUAS=
4778 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4779 # If there aren't any .gmo files the shell will give us the
4780 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4781 # weeded out.
4782 case "$cat" in *\**)
4783 continue;;
4784 esac
4785 # The quadruple backslash is collapsed to a double backslash
4786 # by the backticks, then collapsed again by the double quotes,
4787 # leaving us with one backslash in the sed expression (right
4788 # before the dot that mustn't act as a wildcard).
4789 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4790 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4791 # The user is allowed to set LINGUAS to a list of languages to
4792 # install catalogs for. If it's empty that means "all of them."
4793 if test "x$LINGUAS" = x; then
4794 CATALOGS="$CATALOGS $cat"
4795 XLINGUAS="$XLINGUAS $lang"
4796 else
4797 case "$LINGUAS" in *$lang*)
4798 CATALOGS="$CATALOGS $cat"
4799 XLINGUAS="$XLINGUAS $lang"
4800 ;;
4801 esac
4802 fi
4803 done
4804 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4806$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4807
4808
4809 DATADIRNAME=share
4810
4811 INSTOBJEXT=.mo
4812
4813 GENCAT=gencat
4814
4815 CATOBJEXT=.gmo
4816
4817fi
4818
4819localedir='${datadir}/locale'
4820
4821
4822if test x"$USE_NLS" = xyes; then
4823 CONFIG_ALL="$CONFIG_ALL all-po"
4824 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4825 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4826 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4827fi
4828
4829
4830 GNULIB_MEMMEM=0;
4831 GNULIB_MEMPCPY=0;
4832 GNULIB_MEMRCHR=0;
4833 GNULIB_STPCPY=0;
4834 GNULIB_STPNCPY=0;
4835 GNULIB_STRCHRNUL=0;
4836 GNULIB_STRDUP=0;
4837 GNULIB_STRNDUP=0;
4838 GNULIB_STRNLEN=0;
4839 GNULIB_STRPBRK=0;
4840 GNULIB_STRSEP=0;
4841 GNULIB_STRSTR=0;
4842 GNULIB_STRCASESTR=0;
4843 GNULIB_STRTOK_R=0;
4844 GNULIB_MBSLEN=0;
4845 GNULIB_MBSNLEN=0;
4846 GNULIB_MBSCHR=0;
4847 GNULIB_MBSRCHR=0;
4848 GNULIB_MBSSTR=0;
4849 GNULIB_MBSCASECMP=0;
4850 GNULIB_MBSNCASECMP=0;
4851 GNULIB_MBSPCASECMP=0;
4852 GNULIB_MBSCASESTR=0;
4853 GNULIB_MBSCSPN=0;
4854 GNULIB_MBSPBRK=0;
4855 GNULIB_MBSSPN=0;
4856 GNULIB_MBSSEP=0;
4857 GNULIB_MBSTOK_R=0;
4858 GNULIB_STRERROR=0;
4859 GNULIB_STRSIGNAL=0;
4860 HAVE_DECL_MEMMEM=1;
4861 HAVE_MEMPCPY=1;
4862 HAVE_DECL_MEMRCHR=1;
4863 HAVE_STPCPY=1;
4864 HAVE_STPNCPY=1;
4865 HAVE_STRCHRNUL=1;
4866 HAVE_DECL_STRDUP=1;
4867 HAVE_STRNDUP=1;
4868 HAVE_DECL_STRNDUP=1;
4869 HAVE_DECL_STRNLEN=1;
4870 HAVE_STRPBRK=1;
4871 HAVE_STRSEP=1;
4872 HAVE_STRCASESTR=1;
4873 HAVE_DECL_STRTOK_R=1;
4874 HAVE_DECL_STRERROR=1;
4875 HAVE_DECL_STRSIGNAL=1;
4876 REPLACE_STRERROR=0;
4877 REPLACE_STRSIGNAL=0;
4878 REPLACE_MEMMEM=0;
4879 REPLACE_STRCASESTR=0;
4880 REPLACE_STRSTR=0;
4881
4882
81ecdfbb
RW
4883 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
4884if test "x$ac_cv_have_decl_memmem" = x""yes; then :
4885 ac_have_decl=1
783e057b 4886else
81ecdfbb 4887 ac_have_decl=0
783e057b 4888fi
783e057b
DJ
4889
4890cat >>confdefs.h <<_ACEOF
81ecdfbb 4891#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
4892_ACEOF
4893
4894
783e057b
DJ
4895
4896
4897
4898
4899
4900
4901
4902
783e057b 4903
783e057b 4904
783e057b 4905
81ecdfbb
RW
4906 for ac_func in memmem
4907do :
4908 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
4909if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 4910 cat >>confdefs.h <<_ACEOF
81ecdfbb 4911#define HAVE_MEMMEM 1
783e057b
DJ
4912_ACEOF
4913
4914else
4915
4916 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4917
4918fi
4919done
4920
4921
4922
4923 :
4924
4925
4926
4927
4928
4929 if test $ac_cv_have_decl_memmem = no; then
4930 HAVE_DECL_MEMMEM=0
4931 fi
4932 :
4933
4934
81ecdfbb
RW
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4936$as_echo_n "checking for long long int... " >&6; }
4937if test "${ac_cv_type_long_long_int+set}" = set; then :
4938 $as_echo_n "(cached) " >&6
783e057b 4939else
81ecdfbb 4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 4941/* end confdefs.h. */
81ecdfbb
RW
4942
4943 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
4944 implementations with broken preprocessors. Perhaps this can
4945 be revisited in 2012. In the meantime, code should not expect
4946 #if to work with literals wider than 32 bits. */
4947 /* Test literals. */
4948 long long int ll = 9223372036854775807ll;
4949 long long int nll = -9223372036854775807LL;
4950 unsigned long long int ull = 18446744073709551615ULL;
4951 /* Test constant expressions. */
4952 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4953 ? 1 : -1)];
4954 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4955 ? 1 : -1)];
4956 int i = 63;
4957int
4958main ()
4959{
4960/* Test availability of runtime routines for shift and division. */
4961 long long int llmax = 9223372036854775807ll;
4962 unsigned long long int ullmax = 18446744073709551615ull;
4963 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4964 | (llmax / ll) | (llmax % ll)
4965 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4966 | (ullmax / ull) | (ullmax % ull));
4967 ;
4968 return 0;
4969}
4970
4971_ACEOF
81ecdfbb
RW
4972if ac_fn_c_try_link "$LINENO"; then :
4973 if test "$cross_compiling" = yes; then :
783e057b
DJ
4974 ac_cv_type_long_long_int=yes
4975else
81ecdfbb 4976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4977/* end confdefs.h. */
4978#include <limits.h>
4979 #ifndef LLONG_MAX
4980 # define HALF \
4981 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4982 # define LLONG_MAX (HALF - 1 + HALF)
4983 #endif
4984int
4985main ()
4986{
4987long long int n = 1;
4988 int i;
4989 for (i = 0; ; i++)
4990 {
4991 long long int m = n << i;
4992 if (m >> i != n)
4993 return 1;
4994 if (LLONG_MAX / 2 < m)
4995 break;
4996 }
4997 return 0;
4998 ;
4999 return 0;
5000}
5001_ACEOF
81ecdfbb 5002if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5003 ac_cv_type_long_long_int=yes
5004else
81ecdfbb 5005 ac_cv_type_long_long_int=no
783e057b 5006fi
81ecdfbb
RW
5007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5008 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5009fi
783e057b 5010
81ecdfbb
RW
5011else
5012 ac_cv_type_long_long_int=no
783e057b 5013fi
81ecdfbb
RW
5014rm -f core conftest.err conftest.$ac_objext \
5015 conftest$ac_exeext conftest.$ac_ext
783e057b 5016fi
81ecdfbb
RW
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5018$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5019 if test $ac_cv_type_long_long_int = yes; then
5020
81ecdfbb 5021$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5022
5023 fi
5024
5025
81ecdfbb
RW
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5027$as_echo_n "checking for unsigned long long int... " >&6; }
5028if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5029 $as_echo_n "(cached) " >&6
783e057b 5030else
81ecdfbb 5031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5032/* end confdefs.h. */
81ecdfbb
RW
5033
5034 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
5035 implementations with broken preprocessors. Perhaps this can
5036 be revisited in 2012. In the meantime, code should not expect
5037 #if to work with literals wider than 32 bits. */
5038 /* Test literals. */
5039 long long int ll = 9223372036854775807ll;
5040 long long int nll = -9223372036854775807LL;
5041 unsigned long long int ull = 18446744073709551615ULL;
5042 /* Test constant expressions. */
5043 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5044 ? 1 : -1)];
5045 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5046 ? 1 : -1)];
5047 int i = 63;
5048int
5049main ()
5050{
5051/* Test availability of runtime routines for shift and division. */
5052 long long int llmax = 9223372036854775807ll;
5053 unsigned long long int ullmax = 18446744073709551615ull;
5054 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5055 | (llmax / ll) | (llmax % ll)
5056 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5057 | (ullmax / ull) | (ullmax % ull));
5058 ;
5059 return 0;
5060}
5061
5062_ACEOF
81ecdfbb 5063if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5064 ac_cv_type_unsigned_long_long_int=yes
5065else
81ecdfbb 5066 ac_cv_type_unsigned_long_long_int=no
783e057b 5067fi
81ecdfbb
RW
5068rm -f core conftest.err conftest.$ac_objext \
5069 conftest$ac_exeext conftest.$ac_ext
783e057b 5070fi
81ecdfbb
RW
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5072$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5073 if test $ac_cv_type_unsigned_long_long_int = yes; then
5074
81ecdfbb 5075$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5076
5077 fi
5078
5079
5080
81ecdfbb
RW
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5082$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5083if test "${gl_cv_have_include_next+set}" = set; then :
5084 $as_echo_n "(cached) " >&6
783e057b
DJ
5085else
5086 rm -rf conftestd1 conftestd2
5087 mkdir conftestd1 conftestd2
5088 cat <<EOF > conftestd1/conftest.h
5089#define DEFINED_IN_CONFTESTD1
5090#include_next <conftest.h>
5091#ifdef DEFINED_IN_CONFTESTD2
5092int foo;
5093#else
5094#error "include_next doesn't work"
5095#endif
5096EOF
5097 cat <<EOF > conftestd2/conftest.h
5098#ifndef DEFINED_IN_CONFTESTD1
5099#error "include_next test doesn't work"
5100#endif
5101#define DEFINED_IN_CONFTESTD2
5102EOF
5103 save_CPPFLAGS="$CPPFLAGS"
5104 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
81ecdfbb
RW
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h. */
783e057b
DJ
5107#include <conftest.h>
5108_ACEOF
81ecdfbb 5109if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5110 gl_cv_have_include_next=yes
5111else
81ecdfbb 5112 gl_cv_have_include_next=no
783e057b 5113fi
81ecdfbb 5114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5115 CPPFLAGS="$save_CPPFLAGS"
5116 rm -rf conftestd1 conftestd2
5117
5118fi
81ecdfbb
RW
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5120$as_echo "$gl_cv_have_include_next" >&6; }
783e057b
DJ
5121 if test $gl_cv_have_include_next = yes; then
5122
5123
81ecdfbb 5124$as_echo "#define HAVE_INCLUDE_NEXT 1" >>confdefs.h
783e057b
DJ
5125
5126
5127 INCLUDE_NEXT=include_next
5128 else
5129 INCLUDE_NEXT=include
5130 fi
5131
5132
5133
5134
5135
5136
81ecdfbb
RW
5137 for ac_header in $gl_header_list
5138do :
5139 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5140ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5141eval as_val=\$$as_ac_Header
5142 if test "x$as_val" = x""yes; then :
783e057b 5143 cat >>confdefs.h <<_ACEOF
81ecdfbb 5144#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5145_ACEOF
5146
5147fi
5148
5149done
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
81ecdfbb
RW
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5161$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5162if test "${ac_cv_c_restrict+set}" = set; then :
5163 $as_echo_n "(cached) " >&6
783e057b
DJ
5164else
5165 ac_cv_c_restrict=no
5166 # The order here caters to the fact that C++ does not require restrict.
5167 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5169/* end confdefs.h. */
5170typedef int * int_ptr;
5171 int foo (int_ptr $ac_kw ip) {
5172 return ip[0];
5173 }
5174int
5175main ()
5176{
5177int s[1];
5178 int * $ac_kw t = s;
5179 t[0] = 0;
5180 return foo(t)
5181 ;
5182 return 0;
5183}
5184_ACEOF
81ecdfbb 5185if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5186 ac_cv_c_restrict=$ac_kw
783e057b 5187fi
81ecdfbb 5188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5189 test "$ac_cv_c_restrict" != no && break
5190 done
5191
5192fi
81ecdfbb
RW
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5194$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5195
5196 case $ac_cv_c_restrict in
5197 restrict) ;;
81ecdfbb 5198 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5199 ;;
5200 *) cat >>confdefs.h <<_ACEOF
5201#define restrict $ac_cv_c_restrict
5202_ACEOF
5203 ;;
5204 esac
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
783e057b
DJ
5217 :
5218
5219
5220
5221
5222
5223
5224
5225 if test $gl_cv_have_include_next = yes; then
5226 gl_cv_next_string_h='<'string.h'>'
5227 else
81ecdfbb
RW
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5229$as_echo_n "checking absolute name of <string.h>... " >&6; }
5230if test "${gl_cv_next_string_h+set}" = set; then :
5231 $as_echo_n "(cached) " >&6
783e057b
DJ
5232else
5233
5234 if test $ac_cv_header_string_h = yes; then
81ecdfbb 5235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5236/* end confdefs.h. */
5237#include <string.h>
5238
5239_ACEOF
5240 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5241 sed -n '\#/string.h#{
5242 s#.*"\(.*/string.h\)".*#\1#
5243 s#^/[^/]#//&#
5244 p
5245 q
5246 }'`'"'
5247 else
5248 gl_cv_next_string_h='<'string.h'>'
5249 fi
5250
5251fi
81ecdfbb
RW
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5253$as_echo "$gl_cv_next_string_h" >&6; }
783e057b
DJ
5254 fi
5255 NEXT_STRING_H=$gl_cv_next_string_h
5256
5257
5258
5259
5260
5261 GNULIB_WCWIDTH=0;
5262 HAVE_DECL_WCWIDTH=1;
5263 REPLACE_WCWIDTH=0;
5264 WCHAR_H=
5265
5266
5267
81ecdfbb 5268 if false; then
783e057b
DJ
5269 GL_COND_LIBTOOL_TRUE=
5270 GL_COND_LIBTOOL_FALSE='#'
5271else
5272 GL_COND_LIBTOOL_TRUE='#'
5273 GL_COND_LIBTOOL_FALSE=
5274fi
5275
5276 gl_cond_libtool=false
5277 gl_libdeps=
5278 gl_ltlibdeps=
5279
5280
5281
5282 gl_source_base='gnulib'
5283
5284
5285
5286
5287
5288
5289
5290
81ecdfbb
RW
5291 for ac_func in memchr
5292do :
5293 ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
5294if test "x$ac_cv_func_memchr" = x""yes; then :
783e057b 5295 cat >>confdefs.h <<_ACEOF
81ecdfbb 5296#define HAVE_MEMCHR 1
783e057b
DJ
5297_ACEOF
5298
5299else
5300
5301 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5302
5303fi
5304done
5305
5306
5307 if test $ac_cv_func_memchr = no; then
5308
81ecdfbb
RW
5309 for ac_header in bp-sym.h
5310do :
5311 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5312if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
783e057b 5313 cat >>confdefs.h <<_ACEOF
81ecdfbb 5314#define HAVE_BP_SYM_H 1
783e057b
DJ
5315_ACEOF
5316
5317fi
5318
5319done
5320
5321
5322 fi
5323
5324
81ecdfbb
RW
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
5326$as_echo_n "checking for working memcmp... " >&6; }
5327if test "${ac_cv_func_memcmp_working+set}" = set; then :
5328 $as_echo_n "(cached) " >&6
783e057b 5329else
81ecdfbb 5330 if test "$cross_compiling" = yes; then :
783e057b
DJ
5331 ac_cv_func_memcmp_working=no
5332else
81ecdfbb 5333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5334/* end confdefs.h. */
5335$ac_includes_default
5336int
5337main ()
5338{
5339
5340 /* Some versions of memcmp are not 8-bit clean. */
81ecdfbb 5341 char c0 = '\100', c1 = '\200', c2 = '\201';
783e057b 5342 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
81ecdfbb 5343 return 1;
783e057b
DJ
5344
5345 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5346 or more and with at least one buffer not starting on a 4-byte boundary.
5347 William Lewis provided this test program. */
5348 {
5349 char foo[21];
5350 char bar[21];
5351 int i;
5352 for (i = 0; i < 4; i++)
5353 {
5354 char *a = foo + i;
5355 char *b = bar + i;
5356 strcpy (a, "--------01111111");
5357 strcpy (b, "--------10000000");
5358 if (memcmp (a, b, 16) >= 0)
81ecdfbb 5359 return 1;
783e057b 5360 }
81ecdfbb 5361 return 0;
783e057b
DJ
5362 }
5363
5364 ;
5365 return 0;
5366}
5367_ACEOF
81ecdfbb 5368if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5369 ac_cv_func_memcmp_working=yes
5370else
81ecdfbb 5371 ac_cv_func_memcmp_working=no
783e057b 5372fi
81ecdfbb
RW
5373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5374 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5375fi
81ecdfbb 5376
783e057b 5377fi
81ecdfbb
RW
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
5379$as_echo "$ac_cv_func_memcmp_working" >&6; }
783e057b
DJ
5380test $ac_cv_func_memcmp_working = no &&
5381
5382
5383
5384
5385
5386
5387 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5388
5389
5390 if test $ac_cv_func_memcmp_working = no; then
5391
81ecdfbb 5392$as_echo "#define memcmp rpl_memcmp" >>confdefs.h
783e057b
DJ
5393
5394 :
5395 fi
5396
5397
5398
5399 if test $ac_cv_have_decl_memmem = yes; then
81ecdfbb
RW
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
5401$as_echo_n "checking whether memmem works in linear time... " >&6; }
5402if test "${gl_cv_func_memmem_works+set}" = set; then :
5403 $as_echo_n "(cached) " >&6
783e057b 5404else
81ecdfbb 5405 if test "$cross_compiling" = yes; then :
783e057b
DJ
5406 gl_cv_func_memmem_works="guessing no"
5407else
81ecdfbb 5408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5409/* end confdefs.h. */
5410
5411#include <string.h> /* for memmem */
5412#include <stdlib.h> /* for malloc */
5413#include <unistd.h> /* for alarm */
5414
5415int
5416main ()
5417{
5418size_t m = 1000000;
5419 char *haystack = (char *) malloc (2 * m + 1);
5420 char *needle = (char *) malloc (m + 1);
5421 void *result = 0;
5422 /* Failure to compile this test due to missing alarm is okay,
5423 since all such platforms (mingw) also lack memmem. */
5424 alarm (5);
5425 /* Check for quadratic performance. */
5426 if (haystack && needle)
5427 {
5428 memset (haystack, 'A', 2 * m);
5429 haystack[2 * m] = 'B';
5430 memset (needle, 'A', m);
5431 needle[m] = 'B';
5432 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5433 }
5434 /* Check for empty needle behavior. */
5435 return !result || !memmem ("a", 1, 0, 0);
5436 ;
5437 return 0;
5438}
5439_ACEOF
81ecdfbb 5440if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5441 gl_cv_func_memmem_works=yes
5442else
81ecdfbb 5443 gl_cv_func_memmem_works=no
783e057b 5444fi
81ecdfbb
RW
5445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5446 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5447fi
81ecdfbb 5448
783e057b 5449fi
81ecdfbb
RW
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
5451$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
5452 if test "$gl_cv_func_memmem_works" != yes; then
5453 REPLACE_MEMMEM=1
5454
5455
5456
5457
5458
5459
5460
5461 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5462
5463 fi
5464 fi
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
81ecdfbb
RW
5477 for ac_func in memmem
5478do :
5479 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5480if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5481 cat >>confdefs.h <<_ACEOF
81ecdfbb 5482#define HAVE_MEMMEM 1
783e057b
DJ
5483_ACEOF
5484
5485else
5486
5487 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5488
5489fi
5490done
5491
5492
5493
5494 :
5495
5496
5497
5498
5499
5500 if test $ac_cv_have_decl_memmem = no; then
5501 HAVE_DECL_MEMMEM=0
5502 fi
5503 :
5504
5505
5506
5507 GNULIB_MEMMEM=1
5508
5509
5510
5511
5512 if test $ac_cv_type_long_long_int = yes; then
5513 HAVE_LONG_LONG_INT=1
5514 else
5515 HAVE_LONG_LONG_INT=0
5516 fi
5517
5518
5519 if test $ac_cv_type_unsigned_long_long_int = yes; then
5520 HAVE_UNSIGNED_LONG_LONG_INT=1
5521 else
5522 HAVE_UNSIGNED_LONG_LONG_INT=0
5523 fi
5524
5525
5526 if test $ac_cv_header_inttypes_h = yes; then
5527 HAVE_INTTYPES_H=1
5528 else
5529 HAVE_INTTYPES_H=0
5530 fi
5531
5532
5533 if test $ac_cv_header_sys_types_h = yes; then
5534 HAVE_SYS_TYPES_H=1
5535 else
5536 HAVE_SYS_TYPES_H=0
5537 fi
5538
5539
5540
5541
5542
5543 :
5544
5545
5546
5547
5548
5549
5550
5551 if test $gl_cv_have_include_next = yes; then
5552 gl_cv_next_stdint_h='<'stdint.h'>'
5553 else
81ecdfbb
RW
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
5555$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
5556if test "${gl_cv_next_stdint_h+set}" = set; then :
5557 $as_echo_n "(cached) " >&6
783e057b
DJ
5558else
5559
5560 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb 5561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5562/* end confdefs.h. */
5563#include <stdint.h>
5564
5565_ACEOF
5566 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5567 sed -n '\#/stdint.h#{
5568 s#.*"\(.*/stdint.h\)".*#\1#
5569 s#^/[^/]#//&#
5570 p
5571 q
5572 }'`'"'
5573 else
5574 gl_cv_next_stdint_h='<'stdint.h'>'
5575 fi
5576
5577fi
81ecdfbb
RW
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
5579$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
5580 fi
5581 NEXT_STDINT_H=$gl_cv_next_stdint_h
5582
5583
5584
5585 if test $ac_cv_header_stdint_h = yes; then
5586 HAVE_STDINT_H=1
5587 else
5588 HAVE_STDINT_H=0
5589 fi
5590
5591
5592 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
5594$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
5595if test "${gl_cv_header_working_stdint_h+set}" = set; then :
5596 $as_echo_n "(cached) " >&6
783e057b
DJ
5597else
5598 gl_cv_header_working_stdint_h=no
81ecdfbb 5599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5600/* end confdefs.h. */
5601
81ecdfbb 5602
783e057b
DJ
5603#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5604#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5605#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5606#include <stdint.h>
5607/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5608#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5609#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5610#endif
5611
5612
5613 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5614 included before <wchar.h>. */
5615 #include <stddef.h>
5616 #include <signal.h>
5617 #if HAVE_WCHAR_H
5618 # include <stdio.h>
5619 # include <time.h>
5620 # include <wchar.h>
5621 #endif
5622
5623
5624#ifdef INT8_MAX
5625int8_t a1 = INT8_MAX;
5626int8_t a1min = INT8_MIN;
5627#endif
5628#ifdef INT16_MAX
5629int16_t a2 = INT16_MAX;
5630int16_t a2min = INT16_MIN;
5631#endif
5632#ifdef INT32_MAX
5633int32_t a3 = INT32_MAX;
5634int32_t a3min = INT32_MIN;
5635#endif
5636#ifdef INT64_MAX
5637int64_t a4 = INT64_MAX;
5638int64_t a4min = INT64_MIN;
5639#endif
5640#ifdef UINT8_MAX
5641uint8_t b1 = UINT8_MAX;
5642#else
5643typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5644#endif
5645#ifdef UINT16_MAX
5646uint16_t b2 = UINT16_MAX;
5647#endif
5648#ifdef UINT32_MAX
5649uint32_t b3 = UINT32_MAX;
5650#endif
5651#ifdef UINT64_MAX
5652uint64_t b4 = UINT64_MAX;
5653#endif
5654int_least8_t c1 = INT8_C (0x7f);
5655int_least8_t c1max = INT_LEAST8_MAX;
5656int_least8_t c1min = INT_LEAST8_MIN;
5657int_least16_t c2 = INT16_C (0x7fff);
5658int_least16_t c2max = INT_LEAST16_MAX;
5659int_least16_t c2min = INT_LEAST16_MIN;
5660int_least32_t c3 = INT32_C (0x7fffffff);
5661int_least32_t c3max = INT_LEAST32_MAX;
5662int_least32_t c3min = INT_LEAST32_MIN;
5663int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5664int_least64_t c4max = INT_LEAST64_MAX;
5665int_least64_t c4min = INT_LEAST64_MIN;
5666uint_least8_t d1 = UINT8_C (0xff);
5667uint_least8_t d1max = UINT_LEAST8_MAX;
5668uint_least16_t d2 = UINT16_C (0xffff);
5669uint_least16_t d2max = UINT_LEAST16_MAX;
5670uint_least32_t d3 = UINT32_C (0xffffffff);
5671uint_least32_t d3max = UINT_LEAST32_MAX;
5672uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5673uint_least64_t d4max = UINT_LEAST64_MAX;
5674int_fast8_t e1 = INT_FAST8_MAX;
5675int_fast8_t e1min = INT_FAST8_MIN;
5676int_fast16_t e2 = INT_FAST16_MAX;
5677int_fast16_t e2min = INT_FAST16_MIN;
5678int_fast32_t e3 = INT_FAST32_MAX;
5679int_fast32_t e3min = INT_FAST32_MIN;
5680int_fast64_t e4 = INT_FAST64_MAX;
5681int_fast64_t e4min = INT_FAST64_MIN;
5682uint_fast8_t f1 = UINT_FAST8_MAX;
5683uint_fast16_t f2 = UINT_FAST16_MAX;
5684uint_fast32_t f3 = UINT_FAST32_MAX;
5685uint_fast64_t f4 = UINT_FAST64_MAX;
5686#ifdef INTPTR_MAX
5687intptr_t g = INTPTR_MAX;
5688intptr_t gmin = INTPTR_MIN;
5689#endif
5690#ifdef UINTPTR_MAX
5691uintptr_t h = UINTPTR_MAX;
5692#endif
5693intmax_t i = INTMAX_MAX;
5694uintmax_t j = UINTMAX_MAX;
5695
5696#include <limits.h> /* for CHAR_BIT */
5697#define TYPE_MINIMUM(t) \
5698 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5699#define TYPE_MAXIMUM(t) \
5700 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5701struct s {
5702 int check_PTRDIFF:
5703 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5704 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5705 ? 1 : -1;
5706 /* Detect bug in FreeBSD 6.0 / ia64. */
5707 int check_SIG_ATOMIC:
5708 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5709 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5710 ? 1 : -1;
5711 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5712 int check_WCHAR:
5713 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5714 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5715 ? 1 : -1;
5716 /* Detect bug in mingw. */
5717 int check_WINT:
5718 WINT_MIN == TYPE_MINIMUM (wint_t)
5719 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5720 ? 1 : -1;
5721
5722 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5723 int check_UINT8_C:
5724 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5725 int check_UINT16_C:
5726 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5727
5728 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5729#ifdef UINT8_MAX
5730 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5731#endif
5732#ifdef UINT16_MAX
5733 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5734#endif
5735#ifdef UINT32_MAX
5736 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5737#endif
5738#ifdef UINT64_MAX
5739 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5740#endif
5741 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5742 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5743 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5744 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5745 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5746 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5747 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5748 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5749 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5750 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5751 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5752};
5753
5754int
5755main ()
5756{
5757
5758 ;
5759 return 0;
5760}
5761_ACEOF
81ecdfbb 5762if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5763 gl_cv_header_working_stdint_h=yes
783e057b 5764fi
81ecdfbb 5765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 5766fi
81ecdfbb
RW
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
5768$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
5769 fi
5770 if test "$gl_cv_header_working_stdint_h" = yes; then
5771 STDINT_H=
5772 else
81ecdfbb
RW
5773 for ac_header in sys/inttypes.h sys/bitypes.h
5774do :
5775 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5776ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5777eval as_val=\$$as_ac_Header
5778 if test "x$as_val" = x""yes; then :
783e057b 5779 cat >>confdefs.h <<_ACEOF
81ecdfbb 5780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5781_ACEOF
5782
5783fi
5784
5785done
5786
5787 if test $ac_cv_header_sys_inttypes_h = yes; then
5788 HAVE_SYS_INTTYPES_H=1
5789 else
5790 HAVE_SYS_INTTYPES_H=0
5791 fi
5792
5793 if test $ac_cv_header_sys_bitypes_h = yes; then
5794 HAVE_SYS_BITYPES_H=1
5795 else
5796 HAVE_SYS_BITYPES_H=0
5797 fi
5798
5799
5800
5801 :
5802
5803
5804
5805
5806
5807
5808
5809
5810
81ecdfbb
RW
5811 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5813$as_echo_n "checking for bit size of $gltype... " >&6; }
5814if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5815 $as_echo_n "(cached) " >&6
5816else
5817 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5818 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5819 included before <wchar.h>. */
5820 #include <stddef.h>
5821 #include <signal.h>
5822 #if HAVE_WCHAR_H
5823 # include <stdio.h>
5824 # include <time.h>
5825 # include <wchar.h>
5826 #endif
5827
5828#include <limits.h>"; then :
5829
5830else
5831 result=unknown
5832fi
5833
5834 eval gl_cv_bitsizeof_${gltype}=\$result
5835
5836fi
5837eval ac_res=\$gl_cv_bitsizeof_${gltype}
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5839$as_echo "$ac_res" >&6; }
5840 eval result=\$gl_cv_bitsizeof_${gltype}
5841 if test $result = unknown; then
5842 result=0
5843 fi
5844 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5845 cat >>confdefs.h <<_ACEOF
5846#define BITSIZEOF_${GLTYPE} $result
5847_ACEOF
783e057b 5848
81ecdfbb
RW
5849 eval BITSIZEOF_${GLTYPE}=\$result
5850 done
783e057b
DJ
5851
5852
5853
5854
81ecdfbb
RW
5855 for gltype in sig_atomic_t wchar_t wint_t ; do
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
5857$as_echo_n "checking whether $gltype is signed... " >&6; }
5858if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
5859 $as_echo_n "(cached) " >&6
783e057b 5860else
81ecdfbb 5861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5862/* end confdefs.h. */
5863
5864 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5865 included before <wchar.h>. */
5866 #include <stddef.h>
5867 #include <signal.h>
5868 #if HAVE_WCHAR_H
5869 # include <stdio.h>
5870 # include <time.h>
5871 # include <wchar.h>
5872 #endif
5873
5874 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
5875int
5876main ()
5877{
5878
5879 ;
5880 return 0;
5881}
5882_ACEOF
81ecdfbb 5883if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5884 result=yes
5885else
81ecdfbb 5886 result=no
20e95c23 5887fi
81ecdfbb 5888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5889 eval gl_cv_type_${gltype}_signed=\$result
5890
5891fi
81ecdfbb
RW
5892eval ac_res=\$gl_cv_type_${gltype}_signed
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5894$as_echo "$ac_res" >&6; }
783e057b
DJ
5895 eval result=\$gl_cv_type_${gltype}_signed
5896 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5897 if test "$result" = yes; then
5898 cat >>confdefs.h <<_ACEOF
5899#define HAVE_SIGNED_${GLTYPE} 1
5900_ACEOF
5901
5902 eval HAVE_SIGNED_${GLTYPE}=1
5903 else
5904 eval HAVE_SIGNED_${GLTYPE}=0
5905 fi
5906 done
5907
5908
5909 gl_cv_type_ptrdiff_t_signed=yes
5910 gl_cv_type_size_t_signed=no
5911
5912
783e057b 5913 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
81ecdfbb
RW
5914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
5915$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
5916if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
5917 $as_echo_n "(cached) " >&6
c906108c 5918else
783e057b
DJ
5919 eval gl_cv_type_${gltype}_suffix=no
5920 eval result=\$gl_cv_type_${gltype}_signed
5921 if test "$result" = yes; then
5922 glsufu=
5923 else
5924 glsufu=u
5925 fi
5926 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
5927 case $glsuf in
5928 '') gltype1='int';;
5929 l) gltype1='long int';;
5930 ll) gltype1='long long int';;
5931 i64) gltype1='__int64';;
5932 u) gltype1='unsigned int';;
5933 ul) gltype1='unsigned long int';;
5934 ull) gltype1='unsigned long long int';;
5935 ui64)gltype1='unsigned __int64';;
5936 esac
81ecdfbb 5937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5938/* end confdefs.h. */
5939
5940 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5941 included before <wchar.h>. */
5942 #include <stddef.h>
5943 #include <signal.h>
5944 #if HAVE_WCHAR_H
5945 # include <stdio.h>
5946 # include <time.h>
5947 # include <wchar.h>
5948 #endif
5949
5950 extern $gltype foo;
5951 extern $gltype1 foo;
5952int
5953main ()
5954{
5955
5956 ;
5957 return 0;
5958}
5959_ACEOF
81ecdfbb 5960if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5961 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 5962fi
81ecdfbb 5963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5964 eval result=\$gl_cv_type_${gltype}_suffix
5965 test "$result" != no && break
5966 done
5967fi
81ecdfbb
RW
5968eval ac_res=\$gl_cv_type_${gltype}_suffix
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5970$as_echo "$ac_res" >&6; }
783e057b
DJ
5971 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5972 eval result=\$gl_cv_type_${gltype}_suffix
5973 test "$result" = no && result=
5974 eval ${GLTYPE}_SUFFIX=\$result
5975 cat >>confdefs.h <<_ACEOF
5976#define ${GLTYPE}_SUFFIX $result
5977_ACEOF
5978
5979 done
5980
5981
5982
5983 STDINT_H=stdint.h
5984 fi
5985
5986
5987
5988
5989
5990
5991
81ecdfbb
RW
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> is standalone" >&5
5993$as_echo_n "checking whether <wchar.h> is standalone... " >&6; }
5994if test "${gl_cv_header_wchar_h_standalone+set}" = set; then :
5995 $as_echo_n "(cached) " >&6
783e057b 5996else
81ecdfbb
RW
5997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5998/* end confdefs.h. */
783e057b
DJ
5999#include <wchar.h>
6000wchar_t w;
6001_ACEOF
81ecdfbb 6002if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6003 gl_cv_header_wchar_h_standalone=yes
6004else
81ecdfbb 6005 gl_cv_header_wchar_h_standalone=no
783e057b 6006fi
81ecdfbb 6007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 6008fi
81ecdfbb
RW
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_standalone" >&5
6010$as_echo "$gl_cv_header_wchar_h_standalone" >&6; }
783e057b
DJ
6011 if test $gl_cv_header_wchar_h_standalone != yes; then
6012 WCHAR_H=wchar.h
6013 fi
6014
6015
6016 :
6017
6018
6019
6020
6021
6022 if test $ac_cv_header_wchar_h = yes; then
6023 HAVE_WCHAR_H=1
6024 else
6025 HAVE_WCHAR_H=0
6026 fi
6027
6028
6029
6030
6031 :
6032
6033
6034
6035
6036
6037
6038
6039 if test $gl_cv_have_include_next = yes; then
6040 gl_cv_next_wchar_h='<'wchar.h'>'
6041 else
81ecdfbb
RW
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6043$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6044if test "${gl_cv_next_wchar_h+set}" = set; then :
6045 $as_echo_n "(cached) " >&6
783e057b
DJ
6046else
6047
6048 if test $ac_cv_header_wchar_h = yes; then
81ecdfbb 6049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6050/* end confdefs.h. */
6051#include <wchar.h>
6052
6053_ACEOF
6054 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6055 sed -n '\#/wchar.h#{
6056 s#.*"\(.*/wchar.h\)".*#\1#
6057 s#^/[^/]#//&#
6058 p
6059 q
6060 }'`'"'
6061 else
6062 gl_cv_next_wchar_h='<'wchar.h'>'
6063 fi
6064
6065fi
81ecdfbb
RW
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
6067$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
6068 fi
6069 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6070
c906108c 6071
c906108c 6072
c906108c 6073
c906108c 6074
c906108c 6075
c906108c 6076
c906108c 6077
783e057b
DJ
6078 gltests_libdeps=
6079 gltests_ltlibdeps=
20e95c23 6080
20e95c23 6081
20e95c23 6082
783e057b 6083 gl_source_base='tests'
c906108c 6084
bec39cab 6085
bec39cab 6086
783e057b
DJ
6087
6088 LIBGNU_LIBDEPS="$gl_libdeps"
6089
6090 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6091
6092
e28b3332 6093
d5af19ba
DJ
6094# For Makefile dependencies.
6095GNULIB_STDINT_H=
6096if test x"$STDINT_H" != x; then
6097 GNULIB_STDINT_H=gnulib/$STDINT_H
6098fi
6099
6100
bec39cab
AC
6101PACKAGE=gdb
6102
6103cat >>confdefs.h <<_ACEOF
6104#define PACKAGE "$PACKAGE"
6105_ACEOF
6106
6107
6108
e28b3332
DJ
6109# GDB does not use automake, but gnulib does. This line lets us
6110# generate its Makefile.in.
81ecdfbb
RW
6111am__api_version='1.11'
6112
e28b3332
DJ
6113# Find a good install program. We prefer a C program (faster),
6114# so one script is as good as another. But avoid the broken or
6115# incompatible versions:
6116# SysV /etc/install, /usr/sbin/install
6117# SunOS /usr/etc/install
6118# IRIX /sbin/install
6119# AIX /bin/install
6120# AmigaOS /C/install, which installs bootblocks on floppy discs
6121# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6122# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6123# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6124# OS/2's system install, which has a completely different semantic
6125# ./install, which can be erroneously created by make from ./install.sh.
85541719 6126# Reject install programs that cannot install multiple files.
81ecdfbb
RW
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6128$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 6129if test -z "$INSTALL"; then
81ecdfbb
RW
6130if test "${ac_cv_path_install+set}" = set; then :
6131 $as_echo_n "(cached) " >&6
e28b3332
DJ
6132else
6133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6138 # Account for people who put trailing slashes in PATH elements.
6139case $as_dir/ in #((
6140 ./ | .// | /[cC]/* | \
e28b3332 6141 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 6142 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
6143 /usr/ucb/* ) ;;
6144 *)
6145 # OSF1 and SCO ODT 3.0 have their own names for install.
6146 # Don't use installbsd from OSF since it installs stuff as root
6147 # by default.
6148 for ac_prog in ginstall scoinst install; do
6149 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 6150 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
6151 if test $ac_prog = install &&
6152 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6153 # AIX install. It has an incompatible calling convention.
6154 :
6155 elif test $ac_prog = install &&
6156 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6157 # program-specific install script used by HP pwplus--don't use.
6158 :
6159 else
85541719
DE
6160 rm -rf conftest.one conftest.two conftest.dir
6161 echo one > conftest.one
6162 echo two > conftest.two
6163 mkdir conftest.dir
6164 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6165 test -s conftest.one && test -s conftest.two &&
6166 test -s conftest.dir/conftest.one &&
6167 test -s conftest.dir/conftest.two
6168 then
6169 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6170 break 3
6171 fi
e28b3332
DJ
6172 fi
6173 fi
6174 done
6175 done
6176 ;;
6177esac
81ecdfbb
RW
6178
6179 done
6180IFS=$as_save_IFS
e28b3332 6181
85541719 6182rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6183
6184fi
6185 if test "${ac_cv_path_install+set}" = set; then
6186 INSTALL=$ac_cv_path_install
6187 else
85541719
DE
6188 # As a last resort, use the slow shell script. Don't cache a
6189 # value for INSTALL within a source directory, because that will
e28b3332 6190 # break other packages using the cache if that directory is
85541719 6191 # removed, or if the value is a relative name.
e28b3332
DJ
6192 INSTALL=$ac_install_sh
6193 fi
6194fi
81ecdfbb
RW
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6196$as_echo "$INSTALL" >&6; }
e28b3332
DJ
6197
6198# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6199# It thinks the first close brace ends the variable substitution.
6200test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6201
6202test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6203
6204test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6205
81ecdfbb
RW
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
6207$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
6208# Just in case
6209sleep 1
6210echo timestamp > conftest.file
81ecdfbb
RW
6211# Reject unsafe characters in $srcdir or the absolute working directory
6212# name. Accept space and tab only in the latter.
6213am_lf='
6214'
6215case `pwd` in
6216 *[\\\"\#\$\&\'\`$am_lf]*)
6217 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
6218esac
6219case $srcdir in
6220 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
6221 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
6222esac
6223
e28b3332
DJ
6224# Do `set' in a subshell so we don't clobber the current shell's
6225# arguments. Must try -L first in case configure is actually a
6226# symlink; some systems play weird games with the mod time of symlinks
6227# (eg FreeBSD returns the mod time of the symlink's containing
6228# directory).
6229if (
81ecdfbb 6230 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
6231 if test "$*" = "X"; then
6232 # -L didn't work.
81ecdfbb 6233 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
6234 fi
6235 rm -f conftest.file
6236 if test "$*" != "X $srcdir/configure conftest.file" \
6237 && test "$*" != "X conftest.file $srcdir/configure"; then
6238
6239 # If neither matched, then we have a broken ls. This can happen
6240 # if, for instance, CONFIG_SHELL is bash and it inherits a
6241 # broken ls alias from the environment. This has actually
6242 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
6243 as_fn_error "ls -t appears to fail. Make sure there is not a broken
6244alias in your environment" "$LINENO" 5
e28b3332
DJ
6245 fi
6246
6247 test "$2" = conftest.file
6248 )
6249then
6250 # Ok.
6251 :
6252else
81ecdfbb
RW
6253 as_fn_error "newly created file is older than distributed files!
6254Check your system clock" "$LINENO" 5
e28b3332 6255fi
81ecdfbb
RW
6256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6257$as_echo "yes" >&6; }
e28b3332 6258test "$program_prefix" != NONE &&
81ecdfbb 6259 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
6260# Use a double $ so make ignores it.
6261test "$program_suffix" != NONE &&
81ecdfbb
RW
6262 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
6263# Double any \ or $.
e28b3332 6264# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
6265ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
6266program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
6267
6268# expand $ac_aux_dir to an absolute path
6269am_aux_dir=`cd $ac_aux_dir && pwd`
6270
81ecdfbb
RW
6271if test x"${MISSING+set}" != xset; then
6272 case $am_aux_dir in
6273 *\ * | *\ *)
6274 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
6275 *)
6276 MISSING="\${SHELL} $am_aux_dir/missing" ;;
6277 esac
6278fi
e28b3332
DJ
6279# Use eval to expand $SHELL
6280if eval "$MISSING --run true"; then
6281 am_missing_run="$MISSING --run "
6282else
6283 am_missing_run=
81ecdfbb
RW
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
6285$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6286fi
6287
6288if test x"${install_sh}" != xset; then
6289 case $am_aux_dir in
6290 *\ * | *\ *)
6291 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6292 *)
6293 install_sh="\${SHELL} $am_aux_dir/install-sh"
6294 esac
6295fi
6296
6297# Installed binaries are usually stripped using `strip' when the user
6298# run `make install-strip'. However `strip' might not be the right
6299# tool to use in cross-compilation environments, therefore Automake
6300# will honor the `STRIP' environment variable to overrule this program.
6301if test "$cross_compiling" != no; then
6302 if test -n "$ac_tool_prefix"; then
6303 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6304set dummy ${ac_tool_prefix}strip; ac_word=$2
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306$as_echo_n "checking for $ac_word... " >&6; }
6307if test "${ac_cv_prog_STRIP+set}" = set; then :
6308 $as_echo_n "(cached) " >&6
6309else
6310 if test -n "$STRIP"; then
6311 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6312else
6313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314for as_dir in $PATH
6315do
6316 IFS=$as_save_IFS
6317 test -z "$as_dir" && as_dir=.
6318 for ac_exec_ext in '' $ac_executable_extensions; do
6319 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6320 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6322 break 2
6323 fi
6324done
6325 done
6326IFS=$as_save_IFS
6327
6328fi
6329fi
6330STRIP=$ac_cv_prog_STRIP
6331if test -n "$STRIP"; then
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6333$as_echo "$STRIP" >&6; }
6334else
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
6337fi
6338
6339
6340fi
6341if test -z "$ac_cv_prog_STRIP"; then
6342 ac_ct_STRIP=$STRIP
6343 # Extract the first word of "strip", so it can be a program name with args.
6344set dummy strip; ac_word=$2
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346$as_echo_n "checking for $ac_word... " >&6; }
6347if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
6348 $as_echo_n "(cached) " >&6
6349else
6350 if test -n "$ac_ct_STRIP"; then
6351 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6352else
6353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354for as_dir in $PATH
6355do
6356 IFS=$as_save_IFS
6357 test -z "$as_dir" && as_dir=.
6358 for ac_exec_ext in '' $ac_executable_extensions; do
6359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6360 ac_cv_prog_ac_ct_STRIP="strip"
6361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6362 break 2
6363 fi
6364done
6365 done
6366IFS=$as_save_IFS
6367
6368fi
6369fi
6370ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6371if test -n "$ac_ct_STRIP"; then
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6373$as_echo "$ac_ct_STRIP" >&6; }
6374else
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
6377fi
6378
6379 if test "x$ac_ct_STRIP" = x; then
6380 STRIP=":"
6381 else
6382 case $cross_compiling:$ac_tool_warned in
6383yes:)
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6386ac_tool_warned=yes ;;
6387esac
6388 STRIP=$ac_ct_STRIP
6389 fi
6390else
6391 STRIP="$ac_cv_prog_STRIP"
6392fi
6393
6394fi
6395INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
6396
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6398$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6399if test -z "$MKDIR_P"; then
6400 if test "${ac_cv_path_mkdir+set}" = set; then :
6401 $as_echo_n "(cached) " >&6
6402else
6403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6404for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6405do
6406 IFS=$as_save_IFS
6407 test -z "$as_dir" && as_dir=.
6408 for ac_prog in mkdir gmkdir; do
6409 for ac_exec_ext in '' $ac_executable_extensions; do
6410 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
6411 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6412 'mkdir (GNU coreutils) '* | \
6413 'mkdir (coreutils) '* | \
6414 'mkdir (fileutils) '4.1*)
6415 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6416 break 3;;
6417 esac
6418 done
6419 done
e28b3332 6420 done
81ecdfbb
RW
6421IFS=$as_save_IFS
6422
6423fi
6424
6425 if test "${ac_cv_path_mkdir+set}" = set; then
6426 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 6427 else
81ecdfbb
RW
6428 # As a last resort, use the slow shell script. Don't cache a
6429 # value for MKDIR_P within a source directory, because that will
6430 # break other packages using the cache if that directory is
6431 # removed, or if the value is a relative name.
6432 test -d ./--version && rmdir ./--version
6433 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
6434 fi
6435fi
81ecdfbb
RW
6436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6437$as_echo "$MKDIR_P" >&6; }
6438
6439mkdir_p="$MKDIR_P"
6440case $mkdir_p in
6441 [\\/$]* | ?:[\\/]*) ;;
6442 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
6443esac
e28b3332
DJ
6444
6445for ac_prog in gawk mawk nawk awk
6446do
6447 # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if test "${ac_cv_prog_AWK+set}" = set; then :
6452 $as_echo_n "(cached) " >&6
e28b3332
DJ
6453else
6454 if test -n "$AWK"; then
6455 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6456else
6457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460 IFS=$as_save_IFS
6461 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6462 for ac_exec_ext in '' $ac_executable_extensions; do
6463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 6464 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
6466 break 2
6467 fi
6468done
81ecdfbb
RW
6469 done
6470IFS=$as_save_IFS
e28b3332
DJ
6471
6472fi
6473fi
6474AWK=$ac_cv_prog_AWK
6475if test -n "$AWK"; then
81ecdfbb
RW
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6477$as_echo "$AWK" >&6; }
e28b3332 6478else
81ecdfbb
RW
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
e28b3332
DJ
6481fi
6482
81ecdfbb 6483
e28b3332
DJ
6484 test -n "$AWK" && break
6485done
6486
81ecdfbb 6487ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
6488
6489
6490am_make=${MAKE-make}
6491cat > confinc << 'END'
6492am__doit:
81ecdfbb 6493 @echo this is the am__doit target
e28b3332
DJ
6494.PHONY: am__doit
6495END
6496# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
6498$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
6499am__include="#"
6500am__quote=
6501_am_result=none
6502# First try GNU make style include.
6503echo "include confinc" > confmf
81ecdfbb
RW
6504# Ignore all kinds of additional output from `make'.
6505case `$am_make -s -f confmf 2> /dev/null` in #(
6506*the\ am__doit\ target*)
6507 am__include=include
6508 am__quote=
6509 _am_result=GNU
6510 ;;
6511esac
e28b3332
DJ
6512# Now try BSD make style include.
6513if test "$am__include" = "#"; then
6514 echo '.include "confinc"' > confmf
81ecdfbb
RW
6515 case `$am_make -s -f confmf 2> /dev/null` in #(
6516 *the\ am__doit\ target*)
6517 am__include=.include
6518 am__quote="\""
6519 _am_result=BSD
6520 ;;
6521 esac
e28b3332
DJ
6522fi
6523
6524
81ecdfbb
RW
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
6526$as_echo "$_am_result" >&6; }
e28b3332
DJ
6527rm -f confinc confmf
6528
81ecdfbb
RW
6529# Check whether --enable-dependency-tracking was given.
6530if test "${enable_dependency_tracking+set}" = set; then :
6531 enableval=$enable_dependency_tracking;
6532fi
e28b3332 6533
e28b3332
DJ
6534if test "x$enable_dependency_tracking" != xno; then
6535 am_depcomp="$ac_aux_dir/depcomp"
6536 AMDEPBACKSLASH='\'
6537fi
81ecdfbb 6538 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
6539 AMDEP_TRUE=
6540 AMDEP_FALSE='#'
6541else
6542 AMDEP_TRUE='#'
6543 AMDEP_FALSE=
6544fi
6545
6546
81ecdfbb
RW
6547if test "`cd $srcdir && pwd`" != "`pwd`"; then
6548 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6549 # is not polluted with repeated "-I."
6550 am__isrc=' -I$(srcdir)'
6551 # test to see if srcdir already configured
6552 if test -f $srcdir/config.status; then
6553 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6554 fi
e28b3332
DJ
6555fi
6556
6557# test whether we have cygpath
6558if test -z "$CYGPATH_W"; then
6559 if (cygpath --version) >/dev/null 2>/dev/null; then
6560 CYGPATH_W='cygpath -w'
6561 else
6562 CYGPATH_W=echo
6563 fi
6564fi
6565
6566
6567# Define the identity of the package.
6568 PACKAGE=gdb
6569 VERSION=UNUSED-VERSION
6570
6571
6572# Some tools Automake needs.
6573
6574ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6575
6576
6577AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6578
6579
6580AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6581
6582
6583AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6584
6585
6586MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6587
e28b3332
DJ
6588# We need awk for the "check" target. The system "awk" is bad on
6589# some platforms.
6590# Always define AMTAR for backward compatibility.
6591
6592AMTAR=${AMTAR-"${am_missing_run}tar"}
6593
6594am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6595
6596
6597
6598
6599depcc="$CC" am_compiler_list=
6600
81ecdfbb
RW
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6602$as_echo_n "checking dependency style of $depcc... " >&6; }
6603if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6604 $as_echo_n "(cached) " >&6
e28b3332
DJ
6605else
6606 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6607 # We make a subdir and do the tests there. Otherwise we can end up
6608 # making bogus files that we don't know about and never remove. For
6609 # instance it was reported that on HP-UX the gcc test will end up
6610 # making a dummy file named `D' -- because `-MD' means `put the output
6611 # in D'.
6612 mkdir conftest.dir
6613 # Copy depcomp to subdir because otherwise we won't find it if we're
6614 # using a relative directory.
6615 cp "$am_depcomp" conftest.dir
6616 cd conftest.dir
6617 # We will build objects and dependencies in a subdirectory because
6618 # it helps to detect inapplicable dependency modes. For instance
6619 # both Tru64's cc and ICC support -MD to output dependencies as a
6620 # side effect of compilation, but ICC will put the dependencies in
6621 # the current directory while Tru64 will put them in the object
6622 # directory.
6623 mkdir sub
6624
6625 am_cv_CC_dependencies_compiler_type=none
6626 if test "$am_compiler_list" = ""; then
6627 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6628 fi
81ecdfbb
RW
6629 am__universal=false
6630 case " $depcc " in #(
6631 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6632 esac
6633
e28b3332
DJ
6634 for depmode in $am_compiler_list; do
6635 # Setup a source with many dependencies, because some compilers
6636 # like to wrap large dependency lists on column 80 (with \), and
6637 # we should not choose a depcomp mode which is confused by this.
6638 #
6639 # We need to recreate these files for each test, as the compiler may
6640 # overwrite some of them when testing with obscure command lines.
6641 # This happens at least with the AIX C compiler.
6642 : > sub/conftest.c
6643 for i in 1 2 3 4 5 6; do
6644 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6645 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6646 # Solaris 8's {/usr,}/bin/sh.
6647 touch sub/conftst$i.h
6648 done
6649 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6650
81ecdfbb
RW
6651 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6652 # mode. It turns out that the SunPro C++ compiler does not properly
6653 # handle `-M -o', and we need to detect this. Also, some Intel
6654 # versions had trouble with output in subdirs
6655 am__obj=sub/conftest.${OBJEXT-o}
6656 am__minus_obj="-o $am__obj"
e28b3332 6657 case $depmode in
81ecdfbb
RW
6658 gcc)
6659 # This depmode causes a compiler race in universal mode.
6660 test "$am__universal" = false || continue
6661 ;;
e28b3332
DJ
6662 nosideeffect)
6663 # after this tag, mechanisms are not by side-effect, so they'll
6664 # only be used when explicitly requested
6665 if test "x$enable_dependency_tracking" = xyes; then
6666 continue
6667 else
6668 break
6669 fi
6670 ;;
81ecdfbb
RW
6671 msvisualcpp | msvcmsys)
6672 # This compiler won't grok `-c -o', but also, the minuso test has
6673 # not run yet. These depmodes are late enough in the game, and
6674 # so weak that their functioning should not be impacted.
6675 am__obj=conftest.${OBJEXT-o}
6676 am__minus_obj=
6677 ;;
e28b3332
DJ
6678 none) break ;;
6679 esac
e28b3332 6680 if depmode=$depmode \
81ecdfbb 6681 source=sub/conftest.c object=$am__obj \
e28b3332 6682 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 6683 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 6684 >/dev/null 2>conftest.err &&
81ecdfbb 6685 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 6686 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 6687 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
6688 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6689 # icc doesn't choke on unknown options, it will just issue warnings
6690 # or remarks (even with -Werror). So we grep stderr for any message
6691 # that says an option was ignored or not supported.
6692 # When given -MP, icc 7.0 and 7.1 complain thusly:
6693 # icc: Command line warning: ignoring option '-M'; no argument required
6694 # The diagnosis changed in icc 8.0:
6695 # icc: Command line remark: option '-MP' not supported
6696 if (grep 'ignoring option' conftest.err ||
6697 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6698 am_cv_CC_dependencies_compiler_type=$depmode
6699 break
6700 fi
6701 fi
6702 done
6703
6704 cd ..
6705 rm -rf conftest.dir
6706else
6707 am_cv_CC_dependencies_compiler_type=none
6708fi
6709
6710fi
81ecdfbb
RW
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6712$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
6713CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6714
81ecdfbb 6715 if
e28b3332
DJ
6716 test "x$enable_dependency_tracking" != xno \
6717 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6718 am__fastdepCC_TRUE=
6719 am__fastdepCC_FALSE='#'
6720else
6721 am__fastdepCC_TRUE='#'
6722 am__fastdepCC_FALSE=
6723fi
6724
6725
6726
6727
bec39cab
AC
6728
6729
81ecdfbb
RW
6730# Check whether --with-separate-debug-dir was given.
6731if test "${with_separate_debug_dir+set}" = set; then :
6732 withval=$with_separate_debug_dir;
b14b1491
TT
6733 DEBUGDIR=$withval
6734else
6735 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6736fi
6737
20e95c23 6738
783e057b
DJ
6739 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6740 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6741 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6742 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6743
783e057b
DJ
6744cat >>confdefs.h <<_ACEOF
6745#define DEBUGDIR "$ac_define_dir"
20e95c23 6746_ACEOF
20e95c23 6747
20e95c23 6748
20e95c23 6749
b14b1491
TT
6750 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6751 if test "x$prefix" = xNONE; then
6752 test_prefix=/usr/local
6753 else
6754 test_prefix=$prefix
6755 fi
783e057b 6756 else
b14b1491 6757 test_prefix=$exec_prefix
783e057b 6758 fi
b14b1491
TT
6759 value=0
6760 case ${ac_define_dir} in
6761 "${test_prefix}"|"${test_prefix}/"*|\
6762 '${exec_prefix}'|'${exec_prefix}/'*)
6763 value=1
6764 ;;
6765 esac
6766
6767cat >>confdefs.h <<_ACEOF
6768#define DEBUGDIR_RELOCATABLE $value
6769_ACEOF
6770
6771
6772
6773# GDB's datadir relocation
6774
6775
6776
81ecdfbb
RW
6777# Check whether --with-gdb-datadir was given.
6778if test "${with_gdb_datadir+set}" = set; then :
6779 withval=$with_gdb_datadir;
b14b1491 6780 GDB_DATADIR=$withval
20e95c23 6781else
b14b1491 6782 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6783fi
6784
20e95c23 6785
b14b1491
TT
6786 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6787 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6788 ac_define_dir=`eval echo $GDB_DATADIR`
6789 ac_define_dir=`eval echo $ac_define_dir`
6790
6791cat >>confdefs.h <<_ACEOF
6792#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6793_ACEOF
6794
b14b1491
TT
6795
6796
6797 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6798 if test "x$prefix" = xNONE; then
6799 test_prefix=/usr/local
6800 else
6801 test_prefix=$prefix
6802 fi
6803 else
6804 test_prefix=$exec_prefix
6805 fi
6806 value=0
6807 case ${ac_define_dir} in
6808 "${test_prefix}"|"${test_prefix}/"*|\
6809 '${exec_prefix}'|'${exec_prefix}/'*)
6810 value=1
6811 ;;
6812 esac
6813
6814cat >>confdefs.h <<_ACEOF
6815#define GDB_DATADIR_RELOCATABLE $value
6816_ACEOF
6817
6818
783e057b 6819
20e95c23 6820
81ecdfbb
RW
6821# Check whether --with-relocated-sources was given.
6822if test "${with_relocated_sources+set}" = set; then :
6823 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6824
6825 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6826 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6827 ac_define_dir=`eval echo $reloc_srcdir`
6828 ac_define_dir=`eval echo $ac_define_dir`
6829
6830cat >>confdefs.h <<_ACEOF
6831#define RELOC_SRCDIR "$ac_define_dir"
6832_ACEOF
6833
6834
6835
81ecdfbb
RW
6836fi
6837
29b0e8a2
JM
6838
6839
20e95c23 6840
783e057b 6841subdirs="$subdirs doc testsuite"
20e95c23
DJ
6842
6843
783e057b 6844# Check whether to support alternative target configurations
81ecdfbb
RW
6845# Check whether --enable-targets was given.
6846if test "${enable_targets+set}" = set; then :
6847 enableval=$enable_targets; case "${enableval}" in
6848 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6849 ;;
6850 no) enable_targets= ;;
6851 *) enable_targets=$enableval ;;
6852esac
81ecdfbb
RW
6853fi
6854
20e95c23 6855
783e057b 6856# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6857# Check whether --enable-64-bit-bfd was given.
6858if test "${enable_64_bit_bfd+set}" = set; then :
6859 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6860 yes) want64=true ;;
6861 no) want64=false ;;
81ecdfbb 6862 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6863esac
6864else
6865 want64=false
81ecdfbb
RW
6866fi
6867
783e057b
DJ
6868# Provide defaults for some variables set by the per-host and per-target
6869# configuration.
6870gdb_host_obs=posix-hdep.o
20e95c23 6871
783e057b
DJ
6872if test "${target}" = "${host}"; then
6873 gdb_native=yes
6874else
6875 gdb_native=no
6876fi
20e95c23 6877
783e057b 6878. $srcdir/configure.host
20e95c23 6879
783e057b 6880# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6881
783e057b
DJ
6882TARGET_OBS=
6883all_targets=
20e95c23 6884
783e057b 6885for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6886do
783e057b
DJ
6887 if test "$targ_alias" = "all"; then
6888 all_targets=true
6889 else
6890 # Canonicalize the secondary target names.
6891 result=`$ac_config_sub $targ_alias 2>/dev/null`
6892 if test -n "$result"; then
6893 targ=$result
6894 else
6895 targ=$targ_alias
6896 fi
20e95c23 6897
783e057b 6898 . ${srcdir}/configure.tgt
20e95c23 6899
783e057b
DJ
6900 # Target-specific object files
6901 for i in ${gdb_target_obs}; do
6902 case " $TARGET_OBS " in
6903 *" ${i} "*) ;;
6904 *)
6905 TARGET_OBS="$TARGET_OBS ${i}"
6906 ;;
6907 esac
6908 done
20e95c23 6909
783e057b
DJ
6910 # Check whether this target needs 64-bit CORE_ADDR
6911 if test x${want64} = xfalse; then
6912 . ${srcdir}/../bfd/config.bfd
6913 fi
6914 fi
20e95c23
DJ
6915done
6916
783e057b
DJ
6917if test x${all_targets} = xtrue; then
6918
6919 # We want all 64-bit targets if we either:
6920 # - run on a 64-bit host or
6921 # - already require 64-bit support for some other target or
6922 # - the --enable-64-bit-bfd option was supplied
6923 # Otherwise we only support all 32-bit targets.
6924 #
6925 # NOTE: This test must be in sync with the corresponding
6926 # tests in BFD!
20e95c23 6927
783e057b 6928 if test x${want64} = xfalse; then
81ecdfbb
RW
6929 # The cast to long int works around a bug in the HP C Compiler
6930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6932# This bug is HP SR number 8606223364.
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6934$as_echo_n "checking size of long... " >&6; }
6935if test "${ac_cv_sizeof_long+set}" = set; then :
6936 $as_echo_n "(cached) " >&6
c0993dbe 6937else
81ecdfbb 6938 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6939
81ecdfbb
RW
6940else
6941 if test "$ac_cv_type_long" = yes; then
6942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6944{ as_fn_set_status 77
6945as_fn_error "cannot compute sizeof (long)
6946See \`config.log' for more details." "$LINENO" 5; }; }
6947 else
6948 ac_cv_sizeof_long=0
6949 fi
c0993dbe 6950fi
81ecdfbb 6951
c0993dbe 6952fi
81ecdfbb
RW
6953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6954$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6955
c0993dbe 6956
c0993dbe 6957
c0993dbe
UW
6958cat >>confdefs.h <<_ACEOF
6959#define SIZEOF_LONG $ac_cv_sizeof_long
6960_ACEOF
6961
6962
6963 if test "x${ac_cv_sizeof_long}" = "x8"; then
6964 want64=true
6965 fi
6966 fi
6967 if test x${want64} = xtrue; then
6968 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6969 else
6970 TARGET_OBS='$(ALL_TARGET_OBS)'
6971 fi
6972fi
6973
6974
6975
6976# For other settings, only the main target counts.
6977gdb_sim=
6978gdb_osabi=
6979build_gdbserver=
6980targ=$target; . ${srcdir}/configure.tgt
6981
6982# Fetch the default architecture and default target vector from BFD.
6983targ=$target; . $srcdir/../bfd/config.bfd
6984
6985# We only want the first architecture, so strip off the others if
6986# there is more than one.
6987targ_archs=`echo $targ_archs | sed 's/ .*//'`
6988
6989if test "x$targ_archs" != x; then
6990
6991cat >>confdefs.h <<_ACEOF
6992#define DEFAULT_BFD_ARCH $targ_archs
6993_ACEOF
6994
6995fi
6996if test "x$targ_defvec" != x; then
6997
6998cat >>confdefs.h <<_ACEOF
6999#define DEFAULT_BFD_VEC $targ_defvec
7000_ACEOF
7001
7002fi
7003
c0993dbe
UW
7004# The CLI cannot be disabled yet, but may be in the future.
7005
7006# Enable CLI.
81ecdfbb
RW
7007# Check whether --enable-gdbcli was given.
7008if test "${enable_gdbcli+set}" = set; then :
7009 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
7010 yes)
7011 ;;
7012 no)
81ecdfbb 7013 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 7014 *)
81ecdfbb 7015 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
7016 esac
7017else
7018 enable_gdbcli=yes
81ecdfbb
RW
7019fi
7020
c0993dbe
UW
7021if test x"$enable_gdbcli" = xyes; then
7022 if test -d $srcdir/cli; then
7023 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7024 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7025 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7026 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7027 fi
7028fi
7029
7030# Enable MI.
81ecdfbb
RW
7031# Check whether --enable-gdbmi was given.
7032if test "${enable_gdbmi+set}" = set; then :
7033 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
7034 yes | no)
7035 ;;
7036 *)
81ecdfbb 7037 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
7038 esac
7039else
7040 enable_gdbmi=yes
81ecdfbb
RW
7041fi
7042
c0993dbe
UW
7043if test x"$enable_gdbmi" = xyes; then
7044 if test -d $srcdir/mi; then
7045 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7046 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7047 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7048 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7049 fi
7050fi
7051
7052# Enable TUI.
81ecdfbb
RW
7053# Check whether --enable-tui was given.
7054if test "${enable_tui+set}" = set; then :
7055 enableval=$enable_tui; case $enableval in
3ca64bd3 7056 yes | no | auto)
c0993dbe
UW
7057 ;;
7058 *)
81ecdfbb 7059 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
7060 esac
7061else
3ca64bd3 7062 enable_tui=auto
81ecdfbb
RW
7063fi
7064
c0993dbe
UW
7065
7066# Enable gdbtk.
81ecdfbb
RW
7067# Check whether --enable-gdbtk was given.
7068if test "${enable_gdbtk+set}" = set; then :
7069 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
7070 yes | no)
7071 ;;
7072 *)
81ecdfbb 7073 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
7074 esac
7075else
5062cc19 7076 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7077 enable_gdbtk=yes
7078 else
7079 enable_gdbtk=no
7080 fi
81ecdfbb
RW
7081fi
7082
c0993dbe
UW
7083# We unconditionally disable gdbtk tests on selected platforms.
7084case $host_os in
7085 go32* | windows*)
81ecdfbb
RW
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
7087$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
7088 enable_gdbtk=no ;;
7089esac
7090
7091# Libunwind support.
bec39cab 7092
81ecdfbb
RW
7093# Check whether --with-libunwind was given.
7094if test "${with_libunwind+set}" = set; then :
7095 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
7096 yes) enable_libunwind=yes ;;
7097 no) enable_libunwind=no ;;
81ecdfbb 7098 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 7099esac
bec39cab 7100else
bec39cab 7101
81ecdfbb
RW
7102 for ac_header in libunwind.h libunwind-ia64.h
7103do :
7104 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7105ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7106eval as_val=\$$as_ac_Header
7107 if test "x$as_val" = x""yes; then :
bec39cab 7108 cat >>confdefs.h <<_ACEOF
81ecdfbb 7109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7110_ACEOF
7111
7112fi
7113
7114done
7115
a9322a30
TT
7116 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7117 enable_libunwind=yes;
7118 fi
7119
bec39cab 7120fi
bec39cab 7121
bec39cab 7122
81ecdfbb
RW
7123if test x"$enable_libunwind" = xyes; then
7124 for ac_header in libunwind.h libunwind-ia64.h
7125do :
7126 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7127ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7128eval as_val=\$$as_ac_Header
7129 if test "x$as_val" = x""yes; then :
bec39cab 7130 cat >>confdefs.h <<_ACEOF
81ecdfbb 7131#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7132_ACEOF
7133
7134fi
7135
7136done
7137
bec39cab 7138
81ecdfbb 7139$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
7140
7141 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
7142 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
7143 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
7144fi
7145
cb01cfba
JB
7146opt_curses=no
7147
81ecdfbb
RW
7148# Check whether --with-curses was given.
7149if test "${with_curses+set}" = set; then :
7150 withval=$with_curses; opt_curses=$withval
7151fi
7152
cb01cfba 7153
76a39ba7 7154prefer_curses=no
cb01cfba 7155if test "$opt_curses" = "yes"; then
76a39ba7 7156 prefer_curses=yes
cb01cfba
JB
7157fi
7158
a9322a30 7159# Profiling support.
81ecdfbb
RW
7160# Check whether --enable-profiling was given.
7161if test "${enable_profiling+set}" = set; then :
7162 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7163 yes | no)
7164 ;;
7165 *)
81ecdfbb 7166 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7167 esac
7168else
7169 enable_profiling=no
81ecdfbb 7170fi
bec39cab 7171
a9322a30
TT
7172
7173for ac_func in monstartup _mcleanup
81ecdfbb
RW
7174do :
7175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7176ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7177eval as_val=\$$as_ac_var
7178 if test "x$as_val" = x""yes; then :
7179 cat >>confdefs.h <<_ACEOF
7180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7181_ACEOF
a9322a30 7182
81ecdfbb
RW
7183fi
7184done
a9322a30 7185
81ecdfbb
RW
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7187$as_echo_n "checking for _etext... " >&6; }
7188if test "${ac_cv_var__etext+set}" = set; then :
7189 $as_echo_n "(cached) " >&6
7190else
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193#include <stdlib.h>
7194extern char _etext;
a9322a30
TT
7195
7196int
7197main ()
7198{
7199free (&_etext);
7200 ;
7201 return 0;
7202}
bec39cab 7203_ACEOF
81ecdfbb 7204if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7205 ac_cv_var__etext=yes
bec39cab 7206else
81ecdfbb 7207 ac_cv_var__etext=no
bec39cab 7208fi
81ecdfbb
RW
7209rm -f core conftest.err conftest.$ac_objext \
7210 conftest$ac_exeext conftest.$ac_ext
bec39cab 7211fi
81ecdfbb
RW
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7213$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 7214if test $ac_cv_var__etext = yes; then
60ca704f 7215
81ecdfbb 7216$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7217
bec39cab 7218fi
81ecdfbb
RW
7219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7220$as_echo_n "checking for etext... " >&6; }
7221if test "${ac_cv_var_etext+set}" = set; then :
7222 $as_echo_n "(cached) " >&6
bec39cab 7223else
81ecdfbb 7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7225/* end confdefs.h. */
a9322a30
TT
7226#include <stdlib.h>
7227extern char etext;
bec39cab
AC
7228
7229int
7230main ()
7231{
a9322a30 7232free (&etext);
bec39cab
AC
7233 ;
7234 return 0;
7235}
7236_ACEOF
81ecdfbb 7237if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7238 ac_cv_var_etext=yes
bec39cab 7239else
81ecdfbb 7240 ac_cv_var_etext=no
bec39cab 7241fi
81ecdfbb
RW
7242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext conftest.$ac_ext
bec39cab 7244fi
81ecdfbb
RW
7245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7246$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7247if test $ac_cv_var_etext = yes; then
7248
81ecdfbb 7249$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7250
7251fi
a9322a30
TT
7252if test "$enable_profiling" = yes ; then
7253 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 7254 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7255 fi
7256 PROFILE_CFLAGS=-pg
7257 OLD_CFLAGS="$CFLAGS"
7258 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7259
81ecdfbb
RW
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7261$as_echo_n "checking whether $CC supports -pg... " >&6; }
7262if test "${ac_cv_cc_supports_pg+set}" = set; then :
7263 $as_echo_n "(cached) " >&6
bec39cab 7264else
81ecdfbb 7265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7266/* end confdefs.h. */
bec39cab
AC
7267
7268int
7269main ()
7270{
a9322a30 7271int x;
bec39cab
AC
7272 ;
7273 return 0;
7274}
7275_ACEOF
81ecdfbb 7276if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7277 ac_cv_cc_supports_pg=yes
bec39cab 7278else
81ecdfbb 7279 ac_cv_cc_supports_pg=no
bec39cab 7280fi
81ecdfbb 7281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7282fi
81ecdfbb
RW
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7284$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7285
a9322a30 7286 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 7287 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7288 fi
bec39cab 7289
a9322a30 7290 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7291fi
7292
c16158bc
JM
7293
7294
81ecdfbb
RW
7295# Check whether --with-pkgversion was given.
7296if test "${with_pkgversion+set}" = set; then :
7297 withval=$with_pkgversion; case "$withval" in
7298 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7299 no) PKGVERSION= ;;
7300 *) PKGVERSION="($withval) " ;;
7301 esac
7302else
7303 PKGVERSION="(GDB) "
7304
81ecdfbb 7305fi
c16158bc
JM
7306
7307
7308
7309
81ecdfbb
RW
7310
7311# Check whether --with-bugurl was given.
7312if test "${with_bugurl+set}" = set; then :
7313 withval=$with_bugurl; case "$withval" in
7314 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7315 no) BUGURL=
7316 ;;
7317 *) BUGURL="$withval"
7318 ;;
7319 esac
7320else
7321 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7322
81ecdfbb
RW
7323fi
7324
c16158bc
JM
7325 case ${BUGURL} in
7326 "")
7327 REPORT_BUGS_TO=
7328 REPORT_BUGS_TEXI=
7329 ;;
7330 *)
7331 REPORT_BUGS_TO="<$BUGURL>"
7332 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7333 ;;
7334 esac;
7335
7336
7337
7338
7339cat >>confdefs.h <<_ACEOF
7340#define PKGVERSION "$PKGVERSION"
7341_ACEOF
7342
7343
7344cat >>confdefs.h <<_ACEOF
7345#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7346_ACEOF
7347
7348
bec39cab
AC
7349# --------------------- #
7350# Checks for programs. #
7351# --------------------- #
7352
7353for ac_prog in gawk mawk nawk awk
7354do
7355 # Extract the first word of "$ac_prog", so it can be a program name with args.
7356set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358$as_echo_n "checking for $ac_word... " >&6; }
7359if test "${ac_cv_prog_AWK+set}" = set; then :
7360 $as_echo_n "(cached) " >&6
bec39cab
AC
7361else
7362 if test -n "$AWK"; then
7363 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7364else
7365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366for as_dir in $PATH
7367do
7368 IFS=$as_save_IFS
7369 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7370 for ac_exec_ext in '' $ac_executable_extensions; do
7371 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7372 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7374 break 2
7375 fi
7376done
81ecdfbb
RW
7377 done
7378IFS=$as_save_IFS
bec39cab
AC
7379
7380fi
7381fi
7382AWK=$ac_cv_prog_AWK
7383if test -n "$AWK"; then
81ecdfbb
RW
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7385$as_echo "$AWK" >&6; }
bec39cab 7386else
81ecdfbb
RW
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
bec39cab
AC
7389fi
7390
bec39cab 7391
81ecdfbb 7392 test -n "$AWK" && break
bec39cab
AC
7393done
7394
bec39cab 7395
81ecdfbb
RW
7396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7397$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7398LN_S=$as_ln_s
7399if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7401$as_echo "yes" >&6; }
bec39cab 7402else
81ecdfbb
RW
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7404$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7405fi
7406
7407if test -n "$ac_tool_prefix"; then
7408 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7409set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
7412if test "${ac_cv_prog_RANLIB+set}" = set; then :
7413 $as_echo_n "(cached) " >&6
bec39cab
AC
7414else
7415 if test -n "$RANLIB"; then
7416 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7417else
7418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421 IFS=$as_save_IFS
7422 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7423 for ac_exec_ext in '' $ac_executable_extensions; do
7424 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7425 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7427 break 2
7428 fi
7429done
81ecdfbb
RW
7430 done
7431IFS=$as_save_IFS
bec39cab
AC
7432
7433fi
7434fi
7435RANLIB=$ac_cv_prog_RANLIB
7436if test -n "$RANLIB"; then
81ecdfbb
RW
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7438$as_echo "$RANLIB" >&6; }
bec39cab 7439else
81ecdfbb
RW
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
bec39cab
AC
7442fi
7443
81ecdfbb 7444
bec39cab
AC
7445fi
7446if test -z "$ac_cv_prog_RANLIB"; then
7447 ac_ct_RANLIB=$RANLIB
7448 # Extract the first word of "ranlib", so it can be a program name with args.
7449set dummy ranlib; ac_word=$2
81ecdfbb
RW
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451$as_echo_n "checking for $ac_word... " >&6; }
7452if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7453 $as_echo_n "(cached) " >&6
bec39cab
AC
7454else
7455 if test -n "$ac_ct_RANLIB"; then
7456 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7457else
7458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459for as_dir in $PATH
7460do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7463 for ac_exec_ext in '' $ac_executable_extensions; do
7464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7465 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7467 break 2
7468 fi
7469done
81ecdfbb
RW
7470 done
7471IFS=$as_save_IFS
bec39cab 7472
bec39cab
AC
7473fi
7474fi
7475ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7476if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7478$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7479else
81ecdfbb
RW
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
bec39cab
AC
7482fi
7483
81ecdfbb
RW
7484 if test "x$ac_ct_RANLIB" = x; then
7485 RANLIB=":"
7486 else
7487 case $cross_compiling:$ac_tool_warned in
7488yes:)
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7491ac_tool_warned=yes ;;
7492esac
7493 RANLIB=$ac_ct_RANLIB
7494 fi
bec39cab
AC
7495else
7496 RANLIB="$ac_cv_prog_RANLIB"
7497fi
7498
7499for ac_prog in 'bison -y' byacc
7500do
7501 # Extract the first word of "$ac_prog", so it can be a program name with args.
7502set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504$as_echo_n "checking for $ac_word... " >&6; }
7505if test "${ac_cv_prog_YACC+set}" = set; then :
7506 $as_echo_n "(cached) " >&6
bec39cab
AC
7507else
7508 if test -n "$YACC"; then
7509 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7510else
7511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514 IFS=$as_save_IFS
7515 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7516 for ac_exec_ext in '' $ac_executable_extensions; do
7517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7518 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7520 break 2
7521 fi
7522done
81ecdfbb
RW
7523 done
7524IFS=$as_save_IFS
bec39cab
AC
7525
7526fi
7527fi
7528YACC=$ac_cv_prog_YACC
7529if test -n "$YACC"; then
81ecdfbb
RW
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7531$as_echo "$YACC" >&6; }
bec39cab 7532else
81ecdfbb
RW
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
bec39cab
AC
7535fi
7536
81ecdfbb 7537
bec39cab
AC
7538 test -n "$YACC" && break
7539done
7540test -n "$YACC" || YACC="yacc"
7541
7542
7543if test -n "$ac_tool_prefix"; then
7544 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7545set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7547$as_echo_n "checking for $ac_word... " >&6; }
7548if test "${ac_cv_prog_AR+set}" = set; then :
7549 $as_echo_n "(cached) " >&6
bec39cab
AC
7550else
7551 if test -n "$AR"; then
7552 ac_cv_prog_AR="$AR" # Let the user override the test.
7553else
7554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7555for as_dir in $PATH
7556do
7557 IFS=$as_save_IFS
7558 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7559 for ac_exec_ext in '' $ac_executable_extensions; do
7560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7561 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7563 break 2
7564 fi
7565done
81ecdfbb
RW
7566 done
7567IFS=$as_save_IFS
bec39cab
AC
7568
7569fi
7570fi
7571AR=$ac_cv_prog_AR
7572if test -n "$AR"; then
81ecdfbb
RW
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7574$as_echo "$AR" >&6; }
bec39cab 7575else
81ecdfbb
RW
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7577$as_echo "no" >&6; }
bec39cab
AC
7578fi
7579
81ecdfbb 7580
bec39cab
AC
7581fi
7582if test -z "$ac_cv_prog_AR"; then
7583 ac_ct_AR=$AR
7584 # Extract the first word of "ar", so it can be a program name with args.
7585set dummy ar; ac_word=$2
81ecdfbb
RW
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587$as_echo_n "checking for $ac_word... " >&6; }
7588if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7589 $as_echo_n "(cached) " >&6
bec39cab
AC
7590else
7591 if test -n "$ac_ct_AR"; then
7592 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7593else
7594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7595for as_dir in $PATH
7596do
7597 IFS=$as_save_IFS
7598 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7599 for ac_exec_ext in '' $ac_executable_extensions; do
7600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7601 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7603 break 2
7604 fi
7605done
81ecdfbb
RW
7606 done
7607IFS=$as_save_IFS
bec39cab
AC
7608
7609fi
7610fi
7611ac_ct_AR=$ac_cv_prog_ac_ct_AR
7612if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7614$as_echo "$ac_ct_AR" >&6; }
bec39cab 7615else
81ecdfbb
RW
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617$as_echo "no" >&6; }
bec39cab
AC
7618fi
7619
81ecdfbb
RW
7620 if test "x$ac_ct_AR" = x; then
7621 AR=""
7622 else
7623 case $cross_compiling:$ac_tool_warned in
7624yes:)
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7627ac_tool_warned=yes ;;
7628esac
7629 AR=$ac_ct_AR
7630 fi
bec39cab
AC
7631else
7632 AR="$ac_cv_prog_AR"
7633fi
7634
7635if test -n "$ac_tool_prefix"; then
7636 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7637set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639$as_echo_n "checking for $ac_word... " >&6; }
7640if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7641 $as_echo_n "(cached) " >&6
bec39cab
AC
7642else
7643 if test -n "$DLLTOOL"; then
7644 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7645else
7646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7647for as_dir in $PATH
7648do
7649 IFS=$as_save_IFS
7650 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7651 for ac_exec_ext in '' $ac_executable_extensions; do
7652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7653 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7655 break 2
7656 fi
7657done
81ecdfbb
RW
7658 done
7659IFS=$as_save_IFS
bec39cab
AC
7660
7661fi
7662fi
7663DLLTOOL=$ac_cv_prog_DLLTOOL
7664if test -n "$DLLTOOL"; then
81ecdfbb
RW
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7666$as_echo "$DLLTOOL" >&6; }
bec39cab 7667else
81ecdfbb
RW
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
bec39cab
AC
7670fi
7671
81ecdfbb 7672
bec39cab
AC
7673fi
7674if test -z "$ac_cv_prog_DLLTOOL"; then
7675 ac_ct_DLLTOOL=$DLLTOOL
7676 # Extract the first word of "dlltool", so it can be a program name with args.
7677set dummy dlltool; ac_word=$2
81ecdfbb
RW
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7679$as_echo_n "checking for $ac_word... " >&6; }
7680if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7681 $as_echo_n "(cached) " >&6
bec39cab
AC
7682else
7683 if test -n "$ac_ct_DLLTOOL"; then
7684 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7685else
7686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7687for as_dir in $PATH
7688do
7689 IFS=$as_save_IFS
7690 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7691 for ac_exec_ext in '' $ac_executable_extensions; do
7692 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7693 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7695 break 2
7696 fi
7697done
81ecdfbb
RW
7698 done
7699IFS=$as_save_IFS
bec39cab
AC
7700
7701fi
7702fi
7703ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7704if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7706$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7707else
81ecdfbb
RW
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709$as_echo "no" >&6; }
bec39cab
AC
7710fi
7711
81ecdfbb
RW
7712 if test "x$ac_ct_DLLTOOL" = x; then
7713 DLLTOOL=""
7714 else
7715 case $cross_compiling:$ac_tool_warned in
7716yes:)
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7719ac_tool_warned=yes ;;
7720esac
7721 DLLTOOL=$ac_ct_DLLTOOL
7722 fi
bec39cab
AC
7723else
7724 DLLTOOL="$ac_cv_prog_DLLTOOL"
7725fi
7726
7727if test -n "$ac_tool_prefix"; then
7728 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7729set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if test "${ac_cv_prog_WINDRES+set}" = set; then :
7733 $as_echo_n "(cached) " >&6
bec39cab
AC
7734else
7735 if test -n "$WINDRES"; then
7736 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7737else
7738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739for as_dir in $PATH
7740do
7741 IFS=$as_save_IFS
7742 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7743 for ac_exec_ext in '' $ac_executable_extensions; do
7744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7745 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7747 break 2
7748 fi
7749done
81ecdfbb
RW
7750 done
7751IFS=$as_save_IFS
bec39cab
AC
7752
7753fi
7754fi
7755WINDRES=$ac_cv_prog_WINDRES
7756if test -n "$WINDRES"; then
81ecdfbb
RW
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7758$as_echo "$WINDRES" >&6; }
bec39cab 7759else
81ecdfbb
RW
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761$as_echo "no" >&6; }
bec39cab
AC
7762fi
7763
81ecdfbb 7764
bec39cab
AC
7765fi
7766if test -z "$ac_cv_prog_WINDRES"; then
7767 ac_ct_WINDRES=$WINDRES
7768 # Extract the first word of "windres", so it can be a program name with args.
7769set dummy windres; ac_word=$2
81ecdfbb
RW
7770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771$as_echo_n "checking for $ac_word... " >&6; }
7772if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7773 $as_echo_n "(cached) " >&6
bec39cab
AC
7774else
7775 if test -n "$ac_ct_WINDRES"; then
7776 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7777else
7778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781 IFS=$as_save_IFS
7782 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7783 for ac_exec_ext in '' $ac_executable_extensions; do
7784 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7785 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7787 break 2
7788 fi
7789done
81ecdfbb
RW
7790 done
7791IFS=$as_save_IFS
bec39cab
AC
7792
7793fi
7794fi
7795ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7796if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7798$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7799else
81ecdfbb
RW
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
c906108c 7802fi
bec39cab 7803
81ecdfbb
RW
7804 if test "x$ac_ct_WINDRES" = x; then
7805 WINDRES=""
7806 else
7807 case $cross_compiling:$ac_tool_warned in
7808yes:)
7809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7811ac_tool_warned=yes ;;
7812esac
7813 WINDRES=$ac_ct_WINDRES
7814 fi
c906108c 7815else
bec39cab 7816 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7817fi
7818
bec39cab
AC
7819
7820# Needed for GNU/Hurd.
7821if test -n "$ac_tool_prefix"; then
7822 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7823set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7825$as_echo_n "checking for $ac_word... " >&6; }
7826if test "${ac_cv_prog_MIG+set}" = set; then :
7827 $as_echo_n "(cached) " >&6
c906108c 7828else
bec39cab
AC
7829 if test -n "$MIG"; then
7830 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7831else
7832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833for as_dir in $PATH
7834do
7835 IFS=$as_save_IFS
7836 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7837 for ac_exec_ext in '' $ac_executable_extensions; do
7838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7839 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7841 break 2
7842 fi
7843done
81ecdfbb
RW
7844 done
7845IFS=$as_save_IFS
bec39cab 7846
c906108c 7847fi
bec39cab
AC
7848fi
7849MIG=$ac_cv_prog_MIG
7850if test -n "$MIG"; then
81ecdfbb
RW
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7852$as_echo "$MIG" >&6; }
c906108c 7853else
81ecdfbb
RW
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7855$as_echo "no" >&6; }
c906108c
SS
7856fi
7857
81ecdfbb 7858
bec39cab
AC
7859fi
7860if test -z "$ac_cv_prog_MIG"; then
7861 ac_ct_MIG=$MIG
7862 # Extract the first word of "mig", so it can be a program name with args.
7863set dummy mig; ac_word=$2
81ecdfbb
RW
7864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865$as_echo_n "checking for $ac_word... " >&6; }
7866if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7867 $as_echo_n "(cached) " >&6
bec39cab
AC
7868else
7869 if test -n "$ac_ct_MIG"; then
7870 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7871else
7872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7873for as_dir in $PATH
7874do
7875 IFS=$as_save_IFS
7876 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7877 for ac_exec_ext in '' $ac_executable_extensions; do
7878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7879 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7881 break 2
7882 fi
7883done
81ecdfbb
RW
7884 done
7885IFS=$as_save_IFS
c906108c 7886
bec39cab
AC
7887fi
7888fi
7889ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7890if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7892$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7893else
81ecdfbb
RW
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895$as_echo "no" >&6; }
bec39cab 7896fi
c906108c 7897
81ecdfbb
RW
7898 if test "x$ac_ct_MIG" = x; then
7899 MIG=""
7900 else
7901 case $cross_compiling:$ac_tool_warned in
7902yes:)
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7905ac_tool_warned=yes ;;
7906esac
7907 MIG=$ac_ct_MIG
7908 fi
bec39cab
AC
7909else
7910 MIG="$ac_cv_prog_MIG"
7911fi
c906108c 7912
c906108c 7913
bec39cab
AC
7914# ---------------------- #
7915# Checks for libraries. #
7916# ---------------------- #
c906108c 7917
bec39cab 7918# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7920$as_echo_n "checking for main in -lm... " >&6; }
7921if test "${ac_cv_lib_m_main+set}" = set; then :
7922 $as_echo_n "(cached) " >&6
bec39cab
AC
7923else
7924 ac_check_lib_save_LIBS=$LIBS
7925LIBS="-lm $LIBS"
81ecdfbb 7926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7927/* end confdefs.h. */
c906108c 7928
c906108c 7929
bec39cab
AC
7930int
7931main ()
7932{
81ecdfbb 7933return main ();
bec39cab
AC
7934 ;
7935 return 0;
7936}
7937_ACEOF
81ecdfbb 7938if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7939 ac_cv_lib_m_main=yes
7940else
81ecdfbb 7941 ac_cv_lib_m_main=no
bec39cab 7942fi
81ecdfbb
RW
7943rm -f core conftest.err conftest.$ac_objext \
7944 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7945LIBS=$ac_check_lib_save_LIBS
7946fi
81ecdfbb
RW
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7948$as_echo "$ac_cv_lib_m_main" >&6; }
7949if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7950 cat >>confdefs.h <<_ACEOF
7951#define HAVE_LIBM 1
7952_ACEOF
7953
7954 LIBS="-lm $LIBS"
c906108c 7955
c906108c 7956fi
bec39cab
AC
7957
7958
7959# We need to link with -lw to get `wctype' on Solaris before Solaris
7960# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
7961# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7962# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
7963ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7964if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 7965
c906108c 7966else
81ecdfbb
RW
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7968$as_echo_n "checking for wctype in -lw... " >&6; }
7969if test "${ac_cv_lib_w_wctype+set}" = set; then :
7970 $as_echo_n "(cached) " >&6
bec39cab
AC
7971else
7972 ac_check_lib_save_LIBS=$LIBS
7973LIBS="-lw $LIBS"
81ecdfbb 7974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7975/* end confdefs.h. */
c906108c 7976
81ecdfbb
RW
7977/* Override any GCC internal prototype to avoid an error.
7978 Use char because int might match the return type of a GCC
7979 builtin and then its argument prototype would still apply. */
bec39cab
AC
7980#ifdef __cplusplus
7981extern "C"
7982#endif
bec39cab
AC
7983char wctype ();
7984int
7985main ()
7986{
81ecdfbb 7987return wctype ();
bec39cab
AC
7988 ;
7989 return 0;
7990}
7991_ACEOF
81ecdfbb 7992if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7993 ac_cv_lib_w_wctype=yes
7994else
81ecdfbb 7995 ac_cv_lib_w_wctype=no
bec39cab 7996fi
81ecdfbb
RW
7997rm -f core conftest.err conftest.$ac_objext \
7998 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7999LIBS=$ac_check_lib_save_LIBS
8000fi
81ecdfbb
RW
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
8002$as_echo "$ac_cv_lib_w_wctype" >&6; }
8003if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
8004 cat >>confdefs.h <<_ACEOF
8005#define HAVE_LIBW 1
8006_ACEOF
c906108c 8007
bec39cab 8008 LIBS="-lw $LIBS"
c906108c 8009
bec39cab 8010fi
c906108c 8011
bec39cab 8012fi
c906108c 8013
ddc9cd0f 8014
bec39cab 8015# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8017$as_echo_n "checking for library containing gethostbyname... " >&6; }
8018if test "${ac_cv_search_gethostbyname+set}" = set; then :
8019 $as_echo_n "(cached) " >&6
bec39cab
AC
8020else
8021 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8023/* end confdefs.h. */
ddc9cd0f 8024
81ecdfbb
RW
8025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
bec39cab
AC
8028#ifdef __cplusplus
8029extern "C"
8030#endif
bec39cab
AC
8031char gethostbyname ();
8032int
8033main ()
8034{
81ecdfbb 8035return gethostbyname ();
bec39cab
AC
8036 ;
8037 return 0;
8038}
8039_ACEOF
81ecdfbb
RW
8040for ac_lib in '' nsl; do
8041 if test -z "$ac_lib"; then
8042 ac_res="none required"
8043 else
8044 ac_res=-l$ac_lib
b4e70030 8045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8046 fi
8047 if ac_fn_c_try_link "$LINENO"; then :
8048 ac_cv_search_gethostbyname=$ac_res
8049fi
8050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext
8052 if test "${ac_cv_search_gethostbyname+set}" = set; then :
8053 break
8054fi
8055done
8056if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 8057
bec39cab 8058else
81ecdfbb 8059 ac_cv_search_gethostbyname=no
bec39cab 8060fi
81ecdfbb 8061rm conftest.$ac_ext
bec39cab
AC
8062LIBS=$ac_func_search_save_LIBS
8063fi
81ecdfbb
RW
8064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8065$as_echo "$ac_cv_search_gethostbyname" >&6; }
8066ac_res=$ac_cv_search_gethostbyname
8067if test "$ac_res" != no; then :
8068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8069
bec39cab 8070fi
96baa820 8071
c906108c 8072
b4e70030 8073# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8075$as_echo_n "checking for library containing socketpair... " >&6; }
8076if test "${ac_cv_search_socketpair+set}" = set; then :
8077 $as_echo_n "(cached) " >&6
b4e70030
JB
8078else
8079 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8081/* end confdefs.h. */
8082
81ecdfbb
RW
8083/* Override any GCC internal prototype to avoid an error.
8084 Use char because int might match the return type of a GCC
8085 builtin and then its argument prototype would still apply. */
b4e70030
JB
8086#ifdef __cplusplus
8087extern "C"
8088#endif
b4e70030
JB
8089char socketpair ();
8090int
8091main ()
8092{
81ecdfbb 8093return socketpair ();
b4e70030
JB
8094 ;
8095 return 0;
8096}
8097_ACEOF
81ecdfbb
RW
8098for ac_lib in '' socket; do
8099 if test -z "$ac_lib"; then
8100 ac_res="none required"
8101 else
8102 ac_res=-l$ac_lib
b4e70030 8103 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8104 fi
8105 if ac_fn_c_try_link "$LINENO"; then :
8106 ac_cv_search_socketpair=$ac_res
8107fi
8108rm -f core conftest.err conftest.$ac_objext \
8109 conftest$ac_exeext
8110 if test "${ac_cv_search_socketpair+set}" = set; then :
8111 break
8112fi
8113done
8114if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 8115
b4e70030 8116else
81ecdfbb 8117 ac_cv_search_socketpair=no
b4e70030 8118fi
81ecdfbb 8119rm conftest.$ac_ext
b4e70030
JB
8120LIBS=$ac_func_search_save_LIBS
8121fi
81ecdfbb
RW
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8123$as_echo "$ac_cv_search_socketpair" >&6; }
8124ac_res=$ac_cv_search_socketpair
8125if test "$ac_res" != no; then :
8126 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8127
8128fi
8129
8130
233a11ab 8131# Link in zlib if we can. This allows us to read compressed debug sections.
81ecdfbb
RW
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
8133$as_echo_n "checking for library containing zlibVersion... " >&6; }
8134if test "${ac_cv_search_zlibVersion+set}" = set; then :
8135 $as_echo_n "(cached) " >&6
233a11ab
CS
8136else
8137 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
8139/* end confdefs.h. */
8140
81ecdfbb
RW
8141/* Override any GCC internal prototype to avoid an error.
8142 Use char because int might match the return type of a GCC
233a11ab 8143 builtin and then its argument prototype would still apply. */
233a11ab
CS
8144#ifdef __cplusplus
8145extern "C"
8146#endif
233a11ab
CS
8147char zlibVersion ();
8148int
8149main ()
8150{
81ecdfbb 8151return zlibVersion ();
233a11ab
CS
8152 ;
8153 return 0;
8154}
8155_ACEOF
81ecdfbb
RW
8156for ac_lib in '' z; do
8157 if test -z "$ac_lib"; then
8158 ac_res="none required"
233a11ab 8159 else
81ecdfbb
RW
8160 ac_res=-l$ac_lib
8161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 8162 fi
81ecdfbb
RW
8163 if ac_fn_c_try_link "$LINENO"; then :
8164 ac_cv_search_zlibVersion=$ac_res
233a11ab 8165fi
81ecdfbb
RW
8166rm -f core conftest.err conftest.$ac_objext \
8167 conftest$ac_exeext
8168 if test "${ac_cv_search_zlibVersion+set}" = set; then :
8169 break
233a11ab 8170fi
81ecdfbb
RW
8171done
8172if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 8173
233a11ab 8174else
81ecdfbb 8175 ac_cv_search_zlibVersion=no
233a11ab 8176fi
81ecdfbb
RW
8177rm conftest.$ac_ext
8178LIBS=$ac_func_search_save_LIBS
233a11ab 8179fi
81ecdfbb
RW
8180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
8181$as_echo "$ac_cv_search_zlibVersion" >&6; }
8182ac_res=$ac_cv_search_zlibVersion
8183if test "$ac_res" != no; then :
8184 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8185 for ac_header in zlib.h
8186do :
8187 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8188if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 8189 cat >>confdefs.h <<_ACEOF
81ecdfbb 8190#define HAVE_ZLIB_H 1
233a11ab
CS
8191_ACEOF
8192
8193fi
8194
8195done
8196
8197fi
8198
8199
77f120bf 8200# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
8202$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
8203if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8204 $as_echo_n "(cached) " >&6
bec39cab
AC
8205else
8206 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8208/* end confdefs.h. */
c906108c 8209
81ecdfbb
RW
8210/* Override any GCC internal prototype to avoid an error.
8211 Use char because int might match the return type of a GCC
8212 builtin and then its argument prototype would still apply. */
bec39cab
AC
8213#ifdef __cplusplus
8214extern "C"
8215#endif
77f120bf 8216char dlgetmodinfo ();
bec39cab
AC
8217int
8218main ()
8219{
81ecdfbb 8220return dlgetmodinfo ();
bec39cab
AC
8221 ;
8222 return 0;
8223}
8224_ACEOF
81ecdfbb
RW
8225for ac_lib in '' dl xpdl; do
8226 if test -z "$ac_lib"; then
8227 ac_res="none required"
8228 else
8229 ac_res=-l$ac_lib
b4e70030 8230 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8231 fi
8232 if ac_fn_c_try_link "$LINENO"; then :
8233 ac_cv_search_dlgetmodinfo=$ac_res
8234fi
8235rm -f core conftest.err conftest.$ac_objext \
8236 conftest$ac_exeext
8237 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8238 break
8239fi
8240done
8241if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 8242
4e8d927d 8243else
81ecdfbb 8244 ac_cv_search_dlgetmodinfo=no
1ba607ad 8245fi
81ecdfbb 8246rm conftest.$ac_ext
bec39cab
AC
8247LIBS=$ac_func_search_save_LIBS
8248fi
81ecdfbb
RW
8249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
8250$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
8251ac_res=$ac_cv_search_dlgetmodinfo
8252if test "$ac_res" != no; then :
8253 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 8254
8bb2c122 8255fi
8bb2c122 8256
8bb2c122 8257
77f120bf 8258
77f120bf 8259
6c7a06a3 8260
81ecdfbb
RW
8261# Check whether --with-libiconv-prefix was given.
8262if test "${with_libiconv_prefix+set}" = set; then :
8263 withval=$with_libiconv_prefix;
6c7a06a3 8264 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
8265 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
8266 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
8267 done
8268
81ecdfbb
RW
8269fi
8270
6c7a06a3
TT
8271
8272 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
8273 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
8274
81ecdfbb
RW
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8276$as_echo_n "checking for iconv... " >&6; }
8277if test "${am_cv_func_iconv+set}" = set; then :
8278 $as_echo_n "(cached) " >&6
d542061a 8279else
6c7a06a3
TT
8280
8281 am_cv_func_iconv="no, consider installing GNU libiconv"
8282 am_cv_lib_iconv=no
8283 am_cv_use_build_libiconv=no
4edb1e84
JB
8284
8285 # If libiconv is part of the build tree, then try using it over
8286 # any system iconv.
8287 if test -d ../libiconv; then
8288 am_save_LIBS="$LIBS"
8289 am_save_CPPFLAGS="$CPPFLAGS"
8290 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
8291 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
81ecdfbb 8292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8293/* end confdefs.h. */
6c7a06a3
TT
8294#include <stdlib.h>
8295#include <iconv.h>
d542061a
UW
8296int
8297main ()
8298{
6c7a06a3 8299iconv_t cd = iconv_open("","");
4edb1e84
JB
8300 iconv(cd,NULL,NULL,NULL,NULL);
8301 iconv_close(cd);
d542061a
UW
8302 ;
8303 return 0;
8304}
8305_ACEOF
81ecdfbb 8306if ac_fn_c_try_link "$LINENO"; then :
4edb1e84
JB
8307 am_cv_use_build_libiconv=yes
8308 am_cv_lib_iconv=yes
8309 am_cv_func_iconv=yes
d542061a 8310fi
81ecdfbb
RW
8311rm -f core conftest.err conftest.$ac_objext \
8312 conftest$ac_exeext conftest.$ac_ext
4edb1e84
JB
8313 LIBS="$am_save_LIBS"
8314 CPPFLAGS="$am_save_CPPFLAGS"
8315 fi
94ae1714 8316
4edb1e84 8317 # Next, try to find iconv in libc.
6c7a06a3 8318 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8320/* end confdefs.h. */
6c7a06a3
TT
8321#include <stdlib.h>
8322#include <iconv.h>
d542061a
UW
8323int
8324main ()
8325{
6c7a06a3
TT
8326iconv_t cd = iconv_open("","");
8327 iconv(cd,NULL,NULL,NULL,NULL);
8328 iconv_close(cd);
d542061a
UW
8329 ;
8330 return 0;
8331}
8332_ACEOF
81ecdfbb 8333if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8334 am_cv_func_iconv=yes
d542061a 8335fi
81ecdfbb
RW
8336rm -f core conftest.err conftest.$ac_objext \
8337 conftest$ac_exeext conftest.$ac_ext
77f120bf 8338 fi
94ae1714 8339
4edb1e84
JB
8340 # If iconv was not in libc, try -liconv. In this case, arrange to
8341 # look in the libiconv prefix, if it was specified by the user.
8342 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8343 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
8344 am_save_LIBS="$LIBS"
8345 if test -n "$LIBICONV_INCLUDE"; then
8346 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8347 LIBS="$LIBS $LIBICONV_LIBDIR"
8348 fi
8349 LIBS="$LIBS -liconv"
81ecdfbb 8350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8351/* end confdefs.h. */
6c7a06a3
TT
8352#include <stdlib.h>
8353#include <iconv.h>
bec39cab
AC
8354int
8355main ()
8356{
6c7a06a3
TT
8357iconv_t cd = iconv_open("","");
8358 iconv(cd,NULL,NULL,NULL,NULL);
8359 iconv_close(cd);
bec39cab
AC
8360 ;
8361 return 0;
8362}
8363_ACEOF
81ecdfbb 8364if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8365 am_cv_lib_iconv=yes
6c7a06a3 8366 am_cv_func_iconv=yes
627af7ea 8367fi
81ecdfbb
RW
8368rm -f core conftest.err conftest.$ac_objext \
8369 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 8370 LIBS="$am_save_LIBS"
fc3b640d 8371 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
8372 fi
8373
8374fi
81ecdfbb
RW
8375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8376$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
8377
8378 # Set the various flags based on the cache variables. We can't rely
8379 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
8380 LIBICONV=
8381 if test "$am_cv_lib_iconv" = yes; then
8382 LIBICONV="-liconv"
94ae1714
TT
8383 else
8384 LIBICONV_LIBDIR=
8385 LIBICONV_INCLUDE=
fc3b640d
TT
8386 fi
8387 if test "$am_cv_use_build_libiconv" = yes; then
8388 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
8389 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
8390 fi
8391 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8392 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 8393
6c7a06a3
TT
8394 if test "$am_cv_func_iconv" = yes; then
8395
81ecdfbb 8396$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 8397
81ecdfbb
RW
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8399$as_echo_n "checking for iconv declaration... " >&6; }
8400 if test "${am_cv_proto_iconv+set}" = set; then :
8401 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8402else
8403
81ecdfbb 8404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8405/* end confdefs.h. */
8406
6c7a06a3
TT
8407#include <stdlib.h>
8408#include <iconv.h>
8409extern
b4e70030 8410#ifdef __cplusplus
6c7a06a3 8411"C"
b4e70030 8412#endif
6c7a06a3
TT
8413#if defined(__STDC__) || defined(__cplusplus)
8414size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8415#else
8416size_t iconv();
8417#endif
8418
b4e70030
JB
8419int
8420main ()
8421{
6c7a06a3 8422
b4e70030
JB
8423 ;
8424 return 0;
8425}
8426_ACEOF
81ecdfbb 8427if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8428 am_cv_proto_iconv_arg1=""
4e8d927d 8429else
81ecdfbb 8430 am_cv_proto_iconv_arg1="const"
b4e70030 8431fi
81ecdfbb 8432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8433 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);"
8434fi
8435
8436 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8438 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8439$as_echo "${ac_t:-
8440 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8441
8442cat >>confdefs.h <<_ACEOF
8443#define ICONV_CONST $am_cv_proto_iconv_arg1
8444_ACEOF
8445
8446 fi
6c7a06a3
TT
8447
8448
8449# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
8450# There is a very specific comment in /usr/include/curses.h explaining that
8451# termcap routines built into libcurses must not be used.
8452#
8453# The symptoms we observed so far is GDB unexpectedly changing
8454# the terminal settings when tgetent is called - this is particularly
8455# visible as the output is missing carriage returns, and so rapidly
8456# becomes very hard to read.
8457#
8458# The readline configure script has already decided that libtermcap
8459# was enough for its purposes, and so decided to build readline using
8460# libtermcap. Since the TUI mode requires curses, building GDB with
8461# TUI enabled results in both libraries to be used at the same time,
8462# which is not allowed. This basically means that GDB with TUI is
8463# broken on alpha-osf.
8464
8465case $host_os in
8466 alpha*-*-osf* )
8467 if "$enable_tui" = "yes"; then
81ecdfbb 8468 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3
TT
8469 fi
8470 if "$enable_tui" = "auto"; then
8471 enable_tui=no
8472 fi
8473 ;;
8474esac
8475
cb01cfba 8476# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8477if test x"$enable_tui" != xno; then
cb01cfba
JB
8478 prefer_curses=yes
8479fi
8480
8481curses_found=no
8482if test x"$prefer_curses" = xyes; then
8483 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8484 # curses library because the latter might not provide all the
8485 # functionality we need. However, this leads to problems on systems
8486 # where the linker searches /usr/local/lib, but the compiler doesn't
8487 # search /usr/local/include, if ncurses is installed in /usr/local. A
8488 # default installation of ncurses on alpha*-dec-osf* will lead to such
8489 # a situation.
81ecdfbb
RW
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8491$as_echo_n "checking for library containing waddstr... " >&6; }
8492if test "${ac_cv_search_waddstr+set}" = set; then :
8493 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8494else
8495 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8497/* end confdefs.h. */
8498
81ecdfbb
RW
8499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8502#ifdef __cplusplus
8503extern "C"
8504#endif
6c7a06a3
TT
8505char waddstr ();
8506int
8507main ()
8508{
81ecdfbb 8509return waddstr ();
6c7a06a3
TT
8510 ;
8511 return 0;
8512}
8513_ACEOF
81ecdfbb
RW
8514for ac_lib in '' ncurses cursesX curses; do
8515 if test -z "$ac_lib"; then
8516 ac_res="none required"
8517 else
8518 ac_res=-l$ac_lib
8519 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8520 fi
8521 if ac_fn_c_try_link "$LINENO"; then :
8522 ac_cv_search_waddstr=$ac_res
8523fi
8524rm -f core conftest.err conftest.$ac_objext \
8525 conftest$ac_exeext
8526 if test "${ac_cv_search_waddstr+set}" = set; then :
8527 break
8528fi
8529done
8530if test "${ac_cv_search_waddstr+set}" = set; then :
8531
6c7a06a3 8532else
81ecdfbb
RW
8533 ac_cv_search_waddstr=no
8534fi
8535rm conftest.$ac_ext
8536LIBS=$ac_func_search_save_LIBS
8537fi
8538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8539$as_echo "$ac_cv_search_waddstr" >&6; }
8540ac_res=$ac_cv_search_waddstr
8541if test "$ac_res" != no; then :
8542 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8543
8544fi
8545
8546
cb01cfba
JB
8547 if test "$ac_cv_search_waddstr" != no; then
8548 curses_found=yes
8549 fi
8550fi
8551
8552# Check whether we should enable the TUI, but only do so if we really
8553# can.
8554if test x"$enable_tui" != xno; then
8555 if test -d $srcdir/tui; then
8556 if test "$curses_found" != no; then
6c7a06a3
TT
8557 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8558 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8559 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8560 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8561 CONFIG_ALL="${CONFIG_ALL} all-tui"
8562 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
8563 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
8564 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
8565 else
8566 if test x"$enable_tui" = xyes; then
81ecdfbb 8567 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8568 else
81ecdfbb
RW
8569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8570$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8571 fi
8572 fi
8573 fi
8574fi
8575
8576# Since GDB uses Readline, we need termcap functionality. In many
8577# cases this will be provided by the curses library, but some systems
8578# have a seperate termcap library, or no curses library at all.
8579
8580case $host_os in
8581 cygwin*)
8582 if test -d $srcdir/libtermcap; then
8583 LIBS="../libtermcap/libtermcap.a $LIBS"
8584 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8585 fi ;;
8586 go32* | *djgpp*)
8587 ac_cv_search_tgetent="none required"
8588 ;;
8589 *mingw32*)
8590 ac_cv_search_tgetent="none required"
8591 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
8592 ;;
8593esac
8594
8595# These are the libraries checked by Readline.
81ecdfbb
RW
8596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8597$as_echo_n "checking for library containing tgetent... " >&6; }
8598if test "${ac_cv_search_tgetent+set}" = set; then :
8599 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8600else
8601 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8603/* end confdefs.h. */
8604
81ecdfbb
RW
8605/* Override any GCC internal prototype to avoid an error.
8606 Use char because int might match the return type of a GCC
8607 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8608#ifdef __cplusplus
8609extern "C"
8610#endif
6c7a06a3
TT
8611char tgetent ();
8612int
8613main ()
8614{
81ecdfbb 8615return tgetent ();
6c7a06a3
TT
8616 ;
8617 return 0;
8618}
8619_ACEOF
81ecdfbb
RW
8620for ac_lib in '' termcap tinfo curses ncurses; do
8621 if test -z "$ac_lib"; then
8622 ac_res="none required"
8623 else
8624 ac_res=-l$ac_lib
6c7a06a3 8625 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8626 fi
8627 if ac_fn_c_try_link "$LINENO"; then :
8628 ac_cv_search_tgetent=$ac_res
8629fi
8630rm -f core conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext
8632 if test "${ac_cv_search_tgetent+set}" = set; then :
8633 break
8634fi
8635done
8636if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8637
6c7a06a3 8638else
81ecdfbb 8639 ac_cv_search_tgetent=no
6c7a06a3 8640fi
81ecdfbb 8641rm conftest.$ac_ext
6c7a06a3
TT
8642LIBS=$ac_func_search_save_LIBS
8643fi
81ecdfbb
RW
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8645$as_echo "$ac_cv_search_tgetent" >&6; }
8646ac_res=$ac_cv_search_tgetent
8647if test "$ac_res" != no; then :
8648 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8649
06825bd1
MK
8650fi
8651
06825bd1 8652
bec39cab 8653if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 8654 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
8655fi
8656
3841debe 8657
81ecdfbb
RW
8658# Check whether --with-system-readline was given.
8659if test "${with_system_readline+set}" = set; then :
8660 withval=$with_system_readline;
8661fi
6a30b0a5 8662
6a30b0a5
AS
8663
8664if test "$with_system_readline" = yes; then
8665 READLINE=-lreadline
8666 READLINE_DEPS=
8667 READLINE_CFLAGS=
a71e0887
JK
8668
8669 # readline-6.0 started to use the name `_rl_echoing_p'.
8670 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
8671
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
8673$as_echo_n "checking for readline_echoing_p... " >&6; }
8674 save_LIBS=$LIBS
8675 LIBS="$LIBS $READLINE"
8676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8677/* end confdefs.h. */
8678
8679int
8680main ()
8681{
8682extern int readline_echoing_p;
8683 return readline_echoing_p;
8684 ;
8685 return 0;
8686}
8687_ACEOF
8688if ac_fn_c_try_link "$LINENO"; then :
8689 READLINE_ECHOING_P=yes
8690else
8691 READLINE_ECHOING_P=no
8692
8693$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
8694
8695fi
8696rm -f core conftest.err conftest.$ac_objext \
8697 conftest$ac_exeext conftest.$ac_ext
8698 LIBS="$save_LIBS"
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
8700$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
8701else
8702 READLINE='$(READLINE_DIR)/libreadline.a'
8703 READLINE_DEPS='$(READLINE)'
8704 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8705fi
8706
8707
8708
8709
8710
81ecdfbb
RW
8711# Check whether --with-expat was given.
8712if test "${with_expat+set}" = set; then :
8713 withval=$with_expat;
5c39566f
DJ
8714else
8715 with_expat=auto
81ecdfbb
RW
8716fi
8717
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8719$as_echo_n "checking whether to use expat... " >&6; }
8720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8721$as_echo "$with_expat" >&6; }
5c39566f
DJ
8722
8723if test "${with_expat}" = no; then
81ecdfbb
RW
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8725$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8726 HAVE_LIBEXPAT=no
8727else
8728
3841debe
DJ
8729 if test "X$prefix" = "XNONE"; then
8730 acl_final_prefix="$ac_default_prefix"
8731 else
8732 acl_final_prefix="$prefix"
8733 fi
8734 if test "X$exec_prefix" = "XNONE"; then
8735 acl_final_exec_prefix='${prefix}'
8736 else
8737 acl_final_exec_prefix="$exec_prefix"
8738 fi
8739 acl_save_prefix="$prefix"
8740 prefix="$acl_final_prefix"
8741 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8742 prefix="$acl_save_prefix"
8743
8744
81ecdfbb
RW
8745# Check whether --with-gnu-ld was given.
8746if test "${with_gnu_ld+set}" = set; then :
8747 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
8748else
8749 with_gnu_ld=no
81ecdfbb
RW
8750fi
8751
3841debe
DJ
8752# Prepare PATH_SEPARATOR.
8753# The user is always right.
8754if test "${PATH_SEPARATOR+set}" != set; then
8755 echo "#! /bin/sh" >conf$$.sh
8756 echo "exit 0" >>conf$$.sh
8757 chmod +x conf$$.sh
8758 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8759 PATH_SEPARATOR=';'
8760 else
8761 PATH_SEPARATOR=:
8762 fi
8763 rm -f conf$$.sh
8764fi
8765ac_prog=ld
8766if test "$GCC" = yes; then
8767 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8769$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
8770 case $host in
8771 *-*-mingw*)
8772 # gcc leaves a trailing carriage return which upsets mingw
8773 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8774 *)
8775 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8776 esac
8777 case $ac_prog in
8778 # Accept absolute paths.
8779 [\\/]* | [A-Za-z]:[\\/]*)
8780 re_direlt='/[^/][^/]*/\.\./'
8781 # Canonicalize the path of ld
8782 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8783 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8784 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8785 done
8786 test -z "$LD" && LD="$ac_prog"
8787 ;;
8788 "")
8789 # If it fails, then pretend we aren't using GCC.
8790 ac_prog=ld
8791 ;;
8792 *)
8793 # If it is relative, then search for the first ld in PATH.
8794 with_gnu_ld=unknown
8795 ;;
8796 esac
8797elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8799$as_echo_n "checking for GNU ld... " >&6; }
3841debe 8800else
81ecdfbb
RW
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8802$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 8803fi
81ecdfbb
RW
8804if test "${acl_cv_path_LD+set}" = set; then :
8805 $as_echo_n "(cached) " >&6
3841debe
DJ
8806else
8807 if test -z "$LD"; then
8808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8809 for ac_dir in $PATH; do
8810 test -z "$ac_dir" && ac_dir=.
8811 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8812 acl_cv_path_LD="$ac_dir/$ac_prog"
8813 # Check to see if the program is GNU ld. I'd rather use --version,
8814 # but apparently some GNU ld's only accept -v.
8815 # Break only if it was the GNU/non-GNU ld that we prefer.
8816 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8817 test "$with_gnu_ld" != no && break
8818 else
8819 test "$with_gnu_ld" != yes && break
8820 fi
8821 fi
8822 done
8823 IFS="$ac_save_ifs"
8824else
8825 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8826fi
8827fi
8828
8829LD="$acl_cv_path_LD"
8830if test -n "$LD"; then
81ecdfbb
RW
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8832$as_echo "$LD" >&6; }
3841debe 8833else
81ecdfbb
RW
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
3841debe 8836fi
81ecdfbb
RW
8837test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8839$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8840if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8841 $as_echo_n "(cached) " >&6
3841debe
DJ
8842else
8843 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8844if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8845 acl_cv_prog_gnu_ld=yes
8846else
8847 acl_cv_prog_gnu_ld=no
8848fi
8849fi
81ecdfbb
RW
8850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8851$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
8852with_gnu_ld=$acl_cv_prog_gnu_ld
8853
8854
8855
81ecdfbb
RW
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8857$as_echo_n "checking for shared library run path origin... " >&6; }
8858if test "${acl_cv_rpath+set}" = set; then :
8859 $as_echo_n "(cached) " >&6
3841debe
DJ
8860else
8861
8862 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8863 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8864 . ./conftest.sh
8865 rm -f ./conftest.sh
8866 acl_cv_rpath=done
8867
8868fi
81ecdfbb
RW
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8870$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
8871 wl="$acl_cv_wl"
8872 libext="$acl_cv_libext"
8873 shlibext="$acl_cv_shlibext"
8874 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8875 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8876 hardcode_direct="$acl_cv_hardcode_direct"
8877 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
8878 # Check whether --enable-rpath was given.
8879if test "${enable_rpath+set}" = set; then :
8880 enableval=$enable_rpath; :
3841debe
DJ
8881else
8882 enable_rpath=yes
81ecdfbb
RW
8883fi
8884
3841debe
DJ
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894 use_additional=yes
8895
8896 acl_save_prefix="$prefix"
8897 prefix="$acl_final_prefix"
8898 acl_save_exec_prefix="$exec_prefix"
8899 exec_prefix="$acl_final_exec_prefix"
8900
8901 eval additional_includedir=\"$includedir\"
8902 eval additional_libdir=\"$libdir\"
8903
8904 exec_prefix="$acl_save_exec_prefix"
8905 prefix="$acl_save_prefix"
8906
8907
81ecdfbb
RW
8908# Check whether --with-libexpat-prefix was given.
8909if test "${with_libexpat_prefix+set}" = set; then :
8910 withval=$with_libexpat_prefix;
3841debe
DJ
8911 if test "X$withval" = "Xno"; then
8912 use_additional=no
8913 else
8914 if test "X$withval" = "X"; then
8915
8916 acl_save_prefix="$prefix"
8917 prefix="$acl_final_prefix"
8918 acl_save_exec_prefix="$exec_prefix"
8919 exec_prefix="$acl_final_exec_prefix"
8920
8921 eval additional_includedir=\"$includedir\"
8922 eval additional_libdir=\"$libdir\"
8923
8924 exec_prefix="$acl_save_exec_prefix"
8925 prefix="$acl_save_prefix"
8926
8927 else
8928 additional_includedir="$withval/include"
8929 additional_libdir="$withval/lib"
8930 fi
8931 fi
8932
81ecdfbb
RW
8933fi
8934
3841debe
DJ
8935 LIBEXPAT=
8936 LTLIBEXPAT=
8937 INCEXPAT=
8938 rpathdirs=
8939 ltrpathdirs=
8940 names_already_handled=
8941 names_next_round='expat '
8942 while test -n "$names_next_round"; do
8943 names_this_round="$names_next_round"
8944 names_next_round=
8945 for name in $names_this_round; do
8946 already_handled=
8947 for n in $names_already_handled; do
8948 if test "$n" = "$name"; then
8949 already_handled=yes
8950 break
8951 fi
8952 done
8953 if test -z "$already_handled"; then
8954 names_already_handled="$names_already_handled $name"
8955 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8956 eval value=\"\$HAVE_LIB$uppername\"
8957 if test -n "$value"; then
8958 if test "$value" = yes; then
8959 eval value=\"\$LIB$uppername\"
8960 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8961 eval value=\"\$LTLIB$uppername\"
8962 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8963 else
8964 :
8965 fi
8966 else
8967 found_dir=
8968 found_la=
8969 found_so=
8970 found_a=
8971 if test $use_additional = yes; then
8972 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8973 found_dir="$additional_libdir"
8974 found_so="$additional_libdir/lib$name.$shlibext"
8975 if test -f "$additional_libdir/lib$name.la"; then
8976 found_la="$additional_libdir/lib$name.la"
8977 fi
8978 else
8979 if test -f "$additional_libdir/lib$name.$libext"; then
8980 found_dir="$additional_libdir"
8981 found_a="$additional_libdir/lib$name.$libext"
8982 if test -f "$additional_libdir/lib$name.la"; then
8983 found_la="$additional_libdir/lib$name.la"
8984 fi
8985 fi
8986 fi
8987 fi
8988 if test "X$found_dir" = "X"; then
8989 for x in $LDFLAGS $LTLIBEXPAT; do
8990
8991 acl_save_prefix="$prefix"
8992 prefix="$acl_final_prefix"
8993 acl_save_exec_prefix="$exec_prefix"
8994 exec_prefix="$acl_final_exec_prefix"
8995 eval x=\"$x\"
8996 exec_prefix="$acl_save_exec_prefix"
8997 prefix="$acl_save_prefix"
8998
8999 case "$x" in
9000 -L*)
9001 dir=`echo "X$x" | sed -e 's/^X-L//'`
9002 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9003 found_dir="$dir"
9004 found_so="$dir/lib$name.$shlibext"
9005 if test -f "$dir/lib$name.la"; then
9006 found_la="$dir/lib$name.la"
9007 fi
9008 else
9009 if test -f "$dir/lib$name.$libext"; then
9010 found_dir="$dir"
9011 found_a="$dir/lib$name.$libext"
9012 if test -f "$dir/lib$name.la"; then
9013 found_la="$dir/lib$name.la"
9014 fi
9015 fi
9016 fi
9017 ;;
9018 esac
9019 if test "X$found_dir" != "X"; then
9020 break
9021 fi
9022 done
9023 fi
9024 if test "X$found_dir" != "X"; then
9025 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9026 if test "X$found_so" != "X"; then
9027 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9028 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9029 else
9030 haveit=
9031 for x in $ltrpathdirs; do
9032 if test "X$x" = "X$found_dir"; then
9033 haveit=yes
9034 break
9035 fi
9036 done
9037 if test -z "$haveit"; then
9038 ltrpathdirs="$ltrpathdirs $found_dir"
9039 fi
9040 if test "$hardcode_direct" = yes; then
9041 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9042 else
9043 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9044 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9045 haveit=
9046 for x in $rpathdirs; do
9047 if test "X$x" = "X$found_dir"; then
9048 haveit=yes
9049 break
9050 fi
9051 done
9052 if test -z "$haveit"; then
9053 rpathdirs="$rpathdirs $found_dir"
9054 fi
9055 else
9056 haveit=
9057 for x in $LDFLAGS $LIBEXPAT; do
9058
9059 acl_save_prefix="$prefix"
9060 prefix="$acl_final_prefix"
9061 acl_save_exec_prefix="$exec_prefix"
9062 exec_prefix="$acl_final_exec_prefix"
9063 eval x=\"$x\"
9064 exec_prefix="$acl_save_exec_prefix"
9065 prefix="$acl_save_prefix"
9066
9067 if test "X$x" = "X-L$found_dir"; then
9068 haveit=yes
9069 break
9070 fi
9071 done
9072 if test -z "$haveit"; then
9073 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9074 fi
9075 if test "$hardcode_minus_L" != no; then
9076 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9077 else
9078 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9079 fi
9080 fi
9081 fi
9082 fi
9083 else
9084 if test "X$found_a" != "X"; then
9085 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9086 else
9087 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9088 fi
9089 fi
9090 additional_includedir=
9091 case "$found_dir" in
9092 */lib | */lib/)
9093 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9094 additional_includedir="$basedir/include"
9095 ;;
9096 esac
9097 if test "X$additional_includedir" != "X"; then
9098 if test "X$additional_includedir" != "X/usr/include"; then
9099 haveit=
9100 if test "X$additional_includedir" = "X/usr/local/include"; then
9101 if test -n "$GCC"; then
9102 case $host_os in
9103 linux*) haveit=yes;;
9104 esac
9105 fi
9106 fi
9107 if test -z "$haveit"; then
9108 for x in $CPPFLAGS $INCEXPAT; do
9109
9110 acl_save_prefix="$prefix"
9111 prefix="$acl_final_prefix"
9112 acl_save_exec_prefix="$exec_prefix"
9113 exec_prefix="$acl_final_exec_prefix"
9114 eval x=\"$x\"
9115 exec_prefix="$acl_save_exec_prefix"
9116 prefix="$acl_save_prefix"
9117
9118 if test "X$x" = "X-I$additional_includedir"; then
9119 haveit=yes
9120 break
9121 fi
9122 done
9123 if test -z "$haveit"; then
9124 if test -d "$additional_includedir"; then
9125 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9126 fi
9127 fi
9128 fi
9129 fi
9130 fi
9131 if test -n "$found_la"; then
9132 save_libdir="$libdir"
9133 case "$found_la" in
9134 */* | *\\*) . "$found_la" ;;
9135 *) . "./$found_la" ;;
9136 esac
9137 libdir="$save_libdir"
9138 for dep in $dependency_libs; do
9139 case "$dep" in
9140 -L*)
9141 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9142 if test "X$additional_libdir" != "X/usr/lib"; then
9143 haveit=
9144 if test "X$additional_libdir" = "X/usr/local/lib"; then
9145 if test -n "$GCC"; then
9146 case $host_os in
9147 linux*) haveit=yes;;
9148 esac
9149 fi
9150 fi
9151 if test -z "$haveit"; then
9152 haveit=
9153 for x in $LDFLAGS $LIBEXPAT; do
9154
9155 acl_save_prefix="$prefix"
9156 prefix="$acl_final_prefix"
9157 acl_save_exec_prefix="$exec_prefix"
9158 exec_prefix="$acl_final_exec_prefix"
9159 eval x=\"$x\"
9160 exec_prefix="$acl_save_exec_prefix"
9161 prefix="$acl_save_prefix"
9162
9163 if test "X$x" = "X-L$additional_libdir"; then
9164 haveit=yes
9165 break
9166 fi
9167 done
9168 if test -z "$haveit"; then
9169 if test -d "$additional_libdir"; then
9170 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9171 fi
9172 fi
9173 haveit=
9174 for x in $LDFLAGS $LTLIBEXPAT; do
9175
9176 acl_save_prefix="$prefix"
9177 prefix="$acl_final_prefix"
9178 acl_save_exec_prefix="$exec_prefix"
9179 exec_prefix="$acl_final_exec_prefix"
9180 eval x=\"$x\"
9181 exec_prefix="$acl_save_exec_prefix"
9182 prefix="$acl_save_prefix"
9183
9184 if test "X$x" = "X-L$additional_libdir"; then
9185 haveit=yes
9186 break
9187 fi
9188 done
9189 if test -z "$haveit"; then
9190 if test -d "$additional_libdir"; then
9191 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9192 fi
9193 fi
9194 fi
9195 fi
9196 ;;
9197 -R*)
9198 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9199 if test "$enable_rpath" != no; then
9200 haveit=
9201 for x in $rpathdirs; do
9202 if test "X$x" = "X$dir"; then
9203 haveit=yes
9204 break
9205 fi
9206 done
9207 if test -z "$haveit"; then
9208 rpathdirs="$rpathdirs $dir"
9209 fi
9210 haveit=
9211 for x in $ltrpathdirs; do
9212 if test "X$x" = "X$dir"; then
9213 haveit=yes
9214 break
9215 fi
9216 done
9217 if test -z "$haveit"; then
9218 ltrpathdirs="$ltrpathdirs $dir"
9219 fi
9220 fi
9221 ;;
9222 -l*)
9223 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9224 ;;
9225 *.la)
9226 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9227 ;;
9228 *)
9229 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9230 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9231 ;;
81ecdfbb
RW
9232 esac
9233 done
9234 fi
9235 else
9236 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9237 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9238 fi
9239 fi
9240 fi
9241 done
9242 done
9243 if test "X$rpathdirs" != "X"; then
9244 if test -n "$hardcode_libdir_separator"; then
9245 alldirs=
9246 for found_dir in $rpathdirs; do
9247 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9248 done
9249 acl_save_libdir="$libdir"
9250 libdir="$alldirs"
9251 eval flag=\"$hardcode_libdir_flag_spec\"
9252 libdir="$acl_save_libdir"
9253 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9254 else
9255 for found_dir in $rpathdirs; do
9256 acl_save_libdir="$libdir"
9257 libdir="$found_dir"
9258 eval flag=\"$hardcode_libdir_flag_spec\"
9259 libdir="$acl_save_libdir"
9260 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9261 done
9262 fi
9263 fi
9264 if test "X$ltrpathdirs" != "X"; then
9265 for found_dir in $ltrpathdirs; do
9266 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9267 done
9268 fi
a9322a30
TT
9269
9270
81ecdfbb 9271 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9272
81ecdfbb
RW
9273 for element in $INCEXPAT; do
9274 haveit=
9275 for x in $CPPFLAGS; do
a9322a30 9276
81ecdfbb
RW
9277 acl_save_prefix="$prefix"
9278 prefix="$acl_final_prefix"
9279 acl_save_exec_prefix="$exec_prefix"
9280 exec_prefix="$acl_final_exec_prefix"
9281 eval x=\"$x\"
9282 exec_prefix="$acl_save_exec_prefix"
9283 prefix="$acl_save_prefix"
a8111142 9284
81ecdfbb
RW
9285 if test "X$x" = "X$element"; then
9286 haveit=yes
9287 break
9288 fi
9289 done
9290 if test -z "$haveit"; then
9291 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9292 fi
9293 done
a9322a30
TT
9294
9295
81ecdfbb
RW
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9297$as_echo_n "checking for libexpat... " >&6; }
9298if test "${ac_cv_libexpat+set}" = set; then :
9299 $as_echo_n "(cached) " >&6
bec39cab 9300else
bec39cab 9301
81ecdfbb
RW
9302 ac_save_LIBS="$LIBS"
9303 LIBS="$LIBS $LIBEXPAT"
9304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9305/* end confdefs.h. */
81ecdfbb
RW
9306#include "expat.h"
9307int
9308main ()
9309{
9310XML_Parser p = XML_ParserCreate (0);
9311 ;
9312 return 0;
9313}
bec39cab 9314_ACEOF
81ecdfbb
RW
9315if ac_fn_c_try_link "$LINENO"; then :
9316 ac_cv_libexpat=yes
c906108c 9317else
81ecdfbb 9318 ac_cv_libexpat=no
bec39cab 9319fi
81ecdfbb
RW
9320rm -f core conftest.err conftest.$ac_objext \
9321 conftest$ac_exeext conftest.$ac_ext
9322 LIBS="$ac_save_LIBS"
c906108c 9323
95ca63c4 9324fi
81ecdfbb
RW
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9326$as_echo "$ac_cv_libexpat" >&6; }
9327 if test "$ac_cv_libexpat" = yes; then
9328 HAVE_LIBEXPAT=yes
bec39cab 9329
81ecdfbb 9330$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9331
81ecdfbb
RW
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9333$as_echo_n "checking how to link with libexpat... " >&6; }
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9335$as_echo "$LIBEXPAT" >&6; }
9336 else
9337 HAVE_LIBEXPAT=no
9338 CPPFLAGS="$ac_save_CPPFLAGS"
9339 LIBEXPAT=
9340 LTLIBEXPAT=
9341 fi
95ca63c4
CF
9342
9343
9344
7cb9022a
MK
9345
9346
bec39cab 9347
81ecdfbb
RW
9348 if test "$HAVE_LIBEXPAT" != yes; then
9349 if test "$with_expat" = yes; then
9350 as_fn_error "expat is missing or unusable" "$LINENO" 5
9351 else
9352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9353$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9354 fi
9355 else
9356 save_LIBS=$LIBS
9357 LIBS="$LIBS $LIBEXPAT"
9358 for ac_func in XML_StopParser
9359do :
9360 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9361if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9362 cat >>confdefs.h <<_ACEOF
81ecdfbb 9363#define HAVE_XML_STOPPARSER 1
bec39cab 9364_ACEOF
95ca63c4 9365
bec39cab 9366fi
bec39cab 9367done
95ca63c4 9368
81ecdfbb
RW
9369 LIBS=$save_LIBS
9370 fi
a9322a30
TT
9371fi
9372
a9322a30 9373
a9322a30
TT
9374
9375
81ecdfbb
RW
9376# Check whether --with-python was given.
9377if test "${with_python+set}" = set; then :
9378 withval=$with_python;
bec39cab 9379else
81ecdfbb 9380 with_python=auto
bec39cab 9381fi
bec39cab 9382
81ecdfbb
RW
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9384$as_echo_n "checking whether to use python... " >&6; }
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9386$as_echo "$with_python" >&6; }
9a156167 9387
81ecdfbb
RW
9388if test "${with_python}" = no; then
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9390$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9391 have_libpython=no
bec39cab 9392else
81ecdfbb
RW
9393 case "${with_python}" in
9394 yes | auto)
9395 # Leave as empty, use defaults.
9396 python_includes=
9397 python_libs=
9398 ;;
9399 /*)
9400 python_includes="-I${with_python}/include"
9401 python_libs="-L${with_python}/lib"
9402 ;;
9403 *)
9404 as_fn_error "invalid value for --with-python" "$LINENO" 5
9405 ;;
9406 esac
9407
9408 save_CPPFLAGS=$CPPFLAGS
9409 CPPFLAGS="$CPPFLAGS ${python_includes}"
9410 save_LIBS=$LIBS
9411 LIBS="$LIBS ${python_libs}"
9412 have_libpython=no
9413 if test "${have_libpython}" = no; then
bec39cab 9414
81ecdfbb 9415 version=python2.6
bec39cab 9416
81ecdfbb
RW
9417
9418 HAVE_LIBPYTHON2_6=no
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9420$as_echo_n "checking for ${version}... " >&6; }
9421 save_LIBS=$LIBS
9422 LIBS="$LIBS -l${version}"
9423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9424/* end confdefs.h. */
81ecdfbb
RW
9425#include "${version}/Python.h"
9426int
9427main ()
9428{
9429Py_Initialize ();
9430 ;
9431 return 0;
9432}
bec39cab 9433_ACEOF
81ecdfbb
RW
9434if ac_fn_c_try_link "$LINENO"; then :
9435 HAVE_LIBPYTHON2_6=yes
9436 have_libpython=yes
bec39cab 9437else
81ecdfbb 9438 LIBS=$save_LIBS
9a156167 9439fi
81ecdfbb
RW
9440rm -f core conftest.err conftest.$ac_objext \
9441 conftest$ac_exeext conftest.$ac_ext
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_6" >&5
9443$as_echo "$HAVE_LIBPYTHON2_6" >&6; }
9a156167 9444
81ecdfbb 9445 if test "${HAVE_LIBPYTHON2_6}" = yes; then
9a156167 9446
81ecdfbb 9447$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9a156167 9448
81ecdfbb
RW
9449 fi
9450 fi
9451 if test ${have_libpython} = no; then
9a156167 9452
81ecdfbb 9453 version=python2.5
9a156167 9454
9a156167 9455
81ecdfbb
RW
9456 HAVE_LIBPYTHON2_5=no
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9458$as_echo_n "checking for ${version}... " >&6; }
9459 save_LIBS=$LIBS
9460 LIBS="$LIBS -l${version}"
9461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9462/* end confdefs.h. */
81ecdfbb
RW
9463#include "${version}/Python.h"
9464int
9465main ()
9466{
9467Py_Initialize ();
9468 ;
9469 return 0;
9470}
436868fb 9471_ACEOF
81ecdfbb
RW
9472if ac_fn_c_try_link "$LINENO"; then :
9473 HAVE_LIBPYTHON2_5=yes
9474 have_libpython=yes
436868fb 9475else
81ecdfbb 9476 LIBS=$save_LIBS
436868fb 9477fi
81ecdfbb
RW
9478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_5" >&5
9481$as_echo "$HAVE_LIBPYTHON2_5" >&6; }
436868fb 9482
81ecdfbb 9483 if test "${HAVE_LIBPYTHON2_5}" = yes; then
a9322a30 9484
81ecdfbb 9485$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
a9322a30 9486
81ecdfbb
RW
9487 fi
9488 fi
9489 if test ${have_libpython} = no; then
a9322a30 9490
81ecdfbb 9491 version=python2.4
a9322a30 9492
81ecdfbb
RW
9493
9494 HAVE_LIBPYTHON2_4=no
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9496$as_echo_n "checking for ${version}... " >&6; }
9497 save_LIBS=$LIBS
9498 LIBS="$LIBS -l${version}"
9499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9500/* end confdefs.h. */
81ecdfbb 9501#include "${version}/Python.h"
a9322a30
TT
9502int
9503main ()
9504{
81ecdfbb 9505Py_Initialize ();
a9322a30
TT
9506 ;
9507 return 0;
9508}
436868fb 9509_ACEOF
81ecdfbb
RW
9510if ac_fn_c_try_link "$LINENO"; then :
9511 HAVE_LIBPYTHON2_4=yes
9512 have_libpython=yes
436868fb 9513else
81ecdfbb 9514 LIBS=$save_LIBS
436868fb 9515fi
81ecdfbb
RW
9516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_4" >&5
9519$as_echo "$HAVE_LIBPYTHON2_4" >&6; }
9520
9521 if test "${HAVE_LIBPYTHON2_4}" = yes; then
9522
9523$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9524
9525 fi
9526 fi
9527 if test ${have_libpython} = no; then
9528 case "${with_python}" in
9529 yes)
9530 as_fn_error "python is missing or unusable" "$LINENO" 5
9531 ;;
9532 auto)
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9534$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9535 ;;
9536 *)
9537 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9538 ;;
9539 esac
9540 CPPFLAGS=$save_CPPFLAGS
9541 LIBS=$save_LIBS
9542 fi
436868fb 9543fi
436868fb 9544
81ecdfbb 9545if test "${have_libpython}" = yes; then
436868fb 9546
81ecdfbb 9547$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9548
81ecdfbb
RW
9549 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9550 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9551 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
9552 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9553
81ecdfbb
RW
9554 # Flags needed to compile Python code (taken from python-config --cflags).
9555 # We cannot call python-config directly because it will output whatever was
9556 # used when compiling the Python interpreter itself, including flags which
9557 # would make the python-related objects be compiled differently from the
9558 # rest of GDB (e.g., -O2 and -fPIC).
9559 if test "${GCC}" = yes; then
9560 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9561 fi
436868fb 9562
81ecdfbb
RW
9563 if test "x${tentative_python_cflags}" != x; then
9564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9565$as_echo_n "checking compiler flags for python code... " >&6; }
9566 for flag in ${tentative_python_cflags}; do
9567 # Check that the compiler accepts it
9568 saved_CFLAGS="$CFLAGS"
9569 CFLAGS="$CFLAGS $flag"
9570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9571/* end confdefs.h. */
81ecdfbb 9572
a9322a30
TT
9573int
9574main ()
9575{
a9322a30
TT
9576
9577 ;
9578 return 0;
9579}
bec39cab 9580_ACEOF
81ecdfbb
RW
9581if ac_fn_c_try_compile "$LINENO"; then :
9582 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9583fi
81ecdfbb
RW
9584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9585 CFLAGS="$saved_CFLAGS"
9586 done
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9588$as_echo "${PYTHON_CFLAGS}" >&6; }
9589 fi
9590else
9591 # Even if Python support is not compiled in, we need to have these files
9592 # included in order to recognize the GDB command "python".
2c9e3c69
JB
9593 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o"
9594 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c python/py-prettyprint.c"
a9322a30 9595fi
9a156167 9596
9a156167 9597
81ecdfbb
RW
9598# ------------------------- #
9599# Checks for header files. #
9600# ------------------------- #
c890192f 9601
81ecdfbb
RW
9602ac_header_dirent=no
9603for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9604 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9606$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9607if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
9608 $as_echo_n "(cached) " >&6
bec39cab 9609else
81ecdfbb 9610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9611/* end confdefs.h. */
81ecdfbb
RW
9612#include <sys/types.h>
9613#include <$ac_hdr>
9614
a9322a30
TT
9615int
9616main ()
9617{
81ecdfbb
RW
9618if ((DIR *) 0)
9619return 0;
a9322a30
TT
9620 ;
9621 return 0;
9622}
bec39cab 9623_ACEOF
81ecdfbb
RW
9624if ac_fn_c_try_compile "$LINENO"; then :
9625 eval "$as_ac_Header=yes"
bec39cab 9626else
81ecdfbb 9627 eval "$as_ac_Header=no"
bec39cab 9628fi
81ecdfbb 9629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9630fi
81ecdfbb
RW
9631eval ac_res=\$$as_ac_Header
9632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9633$as_echo "$ac_res" >&6; }
9634eval as_val=\$$as_ac_Header
9635 if test "x$as_val" = x""yes; then :
9636 cat >>confdefs.h <<_ACEOF
9637#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 9638_ACEOF
bec39cab 9639
81ecdfbb
RW
9640ac_header_dirent=$ac_hdr; break
9641fi
bec39cab 9642
81ecdfbb
RW
9643done
9644# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9645if test $ac_header_dirent = dirent.h; then
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9647$as_echo_n "checking for library containing opendir... " >&6; }
9648if test "${ac_cv_search_opendir+set}" = set; then :
9649 $as_echo_n "(cached) " >&6
c890192f 9650else
81ecdfbb
RW
9651 ac_func_search_save_LIBS=$LIBS
9652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9653/* end confdefs.h. */
9654
9655/* Override any GCC internal prototype to avoid an error.
9656 Use char because int might match the return type of a GCC
9657 builtin and then its argument prototype would still apply. */
9658#ifdef __cplusplus
9659extern "C"
9660#endif
9661char opendir ();
9662int
9663main ()
9664{
9665return opendir ();
9666 ;
9667 return 0;
9668}
bec39cab 9669_ACEOF
81ecdfbb
RW
9670for ac_lib in '' dir; do
9671 if test -z "$ac_lib"; then
9672 ac_res="none required"
9673 else
9674 ac_res=-l$ac_lib
9675 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9676 fi
9677 if ac_fn_c_try_link "$LINENO"; then :
9678 ac_cv_search_opendir=$ac_res
9679fi
9680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext
9682 if test "${ac_cv_search_opendir+set}" = set; then :
9683 break
9684fi
9685done
9686if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 9687
81ecdfbb
RW
9688else
9689 ac_cv_search_opendir=no
9690fi
9691rm conftest.$ac_ext
9692LIBS=$ac_func_search_save_LIBS
9693fi
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9695$as_echo "$ac_cv_search_opendir" >&6; }
9696ac_res=$ac_cv_search_opendir
9697if test "$ac_res" != no; then :
9698 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9699
bec39cab 9700fi
81ecdfbb 9701
bec39cab 9702else
81ecdfbb
RW
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9704$as_echo_n "checking for library containing opendir... " >&6; }
9705if test "${ac_cv_search_opendir+set}" = set; then :
9706 $as_echo_n "(cached) " >&6
9707else
9708 ac_func_search_save_LIBS=$LIBS
9709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9710/* end confdefs.h. */
81ecdfbb
RW
9711
9712/* Override any GCC internal prototype to avoid an error.
9713 Use char because int might match the return type of a GCC
9714 builtin and then its argument prototype would still apply. */
9715#ifdef __cplusplus
9716extern "C"
9717#endif
9718char opendir ();
a9322a30
TT
9719int
9720main ()
9721{
81ecdfbb 9722return opendir ();
a9322a30
TT
9723 ;
9724 return 0;
9725}
bec39cab 9726_ACEOF
81ecdfbb
RW
9727for ac_lib in '' x; do
9728 if test -z "$ac_lib"; then
9729 ac_res="none required"
9730 else
9731 ac_res=-l$ac_lib
9732 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9733 fi
9734 if ac_fn_c_try_link "$LINENO"; then :
9735 ac_cv_search_opendir=$ac_res
9736fi
9737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext
9739 if test "${ac_cv_search_opendir+set}" = set; then :
9740 break
9741fi
9742done
9743if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 9744
81ecdfbb
RW
9745else
9746 ac_cv_search_opendir=no
bec39cab 9747fi
81ecdfbb
RW
9748rm conftest.$ac_ext
9749LIBS=$ac_func_search_save_LIBS
a9322a30 9750fi
81ecdfbb
RW
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9752$as_echo "$ac_cv_search_opendir" >&6; }
9753ac_res=$ac_cv_search_opendir
9754if test "$ac_res" != no; then :
9755 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9756
81ecdfbb 9757fi
bec39cab 9758
81ecdfbb 9759fi
bec39cab 9760
81ecdfbb
RW
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9762$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9763if test "${ac_cv_header_stat_broken+set}" = set; then :
9764 $as_echo_n "(cached) " >&6
9a156167 9765else
81ecdfbb
RW
9766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767/* end confdefs.h. */
9768#include <sys/types.h>
9769#include <sys/stat.h>
9770
9771#if defined S_ISBLK && defined S_IFDIR
9772extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9773#endif
9774
9775#if defined S_ISBLK && defined S_IFCHR
9776extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9777#endif
9778
9779#if defined S_ISLNK && defined S_IFREG
9780extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9781#endif
9782
9783#if defined S_ISSOCK && defined S_IFREG
9784extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9785#endif
9786
bec39cab 9787_ACEOF
81ecdfbb
RW
9788if ac_fn_c_try_compile "$LINENO"; then :
9789 ac_cv_header_stat_broken=no
9790else
9791 ac_cv_header_stat_broken=yes
9792fi
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794fi
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9796$as_echo "$ac_cv_header_stat_broken" >&6; }
9797if test $ac_cv_header_stat_broken = yes; then
9a156167 9798
81ecdfbb 9799$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 9800
bec39cab 9801fi
81ecdfbb
RW
9802
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9804$as_echo_n "checking for ANSI C header files... " >&6; }
9805if test "${ac_cv_header_stdc+set}" = set; then :
9806 $as_echo_n "(cached) " >&6
bec39cab 9807else
81ecdfbb 9808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9809/* end confdefs.h. */
81ecdfbb
RW
9810#include <stdlib.h>
9811#include <stdarg.h>
9812#include <string.h>
9813#include <float.h>
9814
a9322a30
TT
9815int
9816main ()
9817{
a9322a30
TT
9818
9819 ;
9820 return 0;
9821}
bec39cab 9822_ACEOF
81ecdfbb
RW
9823if ac_fn_c_try_compile "$LINENO"; then :
9824 ac_cv_header_stdc=yes
bec39cab 9825else
81ecdfbb 9826 ac_cv_header_stdc=no
a9322a30 9827fi
81ecdfbb 9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9829
81ecdfbb
RW
9830if test $ac_cv_header_stdc = yes; then
9831 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833/* end confdefs.h. */
9834#include <string.h>
bec39cab 9835
81ecdfbb
RW
9836_ACEOF
9837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9838 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9839
bec39cab 9840else
81ecdfbb
RW
9841 ac_cv_header_stdc=no
9842fi
9843rm -f conftest*
9844
9845fi
9846
9847if test $ac_cv_header_stdc = yes; then
9848 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850/* end confdefs.h. */
9851#include <stdlib.h>
9852
bec39cab 9853_ACEOF
81ecdfbb
RW
9854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9855 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9856
81ecdfbb
RW
9857else
9858 ac_cv_header_stdc=no
9859fi
9860rm -f conftest*
bec39cab 9861
bec39cab 9862fi
81ecdfbb
RW
9863
9864if test $ac_cv_header_stdc = yes; then
9865 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9866 if test "$cross_compiling" = yes; then :
9867 :
bec39cab 9868else
81ecdfbb 9869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9870/* end confdefs.h. */
81ecdfbb
RW
9871#include <ctype.h>
9872#include <stdlib.h>
9873#if ((' ' & 0x0FF) == 0x020)
9874# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9875# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9876#else
9877# define ISLOWER(c) \
9878 (('a' <= (c) && (c) <= 'i') \
9879 || ('j' <= (c) && (c) <= 'r') \
9880 || ('s' <= (c) && (c) <= 'z'))
9881# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9882#endif
9883
9884#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9885int
9886main ()
9887{
81ecdfbb
RW
9888 int i;
9889 for (i = 0; i < 256; i++)
9890 if (XOR (islower (i), ISLOWER (i))
9891 || toupper (i) != TOUPPER (i))
9892 return 2;
a9322a30
TT
9893 return 0;
9894}
bec39cab 9895_ACEOF
81ecdfbb
RW
9896if ac_fn_c_try_run "$LINENO"; then :
9897
bec39cab 9898else
81ecdfbb
RW
9899 ac_cv_header_stdc=no
9900fi
9901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9902 conftest.$ac_objext conftest.beam conftest.$ac_ext
9903fi
bec39cab 9904
bec39cab 9905fi
a9322a30 9906fi
81ecdfbb
RW
9907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9908$as_echo "$ac_cv_header_stdc" >&6; }
9909if test $ac_cv_header_stdc = yes; then
bec39cab 9910
81ecdfbb 9911$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9912
81ecdfbb 9913fi
bec39cab 9914
81ecdfbb
RW
9915# elf_hp.h is for HP/UX 64-bit shared library support.
9916# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
9917# unconditionally, so what's the point in checking these?
9918for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9919 thread_db.h gnu/libc-version.h signal.h stddef.h \
9920 stdlib.h string.h memory.h strings.h sys/fault.h \
9921 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9922 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9923 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9924 sys/types.h sys/wait.h wait.h termios.h termio.h \
9925 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
9926do :
9927 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9928ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9929eval as_val=\$$as_ac_Header
9930 if test "x$as_val" = x""yes; then :
bec39cab 9931 cat >>confdefs.h <<_ACEOF
81ecdfbb 9932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9933_ACEOF
c906108c 9934
bec39cab 9935fi
81ecdfbb
RW
9936
9937done
9938
9939for ac_header in link.h
9940do :
9941 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
9942# include <sys/types.h>
9943#endif
9944#if HAVE_NLIST_H
9945# include <nlist.h>
a9322a30
TT
9946#endif
9947
81ecdfbb
RW
9948"
9949if test "x$ac_cv_header_link_h" = x""yes; then :
9950 cat >>confdefs.h <<_ACEOF
9951#define HAVE_LINK_H 1
bec39cab 9952_ACEOF
bec39cab 9953
a9322a30 9954fi
bec39cab 9955
81ecdfbb 9956done
c906108c 9957
81ecdfbb
RW
9958for ac_header in sys/proc.h
9959do :
9960 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9961# include <sys/param.h>
9962#endif
c906108c 9963
81ecdfbb
RW
9964"
9965if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9966 cat >>confdefs.h <<_ACEOF
81ecdfbb 9967#define HAVE_SYS_PROC_H 1
bec39cab 9968_ACEOF
5ee754fc 9969
bec39cab 9970fi
81ecdfbb
RW
9971
9972done
9973
9974for ac_header in sys/user.h
9975do :
9976 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9977# include <sys/param.h>
a9322a30
TT
9978#endif
9979
81ecdfbb
RW
9980"
9981if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9982 cat >>confdefs.h <<_ACEOF
9983#define HAVE_SYS_USER_H 1
bec39cab 9984_ACEOF
bec39cab 9985
a9322a30 9986fi
bec39cab 9987
81ecdfbb 9988done
5ee754fc 9989
5ee754fc 9990
81ecdfbb
RW
9991# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9992# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9993# think that we don't have <curses.h> if we're using GCC.
9994case $host_os in
9995 solaris2.[789])
9996 if test "$GCC" = yes; then
9997
9998$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9999
10000 fi ;;
10001esac
10002for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10003do :
10004 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10005ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10006eval as_val=\$$as_ac_Header
10007 if test "x$as_val" = x""yes; then :
bec39cab 10008 cat >>confdefs.h <<_ACEOF
81ecdfbb 10009#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10010_ACEOF
5ee754fc
MK
10011
10012fi
10013
81ecdfbb 10014done
bec39cab 10015
81ecdfbb
RW
10016for ac_header in term.h
10017do :
10018 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10019# include <curses.h>
10020#endif
bec39cab 10021
81ecdfbb
RW
10022"
10023if test "x$ac_cv_header_term_h" = x""yes; then :
10024 cat >>confdefs.h <<_ACEOF
10025#define HAVE_TERM_H 1
a8111142 10026_ACEOF
a8111142 10027
a8111142 10028fi
a8111142 10029
81ecdfbb 10030done
a8111142
TT
10031
10032
81ecdfbb
RW
10033# ------------------------- #
10034# Checks for declarations. #
10035# ------------------------- #
a9322a30 10036
81ecdfbb
RW
10037ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10038if test "x$ac_cv_have_decl_free" = x""yes; then :
10039 ac_have_decl=1
bec39cab 10040else
81ecdfbb
RW
10041 ac_have_decl=0
10042fi
10043
10044cat >>confdefs.h <<_ACEOF
10045#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10046_ACEOF
81ecdfbb
RW
10047ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10048if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10049 ac_have_decl=1
10050else
10051 ac_have_decl=0
10052fi
10053
10054cat >>confdefs.h <<_ACEOF
10055#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10056_ACEOF
81ecdfbb
RW
10057ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10058if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10059 ac_have_decl=1
bec39cab 10060else
81ecdfbb
RW
10061 ac_have_decl=0
10062fi
bec39cab 10063
81ecdfbb
RW
10064cat >>confdefs.h <<_ACEOF
10065#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10066_ACEOF
81ecdfbb
RW
10067ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10068if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10069 ac_have_decl=1
10070else
10071 ac_have_decl=0
10072fi
10073
10074cat >>confdefs.h <<_ACEOF
10075#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 10076_ACEOF
81ecdfbb
RW
10077ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10078if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10079 ac_have_decl=1
bec39cab 10080else
81ecdfbb
RW
10081 ac_have_decl=0
10082fi
5ee754fc 10083
81ecdfbb
RW
10084cat >>confdefs.h <<_ACEOF
10085#define HAVE_DECL_STRSTR $ac_have_decl
10086_ACEOF
10087ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
10088if test "x$ac_cv_have_decl_getopt" = x""yes; then :
10089 ac_have_decl=1
10090else
10091 ac_have_decl=0
5ee754fc 10092fi
81ecdfbb
RW
10093
10094cat >>confdefs.h <<_ACEOF
10095#define HAVE_DECL_GETOPT $ac_have_decl
10096_ACEOF
10097ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10098if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10099 ac_have_decl=1
10100else
10101 ac_have_decl=0
5ee754fc 10102fi
81ecdfbb
RW
10103
10104cat >>confdefs.h <<_ACEOF
10105#define HAVE_DECL_SNPRINTF $ac_have_decl
10106_ACEOF
10107ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10108if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10109 ac_have_decl=1
10110else
10111 ac_have_decl=0
5ee754fc
MK
10112fi
10113
a9322a30 10114cat >>confdefs.h <<_ACEOF
81ecdfbb 10115#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 10116_ACEOF
5ee754fc 10117
5ee754fc 10118
81ecdfbb
RW
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10120$as_echo_n "checking for LC_MESSAGES... " >&6; }
10121if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10122 $as_echo_n "(cached) " >&6
bec39cab 10123else
81ecdfbb 10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10125/* end confdefs.h. */
81ecdfbb 10126#include <locale.h>
a9322a30
TT
10127int
10128main ()
10129{
81ecdfbb 10130return LC_MESSAGES
a9322a30
TT
10131 ;
10132 return 0;
10133}
bec39cab 10134_ACEOF
81ecdfbb
RW
10135if ac_fn_c_try_link "$LINENO"; then :
10136 am_cv_val_LC_MESSAGES=yes
bec39cab 10137else
81ecdfbb
RW
10138 am_cv_val_LC_MESSAGES=no
10139fi
10140rm -f core conftest.err conftest.$ac_objext \
10141 conftest$ac_exeext conftest.$ac_ext
10142fi
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10144$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10145 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 10146
81ecdfbb
RW
10147$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
10148
10149 fi
10150
10151
10152# ----------------------- #
10153# Checks for structures. #
10154# ----------------------- #
10155
10156ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10157if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
10158
10159cat >>confdefs.h <<_ACEOF
10160#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 10161_ACEOF
7eb368b3 10162
81ecdfbb 10163
7eb368b3 10164fi
81ecdfbb
RW
10165ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10166if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 10167
a9322a30
TT
10168cat >>confdefs.h <<_ACEOF
10169#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
10170_ACEOF
10171
a9322a30 10172
7eb368b3
NR
10173fi
10174
7eb368b3 10175
a9322a30
TT
10176# ------------------ #
10177# Checks for types. #
10178# ------------------ #
7eb368b3 10179
81ecdfbb
RW
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10181$as_echo_n "checking return type of signal handlers... " >&6; }
10182if test "${ac_cv_type_signal+set}" = set; then :
10183 $as_echo_n "(cached) " >&6
bec39cab 10184else
81ecdfbb 10185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10186/* end confdefs.h. */
a9322a30
TT
10187#include <sys/types.h>
10188#include <signal.h>
7cb9022a 10189
a9322a30
TT
10190int
10191main ()
10192{
81ecdfbb 10193return *(signal (0, 0)) (0) == 1;
a9322a30
TT
10194 ;
10195 return 0;
10196}
bec39cab 10197_ACEOF
81ecdfbb
RW
10198if ac_fn_c_try_compile "$LINENO"; then :
10199 ac_cv_type_signal=int
bec39cab 10200else
81ecdfbb 10201 ac_cv_type_signal=void
bec39cab 10202fi
81ecdfbb 10203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10204fi
81ecdfbb
RW
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10206$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 10207
a9322a30
TT
10208cat >>confdefs.h <<_ACEOF
10209#define RETSIGTYPE $ac_cv_type_signal
10210_ACEOF
5ee754fc 10211
bec39cab 10212
81ecdfbb 10213ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
10214#include <sys/socket.h>
10215
81ecdfbb
RW
10216"
10217if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 10218
a9322a30
TT
10219cat >>confdefs.h <<_ACEOF
10220#define HAVE_SOCKLEN_T 1
10221_ACEOF
10222
10223
10224fi
10225
10226
10227# ------------------------------------- #
10228# Checks for compiler characteristics. #
10229# ------------------------------------- #
10230
81ecdfbb
RW
10231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10232$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10233if test "${ac_cv_c_const+set}" = set; then :
10234 $as_echo_n "(cached) " >&6
a9322a30 10235else
81ecdfbb 10236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10237/* end confdefs.h. */
a9322a30
TT
10238
10239int
10240main ()
10241{
10242/* FIXME: Include the comments suggested by Paul. */
10243#ifndef __cplusplus
10244 /* Ultrix mips cc rejects this. */
10245 typedef int charset[2];
81ecdfbb 10246 const charset cs;
a9322a30 10247 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
10248 char const *const *pcpcc;
10249 char **ppc;
a9322a30
TT
10250 /* NEC SVR4.0.2 mips cc rejects this. */
10251 struct point {int x, y;};
10252 static struct point const zero = {0,0};
10253 /* AIX XL C 1.02.0.0 rejects this.
10254 It does not let you subtract one const X* pointer from another in
10255 an arm of an if-expression whose if-part is not a constant
10256 expression */
10257 const char *g = "string";
81ecdfbb 10258 pcpcc = &g + (g ? g-g : 0);
a9322a30 10259 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
10260 ++pcpcc;
10261 ppc = (char**) pcpcc;
10262 pcpcc = (char const *const *) ppc;
a9322a30
TT
10263 { /* SCO 3.2v4 cc rejects this. */
10264 char *t;
10265 char const *s = 0 ? (char *) 0 : (char const *) 0;
10266
10267 *t++ = 0;
81ecdfbb 10268 if (s) return 0;
a9322a30
TT
10269 }
10270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10271 int x[] = {25, 17};
10272 const int *foo = &x[0];
10273 ++foo;
10274 }
10275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10276 typedef const int *iptr;
10277 iptr p = 0;
10278 ++p;
10279 }
10280 { /* AIX XL C 1.02.0.0 rejects this saying
10281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10282 struct s { int j; const int *ap[3]; };
10283 struct s *b; b->j = 5;
10284 }
10285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10286 const int foo = 10;
81ecdfbb 10287 if (!foo) return 0;
a9322a30 10288 }
81ecdfbb 10289 return !cs[0] && !zero.x;
a9322a30
TT
10290#endif
10291
10292 ;
10293 return 0;
10294}
bec39cab 10295_ACEOF
81ecdfbb 10296if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10297 ac_cv_c_const=yes
5ee754fc 10298else
81ecdfbb 10299 ac_cv_c_const=no
5ee754fc 10300fi
81ecdfbb 10301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10302fi
81ecdfbb
RW
10303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10304$as_echo "$ac_cv_c_const" >&6; }
a9322a30 10305if test $ac_cv_c_const = no; then
bec39cab 10306
81ecdfbb 10307$as_echo "#define const /**/" >>confdefs.h
bec39cab 10308
5ee754fc 10309fi
bec39cab 10310
81ecdfbb
RW
10311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10312$as_echo_n "checking for inline... " >&6; }
10313if test "${ac_cv_c_inline+set}" = set; then :
10314 $as_echo_n "(cached) " >&6
bec39cab 10315else
a9322a30
TT
10316 ac_cv_c_inline=no
10317for ac_kw in inline __inline__ __inline; do
81ecdfbb 10318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10319/* end confdefs.h. */
a9322a30
TT
10320#ifndef __cplusplus
10321typedef int foo_t;
10322static $ac_kw foo_t static_foo () {return 0; }
10323$ac_kw foo_t foo () {return 0; }
10324#endif
10325
bec39cab 10326_ACEOF
81ecdfbb
RW
10327if ac_fn_c_try_compile "$LINENO"; then :
10328 ac_cv_c_inline=$ac_kw
bec39cab 10329fi
81ecdfbb
RW
10330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10331 test "$ac_cv_c_inline" != no && break
a9322a30 10332done
bec39cab 10333
5ee754fc 10334fi
81ecdfbb
RW
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10336$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10337
a9322a30
TT
10338case $ac_cv_c_inline in
10339 inline | yes) ;;
10340 *)
10341 case $ac_cv_c_inline in
10342 no) ac_val=;;
10343 *) ac_val=$ac_cv_c_inline;;
10344 esac
10345 cat >>confdefs.h <<_ACEOF
10346#ifndef __cplusplus
10347#define inline $ac_val
10348#endif
10349_ACEOF
bec39cab
AC
10350 ;;
10351esac
bec39cab 10352
81ecdfbb
RW
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10354$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10355if test "${ac_cv_c_bigendian+set}" = set; then :
10356 $as_echo_n "(cached) " >&6
bec39cab 10357else
81ecdfbb
RW
10358 ac_cv_c_bigendian=unknown
10359 # See if we're dealing with a universal compiler.
10360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10361/* end confdefs.h. */
10362#ifndef __APPLE_CC__
10363 not a universal capable compiler
10364 #endif
10365 typedef int dummy;
10366
10367_ACEOF
10368if ac_fn_c_try_compile "$LINENO"; then :
10369
10370 # Check for potential -arch flags. It is not universal unless
10371 # there are at least two -arch flags with different values.
10372 ac_arch=
10373 ac_prev=
10374 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10375 if test -n "$ac_prev"; then
10376 case $ac_word in
10377 i?86 | x86_64 | ppc | ppc64)
10378 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10379 ac_arch=$ac_word
10380 else
10381 ac_cv_c_bigendian=universal
10382 break
10383 fi
10384 ;;
10385 esac
10386 ac_prev=
10387 elif test "x$ac_word" = "x-arch"; then
10388 ac_prev=arch
10389 fi
10390 done
10391fi
10392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10393 if test $ac_cv_c_bigendian = unknown; then
10394 # See if sys/param.h defines the BYTE_ORDER macro.
10395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10396/* end confdefs.h. */
a9322a30 10397#include <sys/types.h>
81ecdfbb 10398 #include <sys/param.h>
a9322a30
TT
10399
10400int
10401main ()
10402{
81ecdfbb
RW
10403#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10404 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10405 && LITTLE_ENDIAN)
10406 bogus endian macros
10407 #endif
a9322a30
TT
10408
10409 ;
10410 return 0;
10411}
bec39cab 10412_ACEOF
81ecdfbb 10413if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10414 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10416/* end confdefs.h. */
a9322a30 10417#include <sys/types.h>
81ecdfbb 10418 #include <sys/param.h>
a9322a30
TT
10419
10420int
10421main ()
10422{
10423#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10424 not big endian
10425 #endif
a9322a30
TT
10426
10427 ;
10428 return 0;
10429}
bec39cab 10430_ACEOF
81ecdfbb 10431if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10432 ac_cv_c_bigendian=yes
5ee754fc 10433else
81ecdfbb 10434 ac_cv_c_bigendian=no
5ee754fc 10435fi
81ecdfbb
RW
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437fi
10438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10439 fi
10440 if test $ac_cv_c_bigendian = unknown; then
10441 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443/* end confdefs.h. */
10444#include <limits.h>
bec39cab 10445
81ecdfbb
RW
10446int
10447main ()
10448{
10449#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10450 bogus endian macros
10451 #endif
10452
10453 ;
10454 return 0;
10455}
7eb368b3 10456_ACEOF
81ecdfbb
RW
10457if ac_fn_c_try_compile "$LINENO"; then :
10458 # It does; now see whether it defined to _BIG_ENDIAN or not.
10459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10460/* end confdefs.h. */
81ecdfbb
RW
10461#include <limits.h>
10462
7eb368b3
NR
10463int
10464main ()
10465{
81ecdfbb
RW
10466#ifndef _BIG_ENDIAN
10467 not big endian
10468 #endif
10469
7eb368b3
NR
10470 ;
10471 return 0;
10472}
10473_ACEOF
81ecdfbb 10474if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10475 ac_cv_c_bigendian=yes
81ecdfbb
RW
10476else
10477 ac_cv_c_bigendian=no
a9322a30 10478fi
81ecdfbb 10479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10480fi
81ecdfbb
RW
10481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10482 fi
10483 if test $ac_cv_c_bigendian = unknown; then
10484 # Compile a test program.
10485 if test "$cross_compiling" = yes; then :
10486 # Try to guess by grepping values from an object file.
10487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10488/* end confdefs.h. */
10489short int ascii_mm[] =
10490 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10491 short int ascii_ii[] =
10492 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10493 int use_ascii (int i) {
10494 return ascii_mm[i] + ascii_ii[i];
10495 }
10496 short int ebcdic_ii[] =
10497 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10498 short int ebcdic_mm[] =
10499 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10500 int use_ebcdic (int i) {
10501 return ebcdic_mm[i] + ebcdic_ii[i];
10502 }
10503 extern int foo;
7eb368b3 10504
81ecdfbb
RW
10505int
10506main ()
10507{
10508return use_ascii (foo) == use_ebcdic (foo);
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513if ac_fn_c_try_compile "$LINENO"; then :
10514 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10515 ac_cv_c_bigendian=yes
10516 fi
10517 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10518 if test "$ac_cv_c_bigendian" = unknown; then
10519 ac_cv_c_bigendian=no
10520 else
10521 # finding both strings is unlikely to happen, but who knows?
10522 ac_cv_c_bigendian=unknown
10523 fi
10524 fi
7eb368b3 10525fi
81ecdfbb 10526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10527else
81ecdfbb 10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10529/* end confdefs.h. */
81ecdfbb 10530$ac_includes_default
d3ea6809
MM
10531int
10532main ()
10533{
81ecdfbb
RW
10534
10535 /* Are we little or big endian? From Harbison&Steele. */
10536 union
10537 {
10538 long int l;
10539 char c[sizeof (long int)];
10540 } u;
10541 u.l = 1;
10542 return u.c[sizeof (long int) - 1] == 1;
10543
10544 ;
10545 return 0;
d3ea6809
MM
10546}
10547_ACEOF
81ecdfbb 10548if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10549 ac_cv_c_bigendian=no
d3ea6809 10550else
81ecdfbb 10551 ac_cv_c_bigendian=yes
d3ea6809 10552fi
81ecdfbb
RW
10553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10554 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10555fi
a9322a30 10556
81ecdfbb
RW
10557 fi
10558fi
10559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10560$as_echo "$ac_cv_c_bigendian" >&6; }
10561 case $ac_cv_c_bigendian in #(
10562 yes)
10563 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10564;; #(
10565 no)
10566 ;; #(
10567 universal)
10568
10569$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10570
10571 ;; #(
10572 *)
10573 as_fn_error "unknown endianness
10574 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10575 esac
d3ea6809
MM
10576
10577
a9322a30
TT
10578# ------------------------------ #
10579# Checks for library functions. #
10580# ------------------------------ #
d3ea6809 10581
a9322a30
TT
10582# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10583# for constant arguments. Useless!
81ecdfbb
RW
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10585$as_echo_n "checking for working alloca.h... " >&6; }
10586if test "${ac_cv_working_alloca_h+set}" = set; then :
10587 $as_echo_n "(cached) " >&6
d3ea6809 10588else
81ecdfbb 10589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 10590/* end confdefs.h. */
a9322a30 10591#include <alloca.h>
bec39cab
AC
10592int
10593main ()
10594{
a9322a30 10595char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 10596 if (p) return 0;
bec39cab
AC
10597 ;
10598 return 0;
10599}
10600_ACEOF
81ecdfbb 10601if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10602 ac_cv_working_alloca_h=yes
bec39cab 10603else
81ecdfbb 10604 ac_cv_working_alloca_h=no
bec39cab 10605fi
81ecdfbb
RW
10606rm -f core conftest.err conftest.$ac_objext \
10607 conftest$ac_exeext conftest.$ac_ext
bec39cab 10608fi
81ecdfbb
RW
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10610$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
10611if test $ac_cv_working_alloca_h = yes; then
10612
81ecdfbb 10613$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 10614
c906108c 10615fi
bec39cab 10616
81ecdfbb
RW
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10618$as_echo_n "checking for alloca... " >&6; }
10619if test "${ac_cv_func_alloca_works+set}" = set; then :
10620 $as_echo_n "(cached) " >&6
bec39cab 10621else
81ecdfbb 10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10623/* end confdefs.h. */
a9322a30
TT
10624#ifdef __GNUC__
10625# define alloca __builtin_alloca
b4e70030 10626#else
a9322a30
TT
10627# ifdef _MSC_VER
10628# include <malloc.h>
10629# define alloca _alloca
10630# else
81ecdfbb 10631# ifdef HAVE_ALLOCA_H
a9322a30
TT
10632# include <alloca.h>
10633# else
10634# ifdef _AIX
10635 #pragma alloca
10636# else
10637# ifndef alloca /* predefined by HP cc +Olibcalls */
10638char *alloca ();
10639# endif
10640# endif
10641# endif
10642# endif
c906108c 10643#endif
97bf5e38 10644
bec39cab
AC
10645int
10646main ()
10647{
a9322a30 10648char *p = (char *) alloca (1);
81ecdfbb 10649 if (p) return 0;
bec39cab
AC
10650 ;
10651 return 0;
10652}
10653_ACEOF
81ecdfbb 10654if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10655 ac_cv_func_alloca_works=yes
bec39cab 10656else
81ecdfbb 10657 ac_cv_func_alloca_works=no
bec39cab 10658fi
81ecdfbb
RW
10659rm -f core conftest.err conftest.$ac_objext \
10660 conftest$ac_exeext conftest.$ac_ext
bec39cab 10661fi
81ecdfbb
RW
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10663$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
10664
10665if test $ac_cv_func_alloca_works = yes; then
10666
81ecdfbb 10667$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 10668
a9322a30
TT
10669else
10670 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10671# that cause trouble. Some versions do not even contain alloca or
10672# contain a buggy version. If you still want to use their alloca,
10673# use ar to extract alloca.o from them instead of compiling alloca.c.
10674
81ecdfbb 10675ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 10676
81ecdfbb 10677$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 10678
bec39cab 10679
81ecdfbb
RW
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10681$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10682if test "${ac_cv_os_cray+set}" = set; then :
10683 $as_echo_n "(cached) " >&6
a9322a30 10684else
81ecdfbb 10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 10686/* end confdefs.h. */
81ecdfbb 10687#if defined CRAY && ! defined CRAY2
a9322a30
TT
10688webecray
10689#else
10690wenotbecray
10691#endif
10692
10693_ACEOF
10694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10695 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10696 ac_cv_os_cray=yes
10697else
81ecdfbb 10698 ac_cv_os_cray=no
bec39cab 10699fi
81ecdfbb
RW
10700rm -f conftest*
10701
bec39cab 10702fi
81ecdfbb
RW
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10704$as_echo "$ac_cv_os_cray" >&6; }
10705if test $ac_cv_os_cray = yes; then
10706 for ac_func in _getb67 GETB67 getb67; do
10707 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10708ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10709eval as_val=\$$as_ac_var
10710 if test "x$as_val" = x""yes; then :
a9322a30
TT
10711
10712cat >>confdefs.h <<_ACEOF
10713#define CRAY_STACKSEG_END $ac_func
bec39cab 10714_ACEOF
c906108c 10715
a9322a30 10716 break
c906108c
SS
10717fi
10718
a9322a30
TT
10719 done
10720fi
bec39cab 10721
81ecdfbb
RW
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10723$as_echo_n "checking stack direction for C alloca... " >&6; }
10724if test "${ac_cv_c_stack_direction+set}" = set; then :
10725 $as_echo_n "(cached) " >&6
a9322a30 10726else
81ecdfbb 10727 if test "$cross_compiling" = yes; then :
a9322a30 10728 ac_cv_c_stack_direction=0
bec39cab 10729else
81ecdfbb 10730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10731/* end confdefs.h. */
81ecdfbb 10732$ac_includes_default
a9322a30
TT
10733int
10734find_stack_direction ()
b4e70030 10735{
a9322a30
TT
10736 static char *addr = 0;
10737 auto char dummy;
10738 if (addr == 0)
10739 {
10740 addr = &dummy;
10741 return find_stack_direction ();
10742 }
10743 else
10744 return (&dummy > addr) ? 1 : -1;
b4e70030 10745}
b757528f 10746
bec39cab
AC
10747int
10748main ()
10749{
81ecdfbb 10750 return find_stack_direction () < 0;
bec39cab
AC
10751}
10752_ACEOF
81ecdfbb 10753if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10754 ac_cv_c_stack_direction=1
10755else
81ecdfbb 10756 ac_cv_c_stack_direction=-1
a9322a30 10757fi
81ecdfbb
RW
10758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10759 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10760fi
a9322a30 10761
81ecdfbb
RW
10762fi
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10764$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10765cat >>confdefs.h <<_ACEOF
10766#define STACK_DIRECTION $ac_cv_c_stack_direction
10767_ACEOF
10768
10769
10770fi
10771
a9322a30 10772for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10773do :
10774 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10775ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10776eval as_val=\$$as_ac_Header
10777 if test "x$as_val" = x""yes; then :
bec39cab 10778 cat >>confdefs.h <<_ACEOF
81ecdfbb 10779#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10780_ACEOF
b757528f 10781
b757528f 10782fi
bec39cab 10783
a9322a30 10784done
a3828db0 10785
a9322a30 10786for ac_func in getpagesize
81ecdfbb
RW
10787do :
10788 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10789if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10790 cat >>confdefs.h <<_ACEOF
81ecdfbb 10791#define HAVE_GETPAGESIZE 1
bec39cab 10792_ACEOF
bcb3dc3d 10793
bcb3dc3d
MK
10794fi
10795done
10796
81ecdfbb
RW
10797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10798$as_echo_n "checking for working mmap... " >&6; }
10799if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10800 $as_echo_n "(cached) " >&6
a9322a30 10801else
81ecdfbb 10802 if test "$cross_compiling" = yes; then :
a9322a30 10803 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10804else
81ecdfbb 10805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10806/* end confdefs.h. */
a9322a30
TT
10807$ac_includes_default
10808/* malloc might have been renamed as rpl_malloc. */
10809#undef malloc
bec39cab 10810
a9322a30
TT
10811/* Thanks to Mike Haertel and Jim Avera for this test.
10812 Here is a matrix of mmap possibilities:
10813 mmap private not fixed
10814 mmap private fixed at somewhere currently unmapped
10815 mmap private fixed at somewhere already mapped
10816 mmap shared not fixed
10817 mmap shared fixed at somewhere currently unmapped
10818 mmap shared fixed at somewhere already mapped
10819 For private mappings, we should verify that changes cannot be read()
10820 back from the file, nor mmap's back from the file at a different
10821 address. (There have been systems where private was not correctly
10822 implemented like the infamous i386 svr4.0, and systems where the
10823 VM page cache was not coherent with the file system buffer cache
10824 like early versions of FreeBSD and possibly contemporary NetBSD.)
10825 For shared mappings, we should conversely verify that changes get
10826 propagated back to all the places they're supposed to be.
bec39cab 10827
a9322a30
TT
10828 Grep wants private fixed already mapped.
10829 The main things grep needs to know about mmap are:
10830 * does it exist and is it safe to write into the mmap'd area
10831 * how to use it (BSD variants) */
8b9cf735 10832
a9322a30
TT
10833#include <fcntl.h>
10834#include <sys/mman.h>
8b9cf735 10835
81ecdfbb 10836#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10837char *malloc ();
a3828db0
MK
10838#endif
10839
a9322a30 10840/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10841#ifndef HAVE_GETPAGESIZE
a9322a30 10842/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10843# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10844# define HAVE_SYS_PARAM_H 1
10845# endif
10846
10847# ifdef _SC_PAGESIZE
10848# define getpagesize() sysconf(_SC_PAGESIZE)
10849# else /* no _SC_PAGESIZE */
81ecdfbb 10850# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10851# include <sys/param.h>
10852# ifdef EXEC_PAGESIZE
10853# define getpagesize() EXEC_PAGESIZE
10854# else /* no EXEC_PAGESIZE */
10855# ifdef NBPG
10856# define getpagesize() NBPG * CLSIZE
10857# ifndef CLSIZE
10858# define CLSIZE 1
10859# endif /* no CLSIZE */
10860# else /* no NBPG */
10861# ifdef NBPC
10862# define getpagesize() NBPC
10863# else /* no NBPC */
10864# ifdef PAGESIZE
10865# define getpagesize() PAGESIZE
10866# endif /* PAGESIZE */
10867# endif /* no NBPC */
10868# endif /* no NBPG */
10869# endif /* no EXEC_PAGESIZE */
10870# else /* no HAVE_SYS_PARAM_H */
10871# define getpagesize() 8192 /* punt totally */
10872# endif /* no HAVE_SYS_PARAM_H */
10873# endif /* no _SC_PAGESIZE */
10874
10875#endif /* no HAVE_GETPAGESIZE */
10876
bec39cab
AC
10877int
10878main ()
10879{
a9322a30
TT
10880 char *data, *data2, *data3;
10881 int i, pagesize;
10882 int fd;
10883
10884 pagesize = getpagesize ();
10885
10886 /* First, make a file with some known garbage in it. */
10887 data = (char *) malloc (pagesize);
10888 if (!data)
81ecdfbb 10889 return 1;
a9322a30
TT
10890 for (i = 0; i < pagesize; ++i)
10891 *(data + i) = rand ();
10892 umask (0);
10893 fd = creat ("conftest.mmap", 0600);
10894 if (fd < 0)
81ecdfbb 10895 return 1;
a9322a30 10896 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10897 return 1;
a9322a30
TT
10898 close (fd);
10899
10900 /* Next, try to mmap the file at a fixed address which already has
10901 something else allocated at it. If we can, also make sure that
10902 we see the same garbage. */
10903 fd = open ("conftest.mmap", O_RDWR);
10904 if (fd < 0)
81ecdfbb 10905 return 1;
a9322a30
TT
10906 data2 = (char *) malloc (2 * pagesize);
10907 if (!data2)
81ecdfbb
RW
10908 return 1;
10909 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10910 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10911 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10912 return 1;
a9322a30
TT
10913 for (i = 0; i < pagesize; ++i)
10914 if (*(data + i) != *(data2 + i))
81ecdfbb 10915 return 1;
a9322a30
TT
10916
10917 /* Finally, make sure that changes to the mapped area do not
10918 percolate back to the file as seen by read(). (This is a bug on
10919 some variants of i386 svr4.0.) */
10920 for (i = 0; i < pagesize; ++i)
10921 *(data2 + i) = *(data2 + i) + 1;
10922 data3 = (char *) malloc (pagesize);
10923 if (!data3)
81ecdfbb 10924 return 1;
a9322a30 10925 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10926 return 1;
a9322a30
TT
10927 for (i = 0; i < pagesize; ++i)
10928 if (*(data + i) != *(data3 + i))
81ecdfbb 10929 return 1;
a9322a30 10930 close (fd);
81ecdfbb 10931 return 0;
bec39cab
AC
10932}
10933_ACEOF
81ecdfbb 10934if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10935 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10936else
81ecdfbb 10937 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10938fi
81ecdfbb
RW
10939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10940 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10941fi
81ecdfbb 10942
a9322a30 10943fi
81ecdfbb
RW
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10945$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10946if test $ac_cv_func_mmap_fixed_mapped = yes; then
10947
81ecdfbb 10948$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10949
086ec9eb 10950fi
a9322a30 10951rm -f conftest.mmap
a3828db0 10952
81ecdfbb
RW
10953ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10954if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10955
a9322a30
TT
10956else
10957
10958cat >>confdefs.h <<_ACEOF
10959#define pid_t int
bec39cab 10960_ACEOF
086ec9eb
MK
10961
10962fi
10963
81ecdfbb
RW
10964for ac_header in vfork.h
10965do :
10966 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10967if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10968 cat >>confdefs.h <<_ACEOF
81ecdfbb 10969#define HAVE_VFORK_H 1
bec39cab 10970_ACEOF
c906108c
SS
10971
10972fi
a9322a30 10973
a3828db0 10974done
c906108c 10975
a9322a30 10976for ac_func in fork vfork
81ecdfbb
RW
10977do :
10978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10980eval as_val=\$$as_ac_var
10981 if test "x$as_val" = x""yes; then :
a3828db0 10982 cat >>confdefs.h <<_ACEOF
81ecdfbb 10983#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10984_ACEOF
b83266a0 10985
97bf5e38 10986fi
a3828db0 10987done
b83266a0 10988
a9322a30 10989if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10991$as_echo_n "checking for working fork... " >&6; }
10992if test "${ac_cv_func_fork_works+set}" = set; then :
10993 $as_echo_n "(cached) " >&6
a9322a30 10994else
81ecdfbb 10995 if test "$cross_compiling" = yes; then :
a9322a30
TT
10996 ac_cv_func_fork_works=cross
10997else
81ecdfbb
RW
10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10999/* end confdefs.h. */
11000$ac_includes_default
11001int
11002main ()
11003{
11004
11005 /* By Ruediger Kuhlmann. */
11006 return fork () < 0;
11007
11008 ;
11009 return 0;
11010}
a9322a30 11011_ACEOF
81ecdfbb 11012if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11013 ac_cv_func_fork_works=yes
11014else
81ecdfbb 11015 ac_cv_func_fork_works=no
a9322a30 11016fi
81ecdfbb
RW
11017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11018 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11019fi
81ecdfbb 11020
a9322a30 11021fi
81ecdfbb
RW
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11023$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11024
11025else
11026 ac_cv_func_fork_works=$ac_cv_func_fork
11027fi
11028if test "x$ac_cv_func_fork_works" = xcross; then
11029 case $host in
11030 *-*-amigaos* | *-*-msdosdjgpp*)
11031 # Override, as these systems have only a dummy fork() stub
11032 ac_cv_func_fork_works=no
11033 ;;
11034 *)
11035 ac_cv_func_fork_works=yes
11036 ;;
11037 esac
81ecdfbb
RW
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11039$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11040fi
11041ac_cv_func_vfork_works=$ac_cv_func_vfork
11042if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11044$as_echo_n "checking for working vfork... " >&6; }
11045if test "${ac_cv_func_vfork_works+set}" = set; then :
11046 $as_echo_n "(cached) " >&6
a9322a30 11047else
81ecdfbb 11048 if test "$cross_compiling" = yes; then :
a9322a30
TT
11049 ac_cv_func_vfork_works=cross
11050else
81ecdfbb 11051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11052/* end confdefs.h. */
11053/* Thanks to Paul Eggert for this test. */
81ecdfbb 11054$ac_includes_default
a9322a30 11055#include <sys/wait.h>
81ecdfbb 11056#ifdef HAVE_VFORK_H
a9322a30
TT
11057# include <vfork.h>
11058#endif
11059/* On some sparc systems, changes by the child to local and incoming
11060 argument registers are propagated back to the parent. The compiler
11061 is told about this with #include <vfork.h>, but some compilers
11062 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11063 static variable whose address is put into a register that is
11064 clobbered by the vfork. */
11065static void
11066#ifdef __cplusplus
11067sparc_address_test (int arg)
11068# else
11069sparc_address_test (arg) int arg;
11070#endif
11071{
11072 static pid_t child;
11073 if (!child) {
11074 child = vfork ();
11075 if (child < 0) {
11076 perror ("vfork");
11077 _exit(2);
11078 }
11079 if (!child) {
11080 arg = getpid();
11081 write(-1, "", 0);
11082 _exit (arg);
11083 }
11084 }
11085}
11086
11087int
11088main ()
11089{
11090 pid_t parent = getpid ();
11091 pid_t child;
11092
11093 sparc_address_test (0);
11094
11095 child = vfork ();
11096
11097 if (child == 0) {
11098 /* Here is another test for sparc vfork register problems. This
11099 test uses lots of local variables, at least as many local
11100 variables as main has allocated so far including compiler
11101 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11102 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11103 reuse the register of parent for one of the local variables,
11104 since it will think that parent can't possibly be used any more
11105 in this routine. Assigning to the local variable will thus
11106 munge parent in the parent process. */
11107 pid_t
11108 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11109 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11110 /* Convince the compiler that p..p7 are live; otherwise, it might
11111 use the same hardware register for all 8 local variables. */
11112 if (p != p1 || p != p2 || p != p3 || p != p4
11113 || p != p5 || p != p6 || p != p7)
11114 _exit(1);
11115
11116 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11117 from child file descriptors. If the child closes a descriptor
11118 before it execs or exits, this munges the parent's descriptor
11119 as well. Test for this by closing stdout in the child. */
11120 _exit(close(fileno(stdout)) != 0);
11121 } else {
11122 int status;
11123 struct stat st;
11124
11125 while (wait(&status) != child)
11126 ;
81ecdfbb 11127 return (
a9322a30
TT
11128 /* Was there some problem with vforking? */
11129 child < 0
11130
11131 /* Did the child fail? (This shouldn't happen.) */
11132 || status
11133
11134 /* Did the vfork/compiler bug occur? */
11135 || parent != getpid()
11136
11137 /* Did the file descriptor bug occur? */
11138 || fstat(fileno(stdout), &st) != 0
11139 );
11140 }
11141}
11142_ACEOF
81ecdfbb 11143if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11144 ac_cv_func_vfork_works=yes
11145else
81ecdfbb 11146 ac_cv_func_vfork_works=no
a9322a30 11147fi
81ecdfbb
RW
11148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11149 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11150fi
81ecdfbb 11151
a9322a30 11152fi
81ecdfbb
RW
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11154$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11155
11156fi;
11157if test "x$ac_cv_func_fork_works" = xcross; then
11158 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11160$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11161fi
11162
11163if test "x$ac_cv_func_vfork_works" = xyes; then
11164
81ecdfbb 11165$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11166
11167else
11168
81ecdfbb 11169$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11170
11171fi
11172if test "x$ac_cv_func_fork_works" = xyes; then
11173
81ecdfbb 11174$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11175
11176fi
11177
a9322a30 11178for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 11179 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 11180 sigaction sigprocmask sigsetmask socketpair syscall \
732f6a93 11181 ttrace wborder setlocale iconvlist libiconvlist btowc
81ecdfbb
RW
11182do :
11183 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11184ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11185eval as_val=\$$as_ac_var
11186 if test "x$as_val" = x""yes; then :
6c7a06a3 11187 cat >>confdefs.h <<_ACEOF
81ecdfbb 11188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11189_ACEOF
11190
11191fi
11192done
11193
11194
81ecdfbb
RW
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11196$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11197if test "${am_cv_langinfo_codeset+set}" = set; then :
11198 $as_echo_n "(cached) " >&6
6c7a06a3 11199else
81ecdfbb 11200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11201/* end confdefs.h. */
11202#include <langinfo.h>
11203int
11204main ()
11205{
11206char* cs = nl_langinfo(CODESET);
bec39cab
AC
11207 ;
11208 return 0;
11209}
11210_ACEOF
81ecdfbb 11211if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11212 am_cv_langinfo_codeset=yes
a4db0f07 11213else
81ecdfbb 11214 am_cv_langinfo_codeset=no
a4db0f07 11215fi
81ecdfbb
RW
11216rm -f core conftest.err conftest.$ac_objext \
11217 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11218
a4db0f07 11219fi
81ecdfbb
RW
11220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11221$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11222 if test $am_cv_langinfo_codeset = yes; then
11223
81ecdfbb 11224$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11225
6c7a06a3 11226 fi
c906108c 11227
06825bd1 11228
a3828db0
MK
11229# Check the return and argument types of ptrace. No canned test for
11230# this, so roll our own.
11231gdb_ptrace_headers='
11232#if HAVE_SYS_TYPES_H
11233# include <sys/types.h>
11234#endif
11235#if HAVE_SYS_PTRACE_H
11236# include <sys/ptrace.h>
11237#endif
11238#if HAVE_UNISTD_H
11239# include <unistd.h>
11240#endif
11241'
11242# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11243ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11244"
11245if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11246 ac_have_decl=1
06825bd1 11247else
81ecdfbb 11248 ac_have_decl=0
06825bd1 11249fi
06825bd1 11250
a3828db0 11251cat >>confdefs.h <<_ACEOF
81ecdfbb 11252#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11253_ACEOF
81ecdfbb 11254if test $ac_have_decl = 1; then :
bec39cab 11255
a3828db0 11256else
a3828db0
MK
11257
11258 : ${gdb_cv_func_ptrace_ret='int'}
11259 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11260
06825bd1
MK
11261fi
11262
064ef605
DJ
11263# Check return type. Varargs (used on GNU/Linux) conflict with the
11264# empty argument list, so check for that explicitly.
81ecdfbb
RW
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11266$as_echo_n "checking return type of ptrace... " >&6; }
11267if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11268 $as_echo_n "(cached) " >&6
bec39cab 11269else
81ecdfbb 11270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11271/* end confdefs.h. */
a3828db0 11272$gdb_ptrace_headers
bec39cab
AC
11273int
11274main ()
11275{
064ef605
DJ
11276extern long ptrace (enum __ptrace_request, ...);
11277 ;
11278 return 0;
11279}
11280_ACEOF
81ecdfbb 11281if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11282 gdb_cv_func_ptrace_ret='long'
11283else
81ecdfbb 11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11285/* end confdefs.h. */
11286$gdb_ptrace_headers
11287int
11288main ()
11289{
a3828db0 11290extern int ptrace ();
bec39cab
AC
11291 ;
11292 return 0;
11293}
11294_ACEOF
81ecdfbb 11295if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11296 gdb_cv_func_ptrace_ret='int'
70f9f479 11297else
81ecdfbb 11298 gdb_cv_func_ptrace_ret='long'
70f9f479 11299fi
81ecdfbb 11300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11301fi
81ecdfbb 11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11303fi
81ecdfbb
RW
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11305$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11306
a3828db0
MK
11307cat >>confdefs.h <<_ACEOF
11308#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11309_ACEOF
70f9f479 11310
a3828db0 11311# Check argument types.
81ecdfbb
RW
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11313$as_echo_n "checking types of arguments for ptrace... " >&6; }
11314if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11315 $as_echo_n "(cached) " >&6
bec39cab 11316else
a3828db0 11317
81ecdfbb 11318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11319/* end confdefs.h. */
11320$gdb_ptrace_headers
11321int
11322main ()
11323{
11324extern long ptrace (enum __ptrace_request, ...);
11325 ;
11326 return 0;
11327}
11328_ACEOF
81ecdfbb 11329if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11330 gdb_cv_func_ptrace_args='int,int,long,long'
11331else
064ef605 11332
a3828db0
MK
11333for gdb_arg1 in 'int' 'long'; do
11334 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11335 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 11336 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 11337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11338/* end confdefs.h. */
a3828db0 11339$gdb_ptrace_headers
bec39cab
AC
11340int
11341main ()
11342{
a3828db0
MK
11343
11344extern $gdb_cv_func_ptrace_ret
11345 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11346
bec39cab
AC
11347 ;
11348 return 0;
11349}
11350_ACEOF
81ecdfbb 11351if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11352 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11353 break 4;
5c7f2947 11354fi
81ecdfbb 11355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11356 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11358/* end confdefs.h. */
a3828db0 11359$gdb_ptrace_headers
bec39cab
AC
11360int
11361main ()
11362{
a3828db0
MK
11363
11364extern $gdb_cv_func_ptrace_ret
11365 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11366
bec39cab
AC
11367 ;
11368 return 0;
11369}
11370_ACEOF
81ecdfbb 11371if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11372
11373gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11374 break 5;
78434e59 11375fi
81ecdfbb 11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11377 done
11378 done
11379 done
11380 done
11381done
11382# Provide a safe default value.
11383: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11384
064ef605 11385fi
81ecdfbb 11386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11387fi
81ecdfbb
RW
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11389$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11390ac_save_IFS=$IFS; IFS=','
11391set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11392IFS=$ac_save_IFS
11393shift
bec39cab 11394
a3828db0
MK
11395cat >>confdefs.h <<_ACEOF
11396#define PTRACE_TYPE_ARG3 $3
11397_ACEOF
11398
11399if test -n "$5"; then
11400
11401cat >>confdefs.h <<_ACEOF
11402#define PTRACE_TYPE_ARG5 $5
bec39cab 11403_ACEOF
78434e59
MK
11404
11405fi
11406
a3828db0 11407if test "$cross_compiling" = no; then
81ecdfbb
RW
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11409$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11410if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11411 $as_echo_n "(cached) " >&6
a3828db0 11412else
81ecdfbb
RW
11413 if test "$cross_compiling" = yes; then :
11414 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11415else
81ecdfbb 11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11417/* end confdefs.h. */
81ecdfbb 11418$ac_includes_default
bec39cab
AC
11419int
11420main ()
11421{
a3828db0
MK
11422/* If this system has a BSD-style setpgrp which takes arguments,
11423 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11424 exit successfully. */
81ecdfbb 11425 return setpgrp (1,1) != -1;
bec39cab
AC
11426 ;
11427 return 0;
11428}
11429_ACEOF
81ecdfbb 11430if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11431 ac_cv_func_setpgrp_void=no
c906108c 11432else
81ecdfbb 11433 ac_cv_func_setpgrp_void=yes
c906108c 11434fi
81ecdfbb
RW
11435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11436 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11437fi
81ecdfbb 11438
a3828db0 11439fi
81ecdfbb
RW
11440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11441$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11442if test $ac_cv_func_setpgrp_void = yes; then
11443
81ecdfbb 11444$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11445
11446fi
a3828db0
MK
11447
11448else
81ecdfbb
RW
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11450$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11451if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11452 $as_echo_n "(cached) " >&6
97bf5e38 11453else
81ecdfbb 11454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11455/* end confdefs.h. */
a3828db0
MK
11456
11457#include <unistd.h>
11458
bec39cab
AC
11459int
11460main ()
11461{
a3828db0
MK
11462
11463 if (setpgrp(1,1) == -1)
11464 exit (0);
11465 else
11466 exit (1);
11467
bec39cab
AC
11468 ;
11469 return 0;
11470}
11471_ACEOF
81ecdfbb 11472if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11473 ac_cv_func_setpgrp_void=no
c906108c 11474else
81ecdfbb 11475 ac_cv_func_setpgrp_void=yes
c906108c 11476fi
81ecdfbb 11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11478fi
81ecdfbb
RW
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11480$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11481if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11482 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11483
a3828db0 11484fi
c906108c
SS
11485fi
11486
a3828db0
MK
11487# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
11488# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11490$as_echo_n "checking for sigsetjmp... " >&6; }
11491if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11492 $as_echo_n "(cached) " >&6
bec39cab 11493else
81ecdfbb 11494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11495/* end confdefs.h. */
a3828db0
MK
11496
11497#include <setjmp.h>
11498
bec39cab
AC
11499int
11500main ()
11501{
a3828db0 11502sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
11503 ;
11504 return 0;
11505}
11506_ACEOF
81ecdfbb 11507if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11508 gdb_cv_func_sigsetjmp=yes
c906108c 11509else
81ecdfbb 11510 gdb_cv_func_sigsetjmp=no
c906108c 11511fi
81ecdfbb 11512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11513fi
81ecdfbb
RW
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11515$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 11516if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 11517
81ecdfbb 11518$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 11519
97bf5e38 11520fi
c906108c 11521
a3828db0
MK
11522# Assume we'll default to using the included libiberty regex.
11523gdb_use_included_regex=yes
11524
11525# However, if the system regex is GNU regex, then default to *not*
11526# using the included regex.
81ecdfbb
RW
11527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11528$as_echo_n "checking for GNU regex... " >&6; }
11529if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11530 $as_echo_n "(cached) " >&6
bec39cab 11531else
81ecdfbb 11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11533/* end confdefs.h. */
a3828db0 11534#include <gnu-versions.h>
bec39cab
AC
11535int
11536main ()
11537{
81ecdfbb
RW
11538#define REGEX_INTERFACE_VERSION 1
11539#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11540# error "Version mismatch"
11541#endif
5c45e068
MK
11542 ;
11543 return 0;
11544}
11545_ACEOF
81ecdfbb
RW
11546if ac_fn_c_try_compile "$LINENO"; then :
11547 gdb_cv_have_gnu_regex=yes
5c45e068 11548else
81ecdfbb
RW
11549 gdb_cv_have_gnu_regex=no
11550fi
11551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11552fi
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11554$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11555if test $gdb_cv_have_gnu_regex = yes; then
11556 gdb_use_included_regex=no
5c45e068 11557fi
81ecdfbb
RW
11558
11559
11560# Check whether --with-included-regex was given.
11561if test "${with_included_regex+set}" = set; then :
11562 withval=$with_included_regex; gdb_with_regex=$withval
11563else
11564 gdb_with_regex=$gdb_use_included_regex
c906108c 11565fi
81ecdfbb
RW
11566
11567if test "$gdb_with_regex" = yes; then
11568
11569$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11570
c906108c 11571fi
81ecdfbb
RW
11572
11573# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11574ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11575#include <sys/proc.h>
11576
11577"
11578if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11579
5c45e068 11580cat >>confdefs.h <<_ACEOF
a3828db0 11581#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11582_ACEOF
c906108c 11583
5c45e068 11584
97bf5e38 11585fi
c906108c 11586
5c45e068 11587
a3828db0 11588# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11590$as_echo_n "checking for struct lwp... " >&6; }
11591if test "${gdb_cv_struct_lwp+set}" = set; then :
11592 $as_echo_n "(cached) " >&6
bec39cab 11593else
81ecdfbb 11594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11595/* end confdefs.h. */
a3828db0
MK
11596#include <sys/param.h>
11597#include <sys/lwp.h>
bec39cab
AC
11598int
11599main ()
11600{
a3828db0 11601struct lwp l;
bec39cab
AC
11602 ;
11603 return 0;
11604}
11605_ACEOF
81ecdfbb 11606if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11607 gdb_cv_struct_lwp=yes
c906108c 11608else
81ecdfbb 11609 gdb_cv_struct_lwp=no
c906108c 11610fi
81ecdfbb 11611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11612fi
81ecdfbb
RW
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11614$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11615if test $gdb_cv_struct_lwp = yes; then
c906108c 11616
81ecdfbb 11617$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11618
97bf5e38 11619fi
c906108c 11620
a3828db0 11621# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11623$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11624if test "${gdb_cv_struct_reg+set}" = set; then :
11625 $as_echo_n "(cached) " >&6
bec39cab 11626else
81ecdfbb 11627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11628/* end confdefs.h. */
a3828db0
MK
11629#include <sys/types.h>
11630#include <machine/reg.h>
bec39cab
AC
11631int
11632main ()
11633{
a3828db0 11634struct reg r;
bec39cab
AC
11635 ;
11636 return 0;
11637}
11638_ACEOF
81ecdfbb 11639if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11640 gdb_cv_struct_reg=yes
27ca5dad 11641else
81ecdfbb 11642 gdb_cv_struct_reg=no
27ca5dad 11643fi
81ecdfbb 11644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11645fi
81ecdfbb
RW
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11647$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11648if test $gdb_cv_struct_reg = yes; then
bec39cab 11649
81ecdfbb 11650$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11651
11652fi
97bf5e38 11653
a3828db0
MK
11654# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11655# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11656ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11657"
11658if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11659
11660cat >>confdefs.h <<_ACEOF
a3828db0 11661#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11662_ACEOF
3862412b 11663
5c45e068 11664
97bf5e38 11665fi
81ecdfbb
RW
11666ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11667"
11668if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11669
11670cat >>confdefs.h <<_ACEOF
a3828db0 11671#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11672_ACEOF
3862412b 11673
5c45e068 11674
97bf5e38 11675fi
3862412b 11676
5c45e068 11677
a3828db0 11678# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11680$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11681if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11682 $as_echo_n "(cached) " >&6
451928c5 11683else
81ecdfbb 11684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11685/* end confdefs.h. */
a3828db0 11686#include <sys/ptrace.h>
bec39cab
AC
11687int
11688main ()
11689{
a3828db0 11690PTRACE_GETREGS;
bec39cab
AC
11691 ;
11692 return 0;
11693}
11694_ACEOF
81ecdfbb 11695if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11696 gdb_cv_have_ptrace_getregs=yes
451928c5 11697else
81ecdfbb 11698 gdb_cv_have_ptrace_getregs=no
451928c5 11699fi
81ecdfbb 11700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11701fi
11702
81ecdfbb
RW
11703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11704$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11705if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11706
81ecdfbb 11707$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11708
97bf5e38 11709fi
451928c5 11710
a3828db0 11711# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11713$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11714if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11715 $as_echo_n "(cached) " >&6
451928c5 11716else
81ecdfbb 11717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11718/* end confdefs.h. */
a3828db0 11719#include <sys/ptrace.h>
bec39cab
AC
11720int
11721main ()
11722{
a3828db0 11723PTRACE_GETFPXREGS;
bec39cab
AC
11724 ;
11725 return 0;
11726}
11727_ACEOF
81ecdfbb 11728if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11729 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11730else
81ecdfbb 11731 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11732fi
81ecdfbb 11733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11734fi
11735
81ecdfbb
RW
11736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11737$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11738if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11739
81ecdfbb 11740$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11741
97bf5e38 11742fi
451928c5 11743
a3828db0 11744# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11746$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11747if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11748 $as_echo_n "(cached) " >&6
3862412b 11749else
81ecdfbb 11750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11751/* end confdefs.h. */
a3828db0
MK
11752#include <sys/types.h>
11753#include <sys/ptrace.h>
bec39cab
AC
11754int
11755main ()
11756{
a3828db0 11757PT_GETDBREGS;
bec39cab
AC
11758 ;
11759 return 0;
11760}
11761_ACEOF
81ecdfbb 11762if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11763 gdb_cv_have_pt_getdbregs=yes
3862412b 11764else
81ecdfbb 11765 gdb_cv_have_pt_getdbregs=no
3862412b 11766fi
81ecdfbb 11767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11768fi
11769
81ecdfbb
RW
11770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11771$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11772if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11773
81ecdfbb 11774$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11775
97bf5e38 11776fi
3862412b 11777
a3828db0 11778# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11780$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11781if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11782 $as_echo_n "(cached) " >&6
3862412b 11783else
81ecdfbb 11784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11785/* end confdefs.h. */
a3828db0
MK
11786#include <sys/types.h>
11787#include <sys/ptrace.h>
bec39cab
AC
11788int
11789main ()
11790{
a3828db0 11791PT_GETXMMREGS;
bec39cab
AC
11792 ;
11793 return 0;
11794}
11795_ACEOF
81ecdfbb 11796if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11797 gdb_cv_have_pt_getxmmregs=yes
3862412b 11798else
81ecdfbb 11799 gdb_cv_have_pt_getxmmregs=no
3862412b 11800fi
81ecdfbb 11801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11802fi
11803
81ecdfbb
RW
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11805$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11806if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11807
81ecdfbb 11808$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11809
97bf5e38 11810fi
3862412b 11811
eb368090 11812# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
11813
11814if test "${target}" = "${host}"; then
11815 case "${host}" in
97bf5e38 11816 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 11817
81ecdfbb 11818$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11819
11820 ;;
c162e8c9 11821 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11822
81ecdfbb 11823$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11824
11825 ;;
11826 mips-sgi-irix5*)
11827 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11828
81ecdfbb 11829$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11830
11831 ;;
11832 esac
11833fi
11834
11835if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
11837$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
11838 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
11839 $as_echo_n "(cached) " >&6
bec39cab 11840else
81ecdfbb 11841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11842/* end confdefs.h. */
596c9d4b
KB
11843
11844#define _SYSCALL32
11845#include <sys/procfs.h>
bec39cab
AC
11846int
11847main ()
11848{
97bf5e38 11849pstatus_t avar
bec39cab
AC
11850 ;
11851 return 0;
11852}
11853_ACEOF
81ecdfbb 11854if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11855 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 11856else
81ecdfbb 11857 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 11858
596c9d4b 11859fi
81ecdfbb 11860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11861fi
11862
97bf5e38 11863 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 11864
81ecdfbb 11865$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
11866
11867 fi
81ecdfbb
RW
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
11869$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 11870
81ecdfbb
RW
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
11872$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
11873 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
11874 $as_echo_n "(cached) " >&6
596c9d4b 11875else
81ecdfbb 11876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11877/* end confdefs.h. */
596c9d4b
KB
11878
11879#define _SYSCALL32
11880#include <sys/procfs.h>
bec39cab
AC
11881int
11882main ()
11883{
97bf5e38 11884prrun_t avar
bec39cab
AC
11885 ;
11886 return 0;
11887}
11888_ACEOF
81ecdfbb 11889if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11890 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 11891else
81ecdfbb 11892 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 11893
596c9d4b 11894fi
81ecdfbb 11895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11896fi
11897
97bf5e38 11898 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 11899
81ecdfbb 11900$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
11901
11902 fi
81ecdfbb
RW
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
11904$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 11905
81ecdfbb
RW
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11907$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11908 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11909 $as_echo_n "(cached) " >&6
596c9d4b 11910else
81ecdfbb 11911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11912/* end confdefs.h. */
596c9d4b
KB
11913
11914#define _SYSCALL32
11915#include <sys/procfs.h>
bec39cab
AC
11916int
11917main ()
11918{
97bf5e38 11919gregset_t avar
bec39cab
AC
11920 ;
11921 return 0;
11922}
11923_ACEOF
81ecdfbb 11924if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11925 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11926else
81ecdfbb 11927 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11928
596c9d4b 11929fi
81ecdfbb 11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11931fi
11932
97bf5e38 11933 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11934
81ecdfbb 11935$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11936
11937 fi
81ecdfbb
RW
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11939$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11940
81ecdfbb
RW
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11942$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11943 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11944 $as_echo_n "(cached) " >&6
d84dd0c5 11945else
81ecdfbb 11946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11947/* end confdefs.h. */
97bf5e38
MK
11948
11949#define _SYSCALL32
d84dd0c5 11950#include <sys/procfs.h>
bec39cab
AC
11951int
11952main ()
11953{
97bf5e38 11954fpregset_t avar
bec39cab
AC
11955 ;
11956 return 0;
11957}
11958_ACEOF
81ecdfbb 11959if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11960 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11961else
81ecdfbb 11962 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11963
d84dd0c5 11964fi
81ecdfbb 11965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11966fi
11967
97bf5e38 11968 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11969
81ecdfbb 11970$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11971
97bf5e38 11972 fi
81ecdfbb
RW
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11974$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11975
81ecdfbb
RW
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11977$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11978 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11979 $as_echo_n "(cached) " >&6
c906108c 11980else
81ecdfbb 11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11982/* end confdefs.h. */
c906108c 11983
97bf5e38
MK
11984#define _SYSCALL32
11985#include <sys/procfs.h>
bec39cab
AC
11986int
11987main ()
11988{
97bf5e38 11989prgregset_t avar
bec39cab
AC
11990 ;
11991 return 0;
11992}
11993_ACEOF
81ecdfbb 11994if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11995 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11996else
81ecdfbb 11997 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11998
c906108c 11999fi
81ecdfbb 12000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12001fi
12002
97bf5e38 12003 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 12004
81ecdfbb 12005$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 12006
97bf5e38 12007 fi
81ecdfbb
RW
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
12009$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 12010
81ecdfbb
RW
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
12012$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
12013 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
12014 $as_echo_n "(cached) " >&6
d45fe813 12015else
81ecdfbb 12016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12017/* end confdefs.h. */
97bf5e38
MK
12018
12019#define _SYSCALL32
12020#include <sys/procfs.h>
bec39cab
AC
12021int
12022main ()
12023{
97bf5e38 12024prfpregset_t avar
bec39cab
AC
12025 ;
12026 return 0;
12027}
12028_ACEOF
81ecdfbb 12029if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12030 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 12031else
81ecdfbb 12032 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 12033
d45fe813 12034fi
81ecdfbb 12035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12036fi
12037
97bf5e38 12038 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 12039
81ecdfbb 12040$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 12041
97bf5e38 12042 fi
81ecdfbb
RW
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
12044$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 12045
81ecdfbb
RW
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
12047$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
12048 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
12049 $as_echo_n "(cached) " >&6
d45fe813 12050else
81ecdfbb 12051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12052/* end confdefs.h. */
97bf5e38
MK
12053
12054#define _SYSCALL32
12055#include <sys/procfs.h>
bec39cab
AC
12056int
12057main ()
12058{
97bf5e38 12059prgregset32_t avar
bec39cab
AC
12060 ;
12061 return 0;
12062}
12063_ACEOF
81ecdfbb 12064if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12065 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 12066else
81ecdfbb 12067 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 12068
d45fe813 12069fi
81ecdfbb 12070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12071fi
12072
97bf5e38 12073 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 12074
81ecdfbb 12075$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 12076
97bf5e38 12077 fi
81ecdfbb
RW
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
12079$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 12080
81ecdfbb
RW
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
12082$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
12083 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
12084 $as_echo_n "(cached) " >&6
d45fe813 12085else
81ecdfbb 12086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12087/* end confdefs.h. */
97bf5e38
MK
12088
12089#define _SYSCALL32
12090#include <sys/procfs.h>
bec39cab
AC
12091int
12092main ()
12093{
97bf5e38 12094prfpregset32_t avar
bec39cab
AC
12095 ;
12096 return 0;
12097}
12098_ACEOF
81ecdfbb 12099if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12100 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 12101else
81ecdfbb 12102 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 12103
d45fe813 12104fi
81ecdfbb 12105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12106fi
12107
97bf5e38 12108 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 12109
81ecdfbb 12110$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 12111
97bf5e38 12112 fi
81ecdfbb
RW
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
12114$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 12115
81ecdfbb
RW
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
12117$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
12118 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
12119 $as_echo_n "(cached) " >&6
d45fe813 12120else
81ecdfbb 12121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12122/* end confdefs.h. */
97bf5e38 12123
d45fe813 12124#define _SYSCALL32
97bf5e38 12125#include <sys/procfs.h>
bec39cab
AC
12126int
12127main ()
12128{
97bf5e38 12129lwpid_t avar
bec39cab
AC
12130 ;
12131 return 0;
12132}
12133_ACEOF
81ecdfbb 12134if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12135 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 12136else
81ecdfbb 12137 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 12138
d45fe813 12139fi
81ecdfbb 12140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12141fi
12142
97bf5e38 12143 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12144
81ecdfbb 12145$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12146
97bf5e38 12147 fi
81ecdfbb
RW
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12149$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12150
81ecdfbb
RW
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12152$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12153 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12154 $as_echo_n "(cached) " >&6
c906108c 12155else
81ecdfbb 12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12157/* end confdefs.h. */
c906108c 12158
97bf5e38
MK
12159#define _SYSCALL32
12160#include <sys/procfs.h>
bec39cab
AC
12161int
12162main ()
12163{
97bf5e38 12164psaddr_t avar
bec39cab
AC
12165 ;
12166 return 0;
12167}
12168_ACEOF
81ecdfbb 12169if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12170 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12171else
81ecdfbb 12172 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12173
c906108c 12174fi
81ecdfbb 12175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12176fi
12177
97bf5e38 12178 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12179
81ecdfbb 12180$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12181
97bf5e38 12182 fi
81ecdfbb
RW
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12184$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12185
81ecdfbb
RW
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12187$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12188 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12189 $as_echo_n "(cached) " >&6
c906108c 12190else
81ecdfbb 12191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12192/* end confdefs.h. */
c906108c 12193
97bf5e38
MK
12194#define _SYSCALL32
12195#include <sys/procfs.h>
bec39cab
AC
12196int
12197main ()
12198{
97bf5e38 12199prsysent_t avar
bec39cab
AC
12200 ;
12201 return 0;
12202}
12203_ACEOF
81ecdfbb 12204if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12205 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12206else
81ecdfbb 12207 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12208
c906108c 12209fi
81ecdfbb 12210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12211fi
12212
97bf5e38 12213 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12214
81ecdfbb 12215$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12216
97bf5e38 12217 fi
81ecdfbb
RW
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12219$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12220
81ecdfbb
RW
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12222$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12223 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12224 $as_echo_n "(cached) " >&6
c906108c 12225else
81ecdfbb 12226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12227/* end confdefs.h. */
c906108c 12228
97bf5e38
MK
12229#define _SYSCALL32
12230#include <sys/procfs.h>
bec39cab
AC
12231int
12232main ()
12233{
97bf5e38 12234pr_sigset_t avar
bec39cab
AC
12235 ;
12236 return 0;
12237}
12238_ACEOF
81ecdfbb 12239if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12240 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12241else
81ecdfbb 12242 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12243
c906108c 12244fi
81ecdfbb 12245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12246fi
12247
97bf5e38 12248 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12249
81ecdfbb 12250$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12251
97bf5e38 12252 fi
81ecdfbb
RW
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12254$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12255
81ecdfbb
RW
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12257$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12258 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12259 $as_echo_n "(cached) " >&6
c906108c 12260else
81ecdfbb 12261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12262/* end confdefs.h. */
c906108c 12263
97bf5e38
MK
12264#define _SYSCALL32
12265#include <sys/procfs.h>
bec39cab
AC
12266int
12267main ()
12268{
97bf5e38 12269pr_sigaction64_t avar
bec39cab
AC
12270 ;
12271 return 0;
12272}
12273_ACEOF
81ecdfbb 12274if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12275 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12276else
81ecdfbb 12277 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12278
c906108c 12279fi
81ecdfbb 12280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12281fi
12282
97bf5e38 12283 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12284
81ecdfbb 12285$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12286
97bf5e38 12287 fi
81ecdfbb
RW
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12289$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12290
81ecdfbb
RW
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12292$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12293 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12294 $as_echo_n "(cached) " >&6
97bf5e38 12295else
81ecdfbb 12296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12297/* end confdefs.h. */
97bf5e38
MK
12298
12299#define _SYSCALL32
12300#include <sys/procfs.h>
bec39cab
AC
12301int
12302main ()
12303{
97bf5e38 12304pr_siginfo64_t avar
bec39cab
AC
12305 ;
12306 return 0;
12307}
12308_ACEOF
81ecdfbb 12309if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12310 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12311else
81ecdfbb 12312 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12313
97bf5e38 12314fi
81ecdfbb 12315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12316fi
c906108c 12317
97bf5e38 12318 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12319
81ecdfbb 12320$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12321
97bf5e38 12322 fi
81ecdfbb
RW
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12324$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12325
12326
97bf5e38
MK
12327
12328
12329
97bf5e38 12330 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12332$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12333 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12334 $as_echo_n "(cached) " >&6
c906108c 12335else
81ecdfbb 12336 if test "$cross_compiling" = yes; then :
97bf5e38 12337 gdb_cv_prfpregset_t_broken=yes
c906108c 12338else
81ecdfbb 12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12340/* end confdefs.h. */
97bf5e38
MK
12341#include <sys/procfs.h>
12342 int main ()
12343 {
12344 if (sizeof (prfpregset_t) == sizeof (void *))
12345 return 1;
12346 return 0;
12347 }
bec39cab 12348_ACEOF
81ecdfbb 12349if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12350 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12351else
12352 gdb_cv_prfpregset_t_broken=yes
c906108c 12353fi
81ecdfbb
RW
12354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12355 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12356fi
81ecdfbb 12357
c906108c
SS
12358fi
12359
81ecdfbb
RW
12360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12361$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12362 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12363
81ecdfbb 12364$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12365
97bf5e38
MK
12366 fi
12367 fi
c906108c 12368
bec39cab 12369
81ecdfbb
RW
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
12371$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
12372 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
12373 $as_echo_n "(cached) " >&6
c906108c 12374else
81ecdfbb 12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12376/* end confdefs.h. */
97bf5e38
MK
12377#include <unistd.h>
12378#include <sys/types.h>
12379#include <sys/procfs.h>
12380
bec39cab
AC
12381int
12382main ()
12383{
97bf5e38
MK
12384
12385 int dummy;;
12386 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
12387
12388 ;
12389 return 0;
12390}
12391_ACEOF
81ecdfbb 12392if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12393 gdb_cv_have_procfs_piocset=yes
c906108c 12394else
81ecdfbb 12395 gdb_cv_have_procfs_piocset=no
c906108c 12396fi
81ecdfbb 12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12398fi
97bf5e38 12399
81ecdfbb
RW
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
12401$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 12402 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 12403
81ecdfbb 12404$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
12405
12406 fi
c906108c 12407fi
c906108c 12408
97bf5e38 12409if test ${host} = ${target} ; then
bec39cab 12410
81ecdfbb
RW
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
12412$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
12413 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
12414 $as_echo_n "(cached) " >&6
bec39cab 12415else
81ecdfbb 12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12417/* end confdefs.h. */
97bf5e38 12418#include <link.h>
bec39cab
AC
12419int
12420main ()
12421{
97bf5e38 12422struct link_map lm; (void) lm.l_addr;
bec39cab
AC
12423 ;
12424 return 0;
12425}
12426_ACEOF
81ecdfbb 12427if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12428 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 12429else
81ecdfbb 12430 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 12431fi
81ecdfbb 12432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12433fi
12434
81ecdfbb
RW
12435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
12436$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 12437 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 12438
81ecdfbb 12439$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12440
12441 fi
12442
bec39cab 12443
81ecdfbb
RW
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
12445$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
12446 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
12447 $as_echo_n "(cached) " >&6
c906108c 12448else
81ecdfbb 12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12450/* end confdefs.h. */
97bf5e38
MK
12451#include <sys/types.h>
12452#include <link.h>
bec39cab
AC
12453int
12454main ()
12455{
97bf5e38 12456struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
12457 ;
12458 return 0;
12459}
12460_ACEOF
81ecdfbb 12461if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12462 gdb_cv_have_struct_link_map_with_lm_members=yes
12463else
81ecdfbb 12464 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 12465fi
81ecdfbb 12466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12467fi
c906108c 12468
81ecdfbb
RW
12469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
12470$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 12471 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 12472
81ecdfbb 12473$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12474
12475 fi
12476
bec39cab 12477
81ecdfbb
RW
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
12479$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
12480 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
12481 $as_echo_n "(cached) " >&6
c906108c 12482else
81ecdfbb 12483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12484/* end confdefs.h. */
97bf5e38
MK
12485#include <sys/types.h>
12486#ifdef HAVE_NLIST_H
12487#include <nlist.h>
12488#endif
12489#include <link.h>
bec39cab
AC
12490int
12491main ()
12492{
97bf5e38 12493struct so_map lm; (void) lm.som_addr;
bec39cab
AC
12494 ;
12495 return 0;
12496}
12497_ACEOF
81ecdfbb 12498if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12499 gdb_cv_have_struct_so_map_with_som_members=yes
12500else
81ecdfbb 12501 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 12502fi
81ecdfbb 12503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12504fi
c906108c 12505
81ecdfbb
RW
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
12507$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 12508 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 12509
81ecdfbb 12510$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 12511
97bf5e38 12512 fi
c906108c 12513
bec39cab 12514
81ecdfbb
RW
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
12516$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
12517 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
12518 $as_echo_n "(cached) " >&6
97bf5e38 12519else
81ecdfbb 12520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12521/* end confdefs.h. */
97bf5e38
MK
12522#define _SYSCALL32
12523#include <sys/link.h>
bec39cab
AC
12524int
12525main ()
12526{
97bf5e38 12527struct link_map32 l;
bec39cab
AC
12528 ;
12529 return 0;
12530}
12531_ACEOF
81ecdfbb 12532if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12533 gdb_cv_have_struct_link_map32=yes
12534else
81ecdfbb 12535 gdb_cv_have_struct_link_map32=no
97bf5e38 12536fi
81ecdfbb 12537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12538fi
c906108c 12539
81ecdfbb
RW
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
12541$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 12542 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 12543
81ecdfbb 12544$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 12545
60ca704f 12546
81ecdfbb 12547$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 12548
97bf5e38
MK
12549 fi
12550fi
c906108c 12551
bc8bcb4b 12552# Check if the compiler supports the `long long' type.
c906108c 12553
81ecdfbb
RW
12554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12555$as_echo_n "checking for long long support in compiler... " >&6; }
12556if test "${gdb_cv_c_long_long+set}" = set; then :
12557 $as_echo_n "(cached) " >&6
97bf5e38 12558else
81ecdfbb 12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12560/* end confdefs.h. */
bc8bcb4b 12561extern long long foo;
bec39cab
AC
12562int
12563main ()
12564{
bc8bcb4b 12565switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12566 ;
12567 return 0;
12568}
12569_ACEOF
81ecdfbb 12570if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12571 gdb_cv_c_long_long=yes
12572else
81ecdfbb 12573 gdb_cv_c_long_long=no
97bf5e38 12574fi
81ecdfbb 12575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12576fi
81ecdfbb
RW
12577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12578$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 12579if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 12580
81ecdfbb 12581$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12582
12583fi
12584
bc8bcb4b 12585# Check if the compiler and runtime support printing long longs.
97bf5e38 12586
81ecdfbb
RW
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12588$as_echo_n "checking for long long support in printf... " >&6; }
12589if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12590 $as_echo_n "(cached) " >&6
97bf5e38 12591else
81ecdfbb 12592 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12593 gdb_cv_printf_has_long_long=no
12594else
81ecdfbb 12595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12596/* end confdefs.h. */
bc8bcb4b
MK
12597$ac_includes_default
12598int
12599main ()
12600{
12601char buf[32];
97bf5e38
MK
12602 long long l = 0;
12603 l = (l << 16) + 0x0123;
12604 l = (l << 16) + 0x4567;
12605 l = (l << 16) + 0x89ab;
12606 l = (l << 16) + 0xcdef;
12607 sprintf (buf, "0x%016llx", l);
12608 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12609 ;
12610 return 0;
c906108c 12611}
bec39cab 12612_ACEOF
81ecdfbb 12613if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12614 gdb_cv_printf_has_long_long=yes
12615else
81ecdfbb 12616 gdb_cv_printf_has_long_long=no
97bf5e38 12617fi
81ecdfbb
RW
12618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12619 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12620fi
81ecdfbb 12621
97bf5e38 12622fi
81ecdfbb
RW
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12624$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12625if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12626
81ecdfbb 12627$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12628
12629fi
97bf5e38 12630
1a619819
LM
12631# Check if the compiler and runtime support printing decfloats.
12632
81ecdfbb
RW
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12634$as_echo_n "checking for decfloat support in printf... " >&6; }
12635if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12636 $as_echo_n "(cached) " >&6
1a619819 12637else
81ecdfbb 12638 if test "$cross_compiling" = yes; then :
1a619819
LM
12639 gdb_cv_printf_has_decfloat=no
12640else
81ecdfbb 12641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12642/* end confdefs.h. */
12643$ac_includes_default
12644int
12645main ()
12646{
12647char buf[64];
12648 _Decimal32 d32 = 1.2345df;
12649 _Decimal64 d64 = 1.2345dd;
12650 _Decimal128 d128 = 1.2345dl;
12651 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12652 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12653 ;
12654 return 0;
12655}
12656_ACEOF
81ecdfbb 12657if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12658 gdb_cv_printf_has_decfloat=yes
12659else
81ecdfbb 12660 gdb_cv_printf_has_decfloat=no
1a619819 12661fi
81ecdfbb
RW
12662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12664fi
81ecdfbb 12665
1a619819 12666fi
81ecdfbb
RW
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12668$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12669if test $gdb_cv_printf_has_decfloat = yes; then
12670
81ecdfbb 12671$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12672
12673fi
12674
bc8bcb4b
MK
12675# Check if the compiler supports the `long double' type. We can't use
12676# AC_C_LONG_DOUBLE because that one does additional checks on the
12677# constants defined in <float.h> that fail on some systems,
12678# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12679
81ecdfbb
RW
12680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12681$as_echo_n "checking for long double support in compiler... " >&6; }
12682if test "${gdb_cv_c_long_double+set}" = set; then :
12683 $as_echo_n "(cached) " >&6
97bf5e38 12684else
81ecdfbb 12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12686/* end confdefs.h. */
97bf5e38 12687long double foo;
bec39cab 12688_ACEOF
81ecdfbb 12689if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12690 gdb_cv_c_long_double=yes
97bf5e38 12691else
81ecdfbb 12692 gdb_cv_c_long_double=no
97bf5e38 12693fi
81ecdfbb 12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12695fi
81ecdfbb
RW
12696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12697$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12698if test $gdb_cv_c_long_double = yes; then
c906108c 12699
81ecdfbb 12700$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12701
12702fi
12703
bc8bcb4b 12704# Check if the compiler and runtime support printing long doubles.
97bf5e38 12705
81ecdfbb
RW
12706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12707$as_echo_n "checking for long double support in printf... " >&6; }
12708if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12709 $as_echo_n "(cached) " >&6
97bf5e38 12710else
81ecdfbb 12711 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12712 gdb_cv_printf_has_long_double=no
12713else
81ecdfbb 12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12715/* end confdefs.h. */
bc8bcb4b
MK
12716$ac_includes_default
12717int
12718main ()
12719{
12720char buf[16];
97bf5e38
MK
12721 long double f = 3.141592653;
12722 sprintf (buf, "%Lg", f);
12723 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12724 ;
12725 return 0;
97bf5e38 12726}
bec39cab 12727_ACEOF
81ecdfbb 12728if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12729 gdb_cv_printf_has_long_double=yes
c906108c 12730else
81ecdfbb 12731 gdb_cv_printf_has_long_double=no
c906108c 12732fi
81ecdfbb
RW
12733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12735fi
81ecdfbb 12736
c906108c 12737fi
81ecdfbb
RW
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12739$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12740if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12741
81ecdfbb 12742$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12743
12744fi
97bf5e38 12745
bc8bcb4b 12746# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12747
81ecdfbb
RW
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12749$as_echo_n "checking for long double support in scanf... " >&6; }
12750if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12751 $as_echo_n "(cached) " >&6
97bf5e38 12752else
81ecdfbb 12753 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12754 gdb_cv_scanf_has_long_double=no
12755else
81ecdfbb 12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12757/* end confdefs.h. */
bc8bcb4b
MK
12758#include <stdio.h>
12759int
12760main ()
12761{
12762char *buf = "3.141592653";
97bf5e38
MK
12763 long double f = 0;
12764 sscanf (buf, "%Lg", &f);
12765 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12766 ;
12767 return 0;
97bf5e38 12768}
bec39cab 12769_ACEOF
81ecdfbb 12770if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12771 gdb_cv_scanf_has_long_double=yes
12772else
81ecdfbb 12773 gdb_cv_scanf_has_long_double=no
97bf5e38 12774fi
81ecdfbb
RW
12775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12776 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12777fi
81ecdfbb 12778
c906108c 12779fi
81ecdfbb
RW
12780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12781$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12782if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12783
81ecdfbb 12784$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12785
12786fi
c906108c 12787
438013df
AO
12788case ${host_os} in
12789aix*)
81ecdfbb
RW
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12791$as_echo_n "checking for -bbigtoc option... " >&6; }
12792if test "${gdb_cv_bigtoc+set}" = set; then :
12793 $as_echo_n "(cached) " >&6
438013df 12794else
bec39cab 12795
438013df
AO
12796 SAVE_LDFLAGS=$LDFLAGS
12797
12798 case $GCC in
12799 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12800 *) gdb_cv_bigtoc=-bbigtoc ;;
12801 esac
12802
12803 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12805/* end confdefs.h. */
438013df 12806
bec39cab
AC
12807int
12808main ()
12809{
438013df 12810int i;
bec39cab
AC
12811 ;
12812 return 0;
12813}
12814_ACEOF
81ecdfbb 12815if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12816
81ecdfbb
RW
12817else
12818 gdb_cv_bigtoc=
438013df 12819fi
81ecdfbb
RW
12820rm -f core conftest.err conftest.$ac_objext \
12821 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12822 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12823
bec39cab 12824fi
81ecdfbb
RW
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12826$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12827 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12828 ;;
12829esac
12830
c906108c
SS
12831
12832
12833if test ${build} = ${host} -a ${host} = ${target} ; then
12834 case ${host_os} in
12835 hpux*)
81ecdfbb
RW
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
12837$as_echo_n "checking for HPUX/OSF thread support... " >&6; }
c906108c
SS
12838 if test -f /usr/include/dce/cma_config.h ; then
12839 if test "$GCC" = "yes" ; then
81ecdfbb
RW
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12841$as_echo "yes" >&6; }
60ca704f 12842
81ecdfbb 12843$as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h
c906108c 12844
3483b318 12845 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
12846 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
12847 else
81ecdfbb
RW
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5
12849$as_echo "no (suppressed because you are not using GCC)" >&6; }
c906108c
SS
12850 fi
12851 else
81ecdfbb
RW
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12853$as_echo "no" >&6; }
c906108c
SS
12854 fi
12855 ;;
12856 solaris*)
d92419e5
JB
12857 # See if thread_db library is around for Solaris thread debugging.
12858 # Note that we must explicitly test for version 1 of the library
12859 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12860 # the same API.
81ecdfbb
RW
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12862$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12863 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12865$as_echo "yes" >&6; }
60ca704f 12866
81ecdfbb 12867$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12868
3483b318 12869 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12870 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12872$as_echo_n "checking for dlopen in -ldl... " >&6; }
12873if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12874 $as_echo_n "(cached) " >&6
c906108c 12875else
bec39cab 12876 ac_check_lib_save_LIBS=$LIBS
c906108c 12877LIBS="-ldl $LIBS"
81ecdfbb 12878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12879/* end confdefs.h. */
12880
81ecdfbb
RW
12881/* Override any GCC internal prototype to avoid an error.
12882 Use char because int might match the return type of a GCC
12883 builtin and then its argument prototype would still apply. */
bec39cab
AC
12884#ifdef __cplusplus
12885extern "C"
12886#endif
bec39cab
AC
12887char dlopen ();
12888int
12889main ()
12890{
81ecdfbb 12891return dlopen ();
bec39cab
AC
12892 ;
12893 return 0;
12894}
12895_ACEOF
81ecdfbb 12896if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12897 ac_cv_lib_dl_dlopen=yes
12898else
81ecdfbb 12899 ac_cv_lib_dl_dlopen=no
bec39cab 12900fi
81ecdfbb
RW
12901rm -f core conftest.err conftest.$ac_objext \
12902 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12903LIBS=$ac_check_lib_save_LIBS
12904fi
81ecdfbb
RW
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12906$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12907if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12908 cat >>confdefs.h <<_ACEOF
12909#define HAVE_LIBDL 1
12910_ACEOF
c906108c
SS
12911
12912 LIBS="-ldl $LIBS"
12913
c906108c
SS
12914fi
12915
12916 if test "$GCC" = "yes" ; then
12917 # The GNU linker requires the -export-dynamic option to make
12918 # all symbols visible in the dynamic symbol table.
12919 hold_ldflags=$LDFLAGS
81ecdfbb
RW
12920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5
12921$as_echo_n "checking for the ld -export-dynamic flag... " >&6; }
c906108c 12922 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
81ecdfbb 12923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12924/* end confdefs.h. */
c906108c 12925
bec39cab
AC
12926int
12927main ()
12928{
c906108c 12929int i;
bec39cab
AC
12930 ;
12931 return 0;
12932}
12933_ACEOF
81ecdfbb 12934if ac_fn_c_try_link "$LINENO"; then :
c906108c
SS
12935 found=yes
12936else
81ecdfbb 12937 found=no
c906108c 12938fi
81ecdfbb
RW
12939rm -f core conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext conftest.$ac_ext
c906108c 12941 LDFLAGS=$hold_ldflags
81ecdfbb
RW
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12943$as_echo "$found" >&6; }
c906108c
SS
12944 if test $found = yes; then
12945 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
12946 fi
12947 fi
12948 # Sun randomly tweaked the prototypes in <proc_service.h>
12949 # at one point.
81ecdfbb
RW
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12951$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12952 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12953 $as_echo_n "(cached) " >&6
c906108c 12954else
bec39cab 12955
81ecdfbb 12956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12957/* end confdefs.h. */
c906108c
SS
12958
12959 #include <proc_service.h>
12960 ps_err_e ps_pdwrite
12961 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12962
bec39cab
AC
12963int
12964main ()
12965{
12966
12967 ;
12968 return 0;
12969}
12970_ACEOF
81ecdfbb 12971if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12972 gdb_cv_proc_service_is_old=no
12973else
81ecdfbb 12974 gdb_cv_proc_service_is_old=yes
c906108c 12975fi
81ecdfbb 12976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12977
c906108c
SS
12978fi
12979
81ecdfbb
RW
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12981$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12982 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12983
81ecdfbb 12984$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12985
12986 fi
12987 else
81ecdfbb
RW
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
c906108c
SS
12990 fi
12991 ;;
d92419e5 12992 aix*)
81ecdfbb
RW
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12994$as_echo_n "checking for AiX thread debugging library... " >&6; }
12995 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12996 $as_echo_n "(cached) " >&6
bec39cab 12997else
81ecdfbb 12998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12999/* end confdefs.h. */
d92419e5 13000#include <sys/pthdebug.h>
bec39cab
AC
13001int
13002main ()
13003{
d92419e5
JB
13004#ifndef PTHDB_VERSION_3
13005 #error
13006 #endif
bec39cab
AC
13007 ;
13008 return 0;
13009}
13010_ACEOF
81ecdfbb 13011if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13012 gdb_cv_have_aix_thread_debug=yes
13013else
81ecdfbb 13014 gdb_cv_have_aix_thread_debug=no
d92419e5 13015fi
81ecdfbb 13016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13017fi
13018
81ecdfbb
RW
13019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13020$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13021 if test $gdb_cv_have_aix_thread_debug = yes; then
13022 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13023 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
13024 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
13025 fi
13026 ;;
c906108c 13027 esac
bec39cab 13028
c906108c
SS
13029fi
13030
3f47be5c 13031if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13033$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13034if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13035 $as_echo_n "(cached) " >&6
bec39cab 13036else
81ecdfbb 13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13038/* end confdefs.h. */
3f47be5c 13039#include <thread_db.h>
bec39cab
AC
13040int
13041main ()
13042{
3f47be5c 13043int i = TD_NOTALLOC;
bec39cab
AC
13044 ;
13045 return 0;
13046}
13047_ACEOF
81ecdfbb 13048if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13049 gdb_cv_thread_db_h_has_td_notalloc=yes
13050else
81ecdfbb 13051 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13052
3f47be5c 13053fi
81ecdfbb 13054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13055
bec39cab 13056fi
81ecdfbb
RW
13057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13058$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13060$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13061if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13062 $as_echo_n "(cached) " >&6
59f80f10 13063else
81ecdfbb 13064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13065/* end confdefs.h. */
13066#include <thread_db.h>
13067int
13068main ()
13069{
13070int i = TD_VERSION;
13071 ;
13072 return 0;
13073}
13074_ACEOF
81ecdfbb 13075if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13076 gdb_cv_thread_db_h_has_td_version=yes
13077else
81ecdfbb 13078 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13079
13080fi
81ecdfbb 13081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13082
13083fi
81ecdfbb
RW
13084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13085$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13087$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13088if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13089 $as_echo_n "(cached) " >&6
59f80f10 13090else
81ecdfbb 13091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13092/* end confdefs.h. */
13093#include <thread_db.h>
13094int
13095main ()
13096{
13097int i = TD_NOTLS;
13098 ;
13099 return 0;
13100}
13101_ACEOF
81ecdfbb 13102if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13103 gdb_cv_thread_db_h_has_td_notls=yes
13104else
81ecdfbb 13105 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13106
13107fi
81ecdfbb 13108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13109
13110fi
81ecdfbb
RW
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13112$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13113fi
13114if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 13115
81ecdfbb 13116$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 13117
59f80f10
DJ
13118fi
13119if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
13120
81ecdfbb 13121$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
13122
13123fi
13124if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
13125
81ecdfbb 13126$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 13127
3f47be5c
EZ
13128fi
13129
b757528f 13130if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
13132$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
13133if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
13134 $as_echo_n "(cached) " >&6
bec39cab 13135else
81ecdfbb 13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13137/* end confdefs.h. */
b757528f 13138#include <sys/syscall.h>
bec39cab
AC
13139int
13140main ()
13141{
b757528f 13142int i = __NR_tkill;
bec39cab
AC
13143 ;
13144 return 0;
13145}
13146_ACEOF
81ecdfbb 13147if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
13148 gdb_cv_sys_syscall_h_has_tkill=yes
13149else
81ecdfbb 13150 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 13151
b757528f 13152fi
81ecdfbb 13153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 13154
bec39cab 13155fi
81ecdfbb
RW
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
13157$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
13158fi
13159if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 13160
81ecdfbb 13161$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
13162
13163fi
13164
81ecdfbb
RW
13165ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13166"
13167if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
13168 ac_have_decl=1
10568435 13169else
81ecdfbb 13170 ac_have_decl=0
10568435 13171fi
10568435
JK
13172
13173cat >>confdefs.h <<_ACEOF
81ecdfbb 13174#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
13175_ACEOF
13176
13177
81ecdfbb
RW
13178if test "$cross_compiling" = yes; then :
13179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13180/* end confdefs.h. */
13181#include <sys/personality.h>
13182int
13183main ()
13184{
13185
13186# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13187# define ADDR_NO_RANDOMIZE 0x0040000
13188# endif
13189 /* Test the flag could be set and stays set. */
13190 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13191 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13192 return 1
13193 ;
13194 return 0;
13195}
13196_ACEOF
81ecdfbb 13197if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
13198 have_personality=true
13199else
81ecdfbb 13200 have_personality=false
10568435 13201fi
81ecdfbb
RW
13202rm -f core conftest.err conftest.$ac_objext \
13203 conftest$ac_exeext conftest.$ac_ext
10568435 13204else
81ecdfbb 13205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13206/* end confdefs.h. */
13207#include <sys/personality.h>
13208int
13209main ()
13210{
13211
13212# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13213# define ADDR_NO_RANDOMIZE 0x0040000
13214# endif
13215 /* Test the flag could be set and stays set. */
13216 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13217 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13218 return 1
13219 ;
13220 return 0;
13221}
13222_ACEOF
81ecdfbb 13223if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
13224 have_personality=true
13225else
81ecdfbb 13226 have_personality=false
10568435 13227fi
81ecdfbb
RW
13228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13229 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 13230fi
81ecdfbb 13231
10568435
JK
13232if $have_personality
13233then
13234
81ecdfbb 13235$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
13236
13237fi
13238
fb40c209 13239
b14b1491 13240target_sysroot_reloc=0
bec39cab 13241
81ecdfbb
RW
13242# Check whether --with-sysroot was given.
13243if test "${with_sysroot+set}" = set; then :
13244 withval=$with_sysroot;
030292b7 13245 case ${with_sysroot} in
715d1656 13246 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
13247 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
13248 esac
13249
13250 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
13251
07abfebf
RS
13252 if test "x$prefix" = xNONE; then
13253 test_prefix=/usr/local
13254 else
13255 test_prefix=$prefix
13256 fi
aa28a74e 13257 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 13258 test_exec_prefix=$test_prefix
030292b7 13259 else
07abfebf 13260 test_exec_prefix=$exec_prefix
030292b7
DJ
13261 fi
13262 case ${TARGET_SYSTEM_ROOT} in
715d1656 13263 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
13264 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
13265 '${prefix}'|'${prefix}/'*|\
715d1656 13266 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 13267 target_sysroot_reloc=1
030292b7
DJ
13268 ;;
13269 esac
13270
13271else
bec39cab 13272
030292b7
DJ
13273 TARGET_SYSTEM_ROOT=
13274 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
13275
81ecdfbb 13276fi
b14b1491 13277
81ecdfbb 13278TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
13279
13280
13281
16e7150e 13282
16e7150e 13283
81ecdfbb
RW
13284# Check whether --with-system-gdbinit was given.
13285if test "${with_system_gdbinit+set}" = set; then :
13286 withval=$with_system_gdbinit;
b14b1491
TT
13287 SYSTEM_GDBINIT=$withval
13288else
13289 SYSTEM_GDBINIT=
81ecdfbb
RW
13290fi
13291
16e7150e
JG
13292
13293 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13294 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13295 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13296 ac_define_dir=`eval echo $ac_define_dir`
13297
13298cat >>confdefs.h <<_ACEOF
13299#define SYSTEM_GDBINIT "$ac_define_dir"
13300_ACEOF
13301
13302
13303
b14b1491
TT
13304 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13305 if test "x$prefix" = xNONE; then
13306 test_prefix=/usr/local
13307 else
13308 test_prefix=$prefix
13309 fi
13310 else
13311 test_prefix=$exec_prefix
13312 fi
13313 value=0
13314 case ${ac_define_dir} in
13315 "${test_prefix}"|"${test_prefix}/"*|\
13316 '${exec_prefix}'|'${exec_prefix}/'*)
13317 value=1
13318 ;;
13319 esac
16e7150e 13320
b14b1491
TT
13321cat >>confdefs.h <<_ACEOF
13322#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13323_ACEOF
13324
b14b1491 13325
16e7150e 13326
81ecdfbb
RW
13327# Check whether --enable-werror was given.
13328if test "${enable_werror+set}" = set; then :
13329 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13330 yes | y) ERROR_ON_WARNING="yes" ;;
13331 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13332 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13333 esac
81ecdfbb
RW
13334fi
13335
094a342e
MK
13336
13337# Enable -Werror by default when using gcc
13338if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
13339 ERROR_ON_WARNING=yes
13340fi
13341
13342WERROR_CFLAGS=""
13343if test "${ERROR_ON_WARNING}" = yes ; then
13344 WERROR_CFLAGS="-Werror"
13345fi
13346
aa79a185
DJ
13347# The entries after -Wno-pointer-sign are disabled warnings which may
13348# be enabled in the future, which can not currently be used to build
13349# GDB.
13350# NOTE: If you change this list, remember to update
3b851bce 13351# gdb/doc/gdbint.texinfo.
aa79a185
DJ
13352build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
13353-Wformat-nonliteral -Wno-pointer-sign \
e23525a0 13354-Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts"
a3b362c4 13355
3526781e
DJ
13356# Enable -Wno-format by default when using gcc on mingw since many
13357# GCC versions complain about %I64.
13358case "${host}" in
13359 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
13360esac
13361
81ecdfbb
RW
13362# Check whether --enable-build-warnings was given.
13363if test "${enable_build_warnings+set}" = set; then :
13364 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13365 yes) ;;
13366 no) build_warnings="-w";;
13367 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13368 build_warnings="${build_warnings} ${t}";;
13369 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13370 build_warnings="${t} ${build_warnings}";;
13371 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13372esac
d4f3574e 13373if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13374 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13375fi
81ecdfbb
RW
13376fi
13377# Check whether --enable-gdb-build-warnings was given.
13378if test "${enable_gdb_build_warnings+set}" = set; then :
13379 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13380 yes) ;;
13381 no) build_warnings="-w";;
13382 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13383 build_warnings="${build_warnings} ${t}";;
13384 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13385 build_warnings="${t} ${build_warnings}";;
13386 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13387esac
13388if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13389 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13390fi
81ecdfbb
RW
13391fi
13392WARN_CFLAGS=""
c906108c
SS
13393if test "x${build_warnings}" != x -a "x$GCC" = xyes
13394then
81ecdfbb
RW
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13396$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13397 # Separate out the -Werror flag as some files just cannot be
13398 # compiled with it enabled.
13399 for w in ${build_warnings}; do
13400 case $w in
13401 -Werr*) WERROR_CFLAGS=-Werror ;;
13402 *) # Check that GCC accepts it
4536bbc6
AC
13403 saved_CFLAGS="$CFLAGS"
13404 CFLAGS="$CFLAGS $w"
81ecdfbb 13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13406/* end confdefs.h. */
4536bbc6 13407
bec39cab
AC
13408int
13409main ()
13410{
4536bbc6 13411
bec39cab
AC
13412 ;
13413 return 0;
13414}
13415_ACEOF
81ecdfbb 13416if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13417 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13418fi
81ecdfbb 13419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13420 CFLAGS="$saved_CFLAGS"
746a987d
AC
13421 esac
13422 done
81ecdfbb
RW
13423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13424$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13425fi
13426
13427
104c1213 13428
7a292a7a 13429# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13431$as_echo_n "checking for cygwin... " >&6; }
13432if test "${gdb_cv_os_cygwin+set}" = set; then :
13433 $as_echo_n "(cached) " >&6
bec39cab 13434else
81ecdfbb 13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13436/* end confdefs.h. */
7a292a7a
SS
13437
13438#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13439lose
13440#endif
bec39cab 13441_ACEOF
7a292a7a 13442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 13443 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
13444 gdb_cv_os_cygwin=yes
13445else
7a292a7a
SS
13446 gdb_cv_os_cygwin=no
13447fi
13448rm -f conftest*
13449
13450fi
81ecdfbb
RW
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13452$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13453
aff38e61 13454
3eb25fda 13455SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13456case ${host} in
95cbc983
AC
13457 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13458 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13459 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13460esac
13461
13462
cd0fc7c3
SS
13463# libreadline needs libuser32.a in a cygwin environment
13464WIN32LIBS=
13465if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13466 WIN32LIBS="-luser32"
13467 case "${target}" in
13468 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13469 ;;
13470 esac
cd0fc7c3 13471fi
c906108c 13472
b4505029
MM
13473# The ser-tcp.c module requires sockets.
13474case ${host} in
13475 *mingw32*)
13476
81ecdfbb 13477$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13478
13479 WIN32LIBS="$WIN32LIBS -lws2_32"
13480 ;;
13481esac
13482
7a292a7a 13483
31d99776
DJ
13484# Add ELF support to GDB, but only if BFD includes ELF support.
13485OLD_CFLAGS=$CFLAGS
13486OLD_LDFLAGS=$LDFLAGS
13487OLD_LIBS=$LIBS
cab58a69 13488CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 13489LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 13490intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 13491LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13493$as_echo_n "checking for ELF support in BFD... " >&6; }
13494if test "${gdb_cv_var_elf+set}" = set; then :
13495 $as_echo_n "(cached) " >&6
31d99776 13496else
81ecdfbb 13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13498/* end confdefs.h. */
13499#include <stdlib.h>
13500#include "bfd.h"
13501#include "elf-bfd.h"
13502
13503int
13504main ()
13505{
13506bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
13507 ;
13508 return 0;
13509}
13510_ACEOF
81ecdfbb 13511if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13512 gdb_cv_var_elf=yes
13513else
81ecdfbb 13514 gdb_cv_var_elf=no
31d99776 13515fi
81ecdfbb
RW
13516rm -f core conftest.err conftest.$ac_objext \
13517 conftest$ac_exeext conftest.$ac_ext
31d99776 13518fi
81ecdfbb
RW
13519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13520$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
13521if test $gdb_cv_var_elf = yes; then
13522 CONFIG_OBS="$CONFIG_OBS elfread.o"
13523
81ecdfbb 13524$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776
DJ
13525
13526fi
13527CFLAGS=$OLD_CFLAGS
13528LDFLAGS=$OLD_LDFLAGS
13529LIBS=$OLD_LIBS
13530
121ce6e5
DJ
13531# Add any host-specific objects to GDB.
13532CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13533
3fc11d3e
JM
13534LIBGUI="../libgui/src/libgui.a"
13535GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13536
13537
7a292a7a 13538
3fc11d3e
JM
13539WIN32LDAPP=
13540
13541
13542
d91670b9 13543case "${host}" in
686a5eed 13544*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13545 configdir="win"
13546 ;;
13547*)
13548 configdir="unix"
13549 ;;
13550esac
3fc11d3e
JM
13551
13552GDBTKLIBS=
13553if test "${enable_gdbtk}" = "yes"; then
13554
d1c3b63a
KS
13555 # Gdbtk must have an absolute path to srcdir in order to run
13556 # properly when not installed.
13557 here=`pwd`
13558 cd ${srcdir}
13559 GDBTK_SRC_DIR=`pwd`
13560 cd $here
13561
bec39cab 13562
5062cc19
KS
13563 #
13564 # Ok, lets find the tcl configuration
13565 # First, look for one uninstalled.
13566 # the alternative search directory is invoked by --with-tcl
13567 #
3fc11d3e 13568
5062cc19
KS
13569 if test x"${no_tcl}" = x ; then
13570 # we reset no_tcl in case something fails here
13571 no_tcl=true
bec39cab 13572
81ecdfbb
RW
13573# Check whether --with-tcl was given.
13574if test "${with_tcl+set}" = set; then :
13575 withval=$with_tcl; with_tclconfig=${withval}
13576fi
13577
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13579$as_echo_n "checking for Tcl configuration... " >&6; }
13580 if test "${ac_cv_c_tclconfig+set}" = set; then :
13581 $as_echo_n "(cached) " >&6
3fc11d3e 13582else
bec39cab 13583
3fc11d3e 13584
5062cc19
KS
13585 # First check to see if --with-tcl was specified.
13586 case "${host}" in
13587 *-*-cygwin*) platDir="win" ;;
13588 *) platDir="unix" ;;
13589 esac
13590 if test x"${with_tclconfig}" != x ; then
13591 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13592 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13593 else
81ecdfbb 13594 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13595 fi
13596 fi
13597
13598 # then check for a private Tcl installation
13599 if test x"${ac_cv_c_tclconfig}" = x ; then
13600 for i in \
13601 ../tcl \
13602 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13603 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13604 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13605 ../../tcl \
13606 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13607 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13608 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13609 ../../../tcl \
13610 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13611 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13612 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13613 if test -f "$i/$platDir/tclConfig.sh" ; then
13614 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13615 break
13616 fi
13617 done
13618 fi
13619
13620 # on Darwin, check in Framework installation locations
13621 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13622 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13623 `ls -d /Library/Frameworks 2>/dev/null` \
13624 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13625 `ls -d /System/Library/Frameworks 2>/dev/null` \
13626 ; do
13627 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13628 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13629 break
13630 fi
13631 done
13632 fi
13633
13634 # check in a few common install locations
13635 if test x"${ac_cv_c_tclconfig}" = x ; then
13636 for i in `ls -d ${libdir} 2>/dev/null` \
13637 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13638 `ls -d ${prefix}/lib 2>/dev/null` \
13639 `ls -d /usr/local/lib 2>/dev/null` \
13640 `ls -d /usr/contrib/lib 2>/dev/null` \
13641 `ls -d /usr/lib 2>/dev/null` \
13642 ; do
13643 if test -f "$i/tclConfig.sh" ; then
13644 ac_cv_c_tclconfig=`(cd $i; pwd)`
13645 break
13646 fi
13647 done
13648 fi
3fc11d3e 13649
5062cc19
KS
13650 # check in a few other private locations
13651 if test x"${ac_cv_c_tclconfig}" = x ; then
13652 for i in \
13653 ${srcdir}/../tcl \
13654 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13655 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13656 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13657 if test -f "$i/$platDir/tclConfig.sh" ; then
13658 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13659 break
13660 fi
13661 done
13662 fi
bec39cab 13663
3fc11d3e
JM
13664fi
13665
5062cc19
KS
13666
13667 if test x"${ac_cv_c_tclconfig}" = x ; then
13668 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13670$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13671 else
13672 no_tcl=
13673 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13675$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13676 fi
13677 fi
3fc11d3e 13678
bec39cab 13679
85541719
DE
13680 # If $no_tk is nonempty, then we can't do Tk, and there is no
13681 # point to doing Tcl.
bec39cab 13682
5062cc19
KS
13683 #
13684 # Ok, lets find the tk configuration
13685 # First, look for one uninstalled.
13686 # the alternative search directory is invoked by --with-tk
13687 #
3fc11d3e 13688
5062cc19
KS
13689 if test x"${no_tk}" = x ; then
13690 # we reset no_tk in case something fails here
13691 no_tk=true
bec39cab 13692
81ecdfbb
RW
13693# Check whether --with-tk was given.
13694if test "${with_tk+set}" = set; then :
13695 withval=$with_tk; with_tkconfig=${withval}
13696fi
13697
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13699$as_echo_n "checking for Tk configuration... " >&6; }
13700 if test "${ac_cv_c_tkconfig+set}" = set; then :
13701 $as_echo_n "(cached) " >&6
bec39cab 13702else
3fc11d3e
JM
13703
13704
5062cc19
KS
13705 # First check to see if --with-tkconfig was specified.
13706 if test x"${with_tkconfig}" != x ; then
13707 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13708 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13709 else
81ecdfbb 13710 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13711 fi
13712 fi
3fc11d3e 13713
5062cc19
KS
13714 # then check for a private Tk library
13715 case "${host}" in
13716 *-*-cygwin*) platDir="win" ;;
13717 *) platDir="unix" ;;
13718 esac
13719 if test x"${ac_cv_c_tkconfig}" = x ; then
13720 for i in \
13721 ../tk \
13722 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13723 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13724 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13725 ../../tk \
13726 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13727 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13728 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13729 ../../../tk \
13730 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13731 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13732 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13733 if test -f "$i/$platDir/tkConfig.sh" ; then
13734 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13735 break
13736 fi
13737 done
13738 fi
13739
13740 # on Darwin, check in Framework installation locations
13741 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13742 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13743 `ls -d /Library/Frameworks 2>/dev/null` \
13744 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13745 `ls -d /System/Library/Frameworks 2>/dev/null` \
13746 ; do
13747 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13748 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13749 break
13750 fi
13751 done
13752 fi
13753
13754 # check in a few common install locations
13755 if test x"${ac_cv_c_tkconfig}" = x ; then
13756 for i in `ls -d ${libdir} 2>/dev/null` \
13757 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13758 `ls -d ${prefix}/lib 2>/dev/null` \
13759 `ls -d /usr/local/lib 2>/dev/null` \
13760 `ls -d /usr/contrib/lib 2>/dev/null` \
13761 `ls -d /usr/lib 2>/dev/null` \
13762 ; do
13763 if test -f "$i/tkConfig.sh" ; then
13764 ac_cv_c_tkconfig=`(cd $i; pwd)`
13765 break
13766 fi
13767 done
13768 fi
13769 # check in a few other private locations
13770 if test x"${ac_cv_c_tkconfig}" = x ; then
13771 for i in \
13772 ${srcdir}/../tk \
13773 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13774 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13775 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13776 if test -f "$i/$platDir/tkConfig.sh" ; then
13777 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13778 break
13779 fi
13780 done
13781 fi
3fc11d3e 13782
3fc11d3e
JM
13783fi
13784
13785
5062cc19
KS
13786 if test x"${ac_cv_c_tkconfig}" = x ; then
13787 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13789$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13790 else
13791 no_tk=
13792 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13794$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13795 fi
3fc11d3e 13796 fi
dd2504ab 13797
dd2504ab 13798
85541719
DE
13799 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13800
81ecdfbb
RW
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13802$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13803
13804 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13806$as_echo "loading" >&6; }
85541719
DE
13807 . ${TCL_BIN_DIR}/tclConfig.sh
13808 else
81ecdfbb
RW
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13810$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13811 fi
13812
13813 # eval is required to do the TCL_DBGX substitution
13814 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13815 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13816
13817 # If the TCL_BIN_DIR is the build directory (not the install directory),
13818 # then set the common variable name to the value of the build variables.
13819 # For example, the variable TCL_LIB_SPEC will be set to the value
13820 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13821 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13822 # installed and uninstalled version of Tcl.
13823 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13824 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13825 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13826 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13827 elif test "`uname -s`" = "Darwin"; then
13828 # If Tcl was built as a framework, attempt to use the libraries
13829 # from the framework at the given location so that linking works
13830 # against Tcl.framework installed in an arbitary location.
13831 case ${TCL_DEFS} in
13832 *TCL_FRAMEWORK*)
13833 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13834 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13835 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13836 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13837 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13838 break
13839 fi
13840 done
13841 fi
13842 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13843 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13844 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13845 fi
13846 ;;
13847 esac
13848 fi
13849
13850 # eval is required to do the TCL_DBGX substitution
13851 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13852 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13853 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13854 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870 # Check for in-tree tcl
13871 here=`pwd`
13872 cd ${srcdir}/..
13873 topdir=`pwd`
13874 cd ${here}
13875
13876 intree="no"
13877 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13878 intree="yes"
13879 fi
13880
13881 # Find Tcl private headers
13882 if test x"${intree}" = xno; then
13883
81ecdfbb
RW
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13885$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13886 private_dir=""
13887 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13888 if test -f ${dir}/tclInt.h ; then
13889 private_dir=${dir}
13890 fi
13891
13892 if test x"${private_dir}" = x; then
81ecdfbb 13893 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13894 else
13895 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13897$as_echo "${private_dir}" >&6; }
85541719
DE
13898 fi
13899
13900 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13901 TCL_LIBRARY="${TCL_LIB_SPEC}"
13902 TCL_DEPS=""
13903 else
13904 # If building tcl in the same src tree, private headers
13905 # are not needed, but we need to be sure to use the right
13906 # headers library
13907 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13908 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13909 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13910 fi
13911
13912
13913
13914
13915
81ecdfbb
RW
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13917$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13918
5062cc19 13919 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13921$as_echo "loading" >&6; }
5062cc19 13922 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13923 else
81ecdfbb
RW
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13925$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13926 fi
bec39cab 13927
5062cc19
KS
13928 # eval is required to do the TK_DBGX substitution
13929 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13930 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13931
13932 # If the TK_BIN_DIR is the build directory (not the install directory),
13933 # then set the common variable name to the value of the build variables.
13934 # For example, the variable TK_LIB_SPEC will be set to the value
13935 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13936 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13937 # installed and uninstalled version of Tcl.
85541719 13938 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13939 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13940 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13941 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13942 elif test "`uname -s`" = "Darwin"; then
13943 # If Tk was built as a framework, attempt to use the libraries
13944 # from the framework at the given location so that linking works
13945 # against Tk.framework installed in an arbitary location.
13946 case ${TK_DEFS} in
13947 *TK_FRAMEWORK*)
85541719 13948 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13949 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13950 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13951 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13952 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13953 break
13954 fi
13955 done
13956 fi
85541719 13957 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13958 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13959 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13960 fi
13961 ;;
13962 esac
3fc11d3e
JM
13963 fi
13964
5062cc19
KS
13965 # eval is required to do the TK_DBGX substitution
13966 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13967 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13968 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13969 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13970
3fc11d3e
JM
13971
13972
bec39cab
AC
13973
13974
13975
13976
13977
13978
13979
3fc11d3e 13980
3fc11d3e 13981
bec39cab 13982
bec39cab 13983
85541719
DE
13984 # Check for in-tree Tk
13985 intree="no"
13986 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13987 intree="yes"
13988 fi
3fc11d3e 13989
85541719
DE
13990 # Find Tk private headers
13991 if test x"${intree}" = xno; then
3fc11d3e 13992
81ecdfbb
RW
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13994$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13995 private_dir=""
13996 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13997 if test -f ${dir}/tkInt.h; then
13998 private_dir=${dir}
3fc11d3e 13999 fi
bec39cab 14000
5062cc19 14001 if test x"${private_dir}" = x; then
81ecdfbb 14002 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14003 else
5062cc19 14004 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14006$as_echo "${private_dir}" >&6; }
3fc11d3e 14007 fi
3fc11d3e 14008
85541719
DE
14009 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14010 TK_LIBRARY=${TK_LIB_SPEC}
14011 TK_DEPS=""
14012 else
14013 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14014 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14015 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14016 fi
3fc11d3e
JM
14017
14018
3fc11d3e
JM
14019
14020
3fc11d3e 14021
85541719 14022 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14023
85541719
DE
14024 # Include some libraries that Tcl and Tk want.
14025 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14026 # Yes, the ordering seems wrong here. But it isn't.
14027 # TK_LIBS is the list of libraries that need to be linked
14028 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14029 # were in LIBS then any link tests after this point would
14030 # try to include things like `$(LIBGUI)', which wouldn't work.
14031 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14032
85541719
DE
14033 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14034 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14035 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14036 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14037 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14038 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14039 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14040
85541719
DE
14041 if test x$gdb_cv_os_cygwin = xyes; then
14042 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14043 WIN32LDAPP="-Wl,--subsystem,console"
14044 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14045 fi
ffc6a242 14046
81ecdfbb 14047 subdirs="$subdirs gdbtk"
3ace7edb 14048
85541719 14049 fi
3fc11d3e
JM
14050fi
14051
14052
14053
14054
14055
14056
14057
14058
81ecdfbb
RW
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14060$as_echo_n "checking for X... " >&6; }
bec39cab 14061
c906108c 14062
81ecdfbb
RW
14063# Check whether --with-x was given.
14064if test "${with_x+set}" = set; then :
14065 withval=$with_x;
14066fi
c906108c
SS
14067
14068# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14069if test "x$with_x" = xno; then
14070 # The user explicitly disabled X.
14071 have_x=disabled
14072else
81ecdfbb
RW
14073 case $x_includes,$x_libraries in #(
14074 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14075 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14076 $as_echo_n "(cached) " >&6
c906108c
SS
14077else
14078 # One or both of the vars are not set, and there is no cached value.
bec39cab 14079ac_x_includes=no ac_x_libraries=no
81ecdfbb 14080rm -f -r conftest.dir
bec39cab
AC
14081if mkdir conftest.dir; then
14082 cd conftest.dir
bec39cab 14083 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14084incroot:
14085 @echo incroot='${INCROOT}'
14086usrlibdir:
14087 @echo usrlibdir='${USRLIBDIR}'
14088libdir:
14089 @echo libdir='${LIBDIR}'
14090_ACEOF
14091 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14092 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14093 for ac_var in incroot usrlibdir libdir; do
14094 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14095 done
c906108c 14096 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14097 for ac_extension in a so sl dylib la dll; do
14098 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14099 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14100 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14101 fi
14102 done
14103 # Screen out bogus values from the imake configuration. They are
14104 # bogus both because they are the default anyway, and because
14105 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14106 case $ac_im_incroot in
81ecdfbb 14107 /usr/include) ac_x_includes= ;;
bec39cab 14108 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14109 esac
bec39cab 14110 case $ac_im_usrlibdir in
81ecdfbb 14111 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14112 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14113 esac
14114 fi
14115 cd ..
81ecdfbb 14116 rm -f -r conftest.dir
c906108c
SS
14117fi
14118
bec39cab
AC
14119# Standard set of common directories for X headers.
14120# Check X11 before X11Rn because it is often a symlink to the current release.
14121ac_x_header_dirs='
14122/usr/X11/include
81ecdfbb 14123/usr/X11R7/include
bec39cab
AC
14124/usr/X11R6/include
14125/usr/X11R5/include
14126/usr/X11R4/include
14127
14128/usr/include/X11
81ecdfbb 14129/usr/include/X11R7
bec39cab
AC
14130/usr/include/X11R6
14131/usr/include/X11R5
14132/usr/include/X11R4
14133
14134/usr/local/X11/include
81ecdfbb 14135/usr/local/X11R7/include
bec39cab
AC
14136/usr/local/X11R6/include
14137/usr/local/X11R5/include
14138/usr/local/X11R4/include
14139
14140/usr/local/include/X11
81ecdfbb 14141/usr/local/include/X11R7
bec39cab
AC
14142/usr/local/include/X11R6
14143/usr/local/include/X11R5
14144/usr/local/include/X11R4
14145
14146/usr/X386/include
14147/usr/x386/include
14148/usr/XFree86/include/X11
14149
14150/usr/include
14151/usr/local/include
14152/usr/unsupported/include
14153/usr/athena/include
14154/usr/local/x11r5/include
14155/usr/lpp/Xamples/include
14156
14157/usr/openwin/include
14158/usr/openwin/share/include'
14159
14160if test "$ac_x_includes" = no; then
81ecdfbb 14161 # Guess where to find include files, by looking for Xlib.h.
c906108c 14162 # First, try using that file with no special directory specified.
81ecdfbb 14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14164/* end confdefs.h. */
81ecdfbb 14165#include <X11/Xlib.h>
bec39cab 14166_ACEOF
81ecdfbb 14167if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14168 # We can compile using X headers with no special include directory.
14169ac_x_includes=
14170else
bec39cab 14171 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14172 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14173 ac_x_includes=$ac_dir
14174 break
14175 fi
14176done
c906108c 14177fi
bec39cab
AC
14178rm -f conftest.err conftest.$ac_ext
14179fi # $ac_x_includes = no
c906108c 14180
bec39cab 14181if test "$ac_x_libraries" = no; then
c906108c 14182 # Check for the libraries.
c906108c
SS
14183 # See if we find them without any special options.
14184 # Don't add to $LIBS permanently.
bec39cab 14185 ac_save_LIBS=$LIBS
81ecdfbb
RW
14186 LIBS="-lX11 $LIBS"
14187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14188/* end confdefs.h. */
81ecdfbb 14189#include <X11/Xlib.h>
bec39cab
AC
14190int
14191main ()
14192{
81ecdfbb 14193XrmInitialize ()
bec39cab
AC
14194 ;
14195 return 0;
14196}
14197_ACEOF
81ecdfbb 14198if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14199 LIBS=$ac_save_LIBS
c906108c
SS
14200# We can link X programs with no special library path.
14201ac_x_libraries=
14202else
81ecdfbb
RW
14203 LIBS=$ac_save_LIBS
14204for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14205do
bec39cab 14206 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14207 for ac_extension in a so sl dylib la dll; do
14208 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14209 ac_x_libraries=$ac_dir
14210 break 2
14211 fi
14212 done
14213done
14214fi
81ecdfbb
RW
14215rm -f core conftest.err conftest.$ac_objext \
14216 conftest$ac_exeext conftest.$ac_ext
bec39cab 14217fi # $ac_x_libraries = no
c906108c 14218
81ecdfbb
RW
14219case $ac_x_includes,$ac_x_libraries in #(
14220 no,* | *,no | *\'*)
14221 # Didn't find X, or a directory has "'" in its name.
14222 ac_cv_have_x="have_x=no";; #(
14223 *)
14224 # Record where we found X for the cache.
14225 ac_cv_have_x="have_x=yes\
14226 ac_x_includes='$ac_x_includes'\
14227 ac_x_libraries='$ac_x_libraries'"
14228esac
c906108c 14229fi
81ecdfbb
RW
14230;; #(
14231 *) have_x=yes;;
14232 esac
c906108c
SS
14233 eval "$ac_cv_have_x"
14234fi # $with_x != no
14235
14236if test "$have_x" != yes; then
81ecdfbb
RW
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14238$as_echo "$have_x" >&6; }
c906108c
SS
14239 no_x=yes
14240else
14241 # If each of the values was on the command line, it overrides each guess.
14242 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14243 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14244 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14245 ac_cv_have_x="have_x=yes\
14246 ac_x_includes='$x_includes'\
14247 ac_x_libraries='$x_libraries'"
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14249$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14250fi
14251
14252
bec39cab 14253# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14254# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14255# This code just checks for a few cases where we'd like to ignore those
14256# definitions, even when they're present in the '.mt' file. These cases
14257# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14258# not part of the source tree.
7a292a7a 14259#
81ecdfbb
RW
14260# Check whether --enable-sim was given.
14261if test "${enable_sim+set}" = set; then :
14262 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14263 echo "enableval = ${enableval}";
14264 case "${enableval}" in
14265 yes) ignore_sim=false ;;
14266 no) ignore_sim=true ;;
14267 *) ignore_sim=false ;;
14268 esac
14269else
14270 ignore_sim=false
81ecdfbb
RW
14271fi
14272
7a292a7a
SS
14273
14274if test ! -d "${srcdir}/../sim"; then
14275 ignore_sim=true
14276fi
14277
9b624dbe
UW
14278SIM=
14279SIM_OBS=
14280if test "${ignore_sim}" = "false"; then
14281 if test x"${gdb_sim}" != x ; then
14282 SIM="${gdb_sim}"
14283 SIM_OBS="remote-sim.o"
60ca704f 14284
81ecdfbb 14285$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14286
9b624dbe 14287 fi
7a292a7a
SS
14288fi
14289
14290
14291
c906108c
SS
14292
14293
14294
14295
14296
14297
dfcd3bfb 14298
e56ac5c3
AC
14299
14300
b3a90332
AC
14301
14302
c35f4ffc 14303# List of host floatformats.
bec39cab
AC
14304
14305cat >>confdefs.h <<_ACEOF
c35f4ffc 14306#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14307_ACEOF
c35f4ffc 14308
bec39cab
AC
14309
14310cat >>confdefs.h <<_ACEOF
c35f4ffc 14311#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14312_ACEOF
14313
c35f4ffc 14314
bec39cab 14315cat >>confdefs.h <<_ACEOF
c35f4ffc 14316#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14317_ACEOF
c35f4ffc
AC
14318
14319
c906108c
SS
14320# target_subdir is used by the testsuite to find the target libraries.
14321target_subdir=
14322if test "${host}" != "${target}"; then
14323 target_subdir="${target_alias}/"
14324fi
14325
14326
14327frags=
771b4502 14328if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14329 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14330 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14331 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14332 fi
14333 frags="$frags $host_makefile_frag"
14334else
14335 host_makefile_frag=/dev/null
c906108c 14336fi
c906108c 14337
c906108c
SS
14338
14339
14340
771b4502 14341if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14342# We pick this up from the host configuration file (.mh) because we
14343# do not have a native configuration Makefile fragment.
c906108c
SS
14344nativefile=`sed -n '
14345s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14346' ${host_makefile_frag}`
c906108c
SS
14347fi
14348
14349
b00a8037 14350if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14351
14352cat >>confdefs.h <<_ACEOF
b00a8037 14353#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14354_ACEOF
b00a8037
DJ
14355
14356fi
14357
8dcde887 14358# Enable multi-ice-gdb-server.
81ecdfbb
RW
14359# Check whether --enable-multi-ice was given.
14360if test "${enable_multi_ice+set}" = set; then :
14361 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14362 yes | no)
14363 ;;
81ecdfbb 14364 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14365 esac
81ecdfbb 14366fi
b4e70030 14367
81ecdfbb
RW
14368if test "x$enable_multi_ice" = xyes; then
14369 subdirs="$subdirs multi-ice"
3ace7edb 14370
a85f51e7
DJ
14371fi
14372
a13e2c95
UW
14373# We only build gdbserver automatically in a native configuration.
14374if test "$gdb_native" = "yes"; then
81ecdfbb
RW
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14376$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14377 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14379$as_echo "yes" >&6; }
14380 subdirs="$subdirs gdbserver"
3ace7edb 14381
8dcde887 14382 else
81ecdfbb
RW
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14384$as_echo "no" >&6; }
8dcde887
MK
14385 fi
14386fi
14387
db985757 14388# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14389# to an empty version.
c906108c
SS
14390
14391files=
14392links=
5a2402b8 14393
c906108c
SS
14394rm -f nm.h
14395if test "${nativefile}" != ""; then
0f475e27
AC
14396 case "${nativefile}" in
14397 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14398 * ) GDB_NM_FILE="${nativefile}"
14399 esac
5a2402b8
AC
14400 files="${files} ${GDB_NM_FILE}"
14401 links="${links} nm.h"
60ca704f
SE
14402
14403cat >>confdefs.h <<_ACEOF
b78960be 14404#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14405_ACEOF
5a2402b8 14406
c906108c 14407fi
5a2402b8
AC
14408
14409
bec39cab
AC
14410ac_sources="$files"
14411ac_dests="$links"
14412while test -n "$ac_sources"; do
14413 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14414 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14415 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14416done
81ecdfbb 14417ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14418
14419
c906108c
SS
14420
14421
c906108c 14422
81ecdfbb 14423$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14424
bec39cab 14425
81ecdfbb
RW
14426ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
14427
14428ac_config_commands="$ac_config_commands default"
89a34d1b 14429
bec39cab
AC
14430cat >confcache <<\_ACEOF
14431# This file is a shell script that caches the results of configure
14432# tests run on this system so they can be shared between configure
14433# scripts and configure runs, see configure's option --config-cache.
14434# It is not useful on other systems. If it contains results you don't
14435# want to keep, you may remove or edit it.
14436#
14437# config.status only pays attention to the cache file if you give it
14438# the --recheck option to rerun configure.
14439#
14440# `ac_cv_env_foo' variables (set or unset) will be overridden when
14441# loading this file, other *unset* `ac_cv_foo' will be assigned the
14442# following values.
14443
14444_ACEOF
14445
14446# The following way of writing the cache mishandles newlines in values,
14447# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14448# So, we kill variables containing newlines.
bec39cab
AC
14449# Ultrix sh set writes to stderr and can't be redirected directly,
14450# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14451(
14452 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14453 eval ac_val=\$$ac_var
14454 case $ac_val in #(
14455 *${as_nl}*)
14456 case $ac_var in #(
14457 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14458$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14459 esac
14460 case $ac_var in #(
14461 _ | IFS | as_nl) ;; #(
14462 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14463 *) { eval $ac_var=; unset $ac_var;} ;;
14464 esac ;;
14465 esac
14466 done
14467
bec39cab 14468 (set) 2>&1 |
81ecdfbb
RW
14469 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14470 *${as_nl}ac_space=\ *)
14471 # `set' does not quote correctly, so add quotes: double-quote
14472 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14473 sed -n \
14474 "s/'/'\\\\''/g;
14475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14476 ;; #(
bec39cab
AC
14477 *)
14478 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14480 ;;
81ecdfbb
RW
14481 esac |
14482 sort
14483) |
bec39cab 14484 sed '
81ecdfbb 14485 /^ac_cv_env_/b end
bec39cab 14486 t clear
81ecdfbb 14487 :clear
bec39cab
AC
14488 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14489 t end
81ecdfbb
RW
14490 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14491 :end' >>confcache
14492if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14493 if test -w "$cache_file"; then
14494 test "x$cache_file" != "x/dev/null" &&
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14496$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14497 cat confcache >$cache_file
14498 else
81ecdfbb
RW
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14500$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14501 fi
14502fi
14503rm -f confcache
14504
14505test "x$prefix" = xNONE && prefix=$ac_default_prefix
14506# Let make expand exec_prefix.
14507test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14508
bec39cab
AC
14509DEFS=-DHAVE_CONFIG_H
14510
14511ac_libobjs=
14512ac_ltlibobjs=
14513for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14514 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14515 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14516 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14517 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14518 # will be set to the directory where LIBOBJS objects are built.
14519 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14520 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14521done
14522LIBOBJS=$ac_libobjs
14523
14524LTLIBOBJS=$ac_ltlibobjs
14525
14526
85981d60 14527if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14528 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14529Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14530fi
a417dc56 14531if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14532 as_fn_error "conditional \"GMAKE\" was never defined.
14533Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14534fi
783e057b 14535if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
14536 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
14537Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
14538fi
14539
14540 gl_libobjs=
14541 gl_ltlibobjs=
14542 if test -n "$gl_LIBOBJS"; then
14543 # Remove the extension.
14544 sed_drop_objext='s/\.o$//;s/\.obj$//'
14545 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14546 gl_libobjs="$gl_libobjs $i.$ac_objext"
14547 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
14548 done
14549 fi
14550 gl_LIBOBJS=$gl_libobjs
14551
14552 gl_LTLIBOBJS=$gl_ltlibobjs
14553
14554
14555
14556 gltests_libobjs=
14557 gltests_ltlibobjs=
14558 if test -n "$gltests_LIBOBJS"; then
14559 # Remove the extension.
14560 sed_drop_objext='s/\.o$//;s/\.obj$//'
14561 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14562 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
14563 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
14564 done
14565 fi
14566 gltests_LIBOBJS=$gltests_libobjs
14567
14568 gltests_LTLIBOBJS=$gltests_ltlibobjs
14569
14570
e28b3332 14571if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
14572 as_fn_error "conditional \"AMDEP\" was never defined.
14573Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
14574fi
14575if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
14576 as_fn_error "conditional \"am__fastdepCC\" was never defined.
14577Usually this means the macro was only invoked conditionally." "$LINENO" 5
14578fi
14579 if test -n "$EXEEXT"; then
14580 am__EXEEXT_TRUE=
14581 am__EXEEXT_FALSE='#'
14582else
14583 am__EXEEXT_TRUE='#'
14584 am__EXEEXT_FALSE=
e28b3332 14585fi
bec39cab 14586
81ecdfbb
RW
14587
14588
bec39cab 14589: ${CONFIG_STATUS=./config.status}
81ecdfbb 14590ac_write_fail=0
bec39cab
AC
14591ac_clean_files_save=$ac_clean_files
14592ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14594$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14595as_write_fail=0
14596cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14597#! $SHELL
14598# Generated by $as_me.
14599# Run this file to recreate the current configuration.
14600# Compiler output produced by configure, useful for debugging
14601# configure, is in config.log if it exists.
14602
14603debug=false
14604ac_cs_recheck=false
14605ac_cs_silent=false
bec39cab 14606
81ecdfbb
RW
14607SHELL=\${CONFIG_SHELL-$SHELL}
14608export SHELL
14609_ASEOF
14610cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14611## -------------------- ##
14612## M4sh Initialization. ##
14613## -------------------- ##
14614
14615# Be more Bourne compatible
14616DUALCASE=1; export DUALCASE # for MKS sh
14617if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14618 emulate sh
14619 NULLCMD=:
81ecdfbb 14620 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14621 # is contrary to our usage. Disable this feature.
14622 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14623 setopt NO_GLOB_SUBST
14624else
14625 case `(set -o) 2>/dev/null` in #(
14626 *posix*) :
14627 set -o posix ;; #(
14628 *) :
14629 ;;
14630esac
bec39cab 14631fi
bec39cab 14632
81ecdfbb
RW
14633
14634as_nl='
14635'
14636export as_nl
14637# Printing a long string crashes Solaris 7 /usr/bin/printf.
14638as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14639as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14640as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14641# Prefer a ksh shell builtin over an external printf program on Solaris,
14642# but without wasting forks for bash or zsh.
14643if test -z "$BASH_VERSION$ZSH_VERSION" \
14644 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14645 as_echo='print -r --'
14646 as_echo_n='print -rn --'
14647elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14648 as_echo='printf %s\n'
14649 as_echo_n='printf %s'
14650else
14651 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14652 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14653 as_echo_n='/usr/ucb/echo -n'
14654 else
14655 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14656 as_echo_n_body='eval
14657 arg=$1;
14658 case $arg in #(
14659 *"$as_nl"*)
14660 expr "X$arg" : "X\\(.*\\)$as_nl";
14661 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14662 esac;
14663 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14664 '
14665 export as_echo_n_body
14666 as_echo_n='sh -c $as_echo_n_body as_echo'
14667 fi
14668 export as_echo_body
14669 as_echo='sh -c $as_echo_body as_echo'
14670fi
14671
14672# The user is always right.
14673if test "${PATH_SEPARATOR+set}" != set; then
14674 PATH_SEPARATOR=:
14675 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14676 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14677 PATH_SEPARATOR=';'
14678 }
bec39cab
AC
14679fi
14680
14681
81ecdfbb
RW
14682# IFS
14683# We need space, tab and new line, in precisely that order. Quoting is
14684# there to prevent editors from complaining about space-tab.
14685# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14686# splitting by setting IFS to empty value.)
14687IFS=" "" $as_nl"
14688
14689# Find who we are. Look in the path if we contain no directory separator.
14690case $0 in #((
14691 *[\\/]* ) as_myself=$0 ;;
14692 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14693for as_dir in $PATH
14694do
14695 IFS=$as_save_IFS
14696 test -z "$as_dir" && as_dir=.
14697 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14698 done
14699IFS=$as_save_IFS
14700
14701 ;;
14702esac
14703# We did not find ourselves, most probably we were run as `sh COMMAND'
14704# in which case we are not to be found in the path.
14705if test "x$as_myself" = x; then
14706 as_myself=$0
14707fi
14708if test ! -f "$as_myself"; then
14709 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14710 exit 1
14711fi
14712
14713# Unset variables that we do not need and which cause bugs (e.g. in
14714# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14715# suppresses any "Segmentation fault" message there. '((' could
14716# trigger a bug in pdksh 5.2.14.
14717for as_var in BASH_ENV ENV MAIL MAILPATH
14718do eval test x\${$as_var+set} = xset \
14719 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14720done
bec39cab
AC
14721PS1='$ '
14722PS2='> '
14723PS4='+ '
14724
14725# NLS nuisances.
81ecdfbb
RW
14726LC_ALL=C
14727export LC_ALL
14728LANGUAGE=C
14729export LANGUAGE
14730
14731# CDPATH.
14732(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14733
14734
14735# as_fn_error ERROR [LINENO LOG_FD]
14736# ---------------------------------
14737# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14738# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14739# script with status $?, using 1 if that was 0.
14740as_fn_error ()
14741{
14742 as_status=$?; test $as_status -eq 0 && as_status=1
14743 if test "$3"; then
14744 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14745 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14746 fi
14747 $as_echo "$as_me: error: $1" >&2
14748 as_fn_exit $as_status
14749} # as_fn_error
14750
14751
14752# as_fn_set_status STATUS
14753# -----------------------
14754# Set $? to STATUS, without forking.
14755as_fn_set_status ()
14756{
14757 return $1
14758} # as_fn_set_status
14759
14760# as_fn_exit STATUS
14761# -----------------
14762# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14763as_fn_exit ()
14764{
14765 set +e
14766 as_fn_set_status $1
14767 exit $1
14768} # as_fn_exit
14769
14770# as_fn_unset VAR
14771# ---------------
14772# Portably unset VAR.
14773as_fn_unset ()
14774{
14775 { eval $1=; unset $1;}
14776}
14777as_unset=as_fn_unset
14778# as_fn_append VAR VALUE
14779# ----------------------
14780# Append the text in VALUE to the end of the definition contained in VAR. Take
14781# advantage of any shell optimizations that allow amortized linear growth over
14782# repeated appends, instead of the typical quadratic growth present in naive
14783# implementations.
14784if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14785 eval 'as_fn_append ()
14786 {
14787 eval $1+=\$2
14788 }'
14789else
14790 as_fn_append ()
14791 {
14792 eval $1=\$$1\$2
14793 }
14794fi # as_fn_append
14795
14796# as_fn_arith ARG...
14797# ------------------
14798# Perform arithmetic evaluation on the ARGs, and store the result in the
14799# global $as_val. Take advantage of shells that can avoid forks. The arguments
14800# must be portable across $(()) and expr.
14801if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14802 eval 'as_fn_arith ()
14803 {
14804 as_val=$(( $* ))
14805 }'
14806else
14807 as_fn_arith ()
14808 {
14809 as_val=`expr "$@" || test $? -eq 1`
14810 }
14811fi # as_fn_arith
bec39cab 14812
81ecdfbb
RW
14813
14814if expr a : '\(a\)' >/dev/null 2>&1 &&
14815 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
14816 as_expr=expr
14817else
14818 as_expr=false
14819fi
14820
81ecdfbb 14821if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
14822 as_basename=basename
14823else
14824 as_basename=false
14825fi
14826
81ecdfbb
RW
14827if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14828 as_dirname=dirname
14829else
14830 as_dirname=false
14831fi
bec39cab 14832
81ecdfbb 14833as_me=`$as_basename -- "$0" ||
bec39cab
AC
14834$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14835 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
14836 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14837$as_echo X/"$0" |
14838 sed '/^.*\/\([^/][^/]*\)\/*$/{
14839 s//\1/
14840 q
14841 }
14842 /^X\/\(\/\/\)$/{
14843 s//\1/
14844 q
14845 }
14846 /^X\/\(\/\).*/{
14847 s//\1/
14848 q
14849 }
14850 s/.*/./; q'`
b4e70030 14851
b4e70030
JB
14852# Avoid depending upon Character Ranges.
14853as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14854as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14855as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14856as_cr_digits='0123456789'
14857as_cr_alnum=$as_cr_Letters$as_cr_digits
14858
81ecdfbb
RW
14859ECHO_C= ECHO_N= ECHO_T=
14860case `echo -n x` in #(((((
14861-n*)
14862 case `echo 'xy\c'` in
14863 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14864 xy) ECHO_C='\c';;
14865 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14866 ECHO_T=' ';;
14867 esac;;
14868*)
14869 ECHO_N='-n';;
bec39cab
AC
14870esac
14871
81ecdfbb
RW
14872rm -f conf$$ conf$$.exe conf$$.file
14873if test -d conf$$.dir; then
14874 rm -f conf$$.dir/conf$$.file
bec39cab 14875else
81ecdfbb
RW
14876 rm -f conf$$.dir
14877 mkdir conf$$.dir 2>/dev/null
bec39cab 14878fi
81ecdfbb
RW
14879if (echo >conf$$.file) 2>/dev/null; then
14880 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 14881 as_ln_s='ln -s'
81ecdfbb
RW
14882 # ... but there are two gotchas:
14883 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14884 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14885 # In both cases, we have to default to `cp -p'.
14886 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14887 as_ln_s='cp -p'
14888 elif ln conf$$.file conf$$ 2>/dev/null; then
14889 as_ln_s=ln
14890 else
14891 as_ln_s='cp -p'
b4e70030 14892 fi
bec39cab
AC
14893else
14894 as_ln_s='cp -p'
14895fi
81ecdfbb
RW
14896rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14897rmdir conf$$.dir 2>/dev/null
14898
14899
14900# as_fn_mkdir_p
14901# -------------
14902# Create "$as_dir" as a directory, including parents if necessary.
14903as_fn_mkdir_p ()
14904{
14905
14906 case $as_dir in #(
14907 -*) as_dir=./$as_dir;;
14908 esac
14909 test -d "$as_dir" || eval $as_mkdir_p || {
14910 as_dirs=
14911 while :; do
14912 case $as_dir in #(
14913 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14914 *) as_qdir=$as_dir;;
14915 esac
14916 as_dirs="'$as_qdir' $as_dirs"
14917 as_dir=`$as_dirname -- "$as_dir" ||
14918$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14919 X"$as_dir" : 'X\(//\)[^/]' \| \
14920 X"$as_dir" : 'X\(//\)$' \| \
14921 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14922$as_echo X"$as_dir" |
14923 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14924 s//\1/
14925 q
14926 }
14927 /^X\(\/\/\)[^/].*/{
14928 s//\1/
14929 q
14930 }
14931 /^X\(\/\/\)$/{
14932 s//\1/
14933 q
14934 }
14935 /^X\(\/\).*/{
14936 s//\1/
14937 q
14938 }
14939 s/.*/./; q'`
14940 test -d "$as_dir" && break
14941 done
14942 test -z "$as_dirs" || eval "mkdir $as_dirs"
14943 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14944
bec39cab 14945
81ecdfbb 14946} # as_fn_mkdir_p
bec39cab 14947if mkdir -p . 2>/dev/null; then
81ecdfbb 14948 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
14949else
14950 test -d ./-p && rmdir ./-p
14951 as_mkdir_p=false
14952fi
14953
81ecdfbb
RW
14954if test -x / >/dev/null 2>&1; then
14955 as_test_x='test -x'
14956else
14957 if ls -dL / >/dev/null 2>&1; then
14958 as_ls_L_option=L
14959 else
14960 as_ls_L_option=
14961 fi
14962 as_test_x='
14963 eval sh -c '\''
14964 if test -d "$1"; then
14965 test -d "$1/.";
14966 else
14967 case $1 in #(
14968 -*)set "./$1";;
14969 esac;
14970 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14971 ???[sx]*):;;*)false;;esac;fi
14972 '\'' sh
14973 '
14974fi
14975as_executable_p=$as_test_x
bec39cab
AC
14976
14977# Sed expression to map a string onto a valid CPP name.
14978as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14979
14980# Sed expression to map a string onto a valid variable name.
14981as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14982
14983
bec39cab 14984exec 6>&1
81ecdfbb
RW
14985## ----------------------------------- ##
14986## Main body of $CONFIG_STATUS script. ##
14987## ----------------------------------- ##
14988_ASEOF
14989test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14990
14991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14992# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 14993# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
14994# values after options handling.
14995ac_log="
bec39cab 14996This file was extended by $as_me, which was
81ecdfbb 14997generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
14998
14999 CONFIG_FILES = $CONFIG_FILES
15000 CONFIG_HEADERS = $CONFIG_HEADERS
15001 CONFIG_LINKS = $CONFIG_LINKS
15002 CONFIG_COMMANDS = $CONFIG_COMMANDS
15003 $ $0 $@
15004
81ecdfbb
RW
15005on `(hostname || uname -n) 2>/dev/null | sed 1q`
15006"
15007
bec39cab
AC
15008_ACEOF
15009
81ecdfbb
RW
15010case $ac_config_files in *"
15011"*) set x $ac_config_files; shift; ac_config_files=$*;;
15012esac
234b45d4 15013
81ecdfbb
RW
15014case $ac_config_headers in *"
15015"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15016esac
b4e70030 15017
b4e70030 15018
81ecdfbb
RW
15019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15020# Files that config.status was made for.
15021config_files="$ac_config_files"
15022config_headers="$ac_config_headers"
15023config_links="$ac_config_links"
15024config_commands="$ac_config_commands"
234b45d4 15025
81ecdfbb 15026_ACEOF
b4e70030 15027
81ecdfbb 15028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15029ac_cs_usage="\
81ecdfbb
RW
15030\`$as_me' instantiates files and other configuration actions
15031from templates according to the current configuration. Unless the files
15032and actions are specified as TAGs, all are instantiated by default.
234b45d4 15033
81ecdfbb 15034Usage: $0 [OPTION]... [TAG]...
234b45d4 15035
bec39cab 15036 -h, --help print this help, then exit
81ecdfbb
RW
15037 -V, --version print version number and configuration settings, then exit
15038 -q, --quiet, --silent
15039 do not print progress messages
bec39cab
AC
15040 -d, --debug don't remove temporary files
15041 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15042 --file=FILE[:TEMPLATE]
15043 instantiate the configuration file FILE
15044 --header=FILE[:TEMPLATE]
15045 instantiate the configuration header FILE
234b45d4 15046
bec39cab
AC
15047Configuration files:
15048$config_files
234b45d4 15049
bec39cab
AC
15050Configuration headers:
15051$config_headers
234b45d4 15052
bec39cab
AC
15053Configuration links:
15054$config_links
234b45d4 15055
bec39cab
AC
15056Configuration commands:
15057$config_commands
15058
81ecdfbb 15059Report bugs to the package provider."
b4e70030 15060
81ecdfbb
RW
15061_ACEOF
15062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15063ac_cs_version="\\
15064config.status
81ecdfbb
RW
15065configured by $0, generated by GNU Autoconf 2.64,
15066 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15067
81ecdfbb 15068Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15069This config.status script is free software; the Free Software Foundation
15070gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15071
15072ac_pwd='$ac_pwd'
15073srcdir='$srcdir'
15074INSTALL='$INSTALL'
15075MKDIR_P='$MKDIR_P'
15076AWK='$AWK'
15077test -n "\$AWK" || AWK=awk
bec39cab
AC
15078_ACEOF
15079
81ecdfbb
RW
15080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15081# The default lists apply if the user does not specify any file.
bec39cab
AC
15082ac_need_defaults=:
15083while test $# != 0
15084do
15085 case $1 in
15086 --*=*)
81ecdfbb
RW
15087 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15088 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15089 ac_shift=:
c906108c 15090 ;;
81ecdfbb 15091 *)
bec39cab
AC
15092 ac_option=$1
15093 ac_optarg=$2
15094 ac_shift=shift
c906108c 15095 ;;
bec39cab 15096 esac
c906108c 15097
bec39cab
AC
15098 case $ac_option in
15099 # Handling of the options.
bec39cab
AC
15100 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15101 ac_cs_recheck=: ;;
81ecdfbb
RW
15102 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15103 $as_echo "$ac_cs_version"; exit ;;
15104 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15105 debug=: ;;
15106 --file | --fil | --fi | --f )
15107 $ac_shift
81ecdfbb
RW
15108 case $ac_optarg in
15109 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15110 esac
15111 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15112 ac_need_defaults=false;;
15113 --header | --heade | --head | --hea )
15114 $ac_shift
81ecdfbb
RW
15115 case $ac_optarg in
15116 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15117 esac
15118 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15119 ac_need_defaults=false;;
81ecdfbb
RW
15120 --he | --h)
15121 # Conflict between --help and --header
15122 as_fn_error "ambiguous option: \`$1'
15123Try \`$0 --help' for more information.";;
15124 --help | --hel | -h )
15125 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15126 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15127 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15128 ac_cs_silent=: ;;
c906108c 15129
bec39cab 15130 # This is an error.
81ecdfbb
RW
15131 -*) as_fn_error "unrecognized option: \`$1'
15132Try \`$0 --help' for more information." ;;
c906108c 15133
81ecdfbb
RW
15134 *) as_fn_append ac_config_targets " $1"
15135 ac_need_defaults=false ;;
c906108c 15136
bec39cab
AC
15137 esac
15138 shift
15139done
c906108c 15140
bec39cab 15141ac_configure_extra_args=
c906108c 15142
bec39cab
AC
15143if $ac_cs_silent; then
15144 exec 6>/dev/null
15145 ac_configure_extra_args="$ac_configure_extra_args --silent"
15146fi
c906108c 15147
bec39cab 15148_ACEOF
81ecdfbb 15149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15150if \$ac_cs_recheck; then
81ecdfbb
RW
15151 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15152 shift
15153 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15154 CONFIG_SHELL='$SHELL'
15155 export CONFIG_SHELL
15156 exec "\$@"
bec39cab
AC
15157fi
15158
15159_ACEOF
81ecdfbb
RW
15160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15161exec 5>>config.log
15162{
15163 echo
15164 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15165## Running $as_me. ##
15166_ASBOX
15167 $as_echo "$ac_log"
15168} >&5
bec39cab 15169
81ecdfbb
RW
15170_ACEOF
15171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15172#
81ecdfbb 15173# INIT-COMMANDS
c906108c 15174#
a417dc56 15175ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 15176AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 15177
bec39cab
AC
15178_ACEOF
15179
81ecdfbb 15180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15181
81ecdfbb 15182# Handling of arguments.
bec39cab 15183for ac_config_target in $ac_config_targets
c906108c 15184do
81ecdfbb
RW
15185 case $ac_config_target in
15186 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15187 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15188 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15189 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
15190 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15191 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
15192 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
15193 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15194
15195 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15196 esac
15197done
15198
81ecdfbb 15199
bec39cab
AC
15200# If the user did not use the arguments to specify the items to instantiate,
15201# then the envvar interface is used. Set only those that are not.
15202# We use the long form for the default assignment because of an extremely
15203# bizarre bug on SunOS 4.1.3.
15204if $ac_need_defaults; then
15205 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15206 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15207 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15208 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15209fi
15210
b4e70030 15211# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15212# simply because there is no reason against having it here, and in addition,
b4e70030 15213# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15214# Hook for its removal unless debugging.
15215# Note that there is a small window in which the directory will not be cleaned:
15216# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15217$debug ||
15218{
81ecdfbb
RW
15219 tmp=
15220 trap 'exit_status=$?
15221 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15222' 0
15223 trap 'as_fn_exit 1' 1 2 13 15
15224}
15225# Create a (secure) tmp directory for tmp files.
15226
15227{
15228 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15229 test -n "$tmp" && test -d "$tmp"
15230} ||
15231{
15232 tmp=./conf$$-$RANDOM
15233 (umask 077 && mkdir "$tmp")
15234} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15235
15236# Set up the scripts for CONFIG_FILES section.
15237# No need to generate them if there are no CONFIG_FILES.
15238# This happens for instance with `./config.status config.h'.
15239if test -n "$CONFIG_FILES"; then
15240
15241if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15242 ac_cs_awk_getline=:
15243 ac_cs_awk_pipe_init=
15244 ac_cs_awk_read_file='
15245 while ((getline aline < (F[key])) > 0)
15246 print(aline)
15247 close(F[key])'
15248 ac_cs_awk_pipe_fini=
15249else
15250 ac_cs_awk_getline=false
15251 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15252 ac_cs_awk_read_file='
15253 print "|#_!!_#|"
15254 print "cat " F[key] " &&"
15255 '$ac_cs_awk_pipe_init
15256 # The final `:' finishes the AND list.
15257 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15258fi
15259ac_cr=`echo X | tr X '\015'`
15260# On cygwin, bash can eat \r inside `` if the user requested igncr.
15261# But we know of no other shell where ac_cr would be empty at this
15262# point, so we can use a bashism as a fallback.
15263if test "x$ac_cr" = x; then
15264 eval ac_cr=\$\'\\r\'
15265fi
15266ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15267if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15268 ac_cs_awk_cr='\r'
15269else
15270 ac_cs_awk_cr=$ac_cr
15271fi
15272
15273echo 'BEGIN {' >"$tmp/subs1.awk" &&
15274_ACEOF
15275
15276# Create commands to substitute file output variables.
15277{
15278 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15279 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15280 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15281 echo "_ACAWK" &&
15282 echo "_ACEOF"
15283} >conf$$files.sh &&
15284. ./conf$$files.sh ||
15285 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15286rm -f conf$$files.sh
15287
15288{
15289 echo "cat >conf$$subs.awk <<_ACEOF" &&
15290 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15291 echo "_ACEOF"
15292} >conf$$subs.sh ||
15293 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15294ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15295ac_delim='%!_!# '
15296for ac_last_try in false false false false false :; do
15297 . ./conf$$subs.sh ||
15298 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15299
15300 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15301 if test $ac_delim_n = $ac_delim_num; then
15302 break
15303 elif $ac_last_try; then
15304 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15305 else
15306 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15307 fi
15308done
15309rm -f conf$$subs.sh
15310
15311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15312cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15313_ACEOF
15314sed -n '
15315h
15316s/^/S["/; s/!.*/"]=/
15317p
15318g
15319s/^[^!]*!//
15320:repl
15321t repl
15322s/'"$ac_delim"'$//
15323t delim
15324:nl
15325h
15326s/\(.\{148\}\).*/\1/
15327t more1
15328s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15329p
15330n
15331b repl
15332:more1
15333s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15334p
15335g
15336s/.\{148\}//
15337t nl
15338:delim
15339h
15340s/\(.\{148\}\).*/\1/
15341t more2
15342s/["\\]/\\&/g; s/^/"/; s/$/"/
15343p
15344b
15345:more2
15346s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15347p
15348g
15349s/.\{148\}//
15350t delim
15351' <conf$$subs.awk | sed '
15352/^[^""]/{
15353 N
15354 s/\n//
15355}
15356' >>$CONFIG_STATUS || ac_write_fail=1
15357rm -f conf$$subs.awk
15358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15359_ACAWK
15360cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15361 for (key in S) S_is_set[key] = 1
15362 FS = "\a"
15363 \$ac_cs_awk_pipe_init
15364}
15365{
15366 line = $ 0
15367 nfields = split(line, field, "@")
15368 substed = 0
15369 len = length(field[1])
15370 for (i = 2; i < nfields; i++) {
15371 key = field[i]
15372 keylen = length(key)
15373 if (S_is_set[key]) {
15374 value = S[key]
15375 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15376 len += length(value) + length(field[++i])
15377 substed = 1
15378 } else
15379 len += 1 + keylen
15380 }
15381 if (nfields == 3 && !substed) {
15382 key = field[2]
15383 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15384 \$ac_cs_awk_read_file
15385 next
15386 }
15387 }
15388 print line
b4e70030 15389}
81ecdfbb
RW
15390\$ac_cs_awk_pipe_fini
15391_ACAWK
15392_ACEOF
15393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15394if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15395 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15396else
15397 cat
15398fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15399 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15400_ACEOF
15401
15402# VPATH may cause trouble with some makes, so we remove $(srcdir),
15403# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15404# trailing colons and then remove the whole line if VPATH becomes empty
15405# (actually we leave an empty line to preserve line numbers).
15406if test "x$srcdir" = x.; then
15407 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15408s/:*\$(srcdir):*/:/
15409s/:*\${srcdir}:*/:/
15410s/:*@srcdir@:*/:/
15411s/^\([^=]*=[ ]*\):*/\1/
15412s/:*$//
15413s/^[^=]*=[ ]*$//
15414}'
15415fi
15416
15417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15418fi # test -n "$CONFIG_FILES"
15419
15420# Set up the scripts for CONFIG_HEADERS section.
15421# No need to generate them if there are no CONFIG_HEADERS.
15422# This happens for instance with `./config.status Makefile'.
15423if test -n "$CONFIG_HEADERS"; then
15424cat >"$tmp/defines.awk" <<\_ACAWK ||
15425BEGIN {
15426_ACEOF
15427
15428# Transform confdefs.h into an awk script `defines.awk', embedded as
15429# here-document in config.status, that substitutes the proper values into
15430# config.h.in to produce config.h.
4e8d927d 15431
81ecdfbb
RW
15432# Create a delimiter string that does not exist in confdefs.h, to ease
15433# handling of long lines.
15434ac_delim='%!_!# '
15435for ac_last_try in false false :; do
15436 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15437 if test -z "$ac_t"; then
15438 break
15439 elif $ac_last_try; then
15440 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15441 else
15442 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15443 fi
15444done
4e8d927d 15445
81ecdfbb
RW
15446# For the awk script, D is an array of macro values keyed by name,
15447# likewise P contains macro parameters if any. Preserve backslash
15448# newline sequences.
15449
15450ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15451sed -n '
15452s/.\{148\}/&'"$ac_delim"'/g
15453t rset
15454:rset
15455s/^[ ]*#[ ]*define[ ][ ]*/ /
15456t def
15457d
15458:def
15459s/\\$//
15460t bsnl
15461s/["\\]/\\&/g
15462s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15463D["\1"]=" \3"/p
15464s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15465d
15466:bsnl
15467s/["\\]/\\&/g
15468s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15469D["\1"]=" \3\\\\\\n"\\/p
15470t cont
15471s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15472t cont
15473d
15474:cont
15475n
15476s/.\{148\}/&'"$ac_delim"'/g
15477t clear
15478:clear
15479s/\\$//
15480t bsnlc
15481s/["\\]/\\&/g; s/^/"/; s/$/"/p
15482d
15483:bsnlc
15484s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15485b cont
15486' <confdefs.h | sed '
15487s/'"$ac_delim"'/"\\\
15488"/g' >>$CONFIG_STATUS || ac_write_fail=1
15489
15490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15491 for (key in D) D_is_set[key] = 1
15492 FS = "\a"
15493}
15494/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15495 line = \$ 0
15496 split(line, arg, " ")
15497 if (arg[1] == "#") {
15498 defundef = arg[2]
15499 mac1 = arg[3]
15500 } else {
15501 defundef = substr(arg[1], 2)
15502 mac1 = arg[2]
15503 }
15504 split(mac1, mac2, "(") #)
15505 macro = mac2[1]
15506 prefix = substr(line, 1, index(line, defundef) - 1)
15507 if (D_is_set[macro]) {
15508 # Preserve the white space surrounding the "#".
15509 print prefix "define", macro P[macro] D[macro]
15510 next
15511 } else {
15512 # Replace #undef with comments. This is necessary, for example,
15513 # in the case of _POSIX_SOURCE, which is predefined and required
15514 # on some systems where configure will not decide to define it.
15515 if (defundef == "undef") {
15516 print "/*", prefix defundef, macro, "*/"
15517 next
15518 }
15519 }
b4e70030 15520}
81ecdfbb
RW
15521{ print }
15522_ACAWK
b4e70030 15523_ACEOF
81ecdfbb
RW
15524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15525 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15526fi # test -n "$CONFIG_HEADERS"
4e8d927d 15527
4e8d927d 15528
81ecdfbb
RW
15529eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15530shift
15531for ac_tag
15532do
15533 case $ac_tag in
15534 :[FHLC]) ac_mode=$ac_tag; continue;;
15535 esac
15536 case $ac_mode$ac_tag in
15537 :[FHL]*:*);;
15538 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15539 :[FH]-) ac_tag=-:-;;
15540 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15541 esac
15542 ac_save_IFS=$IFS
15543 IFS=:
15544 set x $ac_tag
15545 IFS=$ac_save_IFS
15546 shift
15547 ac_file=$1
15548 shift
4e8d927d 15549
81ecdfbb
RW
15550 case $ac_mode in
15551 :L) ac_source=$1;;
15552 :[FH])
15553 ac_file_inputs=
15554 for ac_f
15555 do
15556 case $ac_f in
15557 -) ac_f="$tmp/stdin";;
15558 *) # Look for the file first in the build tree, then in the source tree
15559 # (if the path is not absolute). The absolute path cannot be DOS-style,
15560 # because $ac_f cannot contain `:'.
15561 test -f "$ac_f" ||
15562 case $ac_f in
15563 [\\/$]*) false;;
15564 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15565 esac ||
15566 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15567 esac
15568 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15569 as_fn_append ac_file_inputs " '$ac_f'"
15570 done
15571
15572 # Let's still pretend it is `configure' which instantiates (i.e., don't
15573 # use $as_me), people would be surprised to read:
15574 # /* config.h. Generated by config.status. */
15575 configure_input='Generated from '`
15576 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15577 `' by configure.'
15578 if test x"$ac_file" != x-; then
15579 configure_input="$ac_file. $configure_input"
15580 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15581$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15582 fi
81ecdfbb
RW
15583 # Neutralize special characters interpreted by sed in replacement strings.
15584 case $configure_input in #(
15585 *\&* | *\|* | *\\* )
15586 ac_sed_conf_input=`$as_echo "$configure_input" |
15587 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15588 *) ac_sed_conf_input=$configure_input;;
15589 esac
4e8d927d 15590
81ecdfbb
RW
15591 case $ac_tag in
15592 *:-:* | *:-) cat >"$tmp/stdin" \
15593 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15594 esac
15595 ;;
c906108c
SS
15596 esac
15597
81ecdfbb 15598 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15599$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15600 X"$ac_file" : 'X\(//\)[^/]' \| \
15601 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15602 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15603$as_echo X"$ac_file" |
15604 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15605 s//\1/
15606 q
15607 }
15608 /^X\(\/\/\)[^/].*/{
15609 s//\1/
15610 q
15611 }
15612 /^X\(\/\/\)$/{
15613 s//\1/
15614 q
15615 }
15616 /^X\(\/\).*/{
15617 s//\1/
15618 q
15619 }
15620 s/.*/./; q'`
15621 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15622 ac_builddir=.
15623
81ecdfbb
RW
15624case "$ac_dir" in
15625.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15626*)
15627 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15628 # A ".." for each directory in $ac_dir_suffix.
15629 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15630 case $ac_top_builddir_sub in
15631 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15632 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15633 esac ;;
15634esac
15635ac_abs_top_builddir=$ac_pwd
15636ac_abs_builddir=$ac_pwd$ac_dir_suffix
15637# for backward compatibility:
15638ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15639
15640case $srcdir in
81ecdfbb 15641 .) # We are building in place.
bec39cab 15642 ac_srcdir=.
81ecdfbb
RW
15643 ac_top_srcdir=$ac_top_builddir_sub
15644 ac_abs_top_srcdir=$ac_pwd ;;
15645 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15646 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15647 ac_top_srcdir=$srcdir
15648 ac_abs_top_srcdir=$srcdir ;;
15649 *) # Relative name.
15650 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15651 ac_top_srcdir=$ac_top_build_prefix$srcdir
15652 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15653esac
81ecdfbb 15654ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15655
c906108c 15656
81ecdfbb
RW
15657 case $ac_mode in
15658 :F)
15659 #
15660 # CONFIG_FILE
15661 #
c906108c 15662
bec39cab
AC
15663 case $INSTALL in
15664 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15665 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15666 esac
81ecdfbb
RW
15667 ac_MKDIR_P=$MKDIR_P
15668 case $MKDIR_P in
15669 [\\/$]* | ?:[\\/]* ) ;;
15670 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15671 esac
15672_ACEOF
121ce6e5 15673
81ecdfbb
RW
15674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15675# If the template does not know about datarootdir, expand it.
15676# FIXME: This hack should be removed a few years after 2.60.
15677ac_datarootdir_hack=; ac_datarootdir_seen=
15678ac_sed_dataroot='
15679/datarootdir/ {
15680 p
15681 q
15682}
15683/@datadir@/p
15684/@docdir@/p
15685/@infodir@/p
15686/@localedir@/p
15687/@mandir@/p'
15688case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15689*datarootdir*) ac_datarootdir_seen=yes;;
15690*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15692$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15693_ACEOF
15694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15695 ac_datarootdir_hack='
15696 s&@datadir@&$datadir&g
15697 s&@docdir@&$docdir&g
15698 s&@infodir@&$infodir&g
15699 s&@localedir@&$localedir&g
15700 s&@mandir@&$mandir&g
15701 s&\\\${datarootdir}&$datarootdir&g' ;;
15702esac
4e8d927d 15703_ACEOF
81ecdfbb
RW
15704
15705# Neutralize VPATH when `$srcdir' = `.'.
15706# Shell code in configure.ac might set extrasub.
15707# FIXME: do we really want to maintain this feature?
15708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15709ac_sed_extra="$ac_vpsub
bec39cab
AC
15710$extrasub
15711_ACEOF
81ecdfbb 15712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
15713:t
15714/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
15715s|@configure_input@|$ac_sed_conf_input|;t t
15716s&@top_builddir@&$ac_top_builddir_sub&;t t
15717s&@top_build_prefix@&$ac_top_build_prefix&;t t
15718s&@srcdir@&$ac_srcdir&;t t
15719s&@abs_srcdir@&$ac_abs_srcdir&;t t
15720s&@top_srcdir@&$ac_top_srcdir&;t t
15721s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15722s&@builddir@&$ac_builddir&;t t
15723s&@abs_builddir@&$ac_abs_builddir&;t t
15724s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15725s&@INSTALL@&$ac_INSTALL&;t t
15726s&@MKDIR_P@&$ac_MKDIR_P&;t t
15727$ac_datarootdir_hack
15728"
15729eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15730if $ac_cs_awk_getline; then
15731 $AWK -f "$tmp/subs.awk"
15732else
15733 $AWK -f "$tmp/subs.awk" | $SHELL
15734fi >$tmp/out \
15735 || as_fn_error "could not create $ac_file" "$LINENO" 5
15736
15737test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15738 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15739 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15741which seems to be undefined. Please make sure it is defined." >&5
15742$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15743which seems to be undefined. Please make sure it is defined." >&2;}
15744
15745 rm -f "$tmp/stdin"
bec39cab 15746 case $ac_file in
81ecdfbb
RW
15747 -) cat "$tmp/out" && rm -f "$tmp/out";;
15748 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15749 esac \
15750 || as_fn_error "could not create $ac_file" "$LINENO" 5
15751 ;;
15752 :H)
15753 #
15754 # CONFIG_HEADER
15755 #
bec39cab 15756 if test x"$ac_file" != x-; then
81ecdfbb
RW
15757 {
15758 $as_echo "/* $configure_input */" \
15759 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15760 } >"$tmp/config.h" \
15761 || as_fn_error "could not create $ac_file" "$LINENO" 5
15762 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15764$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 15765 else
81ecdfbb
RW
15766 rm -f "$ac_file"
15767 mv "$tmp/config.h" "$ac_file" \
15768 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
15769 fi
15770 else
81ecdfbb
RW
15771 $as_echo "/* $configure_input */" \
15772 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15773 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 15774 fi
81ecdfbb
RW
15775# Compute "$ac_file"'s index in $config_headers.
15776_am_arg="$ac_file"
e28b3332
DJ
15777_am_stamp_count=1
15778for _am_header in $config_headers :; do
15779 case $_am_header in
81ecdfbb 15780 $_am_arg | $_am_arg:* )
e28b3332
DJ
15781 break ;;
15782 * )
15783 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15784 esac
15785done
81ecdfbb
RW
15786echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15787$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15788 X"$_am_arg" : 'X\(//\)[^/]' \| \
15789 X"$_am_arg" : 'X\(//\)$' \| \
15790 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15791$as_echo X"$_am_arg" |
15792 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15793 s//\1/
15794 q
15795 }
15796 /^X\(\/\/\)[^/].*/{
15797 s//\1/
15798 q
15799 }
15800 /^X\(\/\/\)$/{
15801 s//\1/
15802 q
15803 }
15804 /^X\(\/\).*/{
15805 s//\1/
15806 q
15807 }
15808 s/.*/./; q'`/stamp-h$_am_stamp_count
15809 ;;
15810 :L)
15811 #
15812 # CONFIG_LINK
15813 #
c906108c 15814
81ecdfbb
RW
15815 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15816 :
b4e70030 15817 else
81ecdfbb
RW
15818 # Prefer the file from the source tree if names are identical.
15819 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15820 ac_source=$srcdir/$ac_source
15821 fi
b4e70030 15822
81ecdfbb
RW
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15824$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 15825
81ecdfbb
RW
15826 if test ! -r "$ac_source"; then
15827 as_fn_error "$ac_source: file not found" "$LINENO" 5
15828 fi
15829 rm -f "$ac_file"
bec39cab 15830
81ecdfbb
RW
15831 # Try a relative symlink, then a hard link, then a copy.
15832 case $srcdir in
15833 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15834 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15835 esac
15836 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15837 ln "$ac_source" "$ac_file" 2>/dev/null ||
15838 cp -p "$ac_source" "$ac_file" ||
15839 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15840 fi
15841 ;;
15842 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15843$as_echo "$as_me: executing $ac_file commands" >&6;}
15844 ;;
c906108c 15845 esac
b4e70030 15846
bec39cab 15847
81ecdfbb
RW
15848 case $ac_file$ac_mode in
15849 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
15850 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15851 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15852 # are listed without --file. Let's play safe and only enable the eval
15853 # if we detect the quoting.
15854 case $CONFIG_FILES in
15855 *\'*) eval set x "$CONFIG_FILES" ;;
15856 *) set x $CONFIG_FILES ;;
15857 esac
15858 shift
15859 for mf
15860 do
15861 # Strip MF so we end up with the name of the file.
15862 mf=`echo "$mf" | sed -e 's/:.*$//'`
15863 # Check whether this is an Automake generated Makefile or not.
15864 # We used to match only the files named `Makefile.in', but
15865 # some people rename them; so instead we look at the file content.
15866 # Grep'ing the first line is not enough: some people post-process
15867 # each Makefile.in and add a new line on top of each file to say so.
15868 # Grep'ing the whole file is not good either: AIX grep has a line
15869 # limit of 2048, but all sed's we know have understand at least 4000.
15870 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15871 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
15872$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15873 X"$mf" : 'X\(//\)[^/]' \| \
15874 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
15875 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15876$as_echo X"$mf" |
15877 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15878 s//\1/
15879 q
15880 }
15881 /^X\(\/\/\)[^/].*/{
15882 s//\1/
15883 q
15884 }
15885 /^X\(\/\/\)$/{
15886 s//\1/
15887 q
15888 }
15889 /^X\(\/\).*/{
15890 s//\1/
15891 q
15892 }
15893 s/.*/./; q'`
15894 else
15895 continue
15896 fi
15897 # Extract the definition of DEPDIR, am__include, and am__quote
15898 # from the Makefile without running `make'.
15899 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15900 test -z "$DEPDIR" && continue
15901 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15902 test -z "am__include" && continue
15903 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15904 # When using ansi2knr, U may be empty or an underscore; expand it
15905 U=`sed -n 's/^U = //p' < "$mf"`
15906 # Find all dependency output files, they are included files with
15907 # $(DEPDIR) in their names. We invoke sed twice because it is the
15908 # simplest approach to changing $(DEPDIR) to its actual value in the
15909 # expansion.
15910 for file in `sed -n "
15911 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
15912 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15913 # Make sure the directory exists.
15914 test -f "$dirpart/$file" && continue
15915 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
15916$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15917 X"$file" : 'X\(//\)[^/]' \| \
15918 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
15919 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
15920$as_echo X"$file" |
15921 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15922 s//\1/
15923 q
15924 }
15925 /^X\(\/\/\)[^/].*/{
15926 s//\1/
15927 q
15928 }
15929 /^X\(\/\/\)$/{
15930 s//\1/
15931 q
15932 }
15933 /^X\(\/\).*/{
15934 s//\1/
15935 q
15936 }
15937 s/.*/./; q'`
15938 as_dir=$dirpart/$fdir; as_fn_mkdir_p
15939 # echo "creating $dirpart/$file"
15940 echo '# dummy' > "$dirpart/$file"
e28b3332 15941 done
e28b3332 15942 done
81ecdfbb 15943}
4e8d927d 15944 ;;
81ecdfbb 15945 "default":C)
c906108c
SS
15946case x$CONFIG_HEADERS in
15947xconfig.h:config.in)
15948echo > stamp-h ;;
15949esac
bec39cab 15950 ;;
81ecdfbb 15951
bec39cab 15952 esac
81ecdfbb 15953done # for ac_tag
c906108c 15954
bec39cab 15955
81ecdfbb 15956as_fn_exit 0
bec39cab 15957_ACEOF
bec39cab
AC
15958ac_clean_files=$ac_clean_files_save
15959
81ecdfbb
RW
15960test $ac_write_fail = 0 ||
15961 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
15962
bec39cab
AC
15963
15964# configure is writing to config.log, and then calls config.status.
15965# config.status does its own redirection, appending to config.log.
15966# Unfortunately, on DOS this fails, as config.log is still kept open
15967# by configure, so config.status won't be able to write to it; its
15968# output is simply discarded. So we exec the FD to /dev/null,
15969# effectively closing config.log, so it can be properly (re)opened and
15970# appended to by config.status. When coming back to configure, we
15971# need to make the FD available again.
15972if test "$no_create" != yes; then
15973 ac_cs_success=:
15974 ac_config_status_args=
15975 test "$silent" = yes &&
15976 ac_config_status_args="$ac_config_status_args --quiet"
15977 exec 5>/dev/null
15978 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15979 exec 5>>config.log
15980 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15981 # would make configure fail if this is the last instruction.
81ecdfbb 15982 $ac_cs_success || as_fn_exit $?
bec39cab 15983fi
c906108c 15984
bec39cab 15985#
81ecdfbb 15986# CONFIG_SUBDIRS section.
bec39cab 15987#
c906108c
SS
15988if test "$no_recursion" != yes; then
15989
81ecdfbb
RW
15990 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
15991 # so they do not pile up.
c906108c
SS
15992 ac_sub_configure_args=
15993 ac_prev=
fdc59709
PB
15994 eval "set x $ac_configure_args"
15995 shift
15996 for ac_arg
15997 do
c906108c
SS
15998 if test -n "$ac_prev"; then
15999 ac_prev=
16000 continue
16001 fi
bec39cab 16002 case $ac_arg in
c906108c
SS
16003 -cache-file | --cache-file | --cache-fil | --cache-fi \
16004 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16005 ac_prev=cache_file ;;
16006 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16007 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16008 | --c=*)
16009 ;;
16010 --config-cache | -C)
c906108c
SS
16011 ;;
16012 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16013 ac_prev=srcdir ;;
16014 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16015 ;;
bec39cab
AC
16016 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16017 ac_prev=prefix ;;
16018 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16019 ;;
81ecdfbb
RW
16020 --disable-option-checking)
16021 ;;
fdc59709
PB
16022 *)
16023 case $ac_arg in
81ecdfbb 16024 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16025 esac
81ecdfbb 16026 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16027 esac
16028 done
16029
bec39cab
AC
16030 # Always prepend --prefix to ensure using the same prefix
16031 # in subdir configurations.
fdc59709
PB
16032 ac_arg="--prefix=$prefix"
16033 case $ac_arg in
81ecdfbb 16034 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16035 esac
81ecdfbb
RW
16036 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16037
16038 # Pass --silent
16039 if test "$silent" = yes; then
16040 ac_sub_configure_args="--silent $ac_sub_configure_args"
16041 fi
16042
16043 # Always prepend --disable-option-checking to silence warnings, since
16044 # different subdirs can have different --enable and --with options.
16045 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16046
b4e70030 16047 ac_popdir=`pwd`
bec39cab 16048 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16049
16050 # Do not complain, so a configure script can configure whichever
16051 # parts of a large source tree are present.
fdc59709 16052 test -d "$srcdir/$ac_dir" || continue
c906108c 16053
81ecdfbb
RW
16054 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16055 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16056 $as_echo "$ac_msg" >&6
16057 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16058 ac_builddir=.
16059
81ecdfbb
RW
16060case "$ac_dir" in
16061.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16062*)
16063 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16064 # A ".." for each directory in $ac_dir_suffix.
16065 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16066 case $ac_top_builddir_sub in
16067 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16068 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16069 esac ;;
16070esac
16071ac_abs_top_builddir=$ac_pwd
16072ac_abs_builddir=$ac_pwd$ac_dir_suffix
16073# for backward compatibility:
16074ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16075
16076case $srcdir in
81ecdfbb 16077 .) # We are building in place.
bec39cab 16078 ac_srcdir=.
81ecdfbb
RW
16079 ac_top_srcdir=$ac_top_builddir_sub
16080 ac_abs_top_srcdir=$ac_pwd ;;
16081 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16082 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16083 ac_top_srcdir=$srcdir
16084 ac_abs_top_srcdir=$srcdir ;;
16085 *) # Relative name.
16086 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16087 ac_top_srcdir=$ac_top_build_prefix$srcdir
16088 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16089esac
81ecdfbb 16090ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16091
c906108c 16092
fdc59709 16093 cd "$ac_dir"
c906108c
SS
16094
16095 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16096 if test -f "$ac_srcdir/configure.gnu"; then
16097 ac_sub_configure=$ac_srcdir/configure.gnu
16098 elif test -f "$ac_srcdir/configure"; then
16099 ac_sub_configure=$ac_srcdir/configure
16100 elif test -f "$ac_srcdir/configure.in"; then
16101 # This should be Cygnus configure.
16102 ac_sub_configure=$ac_aux_dir/configure
c906108c 16103 else
81ecdfbb
RW
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16105$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16106 ac_sub_configure=
16107 fi
16108
16109 # The recursion is here.
16110 if test -n "$ac_sub_configure"; then
c906108c 16111 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16112 case $cache_file in
16113 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16114 *) # Relative name.
16115 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16116 esac
c906108c 16117
81ecdfbb
RW
16118 { $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
16119$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16120 # The eval makes quoting arguments work.
fdc59709
PB
16121 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16122 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16123 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16124 fi
16125
fdc59709 16126 cd "$ac_popdir"
c906108c
SS
16127 done
16128fi
81ecdfbb
RW
16129if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16131$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16132fi
c906108c
SS
16133
16134
16135exit 0
This page took 1.934306 seconds and 4 git commands to generate.