* win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
[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
b040ad30 899with_zlib
81ecdfbb
RW
900with_libiconv_prefix
901with_system_readline
902with_expat
903with_gnu_ld
904enable_rpath
905with_libexpat_prefix
906with_python
907with_included_regex
908with_sysroot
909with_system_gdbinit
910enable_werror
911enable_build_warnings
912enable_gdb_build_warnings
913with_tcl
914with_tk
915with_x
916enable_sim
917enable_multi_ice
81ecdfbb
RW
918'
919 ac_precious_vars='build_alias
920host_alias
921target_alias
922CC
923CFLAGS
924LDFLAGS
925LIBS
926CPPFLAGS
927CPP
928YACC
929YFLAGS
930XMKMF'
931ac_subdirs_all='doc testsuite
932gdbtk
933multi-ice
934gdbserver'
c906108c
SS
935
936# Initialize some variables set by options.
bec39cab
AC
937ac_init_help=
938ac_init_version=false
81ecdfbb
RW
939ac_unrecognized_opts=
940ac_unrecognized_sep=
c906108c
SS
941# The variables have the same names as the options, with
942# dashes changed to underlines.
bec39cab 943cache_file=/dev/null
c906108c 944exec_prefix=NONE
c906108c 945no_create=
c906108c
SS
946no_recursion=
947prefix=NONE
948program_prefix=NONE
949program_suffix=NONE
950program_transform_name=s,x,x,
951silent=
952site=
953srcdir=
c906108c
SS
954verbose=
955x_includes=NONE
956x_libraries=NONE
bec39cab
AC
957
958# Installation directory options.
959# These are left unexpanded so users can "make install exec_prefix=/foo"
960# and all the variables that are supposed to be based on exec_prefix
961# by default will actually change.
962# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 963# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
964bindir='${exec_prefix}/bin'
965sbindir='${exec_prefix}/sbin'
966libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
967datarootdir='${prefix}/share'
968datadir='${datarootdir}'
c906108c
SS
969sysconfdir='${prefix}/etc'
970sharedstatedir='${prefix}/com'
971localstatedir='${prefix}/var'
c906108c
SS
972includedir='${prefix}/include'
973oldincludedir='/usr/include'
81ecdfbb
RW
974docdir='${datarootdir}/doc/${PACKAGE}'
975infodir='${datarootdir}/info'
976htmldir='${docdir}'
977dvidir='${docdir}'
978pdfdir='${docdir}'
979psdir='${docdir}'
980libdir='${exec_prefix}/lib'
981localedir='${datarootdir}/locale'
982mandir='${datarootdir}/man'
c906108c 983
c906108c 984ac_prev=
81ecdfbb 985ac_dashdash=
c906108c
SS
986for ac_option
987do
c906108c
SS
988 # If the previous option needs an argument, assign it.
989 if test -n "$ac_prev"; then
81ecdfbb 990 eval $ac_prev=\$ac_option
c906108c
SS
991 ac_prev=
992 continue
993 fi
994
81ecdfbb
RW
995 case $ac_option in
996 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
997 *) ac_optarg=yes ;;
998 esac
c906108c
SS
999
1000 # Accept the important Cygnus configure options, so we can diagnose typos.
1001
81ecdfbb
RW
1002 case $ac_dashdash$ac_option in
1003 --)
1004 ac_dashdash=yes ;;
c906108c
SS
1005
1006 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1007 ac_prev=bindir ;;
1008 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1009 bindir=$ac_optarg ;;
c906108c
SS
1010
1011 -build | --build | --buil | --bui | --bu)
bec39cab 1012 ac_prev=build_alias ;;
c906108c 1013 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1014 build_alias=$ac_optarg ;;
c906108c
SS
1015
1016 -cache-file | --cache-file | --cache-fil | --cache-fi \
1017 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1018 ac_prev=cache_file ;;
1019 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1020 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1021 cache_file=$ac_optarg ;;
1022
1023 --config-cache | -C)
1024 cache_file=config.cache ;;
c906108c 1025
81ecdfbb 1026 -datadir | --datadir | --datadi | --datad)
c906108c 1027 ac_prev=datadir ;;
81ecdfbb 1028 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1029 datadir=$ac_optarg ;;
c906108c 1030
81ecdfbb
RW
1031 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1032 | --dataroo | --dataro | --datar)
1033 ac_prev=datarootdir ;;
1034 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1035 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1036 datarootdir=$ac_optarg ;;
1037
c906108c 1038 -disable-* | --disable-*)
81ecdfbb 1039 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1040 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1041 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1042 as_fn_error "invalid feature name: $ac_useropt"
1043 ac_useropt_orig=$ac_useropt
1044 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1045 case $ac_user_opts in
1046 *"
1047"enable_$ac_useropt"
1048"*) ;;
1049 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1050 ac_unrecognized_sep=', ';;
1051 esac
1052 eval enable_$ac_useropt=no ;;
1053
1054 -docdir | --docdir | --docdi | --doc | --do)
1055 ac_prev=docdir ;;
1056 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1057 docdir=$ac_optarg ;;
1058
1059 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1060 ac_prev=dvidir ;;
1061 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1062 dvidir=$ac_optarg ;;
c906108c
SS
1063
1064 -enable-* | --enable-*)
81ecdfbb 1065 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1066 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1067 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1068 as_fn_error "invalid feature name: $ac_useropt"
1069 ac_useropt_orig=$ac_useropt
1070 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1071 case $ac_user_opts in
1072 *"
1073"enable_$ac_useropt"
1074"*) ;;
1075 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1076 ac_unrecognized_sep=', ';;
b4e70030 1077 esac
81ecdfbb 1078 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1079
1080 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1081 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1082 | --exec | --exe | --ex)
1083 ac_prev=exec_prefix ;;
1084 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1085 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1086 | --exec=* | --exe=* | --ex=*)
bec39cab 1087 exec_prefix=$ac_optarg ;;
c906108c
SS
1088
1089 -gas | --gas | --ga | --g)
1090 # Obsolete; use --with-gas.
1091 with_gas=yes ;;
1092
bec39cab
AC
1093 -help | --help | --hel | --he | -h)
1094 ac_init_help=long ;;
1095 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1096 ac_init_help=recursive ;;
1097 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1098 ac_init_help=short ;;
c906108c
SS
1099
1100 -host | --host | --hos | --ho)
bec39cab 1101 ac_prev=host_alias ;;
c906108c 1102 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1103 host_alias=$ac_optarg ;;
c906108c 1104
81ecdfbb
RW
1105 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1106 ac_prev=htmldir ;;
1107 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1108 | --ht=*)
1109 htmldir=$ac_optarg ;;
1110
c906108c
SS
1111 -includedir | --includedir | --includedi | --included | --include \
1112 | --includ | --inclu | --incl | --inc)
1113 ac_prev=includedir ;;
1114 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1115 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1116 includedir=$ac_optarg ;;
c906108c
SS
1117
1118 -infodir | --infodir | --infodi | --infod | --info | --inf)
1119 ac_prev=infodir ;;
1120 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1121 infodir=$ac_optarg ;;
c906108c
SS
1122
1123 -libdir | --libdir | --libdi | --libd)
1124 ac_prev=libdir ;;
1125 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1126 libdir=$ac_optarg ;;
c906108c
SS
1127
1128 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1129 | --libexe | --libex | --libe)
1130 ac_prev=libexecdir ;;
1131 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1132 | --libexe=* | --libex=* | --libe=*)
bec39cab 1133 libexecdir=$ac_optarg ;;
c906108c 1134
81ecdfbb
RW
1135 -localedir | --localedir | --localedi | --localed | --locale)
1136 ac_prev=localedir ;;
1137 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1138 localedir=$ac_optarg ;;
1139
c906108c 1140 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1141 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1142 ac_prev=localstatedir ;;
1143 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1144 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1145 localstatedir=$ac_optarg ;;
c906108c
SS
1146
1147 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1148 ac_prev=mandir ;;
1149 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1150 mandir=$ac_optarg ;;
c906108c
SS
1151
1152 -nfp | --nfp | --nf)
1153 # Obsolete; use --without-fp.
1154 with_fp=no ;;
1155
1156 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1157 | --no-cr | --no-c | -n)
c906108c
SS
1158 no_create=yes ;;
1159
1160 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1161 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1162 no_recursion=yes ;;
1163
1164 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1165 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1166 | --oldin | --oldi | --old | --ol | --o)
1167 ac_prev=oldincludedir ;;
1168 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1169 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1170 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1171 oldincludedir=$ac_optarg ;;
c906108c
SS
1172
1173 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1174 ac_prev=prefix ;;
1175 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1176 prefix=$ac_optarg ;;
c906108c
SS
1177
1178 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1179 | --program-pre | --program-pr | --program-p)
1180 ac_prev=program_prefix ;;
1181 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1182 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1183 program_prefix=$ac_optarg ;;
c906108c
SS
1184
1185 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1186 | --program-suf | --program-su | --program-s)
1187 ac_prev=program_suffix ;;
1188 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1189 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1190 program_suffix=$ac_optarg ;;
c906108c
SS
1191
1192 -program-transform-name | --program-transform-name \
1193 | --program-transform-nam | --program-transform-na \
1194 | --program-transform-n | --program-transform- \
1195 | --program-transform | --program-transfor \
1196 | --program-transfo | --program-transf \
1197 | --program-trans | --program-tran \
1198 | --progr-tra | --program-tr | --program-t)
1199 ac_prev=program_transform_name ;;
1200 -program-transform-name=* | --program-transform-name=* \
1201 | --program-transform-nam=* | --program-transform-na=* \
1202 | --program-transform-n=* | --program-transform-=* \
1203 | --program-transform=* | --program-transfor=* \
1204 | --program-transfo=* | --program-transf=* \
1205 | --program-trans=* | --program-tran=* \
1206 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1207 program_transform_name=$ac_optarg ;;
c906108c 1208
81ecdfbb
RW
1209 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1210 ac_prev=pdfdir ;;
1211 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1212 pdfdir=$ac_optarg ;;
1213
1214 -psdir | --psdir | --psdi | --psd | --ps)
1215 ac_prev=psdir ;;
1216 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1217 psdir=$ac_optarg ;;
1218
c906108c
SS
1219 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1220 | -silent | --silent | --silen | --sile | --sil)
1221 silent=yes ;;
1222
1223 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1224 ac_prev=sbindir ;;
1225 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1226 | --sbi=* | --sb=*)
bec39cab 1227 sbindir=$ac_optarg ;;
c906108c
SS
1228
1229 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1230 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1231 | --sharedst | --shareds | --shared | --share | --shar \
1232 | --sha | --sh)
1233 ac_prev=sharedstatedir ;;
1234 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1235 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1236 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1237 | --sha=* | --sh=*)
bec39cab 1238 sharedstatedir=$ac_optarg ;;
c906108c
SS
1239
1240 -site | --site | --sit)
1241 ac_prev=site ;;
1242 -site=* | --site=* | --sit=*)
bec39cab 1243 site=$ac_optarg ;;
3ace7edb 1244
c906108c
SS
1245 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1246 ac_prev=srcdir ;;
1247 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1248 srcdir=$ac_optarg ;;
c906108c
SS
1249
1250 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1251 | --syscon | --sysco | --sysc | --sys | --sy)
1252 ac_prev=sysconfdir ;;
1253 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1254 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1255 sysconfdir=$ac_optarg ;;
c906108c
SS
1256
1257 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1258 ac_prev=target_alias ;;
c906108c 1259 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1260 target_alias=$ac_optarg ;;
c906108c
SS
1261
1262 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1263 verbose=yes ;;
1264
bec39cab
AC
1265 -version | --version | --versio | --versi | --vers | -V)
1266 ac_init_version=: ;;
c906108c
SS
1267
1268 -with-* | --with-*)
81ecdfbb 1269 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1270 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1271 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1272 as_fn_error "invalid package name: $ac_useropt"
1273 ac_useropt_orig=$ac_useropt
1274 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1275 case $ac_user_opts in
1276 *"
1277"with_$ac_useropt"
1278"*) ;;
1279 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1280 ac_unrecognized_sep=', ';;
b4e70030 1281 esac
81ecdfbb 1282 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1283
1284 -without-* | --without-*)
81ecdfbb 1285 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1286 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1287 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1288 as_fn_error "invalid package name: $ac_useropt"
1289 ac_useropt_orig=$ac_useropt
1290 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1291 case $ac_user_opts in
1292 *"
1293"with_$ac_useropt"
1294"*) ;;
1295 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1296 ac_unrecognized_sep=', ';;
1297 esac
1298 eval with_$ac_useropt=no ;;
c906108c
SS
1299
1300 --x)
1301 # Obsolete; use --with-x.
1302 with_x=yes ;;
1303
1304 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1305 | --x-incl | --x-inc | --x-in | --x-i)
1306 ac_prev=x_includes ;;
1307 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1308 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1309 x_includes=$ac_optarg ;;
c906108c
SS
1310
1311 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1312 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1313 ac_prev=x_libraries ;;
1314 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1315 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1316 x_libraries=$ac_optarg ;;
c906108c 1317
81ecdfbb
RW
1318 -*) as_fn_error "unrecognized option: \`$ac_option'
1319Try \`$0 --help' for more information."
c906108c
SS
1320 ;;
1321
bec39cab
AC
1322 *=*)
1323 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1324 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1325 case $ac_envvar in #(
1326 '' | [0-9]* | *[!_$as_cr_alnum]* )
1327 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1328 esac
1329 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1330 export $ac_envvar ;;
1331
c906108c 1332 *)
bec39cab 1333 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1334 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1335 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1336 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1337 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1338 ;;
1339
1340 esac
1341done
1342
1343if test -n "$ac_prev"; then
bec39cab 1344 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1345 as_fn_error "missing argument to $ac_option"
c906108c 1346fi
c906108c 1347
81ecdfbb
RW
1348if test -n "$ac_unrecognized_opts"; then
1349 case $enable_option_checking in
1350 no) ;;
1351 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1352 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1353 esac
81ecdfbb 1354fi
b4e70030 1355
81ecdfbb
RW
1356# Check all directory arguments for consistency.
1357for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1358 datadir sysconfdir sharedstatedir localstatedir includedir \
1359 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1360 libdir localedir mandir
b4e70030 1361do
81ecdfbb
RW
1362 eval ac_val=\$$ac_var
1363 # Remove trailing slashes.
1364 case $ac_val in
1365 */ )
1366 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1367 eval $ac_var=\$ac_val;;
1368 esac
1369 # Be sure to have absolute directory names.
b4e70030 1370 case $ac_val in
81ecdfbb
RW
1371 [\\/$]* | ?:[\\/]* ) continue;;
1372 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1373 esac
81ecdfbb 1374 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1375done
1376
bec39cab
AC
1377# There might be people who depend on the old broken behavior: `$host'
1378# used to hold the argument of --host etc.
1379# FIXME: To remove some day.
1380build=$build_alias
1381host=$host_alias
1382target=$target_alias
1383
1384# FIXME: To remove some day.
1385if test "x$host_alias" != x; then
1386 if test "x$build_alias" = x; then
1387 cross_compiling=maybe
81ecdfbb 1388 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1389 If a cross compiler is detected then cross compile mode will be used." >&2
1390 elif test "x$build_alias" != "x$host_alias"; then
1391 cross_compiling=yes
1392 fi
1393fi
c906108c 1394
bec39cab
AC
1395ac_tool_prefix=
1396test -n "$host_alias" && ac_tool_prefix=$host_alias-
1397
1398test "$silent" = yes && exec 6>/dev/null
c906108c 1399
c906108c 1400
81ecdfbb
RW
1401ac_pwd=`pwd` && test -n "$ac_pwd" &&
1402ac_ls_di=`ls -di .` &&
1403ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1404 as_fn_error "working directory cannot be determined"
1405test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1406 as_fn_error "pwd does not report name of working directory"
1407
1408
c906108c
SS
1409# Find the source files, if location was not specified.
1410if test -z "$srcdir"; then
1411 ac_srcdir_defaulted=yes
81ecdfbb
RW
1412 # Try the directory containing this script, then the parent directory.
1413 ac_confdir=`$as_dirname -- "$as_myself" ||
1414$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1415 X"$as_myself" : 'X\(//\)[^/]' \| \
1416 X"$as_myself" : 'X\(//\)$' \| \
1417 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1418$as_echo X"$as_myself" |
1419 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1420 s//\1/
1421 q
1422 }
1423 /^X\(\/\/\)[^/].*/{
1424 s//\1/
1425 q
1426 }
1427 /^X\(\/\/\)$/{
1428 s//\1/
1429 q
1430 }
1431 /^X\(\/\).*/{
1432 s//\1/
1433 q
1434 }
1435 s/.*/./; q'`
c906108c 1436 srcdir=$ac_confdir
81ecdfbb 1437 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1438 srcdir=..
1439 fi
1440else
1441 ac_srcdir_defaulted=no
1442fi
81ecdfbb
RW
1443if test ! -r "$srcdir/$ac_unique_file"; then
1444 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1445 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1446fi
1447ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1448ac_abs_confdir=`(
1449 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1450 pwd)`
1451# When building in place, set srcdir=.
1452if test "$ac_abs_confdir" = "$ac_pwd"; then
1453 srcdir=.
1454fi
1455# Remove unnecessary trailing slashes from srcdir.
1456# Double slashes in file names in object file debugging info
1457# mess up M-x gdb in Emacs.
1458case $srcdir in
1459*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1460esac
1461for ac_var in $ac_precious_vars; do
1462 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1463 eval ac_env_${ac_var}_value=\$${ac_var}
1464 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1465 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1466done
c906108c 1467
bec39cab
AC
1468#
1469# Report the --help message.
1470#
1471if test "$ac_init_help" = "long"; then
1472 # Omit some internal or obsolete options to make the list less imposing.
1473 # This message is too long to be a string in the A/UX 3.1 sh.
1474 cat <<_ACEOF
1475\`configure' configures this package to adapt to many kinds of systems.
1476
1477Usage: $0 [OPTION]... [VAR=VALUE]...
1478
1479To assign environment variables (e.g., CC, CFLAGS...), specify them as
1480VAR=VALUE. See below for descriptions of some of the useful variables.
1481
1482Defaults for the options are specified in brackets.
1483
1484Configuration:
1485 -h, --help display this help and exit
1486 --help=short display options specific to this package
1487 --help=recursive display the short help of all the included packages
1488 -V, --version display version information and exit
1489 -q, --quiet, --silent do not print \`checking...' messages
1490 --cache-file=FILE cache test results in FILE [disabled]
1491 -C, --config-cache alias for \`--cache-file=config.cache'
1492 -n, --no-create do not create output files
1493 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1494
bec39cab
AC
1495Installation directories:
1496 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1497 [$ac_default_prefix]
bec39cab 1498 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1499 [PREFIX]
bec39cab
AC
1500
1501By default, \`make install' will install all the files in
1502\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1503an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1504for instance \`--prefix=\$HOME'.
1505
1506For better control, use the options below.
1507
1508Fine tuning of the installation directories:
81ecdfbb
RW
1509 --bindir=DIR user executables [EPREFIX/bin]
1510 --sbindir=DIR system admin executables [EPREFIX/sbin]
1511 --libexecdir=DIR program executables [EPREFIX/libexec]
1512 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1513 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1514 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1515 --libdir=DIR object code libraries [EPREFIX/lib]
1516 --includedir=DIR C header files [PREFIX/include]
1517 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1518 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1519 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1520 --infodir=DIR info documentation [DATAROOTDIR/info]
1521 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1522 --mandir=DIR man documentation [DATAROOTDIR/man]
1523 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1524 --htmldir=DIR html documentation [DOCDIR]
1525 --dvidir=DIR dvi documentation [DOCDIR]
1526 --pdfdir=DIR pdf documentation [DOCDIR]
1527 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1528_ACEOF
1529
1530 cat <<\_ACEOF
1531
1532Program names:
1533 --program-prefix=PREFIX prepend PREFIX to installed program names
1534 --program-suffix=SUFFIX append SUFFIX to installed program names
1535 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1536
1537X features:
1538 --x-includes=DIR X include files are in DIR
1539 --x-libraries=DIR X library files are in DIR
1540
1541System types:
1542 --build=BUILD configure for building on BUILD [guessed]
1543 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1544 --target=TARGET configure for building compilers for TARGET [HOST]
1545_ACEOF
1546fi
1547
1548if test -n "$ac_init_help"; then
1549
1550 cat <<\_ACEOF
1551
1552Optional Features:
81ecdfbb 1553 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1554 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1555 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1556 --enable-maintainer-mode enable make rules and dependencies not useful
1557 (and sometimes confusing) to the casual installer
da2f07f1
JK
1558 --enable-plugins Enable support for plugins (defaults no)
1559 --disable-largefile omit support for large files
e28b3332
DJ
1560 --disable-dependency-tracking speeds up one-time build
1561 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1562 --enable-targets=TARGETS
1563 alternative target configurations
c0993dbe 1564 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1565 --disable-gdbcli disable command-line interface (CLI)
1566 --disable-gdbmi disable machine-interface (MI)
1567 --enable-tui enable full-screen terminal user interface (TUI)
1568 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1569 --enable-profiling enable profiling of GDB
3841debe 1570 --disable-rpath do not hardcode runtime library paths
a1220294 1571 --enable-werror treat compile warnings as errors
32c1c914 1572 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1573 --enable-gdb-build-warnings
32c1c914 1574 enable GDB specific build-time compiler warnings if
a1220294 1575 gcc is used
32c1c914 1576 --enable-sim link gdb with simulator
bec39cab
AC
1577 --enable-multi-ice build the multi-ice-gdb-server
1578
1579Optional Packages:
1580 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1581 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1582 --with-separate-debug-dir=PATH
32c1c914 1583 look for global separate debug info in this path
62e4f60c 1584 [LIBDIR/debug]
b14b1491
TT
1585 --with-gdb-datadir=PATH look for global separate data files in this path
1586 [DATADIR/gdb]
29b0e8a2 1587 --with-relocated-sources=PATH
32c1c914
TT
1588 automatically relocate this path for source files
1589 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1590 --with-curses use the curses library instead of the termcap
1591 library
c16158bc
JM
1592 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1593 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1594 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1595 --with-libiconv-prefix=DIR
1596 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1597 --with-system-readline use installed readline library
5c39566f 1598 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1599 --with-gnu-ld assume the C compiler uses GNU ld default=no
1600 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1601 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 1602 --with-python include python support (auto/yes/no/<path>)
a1220294
TT
1603 --without-included-regex
1604 don't use included regex; this is the default on
1605 systems with version 2 of the GNU C library (use
1606 with caution on other system)
81ecdfbb 1607 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1608 --with-system-gdbinit=PATH
32c1c914 1609 automatically load a system-wide gdbinit file
5062cc19
KS
1610 --with-tcl directory containing tcl configuration (tclConfig.sh)
1611 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1612 --with-x use the X Window System
bec39cab
AC
1613
1614Some influential environment variables:
1615 CC C compiler command
1616 CFLAGS C compiler flags
1617 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1618 nonstandard directory <lib dir>
81ecdfbb
RW
1619 LIBS libraries to pass to the linker, e.g. -l<library>
1620 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1621 you have headers in a nonstandard directory <include dir>
bec39cab 1622 CPP C preprocessor
81ecdfbb
RW
1623 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1624 the first program found out of: `bison -y', `byacc', `yacc'.
1625 YFLAGS The list of arguments that will be passed by default to $YACC.
1626 This script will default YFLAGS to the empty string to avoid a
1627 default value of `-d' given by some make applications.
1628 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1629
1630Use these variables to override the choices made by `configure' or to help
1631it to find libraries and programs with nonstandard names/locations.
1632
81ecdfbb 1633Report bugs to the package provider.
bec39cab 1634_ACEOF
81ecdfbb 1635ac_status=$?
bec39cab
AC
1636fi
1637
1638if test "$ac_init_help" = "recursive"; then
1639 # If there are subdirs, report their specific --help.
bec39cab 1640 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1641 test -d "$ac_dir" ||
1642 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1643 continue
bec39cab
AC
1644 ac_builddir=.
1645
81ecdfbb
RW
1646case "$ac_dir" in
1647.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648*)
1649 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1650 # A ".." for each directory in $ac_dir_suffix.
1651 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1652 case $ac_top_builddir_sub in
1653 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1654 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1655 esac ;;
1656esac
1657ac_abs_top_builddir=$ac_pwd
1658ac_abs_builddir=$ac_pwd$ac_dir_suffix
1659# for backward compatibility:
1660ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1661
1662case $srcdir in
81ecdfbb 1663 .) # We are building in place.
bec39cab 1664 ac_srcdir=.
81ecdfbb
RW
1665 ac_top_srcdir=$ac_top_builddir_sub
1666 ac_abs_top_srcdir=$ac_pwd ;;
1667 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1668 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1669 ac_top_srcdir=$srcdir
1670 ac_abs_top_srcdir=$srcdir ;;
1671 *) # Relative name.
1672 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1673 ac_top_srcdir=$ac_top_build_prefix$srcdir
1674 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1675esac
81ecdfbb 1676ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1677
81ecdfbb
RW
1678 cd "$ac_dir" || { ac_status=$?; continue; }
1679 # Check for guested configure.
1680 if test -f "$ac_srcdir/configure.gnu"; then
1681 echo &&
1682 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1683 elif test -f "$ac_srcdir/configure"; then
1684 echo &&
1685 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1686 else
81ecdfbb
RW
1687 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1688 fi || ac_status=$?
1689 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1690 done
1691fi
1692
81ecdfbb 1693test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1694if $ac_init_version; then
1695 cat <<\_ACEOF
81ecdfbb
RW
1696configure
1697generated by GNU Autoconf 2.64
bec39cab 1698
81ecdfbb 1699Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1700This configure script is free software; the Free Software Foundation
1701gives unlimited permission to copy, distribute and modify it.
1702_ACEOF
81ecdfbb 1703 exit
bec39cab 1704fi
bec39cab 1705
81ecdfbb
RW
1706## ------------------------ ##
1707## Autoconf initialization. ##
1708## ------------------------ ##
bec39cab 1709
81ecdfbb
RW
1710# ac_fn_c_try_compile LINENO
1711# --------------------------
1712# Try to compile conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_compile ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737else
1738 $as_echo "$as_me: failed program was:" >&5
1739sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1740
81ecdfbb
RW
1741 ac_retval=1
1742fi
1743 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1744 return $ac_retval
1745
1746} # ac_fn_c_try_compile
1747
1748# ac_fn_c_try_cpp LINENO
1749# ----------------------
1750# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_cpp ()
bec39cab 1752{
81ecdfbb
RW
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_cpp conftest.$ac_ext"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1767 fi
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } >/dev/null && {
1770 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1771 test ! -s conftest.err
1772 }; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1777
81ecdfbb
RW
1778 ac_retval=1
1779fi
1780 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1781 return $ac_retval
bec39cab 1782
81ecdfbb 1783} # ac_fn_c_try_cpp
bec39cab 1784
81ecdfbb
RW
1785# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1786# -------------------------------------------------------
1787# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1788# the include files in INCLUDES and setting the cache variable VAR
1789# accordingly.
1790ac_fn_c_check_header_mongrel ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1793 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
1796if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1797 $as_echo_n "(cached) " >&6
1798fi
1799eval ac_res=\$$3
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1801$as_echo "$ac_res" >&6; }
1802else
1803 # Is the header compilable?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1805$as_echo_n "checking $2 usability... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_compile "$LINENO"; then :
1812 ac_header_compiler=yes
1813else
1814 ac_header_compiler=no
1815fi
1816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1818$as_echo "$ac_header_compiler" >&6; }
bec39cab 1819
81ecdfbb
RW
1820# Is the header present?
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1822$as_echo_n "checking $2 presence... " >&6; }
1823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_cpp "$LINENO"; then :
1828 ac_header_preproc=yes
1829else
1830 ac_header_preproc=no
1831fi
1832rm -f conftest.err conftest.$ac_ext
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1834$as_echo "$ac_header_preproc" >&6; }
bec39cab 1835
81ecdfbb
RW
1836# So? What about this header?
1837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1838 yes:no: )
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1840$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1843 ;;
1844 no:yes:* )
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1846$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1848$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1850$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1852$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855 ;;
1856esac
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 eval "$3=\$ac_header_compiler"
1863fi
1864eval ac_res=\$$3
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866$as_echo "$ac_res" >&6; }
1867fi
1868 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1869
81ecdfbb 1870} # ac_fn_c_check_header_mongrel
bec39cab 1871
81ecdfbb
RW
1872# ac_fn_c_try_run LINENO
1873# ----------------------
1874# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1875# that executables *can* be run.
1876ac_fn_c_try_run ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 if { { ac_try="$ac_link"
1880case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883esac
1884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885$as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_link") 2>&5
1887 ac_status=$?
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1890 { { case "(($ac_try" in
1891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892 *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896 (eval "$ac_try") 2>&5
1897 ac_status=$?
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; }; }; then :
1900 ac_retval=0
1901else
1902 $as_echo "$as_me: program exited with status $ac_status" >&5
1903 $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1905
81ecdfbb
RW
1906 ac_retval=$ac_status
1907fi
1908 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910 return $ac_retval
bec39cab 1911
81ecdfbb 1912} # ac_fn_c_try_run
bec39cab 1913
81ecdfbb
RW
1914# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1915# -------------------------------------------------------
1916# Tests whether HEADER exists and can be compiled using the include files in
1917# INCLUDES, setting the cache variable VAR accordingly.
1918ac_fn_c_check_header_compile ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922$as_echo_n "checking for $2... " >&6; }
1923if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1924 $as_echo_n "(cached) " >&6
1925else
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h. */
1928$4
1929#include <$2>
bec39cab 1930_ACEOF
81ecdfbb
RW
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 eval "$3=yes"
1933else
1934 eval "$3=no"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938eval ac_res=\$$3
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940$as_echo "$ac_res" >&6; }
1941 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1942
81ecdfbb 1943} # ac_fn_c_check_header_compile
bec39cab 1944
81ecdfbb
RW
1945# ac_fn_c_try_link LINENO
1946# -----------------------
1947# Try to link conftest.$ac_ext, and return whether this succeeded.
1948ac_fn_c_try_link ()
b4e70030 1949{
81ecdfbb
RW
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 rm -f conftest.$ac_objext conftest$ac_exeext
1952 if { { ac_try="$ac_link"
1953case "(($ac_try" in
1954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955 *) ac_try_echo=$ac_try;;
1956esac
1957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958$as_echo "$ac_try_echo"; } >&5
1959 (eval "$ac_link") 2>conftest.err
1960 ac_status=$?
1961 if test -s conftest.err; then
1962 grep -v '^ *+' conftest.err >conftest.er1
1963 cat conftest.er1 >&5
1964 mv -f conftest.er1 conftest.err
1965 fi
1966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967 test $ac_status = 0; } && {
1968 test -z "$ac_c_werror_flag" ||
1969 test ! -s conftest.err
1970 } && test -s conftest$ac_exeext && {
1971 test "$cross_compiling" = yes ||
1972 $as_test_x conftest$ac_exeext
1973 }; then :
1974 ac_retval=0
1975else
1976 $as_echo "$as_me: failed program was:" >&5
1977sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1978
81ecdfbb
RW
1979 ac_retval=1
1980fi
1981 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1982 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1983 # interfere with the next link command; also delete a directory that is
1984 # left behind by Apple's compiler. We do this before executing the actions.
1985 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1987 return $ac_retval
bec39cab 1988
81ecdfbb 1989} # ac_fn_c_try_link
bec39cab 1990
81ecdfbb
RW
1991# ac_fn_c_check_func LINENO FUNC VAR
1992# ----------------------------------
1993# Tests whether FUNC exists, setting the cache variable VAR accordingly
1994ac_fn_c_check_func ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998$as_echo_n "checking for $2... " >&6; }
1999if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2000 $as_echo_n "(cached) " >&6
2001else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2005 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2006#define $2 innocuous_$2
bec39cab 2007
81ecdfbb
RW
2008/* System header to define __stub macros and hopefully few prototypes,
2009 which can conflict with char $2 (); below.
2010 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2011 <limits.h> exists even on freestanding compilers. */
bec39cab 2012
81ecdfbb
RW
2013#ifdef __STDC__
2014# include <limits.h>
2015#else
2016# include <assert.h>
2017#endif
bec39cab 2018
81ecdfbb 2019#undef $2
bec39cab 2020
81ecdfbb
RW
2021/* Override any GCC internal prototype to avoid an error.
2022 Use char because int might match the return type of a GCC
2023 builtin and then its argument prototype would still apply. */
2024#ifdef __cplusplus
2025extern "C"
2026#endif
2027char $2 ();
2028/* The GNU C library defines this for functions which it implements
2029 to always fail with ENOSYS. Some functions are actually named
2030 something starting with __ and the normal name is an alias. */
2031#if defined __stub_$2 || defined __stub___$2
2032choke me
2033#endif
bec39cab 2034
81ecdfbb
RW
2035int
2036main ()
2037{
2038return $2 ();
2039 ;
2040 return 0;
2041}
bec39cab 2042_ACEOF
81ecdfbb
RW
2043if ac_fn_c_try_link "$LINENO"; then :
2044 eval "$3=yes"
2045else
2046 eval "$3=no"
2047fi
2048rm -f core conftest.err conftest.$ac_objext \
2049 conftest$ac_exeext conftest.$ac_ext
2050fi
2051eval ac_res=\$$3
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
2054 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2055
81ecdfbb 2056} # ac_fn_c_check_func
bec39cab 2057
81ecdfbb
RW
2058# ac_fn_c_check_decl LINENO SYMBOL VAR
2059# ------------------------------------
2060# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2061ac_fn_c_check_decl ()
2062{
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2065$as_echo_n "checking whether $2 is declared... " >&6; }
2066if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2067 $as_echo_n "(cached) " >&6
2068else
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075#ifndef $2
2076 (void) $2;
2077#endif
bec39cab 2078
81ecdfbb
RW
2079 ;
2080 return 0;
2081}
bec39cab 2082_ACEOF
81ecdfbb
RW
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 eval "$3=yes"
2085else
2086 eval "$3=no"
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090eval ac_res=\$$3
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092$as_echo "$ac_res" >&6; }
2093 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2094
81ecdfbb 2095} # ac_fn_c_check_decl
bec39cab 2096
81ecdfbb
RW
2097# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2098# --------------------------------------------
2099# Tries to find the compile-time value of EXPR in a program that includes
2100# INCLUDES, setting VAR accordingly. Returns whether the value could be
2101# computed
2102ac_fn_c_compute_int ()
2103{
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 if test "$cross_compiling" = yes; then
2106 # Depending upon the size, compute the lo and hi bounds.
2107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108/* end confdefs.h. */
2109$4
2110int
2111main ()
2112{
2113static int test_array [1 - 2 * !(($2) >= 0)];
2114test_array [0] = 0
bec39cab 2115
81ecdfbb
RW
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_lo=0 ac_mid=0
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2130test_array [0] = 0
bec39cab 2131
81ecdfbb
RW
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid; break
2138else
2139 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140 if test $ac_lo -le $ac_mid; then
2141 ac_lo= ac_hi=
2142 break
2143 fi
2144 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2145fi
81ecdfbb
RW
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 done
c906108c 2148else
81ecdfbb
RW
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) < 0)];
2156test_array [0] = 0
bec39cab 2157
81ecdfbb
RW
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_hi=-1 ac_mid=-1
2164 while :; do
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2172test_array [0] = 0
bec39cab 2173
81ecdfbb
RW
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_lo=$ac_mid; break
2180else
2181 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2182 if test $ac_mid -le $ac_hi; then
2183 ac_lo= ac_hi=
2184 break
2185 fi
2186 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2187fi
2188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189 done
2190else
2191 ac_lo= ac_hi=
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196# Binary search between lo and hi bounds.
2197while test "x$ac_lo" != "x$ac_hi"; do
2198 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202int
2203main ()
2204{
2205static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2206test_array [0] = 0
bec39cab 2207
81ecdfbb
RW
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_compile "$LINENO"; then :
2213 ac_hi=$ac_mid
2214else
2215 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218done
2219case $ac_lo in #((
2220?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2221'') ac_retval=1 ;;
2222esac
2223 else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$4
2227static long int longval () { return $2; }
2228static unsigned long int ulongval () { return $2; }
2229#include <stdio.h>
2230#include <stdlib.h>
2231int
2232main ()
2233{
bec39cab 2234
81ecdfbb
RW
2235 FILE *f = fopen ("conftest.val", "w");
2236 if (! f)
2237 return 1;
2238 if (($2) < 0)
2239 {
2240 long int i = longval ();
2241 if (i != ($2))
2242 return 1;
2243 fprintf (f, "%ld", i);
2244 }
2245 else
2246 {
2247 unsigned long int i = ulongval ();
2248 if (i != ($2))
2249 return 1;
2250 fprintf (f, "%lu", i);
2251 }
2252 /* Do not output a trailing newline, as this causes \r\n confusion
2253 on some platforms. */
2254 return ferror (f) || fclose (f) != 0;
bec39cab 2255
81ecdfbb
RW
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_run "$LINENO"; then :
2261 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2262else
2263 ac_retval=1
2264fi
2265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2266 conftest.$ac_objext conftest.beam conftest.$ac_ext
2267rm -f conftest.val
bec39cab 2268
81ecdfbb
RW
2269 fi
2270 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271 return $ac_retval
bec39cab 2272
81ecdfbb 2273} # ac_fn_c_compute_int
bec39cab 2274
81ecdfbb
RW
2275# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2276# ----------------------------------------------------
2277# Tries to find if the field MEMBER exists in type AGGR, after including
2278# INCLUDES, setting cache variable VAR accordingly.
2279ac_fn_c_check_member ()
2280{
2281 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2283$as_echo_n "checking for $2.$3... " >&6; }
2284if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2285 $as_echo_n "(cached) " >&6
2286else
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$5
2290int
2291main ()
2292{
2293static $2 ac_aggr;
2294if (ac_aggr.$3)
2295return 0;
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
2301 eval "$4=yes"
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (sizeof ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 eval "$4=no"
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325eval ac_res=\$$4
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2327$as_echo "$ac_res" >&6; }
2328 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2329
81ecdfbb 2330} # ac_fn_c_check_member
bec39cab 2331
81ecdfbb
RW
2332# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2333# -------------------------------------------
2334# Tests whether TYPE exists after having included INCLUDES, setting cache
2335# variable VAR accordingly.
2336ac_fn_c_check_type ()
2337{
2338 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2340$as_echo_n "checking for $2... " >&6; }
2341if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2342 $as_echo_n "(cached) " >&6
2343else
2344 eval "$3=no"
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$4
2348int
2349main ()
2350{
2351if (sizeof ($2))
2352 return 0;
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_compile "$LINENO"; then :
2358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359/* end confdefs.h. */
2360$4
2361int
2362main ()
2363{
2364if (sizeof (($2)))
2365 return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2371
81ecdfbb
RW
2372else
2373 eval "$3=yes"
2374fi
2375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2376fi
2377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2378fi
2379eval ac_res=\$$3
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2381$as_echo "$ac_res" >&6; }
2382 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2383
81ecdfbb
RW
2384} # ac_fn_c_check_type
2385cat >config.log <<_ACEOF
2386This file contains any messages produced by compilers while
2387running configure, to aid debugging if configure makes a mistake.
d5af19ba 2388
81ecdfbb
RW
2389It was created by $as_me, which was
2390generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2391
81ecdfbb 2392 $ $0 $@
413ccac7 2393
81ecdfbb
RW
2394_ACEOF
2395exec 5>>config.log
2396{
2397cat <<_ASUNAME
2398## --------- ##
2399## Platform. ##
2400## --------- ##
413ccac7 2401
81ecdfbb
RW
2402hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2403uname -m = `(uname -m) 2>/dev/null || echo unknown`
2404uname -r = `(uname -r) 2>/dev/null || echo unknown`
2405uname -s = `(uname -s) 2>/dev/null || echo unknown`
2406uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2407
81ecdfbb
RW
2408/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2409/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2410
81ecdfbb
RW
2411/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2412/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2413/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2414/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2415/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2416/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2417/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2418
81ecdfbb 2419_ASUNAME
bec39cab 2420
bec39cab
AC
2421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2422for as_dir in $PATH
2423do
2424 IFS=$as_save_IFS
2425 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2426 $as_echo "PATH: $as_dir"
2427 done
2428IFS=$as_save_IFS
bec39cab 2429
81ecdfbb 2430} >&5
bec39cab 2431
81ecdfbb 2432cat >&5 <<_ACEOF
bec39cab 2433
bec39cab 2434
81ecdfbb
RW
2435## ----------- ##
2436## Core tests. ##
2437## ----------- ##
2438
2439_ACEOF
2440
2441
2442# Keep a trace of the command line.
2443# Strip out --no-create and --no-recursion so they do not pile up.
2444# Strip out --silent because we don't want to record it for future runs.
2445# Also quote any args containing shell meta-characters.
2446# Make two passes to allow for proper duplicate-argument suppression.
2447ac_configure_args=
2448ac_configure_args0=
2449ac_configure_args1=
2450ac_must_keep_next=false
2451for ac_pass in 1 2
2452do
2453 for ac_arg
2454 do
2455 case $ac_arg in
2456 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2457 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2458 | -silent | --silent | --silen | --sile | --sil)
2459 continue ;;
2460 *\'*)
2461 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2462 esac
2463 case $ac_pass in
2464 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2465 2)
2466 as_fn_append ac_configure_args1 " '$ac_arg'"
2467 if test $ac_must_keep_next = true; then
2468 ac_must_keep_next=false # Got value, back to normal.
2469 else
2470 case $ac_arg in
2471 *=* | --config-cache | -C | -disable-* | --disable-* \
2472 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2473 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2474 | -with-* | --with-* | -without-* | --without-* | --x)
2475 case "$ac_configure_args0 " in
2476 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2477 esac
2478 ;;
2479 -* ) ac_must_keep_next=true ;;
2480 esac
2481 fi
2482 as_fn_append ac_configure_args " '$ac_arg'"
2483 ;;
2484 esac
2485 done
2486done
2487{ ac_configure_args0=; unset ac_configure_args0;}
2488{ ac_configure_args1=; unset ac_configure_args1;}
2489
2490# When interrupted or exit'd, cleanup temporary files, and complete
2491# config.log. We remove comments because anyway the quotes in there
2492# would cause problems or look ugly.
2493# WARNING: Use '\'' to represent an apostrophe within the trap.
2494# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2495trap 'exit_status=$?
2496 # Save into config.log some information that might help in debugging.
2497 {
2498 echo
2499
2500 cat <<\_ASBOX
2501## ---------------- ##
2502## Cache variables. ##
2503## ---------------- ##
2504_ASBOX
2505 echo
2506 # The following way of writing the cache mishandles newlines in values,
2507(
2508 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2509 eval ac_val=\$$ac_var
2510 case $ac_val in #(
2511 *${as_nl}*)
2512 case $ac_var in #(
2513 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2514$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2515 esac
2516 case $ac_var in #(
2517 _ | IFS | as_nl) ;; #(
2518 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2519 *) { eval $ac_var=; unset $ac_var;} ;;
2520 esac ;;
2521 esac
2522 done
2523 (set) 2>&1 |
2524 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2525 *${as_nl}ac_space=\ *)
2526 sed -n \
2527 "s/'\''/'\''\\\\'\'''\''/g;
2528 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2529 ;; #(
2530 *)
2531 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2532 ;;
2533 esac |
2534 sort
2535)
2536 echo
2537
2538 cat <<\_ASBOX
2539## ----------------- ##
2540## Output variables. ##
2541## ----------------- ##
2542_ASBOX
2543 echo
2544 for ac_var in $ac_subst_vars
2545 do
2546 eval ac_val=\$$ac_var
2547 case $ac_val in
2548 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2549 esac
2550 $as_echo "$ac_var='\''$ac_val'\''"
2551 done | sort
2552 echo
2553
2554 if test -n "$ac_subst_files"; then
2555 cat <<\_ASBOX
2556## ------------------- ##
2557## File substitutions. ##
2558## ------------------- ##
2559_ASBOX
2560 echo
2561 for ac_var in $ac_subst_files
2562 do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in
2565 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2566 esac
2567 $as_echo "$ac_var='\''$ac_val'\''"
2568 done | sort
2569 echo
2570 fi
2571
2572 if test -s confdefs.h; then
2573 cat <<\_ASBOX
2574## ----------- ##
2575## confdefs.h. ##
2576## ----------- ##
2577_ASBOX
2578 echo
2579 cat confdefs.h
2580 echo
2581 fi
2582 test "$ac_signal" != 0 &&
2583 $as_echo "$as_me: caught signal $ac_signal"
2584 $as_echo "$as_me: exit $exit_status"
2585 } >&5
2586 rm -f core *.core core.conftest.* &&
2587 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2588 exit $exit_status
2589' 0
2590for ac_signal in 1 2 13 15; do
2591 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2592done
2593ac_signal=0
2594
2595# confdefs.h avoids OS command line length limits that DEFS can exceed.
2596rm -f -r conftest* confdefs.h
2597
2598$as_echo "/* confdefs.h */" > confdefs.h
2599
2600# Predefined preprocessor variables.
2601
2602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_NAME "$PACKAGE_NAME"
2604_ACEOF
2605
2606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2608_ACEOF
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_VERSION "$PACKAGE_VERSION"
2612_ACEOF
2613
2614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_STRING "$PACKAGE_STRING"
2616_ACEOF
2617
2618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2620_ACEOF
2621
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_URL "$PACKAGE_URL"
2624_ACEOF
2625
2626
2627# Let the site file select an alternate cache file if it wants to.
2628# Prefer an explicitly selected file to automatically selected ones.
2629ac_site_file1=NONE
2630ac_site_file2=NONE
2631if test -n "$CONFIG_SITE"; then
2632 ac_site_file1=$CONFIG_SITE
2633elif test "x$prefix" != xNONE; then
2634 ac_site_file1=$prefix/share/config.site
2635 ac_site_file2=$prefix/etc/config.site
2636else
2637 ac_site_file1=$ac_default_prefix/share/config.site
2638 ac_site_file2=$ac_default_prefix/etc/config.site
2639fi
2640for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2641do
2642 test "x$ac_site_file" = xNONE && continue
2643 if test -r "$ac_site_file"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2645$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2646 sed 's/^/| /' "$ac_site_file" >&5
2647 . "$ac_site_file"
2648 fi
2649done
2650
2651if test -r "$cache_file"; then
2652 # Some versions of bash will fail to source /dev/null (special
2653 # files actually), so we avoid doing that.
2654 if test -f "$cache_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2656$as_echo "$as_me: loading cache $cache_file" >&6;}
2657 case $cache_file in
2658 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2659 *) . "./$cache_file";;
2660 esac
2661 fi
2662else
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2664$as_echo "$as_me: creating cache $cache_file" >&6;}
2665 >$cache_file
bec39cab
AC
2666fi
2667
81ecdfbb
RW
2668gl_header_list="$gl_header_list stdint.h"
2669gl_header_list="$gl_header_list wchar.h"
2670gl_header_list="$gl_header_list string.h"
2671# Check that the precious variables saved in the cache have kept the same
2672# value.
2673ac_cache_corrupted=false
2674for ac_var in $ac_precious_vars; do
2675 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2676 eval ac_new_set=\$ac_env_${ac_var}_set
2677 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2678 eval ac_new_val=\$ac_env_${ac_var}_value
2679 case $ac_old_set,$ac_new_set in
2680 set,)
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2682$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2683 ac_cache_corrupted=: ;;
2684 ,set)
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2686$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2687 ac_cache_corrupted=: ;;
2688 ,);;
2689 *)
2690 if test "x$ac_old_val" != "x$ac_new_val"; then
2691 # differences in whitespace do not lead to failure.
2692 ac_old_val_w=`echo x $ac_old_val`
2693 ac_new_val_w=`echo x $ac_new_val`
2694 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2696$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2697 ac_cache_corrupted=:
2698 else
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2700$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2701 eval $ac_var=\$ac_old_val
2702 fi
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2704$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2706$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2707 fi;;
2708 esac
2709 # Pass precious variables to config.status.
2710 if test "$ac_new_set" = set; then
2711 case $ac_new_val in
2712 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2713 *) ac_arg=$ac_var=$ac_new_val ;;
2714 esac
2715 case " $ac_configure_args " in
2716 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2717 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2718 esac
2719 fi
2720done
2721if $ac_cache_corrupted; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2725$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2726 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2727fi
2728## -------------------- ##
2729## Main body of script. ##
2730## -------------------- ##
2731
2732ac_ext=c
2733ac_cpp='$CPP $CPPFLAGS'
2734ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736ac_compiler_gnu=$ac_cv_c_compiler_gnu
2737
2738
2739
2740
2741
2742ac_config_headers="$ac_config_headers config.h:config.in"
2743
2744
2745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2746$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2747 # Check whether --enable-maintainer-mode was given.
2748if test "${enable_maintainer_mode+set}" = set; then :
2749 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2750else
2751 USE_MAINTAINER_MODE=no
2752fi
2753
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2755$as_echo "$USE_MAINTAINER_MODE" >&6; }
2756 if test $USE_MAINTAINER_MODE = yes; then
2757 MAINTAINER_MODE_TRUE=
2758 MAINTAINER_MODE_FALSE='#'
2759else
2760 MAINTAINER_MODE_TRUE='#'
2761 MAINTAINER_MODE_FALSE=
2762fi
2763
2764 MAINT=$MAINTAINER_MODE_TRUE
2765
2766
2767
2768ac_ext=c
2769ac_cpp='$CPP $CPPFLAGS'
2770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2772ac_compiler_gnu=$ac_cv_c_compiler_gnu
2773if test -n "$ac_tool_prefix"; then
2774 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2775set dummy ${ac_tool_prefix}gcc; ac_word=$2
2776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2777$as_echo_n "checking for $ac_word... " >&6; }
2778if test "${ac_cv_prog_CC+set}" = set; then :
2779 $as_echo_n "(cached) " >&6
c906108c
SS
2780else
2781 if test -n "$CC"; then
2782 ac_cv_prog_CC="$CC" # Let the user override the test.
2783else
bec39cab
AC
2784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2785for as_dir in $PATH
2786do
2787 IFS=$as_save_IFS
2788 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2789 for ac_exec_ext in '' $ac_executable_extensions; do
2790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2791 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2793 break 2
2794 fi
2795done
81ecdfbb
RW
2796 done
2797IFS=$as_save_IFS
bec39cab 2798
c906108c
SS
2799fi
2800fi
bec39cab 2801CC=$ac_cv_prog_CC
c906108c 2802if test -n "$CC"; then
81ecdfbb
RW
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2804$as_echo "$CC" >&6; }
c906108c 2805else
81ecdfbb
RW
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2807$as_echo "no" >&6; }
c906108c
SS
2808fi
2809
81ecdfbb 2810
b4e70030
JB
2811fi
2812if test -z "$ac_cv_prog_CC"; then
2813 ac_ct_CC=$CC
81ecdfbb
RW
2814 # Extract the first word of "gcc", so it can be a program name with args.
2815set dummy gcc; ac_word=$2
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2817$as_echo_n "checking for $ac_word... " >&6; }
2818if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2819 $as_echo_n "(cached) " >&6
b4e70030
JB
2820else
2821 if test -n "$ac_ct_CC"; then
2822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2823else
2824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2825for as_dir in $PATH
2826do
2827 IFS=$as_save_IFS
2828 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2829 for ac_exec_ext in '' $ac_executable_extensions; do
2830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2831 ac_cv_prog_ac_ct_CC="gcc"
2832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2833 break 2
4e8d927d 2834 fi
b4e70030 2835done
81ecdfbb
RW
2836 done
2837IFS=$as_save_IFS
b4e70030
JB
2838
2839fi
2840fi
2841ac_ct_CC=$ac_cv_prog_ac_ct_CC
2842if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2844$as_echo "$ac_ct_CC" >&6; }
b4e70030 2845else
81ecdfbb
RW
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2847$as_echo "no" >&6; }
b4e70030
JB
2848fi
2849
81ecdfbb
RW
2850 if test "x$ac_ct_CC" = x; then
2851 CC=""
2852 else
2853 case $cross_compiling:$ac_tool_warned in
2854yes:)
2855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2857ac_tool_warned=yes ;;
2858esac
2859 CC=$ac_ct_CC
2860 fi
b4e70030
JB
2861else
2862 CC="$ac_cv_prog_CC"
2863fi
2864
c906108c 2865if test -z "$CC"; then
81ecdfbb
RW
2866 if test -n "$ac_tool_prefix"; then
2867 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2868set dummy ${ac_tool_prefix}cc; ac_word=$2
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
2871if test "${ac_cv_prog_CC+set}" = set; then :
2872 $as_echo_n "(cached) " >&6
c906108c
SS
2873else
2874 if test -n "$CC"; then
2875 ac_cv_prog_CC="$CC" # Let the user override the test.
2876else
bec39cab
AC
2877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2878for as_dir in $PATH
2879do
2880 IFS=$as_save_IFS
2881 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2882 for ac_exec_ext in '' $ac_executable_extensions; do
2883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2884 ac_cv_prog_CC="${ac_tool_prefix}cc"
2885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2886 break 2
2887 fi
2888done
81ecdfbb
RW
2889 done
2890IFS=$as_save_IFS
2891
2892fi
2893fi
2894CC=$ac_cv_prog_CC
2895if test -n "$CC"; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2897$as_echo "$CC" >&6; }
2898else
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2900$as_echo "no" >&6; }
2901fi
2902
2903
2904 fi
2905fi
2906if test -z "$CC"; then
2907 # Extract the first word of "cc", so it can be a program name with args.
2908set dummy cc; ac_word=$2
2909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2910$as_echo_n "checking for $ac_word... " >&6; }
2911if test "${ac_cv_prog_CC+set}" = set; then :
2912 $as_echo_n "(cached) " >&6
2913else
2914 if test -n "$CC"; then
2915 ac_cv_prog_CC="$CC" # Let the user override the test.
2916else
2917 ac_prog_rejected=no
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2925 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2926 ac_prog_rejected=yes
2927 continue
2928 fi
2929 ac_cv_prog_CC="cc"
2930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2931 break 2
2932 fi
2933done
2934 done
2935IFS=$as_save_IFS
bec39cab 2936
c906108c
SS
2937if test $ac_prog_rejected = yes; then
2938 # We found a bogon in the path, so make sure we never use it.
2939 set dummy $ac_cv_prog_CC
2940 shift
bec39cab 2941 if test $# != 0; then
c906108c
SS
2942 # We chose a different compiler from the bogus one.
2943 # However, it has the same basename, so the bogon will be chosen
2944 # first if we set CC to just the basename; use the full file name.
2945 shift
bec39cab 2946 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2947 fi
2948fi
2949fi
2950fi
bec39cab 2951CC=$ac_cv_prog_CC
c906108c 2952if test -n "$CC"; then
81ecdfbb
RW
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2954$as_echo "$CC" >&6; }
c906108c 2955else
81ecdfbb
RW
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2957$as_echo "no" >&6; }
c906108c
SS
2958fi
2959
81ecdfbb 2960
bec39cab
AC
2961fi
2962if test -z "$CC"; then
2963 if test -n "$ac_tool_prefix"; then
81ecdfbb 2964 for ac_prog in cl.exe
bec39cab
AC
2965 do
2966 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2967set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2969$as_echo_n "checking for $ac_word... " >&6; }
2970if test "${ac_cv_prog_CC+set}" = set; then :
2971 $as_echo_n "(cached) " >&6
c906108c
SS
2972else
2973 if test -n "$CC"; then
2974 ac_cv_prog_CC="$CC" # Let the user override the test.
2975else
bec39cab
AC
2976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2977for as_dir in $PATH
2978do
2979 IFS=$as_save_IFS
2980 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2981 for ac_exec_ext in '' $ac_executable_extensions; do
2982 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2983 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2985 break 2
2986 fi
2987done
81ecdfbb
RW
2988 done
2989IFS=$as_save_IFS
bec39cab 2990
c906108c
SS
2991fi
2992fi
bec39cab 2993CC=$ac_cv_prog_CC
c906108c 2994if test -n "$CC"; then
81ecdfbb
RW
2995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2996$as_echo "$CC" >&6; }
c906108c 2997else
81ecdfbb
RW
2998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2999$as_echo "no" >&6; }
c906108c 3000fi
bec39cab 3001
81ecdfbb 3002
bec39cab
AC
3003 test -n "$CC" && break
3004 done
3005fi
3006if test -z "$CC"; then
3007 ac_ct_CC=$CC
81ecdfbb 3008 for ac_prog in cl.exe
bec39cab
AC
3009do
3010 # Extract the first word of "$ac_prog", so it can be a program name with args.
3011set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3013$as_echo_n "checking for $ac_word... " >&6; }
3014if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3015 $as_echo_n "(cached) " >&6
bec39cab
AC
3016else
3017 if test -n "$ac_ct_CC"; then
3018 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3019else
3020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3021for as_dir in $PATH
3022do
3023 IFS=$as_save_IFS
3024 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3025 for ac_exec_ext in '' $ac_executable_extensions; do
3026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3027 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3029 break 2
c906108c 3030 fi
bec39cab 3031done
81ecdfbb
RW
3032 done
3033IFS=$as_save_IFS
bec39cab
AC
3034
3035fi
3036fi
3037ac_ct_CC=$ac_cv_prog_ac_ct_CC
3038if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3040$as_echo "$ac_ct_CC" >&6; }
bec39cab 3041else
81ecdfbb
RW
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3043$as_echo "no" >&6; }
c906108c
SS
3044fi
3045
81ecdfbb 3046
bec39cab
AC
3047 test -n "$ac_ct_CC" && break
3048done
c906108c 3049
81ecdfbb
RW
3050 if test "x$ac_ct_CC" = x; then
3051 CC=""
3052 else
3053 case $cross_compiling:$ac_tool_warned in
3054yes:)
3055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3057ac_tool_warned=yes ;;
3058esac
3059 CC=$ac_ct_CC
3060 fi
bec39cab
AC
3061fi
3062
3063fi
3064
3065
81ecdfbb
RW
3066test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3068as_fn_error "no acceptable C compiler found in \$PATH
3069See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3070
3071# Provide some information about the compiler.
81ecdfbb
RW
3072$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3073set X $ac_compile
3074ac_compiler=$2
3075for ac_option in --version -v -V -qversion; do
3076 { { ac_try="$ac_compiler $ac_option >&5"
3077case "(($ac_try" in
3078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079 *) ac_try_echo=$ac_try;;
3080esac
3081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3082$as_echo "$ac_try_echo"; } >&5
3083 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3084 ac_status=$?
81ecdfbb
RW
3085 if test -s conftest.err; then
3086 sed '10a\
3087... rest of stderr output deleted ...
3088 10q' conftest.err >conftest.er1
3089 cat conftest.er1 >&5
3090 rm -f conftest.er1 conftest.err
3091 fi
3092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3093 test $ac_status = 0; }
3094done
bec39cab 3095
81ecdfbb 3096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3097/* end confdefs.h. */
3098
3099int
3100main ()
3101{
3102
3103 ;
3104 return 0;
3105}
3106_ACEOF
3107ac_clean_files_save=$ac_clean_files
81ecdfbb 3108ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3109# Try to create an executable without -o first, disregard a.out.
3110# It will help us diagnose broken compilers, and finding out an intuition
3111# of exeext.
81ecdfbb
RW
3112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3113$as_echo_n "checking for C compiler default output file name... " >&6; }
3114ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3115
3116# The possible output files:
3117ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3118
3119ac_rmfiles=
3120for ac_file in $ac_files
3121do
3122 case $ac_file in
3123 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3124 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3125 esac
3126done
3127rm -f $ac_rmfiles
3128
3129if { { ac_try="$ac_link_default"
3130case "(($ac_try" in
3131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3132 *) ac_try_echo=$ac_try;;
3133esac
3134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3135$as_echo "$ac_try_echo"; } >&5
3136 (eval "$ac_link_default") 2>&5
3137 ac_status=$?
3138 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3139 test $ac_status = 0; }; then :
3140 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3141# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3142# in a Makefile. We should not override ac_cv_exeext if it was cached,
3143# so that the user can short-circuit this test for compilers unknown to
3144# Autoconf.
3145for ac_file in $ac_files ''
bec39cab
AC
3146do
3147 test -f "$ac_file" || continue
3148 case $ac_file in
81ecdfbb 3149 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3150 ;;
3151 [ab].out )
3152 # We found the default executable, but exeext='' is most
3153 # certainly right.
3154 break;;
3155 *.* )
81ecdfbb
RW
3156 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3157 then :; else
3158 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3159 fi
3160 # We set ac_cv_exeext here because the later test for it is not
3161 # safe: cross compilers may not add the suffix if given an `-o'
3162 # argument, so we may need to know it at that point already.
3163 # Even if this section looks crufty: it has the advantage of
3164 # actually working.
b4e70030
JB
3165 break;;
3166 * )
3167 break;;
bec39cab
AC
3168 esac
3169done
81ecdfbb
RW
3170test "$ac_cv_exeext" = no && ac_cv_exeext=
3171
bec39cab 3172else
81ecdfbb
RW
3173 ac_file=''
3174fi
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3176$as_echo "$ac_file" >&6; }
3177if test -z "$ac_file"; then :
3178 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3179sed 's/^/| /' conftest.$ac_ext >&5
3180
81ecdfbb
RW
3181{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3183{ as_fn_set_status 77
3184as_fn_error "C compiler cannot create executables
3185See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3186fi
b4e70030 3187ac_exeext=$ac_cv_exeext
b4e70030 3188
81ecdfbb 3189# Check that the compiler produces executables we can run. If not, either
bec39cab 3190# the compiler is broken, or we cross compile.
81ecdfbb
RW
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3192$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3193# If not cross compiling, check that we can run a simple program.
3194if test "$cross_compiling" != yes; then
3195 if { ac_try='./$ac_file'
81ecdfbb
RW
3196 { { case "(($ac_try" in
3197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3198 *) ac_try_echo=$ac_try;;
3199esac
3200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3201$as_echo "$ac_try_echo"; } >&5
3202 (eval "$ac_try") 2>&5
bec39cab 3203 ac_status=$?
81ecdfbb
RW
3204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3205 test $ac_status = 0; }; }; then
bec39cab 3206 cross_compiling=no
c906108c 3207 else
bec39cab
AC
3208 if test "$cross_compiling" = maybe; then
3209 cross_compiling=yes
3210 else
81ecdfbb
RW
3211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3213as_fn_error "cannot run C compiled programs.
bec39cab 3214If you meant to cross compile, use \`--host'.
81ecdfbb 3215See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3216 fi
c906108c 3217 fi
bec39cab 3218fi
81ecdfbb
RW
3219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3220$as_echo "yes" >&6; }
bec39cab 3221
81ecdfbb 3222rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3223ac_clean_files=$ac_clean_files_save
81ecdfbb 3224# Check that the compiler produces executables we can run. If not, either
b4e70030 3225# the compiler is broken, or we cross compile.
81ecdfbb
RW
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3227$as_echo_n "checking whether we are cross compiling... " >&6; }
3228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3229$as_echo "$cross_compiling" >&6; }
3230
3231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3232$as_echo_n "checking for suffix of executables... " >&6; }
3233if { { ac_try="$ac_link"
3234case "(($ac_try" in
3235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3236 *) ac_try_echo=$ac_try;;
3237esac
3238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3239$as_echo "$ac_try_echo"; } >&5
3240 (eval "$ac_link") 2>&5
bec39cab 3241 ac_status=$?
81ecdfbb
RW
3242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3243 test $ac_status = 0; }; then :
b4e70030
JB
3244 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3245# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3246# work properly (i.e., refer to `conftest.exe'), while it won't with
3247# `rm'.
3248for ac_file in conftest.exe conftest conftest.*; do
3249 test -f "$ac_file" || continue
3250 case $ac_file in
81ecdfbb 3251 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3252 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3253 break;;
3254 * ) break;;
3255 esac
3256done
c906108c 3257else
81ecdfbb
RW
3258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3260as_fn_error "cannot compute suffix of executables: cannot compile and link
3261See \`config.log' for more details." "$LINENO" 5; }
c906108c 3262fi
b4e70030 3263rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3265$as_echo "$ac_cv_exeext" >&6; }
c906108c 3266
b4e70030 3267rm -f conftest.$ac_ext
bec39cab
AC
3268EXEEXT=$ac_cv_exeext
3269ac_exeext=$EXEEXT
81ecdfbb
RW
3270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3271$as_echo_n "checking for suffix of object files... " >&6; }
3272if test "${ac_cv_objext+set}" = set; then :
3273 $as_echo_n "(cached) " >&6
bec39cab 3274else
81ecdfbb 3275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3276/* end confdefs.h. */
3277
3278int
3279main ()
3280{
3281
3282 ;
3283 return 0;
3284}
3285_ACEOF
3286rm -f conftest.o conftest.obj
81ecdfbb
RW
3287if { { ac_try="$ac_compile"
3288case "(($ac_try" in
3289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3290 *) ac_try_echo=$ac_try;;
3291esac
3292eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3293$as_echo "$ac_try_echo"; } >&5
3294 (eval "$ac_compile") 2>&5
3295 ac_status=$?
3296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3297 test $ac_status = 0; }; then :
3298 for ac_file in conftest.o conftest.obj conftest.*; do
3299 test -f "$ac_file" || continue;
bec39cab 3300 case $ac_file in
81ecdfbb 3301 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3302 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3303 break;;
3304 esac
3305done
c906108c 3306else
81ecdfbb 3307 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3308sed 's/^/| /' conftest.$ac_ext >&5
3309
81ecdfbb
RW
3310{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3312as_fn_error "cannot compute suffix of object files: cannot compile
3313See \`config.log' for more details." "$LINENO" 5; }
c906108c 3314fi
b4e70030 3315rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3316fi
81ecdfbb
RW
3317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3318$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3319OBJEXT=$ac_cv_objext
3320ac_objext=$OBJEXT
81ecdfbb
RW
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3322$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3323if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3324 $as_echo_n "(cached) " >&6
c906108c 3325else
81ecdfbb 3326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3327/* end confdefs.h. */
3328
3329int
3330main ()
3331{
3332#ifndef __GNUC__
3333 choke me
3334#endif
3335
3336 ;
3337 return 0;
3338}
3339_ACEOF
81ecdfbb 3340if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3341 ac_compiler_gnu=yes
3342else
81ecdfbb 3343 ac_compiler_gnu=no
bec39cab 3344fi
81ecdfbb 3345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3346ac_cv_c_compiler_gnu=$ac_compiler_gnu
3347
3348fi
81ecdfbb
RW
3349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3350$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3351if test $ac_compiler_gnu = yes; then
3352 GCC=yes
3353else
3354 GCC=
3355fi
bec39cab
AC
3356ac_test_CFLAGS=${CFLAGS+set}
3357ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3359$as_echo_n "checking whether $CC accepts -g... " >&6; }
3360if test "${ac_cv_prog_cc_g+set}" = set; then :
3361 $as_echo_n "(cached) " >&6
bec39cab 3362else
81ecdfbb
RW
3363 ac_save_c_werror_flag=$ac_c_werror_flag
3364 ac_c_werror_flag=yes
3365 ac_cv_prog_cc_g=no
3366 CFLAGS="-g"
3367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3368/* end confdefs.h. */
3369
3370int
3371main ()
3372{
3373
3374 ;
3375 return 0;
3376}
3377_ACEOF
81ecdfbb 3378if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3379 ac_cv_prog_cc_g=yes
3380else
81ecdfbb
RW
3381 CFLAGS=""
3382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3383/* end confdefs.h. */
3384
3385int
3386main ()
3387{
3388
3389 ;
3390 return 0;
3391}
3392_ACEOF
3393if ac_fn_c_try_compile "$LINENO"; then :
3394
3395else
3396 ac_c_werror_flag=$ac_save_c_werror_flag
3397 CFLAGS="-g"
3398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3399/* end confdefs.h. */
3400
3401int
3402main ()
3403{
c906108c 3404
81ecdfbb
RW
3405 ;
3406 return 0;
3407}
3408_ACEOF
3409if ac_fn_c_try_compile "$LINENO"; then :
3410 ac_cv_prog_cc_g=yes
3411fi
3412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3413fi
3414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3415fi
81ecdfbb
RW
3416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3417 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3418fi
81ecdfbb
RW
3419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3420$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3421if test "$ac_test_CFLAGS" = set; then
bec39cab 3422 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3423elif test $ac_cv_prog_cc_g = yes; then
3424 if test "$GCC" = yes; then
3425 CFLAGS="-g -O2"
3426 else
3427 CFLAGS="-g"
3428 fi
3429else
3430 if test "$GCC" = yes; then
3431 CFLAGS="-O2"
3432 else
3433 CFLAGS=
3434 fi
3435fi
81ecdfbb
RW
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3437$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3438if test "${ac_cv_prog_cc_c89+set}" = set; then :
3439 $as_echo_n "(cached) " >&6
bec39cab 3440else
81ecdfbb 3441 ac_cv_prog_cc_c89=no
bec39cab 3442ac_save_CC=$CC
81ecdfbb 3443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3444/* end confdefs.h. */
c906108c
SS
3445#include <stdarg.h>
3446#include <stdio.h>
3447#include <sys/types.h>
3448#include <sys/stat.h>
3449/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3450struct buf { int x; };
3451FILE * (*rcsopen) (struct buf *, struct stat *, int);
3452static char *e (p, i)
3453 char **p;
3454 int i;
3455{
3456 return p[i];
3457}
3458static char *f (char * (*g) (char **, int), char **p, ...)
3459{
3460 char *s;
3461 va_list v;
3462 va_start (v,p);
3463 s = g (p, va_arg (v,int));
3464 va_end (v);
3465 return s;
3466}
bec39cab
AC
3467
3468/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3469 function prototypes and stuff, but not '\xHH' hex character constants.
3470 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3471 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3472 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3473 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3474 that's true only with -std. */
bec39cab
AC
3475int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3476
81ecdfbb
RW
3477/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3478 inside strings and character constants. */
3479#define FOO(x) 'x'
3480int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3481
c906108c
SS
3482int test (int i, double x);
3483struct s1 {int (*f) (int a);};
3484struct s2 {int (*f) (double a);};
3485int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3486int argc;
3487char **argv;
bec39cab
AC
3488int
3489main ()
3490{
c906108c 3491return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3492 ;
3493 return 0;
3494}
3495_ACEOF
81ecdfbb
RW
3496for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3497 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3498do
3499 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3500 if ac_fn_c_try_compile "$LINENO"; then :
3501 ac_cv_prog_cc_c89=$ac_arg
c906108c 3502fi
81ecdfbb
RW
3503rm -f core conftest.err conftest.$ac_objext
3504 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3505done
81ecdfbb 3506rm -f conftest.$ac_ext
bec39cab 3507CC=$ac_save_CC
c906108c
SS
3508
3509fi
81ecdfbb
RW
3510# AC_CACHE_VAL
3511case "x$ac_cv_prog_cc_c89" in
3512 x)
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3514$as_echo "none needed" >&6; } ;;
3515 xno)
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3517$as_echo "unsupported" >&6; } ;;
bec39cab 3518 *)
81ecdfbb
RW
3519 CC="$CC $ac_cv_prog_cc_c89"
3520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3521$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3522esac
81ecdfbb 3523if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3524
b4e70030
JB
3525fi
3526
bec39cab
AC
3527ac_ext=c
3528ac_cpp='$CPP $CPPFLAGS'
3529ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3530ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3531ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3532
60ca704f 3533
bec39cab
AC
3534ac_ext=c
3535ac_cpp='$CPP $CPPFLAGS'
3536ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3537ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3538ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3540$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3541# On Suns, sometimes $CPP names a directory.
3542if test -n "$CPP" && test -d "$CPP"; then
3543 CPP=
8bb2c122 3544fi
bec39cab 3545if test -z "$CPP"; then
81ecdfbb
RW
3546 if test "${ac_cv_prog_CPP+set}" = set; then :
3547 $as_echo_n "(cached) " >&6
bec39cab
AC
3548else
3549 # Double quotes because CPP needs to be expanded
3550 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3551 do
3552 ac_preproc_ok=false
3553for ac_c_preproc_warn_flag in '' yes
3554do
3555 # Use a header file that comes with gcc, so configuring glibc
3556 # with a fresh cross-compiler works.
3557 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3558 # <limits.h> exists even on freestanding compilers.
3559 # On the NeXT, cc -E runs the code through the compiler's parser,
3560 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3562/* end confdefs.h. */
3563#ifdef __STDC__
3564# include <limits.h>
3565#else
3566# include <assert.h>
3567#endif
3568 Syntax error
3569_ACEOF
81ecdfbb 3570if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3571
81ecdfbb 3572else
bec39cab
AC
3573 # Broken: fails on valid input.
3574continue
3575fi
3576rm -f conftest.err conftest.$ac_ext
3577
81ecdfbb 3578 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3579 # can be detected and how.
81ecdfbb 3580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3581/* end confdefs.h. */
3582#include <ac_nonexistent.h>
3583_ACEOF
81ecdfbb 3584if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3585 # Broken: success on invalid input.
3586continue
8bb2c122 3587else
bec39cab
AC
3588 # Passes both tests.
3589ac_preproc_ok=:
3590break
8bb2c122 3591fi
bec39cab 3592rm -f conftest.err conftest.$ac_ext
8bb2c122 3593
bec39cab
AC
3594done
3595# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3596rm -f conftest.err conftest.$ac_ext
81ecdfbb 3597if $ac_preproc_ok; then :
bec39cab
AC
3598 break
3599fi
8bb2c122 3600
bec39cab
AC
3601 done
3602 ac_cv_prog_CPP=$CPP
ddc9cd0f 3603
c906108c 3604fi
bec39cab
AC
3605 CPP=$ac_cv_prog_CPP
3606else
3607 ac_cv_prog_CPP=$CPP
c906108c 3608fi
81ecdfbb
RW
3609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3610$as_echo "$CPP" >&6; }
bec39cab
AC
3611ac_preproc_ok=false
3612for ac_c_preproc_warn_flag in '' yes
3613do
3614 # Use a header file that comes with gcc, so configuring glibc
3615 # with a fresh cross-compiler works.
3616 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3617 # <limits.h> exists even on freestanding compilers.
3618 # On the NeXT, cc -E runs the code through the compiler's parser,
3619 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3621/* end confdefs.h. */
3622#ifdef __STDC__
3623# include <limits.h>
3624#else
3625# include <assert.h>
3626#endif
3627 Syntax error
3628_ACEOF
81ecdfbb 3629if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3630
81ecdfbb 3631else
bec39cab
AC
3632 # Broken: fails on valid input.
3633continue
3634fi
3635rm -f conftest.err conftest.$ac_ext
3636
81ecdfbb 3637 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3638 # can be detected and how.
81ecdfbb 3639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3640/* end confdefs.h. */
3641#include <ac_nonexistent.h>
3642_ACEOF
81ecdfbb 3643if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3644 # Broken: success on invalid input.
3645continue
c906108c 3646else
bec39cab
AC
3647 # Passes both tests.
3648ac_preproc_ok=:
3649break
c906108c 3650fi
bec39cab 3651rm -f conftest.err conftest.$ac_ext
c906108c 3652
bec39cab
AC
3653done
3654# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3655rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3656if $ac_preproc_ok; then :
3657
c906108c 3658else
81ecdfbb
RW
3659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3661as_fn_error "C preprocessor \"$CPP\" fails sanity check
3662See \`config.log' for more details." "$LINENO" 5; }
c906108c 3663fi
c906108c 3664
bec39cab
AC
3665ac_ext=c
3666ac_cpp='$CPP $CPPFLAGS'
3667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3669ac_compiler_gnu=$ac_cv_c_compiler_gnu
3670
3671
81ecdfbb
RW
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3673$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3674if test "${ac_cv_path_GREP+set}" = set; then :
3675 $as_echo_n "(cached) " >&6
4e8d927d 3676else
81ecdfbb
RW
3677 if test -z "$GREP"; then
3678 ac_path_GREP_found=false
3679 # Loop through the user's path and test for each of PROGNAME-LIST
3680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
3685 for ac_prog in grep ggrep; do
3686 for ac_exec_ext in '' $ac_executable_extensions; do
3687 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3688 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3689# Check for GNU ac_path_GREP and select it if it is found.
3690 # Check for GNU $ac_path_GREP
3691case `"$ac_path_GREP" --version 2>&1` in
3692*GNU*)
3693 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3694*)
3695 ac_count=0
3696 $as_echo_n 0123456789 >"conftest.in"
3697 while :
3698 do
3699 cat "conftest.in" "conftest.in" >"conftest.tmp"
3700 mv "conftest.tmp" "conftest.in"
3701 cp "conftest.in" "conftest.nl"
3702 $as_echo 'GREP' >> "conftest.nl"
3703 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3704 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3705 as_fn_arith $ac_count + 1 && ac_count=$as_val
3706 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3707 # Best one so far, save it but keep looking for a better one
3708 ac_cv_path_GREP="$ac_path_GREP"
3709 ac_path_GREP_max=$ac_count
bec39cab 3710 fi
81ecdfbb
RW
3711 # 10*(2^10) chars as input seems more than enough
3712 test $ac_count -gt 10 && break
3713 done
3714 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3715esac
bec39cab 3716
81ecdfbb
RW
3717 $ac_path_GREP_found && break 3
3718 done
3719 done
3720 done
3721IFS=$as_save_IFS
3722 if test -z "$ac_cv_path_GREP"; then
3723 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3724 fi
c906108c 3725else
81ecdfbb 3726 ac_cv_path_GREP=$GREP
c906108c 3727fi
c906108c 3728
81ecdfbb
RW
3729fi
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3731$as_echo "$ac_cv_path_GREP" >&6; }
3732 GREP="$ac_cv_path_GREP"
c906108c 3733
c906108c 3734
81ecdfbb
RW
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3736$as_echo_n "checking for egrep... " >&6; }
3737if test "${ac_cv_path_EGREP+set}" = set; then :
3738 $as_echo_n "(cached) " >&6
783e057b 3739else
81ecdfbb
RW
3740 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3741 then ac_cv_path_EGREP="$GREP -E"
3742 else
3743 if test -z "$EGREP"; then
3744 ac_path_EGREP_found=false
3745 # Loop through the user's path and test for each of PROGNAME-LIST
3746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3751 for ac_prog in egrep; do
3752 for ac_exec_ext in '' $ac_executable_extensions; do
3753 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3754 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3755# Check for GNU ac_path_EGREP and select it if it is found.
3756 # Check for GNU $ac_path_EGREP
3757case `"$ac_path_EGREP" --version 2>&1` in
3758*GNU*)
3759 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3760*)
3761 ac_count=0
3762 $as_echo_n 0123456789 >"conftest.in"
3763 while :
3764 do
3765 cat "conftest.in" "conftest.in" >"conftest.tmp"
3766 mv "conftest.tmp" "conftest.in"
3767 cp "conftest.in" "conftest.nl"
3768 $as_echo 'EGREP' >> "conftest.nl"
3769 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3770 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3771 as_fn_arith $ac_count + 1 && ac_count=$as_val
3772 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3773 # Best one so far, save it but keep looking for a better one
3774 ac_cv_path_EGREP="$ac_path_EGREP"
3775 ac_path_EGREP_max=$ac_count
3776 fi
3777 # 10*(2^10) chars as input seems more than enough
3778 test $ac_count -gt 10 && break
3779 done
3780 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3781esac
bec39cab 3782
81ecdfbb
RW
3783 $ac_path_EGREP_found && break 3
3784 done
3785 done
3786 done
3787IFS=$as_save_IFS
3788 if test -z "$ac_cv_path_EGREP"; then
3789 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3790 fi
783e057b 3791else
81ecdfbb 3792 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3793fi
3794
81ecdfbb 3795 fi
783e057b 3796fi
81ecdfbb
RW
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3798$as_echo "$ac_cv_path_EGREP" >&6; }
3799 EGREP="$ac_cv_path_EGREP"
3800
783e057b 3801
81ecdfbb
RW
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3803$as_echo_n "checking for ANSI C header files... " >&6; }
3804if test "${ac_cv_header_stdc+set}" = set; then :
3805 $as_echo_n "(cached) " >&6
783e057b 3806else
81ecdfbb 3807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3808/* end confdefs.h. */
783e057b 3809#include <stdlib.h>
bec39cab 3810#include <stdarg.h>
783e057b
DJ
3811#include <string.h>
3812#include <float.h>
c906108c 3813
bec39cab
AC
3814int
3815main ()
3816{
c906108c 3817
bec39cab
AC
3818 ;
3819 return 0;
3820}
3821_ACEOF
81ecdfbb 3822if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3823 ac_cv_header_stdc=yes
c906108c 3824else
81ecdfbb 3825 ac_cv_header_stdc=no
c906108c 3826fi
81ecdfbb 3827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3828
783e057b
DJ
3829if test $ac_cv_header_stdc = yes; then
3830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3832/* end confdefs.h. */
3833#include <string.h>
c906108c 3834
783e057b
DJ
3835_ACEOF
3836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3837 $EGREP "memchr" >/dev/null 2>&1; then :
3838
c906108c 3839else
783e057b 3840 ac_cv_header_stdc=no
c906108c 3841fi
783e057b 3842rm -f conftest*
c906108c
SS
3843
3844fi
3845
783e057b
DJ
3846if test $ac_cv_header_stdc = yes; then
3847 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3849/* end confdefs.h. */
3850#include <stdlib.h>
bec39cab 3851
783e057b
DJ
3852_ACEOF
3853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3854 $EGREP "free" >/dev/null 2>&1; then :
3855
bec39cab 3856else
783e057b 3857 ac_cv_header_stdc=no
bec39cab 3858fi
783e057b 3859rm -f conftest*
bec39cab
AC
3860
3861fi
bec39cab 3862
783e057b
DJ
3863if test $ac_cv_header_stdc = yes; then
3864 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3865 if test "$cross_compiling" = yes; then :
783e057b 3866 :
bec39cab 3867else
81ecdfbb 3868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3869/* end confdefs.h. */
3870#include <ctype.h>
81ecdfbb 3871#include <stdlib.h>
783e057b
DJ
3872#if ((' ' & 0x0FF) == 0x020)
3873# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3874# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3875#else
3876# define ISLOWER(c) \
3877 (('a' <= (c) && (c) <= 'i') \
3878 || ('j' <= (c) && (c) <= 'r') \
3879 || ('s' <= (c) && (c) <= 'z'))
3880# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3881#endif
3882
3883#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3884int
3885main ()
3886{
3887 int i;
3888 for (i = 0; i < 256; i++)
3889 if (XOR (islower (i), ISLOWER (i))
3890 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3891 return 2;
3892 return 0;
783e057b
DJ
3893}
3894_ACEOF
81ecdfbb 3895if ac_fn_c_try_run "$LINENO"; then :
783e057b 3896
81ecdfbb
RW
3897else
3898 ac_cv_header_stdc=no
783e057b 3899fi
81ecdfbb
RW
3900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3901 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3902fi
81ecdfbb 3903
783e057b
DJ
3904fi
3905fi
81ecdfbb
RW
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3907$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3908if test $ac_cv_header_stdc = yes; then
3909
81ecdfbb 3910$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3911
3912fi
3913
3914# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3915for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3916 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3917do :
3918 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3919ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3920"
3921eval as_val=\$$as_ac_Header
3922 if test "x$as_val" = x""yes; then :
783e057b 3923 cat >>confdefs.h <<_ACEOF
81ecdfbb 3924#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3925_ACEOF
3926
3927fi
3928
3929done
3930
3931
3932
81ecdfbb
RW
3933 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3934if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3935 MINIX=yes
3936else
3937 MINIX=
3938fi
3939
3940
3941 if test "$MINIX" = yes; then
3942
81ecdfbb 3943$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3944
3945
81ecdfbb 3946$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3947
3948
81ecdfbb 3949$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3950
3951 fi
3952
3953
81ecdfbb
RW
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3955$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3956if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3957 $as_echo_n "(cached) " >&6
783e057b 3958else
81ecdfbb 3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3960/* end confdefs.h. */
3961
3962# define __EXTENSIONS__ 1
3963 $ac_includes_default
3964int
3965main ()
3966{
3967
3968 ;
3969 return 0;
3970}
3971_ACEOF
81ecdfbb 3972if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3973 ac_cv_safe_to_define___extensions__=yes
3974else
81ecdfbb 3975 ac_cv_safe_to_define___extensions__=no
783e057b 3976fi
81ecdfbb 3977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3978fi
81ecdfbb
RW
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3980$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3981 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3982 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3983
81ecdfbb 3984 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3985
81ecdfbb 3986 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3987
81ecdfbb 3988 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3989
81ecdfbb 3990 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3991
3992
81ecdfbb
RW
3993if test -n "$ac_tool_prefix"; then
3994 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3995set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3997$as_echo_n "checking for $ac_word... " >&6; }
3998if test "${ac_cv_prog_RANLIB+set}" = set; then :
3999 $as_echo_n "(cached) " >&6
4000else
4001 if test -n "$RANLIB"; then
4002 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4003else
4004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4005for as_dir in $PATH
4006do
4007 IFS=$as_save_IFS
4008 test -z "$as_dir" && as_dir=.
4009 for ac_exec_ext in '' $ac_executable_extensions; do
4010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4011 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4013 break 2
4014 fi
4015done
4016 done
4017IFS=$as_save_IFS
783e057b 4018
81ecdfbb
RW
4019fi
4020fi
4021RANLIB=$ac_cv_prog_RANLIB
4022if test -n "$RANLIB"; then
4023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4024$as_echo "$RANLIB" >&6; }
4025else
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4027$as_echo "no" >&6; }
4028fi
783e057b
DJ
4029
4030
81ecdfbb
RW
4031fi
4032if test -z "$ac_cv_prog_RANLIB"; then
4033 ac_ct_RANLIB=$RANLIB
4034 # Extract the first word of "ranlib", so it can be a program name with args.
4035set dummy ranlib; ac_word=$2
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4037$as_echo_n "checking for $ac_word... " >&6; }
4038if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4039 $as_echo_n "(cached) " >&6
783e057b 4040else
81ecdfbb
RW
4041 if test -n "$ac_ct_RANLIB"; then
4042 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4043else
4044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045for as_dir in $PATH
4046do
4047 IFS=$as_save_IFS
4048 test -z "$as_dir" && as_dir=.
4049 for ac_exec_ext in '' $ac_executable_extensions; do
4050 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4051 ac_cv_prog_ac_ct_RANLIB="ranlib"
4052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053 break 2
4054 fi
4055done
4056 done
4057IFS=$as_save_IFS
4058
4059fi
4060fi
4061ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4062if test -n "$ac_ct_RANLIB"; then
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4064$as_echo "$ac_ct_RANLIB" >&6; }
4065else
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4067$as_echo "no" >&6; }
4068fi
4069
4070 if test "x$ac_ct_RANLIB" = x; then
4071 RANLIB=":"
4072 else
4073 case $cross_compiling:$ac_tool_warned in
4074yes:)
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4077ac_tool_warned=yes ;;
4078esac
4079 RANLIB=$ac_ct_RANLIB
4080 fi
4081else
4082 RANLIB="$ac_cv_prog_RANLIB"
4083fi
4084
4085
4086
4087
4088
4089
4090
da2f07f1
JK
4091# As the $enable_largefile decision depends on --enable-plugins we must set it
4092# even in directories otherwise not depending on the $plugins option.
4093
4094
4095# Check whether --enable-plugins was given.
4096if test "${enable_plugins+set}" = set; then :
4097 enableval=$enable_plugins; case "${enableval}" in
4098 yes | "") plugins=yes ;;
4099 no) plugins=no ;;
4100 *) plugins=yes ;;
4101 esac
4102else
4103 plugins=no
4104fi
4105
4106
4107
4108case "${host}" in
4109 sparc-*-solaris*|i[3-7]86-*-solaris*)
4110 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4111 # are mutually exclusive; and without procfs support, the bfd/ elf module
4112 # cannot provide certain routines such as elfcore_write_prpsinfo
4113 # or elfcore_write_prstatus. So unless the user explicitly requested
4114 # large-file support through the --enable-largefile switch, disable
4115 # large-file support in favor of procfs support.
4116 test "${target}" = "${host}" -a "x$plugins" = xno \
4117 && : ${enable_largefile="no"}
4118 ;;
4119esac
4120
4121# Check whether --enable-largefile was given.
4122if test "${enable_largefile+set}" = set; then :
4123 enableval=$enable_largefile;
4124fi
4125
4126if test "$enable_largefile" != no; then
4127
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4129$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4130if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4131 $as_echo_n "(cached) " >&6
4132else
4133 ac_cv_sys_largefile_CC=no
4134 if test "$GCC" != yes; then
4135 ac_save_CC=$CC
4136 while :; do
4137 # IRIX 6.2 and later do not support large files by default,
4138 # so use the C compiler's -n32 option if that helps.
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4140/* end confdefs.h. */
4141#include <sys/types.h>
4142 /* Check that off_t can represent 2**63 - 1 correctly.
4143 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4144 since some C++ compilers masquerading as C compilers
4145 incorrectly reject 9223372036854775807. */
4146#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4147 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4148 && LARGE_OFF_T % 2147483647 == 1)
4149 ? 1 : -1];
4150int
4151main ()
4152{
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
4158 if ac_fn_c_try_compile "$LINENO"; then :
4159 break
4160fi
4161rm -f core conftest.err conftest.$ac_objext
4162 CC="$CC -n32"
4163 if ac_fn_c_try_compile "$LINENO"; then :
4164 ac_cv_sys_largefile_CC=' -n32'; break
4165fi
4166rm -f core conftest.err conftest.$ac_objext
4167 break
4168 done
4169 CC=$ac_save_CC
4170 rm -f conftest.$ac_ext
4171 fi
4172fi
4173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4174$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4175 if test "$ac_cv_sys_largefile_CC" != no; then
4176 CC=$CC$ac_cv_sys_largefile_CC
4177 fi
4178
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4180$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4181if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4182 $as_echo_n "(cached) " >&6
4183else
4184 while :; do
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186/* end confdefs.h. */
4187#include <sys/types.h>
4188 /* Check that off_t can represent 2**63 - 1 correctly.
4189 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4190 since some C++ compilers masquerading as C compilers
4191 incorrectly reject 9223372036854775807. */
4192#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4193 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4194 && LARGE_OFF_T % 2147483647 == 1)
4195 ? 1 : -1];
4196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
4204if ac_fn_c_try_compile "$LINENO"; then :
4205 ac_cv_sys_file_offset_bits=no; break
4206fi
4207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209/* end confdefs.h. */
4210#define _FILE_OFFSET_BITS 64
4211#include <sys/types.h>
4212 /* Check that off_t can represent 2**63 - 1 correctly.
4213 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4214 since some C++ compilers masquerading as C compilers
4215 incorrectly reject 9223372036854775807. */
4216#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4217 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4218 && LARGE_OFF_T % 2147483647 == 1)
4219 ? 1 : -1];
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
4228if ac_fn_c_try_compile "$LINENO"; then :
4229 ac_cv_sys_file_offset_bits=64; break
4230fi
4231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4232 ac_cv_sys_file_offset_bits=unknown
4233 break
4234done
4235fi
4236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4237$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4238case $ac_cv_sys_file_offset_bits in #(
4239 no | unknown) ;;
4240 *)
4241cat >>confdefs.h <<_ACEOF
4242#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4243_ACEOF
4244;;
4245esac
4246rm -rf conftest*
4247 if test $ac_cv_sys_file_offset_bits = unknown; then
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4249$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4250if test "${ac_cv_sys_large_files+set}" = set; then :
4251 $as_echo_n "(cached) " >&6
4252else
4253 while :; do
4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255/* end confdefs.h. */
4256#include <sys/types.h>
4257 /* Check that off_t can represent 2**63 - 1 correctly.
4258 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4259 since some C++ compilers masquerading as C compilers
4260 incorrectly reject 9223372036854775807. */
4261#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4262 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4263 && LARGE_OFF_T % 2147483647 == 1)
4264 ? 1 : -1];
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
4273if ac_fn_c_try_compile "$LINENO"; then :
4274 ac_cv_sys_large_files=no; break
4275fi
4276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278/* end confdefs.h. */
4279#define _LARGE_FILES 1
4280#include <sys/types.h>
4281 /* Check that off_t can represent 2**63 - 1 correctly.
4282 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4283 since some C++ compilers masquerading as C compilers
4284 incorrectly reject 9223372036854775807. */
4285#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4286 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4287 && LARGE_OFF_T % 2147483647 == 1)
4288 ? 1 : -1];
4289int
4290main ()
4291{
4292
4293 ;
4294 return 0;
4295}
4296_ACEOF
4297if ac_fn_c_try_compile "$LINENO"; then :
4298 ac_cv_sys_large_files=1; break
4299fi
4300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4301 ac_cv_sys_large_files=unknown
4302 break
4303done
4304fi
4305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4306$as_echo "$ac_cv_sys_large_files" >&6; }
4307case $ac_cv_sys_large_files in #(
4308 no | unknown) ;;
4309 *)
4310cat >>confdefs.h <<_ACEOF
4311#define _LARGE_FILES $ac_cv_sys_large_files
4312_ACEOF
4313;;
4314esac
4315rm -rf conftest*
4316 fi
4317fi
4318
4319
4320
81ecdfbb
RW
4321
4322
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4324$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4325if test "${am_cv_prog_cc_stdc+set}" = set; then :
4326 $as_echo_n "(cached) " >&6
4327else
4328 am_cv_prog_cc_stdc=no
4329ac_save_CC="$CC"
4330# Don't try gcc -ansi; that turns off useful extensions and
4331# breaks some systems' header files.
4332# AIX -qlanglvl=ansi
4333# Ultrix and OSF/1 -std1
4334# HP-UX 10.20 and later -Ae
4335# HP-UX older versions -Aa -D_HPUX_SOURCE
4336# SVR4 -Xc -D__EXTENSIONS__
4337for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4338do
783e057b 4339 CC="$ac_save_CC $ac_arg"
81ecdfbb 4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4341/* end confdefs.h. */
4342#include <stdarg.h>
4343#include <stdio.h>
4344#include <sys/types.h>
4345#include <sys/stat.h>
4346/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4347struct buf { int x; };
4348FILE * (*rcsopen) (struct buf *, struct stat *, int);
4349static char *e (p, i)
4350 char **p;
4351 int i;
4352{
4353 return p[i];
4354}
4355static char *f (char * (*g) (char **, int), char **p, ...)
4356{
4357 char *s;
4358 va_list v;
4359 va_start (v,p);
4360 s = g (p, va_arg (v,int));
4361 va_end (v);
4362 return s;
4363}
4364int test (int i, double x);
4365struct s1 {int (*f) (int a);};
4366struct s2 {int (*f) (double a);};
4367int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4368int argc;
4369char **argv;
4370
4371int
4372main ()
4373{
4374
4375return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4376
4377 ;
4378 return 0;
4379}
4380_ACEOF
81ecdfbb 4381if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4382 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4383fi
81ecdfbb 4384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4385done
4386CC="$ac_save_CC"
4387
4388fi
4389
4390if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4392$as_echo "none needed" >&6; }
783e057b 4393else
81ecdfbb
RW
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4395$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4396fi
4397case "x$am_cv_prog_cc_stdc" in
4398 x|xno) ;;
4399 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4400esac
4401
4402
4403ac_aux_dir=
81ecdfbb
RW
4404for ac_dir in .. "$srcdir"/..; do
4405 for ac_t in install-sh install.sh shtool; do
4406 if test -f "$ac_dir/$ac_t"; then
4407 ac_aux_dir=$ac_dir
4408 ac_install_sh="$ac_aux_dir/$ac_t -c"
4409 break 2
4410 fi
4411 done
783e057b
DJ
4412done
4413if test -z "$ac_aux_dir"; then
81ecdfbb 4414 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4415fi
81ecdfbb
RW
4416
4417# These three variables are undocumented and unsupported,
4418# and are intended to be withdrawn in a future Autoconf release.
4419# They can cause serious problems if a builder's source tree is in a directory
4420# whose full name contains unusual characters.
4421ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4422ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4423ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4424
783e057b
DJ
4425
4426# Make sure we can run config.sub.
81ecdfbb
RW
4427$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4428 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4429
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4431$as_echo_n "checking build system type... " >&6; }
4432if test "${ac_cv_build+set}" = set; then :
4433 $as_echo_n "(cached) " >&6
4434else
4435 ac_build_alias=$build_alias
4436test "x$ac_build_alias" = x &&
4437 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4438test "x$ac_build_alias" = x &&
4439 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4440ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4441 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4442
4443fi
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4445$as_echo "$ac_cv_build" >&6; }
4446case $ac_cv_build in
4447*-*-*) ;;
4448*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4449esac
783e057b 4450build=$ac_cv_build
81ecdfbb
RW
4451ac_save_IFS=$IFS; IFS='-'
4452set x $ac_cv_build
4453shift
4454build_cpu=$1
4455build_vendor=$2
4456shift; shift
4457# Remember, the first character of IFS is used to create $*,
4458# except with old shells:
4459build_os=$*
4460IFS=$ac_save_IFS
4461case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4462
4463
81ecdfbb
RW
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4465$as_echo_n "checking host system type... " >&6; }
4466if test "${ac_cv_host+set}" = set; then :
4467 $as_echo_n "(cached) " >&6
4468else
4469 if test "x$host_alias" = x; then
4470 ac_cv_host=$ac_cv_build
783e057b 4471else
81ecdfbb
RW
4472 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4473 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4474fi
783e057b
DJ
4475
4476fi
81ecdfbb
RW
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4478$as_echo "$ac_cv_host" >&6; }
4479case $ac_cv_host in
4480*-*-*) ;;
4481*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4482esac
783e057b 4483host=$ac_cv_host
81ecdfbb
RW
4484ac_save_IFS=$IFS; IFS='-'
4485set x $ac_cv_host
4486shift
4487host_cpu=$1
4488host_vendor=$2
4489shift; shift
4490# Remember, the first character of IFS is used to create $*,
4491# except with old shells:
4492host_os=$*
4493IFS=$ac_save_IFS
4494case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4495
4496
81ecdfbb
RW
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4498$as_echo_n "checking target system type... " >&6; }
4499if test "${ac_cv_target+set}" = set; then :
4500 $as_echo_n "(cached) " >&6
783e057b 4501else
81ecdfbb
RW
4502 if test "x$target_alias" = x; then
4503 ac_cv_target=$ac_cv_host
4504else
4505 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4506 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4507fi
bec39cab
AC
4508
4509fi
81ecdfbb
RW
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4511$as_echo "$ac_cv_target" >&6; }
4512case $ac_cv_target in
4513*-*-*) ;;
4514*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4515esac
783e057b 4516target=$ac_cv_target
81ecdfbb
RW
4517ac_save_IFS=$IFS; IFS='-'
4518set x $ac_cv_target
4519shift
4520target_cpu=$1
4521target_vendor=$2
4522shift; shift
4523# Remember, the first character of IFS is used to create $*,
4524# except with old shells:
4525target_os=$*
4526IFS=$ac_save_IFS
4527case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
783e057b
DJ
4528
4529
4530# The aliases save the names the user supplied, while $host etc.
4531# will get canonicalized.
4532test -n "$target_alias" &&
4533 test "$program_prefix$program_suffix$program_transform_name" = \
4534 NONENONEs,x,x, &&
4535 program_prefix=${target_alias}-
4536
81ecdfbb 4537
a417dc56
RW
4538# Dependency checking.
4539rm -rf .tst 2>/dev/null
4540mkdir .tst 2>/dev/null
4541if test -d .tst; then
4542 am__leading_dot=.
4543else
4544 am__leading_dot=_
4545fi
4546rmdir .tst 2>/dev/null
4547
4548DEPDIR="${am__leading_dot}deps"
4549
81ecdfbb 4550ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4551
4552
4553depcc="$CC" am_compiler_list=
4554
4555am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4557$as_echo_n "checking dependency style of $depcc... " >&6; }
4558if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4559 $as_echo_n "(cached) " >&6
a417dc56
RW
4560else
4561 if test -f "$am_depcomp"; then
4562 # We make a subdir and do the tests there. Otherwise we can end up
4563 # making bogus files that we don't know about and never remove. For
4564 # instance it was reported that on HP-UX the gcc test will end up
4565 # making a dummy file named `D' -- because `-MD' means `put the output
4566 # in D'.
4567 mkdir conftest.dir
4568 # Copy depcomp to subdir because otherwise we won't find it if we're
4569 # using a relative directory.
4570 cp "$am_depcomp" conftest.dir
4571 cd conftest.dir
4572 # We will build objects and dependencies in a subdirectory because
4573 # it helps to detect inapplicable dependency modes. For instance
4574 # both Tru64's cc and ICC support -MD to output dependencies as a
4575 # side effect of compilation, but ICC will put the dependencies in
4576 # the current directory while Tru64 will put them in the object
4577 # directory.
4578 mkdir sub
4579
4580 am_cv_CC_dependencies_compiler_type=none
4581 if test "$am_compiler_list" = ""; then
4582 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4583 fi
4584 for depmode in $am_compiler_list; do
4585 if test $depmode = none; then break; fi
4586
81ecdfbb 4587 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4588 # Setup a source with many dependencies, because some compilers
4589 # like to wrap large dependency lists on column 80 (with \), and
4590 # we should not choose a depcomp mode which is confused by this.
4591 #
4592 # We need to recreate these files for each test, as the compiler may
4593 # overwrite some of them when testing with obscure command lines.
4594 # This happens at least with the AIX C compiler.
4595 : > sub/conftest.c
4596 for i in 1 2 3 4 5 6; do
4597 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4598 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4599 # Solaris 8's {/usr,}/bin/sh.
4600 touch sub/conftst$i.h
4601 done
4602 echo "include sub/conftest.Po" > confmf
4603
4604 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4605 # mode. It turns out that the SunPro C++ compiler does not properly
4606 # handle `-M -o', and we need to detect this.
4607 depcmd="depmode=$depmode \
4608 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4609 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4610 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4611 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4612 if env $depcmd > conftest.err 2>&1 &&
4613 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4614 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4615 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4616 # icc doesn't choke on unknown options, it will just issue warnings
4617 # or remarks (even with -Werror). So we grep stderr for any message
4618 # that says an option was ignored or not supported.
4619 # When given -MP, icc 7.0 and 7.1 complain thusly:
4620 # icc: Command line warning: ignoring option '-M'; no argument required
4621 # The diagnosis changed in icc 8.0:
4622 # icc: Command line remark: option '-MP' not supported
4623 if (grep 'ignoring option' conftest.err ||
4624 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4625 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4626 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4627 break
4628 fi
4629 fi
81ecdfbb 4630 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4631 sed -e 's/^/| /' < conftest.err >&5
4632 done
4633
4634 cd ..
4635 rm -rf conftest.dir
4636else
4637 am_cv_CC_dependencies_compiler_type=none
4638fi
4639
4640fi
81ecdfbb
RW
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4642$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4643if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4644then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4645else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4646
4647fi
4648
4649
4650# Check for the 'make' the user wants to use.
4651for ac_prog in make
4652do
4653 # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_prog_MAKE+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
a417dc56
RW
4659else
4660 if test -n "$MAKE"; then
4661 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4662else
4663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4670 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4672 break 2
4673 fi
4674done
81ecdfbb
RW
4675 done
4676IFS=$as_save_IFS
a417dc56
RW
4677
4678fi
4679fi
4680MAKE=$ac_cv_prog_MAKE
4681if test -n "$MAKE"; then
81ecdfbb
RW
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4683$as_echo "$MAKE" >&6; }
a417dc56 4684else
81ecdfbb
RW
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
a417dc56
RW
4687fi
4688
81ecdfbb 4689
a417dc56
RW
4690 test -n "$MAKE" && break
4691done
4692
4693MAKE_IS_GNU=
4694case "`$MAKE --version 2>&1 | sed 1q`" in
4695 *GNU*)
4696 MAKE_IS_GNU=yes
4697 ;;
4698esac
81ecdfbb 4699 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4700 GMAKE_TRUE=
4701 GMAKE_FALSE='#'
4702else
4703 GMAKE_TRUE='#'
4704 GMAKE_FALSE=
4705fi
4706
81ecdfbb
RW
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4708$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4709set x ${MAKE-make}
4710ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4711if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4712 $as_echo_n "(cached) " >&6
a417dc56
RW
4713else
4714 cat >conftest.make <<\_ACEOF
81ecdfbb 4715SHELL = /bin/sh
a417dc56 4716all:
81ecdfbb 4717 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4718_ACEOF
4719# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4720case `${MAKE-make} -f conftest.make 2>/dev/null` in
4721 *@@@%%%=?*=@@@%%%*)
4722 eval ac_cv_prog_make_${ac_make}_set=yes;;
4723 *)
4724 eval ac_cv_prog_make_${ac_make}_set=no;;
4725esac
a417dc56
RW
4726rm -f conftest.make
4727fi
81ecdfbb
RW
4728if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4730$as_echo "yes" >&6; }
a417dc56
RW
4731 SET_MAKE=
4732else
81ecdfbb
RW
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
a417dc56
RW
4735 SET_MAKE="MAKE=${MAKE-make}"
4736fi
4737
4738
783e057b
DJ
4739
4740CONFIG_OBS=
4741CONFIG_DEPS=
4742CONFIG_SRCS=
4743ENABLE_CFLAGS=
4744
4745CONFIG_ALL=
4746CONFIG_CLEAN=
4747CONFIG_INSTALL=
4748CONFIG_UNINSTALL=
4749
4750# If we haven't got the data from the intl directory,
4751# assume NLS is disabled.
4752USE_NLS=no
4753LIBINTL=
4754LIBINTL_DEP=
4755INCINTL=
4756XGETTEXT=
4757GMSGFMT=
4758POSUB=
4759
4760if test -f ../intl/config.intl; then
4761 . ../intl/config.intl
4762fi
81ecdfbb
RW
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4764$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4765if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767$as_echo "no" >&6; }
783e057b 4768else
81ecdfbb
RW
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4770$as_echo "yes" >&6; }
783e057b 4771
81ecdfbb 4772$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4773
4774
81ecdfbb
RW
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4776$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4777 # Look for .po and .gmo files in the source directory.
4778 CATALOGS=
4779 XLINGUAS=
4780 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4781 # If there aren't any .gmo files the shell will give us the
4782 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4783 # weeded out.
4784 case "$cat" in *\**)
4785 continue;;
4786 esac
4787 # The quadruple backslash is collapsed to a double backslash
4788 # by the backticks, then collapsed again by the double quotes,
4789 # leaving us with one backslash in the sed expression (right
4790 # before the dot that mustn't act as a wildcard).
4791 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4792 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4793 # The user is allowed to set LINGUAS to a list of languages to
4794 # install catalogs for. If it's empty that means "all of them."
4795 if test "x$LINGUAS" = x; then
4796 CATALOGS="$CATALOGS $cat"
4797 XLINGUAS="$XLINGUAS $lang"
4798 else
4799 case "$LINGUAS" in *$lang*)
4800 CATALOGS="$CATALOGS $cat"
4801 XLINGUAS="$XLINGUAS $lang"
4802 ;;
4803 esac
4804 fi
4805 done
4806 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4808$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4809
4810
4811 DATADIRNAME=share
4812
4813 INSTOBJEXT=.mo
4814
4815 GENCAT=gencat
4816
4817 CATOBJEXT=.gmo
4818
4819fi
4820
4821localedir='${datadir}/locale'
4822
4823
4824if test x"$USE_NLS" = xyes; then
4825 CONFIG_ALL="$CONFIG_ALL all-po"
4826 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4827 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4828 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4829fi
4830
4831
4832 GNULIB_MEMMEM=0;
4833 GNULIB_MEMPCPY=0;
4834 GNULIB_MEMRCHR=0;
4835 GNULIB_STPCPY=0;
4836 GNULIB_STPNCPY=0;
4837 GNULIB_STRCHRNUL=0;
4838 GNULIB_STRDUP=0;
4839 GNULIB_STRNDUP=0;
4840 GNULIB_STRNLEN=0;
4841 GNULIB_STRPBRK=0;
4842 GNULIB_STRSEP=0;
4843 GNULIB_STRSTR=0;
4844 GNULIB_STRCASESTR=0;
4845 GNULIB_STRTOK_R=0;
4846 GNULIB_MBSLEN=0;
4847 GNULIB_MBSNLEN=0;
4848 GNULIB_MBSCHR=0;
4849 GNULIB_MBSRCHR=0;
4850 GNULIB_MBSSTR=0;
4851 GNULIB_MBSCASECMP=0;
4852 GNULIB_MBSNCASECMP=0;
4853 GNULIB_MBSPCASECMP=0;
4854 GNULIB_MBSCASESTR=0;
4855 GNULIB_MBSCSPN=0;
4856 GNULIB_MBSPBRK=0;
4857 GNULIB_MBSSPN=0;
4858 GNULIB_MBSSEP=0;
4859 GNULIB_MBSTOK_R=0;
4860 GNULIB_STRERROR=0;
4861 GNULIB_STRSIGNAL=0;
4862 HAVE_DECL_MEMMEM=1;
4863 HAVE_MEMPCPY=1;
4864 HAVE_DECL_MEMRCHR=1;
4865 HAVE_STPCPY=1;
4866 HAVE_STPNCPY=1;
4867 HAVE_STRCHRNUL=1;
4868 HAVE_DECL_STRDUP=1;
4869 HAVE_STRNDUP=1;
4870 HAVE_DECL_STRNDUP=1;
4871 HAVE_DECL_STRNLEN=1;
4872 HAVE_STRPBRK=1;
4873 HAVE_STRSEP=1;
4874 HAVE_STRCASESTR=1;
4875 HAVE_DECL_STRTOK_R=1;
4876 HAVE_DECL_STRERROR=1;
4877 HAVE_DECL_STRSIGNAL=1;
4878 REPLACE_STRERROR=0;
4879 REPLACE_STRSIGNAL=0;
4880 REPLACE_MEMMEM=0;
4881 REPLACE_STRCASESTR=0;
4882 REPLACE_STRSTR=0;
4883
4884
81ecdfbb
RW
4885 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
4886if test "x$ac_cv_have_decl_memmem" = x""yes; then :
4887 ac_have_decl=1
783e057b 4888else
81ecdfbb 4889 ac_have_decl=0
783e057b 4890fi
783e057b
DJ
4891
4892cat >>confdefs.h <<_ACEOF
81ecdfbb 4893#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
4894_ACEOF
4895
4896
783e057b
DJ
4897
4898
4899
4900
4901
4902
4903
4904
783e057b 4905
783e057b 4906
783e057b 4907
81ecdfbb
RW
4908 for ac_func in memmem
4909do :
4910 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
4911if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 4912 cat >>confdefs.h <<_ACEOF
81ecdfbb 4913#define HAVE_MEMMEM 1
783e057b
DJ
4914_ACEOF
4915
4916else
4917
4918 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4919
4920fi
4921done
4922
4923
4924
4925 :
4926
4927
4928
4929
4930
4931 if test $ac_cv_have_decl_memmem = no; then
4932 HAVE_DECL_MEMMEM=0
4933 fi
4934 :
4935
4936
81ecdfbb
RW
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4938$as_echo_n "checking for long long int... " >&6; }
4939if test "${ac_cv_type_long_long_int+set}" = set; then :
4940 $as_echo_n "(cached) " >&6
783e057b 4941else
81ecdfbb 4942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 4943/* end confdefs.h. */
81ecdfbb
RW
4944
4945 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
4946 implementations with broken preprocessors. Perhaps this can
4947 be revisited in 2012. In the meantime, code should not expect
4948 #if to work with literals wider than 32 bits. */
4949 /* Test literals. */
4950 long long int ll = 9223372036854775807ll;
4951 long long int nll = -9223372036854775807LL;
4952 unsigned long long int ull = 18446744073709551615ULL;
4953 /* Test constant expressions. */
4954 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4955 ? 1 : -1)];
4956 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4957 ? 1 : -1)];
4958 int i = 63;
4959int
4960main ()
4961{
4962/* Test availability of runtime routines for shift and division. */
4963 long long int llmax = 9223372036854775807ll;
4964 unsigned long long int ullmax = 18446744073709551615ull;
4965 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4966 | (llmax / ll) | (llmax % ll)
4967 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4968 | (ullmax / ull) | (ullmax % ull));
4969 ;
4970 return 0;
4971}
4972
4973_ACEOF
81ecdfbb
RW
4974if ac_fn_c_try_link "$LINENO"; then :
4975 if test "$cross_compiling" = yes; then :
783e057b
DJ
4976 ac_cv_type_long_long_int=yes
4977else
81ecdfbb 4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4979/* end confdefs.h. */
4980#include <limits.h>
4981 #ifndef LLONG_MAX
4982 # define HALF \
4983 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4984 # define LLONG_MAX (HALF - 1 + HALF)
4985 #endif
4986int
4987main ()
4988{
4989long long int n = 1;
4990 int i;
4991 for (i = 0; ; i++)
4992 {
4993 long long int m = n << i;
4994 if (m >> i != n)
4995 return 1;
4996 if (LLONG_MAX / 2 < m)
4997 break;
4998 }
4999 return 0;
5000 ;
5001 return 0;
5002}
5003_ACEOF
81ecdfbb 5004if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5005 ac_cv_type_long_long_int=yes
5006else
81ecdfbb 5007 ac_cv_type_long_long_int=no
783e057b 5008fi
81ecdfbb
RW
5009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5010 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5011fi
783e057b 5012
81ecdfbb
RW
5013else
5014 ac_cv_type_long_long_int=no
783e057b 5015fi
81ecdfbb
RW
5016rm -f core conftest.err conftest.$ac_objext \
5017 conftest$ac_exeext conftest.$ac_ext
783e057b 5018fi
81ecdfbb
RW
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5020$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5021 if test $ac_cv_type_long_long_int = yes; then
5022
81ecdfbb 5023$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5024
5025 fi
5026
5027
81ecdfbb
RW
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5029$as_echo_n "checking for unsigned long long int... " >&6; }
5030if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5031 $as_echo_n "(cached) " >&6
783e057b 5032else
81ecdfbb 5033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5034/* end confdefs.h. */
81ecdfbb
RW
5035
5036 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
5037 implementations with broken preprocessors. Perhaps this can
5038 be revisited in 2012. In the meantime, code should not expect
5039 #if to work with literals wider than 32 bits. */
5040 /* Test literals. */
5041 long long int ll = 9223372036854775807ll;
5042 long long int nll = -9223372036854775807LL;
5043 unsigned long long int ull = 18446744073709551615ULL;
5044 /* Test constant expressions. */
5045 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5046 ? 1 : -1)];
5047 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5048 ? 1 : -1)];
5049 int i = 63;
5050int
5051main ()
5052{
5053/* Test availability of runtime routines for shift and division. */
5054 long long int llmax = 9223372036854775807ll;
5055 unsigned long long int ullmax = 18446744073709551615ull;
5056 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5057 | (llmax / ll) | (llmax % ll)
5058 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5059 | (ullmax / ull) | (ullmax % ull));
5060 ;
5061 return 0;
5062}
5063
5064_ACEOF
81ecdfbb 5065if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5066 ac_cv_type_unsigned_long_long_int=yes
5067else
81ecdfbb 5068 ac_cv_type_unsigned_long_long_int=no
783e057b 5069fi
81ecdfbb
RW
5070rm -f core conftest.err conftest.$ac_objext \
5071 conftest$ac_exeext conftest.$ac_ext
783e057b 5072fi
81ecdfbb
RW
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5074$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5075 if test $ac_cv_type_unsigned_long_long_int = yes; then
5076
81ecdfbb 5077$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5078
5079 fi
5080
5081
5082
81ecdfbb
RW
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5084$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5085if test "${gl_cv_have_include_next+set}" = set; then :
5086 $as_echo_n "(cached) " >&6
783e057b
DJ
5087else
5088 rm -rf conftestd1 conftestd2
5089 mkdir conftestd1 conftestd2
5090 cat <<EOF > conftestd1/conftest.h
5091#define DEFINED_IN_CONFTESTD1
5092#include_next <conftest.h>
5093#ifdef DEFINED_IN_CONFTESTD2
5094int foo;
5095#else
5096#error "include_next doesn't work"
5097#endif
5098EOF
5099 cat <<EOF > conftestd2/conftest.h
5100#ifndef DEFINED_IN_CONFTESTD1
5101#error "include_next test doesn't work"
5102#endif
5103#define DEFINED_IN_CONFTESTD2
5104EOF
5105 save_CPPFLAGS="$CPPFLAGS"
5106 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
81ecdfbb
RW
5107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5108/* end confdefs.h. */
783e057b
DJ
5109#include <conftest.h>
5110_ACEOF
81ecdfbb 5111if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5112 gl_cv_have_include_next=yes
5113else
81ecdfbb 5114 gl_cv_have_include_next=no
783e057b 5115fi
81ecdfbb 5116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5117 CPPFLAGS="$save_CPPFLAGS"
5118 rm -rf conftestd1 conftestd2
5119
5120fi
81ecdfbb
RW
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5122$as_echo "$gl_cv_have_include_next" >&6; }
783e057b
DJ
5123 if test $gl_cv_have_include_next = yes; then
5124
5125
81ecdfbb 5126$as_echo "#define HAVE_INCLUDE_NEXT 1" >>confdefs.h
783e057b
DJ
5127
5128
5129 INCLUDE_NEXT=include_next
5130 else
5131 INCLUDE_NEXT=include
5132 fi
5133
5134
5135
5136
5137
5138
81ecdfbb
RW
5139 for ac_header in $gl_header_list
5140do :
5141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5143eval as_val=\$$as_ac_Header
5144 if test "x$as_val" = x""yes; then :
783e057b 5145 cat >>confdefs.h <<_ACEOF
81ecdfbb 5146#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5147_ACEOF
5148
5149fi
5150
5151done
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
81ecdfbb
RW
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5163$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5164if test "${ac_cv_c_restrict+set}" = set; then :
5165 $as_echo_n "(cached) " >&6
783e057b
DJ
5166else
5167 ac_cv_c_restrict=no
5168 # The order here caters to the fact that C++ does not require restrict.
5169 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5171/* end confdefs.h. */
5172typedef int * int_ptr;
5173 int foo (int_ptr $ac_kw ip) {
5174 return ip[0];
5175 }
5176int
5177main ()
5178{
5179int s[1];
5180 int * $ac_kw t = s;
5181 t[0] = 0;
5182 return foo(t)
5183 ;
5184 return 0;
5185}
5186_ACEOF
81ecdfbb 5187if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5188 ac_cv_c_restrict=$ac_kw
783e057b 5189fi
81ecdfbb 5190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5191 test "$ac_cv_c_restrict" != no && break
5192 done
5193
5194fi
81ecdfbb
RW
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5196$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5197
5198 case $ac_cv_c_restrict in
5199 restrict) ;;
81ecdfbb 5200 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5201 ;;
5202 *) cat >>confdefs.h <<_ACEOF
5203#define restrict $ac_cv_c_restrict
5204_ACEOF
5205 ;;
5206 esac
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
783e057b
DJ
5219 :
5220
5221
5222
5223
5224
5225
5226
5227 if test $gl_cv_have_include_next = yes; then
5228 gl_cv_next_string_h='<'string.h'>'
5229 else
81ecdfbb
RW
5230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5231$as_echo_n "checking absolute name of <string.h>... " >&6; }
5232if test "${gl_cv_next_string_h+set}" = set; then :
5233 $as_echo_n "(cached) " >&6
783e057b
DJ
5234else
5235
5236 if test $ac_cv_header_string_h = yes; then
81ecdfbb 5237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5238/* end confdefs.h. */
5239#include <string.h>
5240
5241_ACEOF
5242 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5243 sed -n '\#/string.h#{
5244 s#.*"\(.*/string.h\)".*#\1#
5245 s#^/[^/]#//&#
5246 p
5247 q
5248 }'`'"'
5249 else
5250 gl_cv_next_string_h='<'string.h'>'
5251 fi
5252
5253fi
81ecdfbb
RW
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5255$as_echo "$gl_cv_next_string_h" >&6; }
783e057b
DJ
5256 fi
5257 NEXT_STRING_H=$gl_cv_next_string_h
5258
5259
5260
5261
5262
5263 GNULIB_WCWIDTH=0;
5264 HAVE_DECL_WCWIDTH=1;
5265 REPLACE_WCWIDTH=0;
5266 WCHAR_H=
5267
5268
5269
81ecdfbb 5270 if false; then
783e057b
DJ
5271 GL_COND_LIBTOOL_TRUE=
5272 GL_COND_LIBTOOL_FALSE='#'
5273else
5274 GL_COND_LIBTOOL_TRUE='#'
5275 GL_COND_LIBTOOL_FALSE=
5276fi
5277
5278 gl_cond_libtool=false
5279 gl_libdeps=
5280 gl_ltlibdeps=
5281
5282
5283
5284 gl_source_base='gnulib'
5285
5286
5287
5288
5289
5290
5291
5292
81ecdfbb
RW
5293 for ac_func in memchr
5294do :
5295 ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
5296if test "x$ac_cv_func_memchr" = x""yes; then :
783e057b 5297 cat >>confdefs.h <<_ACEOF
81ecdfbb 5298#define HAVE_MEMCHR 1
783e057b
DJ
5299_ACEOF
5300
5301else
5302
5303 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5304
5305fi
5306done
5307
5308
5309 if test $ac_cv_func_memchr = no; then
5310
81ecdfbb
RW
5311 for ac_header in bp-sym.h
5312do :
5313 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5314if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
783e057b 5315 cat >>confdefs.h <<_ACEOF
81ecdfbb 5316#define HAVE_BP_SYM_H 1
783e057b
DJ
5317_ACEOF
5318
5319fi
5320
5321done
5322
5323
5324 fi
5325
5326
81ecdfbb
RW
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
5328$as_echo_n "checking for working memcmp... " >&6; }
5329if test "${ac_cv_func_memcmp_working+set}" = set; then :
5330 $as_echo_n "(cached) " >&6
783e057b 5331else
81ecdfbb 5332 if test "$cross_compiling" = yes; then :
783e057b
DJ
5333 ac_cv_func_memcmp_working=no
5334else
81ecdfbb 5335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5336/* end confdefs.h. */
5337$ac_includes_default
5338int
5339main ()
5340{
5341
5342 /* Some versions of memcmp are not 8-bit clean. */
81ecdfbb 5343 char c0 = '\100', c1 = '\200', c2 = '\201';
783e057b 5344 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
81ecdfbb 5345 return 1;
783e057b
DJ
5346
5347 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5348 or more and with at least one buffer not starting on a 4-byte boundary.
5349 William Lewis provided this test program. */
5350 {
5351 char foo[21];
5352 char bar[21];
5353 int i;
5354 for (i = 0; i < 4; i++)
5355 {
5356 char *a = foo + i;
5357 char *b = bar + i;
5358 strcpy (a, "--------01111111");
5359 strcpy (b, "--------10000000");
5360 if (memcmp (a, b, 16) >= 0)
81ecdfbb 5361 return 1;
783e057b 5362 }
81ecdfbb 5363 return 0;
783e057b
DJ
5364 }
5365
5366 ;
5367 return 0;
5368}
5369_ACEOF
81ecdfbb 5370if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5371 ac_cv_func_memcmp_working=yes
5372else
81ecdfbb 5373 ac_cv_func_memcmp_working=no
783e057b 5374fi
81ecdfbb
RW
5375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5376 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5377fi
81ecdfbb 5378
783e057b 5379fi
81ecdfbb
RW
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
5381$as_echo "$ac_cv_func_memcmp_working" >&6; }
783e057b
DJ
5382test $ac_cv_func_memcmp_working = no &&
5383
5384
5385
5386
5387
5388
5389 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5390
5391
5392 if test $ac_cv_func_memcmp_working = no; then
5393
81ecdfbb 5394$as_echo "#define memcmp rpl_memcmp" >>confdefs.h
783e057b
DJ
5395
5396 :
5397 fi
5398
5399
5400
5401 if test $ac_cv_have_decl_memmem = yes; then
81ecdfbb
RW
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
5403$as_echo_n "checking whether memmem works in linear time... " >&6; }
5404if test "${gl_cv_func_memmem_works+set}" = set; then :
5405 $as_echo_n "(cached) " >&6
783e057b 5406else
81ecdfbb 5407 if test "$cross_compiling" = yes; then :
783e057b
DJ
5408 gl_cv_func_memmem_works="guessing no"
5409else
81ecdfbb 5410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5411/* end confdefs.h. */
5412
5413#include <string.h> /* for memmem */
5414#include <stdlib.h> /* for malloc */
5415#include <unistd.h> /* for alarm */
5416
5417int
5418main ()
5419{
5420size_t m = 1000000;
5421 char *haystack = (char *) malloc (2 * m + 1);
5422 char *needle = (char *) malloc (m + 1);
5423 void *result = 0;
5424 /* Failure to compile this test due to missing alarm is okay,
5425 since all such platforms (mingw) also lack memmem. */
5426 alarm (5);
5427 /* Check for quadratic performance. */
5428 if (haystack && needle)
5429 {
5430 memset (haystack, 'A', 2 * m);
5431 haystack[2 * m] = 'B';
5432 memset (needle, 'A', m);
5433 needle[m] = 'B';
5434 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5435 }
5436 /* Check for empty needle behavior. */
5437 return !result || !memmem ("a", 1, 0, 0);
5438 ;
5439 return 0;
5440}
5441_ACEOF
81ecdfbb 5442if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5443 gl_cv_func_memmem_works=yes
5444else
81ecdfbb 5445 gl_cv_func_memmem_works=no
783e057b 5446fi
81ecdfbb
RW
5447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5448 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5449fi
81ecdfbb 5450
783e057b 5451fi
81ecdfbb
RW
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
5453$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
5454 if test "$gl_cv_func_memmem_works" != yes; then
5455 REPLACE_MEMMEM=1
5456
5457
5458
5459
5460
5461
5462
5463 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5464
5465 fi
5466 fi
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
81ecdfbb
RW
5479 for ac_func in memmem
5480do :
5481 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5482if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5483 cat >>confdefs.h <<_ACEOF
81ecdfbb 5484#define HAVE_MEMMEM 1
783e057b
DJ
5485_ACEOF
5486
5487else
5488
5489 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5490
5491fi
5492done
5493
5494
5495
5496 :
5497
5498
5499
5500
5501
5502 if test $ac_cv_have_decl_memmem = no; then
5503 HAVE_DECL_MEMMEM=0
5504 fi
5505 :
5506
5507
5508
5509 GNULIB_MEMMEM=1
5510
5511
5512
5513
5514 if test $ac_cv_type_long_long_int = yes; then
5515 HAVE_LONG_LONG_INT=1
5516 else
5517 HAVE_LONG_LONG_INT=0
5518 fi
5519
5520
5521 if test $ac_cv_type_unsigned_long_long_int = yes; then
5522 HAVE_UNSIGNED_LONG_LONG_INT=1
5523 else
5524 HAVE_UNSIGNED_LONG_LONG_INT=0
5525 fi
5526
5527
5528 if test $ac_cv_header_inttypes_h = yes; then
5529 HAVE_INTTYPES_H=1
5530 else
5531 HAVE_INTTYPES_H=0
5532 fi
5533
5534
5535 if test $ac_cv_header_sys_types_h = yes; then
5536 HAVE_SYS_TYPES_H=1
5537 else
5538 HAVE_SYS_TYPES_H=0
5539 fi
5540
5541
5542
5543
5544
5545 :
5546
5547
5548
5549
5550
5551
5552
5553 if test $gl_cv_have_include_next = yes; then
5554 gl_cv_next_stdint_h='<'stdint.h'>'
5555 else
81ecdfbb
RW
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
5557$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
5558if test "${gl_cv_next_stdint_h+set}" = set; then :
5559 $as_echo_n "(cached) " >&6
783e057b
DJ
5560else
5561
5562 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb 5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5564/* end confdefs.h. */
5565#include <stdint.h>
5566
5567_ACEOF
5568 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5569 sed -n '\#/stdint.h#{
5570 s#.*"\(.*/stdint.h\)".*#\1#
5571 s#^/[^/]#//&#
5572 p
5573 q
5574 }'`'"'
5575 else
5576 gl_cv_next_stdint_h='<'stdint.h'>'
5577 fi
5578
5579fi
81ecdfbb
RW
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
5581$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
5582 fi
5583 NEXT_STDINT_H=$gl_cv_next_stdint_h
5584
5585
5586
5587 if test $ac_cv_header_stdint_h = yes; then
5588 HAVE_STDINT_H=1
5589 else
5590 HAVE_STDINT_H=0
5591 fi
5592
5593
5594 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
5596$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
5597if test "${gl_cv_header_working_stdint_h+set}" = set; then :
5598 $as_echo_n "(cached) " >&6
783e057b
DJ
5599else
5600 gl_cv_header_working_stdint_h=no
81ecdfbb 5601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5602/* end confdefs.h. */
5603
81ecdfbb 5604
783e057b
DJ
5605#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5606#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5607#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5608#include <stdint.h>
5609/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5610#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5611#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5612#endif
5613
5614
5615 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5616 included before <wchar.h>. */
5617 #include <stddef.h>
5618 #include <signal.h>
5619 #if HAVE_WCHAR_H
5620 # include <stdio.h>
5621 # include <time.h>
5622 # include <wchar.h>
5623 #endif
5624
5625
5626#ifdef INT8_MAX
5627int8_t a1 = INT8_MAX;
5628int8_t a1min = INT8_MIN;
5629#endif
5630#ifdef INT16_MAX
5631int16_t a2 = INT16_MAX;
5632int16_t a2min = INT16_MIN;
5633#endif
5634#ifdef INT32_MAX
5635int32_t a3 = INT32_MAX;
5636int32_t a3min = INT32_MIN;
5637#endif
5638#ifdef INT64_MAX
5639int64_t a4 = INT64_MAX;
5640int64_t a4min = INT64_MIN;
5641#endif
5642#ifdef UINT8_MAX
5643uint8_t b1 = UINT8_MAX;
5644#else
5645typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5646#endif
5647#ifdef UINT16_MAX
5648uint16_t b2 = UINT16_MAX;
5649#endif
5650#ifdef UINT32_MAX
5651uint32_t b3 = UINT32_MAX;
5652#endif
5653#ifdef UINT64_MAX
5654uint64_t b4 = UINT64_MAX;
5655#endif
5656int_least8_t c1 = INT8_C (0x7f);
5657int_least8_t c1max = INT_LEAST8_MAX;
5658int_least8_t c1min = INT_LEAST8_MIN;
5659int_least16_t c2 = INT16_C (0x7fff);
5660int_least16_t c2max = INT_LEAST16_MAX;
5661int_least16_t c2min = INT_LEAST16_MIN;
5662int_least32_t c3 = INT32_C (0x7fffffff);
5663int_least32_t c3max = INT_LEAST32_MAX;
5664int_least32_t c3min = INT_LEAST32_MIN;
5665int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5666int_least64_t c4max = INT_LEAST64_MAX;
5667int_least64_t c4min = INT_LEAST64_MIN;
5668uint_least8_t d1 = UINT8_C (0xff);
5669uint_least8_t d1max = UINT_LEAST8_MAX;
5670uint_least16_t d2 = UINT16_C (0xffff);
5671uint_least16_t d2max = UINT_LEAST16_MAX;
5672uint_least32_t d3 = UINT32_C (0xffffffff);
5673uint_least32_t d3max = UINT_LEAST32_MAX;
5674uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5675uint_least64_t d4max = UINT_LEAST64_MAX;
5676int_fast8_t e1 = INT_FAST8_MAX;
5677int_fast8_t e1min = INT_FAST8_MIN;
5678int_fast16_t e2 = INT_FAST16_MAX;
5679int_fast16_t e2min = INT_FAST16_MIN;
5680int_fast32_t e3 = INT_FAST32_MAX;
5681int_fast32_t e3min = INT_FAST32_MIN;
5682int_fast64_t e4 = INT_FAST64_MAX;
5683int_fast64_t e4min = INT_FAST64_MIN;
5684uint_fast8_t f1 = UINT_FAST8_MAX;
5685uint_fast16_t f2 = UINT_FAST16_MAX;
5686uint_fast32_t f3 = UINT_FAST32_MAX;
5687uint_fast64_t f4 = UINT_FAST64_MAX;
5688#ifdef INTPTR_MAX
5689intptr_t g = INTPTR_MAX;
5690intptr_t gmin = INTPTR_MIN;
5691#endif
5692#ifdef UINTPTR_MAX
5693uintptr_t h = UINTPTR_MAX;
5694#endif
5695intmax_t i = INTMAX_MAX;
5696uintmax_t j = UINTMAX_MAX;
5697
5698#include <limits.h> /* for CHAR_BIT */
5699#define TYPE_MINIMUM(t) \
5700 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5701#define TYPE_MAXIMUM(t) \
5702 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5703struct s {
5704 int check_PTRDIFF:
5705 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5706 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5707 ? 1 : -1;
5708 /* Detect bug in FreeBSD 6.0 / ia64. */
5709 int check_SIG_ATOMIC:
5710 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5711 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5712 ? 1 : -1;
5713 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5714 int check_WCHAR:
5715 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5716 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5717 ? 1 : -1;
5718 /* Detect bug in mingw. */
5719 int check_WINT:
5720 WINT_MIN == TYPE_MINIMUM (wint_t)
5721 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5722 ? 1 : -1;
5723
5724 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5725 int check_UINT8_C:
5726 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5727 int check_UINT16_C:
5728 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5729
5730 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5731#ifdef UINT8_MAX
5732 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5733#endif
5734#ifdef UINT16_MAX
5735 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5736#endif
5737#ifdef UINT32_MAX
5738 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5739#endif
5740#ifdef UINT64_MAX
5741 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5742#endif
5743 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5744 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5745 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5746 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5747 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5748 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5749 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5750 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5751 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5752 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5753 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5754};
5755
5756int
5757main ()
5758{
5759
5760 ;
5761 return 0;
5762}
5763_ACEOF
81ecdfbb 5764if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5765 gl_cv_header_working_stdint_h=yes
783e057b 5766fi
81ecdfbb 5767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 5768fi
81ecdfbb
RW
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
5770$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
5771 fi
5772 if test "$gl_cv_header_working_stdint_h" = yes; then
5773 STDINT_H=
5774 else
81ecdfbb
RW
5775 for ac_header in sys/inttypes.h sys/bitypes.h
5776do :
5777 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5778ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5779eval as_val=\$$as_ac_Header
5780 if test "x$as_val" = x""yes; then :
783e057b 5781 cat >>confdefs.h <<_ACEOF
81ecdfbb 5782#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5783_ACEOF
5784
5785fi
5786
5787done
5788
5789 if test $ac_cv_header_sys_inttypes_h = yes; then
5790 HAVE_SYS_INTTYPES_H=1
5791 else
5792 HAVE_SYS_INTTYPES_H=0
5793 fi
5794
5795 if test $ac_cv_header_sys_bitypes_h = yes; then
5796 HAVE_SYS_BITYPES_H=1
5797 else
5798 HAVE_SYS_BITYPES_H=0
5799 fi
5800
5801
5802
5803 :
5804
5805
5806
5807
5808
5809
5810
5811
5812
81ecdfbb
RW
5813 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5815$as_echo_n "checking for bit size of $gltype... " >&6; }
5816if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5817 $as_echo_n "(cached) " >&6
5818else
5819 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5820 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5821 included before <wchar.h>. */
5822 #include <stddef.h>
5823 #include <signal.h>
5824 #if HAVE_WCHAR_H
5825 # include <stdio.h>
5826 # include <time.h>
5827 # include <wchar.h>
5828 #endif
5829
5830#include <limits.h>"; then :
5831
5832else
5833 result=unknown
5834fi
5835
5836 eval gl_cv_bitsizeof_${gltype}=\$result
5837
5838fi
5839eval ac_res=\$gl_cv_bitsizeof_${gltype}
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5841$as_echo "$ac_res" >&6; }
5842 eval result=\$gl_cv_bitsizeof_${gltype}
5843 if test $result = unknown; then
5844 result=0
5845 fi
5846 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5847 cat >>confdefs.h <<_ACEOF
5848#define BITSIZEOF_${GLTYPE} $result
5849_ACEOF
783e057b 5850
81ecdfbb
RW
5851 eval BITSIZEOF_${GLTYPE}=\$result
5852 done
783e057b
DJ
5853
5854
5855
5856
81ecdfbb
RW
5857 for gltype in sig_atomic_t wchar_t wint_t ; do
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
5859$as_echo_n "checking whether $gltype is signed... " >&6; }
5860if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
5861 $as_echo_n "(cached) " >&6
783e057b 5862else
81ecdfbb 5863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5864/* end confdefs.h. */
5865
5866 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5867 included before <wchar.h>. */
5868 #include <stddef.h>
5869 #include <signal.h>
5870 #if HAVE_WCHAR_H
5871 # include <stdio.h>
5872 # include <time.h>
5873 # include <wchar.h>
5874 #endif
5875
5876 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
5877int
5878main ()
5879{
5880
5881 ;
5882 return 0;
5883}
5884_ACEOF
81ecdfbb 5885if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5886 result=yes
5887else
81ecdfbb 5888 result=no
20e95c23 5889fi
81ecdfbb 5890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5891 eval gl_cv_type_${gltype}_signed=\$result
5892
5893fi
81ecdfbb
RW
5894eval ac_res=\$gl_cv_type_${gltype}_signed
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5896$as_echo "$ac_res" >&6; }
783e057b
DJ
5897 eval result=\$gl_cv_type_${gltype}_signed
5898 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5899 if test "$result" = yes; then
5900 cat >>confdefs.h <<_ACEOF
5901#define HAVE_SIGNED_${GLTYPE} 1
5902_ACEOF
5903
5904 eval HAVE_SIGNED_${GLTYPE}=1
5905 else
5906 eval HAVE_SIGNED_${GLTYPE}=0
5907 fi
5908 done
5909
5910
5911 gl_cv_type_ptrdiff_t_signed=yes
5912 gl_cv_type_size_t_signed=no
5913
5914
783e057b 5915 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
81ecdfbb
RW
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
5917$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
5918if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
5919 $as_echo_n "(cached) " >&6
c906108c 5920else
783e057b
DJ
5921 eval gl_cv_type_${gltype}_suffix=no
5922 eval result=\$gl_cv_type_${gltype}_signed
5923 if test "$result" = yes; then
5924 glsufu=
5925 else
5926 glsufu=u
5927 fi
5928 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
5929 case $glsuf in
5930 '') gltype1='int';;
5931 l) gltype1='long int';;
5932 ll) gltype1='long long int';;
5933 i64) gltype1='__int64';;
5934 u) gltype1='unsigned int';;
5935 ul) gltype1='unsigned long int';;
5936 ull) gltype1='unsigned long long int';;
5937 ui64)gltype1='unsigned __int64';;
5938 esac
81ecdfbb 5939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5940/* end confdefs.h. */
5941
5942 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5943 included before <wchar.h>. */
5944 #include <stddef.h>
5945 #include <signal.h>
5946 #if HAVE_WCHAR_H
5947 # include <stdio.h>
5948 # include <time.h>
5949 # include <wchar.h>
5950 #endif
5951
5952 extern $gltype foo;
5953 extern $gltype1 foo;
5954int
5955main ()
5956{
5957
5958 ;
5959 return 0;
5960}
5961_ACEOF
81ecdfbb 5962if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5963 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 5964fi
81ecdfbb 5965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5966 eval result=\$gl_cv_type_${gltype}_suffix
5967 test "$result" != no && break
5968 done
5969fi
81ecdfbb
RW
5970eval ac_res=\$gl_cv_type_${gltype}_suffix
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5972$as_echo "$ac_res" >&6; }
783e057b
DJ
5973 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5974 eval result=\$gl_cv_type_${gltype}_suffix
5975 test "$result" = no && result=
5976 eval ${GLTYPE}_SUFFIX=\$result
5977 cat >>confdefs.h <<_ACEOF
5978#define ${GLTYPE}_SUFFIX $result
5979_ACEOF
5980
5981 done
5982
5983
5984
5985 STDINT_H=stdint.h
5986 fi
5987
5988
5989
5990
5991
5992
5993
81ecdfbb
RW
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> is standalone" >&5
5995$as_echo_n "checking whether <wchar.h> is standalone... " >&6; }
5996if test "${gl_cv_header_wchar_h_standalone+set}" = set; then :
5997 $as_echo_n "(cached) " >&6
783e057b 5998else
81ecdfbb
RW
5999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6000/* end confdefs.h. */
783e057b
DJ
6001#include <wchar.h>
6002wchar_t w;
6003_ACEOF
81ecdfbb 6004if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6005 gl_cv_header_wchar_h_standalone=yes
6006else
81ecdfbb 6007 gl_cv_header_wchar_h_standalone=no
783e057b 6008fi
81ecdfbb 6009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 6010fi
81ecdfbb
RW
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_standalone" >&5
6012$as_echo "$gl_cv_header_wchar_h_standalone" >&6; }
783e057b
DJ
6013 if test $gl_cv_header_wchar_h_standalone != yes; then
6014 WCHAR_H=wchar.h
6015 fi
6016
6017
6018 :
6019
6020
6021
6022
6023
6024 if test $ac_cv_header_wchar_h = yes; then
6025 HAVE_WCHAR_H=1
6026 else
6027 HAVE_WCHAR_H=0
6028 fi
6029
6030
6031
6032
6033 :
6034
6035
6036
6037
6038
6039
6040
6041 if test $gl_cv_have_include_next = yes; then
6042 gl_cv_next_wchar_h='<'wchar.h'>'
6043 else
81ecdfbb
RW
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6045$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6046if test "${gl_cv_next_wchar_h+set}" = set; then :
6047 $as_echo_n "(cached) " >&6
783e057b
DJ
6048else
6049
6050 if test $ac_cv_header_wchar_h = yes; then
81ecdfbb 6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6052/* end confdefs.h. */
6053#include <wchar.h>
6054
6055_ACEOF
6056 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6057 sed -n '\#/wchar.h#{
6058 s#.*"\(.*/wchar.h\)".*#\1#
6059 s#^/[^/]#//&#
6060 p
6061 q
6062 }'`'"'
6063 else
6064 gl_cv_next_wchar_h='<'wchar.h'>'
6065 fi
6066
6067fi
81ecdfbb
RW
6068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
6069$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
6070 fi
6071 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6072
c906108c 6073
c906108c 6074
c906108c 6075
c906108c 6076
c906108c 6077
c906108c 6078
c906108c 6079
783e057b
DJ
6080 gltests_libdeps=
6081 gltests_ltlibdeps=
20e95c23 6082
20e95c23 6083
20e95c23 6084
783e057b 6085 gl_source_base='tests'
c906108c 6086
bec39cab 6087
bec39cab 6088
783e057b
DJ
6089
6090 LIBGNU_LIBDEPS="$gl_libdeps"
6091
6092 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6093
6094
e28b3332 6095
d5af19ba
DJ
6096# For Makefile dependencies.
6097GNULIB_STDINT_H=
6098if test x"$STDINT_H" != x; then
6099 GNULIB_STDINT_H=gnulib/$STDINT_H
6100fi
6101
6102
bec39cab
AC
6103PACKAGE=gdb
6104
6105cat >>confdefs.h <<_ACEOF
6106#define PACKAGE "$PACKAGE"
6107_ACEOF
6108
6109
6110
e28b3332
DJ
6111# GDB does not use automake, but gnulib does. This line lets us
6112# generate its Makefile.in.
81ecdfbb
RW
6113am__api_version='1.11'
6114
e28b3332
DJ
6115# Find a good install program. We prefer a C program (faster),
6116# so one script is as good as another. But avoid the broken or
6117# incompatible versions:
6118# SysV /etc/install, /usr/sbin/install
6119# SunOS /usr/etc/install
6120# IRIX /sbin/install
6121# AIX /bin/install
6122# AmigaOS /C/install, which installs bootblocks on floppy discs
6123# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6124# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6125# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6126# OS/2's system install, which has a completely different semantic
6127# ./install, which can be erroneously created by make from ./install.sh.
85541719 6128# Reject install programs that cannot install multiple files.
81ecdfbb
RW
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6130$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 6131if test -z "$INSTALL"; then
81ecdfbb
RW
6132if test "${ac_cv_path_install+set}" = set; then :
6133 $as_echo_n "(cached) " >&6
e28b3332
DJ
6134else
6135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138 IFS=$as_save_IFS
6139 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6140 # Account for people who put trailing slashes in PATH elements.
6141case $as_dir/ in #((
6142 ./ | .// | /[cC]/* | \
e28b3332 6143 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 6144 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
6145 /usr/ucb/* ) ;;
6146 *)
6147 # OSF1 and SCO ODT 3.0 have their own names for install.
6148 # Don't use installbsd from OSF since it installs stuff as root
6149 # by default.
6150 for ac_prog in ginstall scoinst install; do
6151 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 6152 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
6153 if test $ac_prog = install &&
6154 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6155 # AIX install. It has an incompatible calling convention.
6156 :
6157 elif test $ac_prog = install &&
6158 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6159 # program-specific install script used by HP pwplus--don't use.
6160 :
6161 else
85541719
DE
6162 rm -rf conftest.one conftest.two conftest.dir
6163 echo one > conftest.one
6164 echo two > conftest.two
6165 mkdir conftest.dir
6166 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6167 test -s conftest.one && test -s conftest.two &&
6168 test -s conftest.dir/conftest.one &&
6169 test -s conftest.dir/conftest.two
6170 then
6171 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6172 break 3
6173 fi
e28b3332
DJ
6174 fi
6175 fi
6176 done
6177 done
6178 ;;
6179esac
81ecdfbb
RW
6180
6181 done
6182IFS=$as_save_IFS
e28b3332 6183
85541719 6184rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6185
6186fi
6187 if test "${ac_cv_path_install+set}" = set; then
6188 INSTALL=$ac_cv_path_install
6189 else
85541719
DE
6190 # As a last resort, use the slow shell script. Don't cache a
6191 # value for INSTALL within a source directory, because that will
e28b3332 6192 # break other packages using the cache if that directory is
85541719 6193 # removed, or if the value is a relative name.
e28b3332
DJ
6194 INSTALL=$ac_install_sh
6195 fi
6196fi
81ecdfbb
RW
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6198$as_echo "$INSTALL" >&6; }
e28b3332
DJ
6199
6200# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6201# It thinks the first close brace ends the variable substitution.
6202test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6203
6204test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6205
6206test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6207
81ecdfbb
RW
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
6209$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
6210# Just in case
6211sleep 1
6212echo timestamp > conftest.file
81ecdfbb
RW
6213# Reject unsafe characters in $srcdir or the absolute working directory
6214# name. Accept space and tab only in the latter.
6215am_lf='
6216'
6217case `pwd` in
6218 *[\\\"\#\$\&\'\`$am_lf]*)
6219 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
6220esac
6221case $srcdir in
6222 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
6223 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
6224esac
6225
e28b3332
DJ
6226# Do `set' in a subshell so we don't clobber the current shell's
6227# arguments. Must try -L first in case configure is actually a
6228# symlink; some systems play weird games with the mod time of symlinks
6229# (eg FreeBSD returns the mod time of the symlink's containing
6230# directory).
6231if (
81ecdfbb 6232 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
6233 if test "$*" = "X"; then
6234 # -L didn't work.
81ecdfbb 6235 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
6236 fi
6237 rm -f conftest.file
6238 if test "$*" != "X $srcdir/configure conftest.file" \
6239 && test "$*" != "X conftest.file $srcdir/configure"; then
6240
6241 # If neither matched, then we have a broken ls. This can happen
6242 # if, for instance, CONFIG_SHELL is bash and it inherits a
6243 # broken ls alias from the environment. This has actually
6244 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
6245 as_fn_error "ls -t appears to fail. Make sure there is not a broken
6246alias in your environment" "$LINENO" 5
e28b3332
DJ
6247 fi
6248
6249 test "$2" = conftest.file
6250 )
6251then
6252 # Ok.
6253 :
6254else
81ecdfbb
RW
6255 as_fn_error "newly created file is older than distributed files!
6256Check your system clock" "$LINENO" 5
e28b3332 6257fi
81ecdfbb
RW
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6259$as_echo "yes" >&6; }
e28b3332 6260test "$program_prefix" != NONE &&
81ecdfbb 6261 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
6262# Use a double $ so make ignores it.
6263test "$program_suffix" != NONE &&
81ecdfbb
RW
6264 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
6265# Double any \ or $.
e28b3332 6266# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
6267ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
6268program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
6269
6270# expand $ac_aux_dir to an absolute path
6271am_aux_dir=`cd $ac_aux_dir && pwd`
6272
81ecdfbb
RW
6273if test x"${MISSING+set}" != xset; then
6274 case $am_aux_dir in
6275 *\ * | *\ *)
6276 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
6277 *)
6278 MISSING="\${SHELL} $am_aux_dir/missing" ;;
6279 esac
6280fi
e28b3332
DJ
6281# Use eval to expand $SHELL
6282if eval "$MISSING --run true"; then
6283 am_missing_run="$MISSING --run "
6284else
6285 am_missing_run=
81ecdfbb
RW
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
6287$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6288fi
6289
6290if test x"${install_sh}" != xset; then
6291 case $am_aux_dir in
6292 *\ * | *\ *)
6293 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6294 *)
6295 install_sh="\${SHELL} $am_aux_dir/install-sh"
6296 esac
6297fi
6298
6299# Installed binaries are usually stripped using `strip' when the user
6300# run `make install-strip'. However `strip' might not be the right
6301# tool to use in cross-compilation environments, therefore Automake
6302# will honor the `STRIP' environment variable to overrule this program.
6303if test "$cross_compiling" != no; then
6304 if test -n "$ac_tool_prefix"; then
6305 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6306set dummy ${ac_tool_prefix}strip; ac_word=$2
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6308$as_echo_n "checking for $ac_word... " >&6; }
6309if test "${ac_cv_prog_STRIP+set}" = set; then :
6310 $as_echo_n "(cached) " >&6
6311else
6312 if test -n "$STRIP"; then
6313 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6314else
6315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318 IFS=$as_save_IFS
6319 test -z "$as_dir" && as_dir=.
6320 for ac_exec_ext in '' $ac_executable_extensions; do
6321 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6322 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6324 break 2
6325 fi
6326done
6327 done
6328IFS=$as_save_IFS
6329
6330fi
6331fi
6332STRIP=$ac_cv_prog_STRIP
6333if test -n "$STRIP"; then
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6335$as_echo "$STRIP" >&6; }
6336else
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
6339fi
6340
6341
6342fi
6343if test -z "$ac_cv_prog_STRIP"; then
6344 ac_ct_STRIP=$STRIP
6345 # Extract the first word of "strip", so it can be a program name with args.
6346set dummy strip; ac_word=$2
6347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6348$as_echo_n "checking for $ac_word... " >&6; }
6349if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
6350 $as_echo_n "(cached) " >&6
6351else
6352 if test -n "$ac_ct_STRIP"; then
6353 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6354else
6355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358 IFS=$as_save_IFS
6359 test -z "$as_dir" && as_dir=.
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6362 ac_cv_prog_ac_ct_STRIP="strip"
6363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6364 break 2
6365 fi
6366done
6367 done
6368IFS=$as_save_IFS
6369
6370fi
6371fi
6372ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6373if test -n "$ac_ct_STRIP"; then
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6375$as_echo "$ac_ct_STRIP" >&6; }
6376else
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
6379fi
6380
6381 if test "x$ac_ct_STRIP" = x; then
6382 STRIP=":"
6383 else
6384 case $cross_compiling:$ac_tool_warned in
6385yes:)
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6388ac_tool_warned=yes ;;
6389esac
6390 STRIP=$ac_ct_STRIP
6391 fi
6392else
6393 STRIP="$ac_cv_prog_STRIP"
6394fi
6395
6396fi
6397INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
6398
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6400$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6401if test -z "$MKDIR_P"; then
6402 if test "${ac_cv_path_mkdir+set}" = set; then :
6403 $as_echo_n "(cached) " >&6
6404else
6405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6406for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6407do
6408 IFS=$as_save_IFS
6409 test -z "$as_dir" && as_dir=.
6410 for ac_prog in mkdir gmkdir; do
6411 for ac_exec_ext in '' $ac_executable_extensions; do
6412 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
6413 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6414 'mkdir (GNU coreutils) '* | \
6415 'mkdir (coreutils) '* | \
6416 'mkdir (fileutils) '4.1*)
6417 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6418 break 3;;
6419 esac
6420 done
6421 done
e28b3332 6422 done
81ecdfbb
RW
6423IFS=$as_save_IFS
6424
6425fi
6426
6427 if test "${ac_cv_path_mkdir+set}" = set; then
6428 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 6429 else
81ecdfbb
RW
6430 # As a last resort, use the slow shell script. Don't cache a
6431 # value for MKDIR_P within a source directory, because that will
6432 # break other packages using the cache if that directory is
6433 # removed, or if the value is a relative name.
6434 test -d ./--version && rmdir ./--version
6435 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
6436 fi
6437fi
81ecdfbb
RW
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6439$as_echo "$MKDIR_P" >&6; }
6440
6441mkdir_p="$MKDIR_P"
6442case $mkdir_p in
6443 [\\/$]* | ?:[\\/]*) ;;
6444 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
6445esac
e28b3332
DJ
6446
6447for ac_prog in gawk mawk nawk awk
6448do
6449 # Extract the first word of "$ac_prog", so it can be a program name with args.
6450set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6452$as_echo_n "checking for $ac_word... " >&6; }
6453if test "${ac_cv_prog_AWK+set}" = set; then :
6454 $as_echo_n "(cached) " >&6
e28b3332
DJ
6455else
6456 if test -n "$AWK"; then
6457 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6458else
6459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462 IFS=$as_save_IFS
6463 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6464 for ac_exec_ext in '' $ac_executable_extensions; do
6465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 6466 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
6468 break 2
6469 fi
6470done
81ecdfbb
RW
6471 done
6472IFS=$as_save_IFS
e28b3332
DJ
6473
6474fi
6475fi
6476AWK=$ac_cv_prog_AWK
6477if test -n "$AWK"; then
81ecdfbb
RW
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6479$as_echo "$AWK" >&6; }
e28b3332 6480else
81ecdfbb
RW
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
e28b3332
DJ
6483fi
6484
81ecdfbb 6485
e28b3332
DJ
6486 test -n "$AWK" && break
6487done
6488
81ecdfbb 6489ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
6490
6491
6492am_make=${MAKE-make}
6493cat > confinc << 'END'
6494am__doit:
81ecdfbb 6495 @echo this is the am__doit target
e28b3332
DJ
6496.PHONY: am__doit
6497END
6498# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
6500$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
6501am__include="#"
6502am__quote=
6503_am_result=none
6504# First try GNU make style include.
6505echo "include confinc" > confmf
81ecdfbb
RW
6506# Ignore all kinds of additional output from `make'.
6507case `$am_make -s -f confmf 2> /dev/null` in #(
6508*the\ am__doit\ target*)
6509 am__include=include
6510 am__quote=
6511 _am_result=GNU
6512 ;;
6513esac
e28b3332
DJ
6514# Now try BSD make style include.
6515if test "$am__include" = "#"; then
6516 echo '.include "confinc"' > confmf
81ecdfbb
RW
6517 case `$am_make -s -f confmf 2> /dev/null` in #(
6518 *the\ am__doit\ target*)
6519 am__include=.include
6520 am__quote="\""
6521 _am_result=BSD
6522 ;;
6523 esac
e28b3332
DJ
6524fi
6525
6526
81ecdfbb
RW
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
6528$as_echo "$_am_result" >&6; }
e28b3332
DJ
6529rm -f confinc confmf
6530
81ecdfbb
RW
6531# Check whether --enable-dependency-tracking was given.
6532if test "${enable_dependency_tracking+set}" = set; then :
6533 enableval=$enable_dependency_tracking;
6534fi
e28b3332 6535
e28b3332
DJ
6536if test "x$enable_dependency_tracking" != xno; then
6537 am_depcomp="$ac_aux_dir/depcomp"
6538 AMDEPBACKSLASH='\'
6539fi
81ecdfbb 6540 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
6541 AMDEP_TRUE=
6542 AMDEP_FALSE='#'
6543else
6544 AMDEP_TRUE='#'
6545 AMDEP_FALSE=
6546fi
6547
6548
81ecdfbb
RW
6549if test "`cd $srcdir && pwd`" != "`pwd`"; then
6550 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6551 # is not polluted with repeated "-I."
6552 am__isrc=' -I$(srcdir)'
6553 # test to see if srcdir already configured
6554 if test -f $srcdir/config.status; then
6555 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6556 fi
e28b3332
DJ
6557fi
6558
6559# test whether we have cygpath
6560if test -z "$CYGPATH_W"; then
6561 if (cygpath --version) >/dev/null 2>/dev/null; then
6562 CYGPATH_W='cygpath -w'
6563 else
6564 CYGPATH_W=echo
6565 fi
6566fi
6567
6568
6569# Define the identity of the package.
6570 PACKAGE=gdb
6571 VERSION=UNUSED-VERSION
6572
6573
6574# Some tools Automake needs.
6575
6576ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6577
6578
6579AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6580
6581
6582AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6583
6584
6585AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6586
6587
6588MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6589
e28b3332
DJ
6590# We need awk for the "check" target. The system "awk" is bad on
6591# some platforms.
6592# Always define AMTAR for backward compatibility.
6593
6594AMTAR=${AMTAR-"${am_missing_run}tar"}
6595
6596am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6597
6598
6599
6600
6601depcc="$CC" am_compiler_list=
6602
81ecdfbb
RW
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6604$as_echo_n "checking dependency style of $depcc... " >&6; }
6605if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6606 $as_echo_n "(cached) " >&6
e28b3332
DJ
6607else
6608 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6609 # We make a subdir and do the tests there. Otherwise we can end up
6610 # making bogus files that we don't know about and never remove. For
6611 # instance it was reported that on HP-UX the gcc test will end up
6612 # making a dummy file named `D' -- because `-MD' means `put the output
6613 # in D'.
6614 mkdir conftest.dir
6615 # Copy depcomp to subdir because otherwise we won't find it if we're
6616 # using a relative directory.
6617 cp "$am_depcomp" conftest.dir
6618 cd conftest.dir
6619 # We will build objects and dependencies in a subdirectory because
6620 # it helps to detect inapplicable dependency modes. For instance
6621 # both Tru64's cc and ICC support -MD to output dependencies as a
6622 # side effect of compilation, but ICC will put the dependencies in
6623 # the current directory while Tru64 will put them in the object
6624 # directory.
6625 mkdir sub
6626
6627 am_cv_CC_dependencies_compiler_type=none
6628 if test "$am_compiler_list" = ""; then
6629 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6630 fi
81ecdfbb
RW
6631 am__universal=false
6632 case " $depcc " in #(
6633 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6634 esac
6635
e28b3332
DJ
6636 for depmode in $am_compiler_list; do
6637 # Setup a source with many dependencies, because some compilers
6638 # like to wrap large dependency lists on column 80 (with \), and
6639 # we should not choose a depcomp mode which is confused by this.
6640 #
6641 # We need to recreate these files for each test, as the compiler may
6642 # overwrite some of them when testing with obscure command lines.
6643 # This happens at least with the AIX C compiler.
6644 : > sub/conftest.c
6645 for i in 1 2 3 4 5 6; do
6646 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6647 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6648 # Solaris 8's {/usr,}/bin/sh.
6649 touch sub/conftst$i.h
6650 done
6651 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6652
81ecdfbb
RW
6653 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6654 # mode. It turns out that the SunPro C++ compiler does not properly
6655 # handle `-M -o', and we need to detect this. Also, some Intel
6656 # versions had trouble with output in subdirs
6657 am__obj=sub/conftest.${OBJEXT-o}
6658 am__minus_obj="-o $am__obj"
e28b3332 6659 case $depmode in
81ecdfbb
RW
6660 gcc)
6661 # This depmode causes a compiler race in universal mode.
6662 test "$am__universal" = false || continue
6663 ;;
e28b3332
DJ
6664 nosideeffect)
6665 # after this tag, mechanisms are not by side-effect, so they'll
6666 # only be used when explicitly requested
6667 if test "x$enable_dependency_tracking" = xyes; then
6668 continue
6669 else
6670 break
6671 fi
6672 ;;
81ecdfbb
RW
6673 msvisualcpp | msvcmsys)
6674 # This compiler won't grok `-c -o', but also, the minuso test has
6675 # not run yet. These depmodes are late enough in the game, and
6676 # so weak that their functioning should not be impacted.
6677 am__obj=conftest.${OBJEXT-o}
6678 am__minus_obj=
6679 ;;
e28b3332
DJ
6680 none) break ;;
6681 esac
e28b3332 6682 if depmode=$depmode \
81ecdfbb 6683 source=sub/conftest.c object=$am__obj \
e28b3332 6684 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 6685 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 6686 >/dev/null 2>conftest.err &&
81ecdfbb 6687 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 6688 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 6689 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
6690 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6691 # icc doesn't choke on unknown options, it will just issue warnings
6692 # or remarks (even with -Werror). So we grep stderr for any message
6693 # that says an option was ignored or not supported.
6694 # When given -MP, icc 7.0 and 7.1 complain thusly:
6695 # icc: Command line warning: ignoring option '-M'; no argument required
6696 # The diagnosis changed in icc 8.0:
6697 # icc: Command line remark: option '-MP' not supported
6698 if (grep 'ignoring option' conftest.err ||
6699 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6700 am_cv_CC_dependencies_compiler_type=$depmode
6701 break
6702 fi
6703 fi
6704 done
6705
6706 cd ..
6707 rm -rf conftest.dir
6708else
6709 am_cv_CC_dependencies_compiler_type=none
6710fi
6711
6712fi
81ecdfbb
RW
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6714$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
6715CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6716
81ecdfbb 6717 if
e28b3332
DJ
6718 test "x$enable_dependency_tracking" != xno \
6719 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6720 am__fastdepCC_TRUE=
6721 am__fastdepCC_FALSE='#'
6722else
6723 am__fastdepCC_TRUE='#'
6724 am__fastdepCC_FALSE=
6725fi
6726
6727
6728
6729
bec39cab
AC
6730
6731
81ecdfbb
RW
6732# Check whether --with-separate-debug-dir was given.
6733if test "${with_separate_debug_dir+set}" = set; then :
6734 withval=$with_separate_debug_dir;
b14b1491
TT
6735 DEBUGDIR=$withval
6736else
6737 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6738fi
6739
20e95c23 6740
783e057b
DJ
6741 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6742 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6743 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6744 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6745
783e057b
DJ
6746cat >>confdefs.h <<_ACEOF
6747#define DEBUGDIR "$ac_define_dir"
20e95c23 6748_ACEOF
20e95c23 6749
20e95c23 6750
20e95c23 6751
b14b1491
TT
6752 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6753 if test "x$prefix" = xNONE; then
6754 test_prefix=/usr/local
6755 else
6756 test_prefix=$prefix
6757 fi
783e057b 6758 else
b14b1491 6759 test_prefix=$exec_prefix
783e057b 6760 fi
b14b1491
TT
6761 value=0
6762 case ${ac_define_dir} in
6763 "${test_prefix}"|"${test_prefix}/"*|\
6764 '${exec_prefix}'|'${exec_prefix}/'*)
6765 value=1
6766 ;;
6767 esac
6768
6769cat >>confdefs.h <<_ACEOF
6770#define DEBUGDIR_RELOCATABLE $value
6771_ACEOF
6772
6773
6774
6775# GDB's datadir relocation
6776
6777
6778
81ecdfbb
RW
6779# Check whether --with-gdb-datadir was given.
6780if test "${with_gdb_datadir+set}" = set; then :
6781 withval=$with_gdb_datadir;
b14b1491 6782 GDB_DATADIR=$withval
20e95c23 6783else
b14b1491 6784 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6785fi
6786
20e95c23 6787
b14b1491
TT
6788 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6789 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6790 ac_define_dir=`eval echo $GDB_DATADIR`
6791 ac_define_dir=`eval echo $ac_define_dir`
6792
6793cat >>confdefs.h <<_ACEOF
6794#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6795_ACEOF
6796
b14b1491
TT
6797
6798
6799 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6800 if test "x$prefix" = xNONE; then
6801 test_prefix=/usr/local
6802 else
6803 test_prefix=$prefix
6804 fi
6805 else
6806 test_prefix=$exec_prefix
6807 fi
6808 value=0
6809 case ${ac_define_dir} in
6810 "${test_prefix}"|"${test_prefix}/"*|\
6811 '${exec_prefix}'|'${exec_prefix}/'*)
6812 value=1
6813 ;;
6814 esac
6815
6816cat >>confdefs.h <<_ACEOF
6817#define GDB_DATADIR_RELOCATABLE $value
6818_ACEOF
6819
6820
783e057b 6821
20e95c23 6822
81ecdfbb
RW
6823# Check whether --with-relocated-sources was given.
6824if test "${with_relocated_sources+set}" = set; then :
6825 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6826
6827 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6828 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6829 ac_define_dir=`eval echo $reloc_srcdir`
6830 ac_define_dir=`eval echo $ac_define_dir`
6831
6832cat >>confdefs.h <<_ACEOF
6833#define RELOC_SRCDIR "$ac_define_dir"
6834_ACEOF
6835
6836
6837
81ecdfbb
RW
6838fi
6839
29b0e8a2
JM
6840
6841
20e95c23 6842
783e057b 6843subdirs="$subdirs doc testsuite"
20e95c23
DJ
6844
6845
783e057b 6846# Check whether to support alternative target configurations
81ecdfbb
RW
6847# Check whether --enable-targets was given.
6848if test "${enable_targets+set}" = set; then :
6849 enableval=$enable_targets; case "${enableval}" in
6850 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6851 ;;
6852 no) enable_targets= ;;
6853 *) enable_targets=$enableval ;;
6854esac
81ecdfbb
RW
6855fi
6856
20e95c23 6857
783e057b 6858# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6859# Check whether --enable-64-bit-bfd was given.
6860if test "${enable_64_bit_bfd+set}" = set; then :
6861 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6862 yes) want64=true ;;
6863 no) want64=false ;;
81ecdfbb 6864 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6865esac
6866else
6867 want64=false
81ecdfbb
RW
6868fi
6869
783e057b
DJ
6870# Provide defaults for some variables set by the per-host and per-target
6871# configuration.
6872gdb_host_obs=posix-hdep.o
20e95c23 6873
783e057b
DJ
6874if test "${target}" = "${host}"; then
6875 gdb_native=yes
6876else
6877 gdb_native=no
6878fi
20e95c23 6879
783e057b 6880. $srcdir/configure.host
20e95c23 6881
783e057b 6882# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6883
783e057b
DJ
6884TARGET_OBS=
6885all_targets=
20e95c23 6886
783e057b 6887for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6888do
783e057b
DJ
6889 if test "$targ_alias" = "all"; then
6890 all_targets=true
6891 else
6892 # Canonicalize the secondary target names.
6893 result=`$ac_config_sub $targ_alias 2>/dev/null`
6894 if test -n "$result"; then
6895 targ=$result
6896 else
6897 targ=$targ_alias
6898 fi
20e95c23 6899
783e057b 6900 . ${srcdir}/configure.tgt
20e95c23 6901
783e057b
DJ
6902 # Target-specific object files
6903 for i in ${gdb_target_obs}; do
6904 case " $TARGET_OBS " in
6905 *" ${i} "*) ;;
6906 *)
6907 TARGET_OBS="$TARGET_OBS ${i}"
6908 ;;
6909 esac
6910 done
20e95c23 6911
783e057b
DJ
6912 # Check whether this target needs 64-bit CORE_ADDR
6913 if test x${want64} = xfalse; then
6914 . ${srcdir}/../bfd/config.bfd
6915 fi
6916 fi
20e95c23
DJ
6917done
6918
783e057b
DJ
6919if test x${all_targets} = xtrue; then
6920
6921 # We want all 64-bit targets if we either:
6922 # - run on a 64-bit host or
6923 # - already require 64-bit support for some other target or
6924 # - the --enable-64-bit-bfd option was supplied
6925 # Otherwise we only support all 32-bit targets.
6926 #
6927 # NOTE: This test must be in sync with the corresponding
6928 # tests in BFD!
20e95c23 6929
783e057b 6930 if test x${want64} = xfalse; then
81ecdfbb
RW
6931 # The cast to long int works around a bug in the HP C Compiler
6932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6934# This bug is HP SR number 8606223364.
6935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6936$as_echo_n "checking size of long... " >&6; }
6937if test "${ac_cv_sizeof_long+set}" = set; then :
6938 $as_echo_n "(cached) " >&6
c0993dbe 6939else
81ecdfbb 6940 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6941
81ecdfbb
RW
6942else
6943 if test "$ac_cv_type_long" = yes; then
6944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6946{ as_fn_set_status 77
6947as_fn_error "cannot compute sizeof (long)
6948See \`config.log' for more details." "$LINENO" 5; }; }
6949 else
6950 ac_cv_sizeof_long=0
6951 fi
c0993dbe 6952fi
81ecdfbb 6953
c0993dbe 6954fi
81ecdfbb
RW
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6956$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6957
c0993dbe 6958
c0993dbe 6959
c0993dbe
UW
6960cat >>confdefs.h <<_ACEOF
6961#define SIZEOF_LONG $ac_cv_sizeof_long
6962_ACEOF
6963
6964
6965 if test "x${ac_cv_sizeof_long}" = "x8"; then
6966 want64=true
6967 fi
6968 fi
6969 if test x${want64} = xtrue; then
6970 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6971 else
6972 TARGET_OBS='$(ALL_TARGET_OBS)'
6973 fi
6974fi
6975
6976
6977
6978# For other settings, only the main target counts.
6979gdb_sim=
6980gdb_osabi=
6981build_gdbserver=
6982targ=$target; . ${srcdir}/configure.tgt
6983
6984# Fetch the default architecture and default target vector from BFD.
6985targ=$target; . $srcdir/../bfd/config.bfd
6986
6987# We only want the first architecture, so strip off the others if
6988# there is more than one.
6989targ_archs=`echo $targ_archs | sed 's/ .*//'`
6990
6991if test "x$targ_archs" != x; then
6992
6993cat >>confdefs.h <<_ACEOF
6994#define DEFAULT_BFD_ARCH $targ_archs
6995_ACEOF
6996
6997fi
6998if test "x$targ_defvec" != x; then
6999
7000cat >>confdefs.h <<_ACEOF
7001#define DEFAULT_BFD_VEC $targ_defvec
7002_ACEOF
7003
7004fi
7005
c0993dbe
UW
7006# The CLI cannot be disabled yet, but may be in the future.
7007
7008# Enable CLI.
81ecdfbb
RW
7009# Check whether --enable-gdbcli was given.
7010if test "${enable_gdbcli+set}" = set; then :
7011 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
7012 yes)
7013 ;;
7014 no)
81ecdfbb 7015 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 7016 *)
81ecdfbb 7017 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
7018 esac
7019else
7020 enable_gdbcli=yes
81ecdfbb
RW
7021fi
7022
c0993dbe
UW
7023if test x"$enable_gdbcli" = xyes; then
7024 if test -d $srcdir/cli; then
7025 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7026 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7027 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7028 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7029 fi
7030fi
7031
7032# Enable MI.
81ecdfbb
RW
7033# Check whether --enable-gdbmi was given.
7034if test "${enable_gdbmi+set}" = set; then :
7035 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
7036 yes | no)
7037 ;;
7038 *)
81ecdfbb 7039 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
7040 esac
7041else
7042 enable_gdbmi=yes
81ecdfbb
RW
7043fi
7044
c0993dbe
UW
7045if test x"$enable_gdbmi" = xyes; then
7046 if test -d $srcdir/mi; then
7047 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7048 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7049 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7050 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7051 fi
7052fi
7053
7054# Enable TUI.
81ecdfbb
RW
7055# Check whether --enable-tui was given.
7056if test "${enable_tui+set}" = set; then :
7057 enableval=$enable_tui; case $enableval in
3ca64bd3 7058 yes | no | auto)
c0993dbe
UW
7059 ;;
7060 *)
81ecdfbb 7061 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
7062 esac
7063else
3ca64bd3 7064 enable_tui=auto
81ecdfbb
RW
7065fi
7066
c0993dbe
UW
7067
7068# Enable gdbtk.
81ecdfbb
RW
7069# Check whether --enable-gdbtk was given.
7070if test "${enable_gdbtk+set}" = set; then :
7071 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
7072 yes | no)
7073 ;;
7074 *)
81ecdfbb 7075 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
7076 esac
7077else
5062cc19 7078 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7079 enable_gdbtk=yes
7080 else
7081 enable_gdbtk=no
7082 fi
81ecdfbb
RW
7083fi
7084
c0993dbe
UW
7085# We unconditionally disable gdbtk tests on selected platforms.
7086case $host_os in
7087 go32* | windows*)
81ecdfbb
RW
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
7089$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
7090 enable_gdbtk=no ;;
7091esac
7092
7093# Libunwind support.
bec39cab 7094
81ecdfbb
RW
7095# Check whether --with-libunwind was given.
7096if test "${with_libunwind+set}" = set; then :
7097 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
7098 yes) enable_libunwind=yes ;;
7099 no) enable_libunwind=no ;;
81ecdfbb 7100 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 7101esac
bec39cab 7102else
bec39cab 7103
81ecdfbb
RW
7104 for ac_header in libunwind.h libunwind-ia64.h
7105do :
7106 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7107ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7108eval as_val=\$$as_ac_Header
7109 if test "x$as_val" = x""yes; then :
bec39cab 7110 cat >>confdefs.h <<_ACEOF
81ecdfbb 7111#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7112_ACEOF
7113
7114fi
7115
7116done
7117
a9322a30
TT
7118 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7119 enable_libunwind=yes;
7120 fi
7121
bec39cab 7122fi
bec39cab 7123
bec39cab 7124
81ecdfbb
RW
7125if test x"$enable_libunwind" = xyes; then
7126 for ac_header in libunwind.h libunwind-ia64.h
7127do :
7128 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7129ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7130eval as_val=\$$as_ac_Header
7131 if test "x$as_val" = x""yes; then :
bec39cab 7132 cat >>confdefs.h <<_ACEOF
81ecdfbb 7133#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7134_ACEOF
7135
7136fi
7137
7138done
7139
bec39cab 7140
81ecdfbb 7141$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
7142
7143 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
7144 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
7145 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
7146fi
7147
cb01cfba
JB
7148opt_curses=no
7149
81ecdfbb
RW
7150# Check whether --with-curses was given.
7151if test "${with_curses+set}" = set; then :
7152 withval=$with_curses; opt_curses=$withval
7153fi
7154
cb01cfba 7155
76a39ba7 7156prefer_curses=no
cb01cfba 7157if test "$opt_curses" = "yes"; then
76a39ba7 7158 prefer_curses=yes
cb01cfba
JB
7159fi
7160
a9322a30 7161# Profiling support.
81ecdfbb
RW
7162# Check whether --enable-profiling was given.
7163if test "${enable_profiling+set}" = set; then :
7164 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7165 yes | no)
7166 ;;
7167 *)
81ecdfbb 7168 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7169 esac
7170else
7171 enable_profiling=no
81ecdfbb 7172fi
bec39cab 7173
a9322a30
TT
7174
7175for ac_func in monstartup _mcleanup
81ecdfbb
RW
7176do :
7177 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7178ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7179eval as_val=\$$as_ac_var
7180 if test "x$as_val" = x""yes; then :
7181 cat >>confdefs.h <<_ACEOF
7182#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7183_ACEOF
a9322a30 7184
81ecdfbb
RW
7185fi
7186done
a9322a30 7187
81ecdfbb
RW
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7189$as_echo_n "checking for _etext... " >&6; }
7190if test "${ac_cv_var__etext+set}" = set; then :
7191 $as_echo_n "(cached) " >&6
7192else
7193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7194/* end confdefs.h. */
7195#include <stdlib.h>
7196extern char _etext;
a9322a30
TT
7197
7198int
7199main ()
7200{
7201free (&_etext);
7202 ;
7203 return 0;
7204}
bec39cab 7205_ACEOF
81ecdfbb 7206if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7207 ac_cv_var__etext=yes
bec39cab 7208else
81ecdfbb 7209 ac_cv_var__etext=no
bec39cab 7210fi
81ecdfbb
RW
7211rm -f core conftest.err conftest.$ac_objext \
7212 conftest$ac_exeext conftest.$ac_ext
bec39cab 7213fi
81ecdfbb
RW
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7215$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 7216if test $ac_cv_var__etext = yes; then
60ca704f 7217
81ecdfbb 7218$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7219
bec39cab 7220fi
81ecdfbb
RW
7221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7222$as_echo_n "checking for etext... " >&6; }
7223if test "${ac_cv_var_etext+set}" = set; then :
7224 $as_echo_n "(cached) " >&6
bec39cab 7225else
81ecdfbb 7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7227/* end confdefs.h. */
a9322a30
TT
7228#include <stdlib.h>
7229extern char etext;
bec39cab
AC
7230
7231int
7232main ()
7233{
a9322a30 7234free (&etext);
bec39cab
AC
7235 ;
7236 return 0;
7237}
7238_ACEOF
81ecdfbb 7239if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7240 ac_cv_var_etext=yes
bec39cab 7241else
81ecdfbb 7242 ac_cv_var_etext=no
bec39cab 7243fi
81ecdfbb
RW
7244rm -f core conftest.err conftest.$ac_objext \
7245 conftest$ac_exeext conftest.$ac_ext
bec39cab 7246fi
81ecdfbb
RW
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7248$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7249if test $ac_cv_var_etext = yes; then
7250
81ecdfbb 7251$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7252
7253fi
a9322a30
TT
7254if test "$enable_profiling" = yes ; then
7255 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 7256 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7257 fi
7258 PROFILE_CFLAGS=-pg
7259 OLD_CFLAGS="$CFLAGS"
7260 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7261
81ecdfbb
RW
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7263$as_echo_n "checking whether $CC supports -pg... " >&6; }
7264if test "${ac_cv_cc_supports_pg+set}" = set; then :
7265 $as_echo_n "(cached) " >&6
bec39cab 7266else
81ecdfbb 7267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7268/* end confdefs.h. */
bec39cab
AC
7269
7270int
7271main ()
7272{
a9322a30 7273int x;
bec39cab
AC
7274 ;
7275 return 0;
7276}
7277_ACEOF
81ecdfbb 7278if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7279 ac_cv_cc_supports_pg=yes
bec39cab 7280else
81ecdfbb 7281 ac_cv_cc_supports_pg=no
bec39cab 7282fi
81ecdfbb 7283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7284fi
81ecdfbb
RW
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7286$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7287
a9322a30 7288 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 7289 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7290 fi
bec39cab 7291
a9322a30 7292 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7293fi
7294
c16158bc
JM
7295
7296
81ecdfbb
RW
7297# Check whether --with-pkgversion was given.
7298if test "${with_pkgversion+set}" = set; then :
7299 withval=$with_pkgversion; case "$withval" in
7300 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7301 no) PKGVERSION= ;;
7302 *) PKGVERSION="($withval) " ;;
7303 esac
7304else
7305 PKGVERSION="(GDB) "
7306
81ecdfbb 7307fi
c16158bc
JM
7308
7309
7310
7311
81ecdfbb
RW
7312
7313# Check whether --with-bugurl was given.
7314if test "${with_bugurl+set}" = set; then :
7315 withval=$with_bugurl; case "$withval" in
7316 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7317 no) BUGURL=
7318 ;;
7319 *) BUGURL="$withval"
7320 ;;
7321 esac
7322else
7323 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7324
81ecdfbb
RW
7325fi
7326
c16158bc
JM
7327 case ${BUGURL} in
7328 "")
7329 REPORT_BUGS_TO=
7330 REPORT_BUGS_TEXI=
7331 ;;
7332 *)
7333 REPORT_BUGS_TO="<$BUGURL>"
7334 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7335 ;;
7336 esac;
7337
7338
7339
7340
7341cat >>confdefs.h <<_ACEOF
7342#define PKGVERSION "$PKGVERSION"
7343_ACEOF
7344
7345
7346cat >>confdefs.h <<_ACEOF
7347#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7348_ACEOF
7349
7350
bec39cab
AC
7351# --------------------- #
7352# Checks for programs. #
7353# --------------------- #
7354
7355for ac_prog in gawk mawk nawk awk
7356do
7357 # Extract the first word of "$ac_prog", so it can be a program name with args.
7358set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360$as_echo_n "checking for $ac_word... " >&6; }
7361if test "${ac_cv_prog_AWK+set}" = set; then :
7362 $as_echo_n "(cached) " >&6
bec39cab
AC
7363else
7364 if test -n "$AWK"; then
7365 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7366else
7367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368for as_dir in $PATH
7369do
7370 IFS=$as_save_IFS
7371 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7372 for ac_exec_ext in '' $ac_executable_extensions; do
7373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7374 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7376 break 2
7377 fi
7378done
81ecdfbb
RW
7379 done
7380IFS=$as_save_IFS
bec39cab
AC
7381
7382fi
7383fi
7384AWK=$ac_cv_prog_AWK
7385if test -n "$AWK"; then
81ecdfbb
RW
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7387$as_echo "$AWK" >&6; }
bec39cab 7388else
81ecdfbb
RW
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390$as_echo "no" >&6; }
bec39cab
AC
7391fi
7392
bec39cab 7393
81ecdfbb 7394 test -n "$AWK" && break
bec39cab
AC
7395done
7396
bec39cab 7397
81ecdfbb
RW
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7399$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7400LN_S=$as_ln_s
7401if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7403$as_echo "yes" >&6; }
bec39cab 7404else
81ecdfbb
RW
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7406$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7407fi
7408
7409if test -n "$ac_tool_prefix"; then
7410 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7411set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413$as_echo_n "checking for $ac_word... " >&6; }
7414if test "${ac_cv_prog_RANLIB+set}" = set; then :
7415 $as_echo_n "(cached) " >&6
bec39cab
AC
7416else
7417 if test -n "$RANLIB"; then
7418 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7419else
7420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421for as_dir in $PATH
7422do
7423 IFS=$as_save_IFS
7424 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7425 for ac_exec_ext in '' $ac_executable_extensions; do
7426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7427 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7429 break 2
7430 fi
7431done
81ecdfbb
RW
7432 done
7433IFS=$as_save_IFS
bec39cab
AC
7434
7435fi
7436fi
7437RANLIB=$ac_cv_prog_RANLIB
7438if test -n "$RANLIB"; then
81ecdfbb
RW
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7440$as_echo "$RANLIB" >&6; }
bec39cab 7441else
81ecdfbb
RW
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7443$as_echo "no" >&6; }
bec39cab
AC
7444fi
7445
81ecdfbb 7446
bec39cab
AC
7447fi
7448if test -z "$ac_cv_prog_RANLIB"; then
7449 ac_ct_RANLIB=$RANLIB
7450 # Extract the first word of "ranlib", so it can be a program name with args.
7451set dummy ranlib; ac_word=$2
81ecdfbb
RW
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7455 $as_echo_n "(cached) " >&6
bec39cab
AC
7456else
7457 if test -n "$ac_ct_RANLIB"; then
7458 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7459else
7460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7461for as_dir in $PATH
7462do
7463 IFS=$as_save_IFS
7464 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7465 for ac_exec_ext in '' $ac_executable_extensions; do
7466 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7467 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7469 break 2
7470 fi
7471done
81ecdfbb
RW
7472 done
7473IFS=$as_save_IFS
bec39cab 7474
bec39cab
AC
7475fi
7476fi
7477ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7478if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7480$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7481else
81ecdfbb
RW
7482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7483$as_echo "no" >&6; }
bec39cab
AC
7484fi
7485
81ecdfbb
RW
7486 if test "x$ac_ct_RANLIB" = x; then
7487 RANLIB=":"
7488 else
7489 case $cross_compiling:$ac_tool_warned in
7490yes:)
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7492$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7493ac_tool_warned=yes ;;
7494esac
7495 RANLIB=$ac_ct_RANLIB
7496 fi
bec39cab
AC
7497else
7498 RANLIB="$ac_cv_prog_RANLIB"
7499fi
7500
7501for ac_prog in 'bison -y' byacc
7502do
7503 # Extract the first word of "$ac_prog", so it can be a program name with args.
7504set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7506$as_echo_n "checking for $ac_word... " >&6; }
7507if test "${ac_cv_prog_YACC+set}" = set; then :
7508 $as_echo_n "(cached) " >&6
bec39cab
AC
7509else
7510 if test -n "$YACC"; then
7511 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7512else
7513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514for as_dir in $PATH
7515do
7516 IFS=$as_save_IFS
7517 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7518 for ac_exec_ext in '' $ac_executable_extensions; do
7519 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7520 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7522 break 2
7523 fi
7524done
81ecdfbb
RW
7525 done
7526IFS=$as_save_IFS
bec39cab
AC
7527
7528fi
7529fi
7530YACC=$ac_cv_prog_YACC
7531if test -n "$YACC"; then
81ecdfbb
RW
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7533$as_echo "$YACC" >&6; }
bec39cab 7534else
81ecdfbb
RW
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536$as_echo "no" >&6; }
bec39cab
AC
7537fi
7538
81ecdfbb 7539
bec39cab
AC
7540 test -n "$YACC" && break
7541done
7542test -n "$YACC" || YACC="yacc"
7543
7544
7545if test -n "$ac_tool_prefix"; then
7546 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7547set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7549$as_echo_n "checking for $ac_word... " >&6; }
7550if test "${ac_cv_prog_AR+set}" = set; then :
7551 $as_echo_n "(cached) " >&6
bec39cab
AC
7552else
7553 if test -n "$AR"; then
7554 ac_cv_prog_AR="$AR" # Let the user override the test.
7555else
7556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7557for as_dir in $PATH
7558do
7559 IFS=$as_save_IFS
7560 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7561 for ac_exec_ext in '' $ac_executable_extensions; do
7562 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7563 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7565 break 2
7566 fi
7567done
81ecdfbb
RW
7568 done
7569IFS=$as_save_IFS
bec39cab
AC
7570
7571fi
7572fi
7573AR=$ac_cv_prog_AR
7574if test -n "$AR"; then
81ecdfbb
RW
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7576$as_echo "$AR" >&6; }
bec39cab 7577else
81ecdfbb
RW
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
bec39cab
AC
7580fi
7581
81ecdfbb 7582
bec39cab
AC
7583fi
7584if test -z "$ac_cv_prog_AR"; then
7585 ac_ct_AR=$AR
7586 # Extract the first word of "ar", so it can be a program name with args.
7587set dummy ar; ac_word=$2
81ecdfbb
RW
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7589$as_echo_n "checking for $ac_word... " >&6; }
7590if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7591 $as_echo_n "(cached) " >&6
bec39cab
AC
7592else
7593 if test -n "$ac_ct_AR"; then
7594 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7595else
7596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7597for as_dir in $PATH
7598do
7599 IFS=$as_save_IFS
7600 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7601 for ac_exec_ext in '' $ac_executable_extensions; do
7602 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7603 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7605 break 2
7606 fi
7607done
81ecdfbb
RW
7608 done
7609IFS=$as_save_IFS
bec39cab
AC
7610
7611fi
7612fi
7613ac_ct_AR=$ac_cv_prog_ac_ct_AR
7614if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7616$as_echo "$ac_ct_AR" >&6; }
bec39cab 7617else
81ecdfbb
RW
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7619$as_echo "no" >&6; }
bec39cab
AC
7620fi
7621
81ecdfbb
RW
7622 if test "x$ac_ct_AR" = x; then
7623 AR=""
7624 else
7625 case $cross_compiling:$ac_tool_warned in
7626yes:)
7627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7629ac_tool_warned=yes ;;
7630esac
7631 AR=$ac_ct_AR
7632 fi
bec39cab
AC
7633else
7634 AR="$ac_cv_prog_AR"
7635fi
7636
7637if test -n "$ac_tool_prefix"; then
7638 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7639set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7641$as_echo_n "checking for $ac_word... " >&6; }
7642if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7643 $as_echo_n "(cached) " >&6
bec39cab
AC
7644else
7645 if test -n "$DLLTOOL"; then
7646 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7647else
7648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649for as_dir in $PATH
7650do
7651 IFS=$as_save_IFS
7652 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7653 for ac_exec_ext in '' $ac_executable_extensions; do
7654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7655 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7657 break 2
7658 fi
7659done
81ecdfbb
RW
7660 done
7661IFS=$as_save_IFS
bec39cab
AC
7662
7663fi
7664fi
7665DLLTOOL=$ac_cv_prog_DLLTOOL
7666if test -n "$DLLTOOL"; then
81ecdfbb
RW
7667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7668$as_echo "$DLLTOOL" >&6; }
bec39cab 7669else
81ecdfbb
RW
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7671$as_echo "no" >&6; }
bec39cab
AC
7672fi
7673
81ecdfbb 7674
bec39cab
AC
7675fi
7676if test -z "$ac_cv_prog_DLLTOOL"; then
7677 ac_ct_DLLTOOL=$DLLTOOL
7678 # Extract the first word of "dlltool", so it can be a program name with args.
7679set dummy dlltool; ac_word=$2
81ecdfbb
RW
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7681$as_echo_n "checking for $ac_word... " >&6; }
7682if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7683 $as_echo_n "(cached) " >&6
bec39cab
AC
7684else
7685 if test -n "$ac_ct_DLLTOOL"; then
7686 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7687else
7688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7689for as_dir in $PATH
7690do
7691 IFS=$as_save_IFS
7692 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7693 for ac_exec_ext in '' $ac_executable_extensions; do
7694 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7695 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7697 break 2
7698 fi
7699done
81ecdfbb
RW
7700 done
7701IFS=$as_save_IFS
bec39cab
AC
7702
7703fi
7704fi
7705ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7706if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7708$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7709else
81ecdfbb
RW
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711$as_echo "no" >&6; }
bec39cab
AC
7712fi
7713
81ecdfbb
RW
7714 if test "x$ac_ct_DLLTOOL" = x; then
7715 DLLTOOL=""
7716 else
7717 case $cross_compiling:$ac_tool_warned in
7718yes:)
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7721ac_tool_warned=yes ;;
7722esac
7723 DLLTOOL=$ac_ct_DLLTOOL
7724 fi
bec39cab
AC
7725else
7726 DLLTOOL="$ac_cv_prog_DLLTOOL"
7727fi
7728
7729if test -n "$ac_tool_prefix"; then
7730 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7731set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7733$as_echo_n "checking for $ac_word... " >&6; }
7734if test "${ac_cv_prog_WINDRES+set}" = set; then :
7735 $as_echo_n "(cached) " >&6
bec39cab
AC
7736else
7737 if test -n "$WINDRES"; then
7738 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7739else
7740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743 IFS=$as_save_IFS
7744 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7745 for ac_exec_ext in '' $ac_executable_extensions; do
7746 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7747 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7749 break 2
7750 fi
7751done
81ecdfbb
RW
7752 done
7753IFS=$as_save_IFS
bec39cab
AC
7754
7755fi
7756fi
7757WINDRES=$ac_cv_prog_WINDRES
7758if test -n "$WINDRES"; then
81ecdfbb
RW
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7760$as_echo "$WINDRES" >&6; }
bec39cab 7761else
81ecdfbb
RW
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7763$as_echo "no" >&6; }
bec39cab
AC
7764fi
7765
81ecdfbb 7766
bec39cab
AC
7767fi
7768if test -z "$ac_cv_prog_WINDRES"; then
7769 ac_ct_WINDRES=$WINDRES
7770 # Extract the first word of "windres", so it can be a program name with args.
7771set dummy windres; ac_word=$2
81ecdfbb
RW
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7773$as_echo_n "checking for $ac_word... " >&6; }
7774if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7775 $as_echo_n "(cached) " >&6
bec39cab
AC
7776else
7777 if test -n "$ac_ct_WINDRES"; then
7778 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7779else
7780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781for as_dir in $PATH
7782do
7783 IFS=$as_save_IFS
7784 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7785 for ac_exec_ext in '' $ac_executable_extensions; do
7786 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7787 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7789 break 2
7790 fi
7791done
81ecdfbb
RW
7792 done
7793IFS=$as_save_IFS
bec39cab
AC
7794
7795fi
7796fi
7797ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7798if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7800$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7801else
81ecdfbb
RW
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
c906108c 7804fi
bec39cab 7805
81ecdfbb
RW
7806 if test "x$ac_ct_WINDRES" = x; then
7807 WINDRES=""
7808 else
7809 case $cross_compiling:$ac_tool_warned in
7810yes:)
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7813ac_tool_warned=yes ;;
7814esac
7815 WINDRES=$ac_ct_WINDRES
7816 fi
c906108c 7817else
bec39cab 7818 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7819fi
7820
bec39cab
AC
7821
7822# Needed for GNU/Hurd.
7823if test -n "$ac_tool_prefix"; then
7824 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7825set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if test "${ac_cv_prog_MIG+set}" = set; then :
7829 $as_echo_n "(cached) " >&6
c906108c 7830else
bec39cab
AC
7831 if test -n "$MIG"; then
7832 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7833else
7834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7835for as_dir in $PATH
7836do
7837 IFS=$as_save_IFS
7838 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7839 for ac_exec_ext in '' $ac_executable_extensions; do
7840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7841 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7843 break 2
7844 fi
7845done
81ecdfbb
RW
7846 done
7847IFS=$as_save_IFS
bec39cab 7848
c906108c 7849fi
bec39cab
AC
7850fi
7851MIG=$ac_cv_prog_MIG
7852if test -n "$MIG"; then
81ecdfbb
RW
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7854$as_echo "$MIG" >&6; }
c906108c 7855else
81ecdfbb
RW
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7857$as_echo "no" >&6; }
c906108c
SS
7858fi
7859
81ecdfbb 7860
bec39cab
AC
7861fi
7862if test -z "$ac_cv_prog_MIG"; then
7863 ac_ct_MIG=$MIG
7864 # Extract the first word of "mig", so it can be a program name with args.
7865set dummy mig; ac_word=$2
81ecdfbb
RW
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867$as_echo_n "checking for $ac_word... " >&6; }
7868if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7869 $as_echo_n "(cached) " >&6
bec39cab
AC
7870else
7871 if test -n "$ac_ct_MIG"; then
7872 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7873else
7874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7875for as_dir in $PATH
7876do
7877 IFS=$as_save_IFS
7878 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7879 for ac_exec_ext in '' $ac_executable_extensions; do
7880 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7881 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7883 break 2
7884 fi
7885done
81ecdfbb
RW
7886 done
7887IFS=$as_save_IFS
c906108c 7888
bec39cab
AC
7889fi
7890fi
7891ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7892if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7894$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7895else
81ecdfbb
RW
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7897$as_echo "no" >&6; }
bec39cab 7898fi
c906108c 7899
81ecdfbb
RW
7900 if test "x$ac_ct_MIG" = x; then
7901 MIG=""
7902 else
7903 case $cross_compiling:$ac_tool_warned in
7904yes:)
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7907ac_tool_warned=yes ;;
7908esac
7909 MIG=$ac_ct_MIG
7910 fi
bec39cab
AC
7911else
7912 MIG="$ac_cv_prog_MIG"
7913fi
c906108c 7914
c906108c 7915
bec39cab
AC
7916# ---------------------- #
7917# Checks for libraries. #
7918# ---------------------- #
c906108c 7919
bec39cab 7920# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7922$as_echo_n "checking for main in -lm... " >&6; }
7923if test "${ac_cv_lib_m_main+set}" = set; then :
7924 $as_echo_n "(cached) " >&6
bec39cab
AC
7925else
7926 ac_check_lib_save_LIBS=$LIBS
7927LIBS="-lm $LIBS"
81ecdfbb 7928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7929/* end confdefs.h. */
c906108c 7930
c906108c 7931
bec39cab
AC
7932int
7933main ()
7934{
81ecdfbb 7935return main ();
bec39cab
AC
7936 ;
7937 return 0;
7938}
7939_ACEOF
81ecdfbb 7940if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7941 ac_cv_lib_m_main=yes
7942else
81ecdfbb 7943 ac_cv_lib_m_main=no
bec39cab 7944fi
81ecdfbb
RW
7945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7947LIBS=$ac_check_lib_save_LIBS
7948fi
81ecdfbb
RW
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7950$as_echo "$ac_cv_lib_m_main" >&6; }
7951if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7952 cat >>confdefs.h <<_ACEOF
7953#define HAVE_LIBM 1
7954_ACEOF
7955
7956 LIBS="-lm $LIBS"
c906108c 7957
c906108c 7958fi
bec39cab
AC
7959
7960
7961# We need to link with -lw to get `wctype' on Solaris before Solaris
7962# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
7963# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7964# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
7965ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7966if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 7967
c906108c 7968else
81ecdfbb
RW
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7970$as_echo_n "checking for wctype in -lw... " >&6; }
7971if test "${ac_cv_lib_w_wctype+set}" = set; then :
7972 $as_echo_n "(cached) " >&6
bec39cab
AC
7973else
7974 ac_check_lib_save_LIBS=$LIBS
7975LIBS="-lw $LIBS"
81ecdfbb 7976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7977/* end confdefs.h. */
c906108c 7978
81ecdfbb
RW
7979/* Override any GCC internal prototype to avoid an error.
7980 Use char because int might match the return type of a GCC
7981 builtin and then its argument prototype would still apply. */
bec39cab
AC
7982#ifdef __cplusplus
7983extern "C"
7984#endif
bec39cab
AC
7985char wctype ();
7986int
7987main ()
7988{
81ecdfbb 7989return wctype ();
bec39cab
AC
7990 ;
7991 return 0;
7992}
7993_ACEOF
81ecdfbb 7994if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7995 ac_cv_lib_w_wctype=yes
7996else
81ecdfbb 7997 ac_cv_lib_w_wctype=no
bec39cab 7998fi
81ecdfbb
RW
7999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8001LIBS=$ac_check_lib_save_LIBS
8002fi
81ecdfbb
RW
8003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
8004$as_echo "$ac_cv_lib_w_wctype" >&6; }
8005if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
8006 cat >>confdefs.h <<_ACEOF
8007#define HAVE_LIBW 1
8008_ACEOF
c906108c 8009
bec39cab 8010 LIBS="-lw $LIBS"
c906108c 8011
bec39cab 8012fi
c906108c 8013
bec39cab 8014fi
c906108c 8015
ddc9cd0f 8016
bec39cab 8017# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8019$as_echo_n "checking for library containing gethostbyname... " >&6; }
8020if test "${ac_cv_search_gethostbyname+set}" = set; then :
8021 $as_echo_n "(cached) " >&6
bec39cab
AC
8022else
8023 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8025/* end confdefs.h. */
ddc9cd0f 8026
81ecdfbb
RW
8027/* Override any GCC internal prototype to avoid an error.
8028 Use char because int might match the return type of a GCC
8029 builtin and then its argument prototype would still apply. */
bec39cab
AC
8030#ifdef __cplusplus
8031extern "C"
8032#endif
bec39cab
AC
8033char gethostbyname ();
8034int
8035main ()
8036{
81ecdfbb 8037return gethostbyname ();
bec39cab
AC
8038 ;
8039 return 0;
8040}
8041_ACEOF
81ecdfbb
RW
8042for ac_lib in '' nsl; do
8043 if test -z "$ac_lib"; then
8044 ac_res="none required"
8045 else
8046 ac_res=-l$ac_lib
b4e70030 8047 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8048 fi
8049 if ac_fn_c_try_link "$LINENO"; then :
8050 ac_cv_search_gethostbyname=$ac_res
8051fi
8052rm -f core conftest.err conftest.$ac_objext \
8053 conftest$ac_exeext
8054 if test "${ac_cv_search_gethostbyname+set}" = set; then :
8055 break
8056fi
8057done
8058if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 8059
bec39cab 8060else
81ecdfbb 8061 ac_cv_search_gethostbyname=no
bec39cab 8062fi
81ecdfbb 8063rm conftest.$ac_ext
bec39cab
AC
8064LIBS=$ac_func_search_save_LIBS
8065fi
81ecdfbb
RW
8066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8067$as_echo "$ac_cv_search_gethostbyname" >&6; }
8068ac_res=$ac_cv_search_gethostbyname
8069if test "$ac_res" != no; then :
8070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8071
bec39cab 8072fi
96baa820 8073
c906108c 8074
b4e70030 8075# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8077$as_echo_n "checking for library containing socketpair... " >&6; }
8078if test "${ac_cv_search_socketpair+set}" = set; then :
8079 $as_echo_n "(cached) " >&6
b4e70030
JB
8080else
8081 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8083/* end confdefs.h. */
8084
81ecdfbb
RW
8085/* Override any GCC internal prototype to avoid an error.
8086 Use char because int might match the return type of a GCC
8087 builtin and then its argument prototype would still apply. */
b4e70030
JB
8088#ifdef __cplusplus
8089extern "C"
8090#endif
b4e70030
JB
8091char socketpair ();
8092int
8093main ()
8094{
81ecdfbb 8095return socketpair ();
b4e70030
JB
8096 ;
8097 return 0;
8098}
8099_ACEOF
81ecdfbb
RW
8100for ac_lib in '' socket; do
8101 if test -z "$ac_lib"; then
8102 ac_res="none required"
8103 else
8104 ac_res=-l$ac_lib
b4e70030 8105 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8106 fi
8107 if ac_fn_c_try_link "$LINENO"; then :
8108 ac_cv_search_socketpair=$ac_res
8109fi
8110rm -f core conftest.err conftest.$ac_objext \
8111 conftest$ac_exeext
8112 if test "${ac_cv_search_socketpair+set}" = set; then :
8113 break
8114fi
8115done
8116if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 8117
b4e70030 8118else
81ecdfbb 8119 ac_cv_search_socketpair=no
b4e70030 8120fi
81ecdfbb 8121rm conftest.$ac_ext
b4e70030
JB
8122LIBS=$ac_func_search_save_LIBS
8123fi
81ecdfbb
RW
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8125$as_echo "$ac_cv_search_socketpair" >&6; }
8126ac_res=$ac_cv_search_socketpair
8127if test "$ac_res" != no; then :
8128 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8129
8130fi
8131
8132
233a11ab 8133# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
8134
8135 # See if the user specified whether he wants zlib support or not.
8136
8137# Check whether --with-zlib was given.
8138if test "${with_zlib+set}" = set; then :
8139 withval=$with_zlib;
8140else
8141 with_zlib=auto
8142fi
8143
8144
8145 if test "$with_zlib" != "no"; then
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
8147$as_echo_n "checking for library containing zlibVersion... " >&6; }
8148if test "${ac_cv_search_zlibVersion+set}" = set; then :
8149 $as_echo_n "(cached) " >&6
233a11ab
CS
8150else
8151 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
8153/* end confdefs.h. */
8154
81ecdfbb
RW
8155/* Override any GCC internal prototype to avoid an error.
8156 Use char because int might match the return type of a GCC
233a11ab 8157 builtin and then its argument prototype would still apply. */
233a11ab
CS
8158#ifdef __cplusplus
8159extern "C"
8160#endif
233a11ab
CS
8161char zlibVersion ();
8162int
8163main ()
8164{
81ecdfbb 8165return zlibVersion ();
233a11ab
CS
8166 ;
8167 return 0;
8168}
8169_ACEOF
81ecdfbb
RW
8170for ac_lib in '' z; do
8171 if test -z "$ac_lib"; then
8172 ac_res="none required"
233a11ab 8173 else
81ecdfbb
RW
8174 ac_res=-l$ac_lib
8175 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 8176 fi
81ecdfbb
RW
8177 if ac_fn_c_try_link "$LINENO"; then :
8178 ac_cv_search_zlibVersion=$ac_res
233a11ab 8179fi
81ecdfbb
RW
8180rm -f core conftest.err conftest.$ac_objext \
8181 conftest$ac_exeext
8182 if test "${ac_cv_search_zlibVersion+set}" = set; then :
8183 break
233a11ab 8184fi
81ecdfbb
RW
8185done
8186if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 8187
233a11ab 8188else
81ecdfbb 8189 ac_cv_search_zlibVersion=no
233a11ab 8190fi
81ecdfbb
RW
8191rm conftest.$ac_ext
8192LIBS=$ac_func_search_save_LIBS
233a11ab 8193fi
81ecdfbb
RW
8194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
8195$as_echo "$ac_cv_search_zlibVersion" >&6; }
8196ac_res=$ac_cv_search_zlibVersion
8197if test "$ac_res" != no; then :
8198 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8199 for ac_header in zlib.h
8200do :
8201 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8202if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 8203 cat >>confdefs.h <<_ACEOF
81ecdfbb 8204#define HAVE_ZLIB_H 1
233a11ab
CS
8205_ACEOF
8206
8207fi
8208
8209done
8210
8211fi
8212
b040ad30
JB
8213 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
8214 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
8215 fi
8216 fi
8217
233a11ab 8218
77f120bf 8219# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
8221$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
8222if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8223 $as_echo_n "(cached) " >&6
bec39cab
AC
8224else
8225 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8227/* end confdefs.h. */
c906108c 8228
81ecdfbb
RW
8229/* Override any GCC internal prototype to avoid an error.
8230 Use char because int might match the return type of a GCC
8231 builtin and then its argument prototype would still apply. */
bec39cab
AC
8232#ifdef __cplusplus
8233extern "C"
8234#endif
77f120bf 8235char dlgetmodinfo ();
bec39cab
AC
8236int
8237main ()
8238{
81ecdfbb 8239return dlgetmodinfo ();
bec39cab
AC
8240 ;
8241 return 0;
8242}
8243_ACEOF
81ecdfbb
RW
8244for ac_lib in '' dl xpdl; do
8245 if test -z "$ac_lib"; then
8246 ac_res="none required"
8247 else
8248 ac_res=-l$ac_lib
b4e70030 8249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8250 fi
8251 if ac_fn_c_try_link "$LINENO"; then :
8252 ac_cv_search_dlgetmodinfo=$ac_res
8253fi
8254rm -f core conftest.err conftest.$ac_objext \
8255 conftest$ac_exeext
8256 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8257 break
8258fi
8259done
8260if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 8261
4e8d927d 8262else
81ecdfbb 8263 ac_cv_search_dlgetmodinfo=no
1ba607ad 8264fi
81ecdfbb 8265rm conftest.$ac_ext
bec39cab
AC
8266LIBS=$ac_func_search_save_LIBS
8267fi
81ecdfbb
RW
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
8269$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
8270ac_res=$ac_cv_search_dlgetmodinfo
8271if test "$ac_res" != no; then :
8272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 8273
8bb2c122 8274fi
8bb2c122 8275
8bb2c122 8276
77f120bf 8277
77f120bf 8278
6c7a06a3 8279
81ecdfbb
RW
8280# Check whether --with-libiconv-prefix was given.
8281if test "${with_libiconv_prefix+set}" = set; then :
8282 withval=$with_libiconv_prefix;
6c7a06a3 8283 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
8284 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
8285 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
8286 done
8287
81ecdfbb
RW
8288fi
8289
6c7a06a3
TT
8290
8291 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
8292 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
8293
81ecdfbb
RW
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8295$as_echo_n "checking for iconv... " >&6; }
8296if test "${am_cv_func_iconv+set}" = set; then :
8297 $as_echo_n "(cached) " >&6
d542061a 8298else
6c7a06a3
TT
8299
8300 am_cv_func_iconv="no, consider installing GNU libiconv"
8301 am_cv_lib_iconv=no
8302 am_cv_use_build_libiconv=no
4edb1e84
JB
8303
8304 # If libiconv is part of the build tree, then try using it over
8305 # any system iconv.
8306 if test -d ../libiconv; then
8307 am_save_LIBS="$LIBS"
8308 am_save_CPPFLAGS="$CPPFLAGS"
8309 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
8310 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
81ecdfbb 8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8312/* end confdefs.h. */
6c7a06a3
TT
8313#include <stdlib.h>
8314#include <iconv.h>
d542061a
UW
8315int
8316main ()
8317{
6c7a06a3 8318iconv_t cd = iconv_open("","");
4edb1e84
JB
8319 iconv(cd,NULL,NULL,NULL,NULL);
8320 iconv_close(cd);
d542061a
UW
8321 ;
8322 return 0;
8323}
8324_ACEOF
81ecdfbb 8325if ac_fn_c_try_link "$LINENO"; then :
4edb1e84
JB
8326 am_cv_use_build_libiconv=yes
8327 am_cv_lib_iconv=yes
8328 am_cv_func_iconv=yes
d542061a 8329fi
81ecdfbb
RW
8330rm -f core conftest.err conftest.$ac_objext \
8331 conftest$ac_exeext conftest.$ac_ext
4edb1e84
JB
8332 LIBS="$am_save_LIBS"
8333 CPPFLAGS="$am_save_CPPFLAGS"
8334 fi
94ae1714 8335
4edb1e84 8336 # Next, try to find iconv in libc.
6c7a06a3 8337 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 8338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8339/* end confdefs.h. */
6c7a06a3
TT
8340#include <stdlib.h>
8341#include <iconv.h>
d542061a
UW
8342int
8343main ()
8344{
6c7a06a3
TT
8345iconv_t cd = iconv_open("","");
8346 iconv(cd,NULL,NULL,NULL,NULL);
8347 iconv_close(cd);
d542061a
UW
8348 ;
8349 return 0;
8350}
8351_ACEOF
81ecdfbb 8352if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8353 am_cv_func_iconv=yes
d542061a 8354fi
81ecdfbb
RW
8355rm -f core conftest.err conftest.$ac_objext \
8356 conftest$ac_exeext conftest.$ac_ext
77f120bf 8357 fi
94ae1714 8358
4edb1e84
JB
8359 # If iconv was not in libc, try -liconv. In this case, arrange to
8360 # look in the libiconv prefix, if it was specified by the user.
8361 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8362 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
8363 am_save_LIBS="$LIBS"
8364 if test -n "$LIBICONV_INCLUDE"; then
8365 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8366 LIBS="$LIBS $LIBICONV_LIBDIR"
8367 fi
8368 LIBS="$LIBS -liconv"
81ecdfbb 8369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8370/* end confdefs.h. */
6c7a06a3
TT
8371#include <stdlib.h>
8372#include <iconv.h>
bec39cab
AC
8373int
8374main ()
8375{
6c7a06a3
TT
8376iconv_t cd = iconv_open("","");
8377 iconv(cd,NULL,NULL,NULL,NULL);
8378 iconv_close(cd);
bec39cab
AC
8379 ;
8380 return 0;
8381}
8382_ACEOF
81ecdfbb 8383if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8384 am_cv_lib_iconv=yes
6c7a06a3 8385 am_cv_func_iconv=yes
627af7ea 8386fi
81ecdfbb
RW
8387rm -f core conftest.err conftest.$ac_objext \
8388 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 8389 LIBS="$am_save_LIBS"
fc3b640d 8390 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
8391 fi
8392
8393fi
81ecdfbb
RW
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8395$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
8396
8397 # Set the various flags based on the cache variables. We can't rely
8398 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
8399 LIBICONV=
8400 if test "$am_cv_lib_iconv" = yes; then
8401 LIBICONV="-liconv"
94ae1714
TT
8402 else
8403 LIBICONV_LIBDIR=
8404 LIBICONV_INCLUDE=
fc3b640d
TT
8405 fi
8406 if test "$am_cv_use_build_libiconv" = yes; then
8407 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
8408 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
8409 fi
8410 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8411 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 8412
6c7a06a3
TT
8413 if test "$am_cv_func_iconv" = yes; then
8414
81ecdfbb 8415$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 8416
81ecdfbb
RW
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8418$as_echo_n "checking for iconv declaration... " >&6; }
8419 if test "${am_cv_proto_iconv+set}" = set; then :
8420 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8421else
8422
81ecdfbb 8423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8424/* end confdefs.h. */
8425
6c7a06a3
TT
8426#include <stdlib.h>
8427#include <iconv.h>
8428extern
b4e70030 8429#ifdef __cplusplus
6c7a06a3 8430"C"
b4e70030 8431#endif
6c7a06a3
TT
8432#if defined(__STDC__) || defined(__cplusplus)
8433size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8434#else
8435size_t iconv();
8436#endif
8437
b4e70030
JB
8438int
8439main ()
8440{
6c7a06a3 8441
b4e70030
JB
8442 ;
8443 return 0;
8444}
8445_ACEOF
81ecdfbb 8446if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8447 am_cv_proto_iconv_arg1=""
4e8d927d 8448else
81ecdfbb 8449 am_cv_proto_iconv_arg1="const"
b4e70030 8450fi
81ecdfbb 8451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8452 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);"
8453fi
8454
8455 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8457 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8458$as_echo "${ac_t:-
8459 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8460
8461cat >>confdefs.h <<_ACEOF
8462#define ICONV_CONST $am_cv_proto_iconv_arg1
8463_ACEOF
8464
8465 fi
6c7a06a3
TT
8466
8467
8468# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
8469# There is a very specific comment in /usr/include/curses.h explaining that
8470# termcap routines built into libcurses must not be used.
8471#
8472# The symptoms we observed so far is GDB unexpectedly changing
8473# the terminal settings when tgetent is called - this is particularly
8474# visible as the output is missing carriage returns, and so rapidly
8475# becomes very hard to read.
8476#
8477# The readline configure script has already decided that libtermcap
8478# was enough for its purposes, and so decided to build readline using
8479# libtermcap. Since the TUI mode requires curses, building GDB with
8480# TUI enabled results in both libraries to be used at the same time,
8481# which is not allowed. This basically means that GDB with TUI is
8482# broken on alpha-osf.
8483
8484case $host_os in
8485 alpha*-*-osf* )
8486 if "$enable_tui" = "yes"; then
81ecdfbb 8487 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3
TT
8488 fi
8489 if "$enable_tui" = "auto"; then
8490 enable_tui=no
8491 fi
8492 ;;
8493esac
8494
cb01cfba 8495# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8496if test x"$enable_tui" != xno; then
cb01cfba
JB
8497 prefer_curses=yes
8498fi
8499
8500curses_found=no
8501if test x"$prefer_curses" = xyes; then
8502 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8503 # curses library because the latter might not provide all the
8504 # functionality we need. However, this leads to problems on systems
8505 # where the linker searches /usr/local/lib, but the compiler doesn't
8506 # search /usr/local/include, if ncurses is installed in /usr/local. A
8507 # default installation of ncurses on alpha*-dec-osf* will lead to such
8508 # a situation.
81ecdfbb
RW
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8510$as_echo_n "checking for library containing waddstr... " >&6; }
8511if test "${ac_cv_search_waddstr+set}" = set; then :
8512 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8513else
8514 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8516/* end confdefs.h. */
8517
81ecdfbb
RW
8518/* Override any GCC internal prototype to avoid an error.
8519 Use char because int might match the return type of a GCC
8520 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8521#ifdef __cplusplus
8522extern "C"
8523#endif
6c7a06a3
TT
8524char waddstr ();
8525int
8526main ()
8527{
81ecdfbb 8528return waddstr ();
6c7a06a3
TT
8529 ;
8530 return 0;
8531}
8532_ACEOF
81ecdfbb
RW
8533for ac_lib in '' ncurses cursesX curses; do
8534 if test -z "$ac_lib"; then
8535 ac_res="none required"
8536 else
8537 ac_res=-l$ac_lib
8538 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8539 fi
8540 if ac_fn_c_try_link "$LINENO"; then :
8541 ac_cv_search_waddstr=$ac_res
8542fi
8543rm -f core conftest.err conftest.$ac_objext \
8544 conftest$ac_exeext
8545 if test "${ac_cv_search_waddstr+set}" = set; then :
8546 break
8547fi
8548done
8549if test "${ac_cv_search_waddstr+set}" = set; then :
8550
6c7a06a3 8551else
81ecdfbb
RW
8552 ac_cv_search_waddstr=no
8553fi
8554rm conftest.$ac_ext
8555LIBS=$ac_func_search_save_LIBS
8556fi
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8558$as_echo "$ac_cv_search_waddstr" >&6; }
8559ac_res=$ac_cv_search_waddstr
8560if test "$ac_res" != no; then :
8561 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8562
8563fi
8564
8565
cb01cfba
JB
8566 if test "$ac_cv_search_waddstr" != no; then
8567 curses_found=yes
8568 fi
8569fi
8570
8571# Check whether we should enable the TUI, but only do so if we really
8572# can.
8573if test x"$enable_tui" != xno; then
8574 if test -d $srcdir/tui; then
8575 if test "$curses_found" != no; then
6c7a06a3
TT
8576 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8577 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8578 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8579 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8580 CONFIG_ALL="${CONFIG_ALL} all-tui"
8581 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
8582 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
8583 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
8584 else
8585 if test x"$enable_tui" = xyes; then
81ecdfbb 8586 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8587 else
81ecdfbb
RW
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8589$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8590 fi
8591 fi
8592 fi
8593fi
8594
8595# Since GDB uses Readline, we need termcap functionality. In many
8596# cases this will be provided by the curses library, but some systems
8597# have a seperate termcap library, or no curses library at all.
8598
8599case $host_os in
8600 cygwin*)
8601 if test -d $srcdir/libtermcap; then
8602 LIBS="../libtermcap/libtermcap.a $LIBS"
8603 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8604 fi ;;
8605 go32* | *djgpp*)
8606 ac_cv_search_tgetent="none required"
8607 ;;
8608 *mingw32*)
8609 ac_cv_search_tgetent="none required"
8610 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
8611 ;;
8612esac
8613
8614# These are the libraries checked by Readline.
81ecdfbb
RW
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8616$as_echo_n "checking for library containing tgetent... " >&6; }
8617if test "${ac_cv_search_tgetent+set}" = set; then :
8618 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8619else
8620 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8622/* end confdefs.h. */
8623
81ecdfbb
RW
8624/* Override any GCC internal prototype to avoid an error.
8625 Use char because int might match the return type of a GCC
8626 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8627#ifdef __cplusplus
8628extern "C"
8629#endif
6c7a06a3
TT
8630char tgetent ();
8631int
8632main ()
8633{
81ecdfbb 8634return tgetent ();
6c7a06a3
TT
8635 ;
8636 return 0;
8637}
8638_ACEOF
81ecdfbb
RW
8639for ac_lib in '' termcap tinfo curses ncurses; do
8640 if test -z "$ac_lib"; then
8641 ac_res="none required"
8642 else
8643 ac_res=-l$ac_lib
6c7a06a3 8644 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8645 fi
8646 if ac_fn_c_try_link "$LINENO"; then :
8647 ac_cv_search_tgetent=$ac_res
8648fi
8649rm -f core conftest.err conftest.$ac_objext \
8650 conftest$ac_exeext
8651 if test "${ac_cv_search_tgetent+set}" = set; then :
8652 break
8653fi
8654done
8655if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8656
6c7a06a3 8657else
81ecdfbb 8658 ac_cv_search_tgetent=no
6c7a06a3 8659fi
81ecdfbb 8660rm conftest.$ac_ext
6c7a06a3
TT
8661LIBS=$ac_func_search_save_LIBS
8662fi
81ecdfbb
RW
8663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8664$as_echo "$ac_cv_search_tgetent" >&6; }
8665ac_res=$ac_cv_search_tgetent
8666if test "$ac_res" != no; then :
8667 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8668
06825bd1
MK
8669fi
8670
06825bd1 8671
bec39cab 8672if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 8673 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
8674fi
8675
3841debe 8676
81ecdfbb
RW
8677# Check whether --with-system-readline was given.
8678if test "${with_system_readline+set}" = set; then :
8679 withval=$with_system_readline;
8680fi
6a30b0a5 8681
6a30b0a5
AS
8682
8683if test "$with_system_readline" = yes; then
8684 READLINE=-lreadline
8685 READLINE_DEPS=
8686 READLINE_CFLAGS=
a71e0887
JK
8687
8688 # readline-6.0 started to use the name `_rl_echoing_p'.
8689 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
8690
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
8692$as_echo_n "checking for readline_echoing_p... " >&6; }
8693 save_LIBS=$LIBS
8694 LIBS="$LIBS $READLINE"
8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696/* end confdefs.h. */
8697
8698int
8699main ()
8700{
8701extern int readline_echoing_p;
8702 return readline_echoing_p;
8703 ;
8704 return 0;
8705}
8706_ACEOF
8707if ac_fn_c_try_link "$LINENO"; then :
8708 READLINE_ECHOING_P=yes
8709else
8710 READLINE_ECHOING_P=no
8711
8712$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
8713
8714fi
8715rm -f core conftest.err conftest.$ac_objext \
8716 conftest$ac_exeext conftest.$ac_ext
8717 LIBS="$save_LIBS"
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
8719$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
8720else
8721 READLINE='$(READLINE_DIR)/libreadline.a'
8722 READLINE_DEPS='$(READLINE)'
8723 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8724fi
8725
8726
8727
8728
8729
81ecdfbb
RW
8730# Check whether --with-expat was given.
8731if test "${with_expat+set}" = set; then :
8732 withval=$with_expat;
5c39566f
DJ
8733else
8734 with_expat=auto
81ecdfbb
RW
8735fi
8736
8737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8738$as_echo_n "checking whether to use expat... " >&6; }
8739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8740$as_echo "$with_expat" >&6; }
5c39566f
DJ
8741
8742if test "${with_expat}" = no; then
81ecdfbb
RW
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8744$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8745 HAVE_LIBEXPAT=no
8746else
8747
3841debe
DJ
8748 if test "X$prefix" = "XNONE"; then
8749 acl_final_prefix="$ac_default_prefix"
8750 else
8751 acl_final_prefix="$prefix"
8752 fi
8753 if test "X$exec_prefix" = "XNONE"; then
8754 acl_final_exec_prefix='${prefix}'
8755 else
8756 acl_final_exec_prefix="$exec_prefix"
8757 fi
8758 acl_save_prefix="$prefix"
8759 prefix="$acl_final_prefix"
8760 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8761 prefix="$acl_save_prefix"
8762
8763
81ecdfbb
RW
8764# Check whether --with-gnu-ld was given.
8765if test "${with_gnu_ld+set}" = set; then :
8766 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
8767else
8768 with_gnu_ld=no
81ecdfbb
RW
8769fi
8770
3841debe
DJ
8771# Prepare PATH_SEPARATOR.
8772# The user is always right.
8773if test "${PATH_SEPARATOR+set}" != set; then
8774 echo "#! /bin/sh" >conf$$.sh
8775 echo "exit 0" >>conf$$.sh
8776 chmod +x conf$$.sh
8777 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8778 PATH_SEPARATOR=';'
8779 else
8780 PATH_SEPARATOR=:
8781 fi
8782 rm -f conf$$.sh
8783fi
8784ac_prog=ld
8785if test "$GCC" = yes; then
8786 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8788$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
8789 case $host in
8790 *-*-mingw*)
8791 # gcc leaves a trailing carriage return which upsets mingw
8792 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8793 *)
8794 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8795 esac
8796 case $ac_prog in
8797 # Accept absolute paths.
8798 [\\/]* | [A-Za-z]:[\\/]*)
8799 re_direlt='/[^/][^/]*/\.\./'
8800 # Canonicalize the path of ld
8801 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8802 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8803 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8804 done
8805 test -z "$LD" && LD="$ac_prog"
8806 ;;
8807 "")
8808 # If it fails, then pretend we aren't using GCC.
8809 ac_prog=ld
8810 ;;
8811 *)
8812 # If it is relative, then search for the first ld in PATH.
8813 with_gnu_ld=unknown
8814 ;;
8815 esac
8816elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8818$as_echo_n "checking for GNU ld... " >&6; }
3841debe 8819else
81ecdfbb
RW
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8821$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 8822fi
81ecdfbb
RW
8823if test "${acl_cv_path_LD+set}" = set; then :
8824 $as_echo_n "(cached) " >&6
3841debe
DJ
8825else
8826 if test -z "$LD"; then
8827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8828 for ac_dir in $PATH; do
8829 test -z "$ac_dir" && ac_dir=.
8830 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8831 acl_cv_path_LD="$ac_dir/$ac_prog"
8832 # Check to see if the program is GNU ld. I'd rather use --version,
8833 # but apparently some GNU ld's only accept -v.
8834 # Break only if it was the GNU/non-GNU ld that we prefer.
8835 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8836 test "$with_gnu_ld" != no && break
8837 else
8838 test "$with_gnu_ld" != yes && break
8839 fi
8840 fi
8841 done
8842 IFS="$ac_save_ifs"
8843else
8844 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8845fi
8846fi
8847
8848LD="$acl_cv_path_LD"
8849if test -n "$LD"; then
81ecdfbb
RW
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8851$as_echo "$LD" >&6; }
3841debe 8852else
81ecdfbb
RW
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
3841debe 8855fi
81ecdfbb
RW
8856test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8858$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8859if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8860 $as_echo_n "(cached) " >&6
3841debe
DJ
8861else
8862 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8863if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8864 acl_cv_prog_gnu_ld=yes
8865else
8866 acl_cv_prog_gnu_ld=no
8867fi
8868fi
81ecdfbb
RW
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8870$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
8871with_gnu_ld=$acl_cv_prog_gnu_ld
8872
8873
8874
81ecdfbb
RW
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8876$as_echo_n "checking for shared library run path origin... " >&6; }
8877if test "${acl_cv_rpath+set}" = set; then :
8878 $as_echo_n "(cached) " >&6
3841debe
DJ
8879else
8880
8881 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8882 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8883 . ./conftest.sh
8884 rm -f ./conftest.sh
8885 acl_cv_rpath=done
8886
8887fi
81ecdfbb
RW
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8889$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
8890 wl="$acl_cv_wl"
8891 libext="$acl_cv_libext"
8892 shlibext="$acl_cv_shlibext"
8893 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8894 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8895 hardcode_direct="$acl_cv_hardcode_direct"
8896 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
8897 # Check whether --enable-rpath was given.
8898if test "${enable_rpath+set}" = set; then :
8899 enableval=$enable_rpath; :
3841debe
DJ
8900else
8901 enable_rpath=yes
81ecdfbb
RW
8902fi
8903
3841debe
DJ
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913 use_additional=yes
8914
8915 acl_save_prefix="$prefix"
8916 prefix="$acl_final_prefix"
8917 acl_save_exec_prefix="$exec_prefix"
8918 exec_prefix="$acl_final_exec_prefix"
8919
8920 eval additional_includedir=\"$includedir\"
8921 eval additional_libdir=\"$libdir\"
8922
8923 exec_prefix="$acl_save_exec_prefix"
8924 prefix="$acl_save_prefix"
8925
8926
81ecdfbb
RW
8927# Check whether --with-libexpat-prefix was given.
8928if test "${with_libexpat_prefix+set}" = set; then :
8929 withval=$with_libexpat_prefix;
3841debe
DJ
8930 if test "X$withval" = "Xno"; then
8931 use_additional=no
8932 else
8933 if test "X$withval" = "X"; then
8934
8935 acl_save_prefix="$prefix"
8936 prefix="$acl_final_prefix"
8937 acl_save_exec_prefix="$exec_prefix"
8938 exec_prefix="$acl_final_exec_prefix"
8939
8940 eval additional_includedir=\"$includedir\"
8941 eval additional_libdir=\"$libdir\"
8942
8943 exec_prefix="$acl_save_exec_prefix"
8944 prefix="$acl_save_prefix"
8945
8946 else
8947 additional_includedir="$withval/include"
8948 additional_libdir="$withval/lib"
8949 fi
8950 fi
8951
81ecdfbb
RW
8952fi
8953
3841debe
DJ
8954 LIBEXPAT=
8955 LTLIBEXPAT=
8956 INCEXPAT=
8957 rpathdirs=
8958 ltrpathdirs=
8959 names_already_handled=
8960 names_next_round='expat '
8961 while test -n "$names_next_round"; do
8962 names_this_round="$names_next_round"
8963 names_next_round=
8964 for name in $names_this_round; do
8965 already_handled=
8966 for n in $names_already_handled; do
8967 if test "$n" = "$name"; then
8968 already_handled=yes
8969 break
8970 fi
8971 done
8972 if test -z "$already_handled"; then
8973 names_already_handled="$names_already_handled $name"
8974 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8975 eval value=\"\$HAVE_LIB$uppername\"
8976 if test -n "$value"; then
8977 if test "$value" = yes; then
8978 eval value=\"\$LIB$uppername\"
8979 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8980 eval value=\"\$LTLIB$uppername\"
8981 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8982 else
8983 :
8984 fi
8985 else
8986 found_dir=
8987 found_la=
8988 found_so=
8989 found_a=
8990 if test $use_additional = yes; then
8991 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8992 found_dir="$additional_libdir"
8993 found_so="$additional_libdir/lib$name.$shlibext"
8994 if test -f "$additional_libdir/lib$name.la"; then
8995 found_la="$additional_libdir/lib$name.la"
8996 fi
8997 else
8998 if test -f "$additional_libdir/lib$name.$libext"; then
8999 found_dir="$additional_libdir"
9000 found_a="$additional_libdir/lib$name.$libext"
9001 if test -f "$additional_libdir/lib$name.la"; then
9002 found_la="$additional_libdir/lib$name.la"
9003 fi
9004 fi
9005 fi
9006 fi
9007 if test "X$found_dir" = "X"; then
9008 for x in $LDFLAGS $LTLIBEXPAT; do
9009
9010 acl_save_prefix="$prefix"
9011 prefix="$acl_final_prefix"
9012 acl_save_exec_prefix="$exec_prefix"
9013 exec_prefix="$acl_final_exec_prefix"
9014 eval x=\"$x\"
9015 exec_prefix="$acl_save_exec_prefix"
9016 prefix="$acl_save_prefix"
9017
9018 case "$x" in
9019 -L*)
9020 dir=`echo "X$x" | sed -e 's/^X-L//'`
9021 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9022 found_dir="$dir"
9023 found_so="$dir/lib$name.$shlibext"
9024 if test -f "$dir/lib$name.la"; then
9025 found_la="$dir/lib$name.la"
9026 fi
9027 else
9028 if test -f "$dir/lib$name.$libext"; then
9029 found_dir="$dir"
9030 found_a="$dir/lib$name.$libext"
9031 if test -f "$dir/lib$name.la"; then
9032 found_la="$dir/lib$name.la"
9033 fi
9034 fi
9035 fi
9036 ;;
9037 esac
9038 if test "X$found_dir" != "X"; then
9039 break
9040 fi
9041 done
9042 fi
9043 if test "X$found_dir" != "X"; then
9044 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9045 if test "X$found_so" != "X"; then
9046 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9047 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9048 else
9049 haveit=
9050 for x in $ltrpathdirs; do
9051 if test "X$x" = "X$found_dir"; then
9052 haveit=yes
9053 break
9054 fi
9055 done
9056 if test -z "$haveit"; then
9057 ltrpathdirs="$ltrpathdirs $found_dir"
9058 fi
9059 if test "$hardcode_direct" = yes; then
9060 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9061 else
9062 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9063 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9064 haveit=
9065 for x in $rpathdirs; do
9066 if test "X$x" = "X$found_dir"; then
9067 haveit=yes
9068 break
9069 fi
9070 done
9071 if test -z "$haveit"; then
9072 rpathdirs="$rpathdirs $found_dir"
9073 fi
9074 else
9075 haveit=
9076 for x in $LDFLAGS $LIBEXPAT; do
9077
9078 acl_save_prefix="$prefix"
9079 prefix="$acl_final_prefix"
9080 acl_save_exec_prefix="$exec_prefix"
9081 exec_prefix="$acl_final_exec_prefix"
9082 eval x=\"$x\"
9083 exec_prefix="$acl_save_exec_prefix"
9084 prefix="$acl_save_prefix"
9085
9086 if test "X$x" = "X-L$found_dir"; then
9087 haveit=yes
9088 break
9089 fi
9090 done
9091 if test -z "$haveit"; then
9092 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9093 fi
9094 if test "$hardcode_minus_L" != no; then
9095 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9096 else
9097 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9098 fi
9099 fi
9100 fi
9101 fi
9102 else
9103 if test "X$found_a" != "X"; then
9104 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9105 else
9106 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9107 fi
9108 fi
9109 additional_includedir=
9110 case "$found_dir" in
9111 */lib | */lib/)
9112 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9113 additional_includedir="$basedir/include"
9114 ;;
9115 esac
9116 if test "X$additional_includedir" != "X"; then
9117 if test "X$additional_includedir" != "X/usr/include"; then
9118 haveit=
9119 if test "X$additional_includedir" = "X/usr/local/include"; then
9120 if test -n "$GCC"; then
9121 case $host_os in
9122 linux*) haveit=yes;;
9123 esac
9124 fi
9125 fi
9126 if test -z "$haveit"; then
9127 for x in $CPPFLAGS $INCEXPAT; do
9128
9129 acl_save_prefix="$prefix"
9130 prefix="$acl_final_prefix"
9131 acl_save_exec_prefix="$exec_prefix"
9132 exec_prefix="$acl_final_exec_prefix"
9133 eval x=\"$x\"
9134 exec_prefix="$acl_save_exec_prefix"
9135 prefix="$acl_save_prefix"
9136
9137 if test "X$x" = "X-I$additional_includedir"; then
9138 haveit=yes
9139 break
9140 fi
9141 done
9142 if test -z "$haveit"; then
9143 if test -d "$additional_includedir"; then
9144 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9145 fi
9146 fi
9147 fi
9148 fi
9149 fi
9150 if test -n "$found_la"; then
9151 save_libdir="$libdir"
9152 case "$found_la" in
9153 */* | *\\*) . "$found_la" ;;
9154 *) . "./$found_la" ;;
9155 esac
9156 libdir="$save_libdir"
9157 for dep in $dependency_libs; do
9158 case "$dep" in
9159 -L*)
9160 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9161 if test "X$additional_libdir" != "X/usr/lib"; then
9162 haveit=
9163 if test "X$additional_libdir" = "X/usr/local/lib"; then
9164 if test -n "$GCC"; then
9165 case $host_os in
9166 linux*) haveit=yes;;
9167 esac
9168 fi
9169 fi
9170 if test -z "$haveit"; then
9171 haveit=
9172 for x in $LDFLAGS $LIBEXPAT; do
9173
9174 acl_save_prefix="$prefix"
9175 prefix="$acl_final_prefix"
9176 acl_save_exec_prefix="$exec_prefix"
9177 exec_prefix="$acl_final_exec_prefix"
9178 eval x=\"$x\"
9179 exec_prefix="$acl_save_exec_prefix"
9180 prefix="$acl_save_prefix"
9181
9182 if test "X$x" = "X-L$additional_libdir"; then
9183 haveit=yes
9184 break
9185 fi
9186 done
9187 if test -z "$haveit"; then
9188 if test -d "$additional_libdir"; then
9189 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9190 fi
9191 fi
9192 haveit=
9193 for x in $LDFLAGS $LTLIBEXPAT; do
9194
9195 acl_save_prefix="$prefix"
9196 prefix="$acl_final_prefix"
9197 acl_save_exec_prefix="$exec_prefix"
9198 exec_prefix="$acl_final_exec_prefix"
9199 eval x=\"$x\"
9200 exec_prefix="$acl_save_exec_prefix"
9201 prefix="$acl_save_prefix"
9202
9203 if test "X$x" = "X-L$additional_libdir"; then
9204 haveit=yes
9205 break
9206 fi
9207 done
9208 if test -z "$haveit"; then
9209 if test -d "$additional_libdir"; then
9210 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9211 fi
9212 fi
9213 fi
9214 fi
9215 ;;
9216 -R*)
9217 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9218 if test "$enable_rpath" != no; then
9219 haveit=
9220 for x in $rpathdirs; do
9221 if test "X$x" = "X$dir"; then
9222 haveit=yes
9223 break
9224 fi
9225 done
9226 if test -z "$haveit"; then
9227 rpathdirs="$rpathdirs $dir"
9228 fi
9229 haveit=
9230 for x in $ltrpathdirs; do
9231 if test "X$x" = "X$dir"; then
9232 haveit=yes
9233 break
9234 fi
9235 done
9236 if test -z "$haveit"; then
9237 ltrpathdirs="$ltrpathdirs $dir"
9238 fi
9239 fi
9240 ;;
9241 -l*)
9242 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9243 ;;
9244 *.la)
9245 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9246 ;;
9247 *)
9248 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9249 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9250 ;;
81ecdfbb
RW
9251 esac
9252 done
9253 fi
9254 else
9255 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9256 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9257 fi
9258 fi
9259 fi
9260 done
9261 done
9262 if test "X$rpathdirs" != "X"; then
9263 if test -n "$hardcode_libdir_separator"; then
9264 alldirs=
9265 for found_dir in $rpathdirs; do
9266 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9267 done
9268 acl_save_libdir="$libdir"
9269 libdir="$alldirs"
9270 eval flag=\"$hardcode_libdir_flag_spec\"
9271 libdir="$acl_save_libdir"
9272 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9273 else
9274 for found_dir in $rpathdirs; do
9275 acl_save_libdir="$libdir"
9276 libdir="$found_dir"
9277 eval flag=\"$hardcode_libdir_flag_spec\"
9278 libdir="$acl_save_libdir"
9279 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9280 done
9281 fi
9282 fi
9283 if test "X$ltrpathdirs" != "X"; then
9284 for found_dir in $ltrpathdirs; do
9285 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9286 done
9287 fi
a9322a30
TT
9288
9289
81ecdfbb 9290 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9291
81ecdfbb
RW
9292 for element in $INCEXPAT; do
9293 haveit=
9294 for x in $CPPFLAGS; do
a9322a30 9295
81ecdfbb
RW
9296 acl_save_prefix="$prefix"
9297 prefix="$acl_final_prefix"
9298 acl_save_exec_prefix="$exec_prefix"
9299 exec_prefix="$acl_final_exec_prefix"
9300 eval x=\"$x\"
9301 exec_prefix="$acl_save_exec_prefix"
9302 prefix="$acl_save_prefix"
a8111142 9303
81ecdfbb
RW
9304 if test "X$x" = "X$element"; then
9305 haveit=yes
9306 break
9307 fi
9308 done
9309 if test -z "$haveit"; then
9310 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9311 fi
9312 done
a9322a30
TT
9313
9314
81ecdfbb
RW
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9316$as_echo_n "checking for libexpat... " >&6; }
9317if test "${ac_cv_libexpat+set}" = set; then :
9318 $as_echo_n "(cached) " >&6
bec39cab 9319else
bec39cab 9320
81ecdfbb
RW
9321 ac_save_LIBS="$LIBS"
9322 LIBS="$LIBS $LIBEXPAT"
9323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9324/* end confdefs.h. */
81ecdfbb
RW
9325#include "expat.h"
9326int
9327main ()
9328{
9329XML_Parser p = XML_ParserCreate (0);
9330 ;
9331 return 0;
9332}
bec39cab 9333_ACEOF
81ecdfbb
RW
9334if ac_fn_c_try_link "$LINENO"; then :
9335 ac_cv_libexpat=yes
c906108c 9336else
81ecdfbb 9337 ac_cv_libexpat=no
bec39cab 9338fi
81ecdfbb
RW
9339rm -f core conftest.err conftest.$ac_objext \
9340 conftest$ac_exeext conftest.$ac_ext
9341 LIBS="$ac_save_LIBS"
c906108c 9342
95ca63c4 9343fi
81ecdfbb
RW
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9345$as_echo "$ac_cv_libexpat" >&6; }
9346 if test "$ac_cv_libexpat" = yes; then
9347 HAVE_LIBEXPAT=yes
bec39cab 9348
81ecdfbb 9349$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9350
81ecdfbb
RW
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9352$as_echo_n "checking how to link with libexpat... " >&6; }
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9354$as_echo "$LIBEXPAT" >&6; }
9355 else
9356 HAVE_LIBEXPAT=no
9357 CPPFLAGS="$ac_save_CPPFLAGS"
9358 LIBEXPAT=
9359 LTLIBEXPAT=
9360 fi
95ca63c4
CF
9361
9362
9363
7cb9022a
MK
9364
9365
bec39cab 9366
81ecdfbb
RW
9367 if test "$HAVE_LIBEXPAT" != yes; then
9368 if test "$with_expat" = yes; then
9369 as_fn_error "expat is missing or unusable" "$LINENO" 5
9370 else
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9372$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9373 fi
9374 else
9375 save_LIBS=$LIBS
9376 LIBS="$LIBS $LIBEXPAT"
9377 for ac_func in XML_StopParser
9378do :
9379 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9380if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9381 cat >>confdefs.h <<_ACEOF
81ecdfbb 9382#define HAVE_XML_STOPPARSER 1
bec39cab 9383_ACEOF
95ca63c4 9384
bec39cab 9385fi
bec39cab 9386done
95ca63c4 9387
81ecdfbb
RW
9388 LIBS=$save_LIBS
9389 fi
a9322a30
TT
9390fi
9391
a9322a30 9392
a9322a30
TT
9393
9394
81ecdfbb
RW
9395# Check whether --with-python was given.
9396if test "${with_python+set}" = set; then :
9397 withval=$with_python;
bec39cab 9398else
81ecdfbb 9399 with_python=auto
bec39cab 9400fi
bec39cab 9401
81ecdfbb
RW
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9403$as_echo_n "checking whether to use python... " >&6; }
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9405$as_echo "$with_python" >&6; }
9a156167 9406
81ecdfbb
RW
9407if test "${with_python}" = no; then
9408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9409$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9410 have_libpython=no
bec39cab 9411else
81ecdfbb
RW
9412 case "${with_python}" in
9413 yes | auto)
9414 # Leave as empty, use defaults.
9415 python_includes=
9416 python_libs=
9417 ;;
9418 /*)
9419 python_includes="-I${with_python}/include"
9420 python_libs="-L${with_python}/lib"
9421 ;;
9422 *)
9423 as_fn_error "invalid value for --with-python" "$LINENO" 5
9424 ;;
9425 esac
9426
9427 save_CPPFLAGS=$CPPFLAGS
9428 CPPFLAGS="$CPPFLAGS ${python_includes}"
9429 save_LIBS=$LIBS
9430 LIBS="$LIBS ${python_libs}"
9431 have_libpython=no
9432 if test "${have_libpython}" = no; then
bec39cab 9433
81ecdfbb 9434 version=python2.6
bec39cab 9435
81ecdfbb
RW
9436
9437 HAVE_LIBPYTHON2_6=no
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9439$as_echo_n "checking for ${version}... " >&6; }
9440 save_LIBS=$LIBS
9441 LIBS="$LIBS -l${version}"
9442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9443/* end confdefs.h. */
81ecdfbb
RW
9444#include "${version}/Python.h"
9445int
9446main ()
9447{
9448Py_Initialize ();
9449 ;
9450 return 0;
9451}
bec39cab 9452_ACEOF
81ecdfbb
RW
9453if ac_fn_c_try_link "$LINENO"; then :
9454 HAVE_LIBPYTHON2_6=yes
9455 have_libpython=yes
bec39cab 9456else
81ecdfbb 9457 LIBS=$save_LIBS
9a156167 9458fi
81ecdfbb
RW
9459rm -f core conftest.err conftest.$ac_objext \
9460 conftest$ac_exeext conftest.$ac_ext
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_6" >&5
9462$as_echo "$HAVE_LIBPYTHON2_6" >&6; }
9a156167 9463
81ecdfbb 9464 if test "${HAVE_LIBPYTHON2_6}" = yes; then
9a156167 9465
81ecdfbb 9466$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9a156167 9467
81ecdfbb
RW
9468 fi
9469 fi
9470 if test ${have_libpython} = no; then
9a156167 9471
81ecdfbb 9472 version=python2.5
9a156167 9473
9a156167 9474
81ecdfbb
RW
9475 HAVE_LIBPYTHON2_5=no
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9477$as_echo_n "checking for ${version}... " >&6; }
9478 save_LIBS=$LIBS
9479 LIBS="$LIBS -l${version}"
9480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9481/* end confdefs.h. */
81ecdfbb
RW
9482#include "${version}/Python.h"
9483int
9484main ()
9485{
9486Py_Initialize ();
9487 ;
9488 return 0;
9489}
436868fb 9490_ACEOF
81ecdfbb
RW
9491if ac_fn_c_try_link "$LINENO"; then :
9492 HAVE_LIBPYTHON2_5=yes
9493 have_libpython=yes
436868fb 9494else
81ecdfbb 9495 LIBS=$save_LIBS
436868fb 9496fi
81ecdfbb
RW
9497rm -f core conftest.err conftest.$ac_objext \
9498 conftest$ac_exeext conftest.$ac_ext
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_5" >&5
9500$as_echo "$HAVE_LIBPYTHON2_5" >&6; }
436868fb 9501
81ecdfbb 9502 if test "${HAVE_LIBPYTHON2_5}" = yes; then
a9322a30 9503
81ecdfbb 9504$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
a9322a30 9505
81ecdfbb
RW
9506 fi
9507 fi
9508 if test ${have_libpython} = no; then
a9322a30 9509
81ecdfbb 9510 version=python2.4
a9322a30 9511
81ecdfbb
RW
9512
9513 HAVE_LIBPYTHON2_4=no
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9515$as_echo_n "checking for ${version}... " >&6; }
9516 save_LIBS=$LIBS
9517 LIBS="$LIBS -l${version}"
9518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9519/* end confdefs.h. */
81ecdfbb 9520#include "${version}/Python.h"
a9322a30
TT
9521int
9522main ()
9523{
81ecdfbb 9524Py_Initialize ();
a9322a30
TT
9525 ;
9526 return 0;
9527}
436868fb 9528_ACEOF
81ecdfbb
RW
9529if ac_fn_c_try_link "$LINENO"; then :
9530 HAVE_LIBPYTHON2_4=yes
9531 have_libpython=yes
436868fb 9532else
81ecdfbb 9533 LIBS=$save_LIBS
436868fb 9534fi
81ecdfbb
RW
9535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_4" >&5
9538$as_echo "$HAVE_LIBPYTHON2_4" >&6; }
9539
9540 if test "${HAVE_LIBPYTHON2_4}" = yes; then
9541
9542$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9543
9544 fi
9545 fi
9546 if test ${have_libpython} = no; then
9547 case "${with_python}" in
9548 yes)
9549 as_fn_error "python is missing or unusable" "$LINENO" 5
9550 ;;
9551 auto)
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9553$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9554 ;;
9555 *)
9556 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9557 ;;
9558 esac
9559 CPPFLAGS=$save_CPPFLAGS
9560 LIBS=$save_LIBS
9561 fi
436868fb 9562fi
436868fb 9563
81ecdfbb 9564if test "${have_libpython}" = yes; then
436868fb 9565
81ecdfbb 9566$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9567
81ecdfbb
RW
9568 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9569 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9570 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
9571 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9572
81ecdfbb
RW
9573 # Flags needed to compile Python code (taken from python-config --cflags).
9574 # We cannot call python-config directly because it will output whatever was
9575 # used when compiling the Python interpreter itself, including flags which
9576 # would make the python-related objects be compiled differently from the
9577 # rest of GDB (e.g., -O2 and -fPIC).
9578 if test "${GCC}" = yes; then
9579 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9580 fi
436868fb 9581
81ecdfbb
RW
9582 if test "x${tentative_python_cflags}" != x; then
9583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9584$as_echo_n "checking compiler flags for python code... " >&6; }
9585 for flag in ${tentative_python_cflags}; do
9586 # Check that the compiler accepts it
9587 saved_CFLAGS="$CFLAGS"
9588 CFLAGS="$CFLAGS $flag"
9589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9590/* end confdefs.h. */
81ecdfbb 9591
a9322a30
TT
9592int
9593main ()
9594{
a9322a30
TT
9595
9596 ;
9597 return 0;
9598}
bec39cab 9599_ACEOF
81ecdfbb
RW
9600if ac_fn_c_try_compile "$LINENO"; then :
9601 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9602fi
81ecdfbb
RW
9603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9604 CFLAGS="$saved_CFLAGS"
9605 done
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9607$as_echo "${PYTHON_CFLAGS}" >&6; }
9608 fi
9609else
9610 # Even if Python support is not compiled in, we need to have these files
9611 # included in order to recognize the GDB command "python".
2c9e3c69
JB
9612 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o"
9613 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c python/py-prettyprint.c"
a9322a30 9614fi
9a156167 9615
9a156167 9616
81ecdfbb
RW
9617# ------------------------- #
9618# Checks for header files. #
9619# ------------------------- #
c890192f 9620
81ecdfbb
RW
9621ac_header_dirent=no
9622for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9623 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9625$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9626if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
9627 $as_echo_n "(cached) " >&6
bec39cab 9628else
81ecdfbb 9629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9630/* end confdefs.h. */
81ecdfbb
RW
9631#include <sys/types.h>
9632#include <$ac_hdr>
9633
a9322a30
TT
9634int
9635main ()
9636{
81ecdfbb
RW
9637if ((DIR *) 0)
9638return 0;
a9322a30
TT
9639 ;
9640 return 0;
9641}
bec39cab 9642_ACEOF
81ecdfbb
RW
9643if ac_fn_c_try_compile "$LINENO"; then :
9644 eval "$as_ac_Header=yes"
bec39cab 9645else
81ecdfbb 9646 eval "$as_ac_Header=no"
bec39cab 9647fi
81ecdfbb 9648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9649fi
81ecdfbb
RW
9650eval ac_res=\$$as_ac_Header
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9652$as_echo "$ac_res" >&6; }
9653eval as_val=\$$as_ac_Header
9654 if test "x$as_val" = x""yes; then :
9655 cat >>confdefs.h <<_ACEOF
9656#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 9657_ACEOF
bec39cab 9658
81ecdfbb
RW
9659ac_header_dirent=$ac_hdr; break
9660fi
bec39cab 9661
81ecdfbb
RW
9662done
9663# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9664if test $ac_header_dirent = dirent.h; then
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9666$as_echo_n "checking for library containing opendir... " >&6; }
9667if test "${ac_cv_search_opendir+set}" = set; then :
9668 $as_echo_n "(cached) " >&6
c890192f 9669else
81ecdfbb
RW
9670 ac_func_search_save_LIBS=$LIBS
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9672/* end confdefs.h. */
9673
9674/* Override any GCC internal prototype to avoid an error.
9675 Use char because int might match the return type of a GCC
9676 builtin and then its argument prototype would still apply. */
9677#ifdef __cplusplus
9678extern "C"
9679#endif
9680char opendir ();
9681int
9682main ()
9683{
9684return opendir ();
9685 ;
9686 return 0;
9687}
bec39cab 9688_ACEOF
81ecdfbb
RW
9689for ac_lib in '' dir; do
9690 if test -z "$ac_lib"; then
9691 ac_res="none required"
9692 else
9693 ac_res=-l$ac_lib
9694 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9695 fi
9696 if ac_fn_c_try_link "$LINENO"; then :
9697 ac_cv_search_opendir=$ac_res
9698fi
9699rm -f core conftest.err conftest.$ac_objext \
9700 conftest$ac_exeext
9701 if test "${ac_cv_search_opendir+set}" = set; then :
9702 break
9703fi
9704done
9705if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 9706
81ecdfbb
RW
9707else
9708 ac_cv_search_opendir=no
9709fi
9710rm conftest.$ac_ext
9711LIBS=$ac_func_search_save_LIBS
9712fi
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9714$as_echo "$ac_cv_search_opendir" >&6; }
9715ac_res=$ac_cv_search_opendir
9716if test "$ac_res" != no; then :
9717 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9718
bec39cab 9719fi
81ecdfbb 9720
bec39cab 9721else
81ecdfbb
RW
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9723$as_echo_n "checking for library containing opendir... " >&6; }
9724if test "${ac_cv_search_opendir+set}" = set; then :
9725 $as_echo_n "(cached) " >&6
9726else
9727 ac_func_search_save_LIBS=$LIBS
9728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9729/* end confdefs.h. */
81ecdfbb
RW
9730
9731/* Override any GCC internal prototype to avoid an error.
9732 Use char because int might match the return type of a GCC
9733 builtin and then its argument prototype would still apply. */
9734#ifdef __cplusplus
9735extern "C"
9736#endif
9737char opendir ();
a9322a30
TT
9738int
9739main ()
9740{
81ecdfbb 9741return opendir ();
a9322a30
TT
9742 ;
9743 return 0;
9744}
bec39cab 9745_ACEOF
81ecdfbb
RW
9746for ac_lib in '' x; do
9747 if test -z "$ac_lib"; then
9748 ac_res="none required"
9749 else
9750 ac_res=-l$ac_lib
9751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9752 fi
9753 if ac_fn_c_try_link "$LINENO"; then :
9754 ac_cv_search_opendir=$ac_res
9755fi
9756rm -f core conftest.err conftest.$ac_objext \
9757 conftest$ac_exeext
9758 if test "${ac_cv_search_opendir+set}" = set; then :
9759 break
9760fi
9761done
9762if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 9763
81ecdfbb
RW
9764else
9765 ac_cv_search_opendir=no
bec39cab 9766fi
81ecdfbb
RW
9767rm conftest.$ac_ext
9768LIBS=$ac_func_search_save_LIBS
a9322a30 9769fi
81ecdfbb
RW
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9771$as_echo "$ac_cv_search_opendir" >&6; }
9772ac_res=$ac_cv_search_opendir
9773if test "$ac_res" != no; then :
9774 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9775
81ecdfbb 9776fi
bec39cab 9777
81ecdfbb 9778fi
bec39cab 9779
81ecdfbb
RW
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9781$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9782if test "${ac_cv_header_stat_broken+set}" = set; then :
9783 $as_echo_n "(cached) " >&6
9a156167 9784else
81ecdfbb
RW
9785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786/* end confdefs.h. */
9787#include <sys/types.h>
9788#include <sys/stat.h>
9789
9790#if defined S_ISBLK && defined S_IFDIR
9791extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9792#endif
9793
9794#if defined S_ISBLK && defined S_IFCHR
9795extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9796#endif
9797
9798#if defined S_ISLNK && defined S_IFREG
9799extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9800#endif
9801
9802#if defined S_ISSOCK && defined S_IFREG
9803extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9804#endif
9805
bec39cab 9806_ACEOF
81ecdfbb
RW
9807if ac_fn_c_try_compile "$LINENO"; then :
9808 ac_cv_header_stat_broken=no
9809else
9810 ac_cv_header_stat_broken=yes
9811fi
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9813fi
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9815$as_echo "$ac_cv_header_stat_broken" >&6; }
9816if test $ac_cv_header_stat_broken = yes; then
9a156167 9817
81ecdfbb 9818$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 9819
bec39cab 9820fi
81ecdfbb
RW
9821
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9823$as_echo_n "checking for ANSI C header files... " >&6; }
9824if test "${ac_cv_header_stdc+set}" = set; then :
9825 $as_echo_n "(cached) " >&6
bec39cab 9826else
81ecdfbb 9827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9828/* end confdefs.h. */
81ecdfbb
RW
9829#include <stdlib.h>
9830#include <stdarg.h>
9831#include <string.h>
9832#include <float.h>
9833
a9322a30
TT
9834int
9835main ()
9836{
a9322a30
TT
9837
9838 ;
9839 return 0;
9840}
bec39cab 9841_ACEOF
81ecdfbb
RW
9842if ac_fn_c_try_compile "$LINENO"; then :
9843 ac_cv_header_stdc=yes
bec39cab 9844else
81ecdfbb 9845 ac_cv_header_stdc=no
a9322a30 9846fi
81ecdfbb 9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9848
81ecdfbb
RW
9849if test $ac_cv_header_stdc = yes; then
9850 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852/* end confdefs.h. */
9853#include <string.h>
bec39cab 9854
81ecdfbb
RW
9855_ACEOF
9856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9857 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9858
bec39cab 9859else
81ecdfbb
RW
9860 ac_cv_header_stdc=no
9861fi
9862rm -f conftest*
9863
9864fi
9865
9866if test $ac_cv_header_stdc = yes; then
9867 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9869/* end confdefs.h. */
9870#include <stdlib.h>
9871
bec39cab 9872_ACEOF
81ecdfbb
RW
9873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9874 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9875
81ecdfbb
RW
9876else
9877 ac_cv_header_stdc=no
9878fi
9879rm -f conftest*
bec39cab 9880
bec39cab 9881fi
81ecdfbb
RW
9882
9883if test $ac_cv_header_stdc = yes; then
9884 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9885 if test "$cross_compiling" = yes; then :
9886 :
bec39cab 9887else
81ecdfbb 9888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9889/* end confdefs.h. */
81ecdfbb
RW
9890#include <ctype.h>
9891#include <stdlib.h>
9892#if ((' ' & 0x0FF) == 0x020)
9893# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9894# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9895#else
9896# define ISLOWER(c) \
9897 (('a' <= (c) && (c) <= 'i') \
9898 || ('j' <= (c) && (c) <= 'r') \
9899 || ('s' <= (c) && (c) <= 'z'))
9900# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9901#endif
9902
9903#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9904int
9905main ()
9906{
81ecdfbb
RW
9907 int i;
9908 for (i = 0; i < 256; i++)
9909 if (XOR (islower (i), ISLOWER (i))
9910 || toupper (i) != TOUPPER (i))
9911 return 2;
a9322a30
TT
9912 return 0;
9913}
bec39cab 9914_ACEOF
81ecdfbb
RW
9915if ac_fn_c_try_run "$LINENO"; then :
9916
bec39cab 9917else
81ecdfbb
RW
9918 ac_cv_header_stdc=no
9919fi
9920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9921 conftest.$ac_objext conftest.beam conftest.$ac_ext
9922fi
bec39cab 9923
bec39cab 9924fi
a9322a30 9925fi
81ecdfbb
RW
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9927$as_echo "$ac_cv_header_stdc" >&6; }
9928if test $ac_cv_header_stdc = yes; then
bec39cab 9929
81ecdfbb 9930$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9931
81ecdfbb 9932fi
bec39cab 9933
81ecdfbb
RW
9934# elf_hp.h is for HP/UX 64-bit shared library support.
9935# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
9936# unconditionally, so what's the point in checking these?
9937for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9938 thread_db.h gnu/libc-version.h signal.h stddef.h \
9939 stdlib.h string.h memory.h strings.h sys/fault.h \
9940 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9941 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9942 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9943 sys/types.h sys/wait.h wait.h termios.h termio.h \
9944 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
9945do :
9946 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9947ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9948eval as_val=\$$as_ac_Header
9949 if test "x$as_val" = x""yes; then :
bec39cab 9950 cat >>confdefs.h <<_ACEOF
81ecdfbb 9951#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9952_ACEOF
c906108c 9953
bec39cab 9954fi
81ecdfbb
RW
9955
9956done
9957
9958for ac_header in link.h
9959do :
9960 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
9961# include <sys/types.h>
9962#endif
9963#if HAVE_NLIST_H
9964# include <nlist.h>
a9322a30
TT
9965#endif
9966
81ecdfbb
RW
9967"
9968if test "x$ac_cv_header_link_h" = x""yes; then :
9969 cat >>confdefs.h <<_ACEOF
9970#define HAVE_LINK_H 1
bec39cab 9971_ACEOF
bec39cab 9972
a9322a30 9973fi
bec39cab 9974
81ecdfbb 9975done
c906108c 9976
81ecdfbb
RW
9977for ac_header in sys/proc.h
9978do :
9979 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9980# include <sys/param.h>
9981#endif
c906108c 9982
81ecdfbb
RW
9983"
9984if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9985 cat >>confdefs.h <<_ACEOF
81ecdfbb 9986#define HAVE_SYS_PROC_H 1
bec39cab 9987_ACEOF
5ee754fc 9988
bec39cab 9989fi
81ecdfbb
RW
9990
9991done
9992
9993for ac_header in sys/user.h
9994do :
9995 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9996# include <sys/param.h>
a9322a30
TT
9997#endif
9998
81ecdfbb
RW
9999"
10000if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10001 cat >>confdefs.h <<_ACEOF
10002#define HAVE_SYS_USER_H 1
bec39cab 10003_ACEOF
bec39cab 10004
a9322a30 10005fi
bec39cab 10006
81ecdfbb 10007done
5ee754fc 10008
5ee754fc 10009
81ecdfbb
RW
10010# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10011# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10012# think that we don't have <curses.h> if we're using GCC.
10013case $host_os in
10014 solaris2.[789])
10015 if test "$GCC" = yes; then
10016
10017$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10018
10019 fi ;;
10020esac
10021for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10022do :
10023 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10024ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10025eval as_val=\$$as_ac_Header
10026 if test "x$as_val" = x""yes; then :
bec39cab 10027 cat >>confdefs.h <<_ACEOF
81ecdfbb 10028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10029_ACEOF
5ee754fc
MK
10030
10031fi
10032
81ecdfbb 10033done
bec39cab 10034
81ecdfbb
RW
10035for ac_header in term.h
10036do :
10037 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10038# include <curses.h>
10039#endif
bec39cab 10040
81ecdfbb
RW
10041"
10042if test "x$ac_cv_header_term_h" = x""yes; then :
10043 cat >>confdefs.h <<_ACEOF
10044#define HAVE_TERM_H 1
a8111142 10045_ACEOF
a8111142 10046
a8111142 10047fi
a8111142 10048
81ecdfbb 10049done
a8111142
TT
10050
10051
81ecdfbb
RW
10052# ------------------------- #
10053# Checks for declarations. #
10054# ------------------------- #
a9322a30 10055
81ecdfbb
RW
10056ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10057if test "x$ac_cv_have_decl_free" = x""yes; then :
10058 ac_have_decl=1
bec39cab 10059else
81ecdfbb
RW
10060 ac_have_decl=0
10061fi
10062
10063cat >>confdefs.h <<_ACEOF
10064#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10065_ACEOF
81ecdfbb
RW
10066ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10067if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10068 ac_have_decl=1
10069else
10070 ac_have_decl=0
10071fi
10072
10073cat >>confdefs.h <<_ACEOF
10074#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10075_ACEOF
81ecdfbb
RW
10076ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10077if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10078 ac_have_decl=1
bec39cab 10079else
81ecdfbb
RW
10080 ac_have_decl=0
10081fi
bec39cab 10082
81ecdfbb
RW
10083cat >>confdefs.h <<_ACEOF
10084#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10085_ACEOF
81ecdfbb
RW
10086ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10087if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10088 ac_have_decl=1
10089else
10090 ac_have_decl=0
10091fi
10092
10093cat >>confdefs.h <<_ACEOF
10094#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 10095_ACEOF
81ecdfbb
RW
10096ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10097if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10098 ac_have_decl=1
bec39cab 10099else
81ecdfbb
RW
10100 ac_have_decl=0
10101fi
5ee754fc 10102
81ecdfbb
RW
10103cat >>confdefs.h <<_ACEOF
10104#define HAVE_DECL_STRSTR $ac_have_decl
10105_ACEOF
10106ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
10107if test "x$ac_cv_have_decl_getopt" = x""yes; then :
10108 ac_have_decl=1
10109else
10110 ac_have_decl=0
5ee754fc 10111fi
81ecdfbb
RW
10112
10113cat >>confdefs.h <<_ACEOF
10114#define HAVE_DECL_GETOPT $ac_have_decl
10115_ACEOF
10116ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10117if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10118 ac_have_decl=1
10119else
10120 ac_have_decl=0
5ee754fc 10121fi
81ecdfbb
RW
10122
10123cat >>confdefs.h <<_ACEOF
10124#define HAVE_DECL_SNPRINTF $ac_have_decl
10125_ACEOF
10126ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10127if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10128 ac_have_decl=1
10129else
10130 ac_have_decl=0
5ee754fc
MK
10131fi
10132
a9322a30 10133cat >>confdefs.h <<_ACEOF
81ecdfbb 10134#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 10135_ACEOF
5ee754fc 10136
5ee754fc 10137
81ecdfbb
RW
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10139$as_echo_n "checking for LC_MESSAGES... " >&6; }
10140if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10141 $as_echo_n "(cached) " >&6
bec39cab 10142else
81ecdfbb 10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10144/* end confdefs.h. */
81ecdfbb 10145#include <locale.h>
a9322a30
TT
10146int
10147main ()
10148{
81ecdfbb 10149return LC_MESSAGES
a9322a30
TT
10150 ;
10151 return 0;
10152}
bec39cab 10153_ACEOF
81ecdfbb
RW
10154if ac_fn_c_try_link "$LINENO"; then :
10155 am_cv_val_LC_MESSAGES=yes
bec39cab 10156else
81ecdfbb
RW
10157 am_cv_val_LC_MESSAGES=no
10158fi
10159rm -f core conftest.err conftest.$ac_objext \
10160 conftest$ac_exeext conftest.$ac_ext
10161fi
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10163$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10164 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 10165
81ecdfbb
RW
10166$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
10167
10168 fi
10169
10170
10171# ----------------------- #
10172# Checks for structures. #
10173# ----------------------- #
10174
10175ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10176if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
10177
10178cat >>confdefs.h <<_ACEOF
10179#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 10180_ACEOF
7eb368b3 10181
81ecdfbb 10182
7eb368b3 10183fi
81ecdfbb
RW
10184ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10185if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 10186
a9322a30
TT
10187cat >>confdefs.h <<_ACEOF
10188#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
10189_ACEOF
10190
a9322a30 10191
7eb368b3
NR
10192fi
10193
7eb368b3 10194
a9322a30
TT
10195# ------------------ #
10196# Checks for types. #
10197# ------------------ #
7eb368b3 10198
81ecdfbb
RW
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10200$as_echo_n "checking return type of signal handlers... " >&6; }
10201if test "${ac_cv_type_signal+set}" = set; then :
10202 $as_echo_n "(cached) " >&6
bec39cab 10203else
81ecdfbb 10204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10205/* end confdefs.h. */
a9322a30
TT
10206#include <sys/types.h>
10207#include <signal.h>
7cb9022a 10208
a9322a30
TT
10209int
10210main ()
10211{
81ecdfbb 10212return *(signal (0, 0)) (0) == 1;
a9322a30
TT
10213 ;
10214 return 0;
10215}
bec39cab 10216_ACEOF
81ecdfbb
RW
10217if ac_fn_c_try_compile "$LINENO"; then :
10218 ac_cv_type_signal=int
bec39cab 10219else
81ecdfbb 10220 ac_cv_type_signal=void
bec39cab 10221fi
81ecdfbb 10222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10223fi
81ecdfbb
RW
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10225$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 10226
a9322a30
TT
10227cat >>confdefs.h <<_ACEOF
10228#define RETSIGTYPE $ac_cv_type_signal
10229_ACEOF
5ee754fc 10230
bec39cab 10231
81ecdfbb 10232ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
10233#include <sys/socket.h>
10234
81ecdfbb
RW
10235"
10236if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 10237
a9322a30
TT
10238cat >>confdefs.h <<_ACEOF
10239#define HAVE_SOCKLEN_T 1
10240_ACEOF
10241
10242
10243fi
10244
10245
10246# ------------------------------------- #
10247# Checks for compiler characteristics. #
10248# ------------------------------------- #
10249
81ecdfbb
RW
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10251$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10252if test "${ac_cv_c_const+set}" = set; then :
10253 $as_echo_n "(cached) " >&6
a9322a30 10254else
81ecdfbb 10255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10256/* end confdefs.h. */
a9322a30
TT
10257
10258int
10259main ()
10260{
10261/* FIXME: Include the comments suggested by Paul. */
10262#ifndef __cplusplus
10263 /* Ultrix mips cc rejects this. */
10264 typedef int charset[2];
81ecdfbb 10265 const charset cs;
a9322a30 10266 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
10267 char const *const *pcpcc;
10268 char **ppc;
a9322a30
TT
10269 /* NEC SVR4.0.2 mips cc rejects this. */
10270 struct point {int x, y;};
10271 static struct point const zero = {0,0};
10272 /* AIX XL C 1.02.0.0 rejects this.
10273 It does not let you subtract one const X* pointer from another in
10274 an arm of an if-expression whose if-part is not a constant
10275 expression */
10276 const char *g = "string";
81ecdfbb 10277 pcpcc = &g + (g ? g-g : 0);
a9322a30 10278 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
10279 ++pcpcc;
10280 ppc = (char**) pcpcc;
10281 pcpcc = (char const *const *) ppc;
a9322a30
TT
10282 { /* SCO 3.2v4 cc rejects this. */
10283 char *t;
10284 char const *s = 0 ? (char *) 0 : (char const *) 0;
10285
10286 *t++ = 0;
81ecdfbb 10287 if (s) return 0;
a9322a30
TT
10288 }
10289 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10290 int x[] = {25, 17};
10291 const int *foo = &x[0];
10292 ++foo;
10293 }
10294 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10295 typedef const int *iptr;
10296 iptr p = 0;
10297 ++p;
10298 }
10299 { /* AIX XL C 1.02.0.0 rejects this saying
10300 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10301 struct s { int j; const int *ap[3]; };
10302 struct s *b; b->j = 5;
10303 }
10304 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10305 const int foo = 10;
81ecdfbb 10306 if (!foo) return 0;
a9322a30 10307 }
81ecdfbb 10308 return !cs[0] && !zero.x;
a9322a30
TT
10309#endif
10310
10311 ;
10312 return 0;
10313}
bec39cab 10314_ACEOF
81ecdfbb 10315if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10316 ac_cv_c_const=yes
5ee754fc 10317else
81ecdfbb 10318 ac_cv_c_const=no
5ee754fc 10319fi
81ecdfbb 10320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10321fi
81ecdfbb
RW
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10323$as_echo "$ac_cv_c_const" >&6; }
a9322a30 10324if test $ac_cv_c_const = no; then
bec39cab 10325
81ecdfbb 10326$as_echo "#define const /**/" >>confdefs.h
bec39cab 10327
5ee754fc 10328fi
bec39cab 10329
81ecdfbb
RW
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10331$as_echo_n "checking for inline... " >&6; }
10332if test "${ac_cv_c_inline+set}" = set; then :
10333 $as_echo_n "(cached) " >&6
bec39cab 10334else
a9322a30
TT
10335 ac_cv_c_inline=no
10336for ac_kw in inline __inline__ __inline; do
81ecdfbb 10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10338/* end confdefs.h. */
a9322a30
TT
10339#ifndef __cplusplus
10340typedef int foo_t;
10341static $ac_kw foo_t static_foo () {return 0; }
10342$ac_kw foo_t foo () {return 0; }
10343#endif
10344
bec39cab 10345_ACEOF
81ecdfbb
RW
10346if ac_fn_c_try_compile "$LINENO"; then :
10347 ac_cv_c_inline=$ac_kw
bec39cab 10348fi
81ecdfbb
RW
10349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10350 test "$ac_cv_c_inline" != no && break
a9322a30 10351done
bec39cab 10352
5ee754fc 10353fi
81ecdfbb
RW
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10355$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10356
a9322a30
TT
10357case $ac_cv_c_inline in
10358 inline | yes) ;;
10359 *)
10360 case $ac_cv_c_inline in
10361 no) ac_val=;;
10362 *) ac_val=$ac_cv_c_inline;;
10363 esac
10364 cat >>confdefs.h <<_ACEOF
10365#ifndef __cplusplus
10366#define inline $ac_val
10367#endif
10368_ACEOF
bec39cab
AC
10369 ;;
10370esac
bec39cab 10371
81ecdfbb
RW
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10373$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10374if test "${ac_cv_c_bigendian+set}" = set; then :
10375 $as_echo_n "(cached) " >&6
bec39cab 10376else
81ecdfbb
RW
10377 ac_cv_c_bigendian=unknown
10378 # See if we're dealing with a universal compiler.
10379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10380/* end confdefs.h. */
10381#ifndef __APPLE_CC__
10382 not a universal capable compiler
10383 #endif
10384 typedef int dummy;
10385
10386_ACEOF
10387if ac_fn_c_try_compile "$LINENO"; then :
10388
10389 # Check for potential -arch flags. It is not universal unless
10390 # there are at least two -arch flags with different values.
10391 ac_arch=
10392 ac_prev=
10393 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10394 if test -n "$ac_prev"; then
10395 case $ac_word in
10396 i?86 | x86_64 | ppc | ppc64)
10397 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10398 ac_arch=$ac_word
10399 else
10400 ac_cv_c_bigendian=universal
10401 break
10402 fi
10403 ;;
10404 esac
10405 ac_prev=
10406 elif test "x$ac_word" = "x-arch"; then
10407 ac_prev=arch
10408 fi
10409 done
10410fi
10411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10412 if test $ac_cv_c_bigendian = unknown; then
10413 # See if sys/param.h defines the BYTE_ORDER macro.
10414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10415/* end confdefs.h. */
a9322a30 10416#include <sys/types.h>
81ecdfbb 10417 #include <sys/param.h>
a9322a30
TT
10418
10419int
10420main ()
10421{
81ecdfbb
RW
10422#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10423 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10424 && LITTLE_ENDIAN)
10425 bogus endian macros
10426 #endif
a9322a30
TT
10427
10428 ;
10429 return 0;
10430}
bec39cab 10431_ACEOF
81ecdfbb 10432if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10433 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10435/* end confdefs.h. */
a9322a30 10436#include <sys/types.h>
81ecdfbb 10437 #include <sys/param.h>
a9322a30
TT
10438
10439int
10440main ()
10441{
10442#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10443 not big endian
10444 #endif
a9322a30
TT
10445
10446 ;
10447 return 0;
10448}
bec39cab 10449_ACEOF
81ecdfbb 10450if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10451 ac_cv_c_bigendian=yes
5ee754fc 10452else
81ecdfbb 10453 ac_cv_c_bigendian=no
5ee754fc 10454fi
81ecdfbb
RW
10455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10456fi
10457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10458 fi
10459 if test $ac_cv_c_bigendian = unknown; then
10460 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10462/* end confdefs.h. */
10463#include <limits.h>
bec39cab 10464
81ecdfbb
RW
10465int
10466main ()
10467{
10468#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10469 bogus endian macros
10470 #endif
10471
10472 ;
10473 return 0;
10474}
7eb368b3 10475_ACEOF
81ecdfbb
RW
10476if ac_fn_c_try_compile "$LINENO"; then :
10477 # It does; now see whether it defined to _BIG_ENDIAN or not.
10478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10479/* end confdefs.h. */
81ecdfbb
RW
10480#include <limits.h>
10481
7eb368b3
NR
10482int
10483main ()
10484{
81ecdfbb
RW
10485#ifndef _BIG_ENDIAN
10486 not big endian
10487 #endif
10488
7eb368b3
NR
10489 ;
10490 return 0;
10491}
10492_ACEOF
81ecdfbb 10493if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10494 ac_cv_c_bigendian=yes
81ecdfbb
RW
10495else
10496 ac_cv_c_bigendian=no
a9322a30 10497fi
81ecdfbb 10498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10499fi
81ecdfbb
RW
10500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10501 fi
10502 if test $ac_cv_c_bigendian = unknown; then
10503 # Compile a test program.
10504 if test "$cross_compiling" = yes; then :
10505 # Try to guess by grepping values from an object file.
10506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10507/* end confdefs.h. */
10508short int ascii_mm[] =
10509 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10510 short int ascii_ii[] =
10511 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10512 int use_ascii (int i) {
10513 return ascii_mm[i] + ascii_ii[i];
10514 }
10515 short int ebcdic_ii[] =
10516 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10517 short int ebcdic_mm[] =
10518 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10519 int use_ebcdic (int i) {
10520 return ebcdic_mm[i] + ebcdic_ii[i];
10521 }
10522 extern int foo;
7eb368b3 10523
81ecdfbb
RW
10524int
10525main ()
10526{
10527return use_ascii (foo) == use_ebcdic (foo);
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532if ac_fn_c_try_compile "$LINENO"; then :
10533 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10534 ac_cv_c_bigendian=yes
10535 fi
10536 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10537 if test "$ac_cv_c_bigendian" = unknown; then
10538 ac_cv_c_bigendian=no
10539 else
10540 # finding both strings is unlikely to happen, but who knows?
10541 ac_cv_c_bigendian=unknown
10542 fi
10543 fi
7eb368b3 10544fi
81ecdfbb 10545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10546else
81ecdfbb 10547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10548/* end confdefs.h. */
81ecdfbb 10549$ac_includes_default
d3ea6809
MM
10550int
10551main ()
10552{
81ecdfbb
RW
10553
10554 /* Are we little or big endian? From Harbison&Steele. */
10555 union
10556 {
10557 long int l;
10558 char c[sizeof (long int)];
10559 } u;
10560 u.l = 1;
10561 return u.c[sizeof (long int) - 1] == 1;
10562
10563 ;
10564 return 0;
d3ea6809
MM
10565}
10566_ACEOF
81ecdfbb 10567if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10568 ac_cv_c_bigendian=no
d3ea6809 10569else
81ecdfbb 10570 ac_cv_c_bigendian=yes
d3ea6809 10571fi
81ecdfbb
RW
10572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10573 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10574fi
a9322a30 10575
81ecdfbb
RW
10576 fi
10577fi
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10579$as_echo "$ac_cv_c_bigendian" >&6; }
10580 case $ac_cv_c_bigendian in #(
10581 yes)
10582 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10583;; #(
10584 no)
10585 ;; #(
10586 universal)
10587
10588$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10589
10590 ;; #(
10591 *)
10592 as_fn_error "unknown endianness
10593 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10594 esac
d3ea6809
MM
10595
10596
a9322a30
TT
10597# ------------------------------ #
10598# Checks for library functions. #
10599# ------------------------------ #
d3ea6809 10600
a9322a30
TT
10601# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10602# for constant arguments. Useless!
81ecdfbb
RW
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10604$as_echo_n "checking for working alloca.h... " >&6; }
10605if test "${ac_cv_working_alloca_h+set}" = set; then :
10606 $as_echo_n "(cached) " >&6
d3ea6809 10607else
81ecdfbb 10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 10609/* end confdefs.h. */
a9322a30 10610#include <alloca.h>
bec39cab
AC
10611int
10612main ()
10613{
a9322a30 10614char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 10615 if (p) return 0;
bec39cab
AC
10616 ;
10617 return 0;
10618}
10619_ACEOF
81ecdfbb 10620if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10621 ac_cv_working_alloca_h=yes
bec39cab 10622else
81ecdfbb 10623 ac_cv_working_alloca_h=no
bec39cab 10624fi
81ecdfbb
RW
10625rm -f core conftest.err conftest.$ac_objext \
10626 conftest$ac_exeext conftest.$ac_ext
bec39cab 10627fi
81ecdfbb
RW
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10629$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
10630if test $ac_cv_working_alloca_h = yes; then
10631
81ecdfbb 10632$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 10633
c906108c 10634fi
bec39cab 10635
81ecdfbb
RW
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10637$as_echo_n "checking for alloca... " >&6; }
10638if test "${ac_cv_func_alloca_works+set}" = set; then :
10639 $as_echo_n "(cached) " >&6
bec39cab 10640else
81ecdfbb 10641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10642/* end confdefs.h. */
a9322a30
TT
10643#ifdef __GNUC__
10644# define alloca __builtin_alloca
b4e70030 10645#else
a9322a30
TT
10646# ifdef _MSC_VER
10647# include <malloc.h>
10648# define alloca _alloca
10649# else
81ecdfbb 10650# ifdef HAVE_ALLOCA_H
a9322a30
TT
10651# include <alloca.h>
10652# else
10653# ifdef _AIX
10654 #pragma alloca
10655# else
10656# ifndef alloca /* predefined by HP cc +Olibcalls */
10657char *alloca ();
10658# endif
10659# endif
10660# endif
10661# endif
c906108c 10662#endif
97bf5e38 10663
bec39cab
AC
10664int
10665main ()
10666{
a9322a30 10667char *p = (char *) alloca (1);
81ecdfbb 10668 if (p) return 0;
bec39cab
AC
10669 ;
10670 return 0;
10671}
10672_ACEOF
81ecdfbb 10673if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10674 ac_cv_func_alloca_works=yes
bec39cab 10675else
81ecdfbb 10676 ac_cv_func_alloca_works=no
bec39cab 10677fi
81ecdfbb
RW
10678rm -f core conftest.err conftest.$ac_objext \
10679 conftest$ac_exeext conftest.$ac_ext
bec39cab 10680fi
81ecdfbb
RW
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10682$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
10683
10684if test $ac_cv_func_alloca_works = yes; then
10685
81ecdfbb 10686$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 10687
a9322a30
TT
10688else
10689 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10690# that cause trouble. Some versions do not even contain alloca or
10691# contain a buggy version. If you still want to use their alloca,
10692# use ar to extract alloca.o from them instead of compiling alloca.c.
10693
81ecdfbb 10694ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 10695
81ecdfbb 10696$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 10697
bec39cab 10698
81ecdfbb
RW
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10700$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10701if test "${ac_cv_os_cray+set}" = set; then :
10702 $as_echo_n "(cached) " >&6
a9322a30 10703else
81ecdfbb 10704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 10705/* end confdefs.h. */
81ecdfbb 10706#if defined CRAY && ! defined CRAY2
a9322a30
TT
10707webecray
10708#else
10709wenotbecray
10710#endif
10711
10712_ACEOF
10713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10714 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10715 ac_cv_os_cray=yes
10716else
81ecdfbb 10717 ac_cv_os_cray=no
bec39cab 10718fi
81ecdfbb
RW
10719rm -f conftest*
10720
bec39cab 10721fi
81ecdfbb
RW
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10723$as_echo "$ac_cv_os_cray" >&6; }
10724if test $ac_cv_os_cray = yes; then
10725 for ac_func in _getb67 GETB67 getb67; do
10726 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10727ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10728eval as_val=\$$as_ac_var
10729 if test "x$as_val" = x""yes; then :
a9322a30
TT
10730
10731cat >>confdefs.h <<_ACEOF
10732#define CRAY_STACKSEG_END $ac_func
bec39cab 10733_ACEOF
c906108c 10734
a9322a30 10735 break
c906108c
SS
10736fi
10737
a9322a30
TT
10738 done
10739fi
bec39cab 10740
81ecdfbb
RW
10741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10742$as_echo_n "checking stack direction for C alloca... " >&6; }
10743if test "${ac_cv_c_stack_direction+set}" = set; then :
10744 $as_echo_n "(cached) " >&6
a9322a30 10745else
81ecdfbb 10746 if test "$cross_compiling" = yes; then :
a9322a30 10747 ac_cv_c_stack_direction=0
bec39cab 10748else
81ecdfbb 10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10750/* end confdefs.h. */
81ecdfbb 10751$ac_includes_default
a9322a30
TT
10752int
10753find_stack_direction ()
b4e70030 10754{
a9322a30
TT
10755 static char *addr = 0;
10756 auto char dummy;
10757 if (addr == 0)
10758 {
10759 addr = &dummy;
10760 return find_stack_direction ();
10761 }
10762 else
10763 return (&dummy > addr) ? 1 : -1;
b4e70030 10764}
b757528f 10765
bec39cab
AC
10766int
10767main ()
10768{
81ecdfbb 10769 return find_stack_direction () < 0;
bec39cab
AC
10770}
10771_ACEOF
81ecdfbb 10772if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10773 ac_cv_c_stack_direction=1
10774else
81ecdfbb 10775 ac_cv_c_stack_direction=-1
a9322a30 10776fi
81ecdfbb
RW
10777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10778 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10779fi
a9322a30 10780
81ecdfbb
RW
10781fi
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10783$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10784cat >>confdefs.h <<_ACEOF
10785#define STACK_DIRECTION $ac_cv_c_stack_direction
10786_ACEOF
10787
10788
10789fi
10790
a9322a30 10791for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10792do :
10793 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10794ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10795eval as_val=\$$as_ac_Header
10796 if test "x$as_val" = x""yes; then :
bec39cab 10797 cat >>confdefs.h <<_ACEOF
81ecdfbb 10798#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10799_ACEOF
b757528f 10800
b757528f 10801fi
bec39cab 10802
a9322a30 10803done
a3828db0 10804
a9322a30 10805for ac_func in getpagesize
81ecdfbb
RW
10806do :
10807 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10808if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10809 cat >>confdefs.h <<_ACEOF
81ecdfbb 10810#define HAVE_GETPAGESIZE 1
bec39cab 10811_ACEOF
bcb3dc3d 10812
bcb3dc3d
MK
10813fi
10814done
10815
81ecdfbb
RW
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10817$as_echo_n "checking for working mmap... " >&6; }
10818if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10819 $as_echo_n "(cached) " >&6
a9322a30 10820else
81ecdfbb 10821 if test "$cross_compiling" = yes; then :
a9322a30 10822 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10823else
81ecdfbb 10824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10825/* end confdefs.h. */
a9322a30
TT
10826$ac_includes_default
10827/* malloc might have been renamed as rpl_malloc. */
10828#undef malloc
bec39cab 10829
a9322a30
TT
10830/* Thanks to Mike Haertel and Jim Avera for this test.
10831 Here is a matrix of mmap possibilities:
10832 mmap private not fixed
10833 mmap private fixed at somewhere currently unmapped
10834 mmap private fixed at somewhere already mapped
10835 mmap shared not fixed
10836 mmap shared fixed at somewhere currently unmapped
10837 mmap shared fixed at somewhere already mapped
10838 For private mappings, we should verify that changes cannot be read()
10839 back from the file, nor mmap's back from the file at a different
10840 address. (There have been systems where private was not correctly
10841 implemented like the infamous i386 svr4.0, and systems where the
10842 VM page cache was not coherent with the file system buffer cache
10843 like early versions of FreeBSD and possibly contemporary NetBSD.)
10844 For shared mappings, we should conversely verify that changes get
10845 propagated back to all the places they're supposed to be.
bec39cab 10846
a9322a30
TT
10847 Grep wants private fixed already mapped.
10848 The main things grep needs to know about mmap are:
10849 * does it exist and is it safe to write into the mmap'd area
10850 * how to use it (BSD variants) */
8b9cf735 10851
a9322a30
TT
10852#include <fcntl.h>
10853#include <sys/mman.h>
8b9cf735 10854
81ecdfbb 10855#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10856char *malloc ();
a3828db0
MK
10857#endif
10858
a9322a30 10859/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10860#ifndef HAVE_GETPAGESIZE
a9322a30 10861/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10862# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10863# define HAVE_SYS_PARAM_H 1
10864# endif
10865
10866# ifdef _SC_PAGESIZE
10867# define getpagesize() sysconf(_SC_PAGESIZE)
10868# else /* no _SC_PAGESIZE */
81ecdfbb 10869# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10870# include <sys/param.h>
10871# ifdef EXEC_PAGESIZE
10872# define getpagesize() EXEC_PAGESIZE
10873# else /* no EXEC_PAGESIZE */
10874# ifdef NBPG
10875# define getpagesize() NBPG * CLSIZE
10876# ifndef CLSIZE
10877# define CLSIZE 1
10878# endif /* no CLSIZE */
10879# else /* no NBPG */
10880# ifdef NBPC
10881# define getpagesize() NBPC
10882# else /* no NBPC */
10883# ifdef PAGESIZE
10884# define getpagesize() PAGESIZE
10885# endif /* PAGESIZE */
10886# endif /* no NBPC */
10887# endif /* no NBPG */
10888# endif /* no EXEC_PAGESIZE */
10889# else /* no HAVE_SYS_PARAM_H */
10890# define getpagesize() 8192 /* punt totally */
10891# endif /* no HAVE_SYS_PARAM_H */
10892# endif /* no _SC_PAGESIZE */
10893
10894#endif /* no HAVE_GETPAGESIZE */
10895
bec39cab
AC
10896int
10897main ()
10898{
a9322a30
TT
10899 char *data, *data2, *data3;
10900 int i, pagesize;
10901 int fd;
10902
10903 pagesize = getpagesize ();
10904
10905 /* First, make a file with some known garbage in it. */
10906 data = (char *) malloc (pagesize);
10907 if (!data)
81ecdfbb 10908 return 1;
a9322a30
TT
10909 for (i = 0; i < pagesize; ++i)
10910 *(data + i) = rand ();
10911 umask (0);
10912 fd = creat ("conftest.mmap", 0600);
10913 if (fd < 0)
81ecdfbb 10914 return 1;
a9322a30 10915 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10916 return 1;
a9322a30
TT
10917 close (fd);
10918
10919 /* Next, try to mmap the file at a fixed address which already has
10920 something else allocated at it. If we can, also make sure that
10921 we see the same garbage. */
10922 fd = open ("conftest.mmap", O_RDWR);
10923 if (fd < 0)
81ecdfbb 10924 return 1;
a9322a30
TT
10925 data2 = (char *) malloc (2 * pagesize);
10926 if (!data2)
81ecdfbb
RW
10927 return 1;
10928 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10929 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10930 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10931 return 1;
a9322a30
TT
10932 for (i = 0; i < pagesize; ++i)
10933 if (*(data + i) != *(data2 + i))
81ecdfbb 10934 return 1;
a9322a30
TT
10935
10936 /* Finally, make sure that changes to the mapped area do not
10937 percolate back to the file as seen by read(). (This is a bug on
10938 some variants of i386 svr4.0.) */
10939 for (i = 0; i < pagesize; ++i)
10940 *(data2 + i) = *(data2 + i) + 1;
10941 data3 = (char *) malloc (pagesize);
10942 if (!data3)
81ecdfbb 10943 return 1;
a9322a30 10944 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10945 return 1;
a9322a30
TT
10946 for (i = 0; i < pagesize; ++i)
10947 if (*(data + i) != *(data3 + i))
81ecdfbb 10948 return 1;
a9322a30 10949 close (fd);
81ecdfbb 10950 return 0;
bec39cab
AC
10951}
10952_ACEOF
81ecdfbb 10953if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10954 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10955else
81ecdfbb 10956 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10957fi
81ecdfbb
RW
10958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10959 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10960fi
81ecdfbb 10961
a9322a30 10962fi
81ecdfbb
RW
10963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10964$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10965if test $ac_cv_func_mmap_fixed_mapped = yes; then
10966
81ecdfbb 10967$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10968
086ec9eb 10969fi
a9322a30 10970rm -f conftest.mmap
a3828db0 10971
81ecdfbb
RW
10972ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10973if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10974
a9322a30
TT
10975else
10976
10977cat >>confdefs.h <<_ACEOF
10978#define pid_t int
bec39cab 10979_ACEOF
086ec9eb
MK
10980
10981fi
10982
81ecdfbb
RW
10983for ac_header in vfork.h
10984do :
10985 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10986if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10987 cat >>confdefs.h <<_ACEOF
81ecdfbb 10988#define HAVE_VFORK_H 1
bec39cab 10989_ACEOF
c906108c
SS
10990
10991fi
a9322a30 10992
a3828db0 10993done
c906108c 10994
a9322a30 10995for ac_func in fork vfork
81ecdfbb
RW
10996do :
10997 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10998ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10999eval as_val=\$$as_ac_var
11000 if test "x$as_val" = x""yes; then :
a3828db0 11001 cat >>confdefs.h <<_ACEOF
81ecdfbb 11002#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11003_ACEOF
b83266a0 11004
97bf5e38 11005fi
a3828db0 11006done
b83266a0 11007
a9322a30 11008if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11010$as_echo_n "checking for working fork... " >&6; }
11011if test "${ac_cv_func_fork_works+set}" = set; then :
11012 $as_echo_n "(cached) " >&6
a9322a30 11013else
81ecdfbb 11014 if test "$cross_compiling" = yes; then :
a9322a30
TT
11015 ac_cv_func_fork_works=cross
11016else
81ecdfbb
RW
11017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11018/* end confdefs.h. */
11019$ac_includes_default
11020int
11021main ()
11022{
11023
11024 /* By Ruediger Kuhlmann. */
11025 return fork () < 0;
11026
11027 ;
11028 return 0;
11029}
a9322a30 11030_ACEOF
81ecdfbb 11031if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11032 ac_cv_func_fork_works=yes
11033else
81ecdfbb 11034 ac_cv_func_fork_works=no
a9322a30 11035fi
81ecdfbb
RW
11036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11037 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11038fi
81ecdfbb 11039
a9322a30 11040fi
81ecdfbb
RW
11041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11042$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11043
11044else
11045 ac_cv_func_fork_works=$ac_cv_func_fork
11046fi
11047if test "x$ac_cv_func_fork_works" = xcross; then
11048 case $host in
11049 *-*-amigaos* | *-*-msdosdjgpp*)
11050 # Override, as these systems have only a dummy fork() stub
11051 ac_cv_func_fork_works=no
11052 ;;
11053 *)
11054 ac_cv_func_fork_works=yes
11055 ;;
11056 esac
81ecdfbb
RW
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11058$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11059fi
11060ac_cv_func_vfork_works=$ac_cv_func_vfork
11061if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11063$as_echo_n "checking for working vfork... " >&6; }
11064if test "${ac_cv_func_vfork_works+set}" = set; then :
11065 $as_echo_n "(cached) " >&6
a9322a30 11066else
81ecdfbb 11067 if test "$cross_compiling" = yes; then :
a9322a30
TT
11068 ac_cv_func_vfork_works=cross
11069else
81ecdfbb 11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11071/* end confdefs.h. */
11072/* Thanks to Paul Eggert for this test. */
81ecdfbb 11073$ac_includes_default
a9322a30 11074#include <sys/wait.h>
81ecdfbb 11075#ifdef HAVE_VFORK_H
a9322a30
TT
11076# include <vfork.h>
11077#endif
11078/* On some sparc systems, changes by the child to local and incoming
11079 argument registers are propagated back to the parent. The compiler
11080 is told about this with #include <vfork.h>, but some compilers
11081 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11082 static variable whose address is put into a register that is
11083 clobbered by the vfork. */
11084static void
11085#ifdef __cplusplus
11086sparc_address_test (int arg)
11087# else
11088sparc_address_test (arg) int arg;
11089#endif
11090{
11091 static pid_t child;
11092 if (!child) {
11093 child = vfork ();
11094 if (child < 0) {
11095 perror ("vfork");
11096 _exit(2);
11097 }
11098 if (!child) {
11099 arg = getpid();
11100 write(-1, "", 0);
11101 _exit (arg);
11102 }
11103 }
11104}
11105
11106int
11107main ()
11108{
11109 pid_t parent = getpid ();
11110 pid_t child;
11111
11112 sparc_address_test (0);
11113
11114 child = vfork ();
11115
11116 if (child == 0) {
11117 /* Here is another test for sparc vfork register problems. This
11118 test uses lots of local variables, at least as many local
11119 variables as main has allocated so far including compiler
11120 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11121 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11122 reuse the register of parent for one of the local variables,
11123 since it will think that parent can't possibly be used any more
11124 in this routine. Assigning to the local variable will thus
11125 munge parent in the parent process. */
11126 pid_t
11127 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11128 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11129 /* Convince the compiler that p..p7 are live; otherwise, it might
11130 use the same hardware register for all 8 local variables. */
11131 if (p != p1 || p != p2 || p != p3 || p != p4
11132 || p != p5 || p != p6 || p != p7)
11133 _exit(1);
11134
11135 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11136 from child file descriptors. If the child closes a descriptor
11137 before it execs or exits, this munges the parent's descriptor
11138 as well. Test for this by closing stdout in the child. */
11139 _exit(close(fileno(stdout)) != 0);
11140 } else {
11141 int status;
11142 struct stat st;
11143
11144 while (wait(&status) != child)
11145 ;
81ecdfbb 11146 return (
a9322a30
TT
11147 /* Was there some problem with vforking? */
11148 child < 0
11149
11150 /* Did the child fail? (This shouldn't happen.) */
11151 || status
11152
11153 /* Did the vfork/compiler bug occur? */
11154 || parent != getpid()
11155
11156 /* Did the file descriptor bug occur? */
11157 || fstat(fileno(stdout), &st) != 0
11158 );
11159 }
11160}
11161_ACEOF
81ecdfbb 11162if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11163 ac_cv_func_vfork_works=yes
11164else
81ecdfbb 11165 ac_cv_func_vfork_works=no
a9322a30 11166fi
81ecdfbb
RW
11167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11168 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11169fi
81ecdfbb 11170
a9322a30 11171fi
81ecdfbb
RW
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11173$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11174
11175fi;
11176if test "x$ac_cv_func_fork_works" = xcross; then
11177 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11179$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11180fi
11181
11182if test "x$ac_cv_func_vfork_works" = xyes; then
11183
81ecdfbb 11184$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11185
11186else
11187
81ecdfbb 11188$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11189
11190fi
11191if test "x$ac_cv_func_fork_works" = xyes; then
11192
81ecdfbb 11193$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11194
11195fi
11196
a9322a30 11197for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 11198 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 11199 sigaction sigprocmask sigsetmask socketpair syscall \
732f6a93 11200 ttrace wborder setlocale iconvlist libiconvlist btowc
81ecdfbb
RW
11201do :
11202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11203ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11204eval as_val=\$$as_ac_var
11205 if test "x$as_val" = x""yes; then :
6c7a06a3 11206 cat >>confdefs.h <<_ACEOF
81ecdfbb 11207#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11208_ACEOF
11209
11210fi
11211done
11212
11213
81ecdfbb
RW
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11215$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11216if test "${am_cv_langinfo_codeset+set}" = set; then :
11217 $as_echo_n "(cached) " >&6
6c7a06a3 11218else
81ecdfbb 11219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11220/* end confdefs.h. */
11221#include <langinfo.h>
11222int
11223main ()
11224{
11225char* cs = nl_langinfo(CODESET);
bec39cab
AC
11226 ;
11227 return 0;
11228}
11229_ACEOF
81ecdfbb 11230if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11231 am_cv_langinfo_codeset=yes
a4db0f07 11232else
81ecdfbb 11233 am_cv_langinfo_codeset=no
a4db0f07 11234fi
81ecdfbb
RW
11235rm -f core conftest.err conftest.$ac_objext \
11236 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11237
a4db0f07 11238fi
81ecdfbb
RW
11239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11240$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11241 if test $am_cv_langinfo_codeset = yes; then
11242
81ecdfbb 11243$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11244
6c7a06a3 11245 fi
c906108c 11246
06825bd1 11247
a3828db0
MK
11248# Check the return and argument types of ptrace. No canned test for
11249# this, so roll our own.
11250gdb_ptrace_headers='
11251#if HAVE_SYS_TYPES_H
11252# include <sys/types.h>
11253#endif
11254#if HAVE_SYS_PTRACE_H
11255# include <sys/ptrace.h>
11256#endif
11257#if HAVE_UNISTD_H
11258# include <unistd.h>
11259#endif
11260'
11261# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11262ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11263"
11264if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11265 ac_have_decl=1
06825bd1 11266else
81ecdfbb 11267 ac_have_decl=0
06825bd1 11268fi
06825bd1 11269
a3828db0 11270cat >>confdefs.h <<_ACEOF
81ecdfbb 11271#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11272_ACEOF
81ecdfbb 11273if test $ac_have_decl = 1; then :
bec39cab 11274
a3828db0 11275else
a3828db0
MK
11276
11277 : ${gdb_cv_func_ptrace_ret='int'}
11278 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11279
06825bd1
MK
11280fi
11281
064ef605
DJ
11282# Check return type. Varargs (used on GNU/Linux) conflict with the
11283# empty argument list, so check for that explicitly.
81ecdfbb
RW
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11285$as_echo_n "checking return type of ptrace... " >&6; }
11286if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11287 $as_echo_n "(cached) " >&6
bec39cab 11288else
81ecdfbb 11289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11290/* end confdefs.h. */
a3828db0 11291$gdb_ptrace_headers
bec39cab
AC
11292int
11293main ()
11294{
064ef605
DJ
11295extern long ptrace (enum __ptrace_request, ...);
11296 ;
11297 return 0;
11298}
11299_ACEOF
81ecdfbb 11300if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11301 gdb_cv_func_ptrace_ret='long'
11302else
81ecdfbb 11303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11304/* end confdefs.h. */
11305$gdb_ptrace_headers
11306int
11307main ()
11308{
a3828db0 11309extern int ptrace ();
bec39cab
AC
11310 ;
11311 return 0;
11312}
11313_ACEOF
81ecdfbb 11314if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11315 gdb_cv_func_ptrace_ret='int'
70f9f479 11316else
81ecdfbb 11317 gdb_cv_func_ptrace_ret='long'
70f9f479 11318fi
81ecdfbb 11319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11320fi
81ecdfbb 11321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11322fi
81ecdfbb
RW
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11324$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11325
a3828db0
MK
11326cat >>confdefs.h <<_ACEOF
11327#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11328_ACEOF
70f9f479 11329
a3828db0 11330# Check argument types.
81ecdfbb
RW
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11332$as_echo_n "checking types of arguments for ptrace... " >&6; }
11333if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11334 $as_echo_n "(cached) " >&6
bec39cab 11335else
a3828db0 11336
81ecdfbb 11337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11338/* end confdefs.h. */
11339$gdb_ptrace_headers
11340int
11341main ()
11342{
11343extern long ptrace (enum __ptrace_request, ...);
11344 ;
11345 return 0;
11346}
11347_ACEOF
81ecdfbb 11348if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11349 gdb_cv_func_ptrace_args='int,int,long,long'
11350else
064ef605 11351
a3828db0
MK
11352for gdb_arg1 in 'int' 'long'; do
11353 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11354 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 11355 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11357/* end confdefs.h. */
a3828db0 11358$gdb_ptrace_headers
bec39cab
AC
11359int
11360main ()
11361{
a3828db0
MK
11362
11363extern $gdb_cv_func_ptrace_ret
11364 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11365
bec39cab
AC
11366 ;
11367 return 0;
11368}
11369_ACEOF
81ecdfbb 11370if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11371 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11372 break 4;
5c7f2947 11373fi
81ecdfbb 11374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11375 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11377/* end confdefs.h. */
a3828db0 11378$gdb_ptrace_headers
bec39cab
AC
11379int
11380main ()
11381{
a3828db0
MK
11382
11383extern $gdb_cv_func_ptrace_ret
11384 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11385
bec39cab
AC
11386 ;
11387 return 0;
11388}
11389_ACEOF
81ecdfbb 11390if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11391
11392gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11393 break 5;
78434e59 11394fi
81ecdfbb 11395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11396 done
11397 done
11398 done
11399 done
11400done
11401# Provide a safe default value.
11402: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11403
064ef605 11404fi
81ecdfbb 11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11406fi
81ecdfbb
RW
11407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11408$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11409ac_save_IFS=$IFS; IFS=','
11410set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11411IFS=$ac_save_IFS
11412shift
bec39cab 11413
a3828db0
MK
11414cat >>confdefs.h <<_ACEOF
11415#define PTRACE_TYPE_ARG3 $3
11416_ACEOF
11417
11418if test -n "$5"; then
11419
11420cat >>confdefs.h <<_ACEOF
11421#define PTRACE_TYPE_ARG5 $5
bec39cab 11422_ACEOF
78434e59
MK
11423
11424fi
11425
a3828db0 11426if test "$cross_compiling" = no; then
81ecdfbb
RW
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11428$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11429if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11430 $as_echo_n "(cached) " >&6
a3828db0 11431else
81ecdfbb
RW
11432 if test "$cross_compiling" = yes; then :
11433 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11434else
81ecdfbb 11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11436/* end confdefs.h. */
81ecdfbb 11437$ac_includes_default
bec39cab
AC
11438int
11439main ()
11440{
a3828db0
MK
11441/* If this system has a BSD-style setpgrp which takes arguments,
11442 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11443 exit successfully. */
81ecdfbb 11444 return setpgrp (1,1) != -1;
bec39cab
AC
11445 ;
11446 return 0;
11447}
11448_ACEOF
81ecdfbb 11449if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11450 ac_cv_func_setpgrp_void=no
c906108c 11451else
81ecdfbb 11452 ac_cv_func_setpgrp_void=yes
c906108c 11453fi
81ecdfbb
RW
11454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11455 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11456fi
81ecdfbb 11457
a3828db0 11458fi
81ecdfbb
RW
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11460$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11461if test $ac_cv_func_setpgrp_void = yes; then
11462
81ecdfbb 11463$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11464
11465fi
a3828db0
MK
11466
11467else
81ecdfbb
RW
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11469$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11470if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11471 $as_echo_n "(cached) " >&6
97bf5e38 11472else
81ecdfbb 11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11474/* end confdefs.h. */
a3828db0
MK
11475
11476#include <unistd.h>
11477
bec39cab
AC
11478int
11479main ()
11480{
a3828db0
MK
11481
11482 if (setpgrp(1,1) == -1)
11483 exit (0);
11484 else
11485 exit (1);
11486
bec39cab
AC
11487 ;
11488 return 0;
11489}
11490_ACEOF
81ecdfbb 11491if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11492 ac_cv_func_setpgrp_void=no
c906108c 11493else
81ecdfbb 11494 ac_cv_func_setpgrp_void=yes
c906108c 11495fi
81ecdfbb 11496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11497fi
81ecdfbb
RW
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11499$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11500if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11501 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11502
a3828db0 11503fi
c906108c
SS
11504fi
11505
a3828db0
MK
11506# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
11507# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11509$as_echo_n "checking for sigsetjmp... " >&6; }
11510if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11511 $as_echo_n "(cached) " >&6
bec39cab 11512else
81ecdfbb 11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11514/* end confdefs.h. */
a3828db0
MK
11515
11516#include <setjmp.h>
11517
bec39cab
AC
11518int
11519main ()
11520{
a3828db0 11521sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
11522 ;
11523 return 0;
11524}
11525_ACEOF
81ecdfbb 11526if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11527 gdb_cv_func_sigsetjmp=yes
c906108c 11528else
81ecdfbb 11529 gdb_cv_func_sigsetjmp=no
c906108c 11530fi
81ecdfbb 11531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11532fi
81ecdfbb
RW
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11534$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 11535if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 11536
81ecdfbb 11537$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 11538
97bf5e38 11539fi
c906108c 11540
a3828db0
MK
11541# Assume we'll default to using the included libiberty regex.
11542gdb_use_included_regex=yes
11543
11544# However, if the system regex is GNU regex, then default to *not*
11545# using the included regex.
81ecdfbb
RW
11546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11547$as_echo_n "checking for GNU regex... " >&6; }
11548if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11549 $as_echo_n "(cached) " >&6
bec39cab 11550else
81ecdfbb 11551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11552/* end confdefs.h. */
a3828db0 11553#include <gnu-versions.h>
bec39cab
AC
11554int
11555main ()
11556{
81ecdfbb
RW
11557#define REGEX_INTERFACE_VERSION 1
11558#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11559# error "Version mismatch"
11560#endif
5c45e068
MK
11561 ;
11562 return 0;
11563}
11564_ACEOF
81ecdfbb
RW
11565if ac_fn_c_try_compile "$LINENO"; then :
11566 gdb_cv_have_gnu_regex=yes
5c45e068 11567else
81ecdfbb
RW
11568 gdb_cv_have_gnu_regex=no
11569fi
11570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11571fi
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11573$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11574if test $gdb_cv_have_gnu_regex = yes; then
11575 gdb_use_included_regex=no
5c45e068 11576fi
81ecdfbb
RW
11577
11578
11579# Check whether --with-included-regex was given.
11580if test "${with_included_regex+set}" = set; then :
11581 withval=$with_included_regex; gdb_with_regex=$withval
11582else
11583 gdb_with_regex=$gdb_use_included_regex
c906108c 11584fi
81ecdfbb
RW
11585
11586if test "$gdb_with_regex" = yes; then
11587
11588$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11589
c906108c 11590fi
81ecdfbb
RW
11591
11592# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11593ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11594#include <sys/proc.h>
11595
11596"
11597if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11598
5c45e068 11599cat >>confdefs.h <<_ACEOF
a3828db0 11600#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11601_ACEOF
c906108c 11602
5c45e068 11603
97bf5e38 11604fi
c906108c 11605
5c45e068 11606
a3828db0 11607# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11609$as_echo_n "checking for struct lwp... " >&6; }
11610if test "${gdb_cv_struct_lwp+set}" = set; then :
11611 $as_echo_n "(cached) " >&6
bec39cab 11612else
81ecdfbb 11613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11614/* end confdefs.h. */
a3828db0
MK
11615#include <sys/param.h>
11616#include <sys/lwp.h>
bec39cab
AC
11617int
11618main ()
11619{
a3828db0 11620struct lwp l;
bec39cab
AC
11621 ;
11622 return 0;
11623}
11624_ACEOF
81ecdfbb 11625if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11626 gdb_cv_struct_lwp=yes
c906108c 11627else
81ecdfbb 11628 gdb_cv_struct_lwp=no
c906108c 11629fi
81ecdfbb 11630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11631fi
81ecdfbb
RW
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11633$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11634if test $gdb_cv_struct_lwp = yes; then
c906108c 11635
81ecdfbb 11636$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11637
97bf5e38 11638fi
c906108c 11639
a3828db0 11640# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11642$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11643if test "${gdb_cv_struct_reg+set}" = set; then :
11644 $as_echo_n "(cached) " >&6
bec39cab 11645else
81ecdfbb 11646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11647/* end confdefs.h. */
a3828db0
MK
11648#include <sys/types.h>
11649#include <machine/reg.h>
bec39cab
AC
11650int
11651main ()
11652{
a3828db0 11653struct reg r;
bec39cab
AC
11654 ;
11655 return 0;
11656}
11657_ACEOF
81ecdfbb 11658if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11659 gdb_cv_struct_reg=yes
27ca5dad 11660else
81ecdfbb 11661 gdb_cv_struct_reg=no
27ca5dad 11662fi
81ecdfbb 11663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11664fi
81ecdfbb
RW
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11666$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11667if test $gdb_cv_struct_reg = yes; then
bec39cab 11668
81ecdfbb 11669$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11670
11671fi
97bf5e38 11672
a3828db0
MK
11673# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11674# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11675ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11676"
11677if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11678
11679cat >>confdefs.h <<_ACEOF
a3828db0 11680#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11681_ACEOF
3862412b 11682
5c45e068 11683
97bf5e38 11684fi
81ecdfbb
RW
11685ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11686"
11687if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11688
11689cat >>confdefs.h <<_ACEOF
a3828db0 11690#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11691_ACEOF
3862412b 11692
5c45e068 11693
97bf5e38 11694fi
3862412b 11695
5c45e068 11696
a3828db0 11697# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11699$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11700if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11701 $as_echo_n "(cached) " >&6
451928c5 11702else
81ecdfbb 11703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11704/* end confdefs.h. */
a3828db0 11705#include <sys/ptrace.h>
bec39cab
AC
11706int
11707main ()
11708{
a3828db0 11709PTRACE_GETREGS;
bec39cab
AC
11710 ;
11711 return 0;
11712}
11713_ACEOF
81ecdfbb 11714if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11715 gdb_cv_have_ptrace_getregs=yes
451928c5 11716else
81ecdfbb 11717 gdb_cv_have_ptrace_getregs=no
451928c5 11718fi
81ecdfbb 11719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11720fi
11721
81ecdfbb
RW
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11723$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11724if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11725
81ecdfbb 11726$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11727
97bf5e38 11728fi
451928c5 11729
a3828db0 11730# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11732$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11733if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11734 $as_echo_n "(cached) " >&6
451928c5 11735else
81ecdfbb 11736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11737/* end confdefs.h. */
a3828db0 11738#include <sys/ptrace.h>
bec39cab
AC
11739int
11740main ()
11741{
a3828db0 11742PTRACE_GETFPXREGS;
bec39cab
AC
11743 ;
11744 return 0;
11745}
11746_ACEOF
81ecdfbb 11747if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11748 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11749else
81ecdfbb 11750 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11751fi
81ecdfbb 11752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11753fi
11754
81ecdfbb
RW
11755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11756$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11757if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11758
81ecdfbb 11759$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11760
97bf5e38 11761fi
451928c5 11762
a3828db0 11763# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11765$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11766if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11767 $as_echo_n "(cached) " >&6
3862412b 11768else
81ecdfbb 11769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11770/* end confdefs.h. */
a3828db0
MK
11771#include <sys/types.h>
11772#include <sys/ptrace.h>
bec39cab
AC
11773int
11774main ()
11775{
a3828db0 11776PT_GETDBREGS;
bec39cab
AC
11777 ;
11778 return 0;
11779}
11780_ACEOF
81ecdfbb 11781if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11782 gdb_cv_have_pt_getdbregs=yes
3862412b 11783else
81ecdfbb 11784 gdb_cv_have_pt_getdbregs=no
3862412b 11785fi
81ecdfbb 11786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11787fi
11788
81ecdfbb
RW
11789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11790$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11791if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11792
81ecdfbb 11793$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11794
97bf5e38 11795fi
3862412b 11796
a3828db0 11797# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11799$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11800if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11801 $as_echo_n "(cached) " >&6
3862412b 11802else
81ecdfbb 11803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11804/* end confdefs.h. */
a3828db0
MK
11805#include <sys/types.h>
11806#include <sys/ptrace.h>
bec39cab
AC
11807int
11808main ()
11809{
a3828db0 11810PT_GETXMMREGS;
bec39cab
AC
11811 ;
11812 return 0;
11813}
11814_ACEOF
81ecdfbb 11815if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11816 gdb_cv_have_pt_getxmmregs=yes
3862412b 11817else
81ecdfbb 11818 gdb_cv_have_pt_getxmmregs=no
3862412b 11819fi
81ecdfbb 11820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11821fi
11822
81ecdfbb
RW
11823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11824$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11825if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11826
81ecdfbb 11827$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11828
97bf5e38 11829fi
3862412b 11830
eb368090 11831# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
11832
11833if test "${target}" = "${host}"; then
11834 case "${host}" in
97bf5e38 11835 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 11836
81ecdfbb 11837$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11838
11839 ;;
c162e8c9 11840 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11841
81ecdfbb 11842$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11843
11844 ;;
11845 mips-sgi-irix5*)
11846 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11847
81ecdfbb 11848$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11849
11850 ;;
11851 esac
11852fi
11853
11854if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
11856$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
11857 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
11858 $as_echo_n "(cached) " >&6
bec39cab 11859else
81ecdfbb 11860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11861/* end confdefs.h. */
596c9d4b
KB
11862
11863#define _SYSCALL32
11864#include <sys/procfs.h>
bec39cab
AC
11865int
11866main ()
11867{
97bf5e38 11868pstatus_t avar
bec39cab
AC
11869 ;
11870 return 0;
11871}
11872_ACEOF
81ecdfbb 11873if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11874 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 11875else
81ecdfbb 11876 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 11877
596c9d4b 11878fi
81ecdfbb 11879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11880fi
11881
97bf5e38 11882 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 11883
81ecdfbb 11884$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
11885
11886 fi
81ecdfbb
RW
11887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
11888$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 11889
81ecdfbb
RW
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
11891$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
11892 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
11893 $as_echo_n "(cached) " >&6
596c9d4b 11894else
81ecdfbb 11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11896/* end confdefs.h. */
596c9d4b
KB
11897
11898#define _SYSCALL32
11899#include <sys/procfs.h>
bec39cab
AC
11900int
11901main ()
11902{
97bf5e38 11903prrun_t avar
bec39cab
AC
11904 ;
11905 return 0;
11906}
11907_ACEOF
81ecdfbb 11908if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11909 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 11910else
81ecdfbb 11911 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 11912
596c9d4b 11913fi
81ecdfbb 11914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11915fi
11916
97bf5e38 11917 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 11918
81ecdfbb 11919$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
11920
11921 fi
81ecdfbb
RW
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
11923$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 11924
81ecdfbb
RW
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11926$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11927 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11928 $as_echo_n "(cached) " >&6
596c9d4b 11929else
81ecdfbb 11930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11931/* end confdefs.h. */
596c9d4b
KB
11932
11933#define _SYSCALL32
11934#include <sys/procfs.h>
bec39cab
AC
11935int
11936main ()
11937{
97bf5e38 11938gregset_t avar
bec39cab
AC
11939 ;
11940 return 0;
11941}
11942_ACEOF
81ecdfbb 11943if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11944 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11945else
81ecdfbb 11946 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11947
596c9d4b 11948fi
81ecdfbb 11949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11950fi
11951
97bf5e38 11952 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11953
81ecdfbb 11954$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11955
11956 fi
81ecdfbb
RW
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11958$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11959
81ecdfbb
RW
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11961$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11962 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11963 $as_echo_n "(cached) " >&6
d84dd0c5 11964else
81ecdfbb 11965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11966/* end confdefs.h. */
97bf5e38
MK
11967
11968#define _SYSCALL32
d84dd0c5 11969#include <sys/procfs.h>
bec39cab
AC
11970int
11971main ()
11972{
97bf5e38 11973fpregset_t avar
bec39cab
AC
11974 ;
11975 return 0;
11976}
11977_ACEOF
81ecdfbb 11978if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11979 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11980else
81ecdfbb 11981 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11982
d84dd0c5 11983fi
81ecdfbb 11984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11985fi
11986
97bf5e38 11987 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11988
81ecdfbb 11989$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11990
97bf5e38 11991 fi
81ecdfbb
RW
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11993$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11994
81ecdfbb
RW
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11996$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11997 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11998 $as_echo_n "(cached) " >&6
c906108c 11999else
81ecdfbb 12000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12001/* end confdefs.h. */
c906108c 12002
97bf5e38
MK
12003#define _SYSCALL32
12004#include <sys/procfs.h>
bec39cab
AC
12005int
12006main ()
12007{
97bf5e38 12008prgregset_t avar
bec39cab
AC
12009 ;
12010 return 0;
12011}
12012_ACEOF
81ecdfbb 12013if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12014 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 12015else
81ecdfbb 12016 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 12017
c906108c 12018fi
81ecdfbb 12019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12020fi
12021
97bf5e38 12022 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 12023
81ecdfbb 12024$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 12025
97bf5e38 12026 fi
81ecdfbb
RW
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
12028$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 12029
81ecdfbb
RW
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
12031$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
12032 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
12033 $as_echo_n "(cached) " >&6
d45fe813 12034else
81ecdfbb 12035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12036/* end confdefs.h. */
97bf5e38
MK
12037
12038#define _SYSCALL32
12039#include <sys/procfs.h>
bec39cab
AC
12040int
12041main ()
12042{
97bf5e38 12043prfpregset_t avar
bec39cab
AC
12044 ;
12045 return 0;
12046}
12047_ACEOF
81ecdfbb 12048if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12049 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 12050else
81ecdfbb 12051 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 12052
d45fe813 12053fi
81ecdfbb 12054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12055fi
12056
97bf5e38 12057 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 12058
81ecdfbb 12059$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 12060
97bf5e38 12061 fi
81ecdfbb
RW
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
12063$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 12064
81ecdfbb
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
12066$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
12067 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
12068 $as_echo_n "(cached) " >&6
d45fe813 12069else
81ecdfbb 12070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12071/* end confdefs.h. */
97bf5e38
MK
12072
12073#define _SYSCALL32
12074#include <sys/procfs.h>
bec39cab
AC
12075int
12076main ()
12077{
97bf5e38 12078prgregset32_t avar
bec39cab
AC
12079 ;
12080 return 0;
12081}
12082_ACEOF
81ecdfbb 12083if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12084 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 12085else
81ecdfbb 12086 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 12087
d45fe813 12088fi
81ecdfbb 12089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12090fi
12091
97bf5e38 12092 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 12093
81ecdfbb 12094$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 12095
97bf5e38 12096 fi
81ecdfbb
RW
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
12098$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 12099
81ecdfbb
RW
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
12101$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
12102 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
12103 $as_echo_n "(cached) " >&6
d45fe813 12104else
81ecdfbb 12105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12106/* end confdefs.h. */
97bf5e38
MK
12107
12108#define _SYSCALL32
12109#include <sys/procfs.h>
bec39cab
AC
12110int
12111main ()
12112{
97bf5e38 12113prfpregset32_t avar
bec39cab
AC
12114 ;
12115 return 0;
12116}
12117_ACEOF
81ecdfbb 12118if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12119 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 12120else
81ecdfbb 12121 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 12122
d45fe813 12123fi
81ecdfbb 12124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12125fi
12126
97bf5e38 12127 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 12128
81ecdfbb 12129$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 12130
97bf5e38 12131 fi
81ecdfbb
RW
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
12133$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 12134
81ecdfbb
RW
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
12136$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
12137 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
12138 $as_echo_n "(cached) " >&6
d45fe813 12139else
81ecdfbb 12140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12141/* end confdefs.h. */
97bf5e38 12142
d45fe813 12143#define _SYSCALL32
97bf5e38 12144#include <sys/procfs.h>
bec39cab
AC
12145int
12146main ()
12147{
97bf5e38 12148lwpid_t avar
bec39cab
AC
12149 ;
12150 return 0;
12151}
12152_ACEOF
81ecdfbb 12153if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12154 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 12155else
81ecdfbb 12156 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 12157
d45fe813 12158fi
81ecdfbb 12159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12160fi
12161
97bf5e38 12162 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12163
81ecdfbb 12164$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12165
97bf5e38 12166 fi
81ecdfbb
RW
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12168$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12169
81ecdfbb
RW
12170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12171$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12172 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12173 $as_echo_n "(cached) " >&6
c906108c 12174else
81ecdfbb 12175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12176/* end confdefs.h. */
c906108c 12177
97bf5e38
MK
12178#define _SYSCALL32
12179#include <sys/procfs.h>
bec39cab
AC
12180int
12181main ()
12182{
97bf5e38 12183psaddr_t avar
bec39cab
AC
12184 ;
12185 return 0;
12186}
12187_ACEOF
81ecdfbb 12188if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12189 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12190else
81ecdfbb 12191 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12192
c906108c 12193fi
81ecdfbb 12194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12195fi
12196
97bf5e38 12197 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12198
81ecdfbb 12199$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12200
97bf5e38 12201 fi
81ecdfbb
RW
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12203$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12204
81ecdfbb
RW
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12206$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12207 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12208 $as_echo_n "(cached) " >&6
c906108c 12209else
81ecdfbb 12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12211/* end confdefs.h. */
c906108c 12212
97bf5e38
MK
12213#define _SYSCALL32
12214#include <sys/procfs.h>
bec39cab
AC
12215int
12216main ()
12217{
97bf5e38 12218prsysent_t avar
bec39cab
AC
12219 ;
12220 return 0;
12221}
12222_ACEOF
81ecdfbb 12223if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12224 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12225else
81ecdfbb 12226 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12227
c906108c 12228fi
81ecdfbb 12229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12230fi
12231
97bf5e38 12232 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12233
81ecdfbb 12234$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12235
97bf5e38 12236 fi
81ecdfbb
RW
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12238$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12239
81ecdfbb
RW
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12241$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12242 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12243 $as_echo_n "(cached) " >&6
c906108c 12244else
81ecdfbb 12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12246/* end confdefs.h. */
c906108c 12247
97bf5e38
MK
12248#define _SYSCALL32
12249#include <sys/procfs.h>
bec39cab
AC
12250int
12251main ()
12252{
97bf5e38 12253pr_sigset_t avar
bec39cab
AC
12254 ;
12255 return 0;
12256}
12257_ACEOF
81ecdfbb 12258if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12259 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12260else
81ecdfbb 12261 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12262
c906108c 12263fi
81ecdfbb 12264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12265fi
12266
97bf5e38 12267 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12268
81ecdfbb 12269$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12270
97bf5e38 12271 fi
81ecdfbb
RW
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12273$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12274
81ecdfbb
RW
12275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12276$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12277 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12278 $as_echo_n "(cached) " >&6
c906108c 12279else
81ecdfbb 12280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12281/* end confdefs.h. */
c906108c 12282
97bf5e38
MK
12283#define _SYSCALL32
12284#include <sys/procfs.h>
bec39cab
AC
12285int
12286main ()
12287{
97bf5e38 12288pr_sigaction64_t avar
bec39cab
AC
12289 ;
12290 return 0;
12291}
12292_ACEOF
81ecdfbb 12293if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12294 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12295else
81ecdfbb 12296 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12297
c906108c 12298fi
81ecdfbb 12299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12300fi
12301
97bf5e38 12302 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12303
81ecdfbb 12304$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12305
97bf5e38 12306 fi
81ecdfbb
RW
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12308$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12309
81ecdfbb
RW
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12311$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12312 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12313 $as_echo_n "(cached) " >&6
97bf5e38 12314else
81ecdfbb 12315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12316/* end confdefs.h. */
97bf5e38
MK
12317
12318#define _SYSCALL32
12319#include <sys/procfs.h>
bec39cab
AC
12320int
12321main ()
12322{
97bf5e38 12323pr_siginfo64_t avar
bec39cab
AC
12324 ;
12325 return 0;
12326}
12327_ACEOF
81ecdfbb 12328if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12329 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12330else
81ecdfbb 12331 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12332
97bf5e38 12333fi
81ecdfbb 12334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12335fi
c906108c 12336
97bf5e38 12337 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12338
81ecdfbb 12339$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12340
97bf5e38 12341 fi
81ecdfbb
RW
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12343$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12344
12345
97bf5e38
MK
12346
12347
12348
97bf5e38 12349 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12351$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12352 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12353 $as_echo_n "(cached) " >&6
c906108c 12354else
81ecdfbb 12355 if test "$cross_compiling" = yes; then :
97bf5e38 12356 gdb_cv_prfpregset_t_broken=yes
c906108c 12357else
81ecdfbb 12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12359/* end confdefs.h. */
97bf5e38
MK
12360#include <sys/procfs.h>
12361 int main ()
12362 {
12363 if (sizeof (prfpregset_t) == sizeof (void *))
12364 return 1;
12365 return 0;
12366 }
bec39cab 12367_ACEOF
81ecdfbb 12368if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12369 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12370else
12371 gdb_cv_prfpregset_t_broken=yes
c906108c 12372fi
81ecdfbb
RW
12373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12374 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12375fi
81ecdfbb 12376
c906108c
SS
12377fi
12378
81ecdfbb
RW
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12380$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12381 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12382
81ecdfbb 12383$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12384
97bf5e38
MK
12385 fi
12386 fi
c906108c 12387
bec39cab 12388
81ecdfbb
RW
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
12390$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
12391 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
12392 $as_echo_n "(cached) " >&6
c906108c 12393else
81ecdfbb 12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12395/* end confdefs.h. */
97bf5e38
MK
12396#include <unistd.h>
12397#include <sys/types.h>
12398#include <sys/procfs.h>
12399
bec39cab
AC
12400int
12401main ()
12402{
97bf5e38
MK
12403
12404 int dummy;;
12405 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
12406
12407 ;
12408 return 0;
12409}
12410_ACEOF
81ecdfbb 12411if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12412 gdb_cv_have_procfs_piocset=yes
c906108c 12413else
81ecdfbb 12414 gdb_cv_have_procfs_piocset=no
c906108c 12415fi
81ecdfbb 12416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12417fi
97bf5e38 12418
81ecdfbb
RW
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
12420$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 12421 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 12422
81ecdfbb 12423$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
12424
12425 fi
c906108c 12426fi
c906108c 12427
97bf5e38 12428if test ${host} = ${target} ; then
bec39cab 12429
81ecdfbb
RW
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
12431$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
12432 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
12433 $as_echo_n "(cached) " >&6
bec39cab 12434else
81ecdfbb 12435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12436/* end confdefs.h. */
97bf5e38 12437#include <link.h>
bec39cab
AC
12438int
12439main ()
12440{
97bf5e38 12441struct link_map lm; (void) lm.l_addr;
bec39cab
AC
12442 ;
12443 return 0;
12444}
12445_ACEOF
81ecdfbb 12446if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12447 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 12448else
81ecdfbb 12449 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 12450fi
81ecdfbb 12451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12452fi
12453
81ecdfbb
RW
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
12455$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 12456 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 12457
81ecdfbb 12458$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12459
12460 fi
12461
bec39cab 12462
81ecdfbb
RW
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
12464$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
12465 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
12466 $as_echo_n "(cached) " >&6
c906108c 12467else
81ecdfbb 12468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12469/* end confdefs.h. */
97bf5e38
MK
12470#include <sys/types.h>
12471#include <link.h>
bec39cab
AC
12472int
12473main ()
12474{
97bf5e38 12475struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
12476 ;
12477 return 0;
12478}
12479_ACEOF
81ecdfbb 12480if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12481 gdb_cv_have_struct_link_map_with_lm_members=yes
12482else
81ecdfbb 12483 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 12484fi
81ecdfbb 12485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12486fi
c906108c 12487
81ecdfbb
RW
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
12489$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 12490 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 12491
81ecdfbb 12492$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12493
12494 fi
12495
bec39cab 12496
81ecdfbb
RW
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
12498$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
12499 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
12500 $as_echo_n "(cached) " >&6
c906108c 12501else
81ecdfbb 12502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12503/* end confdefs.h. */
97bf5e38
MK
12504#include <sys/types.h>
12505#ifdef HAVE_NLIST_H
12506#include <nlist.h>
12507#endif
12508#include <link.h>
bec39cab
AC
12509int
12510main ()
12511{
97bf5e38 12512struct so_map lm; (void) lm.som_addr;
bec39cab
AC
12513 ;
12514 return 0;
12515}
12516_ACEOF
81ecdfbb 12517if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12518 gdb_cv_have_struct_so_map_with_som_members=yes
12519else
81ecdfbb 12520 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 12521fi
81ecdfbb 12522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12523fi
c906108c 12524
81ecdfbb
RW
12525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
12526$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 12527 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 12528
81ecdfbb 12529$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 12530
97bf5e38 12531 fi
c906108c 12532
bec39cab 12533
81ecdfbb
RW
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
12535$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
12536 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
12537 $as_echo_n "(cached) " >&6
97bf5e38 12538else
81ecdfbb 12539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12540/* end confdefs.h. */
97bf5e38
MK
12541#define _SYSCALL32
12542#include <sys/link.h>
bec39cab
AC
12543int
12544main ()
12545{
97bf5e38 12546struct link_map32 l;
bec39cab
AC
12547 ;
12548 return 0;
12549}
12550_ACEOF
81ecdfbb 12551if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12552 gdb_cv_have_struct_link_map32=yes
12553else
81ecdfbb 12554 gdb_cv_have_struct_link_map32=no
97bf5e38 12555fi
81ecdfbb 12556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12557fi
c906108c 12558
81ecdfbb
RW
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
12560$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 12561 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 12562
81ecdfbb 12563$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 12564
60ca704f 12565
81ecdfbb 12566$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 12567
97bf5e38
MK
12568 fi
12569fi
c906108c 12570
bc8bcb4b 12571# Check if the compiler supports the `long long' type.
c906108c 12572
81ecdfbb
RW
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12574$as_echo_n "checking for long long support in compiler... " >&6; }
12575if test "${gdb_cv_c_long_long+set}" = set; then :
12576 $as_echo_n "(cached) " >&6
97bf5e38 12577else
81ecdfbb 12578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12579/* end confdefs.h. */
bc8bcb4b 12580extern long long foo;
bec39cab
AC
12581int
12582main ()
12583{
bc8bcb4b 12584switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12585 ;
12586 return 0;
12587}
12588_ACEOF
81ecdfbb 12589if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12590 gdb_cv_c_long_long=yes
12591else
81ecdfbb 12592 gdb_cv_c_long_long=no
97bf5e38 12593fi
81ecdfbb 12594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12595fi
81ecdfbb
RW
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12597$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 12598if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 12599
81ecdfbb 12600$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12601
12602fi
12603
bc8bcb4b 12604# Check if the compiler and runtime support printing long longs.
97bf5e38 12605
81ecdfbb
RW
12606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12607$as_echo_n "checking for long long support in printf... " >&6; }
12608if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12609 $as_echo_n "(cached) " >&6
97bf5e38 12610else
81ecdfbb 12611 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12612 gdb_cv_printf_has_long_long=no
12613else
81ecdfbb 12614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12615/* end confdefs.h. */
bc8bcb4b
MK
12616$ac_includes_default
12617int
12618main ()
12619{
12620char buf[32];
97bf5e38
MK
12621 long long l = 0;
12622 l = (l << 16) + 0x0123;
12623 l = (l << 16) + 0x4567;
12624 l = (l << 16) + 0x89ab;
12625 l = (l << 16) + 0xcdef;
12626 sprintf (buf, "0x%016llx", l);
12627 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12628 ;
12629 return 0;
c906108c 12630}
bec39cab 12631_ACEOF
81ecdfbb 12632if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12633 gdb_cv_printf_has_long_long=yes
12634else
81ecdfbb 12635 gdb_cv_printf_has_long_long=no
97bf5e38 12636fi
81ecdfbb
RW
12637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12638 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12639fi
81ecdfbb 12640
97bf5e38 12641fi
81ecdfbb
RW
12642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12643$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12644if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12645
81ecdfbb 12646$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12647
12648fi
97bf5e38 12649
1a619819
LM
12650# Check if the compiler and runtime support printing decfloats.
12651
81ecdfbb
RW
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12653$as_echo_n "checking for decfloat support in printf... " >&6; }
12654if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12655 $as_echo_n "(cached) " >&6
1a619819 12656else
81ecdfbb 12657 if test "$cross_compiling" = yes; then :
1a619819
LM
12658 gdb_cv_printf_has_decfloat=no
12659else
81ecdfbb 12660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12661/* end confdefs.h. */
12662$ac_includes_default
12663int
12664main ()
12665{
12666char buf[64];
12667 _Decimal32 d32 = 1.2345df;
12668 _Decimal64 d64 = 1.2345dd;
12669 _Decimal128 d128 = 1.2345dl;
12670 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12671 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12672 ;
12673 return 0;
12674}
12675_ACEOF
81ecdfbb 12676if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12677 gdb_cv_printf_has_decfloat=yes
12678else
81ecdfbb 12679 gdb_cv_printf_has_decfloat=no
1a619819 12680fi
81ecdfbb
RW
12681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12682 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12683fi
81ecdfbb 12684
1a619819 12685fi
81ecdfbb
RW
12686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12687$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12688if test $gdb_cv_printf_has_decfloat = yes; then
12689
81ecdfbb 12690$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12691
12692fi
12693
bc8bcb4b
MK
12694# Check if the compiler supports the `long double' type. We can't use
12695# AC_C_LONG_DOUBLE because that one does additional checks on the
12696# constants defined in <float.h> that fail on some systems,
12697# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12698
81ecdfbb
RW
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12700$as_echo_n "checking for long double support in compiler... " >&6; }
12701if test "${gdb_cv_c_long_double+set}" = set; then :
12702 $as_echo_n "(cached) " >&6
97bf5e38 12703else
81ecdfbb 12704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12705/* end confdefs.h. */
97bf5e38 12706long double foo;
bec39cab 12707_ACEOF
81ecdfbb 12708if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12709 gdb_cv_c_long_double=yes
97bf5e38 12710else
81ecdfbb 12711 gdb_cv_c_long_double=no
97bf5e38 12712fi
81ecdfbb 12713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12714fi
81ecdfbb
RW
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12716$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12717if test $gdb_cv_c_long_double = yes; then
c906108c 12718
81ecdfbb 12719$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12720
12721fi
12722
bc8bcb4b 12723# Check if the compiler and runtime support printing long doubles.
97bf5e38 12724
81ecdfbb
RW
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12726$as_echo_n "checking for long double support in printf... " >&6; }
12727if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12728 $as_echo_n "(cached) " >&6
97bf5e38 12729else
81ecdfbb 12730 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12731 gdb_cv_printf_has_long_double=no
12732else
81ecdfbb 12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12734/* end confdefs.h. */
bc8bcb4b
MK
12735$ac_includes_default
12736int
12737main ()
12738{
12739char buf[16];
97bf5e38
MK
12740 long double f = 3.141592653;
12741 sprintf (buf, "%Lg", f);
12742 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12743 ;
12744 return 0;
97bf5e38 12745}
bec39cab 12746_ACEOF
81ecdfbb 12747if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12748 gdb_cv_printf_has_long_double=yes
c906108c 12749else
81ecdfbb 12750 gdb_cv_printf_has_long_double=no
c906108c 12751fi
81ecdfbb
RW
12752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12753 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12754fi
81ecdfbb 12755
c906108c 12756fi
81ecdfbb
RW
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12758$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12759if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12760
81ecdfbb 12761$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12762
12763fi
97bf5e38 12764
bc8bcb4b 12765# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12766
81ecdfbb
RW
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12768$as_echo_n "checking for long double support in scanf... " >&6; }
12769if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12770 $as_echo_n "(cached) " >&6
97bf5e38 12771else
81ecdfbb 12772 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12773 gdb_cv_scanf_has_long_double=no
12774else
81ecdfbb 12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12776/* end confdefs.h. */
bc8bcb4b
MK
12777#include <stdio.h>
12778int
12779main ()
12780{
12781char *buf = "3.141592653";
97bf5e38
MK
12782 long double f = 0;
12783 sscanf (buf, "%Lg", &f);
12784 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12785 ;
12786 return 0;
97bf5e38 12787}
bec39cab 12788_ACEOF
81ecdfbb 12789if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12790 gdb_cv_scanf_has_long_double=yes
12791else
81ecdfbb 12792 gdb_cv_scanf_has_long_double=no
97bf5e38 12793fi
81ecdfbb
RW
12794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12795 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12796fi
81ecdfbb 12797
c906108c 12798fi
81ecdfbb
RW
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12800$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12801if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12802
81ecdfbb 12803$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12804
12805fi
c906108c 12806
438013df
AO
12807case ${host_os} in
12808aix*)
81ecdfbb
RW
12809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12810$as_echo_n "checking for -bbigtoc option... " >&6; }
12811if test "${gdb_cv_bigtoc+set}" = set; then :
12812 $as_echo_n "(cached) " >&6
438013df 12813else
bec39cab 12814
438013df
AO
12815 SAVE_LDFLAGS=$LDFLAGS
12816
12817 case $GCC in
12818 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12819 *) gdb_cv_bigtoc=-bbigtoc ;;
12820 esac
12821
12822 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12824/* end confdefs.h. */
438013df 12825
bec39cab
AC
12826int
12827main ()
12828{
438013df 12829int i;
bec39cab
AC
12830 ;
12831 return 0;
12832}
12833_ACEOF
81ecdfbb 12834if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12835
81ecdfbb
RW
12836else
12837 gdb_cv_bigtoc=
438013df 12838fi
81ecdfbb
RW
12839rm -f core conftest.err conftest.$ac_objext \
12840 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12841 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12842
bec39cab 12843fi
81ecdfbb
RW
12844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12845$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12846 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12847 ;;
12848esac
12849
c906108c
SS
12850
12851
12852if test ${build} = ${host} -a ${host} = ${target} ; then
12853 case ${host_os} in
12854 hpux*)
81ecdfbb
RW
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
12856$as_echo_n "checking for HPUX/OSF thread support... " >&6; }
c906108c
SS
12857 if test -f /usr/include/dce/cma_config.h ; then
12858 if test "$GCC" = "yes" ; then
81ecdfbb
RW
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12860$as_echo "yes" >&6; }
60ca704f 12861
81ecdfbb 12862$as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h
c906108c 12863
3483b318 12864 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
12865 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
12866 else
81ecdfbb
RW
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5
12868$as_echo "no (suppressed because you are not using GCC)" >&6; }
c906108c
SS
12869 fi
12870 else
81ecdfbb
RW
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12872$as_echo "no" >&6; }
c906108c
SS
12873 fi
12874 ;;
12875 solaris*)
d92419e5
JB
12876 # See if thread_db library is around for Solaris thread debugging.
12877 # Note that we must explicitly test for version 1 of the library
12878 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12879 # the same API.
81ecdfbb
RW
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12881$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12882 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12884$as_echo "yes" >&6; }
60ca704f 12885
81ecdfbb 12886$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12887
3483b318 12888 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12889 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12891$as_echo_n "checking for dlopen in -ldl... " >&6; }
12892if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12893 $as_echo_n "(cached) " >&6
c906108c 12894else
bec39cab 12895 ac_check_lib_save_LIBS=$LIBS
c906108c 12896LIBS="-ldl $LIBS"
81ecdfbb 12897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12898/* end confdefs.h. */
12899
81ecdfbb
RW
12900/* Override any GCC internal prototype to avoid an error.
12901 Use char because int might match the return type of a GCC
12902 builtin and then its argument prototype would still apply. */
bec39cab
AC
12903#ifdef __cplusplus
12904extern "C"
12905#endif
bec39cab
AC
12906char dlopen ();
12907int
12908main ()
12909{
81ecdfbb 12910return dlopen ();
bec39cab
AC
12911 ;
12912 return 0;
12913}
12914_ACEOF
81ecdfbb 12915if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12916 ac_cv_lib_dl_dlopen=yes
12917else
81ecdfbb 12918 ac_cv_lib_dl_dlopen=no
bec39cab 12919fi
81ecdfbb
RW
12920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12922LIBS=$ac_check_lib_save_LIBS
12923fi
81ecdfbb
RW
12924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12925$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12926if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12927 cat >>confdefs.h <<_ACEOF
12928#define HAVE_LIBDL 1
12929_ACEOF
c906108c
SS
12930
12931 LIBS="-ldl $LIBS"
12932
c906108c
SS
12933fi
12934
12935 if test "$GCC" = "yes" ; then
12936 # The GNU linker requires the -export-dynamic option to make
12937 # all symbols visible in the dynamic symbol table.
12938 hold_ldflags=$LDFLAGS
81ecdfbb
RW
12939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5
12940$as_echo_n "checking for the ld -export-dynamic flag... " >&6; }
c906108c 12941 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
81ecdfbb 12942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12943/* end confdefs.h. */
c906108c 12944
bec39cab
AC
12945int
12946main ()
12947{
c906108c 12948int i;
bec39cab
AC
12949 ;
12950 return 0;
12951}
12952_ACEOF
81ecdfbb 12953if ac_fn_c_try_link "$LINENO"; then :
c906108c
SS
12954 found=yes
12955else
81ecdfbb 12956 found=no
c906108c 12957fi
81ecdfbb
RW
12958rm -f core conftest.err conftest.$ac_objext \
12959 conftest$ac_exeext conftest.$ac_ext
c906108c 12960 LDFLAGS=$hold_ldflags
81ecdfbb
RW
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12962$as_echo "$found" >&6; }
c906108c
SS
12963 if test $found = yes; then
12964 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
12965 fi
12966 fi
12967 # Sun randomly tweaked the prototypes in <proc_service.h>
12968 # at one point.
81ecdfbb
RW
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12970$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12971 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12972 $as_echo_n "(cached) " >&6
c906108c 12973else
bec39cab 12974
81ecdfbb 12975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12976/* end confdefs.h. */
c906108c
SS
12977
12978 #include <proc_service.h>
12979 ps_err_e ps_pdwrite
12980 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12981
bec39cab
AC
12982int
12983main ()
12984{
12985
12986 ;
12987 return 0;
12988}
12989_ACEOF
81ecdfbb 12990if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12991 gdb_cv_proc_service_is_old=no
12992else
81ecdfbb 12993 gdb_cv_proc_service_is_old=yes
c906108c 12994fi
81ecdfbb 12995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12996
c906108c
SS
12997fi
12998
81ecdfbb
RW
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13000$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13001 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13002
81ecdfbb 13003$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13004
13005 fi
13006 else
81ecdfbb
RW
13007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13008$as_echo "no" >&6; }
c906108c
SS
13009 fi
13010 ;;
d92419e5 13011 aix*)
81ecdfbb
RW
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13013$as_echo_n "checking for AiX thread debugging library... " >&6; }
13014 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13015 $as_echo_n "(cached) " >&6
bec39cab 13016else
81ecdfbb 13017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13018/* end confdefs.h. */
d92419e5 13019#include <sys/pthdebug.h>
bec39cab
AC
13020int
13021main ()
13022{
d92419e5
JB
13023#ifndef PTHDB_VERSION_3
13024 #error
13025 #endif
bec39cab
AC
13026 ;
13027 return 0;
13028}
13029_ACEOF
81ecdfbb 13030if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13031 gdb_cv_have_aix_thread_debug=yes
13032else
81ecdfbb 13033 gdb_cv_have_aix_thread_debug=no
d92419e5 13034fi
81ecdfbb 13035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13036fi
13037
81ecdfbb
RW
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13039$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13040 if test $gdb_cv_have_aix_thread_debug = yes; then
13041 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13042 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
13043 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
13044 fi
13045 ;;
c906108c 13046 esac
bec39cab 13047
c906108c
SS
13048fi
13049
3f47be5c 13050if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13052$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13053if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13054 $as_echo_n "(cached) " >&6
bec39cab 13055else
81ecdfbb 13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13057/* end confdefs.h. */
3f47be5c 13058#include <thread_db.h>
bec39cab
AC
13059int
13060main ()
13061{
3f47be5c 13062int i = TD_NOTALLOC;
bec39cab
AC
13063 ;
13064 return 0;
13065}
13066_ACEOF
81ecdfbb 13067if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13068 gdb_cv_thread_db_h_has_td_notalloc=yes
13069else
81ecdfbb 13070 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13071
3f47be5c 13072fi
81ecdfbb 13073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13074
bec39cab 13075fi
81ecdfbb
RW
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13077$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13079$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13080if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13081 $as_echo_n "(cached) " >&6
59f80f10 13082else
81ecdfbb 13083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13084/* end confdefs.h. */
13085#include <thread_db.h>
13086int
13087main ()
13088{
13089int i = TD_VERSION;
13090 ;
13091 return 0;
13092}
13093_ACEOF
81ecdfbb 13094if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13095 gdb_cv_thread_db_h_has_td_version=yes
13096else
81ecdfbb 13097 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13098
13099fi
81ecdfbb 13100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13101
13102fi
81ecdfbb
RW
13103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13104$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13106$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13107if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13108 $as_echo_n "(cached) " >&6
59f80f10 13109else
81ecdfbb 13110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13111/* end confdefs.h. */
13112#include <thread_db.h>
13113int
13114main ()
13115{
13116int i = TD_NOTLS;
13117 ;
13118 return 0;
13119}
13120_ACEOF
81ecdfbb 13121if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13122 gdb_cv_thread_db_h_has_td_notls=yes
13123else
81ecdfbb 13124 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13125
13126fi
81ecdfbb 13127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13128
13129fi
81ecdfbb
RW
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13131$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13132fi
13133if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 13134
81ecdfbb 13135$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 13136
59f80f10
DJ
13137fi
13138if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
13139
81ecdfbb 13140$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
13141
13142fi
13143if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
13144
81ecdfbb 13145$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 13146
3f47be5c
EZ
13147fi
13148
b757528f 13149if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
13150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
13151$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
13152if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
13153 $as_echo_n "(cached) " >&6
bec39cab 13154else
81ecdfbb 13155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13156/* end confdefs.h. */
b757528f 13157#include <sys/syscall.h>
bec39cab
AC
13158int
13159main ()
13160{
b757528f 13161int i = __NR_tkill;
bec39cab
AC
13162 ;
13163 return 0;
13164}
13165_ACEOF
81ecdfbb 13166if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
13167 gdb_cv_sys_syscall_h_has_tkill=yes
13168else
81ecdfbb 13169 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 13170
b757528f 13171fi
81ecdfbb 13172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 13173
bec39cab 13174fi
81ecdfbb
RW
13175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
13176$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
13177fi
13178if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 13179
81ecdfbb 13180$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
13181
13182fi
13183
81ecdfbb
RW
13184ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13185"
13186if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
13187 ac_have_decl=1
10568435 13188else
81ecdfbb 13189 ac_have_decl=0
10568435 13190fi
10568435
JK
13191
13192cat >>confdefs.h <<_ACEOF
81ecdfbb 13193#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
13194_ACEOF
13195
13196
81ecdfbb
RW
13197if test "$cross_compiling" = yes; then :
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13199/* end confdefs.h. */
13200#include <sys/personality.h>
13201int
13202main ()
13203{
13204
13205# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13206# define ADDR_NO_RANDOMIZE 0x0040000
13207# endif
13208 /* Test the flag could be set and stays set. */
13209 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13210 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13211 return 1
13212 ;
13213 return 0;
13214}
13215_ACEOF
81ecdfbb 13216if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
13217 have_personality=true
13218else
81ecdfbb 13219 have_personality=false
10568435 13220fi
81ecdfbb
RW
13221rm -f core conftest.err conftest.$ac_objext \
13222 conftest$ac_exeext conftest.$ac_ext
10568435 13223else
81ecdfbb 13224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13225/* end confdefs.h. */
13226#include <sys/personality.h>
13227int
13228main ()
13229{
13230
13231# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13232# define ADDR_NO_RANDOMIZE 0x0040000
13233# endif
13234 /* Test the flag could be set and stays set. */
13235 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13236 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13237 return 1
13238 ;
13239 return 0;
13240}
13241_ACEOF
81ecdfbb 13242if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
13243 have_personality=true
13244else
81ecdfbb 13245 have_personality=false
10568435 13246fi
81ecdfbb
RW
13247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13248 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 13249fi
81ecdfbb 13250
10568435
JK
13251if $have_personality
13252then
13253
81ecdfbb 13254$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
13255
13256fi
13257
fb40c209 13258
b14b1491 13259target_sysroot_reloc=0
bec39cab 13260
81ecdfbb
RW
13261# Check whether --with-sysroot was given.
13262if test "${with_sysroot+set}" = set; then :
13263 withval=$with_sysroot;
030292b7 13264 case ${with_sysroot} in
715d1656 13265 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
13266 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
13267 esac
13268
13269 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
13270
07abfebf
RS
13271 if test "x$prefix" = xNONE; then
13272 test_prefix=/usr/local
13273 else
13274 test_prefix=$prefix
13275 fi
aa28a74e 13276 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 13277 test_exec_prefix=$test_prefix
030292b7 13278 else
07abfebf 13279 test_exec_prefix=$exec_prefix
030292b7
DJ
13280 fi
13281 case ${TARGET_SYSTEM_ROOT} in
715d1656 13282 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
13283 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
13284 '${prefix}'|'${prefix}/'*|\
715d1656 13285 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 13286 target_sysroot_reloc=1
030292b7
DJ
13287 ;;
13288 esac
13289
13290else
bec39cab 13291
030292b7
DJ
13292 TARGET_SYSTEM_ROOT=
13293 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
13294
81ecdfbb 13295fi
b14b1491 13296
81ecdfbb 13297TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
13298
13299
13300
16e7150e 13301
16e7150e 13302
81ecdfbb
RW
13303# Check whether --with-system-gdbinit was given.
13304if test "${with_system_gdbinit+set}" = set; then :
13305 withval=$with_system_gdbinit;
b14b1491
TT
13306 SYSTEM_GDBINIT=$withval
13307else
13308 SYSTEM_GDBINIT=
81ecdfbb
RW
13309fi
13310
16e7150e
JG
13311
13312 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13313 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13314 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13315 ac_define_dir=`eval echo $ac_define_dir`
13316
13317cat >>confdefs.h <<_ACEOF
13318#define SYSTEM_GDBINIT "$ac_define_dir"
13319_ACEOF
13320
13321
13322
b14b1491
TT
13323 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13324 if test "x$prefix" = xNONE; then
13325 test_prefix=/usr/local
13326 else
13327 test_prefix=$prefix
13328 fi
13329 else
13330 test_prefix=$exec_prefix
13331 fi
13332 value=0
13333 case ${ac_define_dir} in
13334 "${test_prefix}"|"${test_prefix}/"*|\
13335 '${exec_prefix}'|'${exec_prefix}/'*)
13336 value=1
13337 ;;
13338 esac
16e7150e 13339
b14b1491
TT
13340cat >>confdefs.h <<_ACEOF
13341#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13342_ACEOF
13343
b14b1491 13344
16e7150e 13345
81ecdfbb
RW
13346# Check whether --enable-werror was given.
13347if test "${enable_werror+set}" = set; then :
13348 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13349 yes | y) ERROR_ON_WARNING="yes" ;;
13350 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13351 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13352 esac
81ecdfbb
RW
13353fi
13354
094a342e
MK
13355
13356# Enable -Werror by default when using gcc
13357if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
13358 ERROR_ON_WARNING=yes
13359fi
13360
13361WERROR_CFLAGS=""
13362if test "${ERROR_ON_WARNING}" = yes ; then
13363 WERROR_CFLAGS="-Werror"
13364fi
13365
aa79a185
DJ
13366# The entries after -Wno-pointer-sign are disabled warnings which may
13367# be enabled in the future, which can not currently be used to build
13368# GDB.
13369# NOTE: If you change this list, remember to update
3b851bce 13370# gdb/doc/gdbint.texinfo.
aa79a185
DJ
13371build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
13372-Wformat-nonliteral -Wno-pointer-sign \
e23525a0 13373-Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts"
a3b362c4 13374
3526781e
DJ
13375# Enable -Wno-format by default when using gcc on mingw since many
13376# GCC versions complain about %I64.
13377case "${host}" in
13378 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
13379esac
13380
81ecdfbb
RW
13381# Check whether --enable-build-warnings was given.
13382if test "${enable_build_warnings+set}" = set; then :
13383 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13384 yes) ;;
13385 no) build_warnings="-w";;
13386 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13387 build_warnings="${build_warnings} ${t}";;
13388 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13389 build_warnings="${t} ${build_warnings}";;
13390 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13391esac
d4f3574e 13392if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13393 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13394fi
81ecdfbb
RW
13395fi
13396# Check whether --enable-gdb-build-warnings was given.
13397if test "${enable_gdb_build_warnings+set}" = set; then :
13398 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13399 yes) ;;
13400 no) build_warnings="-w";;
13401 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13402 build_warnings="${build_warnings} ${t}";;
13403 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13404 build_warnings="${t} ${build_warnings}";;
13405 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13406esac
13407if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13408 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13409fi
81ecdfbb
RW
13410fi
13411WARN_CFLAGS=""
c906108c
SS
13412if test "x${build_warnings}" != x -a "x$GCC" = xyes
13413then
81ecdfbb
RW
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13415$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13416 # Separate out the -Werror flag as some files just cannot be
13417 # compiled with it enabled.
13418 for w in ${build_warnings}; do
13419 case $w in
13420 -Werr*) WERROR_CFLAGS=-Werror ;;
13421 *) # Check that GCC accepts it
4536bbc6
AC
13422 saved_CFLAGS="$CFLAGS"
13423 CFLAGS="$CFLAGS $w"
81ecdfbb 13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13425/* end confdefs.h. */
4536bbc6 13426
bec39cab
AC
13427int
13428main ()
13429{
4536bbc6 13430
bec39cab
AC
13431 ;
13432 return 0;
13433}
13434_ACEOF
81ecdfbb 13435if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13436 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13437fi
81ecdfbb 13438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13439 CFLAGS="$saved_CFLAGS"
746a987d
AC
13440 esac
13441 done
81ecdfbb
RW
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13443$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13444fi
13445
13446
104c1213 13447
7a292a7a 13448# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13450$as_echo_n "checking for cygwin... " >&6; }
13451if test "${gdb_cv_os_cygwin+set}" = set; then :
13452 $as_echo_n "(cached) " >&6
bec39cab 13453else
81ecdfbb 13454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13455/* end confdefs.h. */
7a292a7a
SS
13456
13457#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13458lose
13459#endif
bec39cab 13460_ACEOF
7a292a7a 13461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 13462 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
13463 gdb_cv_os_cygwin=yes
13464else
7a292a7a
SS
13465 gdb_cv_os_cygwin=no
13466fi
13467rm -f conftest*
13468
13469fi
81ecdfbb
RW
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13471$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13472
aff38e61 13473
3eb25fda 13474SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13475case ${host} in
95cbc983
AC
13476 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13477 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13478 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13479esac
13480
13481
cd0fc7c3
SS
13482# libreadline needs libuser32.a in a cygwin environment
13483WIN32LIBS=
13484if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13485 WIN32LIBS="-luser32"
13486 case "${target}" in
13487 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13488 ;;
13489 esac
cd0fc7c3 13490fi
c906108c 13491
b4505029
MM
13492# The ser-tcp.c module requires sockets.
13493case ${host} in
13494 *mingw32*)
13495
81ecdfbb 13496$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13497
13498 WIN32LIBS="$WIN32LIBS -lws2_32"
13499 ;;
13500esac
13501
7a292a7a 13502
31d99776
DJ
13503# Add ELF support to GDB, but only if BFD includes ELF support.
13504OLD_CFLAGS=$CFLAGS
13505OLD_LDFLAGS=$LDFLAGS
13506OLD_LIBS=$LIBS
cab58a69 13507CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 13508LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 13509intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 13510LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13512$as_echo_n "checking for ELF support in BFD... " >&6; }
13513if test "${gdb_cv_var_elf+set}" = set; then :
13514 $as_echo_n "(cached) " >&6
31d99776 13515else
81ecdfbb 13516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13517/* end confdefs.h. */
13518#include <stdlib.h>
13519#include "bfd.h"
13520#include "elf-bfd.h"
13521
13522int
13523main ()
13524{
13525bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
13526 ;
13527 return 0;
13528}
13529_ACEOF
81ecdfbb 13530if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13531 gdb_cv_var_elf=yes
13532else
81ecdfbb 13533 gdb_cv_var_elf=no
31d99776 13534fi
81ecdfbb
RW
13535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
31d99776 13537fi
81ecdfbb
RW
13538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13539$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
13540if test $gdb_cv_var_elf = yes; then
13541 CONFIG_OBS="$CONFIG_OBS elfread.o"
13542
81ecdfbb 13543$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776
DJ
13544
13545fi
13546CFLAGS=$OLD_CFLAGS
13547LDFLAGS=$OLD_LDFLAGS
13548LIBS=$OLD_LIBS
13549
121ce6e5
DJ
13550# Add any host-specific objects to GDB.
13551CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13552
3fc11d3e
JM
13553LIBGUI="../libgui/src/libgui.a"
13554GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13555
13556
7a292a7a 13557
3fc11d3e
JM
13558WIN32LDAPP=
13559
13560
13561
d91670b9 13562case "${host}" in
686a5eed 13563*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13564 configdir="win"
13565 ;;
13566*)
13567 configdir="unix"
13568 ;;
13569esac
3fc11d3e
JM
13570
13571GDBTKLIBS=
13572if test "${enable_gdbtk}" = "yes"; then
13573
d1c3b63a
KS
13574 # Gdbtk must have an absolute path to srcdir in order to run
13575 # properly when not installed.
13576 here=`pwd`
13577 cd ${srcdir}
13578 GDBTK_SRC_DIR=`pwd`
13579 cd $here
13580
bec39cab 13581
5062cc19
KS
13582 #
13583 # Ok, lets find the tcl configuration
13584 # First, look for one uninstalled.
13585 # the alternative search directory is invoked by --with-tcl
13586 #
3fc11d3e 13587
5062cc19
KS
13588 if test x"${no_tcl}" = x ; then
13589 # we reset no_tcl in case something fails here
13590 no_tcl=true
bec39cab 13591
81ecdfbb
RW
13592# Check whether --with-tcl was given.
13593if test "${with_tcl+set}" = set; then :
13594 withval=$with_tcl; with_tclconfig=${withval}
13595fi
13596
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13598$as_echo_n "checking for Tcl configuration... " >&6; }
13599 if test "${ac_cv_c_tclconfig+set}" = set; then :
13600 $as_echo_n "(cached) " >&6
3fc11d3e 13601else
bec39cab 13602
3fc11d3e 13603
5062cc19
KS
13604 # First check to see if --with-tcl was specified.
13605 case "${host}" in
13606 *-*-cygwin*) platDir="win" ;;
13607 *) platDir="unix" ;;
13608 esac
13609 if test x"${with_tclconfig}" != x ; then
13610 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13611 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13612 else
81ecdfbb 13613 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13614 fi
13615 fi
13616
13617 # then check for a private Tcl installation
13618 if test x"${ac_cv_c_tclconfig}" = x ; then
13619 for i in \
13620 ../tcl \
13621 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13622 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13623 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13624 ../../tcl \
13625 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13626 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13627 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13628 ../../../tcl \
13629 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13630 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13631 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13632 if test -f "$i/$platDir/tclConfig.sh" ; then
13633 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13634 break
13635 fi
13636 done
13637 fi
13638
13639 # on Darwin, check in Framework installation locations
13640 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13641 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13642 `ls -d /Library/Frameworks 2>/dev/null` \
13643 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13644 `ls -d /System/Library/Frameworks 2>/dev/null` \
13645 ; do
13646 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13647 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13648 break
13649 fi
13650 done
13651 fi
13652
13653 # check in a few common install locations
13654 if test x"${ac_cv_c_tclconfig}" = x ; then
13655 for i in `ls -d ${libdir} 2>/dev/null` \
13656 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13657 `ls -d ${prefix}/lib 2>/dev/null` \
13658 `ls -d /usr/local/lib 2>/dev/null` \
13659 `ls -d /usr/contrib/lib 2>/dev/null` \
13660 `ls -d /usr/lib 2>/dev/null` \
13661 ; do
13662 if test -f "$i/tclConfig.sh" ; then
13663 ac_cv_c_tclconfig=`(cd $i; pwd)`
13664 break
13665 fi
13666 done
13667 fi
3fc11d3e 13668
5062cc19
KS
13669 # check in a few other private locations
13670 if test x"${ac_cv_c_tclconfig}" = x ; then
13671 for i in \
13672 ${srcdir}/../tcl \
13673 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13674 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13675 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13676 if test -f "$i/$platDir/tclConfig.sh" ; then
13677 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13678 break
13679 fi
13680 done
13681 fi
bec39cab 13682
3fc11d3e
JM
13683fi
13684
5062cc19
KS
13685
13686 if test x"${ac_cv_c_tclconfig}" = x ; then
13687 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13689$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13690 else
13691 no_tcl=
13692 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13694$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13695 fi
13696 fi
3fc11d3e 13697
bec39cab 13698
85541719
DE
13699 # If $no_tk is nonempty, then we can't do Tk, and there is no
13700 # point to doing Tcl.
bec39cab 13701
5062cc19
KS
13702 #
13703 # Ok, lets find the tk configuration
13704 # First, look for one uninstalled.
13705 # the alternative search directory is invoked by --with-tk
13706 #
3fc11d3e 13707
5062cc19
KS
13708 if test x"${no_tk}" = x ; then
13709 # we reset no_tk in case something fails here
13710 no_tk=true
bec39cab 13711
81ecdfbb
RW
13712# Check whether --with-tk was given.
13713if test "${with_tk+set}" = set; then :
13714 withval=$with_tk; with_tkconfig=${withval}
13715fi
13716
13717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13718$as_echo_n "checking for Tk configuration... " >&6; }
13719 if test "${ac_cv_c_tkconfig+set}" = set; then :
13720 $as_echo_n "(cached) " >&6
bec39cab 13721else
3fc11d3e
JM
13722
13723
5062cc19
KS
13724 # First check to see if --with-tkconfig was specified.
13725 if test x"${with_tkconfig}" != x ; then
13726 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13727 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13728 else
81ecdfbb 13729 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13730 fi
13731 fi
3fc11d3e 13732
5062cc19
KS
13733 # then check for a private Tk library
13734 case "${host}" in
13735 *-*-cygwin*) platDir="win" ;;
13736 *) platDir="unix" ;;
13737 esac
13738 if test x"${ac_cv_c_tkconfig}" = x ; then
13739 for i in \
13740 ../tk \
13741 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13742 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13743 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13744 ../../tk \
13745 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13746 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13747 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13748 ../../../tk \
13749 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13750 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13751 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13752 if test -f "$i/$platDir/tkConfig.sh" ; then
13753 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13754 break
13755 fi
13756 done
13757 fi
13758
13759 # on Darwin, check in Framework installation locations
13760 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13761 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13762 `ls -d /Library/Frameworks 2>/dev/null` \
13763 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13764 `ls -d /System/Library/Frameworks 2>/dev/null` \
13765 ; do
13766 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13767 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13768 break
13769 fi
13770 done
13771 fi
13772
13773 # check in a few common install locations
13774 if test x"${ac_cv_c_tkconfig}" = x ; then
13775 for i in `ls -d ${libdir} 2>/dev/null` \
13776 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13777 `ls -d ${prefix}/lib 2>/dev/null` \
13778 `ls -d /usr/local/lib 2>/dev/null` \
13779 `ls -d /usr/contrib/lib 2>/dev/null` \
13780 `ls -d /usr/lib 2>/dev/null` \
13781 ; do
13782 if test -f "$i/tkConfig.sh" ; then
13783 ac_cv_c_tkconfig=`(cd $i; pwd)`
13784 break
13785 fi
13786 done
13787 fi
13788 # check in a few other private locations
13789 if test x"${ac_cv_c_tkconfig}" = x ; then
13790 for i in \
13791 ${srcdir}/../tk \
13792 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13793 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13794 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13795 if test -f "$i/$platDir/tkConfig.sh" ; then
13796 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13797 break
13798 fi
13799 done
13800 fi
3fc11d3e 13801
3fc11d3e
JM
13802fi
13803
13804
5062cc19
KS
13805 if test x"${ac_cv_c_tkconfig}" = x ; then
13806 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13808$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13809 else
13810 no_tk=
13811 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13813$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13814 fi
3fc11d3e 13815 fi
dd2504ab 13816
dd2504ab 13817
85541719
DE
13818 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13819
81ecdfbb
RW
13820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13821$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13822
13823 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13825$as_echo "loading" >&6; }
85541719
DE
13826 . ${TCL_BIN_DIR}/tclConfig.sh
13827 else
81ecdfbb
RW
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13829$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13830 fi
13831
13832 # eval is required to do the TCL_DBGX substitution
13833 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13834 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13835
13836 # If the TCL_BIN_DIR is the build directory (not the install directory),
13837 # then set the common variable name to the value of the build variables.
13838 # For example, the variable TCL_LIB_SPEC will be set to the value
13839 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13840 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13841 # installed and uninstalled version of Tcl.
13842 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13843 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13844 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13845 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13846 elif test "`uname -s`" = "Darwin"; then
13847 # If Tcl was built as a framework, attempt to use the libraries
13848 # from the framework at the given location so that linking works
13849 # against Tcl.framework installed in an arbitary location.
13850 case ${TCL_DEFS} in
13851 *TCL_FRAMEWORK*)
13852 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13853 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13854 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13855 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13856 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13857 break
13858 fi
13859 done
13860 fi
13861 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13862 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13863 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13864 fi
13865 ;;
13866 esac
13867 fi
13868
13869 # eval is required to do the TCL_DBGX substitution
13870 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13871 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13872 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13873 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889 # Check for in-tree tcl
13890 here=`pwd`
13891 cd ${srcdir}/..
13892 topdir=`pwd`
13893 cd ${here}
13894
13895 intree="no"
13896 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13897 intree="yes"
13898 fi
13899
13900 # Find Tcl private headers
13901 if test x"${intree}" = xno; then
13902
81ecdfbb
RW
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13904$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13905 private_dir=""
13906 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13907 if test -f ${dir}/tclInt.h ; then
13908 private_dir=${dir}
13909 fi
13910
13911 if test x"${private_dir}" = x; then
81ecdfbb 13912 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13913 else
13914 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13916$as_echo "${private_dir}" >&6; }
85541719
DE
13917 fi
13918
13919 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13920 TCL_LIBRARY="${TCL_LIB_SPEC}"
13921 TCL_DEPS=""
13922 else
13923 # If building tcl in the same src tree, private headers
13924 # are not needed, but we need to be sure to use the right
13925 # headers library
13926 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13927 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13928 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13929 fi
13930
13931
13932
13933
13934
81ecdfbb
RW
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13936$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13937
5062cc19 13938 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13940$as_echo "loading" >&6; }
5062cc19 13941 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13942 else
81ecdfbb
RW
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13944$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13945 fi
bec39cab 13946
5062cc19
KS
13947 # eval is required to do the TK_DBGX substitution
13948 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13949 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13950
13951 # If the TK_BIN_DIR is the build directory (not the install directory),
13952 # then set the common variable name to the value of the build variables.
13953 # For example, the variable TK_LIB_SPEC will be set to the value
13954 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13955 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13956 # installed and uninstalled version of Tcl.
85541719 13957 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13958 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13959 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13960 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13961 elif test "`uname -s`" = "Darwin"; then
13962 # If Tk was built as a framework, attempt to use the libraries
13963 # from the framework at the given location so that linking works
13964 # against Tk.framework installed in an arbitary location.
13965 case ${TK_DEFS} in
13966 *TK_FRAMEWORK*)
85541719 13967 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13968 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13969 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13970 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13971 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13972 break
13973 fi
13974 done
13975 fi
85541719 13976 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13977 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13978 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13979 fi
13980 ;;
13981 esac
3fc11d3e
JM
13982 fi
13983
5062cc19
KS
13984 # eval is required to do the TK_DBGX substitution
13985 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13986 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13987 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13988 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13989
3fc11d3e
JM
13990
13991
bec39cab
AC
13992
13993
13994
13995
13996
13997
13998
3fc11d3e 13999
3fc11d3e 14000
bec39cab 14001
bec39cab 14002
85541719
DE
14003 # Check for in-tree Tk
14004 intree="no"
14005 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14006 intree="yes"
14007 fi
3fc11d3e 14008
85541719
DE
14009 # Find Tk private headers
14010 if test x"${intree}" = xno; then
3fc11d3e 14011
81ecdfbb
RW
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14013$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14014 private_dir=""
14015 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14016 if test -f ${dir}/tkInt.h; then
14017 private_dir=${dir}
3fc11d3e 14018 fi
bec39cab 14019
5062cc19 14020 if test x"${private_dir}" = x; then
81ecdfbb 14021 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14022 else
5062cc19 14023 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14025$as_echo "${private_dir}" >&6; }
3fc11d3e 14026 fi
3fc11d3e 14027
85541719
DE
14028 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14029 TK_LIBRARY=${TK_LIB_SPEC}
14030 TK_DEPS=""
14031 else
14032 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14033 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14034 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14035 fi
3fc11d3e
JM
14036
14037
3fc11d3e
JM
14038
14039
3fc11d3e 14040
85541719 14041 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14042
85541719
DE
14043 # Include some libraries that Tcl and Tk want.
14044 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14045 # Yes, the ordering seems wrong here. But it isn't.
14046 # TK_LIBS is the list of libraries that need to be linked
14047 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14048 # were in LIBS then any link tests after this point would
14049 # try to include things like `$(LIBGUI)', which wouldn't work.
14050 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14051
85541719
DE
14052 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14053 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14054 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14055 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14056 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14057 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14058 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14059
85541719
DE
14060 if test x$gdb_cv_os_cygwin = xyes; then
14061 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14062 WIN32LDAPP="-Wl,--subsystem,console"
14063 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14064 fi
ffc6a242 14065
81ecdfbb 14066 subdirs="$subdirs gdbtk"
3ace7edb 14067
85541719 14068 fi
3fc11d3e
JM
14069fi
14070
14071
14072
14073
14074
14075
14076
14077
81ecdfbb
RW
14078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14079$as_echo_n "checking for X... " >&6; }
bec39cab 14080
c906108c 14081
81ecdfbb
RW
14082# Check whether --with-x was given.
14083if test "${with_x+set}" = set; then :
14084 withval=$with_x;
14085fi
c906108c
SS
14086
14087# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14088if test "x$with_x" = xno; then
14089 # The user explicitly disabled X.
14090 have_x=disabled
14091else
81ecdfbb
RW
14092 case $x_includes,$x_libraries in #(
14093 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14094 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14095 $as_echo_n "(cached) " >&6
c906108c
SS
14096else
14097 # One or both of the vars are not set, and there is no cached value.
bec39cab 14098ac_x_includes=no ac_x_libraries=no
81ecdfbb 14099rm -f -r conftest.dir
bec39cab
AC
14100if mkdir conftest.dir; then
14101 cd conftest.dir
bec39cab 14102 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14103incroot:
14104 @echo incroot='${INCROOT}'
14105usrlibdir:
14106 @echo usrlibdir='${USRLIBDIR}'
14107libdir:
14108 @echo libdir='${LIBDIR}'
14109_ACEOF
14110 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14111 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14112 for ac_var in incroot usrlibdir libdir; do
14113 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14114 done
c906108c 14115 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14116 for ac_extension in a so sl dylib la dll; do
14117 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14118 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14119 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14120 fi
14121 done
14122 # Screen out bogus values from the imake configuration. They are
14123 # bogus both because they are the default anyway, and because
14124 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14125 case $ac_im_incroot in
81ecdfbb 14126 /usr/include) ac_x_includes= ;;
bec39cab 14127 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14128 esac
bec39cab 14129 case $ac_im_usrlibdir in
81ecdfbb 14130 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14131 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14132 esac
14133 fi
14134 cd ..
81ecdfbb 14135 rm -f -r conftest.dir
c906108c
SS
14136fi
14137
bec39cab
AC
14138# Standard set of common directories for X headers.
14139# Check X11 before X11Rn because it is often a symlink to the current release.
14140ac_x_header_dirs='
14141/usr/X11/include
81ecdfbb 14142/usr/X11R7/include
bec39cab
AC
14143/usr/X11R6/include
14144/usr/X11R5/include
14145/usr/X11R4/include
14146
14147/usr/include/X11
81ecdfbb 14148/usr/include/X11R7
bec39cab
AC
14149/usr/include/X11R6
14150/usr/include/X11R5
14151/usr/include/X11R4
14152
14153/usr/local/X11/include
81ecdfbb 14154/usr/local/X11R7/include
bec39cab
AC
14155/usr/local/X11R6/include
14156/usr/local/X11R5/include
14157/usr/local/X11R4/include
14158
14159/usr/local/include/X11
81ecdfbb 14160/usr/local/include/X11R7
bec39cab
AC
14161/usr/local/include/X11R6
14162/usr/local/include/X11R5
14163/usr/local/include/X11R4
14164
14165/usr/X386/include
14166/usr/x386/include
14167/usr/XFree86/include/X11
14168
14169/usr/include
14170/usr/local/include
14171/usr/unsupported/include
14172/usr/athena/include
14173/usr/local/x11r5/include
14174/usr/lpp/Xamples/include
14175
14176/usr/openwin/include
14177/usr/openwin/share/include'
14178
14179if test "$ac_x_includes" = no; then
81ecdfbb 14180 # Guess where to find include files, by looking for Xlib.h.
c906108c 14181 # First, try using that file with no special directory specified.
81ecdfbb 14182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14183/* end confdefs.h. */
81ecdfbb 14184#include <X11/Xlib.h>
bec39cab 14185_ACEOF
81ecdfbb 14186if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14187 # We can compile using X headers with no special include directory.
14188ac_x_includes=
14189else
bec39cab 14190 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14191 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14192 ac_x_includes=$ac_dir
14193 break
14194 fi
14195done
c906108c 14196fi
bec39cab
AC
14197rm -f conftest.err conftest.$ac_ext
14198fi # $ac_x_includes = no
c906108c 14199
bec39cab 14200if test "$ac_x_libraries" = no; then
c906108c 14201 # Check for the libraries.
c906108c
SS
14202 # See if we find them without any special options.
14203 # Don't add to $LIBS permanently.
bec39cab 14204 ac_save_LIBS=$LIBS
81ecdfbb
RW
14205 LIBS="-lX11 $LIBS"
14206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14207/* end confdefs.h. */
81ecdfbb 14208#include <X11/Xlib.h>
bec39cab
AC
14209int
14210main ()
14211{
81ecdfbb 14212XrmInitialize ()
bec39cab
AC
14213 ;
14214 return 0;
14215}
14216_ACEOF
81ecdfbb 14217if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14218 LIBS=$ac_save_LIBS
c906108c
SS
14219# We can link X programs with no special library path.
14220ac_x_libraries=
14221else
81ecdfbb
RW
14222 LIBS=$ac_save_LIBS
14223for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14224do
bec39cab 14225 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14226 for ac_extension in a so sl dylib la dll; do
14227 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14228 ac_x_libraries=$ac_dir
14229 break 2
14230 fi
14231 done
14232done
14233fi
81ecdfbb
RW
14234rm -f core conftest.err conftest.$ac_objext \
14235 conftest$ac_exeext conftest.$ac_ext
bec39cab 14236fi # $ac_x_libraries = no
c906108c 14237
81ecdfbb
RW
14238case $ac_x_includes,$ac_x_libraries in #(
14239 no,* | *,no | *\'*)
14240 # Didn't find X, or a directory has "'" in its name.
14241 ac_cv_have_x="have_x=no";; #(
14242 *)
14243 # Record where we found X for the cache.
14244 ac_cv_have_x="have_x=yes\
14245 ac_x_includes='$ac_x_includes'\
14246 ac_x_libraries='$ac_x_libraries'"
14247esac
c906108c 14248fi
81ecdfbb
RW
14249;; #(
14250 *) have_x=yes;;
14251 esac
c906108c
SS
14252 eval "$ac_cv_have_x"
14253fi # $with_x != no
14254
14255if test "$have_x" != yes; then
81ecdfbb
RW
14256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14257$as_echo "$have_x" >&6; }
c906108c
SS
14258 no_x=yes
14259else
14260 # If each of the values was on the command line, it overrides each guess.
14261 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14262 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14263 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14264 ac_cv_have_x="have_x=yes\
14265 ac_x_includes='$x_includes'\
14266 ac_x_libraries='$x_libraries'"
14267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14268$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14269fi
14270
14271
bec39cab 14272# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14273# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14274# This code just checks for a few cases where we'd like to ignore those
14275# definitions, even when they're present in the '.mt' file. These cases
14276# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14277# not part of the source tree.
7a292a7a 14278#
81ecdfbb
RW
14279# Check whether --enable-sim was given.
14280if test "${enable_sim+set}" = set; then :
14281 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14282 echo "enableval = ${enableval}";
14283 case "${enableval}" in
14284 yes) ignore_sim=false ;;
14285 no) ignore_sim=true ;;
14286 *) ignore_sim=false ;;
14287 esac
14288else
14289 ignore_sim=false
81ecdfbb
RW
14290fi
14291
7a292a7a
SS
14292
14293if test ! -d "${srcdir}/../sim"; then
14294 ignore_sim=true
14295fi
14296
9b624dbe
UW
14297SIM=
14298SIM_OBS=
14299if test "${ignore_sim}" = "false"; then
14300 if test x"${gdb_sim}" != x ; then
14301 SIM="${gdb_sim}"
14302 SIM_OBS="remote-sim.o"
60ca704f 14303
81ecdfbb 14304$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14305
9b624dbe 14306 fi
7a292a7a
SS
14307fi
14308
14309
14310
c906108c
SS
14311
14312
14313
14314
14315
14316
dfcd3bfb 14317
e56ac5c3
AC
14318
14319
b3a90332
AC
14320
14321
c35f4ffc 14322# List of host floatformats.
bec39cab
AC
14323
14324cat >>confdefs.h <<_ACEOF
c35f4ffc 14325#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14326_ACEOF
c35f4ffc 14327
bec39cab
AC
14328
14329cat >>confdefs.h <<_ACEOF
c35f4ffc 14330#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14331_ACEOF
14332
c35f4ffc 14333
bec39cab 14334cat >>confdefs.h <<_ACEOF
c35f4ffc 14335#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14336_ACEOF
c35f4ffc
AC
14337
14338
c906108c
SS
14339# target_subdir is used by the testsuite to find the target libraries.
14340target_subdir=
14341if test "${host}" != "${target}"; then
14342 target_subdir="${target_alias}/"
14343fi
14344
14345
14346frags=
771b4502 14347if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14348 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14349 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14350 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14351 fi
14352 frags="$frags $host_makefile_frag"
14353else
14354 host_makefile_frag=/dev/null
c906108c 14355fi
c906108c 14356
c906108c
SS
14357
14358
14359
771b4502 14360if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14361# We pick this up from the host configuration file (.mh) because we
14362# do not have a native configuration Makefile fragment.
c906108c
SS
14363nativefile=`sed -n '
14364s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14365' ${host_makefile_frag}`
c906108c
SS
14366fi
14367
14368
b00a8037 14369if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14370
14371cat >>confdefs.h <<_ACEOF
b00a8037 14372#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14373_ACEOF
b00a8037
DJ
14374
14375fi
14376
8dcde887 14377# Enable multi-ice-gdb-server.
81ecdfbb
RW
14378# Check whether --enable-multi-ice was given.
14379if test "${enable_multi_ice+set}" = set; then :
14380 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14381 yes | no)
14382 ;;
81ecdfbb 14383 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14384 esac
81ecdfbb 14385fi
b4e70030 14386
81ecdfbb
RW
14387if test "x$enable_multi_ice" = xyes; then
14388 subdirs="$subdirs multi-ice"
3ace7edb 14389
a85f51e7
DJ
14390fi
14391
a13e2c95
UW
14392# We only build gdbserver automatically in a native configuration.
14393if test "$gdb_native" = "yes"; then
81ecdfbb
RW
14394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14395$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14396 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14398$as_echo "yes" >&6; }
14399 subdirs="$subdirs gdbserver"
3ace7edb 14400
8dcde887 14401 else
81ecdfbb
RW
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14403$as_echo "no" >&6; }
8dcde887
MK
14404 fi
14405fi
14406
db985757 14407# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14408# to an empty version.
c906108c
SS
14409
14410files=
14411links=
5a2402b8 14412
c906108c
SS
14413rm -f nm.h
14414if test "${nativefile}" != ""; then
0f475e27
AC
14415 case "${nativefile}" in
14416 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14417 * ) GDB_NM_FILE="${nativefile}"
14418 esac
5a2402b8
AC
14419 files="${files} ${GDB_NM_FILE}"
14420 links="${links} nm.h"
60ca704f
SE
14421
14422cat >>confdefs.h <<_ACEOF
b78960be 14423#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14424_ACEOF
5a2402b8 14425
c906108c 14426fi
5a2402b8
AC
14427
14428
bec39cab
AC
14429ac_sources="$files"
14430ac_dests="$links"
14431while test -n "$ac_sources"; do
14432 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14433 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14434 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14435done
81ecdfbb 14436ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14437
14438
c906108c
SS
14439
14440
c906108c 14441
81ecdfbb 14442$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14443
bec39cab 14444
81ecdfbb
RW
14445ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
14446
14447ac_config_commands="$ac_config_commands default"
89a34d1b 14448
bec39cab
AC
14449cat >confcache <<\_ACEOF
14450# This file is a shell script that caches the results of configure
14451# tests run on this system so they can be shared between configure
14452# scripts and configure runs, see configure's option --config-cache.
14453# It is not useful on other systems. If it contains results you don't
14454# want to keep, you may remove or edit it.
14455#
14456# config.status only pays attention to the cache file if you give it
14457# the --recheck option to rerun configure.
14458#
14459# `ac_cv_env_foo' variables (set or unset) will be overridden when
14460# loading this file, other *unset* `ac_cv_foo' will be assigned the
14461# following values.
14462
14463_ACEOF
14464
14465# The following way of writing the cache mishandles newlines in values,
14466# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14467# So, we kill variables containing newlines.
bec39cab
AC
14468# Ultrix sh set writes to stderr and can't be redirected directly,
14469# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14470(
14471 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14472 eval ac_val=\$$ac_var
14473 case $ac_val in #(
14474 *${as_nl}*)
14475 case $ac_var in #(
14476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14478 esac
14479 case $ac_var in #(
14480 _ | IFS | as_nl) ;; #(
14481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14482 *) { eval $ac_var=; unset $ac_var;} ;;
14483 esac ;;
14484 esac
14485 done
14486
bec39cab 14487 (set) 2>&1 |
81ecdfbb
RW
14488 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14489 *${as_nl}ac_space=\ *)
14490 # `set' does not quote correctly, so add quotes: double-quote
14491 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14492 sed -n \
14493 "s/'/'\\\\''/g;
14494 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14495 ;; #(
bec39cab
AC
14496 *)
14497 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14498 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14499 ;;
81ecdfbb
RW
14500 esac |
14501 sort
14502) |
bec39cab 14503 sed '
81ecdfbb 14504 /^ac_cv_env_/b end
bec39cab 14505 t clear
81ecdfbb 14506 :clear
bec39cab
AC
14507 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14508 t end
81ecdfbb
RW
14509 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14510 :end' >>confcache
14511if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14512 if test -w "$cache_file"; then
14513 test "x$cache_file" != "x/dev/null" &&
14514 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14515$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14516 cat confcache >$cache_file
14517 else
81ecdfbb
RW
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14519$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14520 fi
14521fi
14522rm -f confcache
14523
14524test "x$prefix" = xNONE && prefix=$ac_default_prefix
14525# Let make expand exec_prefix.
14526test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14527
bec39cab
AC
14528DEFS=-DHAVE_CONFIG_H
14529
14530ac_libobjs=
14531ac_ltlibobjs=
14532for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14533 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14534 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14535 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14536 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14537 # will be set to the directory where LIBOBJS objects are built.
14538 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14539 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14540done
14541LIBOBJS=$ac_libobjs
14542
14543LTLIBOBJS=$ac_ltlibobjs
14544
14545
85981d60 14546if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14547 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14548Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14549fi
a417dc56 14550if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14551 as_fn_error "conditional \"GMAKE\" was never defined.
14552Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14553fi
783e057b 14554if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
14555 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
14556Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
14557fi
14558
14559 gl_libobjs=
14560 gl_ltlibobjs=
14561 if test -n "$gl_LIBOBJS"; then
14562 # Remove the extension.
14563 sed_drop_objext='s/\.o$//;s/\.obj$//'
14564 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14565 gl_libobjs="$gl_libobjs $i.$ac_objext"
14566 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
14567 done
14568 fi
14569 gl_LIBOBJS=$gl_libobjs
14570
14571 gl_LTLIBOBJS=$gl_ltlibobjs
14572
14573
14574
14575 gltests_libobjs=
14576 gltests_ltlibobjs=
14577 if test -n "$gltests_LIBOBJS"; then
14578 # Remove the extension.
14579 sed_drop_objext='s/\.o$//;s/\.obj$//'
14580 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14581 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
14582 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
14583 done
14584 fi
14585 gltests_LIBOBJS=$gltests_libobjs
14586
14587 gltests_LTLIBOBJS=$gltests_ltlibobjs
14588
14589
e28b3332 14590if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
14591 as_fn_error "conditional \"AMDEP\" was never defined.
14592Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
14593fi
14594if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
14595 as_fn_error "conditional \"am__fastdepCC\" was never defined.
14596Usually this means the macro was only invoked conditionally." "$LINENO" 5
14597fi
14598 if test -n "$EXEEXT"; then
14599 am__EXEEXT_TRUE=
14600 am__EXEEXT_FALSE='#'
14601else
14602 am__EXEEXT_TRUE='#'
14603 am__EXEEXT_FALSE=
e28b3332 14604fi
bec39cab 14605
81ecdfbb
RW
14606
14607
bec39cab 14608: ${CONFIG_STATUS=./config.status}
81ecdfbb 14609ac_write_fail=0
bec39cab
AC
14610ac_clean_files_save=$ac_clean_files
14611ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14612{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14613$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14614as_write_fail=0
14615cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14616#! $SHELL
14617# Generated by $as_me.
14618# Run this file to recreate the current configuration.
14619# Compiler output produced by configure, useful for debugging
14620# configure, is in config.log if it exists.
14621
14622debug=false
14623ac_cs_recheck=false
14624ac_cs_silent=false
bec39cab 14625
81ecdfbb
RW
14626SHELL=\${CONFIG_SHELL-$SHELL}
14627export SHELL
14628_ASEOF
14629cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14630## -------------------- ##
14631## M4sh Initialization. ##
14632## -------------------- ##
14633
14634# Be more Bourne compatible
14635DUALCASE=1; export DUALCASE # for MKS sh
14636if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14637 emulate sh
14638 NULLCMD=:
81ecdfbb 14639 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14640 # is contrary to our usage. Disable this feature.
14641 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14642 setopt NO_GLOB_SUBST
14643else
14644 case `(set -o) 2>/dev/null` in #(
14645 *posix*) :
14646 set -o posix ;; #(
14647 *) :
14648 ;;
14649esac
bec39cab 14650fi
bec39cab 14651
81ecdfbb
RW
14652
14653as_nl='
14654'
14655export as_nl
14656# Printing a long string crashes Solaris 7 /usr/bin/printf.
14657as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14658as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14660# Prefer a ksh shell builtin over an external printf program on Solaris,
14661# but without wasting forks for bash or zsh.
14662if test -z "$BASH_VERSION$ZSH_VERSION" \
14663 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14664 as_echo='print -r --'
14665 as_echo_n='print -rn --'
14666elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14667 as_echo='printf %s\n'
14668 as_echo_n='printf %s'
14669else
14670 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14671 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14672 as_echo_n='/usr/ucb/echo -n'
14673 else
14674 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14675 as_echo_n_body='eval
14676 arg=$1;
14677 case $arg in #(
14678 *"$as_nl"*)
14679 expr "X$arg" : "X\\(.*\\)$as_nl";
14680 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14681 esac;
14682 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14683 '
14684 export as_echo_n_body
14685 as_echo_n='sh -c $as_echo_n_body as_echo'
14686 fi
14687 export as_echo_body
14688 as_echo='sh -c $as_echo_body as_echo'
14689fi
14690
14691# The user is always right.
14692if test "${PATH_SEPARATOR+set}" != set; then
14693 PATH_SEPARATOR=:
14694 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14695 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14696 PATH_SEPARATOR=';'
14697 }
bec39cab
AC
14698fi
14699
14700
81ecdfbb
RW
14701# IFS
14702# We need space, tab and new line, in precisely that order. Quoting is
14703# there to prevent editors from complaining about space-tab.
14704# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14705# splitting by setting IFS to empty value.)
14706IFS=" "" $as_nl"
14707
14708# Find who we are. Look in the path if we contain no directory separator.
14709case $0 in #((
14710 *[\\/]* ) as_myself=$0 ;;
14711 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14712for as_dir in $PATH
14713do
14714 IFS=$as_save_IFS
14715 test -z "$as_dir" && as_dir=.
14716 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14717 done
14718IFS=$as_save_IFS
14719
14720 ;;
14721esac
14722# We did not find ourselves, most probably we were run as `sh COMMAND'
14723# in which case we are not to be found in the path.
14724if test "x$as_myself" = x; then
14725 as_myself=$0
14726fi
14727if test ! -f "$as_myself"; then
14728 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14729 exit 1
14730fi
14731
14732# Unset variables that we do not need and which cause bugs (e.g. in
14733# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14734# suppresses any "Segmentation fault" message there. '((' could
14735# trigger a bug in pdksh 5.2.14.
14736for as_var in BASH_ENV ENV MAIL MAILPATH
14737do eval test x\${$as_var+set} = xset \
14738 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14739done
bec39cab
AC
14740PS1='$ '
14741PS2='> '
14742PS4='+ '
14743
14744# NLS nuisances.
81ecdfbb
RW
14745LC_ALL=C
14746export LC_ALL
14747LANGUAGE=C
14748export LANGUAGE
14749
14750# CDPATH.
14751(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14752
14753
14754# as_fn_error ERROR [LINENO LOG_FD]
14755# ---------------------------------
14756# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14757# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14758# script with status $?, using 1 if that was 0.
14759as_fn_error ()
14760{
14761 as_status=$?; test $as_status -eq 0 && as_status=1
14762 if test "$3"; then
14763 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14764 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14765 fi
14766 $as_echo "$as_me: error: $1" >&2
14767 as_fn_exit $as_status
14768} # as_fn_error
14769
14770
14771# as_fn_set_status STATUS
14772# -----------------------
14773# Set $? to STATUS, without forking.
14774as_fn_set_status ()
14775{
14776 return $1
14777} # as_fn_set_status
14778
14779# as_fn_exit STATUS
14780# -----------------
14781# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14782as_fn_exit ()
14783{
14784 set +e
14785 as_fn_set_status $1
14786 exit $1
14787} # as_fn_exit
14788
14789# as_fn_unset VAR
14790# ---------------
14791# Portably unset VAR.
14792as_fn_unset ()
14793{
14794 { eval $1=; unset $1;}
14795}
14796as_unset=as_fn_unset
14797# as_fn_append VAR VALUE
14798# ----------------------
14799# Append the text in VALUE to the end of the definition contained in VAR. Take
14800# advantage of any shell optimizations that allow amortized linear growth over
14801# repeated appends, instead of the typical quadratic growth present in naive
14802# implementations.
14803if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14804 eval 'as_fn_append ()
14805 {
14806 eval $1+=\$2
14807 }'
14808else
14809 as_fn_append ()
14810 {
14811 eval $1=\$$1\$2
14812 }
14813fi # as_fn_append
14814
14815# as_fn_arith ARG...
14816# ------------------
14817# Perform arithmetic evaluation on the ARGs, and store the result in the
14818# global $as_val. Take advantage of shells that can avoid forks. The arguments
14819# must be portable across $(()) and expr.
14820if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14821 eval 'as_fn_arith ()
14822 {
14823 as_val=$(( $* ))
14824 }'
14825else
14826 as_fn_arith ()
14827 {
14828 as_val=`expr "$@" || test $? -eq 1`
14829 }
14830fi # as_fn_arith
bec39cab 14831
81ecdfbb
RW
14832
14833if expr a : '\(a\)' >/dev/null 2>&1 &&
14834 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
14835 as_expr=expr
14836else
14837 as_expr=false
14838fi
14839
81ecdfbb 14840if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
14841 as_basename=basename
14842else
14843 as_basename=false
14844fi
14845
81ecdfbb
RW
14846if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14847 as_dirname=dirname
14848else
14849 as_dirname=false
14850fi
bec39cab 14851
81ecdfbb 14852as_me=`$as_basename -- "$0" ||
bec39cab
AC
14853$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14854 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
14855 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14856$as_echo X/"$0" |
14857 sed '/^.*\/\([^/][^/]*\)\/*$/{
14858 s//\1/
14859 q
14860 }
14861 /^X\/\(\/\/\)$/{
14862 s//\1/
14863 q
14864 }
14865 /^X\/\(\/\).*/{
14866 s//\1/
14867 q
14868 }
14869 s/.*/./; q'`
b4e70030 14870
b4e70030
JB
14871# Avoid depending upon Character Ranges.
14872as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14873as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14874as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14875as_cr_digits='0123456789'
14876as_cr_alnum=$as_cr_Letters$as_cr_digits
14877
81ecdfbb
RW
14878ECHO_C= ECHO_N= ECHO_T=
14879case `echo -n x` in #(((((
14880-n*)
14881 case `echo 'xy\c'` in
14882 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14883 xy) ECHO_C='\c';;
14884 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14885 ECHO_T=' ';;
14886 esac;;
14887*)
14888 ECHO_N='-n';;
bec39cab
AC
14889esac
14890
81ecdfbb
RW
14891rm -f conf$$ conf$$.exe conf$$.file
14892if test -d conf$$.dir; then
14893 rm -f conf$$.dir/conf$$.file
bec39cab 14894else
81ecdfbb
RW
14895 rm -f conf$$.dir
14896 mkdir conf$$.dir 2>/dev/null
bec39cab 14897fi
81ecdfbb
RW
14898if (echo >conf$$.file) 2>/dev/null; then
14899 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 14900 as_ln_s='ln -s'
81ecdfbb
RW
14901 # ... but there are two gotchas:
14902 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14903 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14904 # In both cases, we have to default to `cp -p'.
14905 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14906 as_ln_s='cp -p'
14907 elif ln conf$$.file conf$$ 2>/dev/null; then
14908 as_ln_s=ln
14909 else
14910 as_ln_s='cp -p'
b4e70030 14911 fi
bec39cab
AC
14912else
14913 as_ln_s='cp -p'
14914fi
81ecdfbb
RW
14915rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14916rmdir conf$$.dir 2>/dev/null
14917
14918
14919# as_fn_mkdir_p
14920# -------------
14921# Create "$as_dir" as a directory, including parents if necessary.
14922as_fn_mkdir_p ()
14923{
14924
14925 case $as_dir in #(
14926 -*) as_dir=./$as_dir;;
14927 esac
14928 test -d "$as_dir" || eval $as_mkdir_p || {
14929 as_dirs=
14930 while :; do
14931 case $as_dir in #(
14932 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14933 *) as_qdir=$as_dir;;
14934 esac
14935 as_dirs="'$as_qdir' $as_dirs"
14936 as_dir=`$as_dirname -- "$as_dir" ||
14937$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14938 X"$as_dir" : 'X\(//\)[^/]' \| \
14939 X"$as_dir" : 'X\(//\)$' \| \
14940 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14941$as_echo X"$as_dir" |
14942 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14943 s//\1/
14944 q
14945 }
14946 /^X\(\/\/\)[^/].*/{
14947 s//\1/
14948 q
14949 }
14950 /^X\(\/\/\)$/{
14951 s//\1/
14952 q
14953 }
14954 /^X\(\/\).*/{
14955 s//\1/
14956 q
14957 }
14958 s/.*/./; q'`
14959 test -d "$as_dir" && break
14960 done
14961 test -z "$as_dirs" || eval "mkdir $as_dirs"
14962 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14963
bec39cab 14964
81ecdfbb 14965} # as_fn_mkdir_p
bec39cab 14966if mkdir -p . 2>/dev/null; then
81ecdfbb 14967 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
14968else
14969 test -d ./-p && rmdir ./-p
14970 as_mkdir_p=false
14971fi
14972
81ecdfbb
RW
14973if test -x / >/dev/null 2>&1; then
14974 as_test_x='test -x'
14975else
14976 if ls -dL / >/dev/null 2>&1; then
14977 as_ls_L_option=L
14978 else
14979 as_ls_L_option=
14980 fi
14981 as_test_x='
14982 eval sh -c '\''
14983 if test -d "$1"; then
14984 test -d "$1/.";
14985 else
14986 case $1 in #(
14987 -*)set "./$1";;
14988 esac;
14989 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14990 ???[sx]*):;;*)false;;esac;fi
14991 '\'' sh
14992 '
14993fi
14994as_executable_p=$as_test_x
bec39cab
AC
14995
14996# Sed expression to map a string onto a valid CPP name.
14997as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14998
14999# Sed expression to map a string onto a valid variable name.
15000as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15001
15002
bec39cab 15003exec 6>&1
81ecdfbb
RW
15004## ----------------------------------- ##
15005## Main body of $CONFIG_STATUS script. ##
15006## ----------------------------------- ##
15007_ASEOF
15008test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15009
15010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15011# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15012# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15013# values after options handling.
15014ac_log="
bec39cab 15015This file was extended by $as_me, which was
81ecdfbb 15016generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15017
15018 CONFIG_FILES = $CONFIG_FILES
15019 CONFIG_HEADERS = $CONFIG_HEADERS
15020 CONFIG_LINKS = $CONFIG_LINKS
15021 CONFIG_COMMANDS = $CONFIG_COMMANDS
15022 $ $0 $@
15023
81ecdfbb
RW
15024on `(hostname || uname -n) 2>/dev/null | sed 1q`
15025"
15026
bec39cab
AC
15027_ACEOF
15028
81ecdfbb
RW
15029case $ac_config_files in *"
15030"*) set x $ac_config_files; shift; ac_config_files=$*;;
15031esac
234b45d4 15032
81ecdfbb
RW
15033case $ac_config_headers in *"
15034"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15035esac
b4e70030 15036
b4e70030 15037
81ecdfbb
RW
15038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15039# Files that config.status was made for.
15040config_files="$ac_config_files"
15041config_headers="$ac_config_headers"
15042config_links="$ac_config_links"
15043config_commands="$ac_config_commands"
234b45d4 15044
81ecdfbb 15045_ACEOF
b4e70030 15046
81ecdfbb 15047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15048ac_cs_usage="\
81ecdfbb
RW
15049\`$as_me' instantiates files and other configuration actions
15050from templates according to the current configuration. Unless the files
15051and actions are specified as TAGs, all are instantiated by default.
234b45d4 15052
81ecdfbb 15053Usage: $0 [OPTION]... [TAG]...
234b45d4 15054
bec39cab 15055 -h, --help print this help, then exit
81ecdfbb
RW
15056 -V, --version print version number and configuration settings, then exit
15057 -q, --quiet, --silent
15058 do not print progress messages
bec39cab
AC
15059 -d, --debug don't remove temporary files
15060 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15061 --file=FILE[:TEMPLATE]
15062 instantiate the configuration file FILE
15063 --header=FILE[:TEMPLATE]
15064 instantiate the configuration header FILE
234b45d4 15065
bec39cab
AC
15066Configuration files:
15067$config_files
234b45d4 15068
bec39cab
AC
15069Configuration headers:
15070$config_headers
234b45d4 15071
bec39cab
AC
15072Configuration links:
15073$config_links
234b45d4 15074
bec39cab
AC
15075Configuration commands:
15076$config_commands
15077
81ecdfbb 15078Report bugs to the package provider."
b4e70030 15079
81ecdfbb
RW
15080_ACEOF
15081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15082ac_cs_version="\\
15083config.status
81ecdfbb
RW
15084configured by $0, generated by GNU Autoconf 2.64,
15085 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15086
81ecdfbb 15087Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15088This config.status script is free software; the Free Software Foundation
15089gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15090
15091ac_pwd='$ac_pwd'
15092srcdir='$srcdir'
15093INSTALL='$INSTALL'
15094MKDIR_P='$MKDIR_P'
15095AWK='$AWK'
15096test -n "\$AWK" || AWK=awk
bec39cab
AC
15097_ACEOF
15098
81ecdfbb
RW
15099cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15100# The default lists apply if the user does not specify any file.
bec39cab
AC
15101ac_need_defaults=:
15102while test $# != 0
15103do
15104 case $1 in
15105 --*=*)
81ecdfbb
RW
15106 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15107 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15108 ac_shift=:
c906108c 15109 ;;
81ecdfbb 15110 *)
bec39cab
AC
15111 ac_option=$1
15112 ac_optarg=$2
15113 ac_shift=shift
c906108c 15114 ;;
bec39cab 15115 esac
c906108c 15116
bec39cab
AC
15117 case $ac_option in
15118 # Handling of the options.
bec39cab
AC
15119 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15120 ac_cs_recheck=: ;;
81ecdfbb
RW
15121 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15122 $as_echo "$ac_cs_version"; exit ;;
15123 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15124 debug=: ;;
15125 --file | --fil | --fi | --f )
15126 $ac_shift
81ecdfbb
RW
15127 case $ac_optarg in
15128 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15129 esac
15130 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15131 ac_need_defaults=false;;
15132 --header | --heade | --head | --hea )
15133 $ac_shift
81ecdfbb
RW
15134 case $ac_optarg in
15135 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15136 esac
15137 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15138 ac_need_defaults=false;;
81ecdfbb
RW
15139 --he | --h)
15140 # Conflict between --help and --header
15141 as_fn_error "ambiguous option: \`$1'
15142Try \`$0 --help' for more information.";;
15143 --help | --hel | -h )
15144 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15146 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15147 ac_cs_silent=: ;;
c906108c 15148
bec39cab 15149 # This is an error.
81ecdfbb
RW
15150 -*) as_fn_error "unrecognized option: \`$1'
15151Try \`$0 --help' for more information." ;;
c906108c 15152
81ecdfbb
RW
15153 *) as_fn_append ac_config_targets " $1"
15154 ac_need_defaults=false ;;
c906108c 15155
bec39cab
AC
15156 esac
15157 shift
15158done
c906108c 15159
bec39cab 15160ac_configure_extra_args=
c906108c 15161
bec39cab
AC
15162if $ac_cs_silent; then
15163 exec 6>/dev/null
15164 ac_configure_extra_args="$ac_configure_extra_args --silent"
15165fi
c906108c 15166
bec39cab 15167_ACEOF
81ecdfbb 15168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15169if \$ac_cs_recheck; then
81ecdfbb
RW
15170 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15171 shift
15172 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15173 CONFIG_SHELL='$SHELL'
15174 export CONFIG_SHELL
15175 exec "\$@"
bec39cab
AC
15176fi
15177
15178_ACEOF
81ecdfbb
RW
15179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15180exec 5>>config.log
15181{
15182 echo
15183 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15184## Running $as_me. ##
15185_ASBOX
15186 $as_echo "$ac_log"
15187} >&5
bec39cab 15188
81ecdfbb
RW
15189_ACEOF
15190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15191#
81ecdfbb 15192# INIT-COMMANDS
c906108c 15193#
a417dc56 15194ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 15195AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 15196
bec39cab
AC
15197_ACEOF
15198
81ecdfbb 15199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15200
81ecdfbb 15201# Handling of arguments.
bec39cab 15202for ac_config_target in $ac_config_targets
c906108c 15203do
81ecdfbb
RW
15204 case $ac_config_target in
15205 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15206 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15207 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15208 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
15209 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15210 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
15211 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
15212 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15213
15214 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15215 esac
15216done
15217
81ecdfbb 15218
bec39cab
AC
15219# If the user did not use the arguments to specify the items to instantiate,
15220# then the envvar interface is used. Set only those that are not.
15221# We use the long form for the default assignment because of an extremely
15222# bizarre bug on SunOS 4.1.3.
15223if $ac_need_defaults; then
15224 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15225 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15226 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15227 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15228fi
15229
b4e70030 15230# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15231# simply because there is no reason against having it here, and in addition,
b4e70030 15232# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15233# Hook for its removal unless debugging.
15234# Note that there is a small window in which the directory will not be cleaned:
15235# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15236$debug ||
15237{
81ecdfbb
RW
15238 tmp=
15239 trap 'exit_status=$?
15240 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15241' 0
15242 trap 'as_fn_exit 1' 1 2 13 15
15243}
15244# Create a (secure) tmp directory for tmp files.
15245
15246{
15247 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15248 test -n "$tmp" && test -d "$tmp"
15249} ||
15250{
15251 tmp=./conf$$-$RANDOM
15252 (umask 077 && mkdir "$tmp")
15253} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15254
15255# Set up the scripts for CONFIG_FILES section.
15256# No need to generate them if there are no CONFIG_FILES.
15257# This happens for instance with `./config.status config.h'.
15258if test -n "$CONFIG_FILES"; then
15259
15260if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15261 ac_cs_awk_getline=:
15262 ac_cs_awk_pipe_init=
15263 ac_cs_awk_read_file='
15264 while ((getline aline < (F[key])) > 0)
15265 print(aline)
15266 close(F[key])'
15267 ac_cs_awk_pipe_fini=
15268else
15269 ac_cs_awk_getline=false
15270 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15271 ac_cs_awk_read_file='
15272 print "|#_!!_#|"
15273 print "cat " F[key] " &&"
15274 '$ac_cs_awk_pipe_init
15275 # The final `:' finishes the AND list.
15276 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15277fi
15278ac_cr=`echo X | tr X '\015'`
15279# On cygwin, bash can eat \r inside `` if the user requested igncr.
15280# But we know of no other shell where ac_cr would be empty at this
15281# point, so we can use a bashism as a fallback.
15282if test "x$ac_cr" = x; then
15283 eval ac_cr=\$\'\\r\'
15284fi
15285ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15286if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15287 ac_cs_awk_cr='\r'
15288else
15289 ac_cs_awk_cr=$ac_cr
15290fi
15291
15292echo 'BEGIN {' >"$tmp/subs1.awk" &&
15293_ACEOF
15294
15295# Create commands to substitute file output variables.
15296{
15297 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15298 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15299 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15300 echo "_ACAWK" &&
15301 echo "_ACEOF"
15302} >conf$$files.sh &&
15303. ./conf$$files.sh ||
15304 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15305rm -f conf$$files.sh
15306
15307{
15308 echo "cat >conf$$subs.awk <<_ACEOF" &&
15309 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15310 echo "_ACEOF"
15311} >conf$$subs.sh ||
15312 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15313ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15314ac_delim='%!_!# '
15315for ac_last_try in false false false false false :; do
15316 . ./conf$$subs.sh ||
15317 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15318
15319 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15320 if test $ac_delim_n = $ac_delim_num; then
15321 break
15322 elif $ac_last_try; then
15323 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15324 else
15325 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15326 fi
15327done
15328rm -f conf$$subs.sh
15329
15330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15331cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15332_ACEOF
15333sed -n '
15334h
15335s/^/S["/; s/!.*/"]=/
15336p
15337g
15338s/^[^!]*!//
15339:repl
15340t repl
15341s/'"$ac_delim"'$//
15342t delim
15343:nl
15344h
15345s/\(.\{148\}\).*/\1/
15346t more1
15347s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15348p
15349n
15350b repl
15351:more1
15352s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15353p
15354g
15355s/.\{148\}//
15356t nl
15357:delim
15358h
15359s/\(.\{148\}\).*/\1/
15360t more2
15361s/["\\]/\\&/g; s/^/"/; s/$/"/
15362p
15363b
15364:more2
15365s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15366p
15367g
15368s/.\{148\}//
15369t delim
15370' <conf$$subs.awk | sed '
15371/^[^""]/{
15372 N
15373 s/\n//
15374}
15375' >>$CONFIG_STATUS || ac_write_fail=1
15376rm -f conf$$subs.awk
15377cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15378_ACAWK
15379cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15380 for (key in S) S_is_set[key] = 1
15381 FS = "\a"
15382 \$ac_cs_awk_pipe_init
15383}
15384{
15385 line = $ 0
15386 nfields = split(line, field, "@")
15387 substed = 0
15388 len = length(field[1])
15389 for (i = 2; i < nfields; i++) {
15390 key = field[i]
15391 keylen = length(key)
15392 if (S_is_set[key]) {
15393 value = S[key]
15394 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15395 len += length(value) + length(field[++i])
15396 substed = 1
15397 } else
15398 len += 1 + keylen
15399 }
15400 if (nfields == 3 && !substed) {
15401 key = field[2]
15402 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15403 \$ac_cs_awk_read_file
15404 next
15405 }
15406 }
15407 print line
b4e70030 15408}
81ecdfbb
RW
15409\$ac_cs_awk_pipe_fini
15410_ACAWK
15411_ACEOF
15412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15413if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15414 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15415else
15416 cat
15417fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15418 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15419_ACEOF
15420
15421# VPATH may cause trouble with some makes, so we remove $(srcdir),
15422# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15423# trailing colons and then remove the whole line if VPATH becomes empty
15424# (actually we leave an empty line to preserve line numbers).
15425if test "x$srcdir" = x.; then
15426 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15427s/:*\$(srcdir):*/:/
15428s/:*\${srcdir}:*/:/
15429s/:*@srcdir@:*/:/
15430s/^\([^=]*=[ ]*\):*/\1/
15431s/:*$//
15432s/^[^=]*=[ ]*$//
15433}'
15434fi
15435
15436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15437fi # test -n "$CONFIG_FILES"
15438
15439# Set up the scripts for CONFIG_HEADERS section.
15440# No need to generate them if there are no CONFIG_HEADERS.
15441# This happens for instance with `./config.status Makefile'.
15442if test -n "$CONFIG_HEADERS"; then
15443cat >"$tmp/defines.awk" <<\_ACAWK ||
15444BEGIN {
15445_ACEOF
15446
15447# Transform confdefs.h into an awk script `defines.awk', embedded as
15448# here-document in config.status, that substitutes the proper values into
15449# config.h.in to produce config.h.
4e8d927d 15450
81ecdfbb
RW
15451# Create a delimiter string that does not exist in confdefs.h, to ease
15452# handling of long lines.
15453ac_delim='%!_!# '
15454for ac_last_try in false false :; do
15455 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15456 if test -z "$ac_t"; then
15457 break
15458 elif $ac_last_try; then
15459 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15460 else
15461 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15462 fi
15463done
4e8d927d 15464
81ecdfbb
RW
15465# For the awk script, D is an array of macro values keyed by name,
15466# likewise P contains macro parameters if any. Preserve backslash
15467# newline sequences.
15468
15469ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15470sed -n '
15471s/.\{148\}/&'"$ac_delim"'/g
15472t rset
15473:rset
15474s/^[ ]*#[ ]*define[ ][ ]*/ /
15475t def
15476d
15477:def
15478s/\\$//
15479t bsnl
15480s/["\\]/\\&/g
15481s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15482D["\1"]=" \3"/p
15483s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15484d
15485:bsnl
15486s/["\\]/\\&/g
15487s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15488D["\1"]=" \3\\\\\\n"\\/p
15489t cont
15490s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15491t cont
15492d
15493:cont
15494n
15495s/.\{148\}/&'"$ac_delim"'/g
15496t clear
15497:clear
15498s/\\$//
15499t bsnlc
15500s/["\\]/\\&/g; s/^/"/; s/$/"/p
15501d
15502:bsnlc
15503s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15504b cont
15505' <confdefs.h | sed '
15506s/'"$ac_delim"'/"\\\
15507"/g' >>$CONFIG_STATUS || ac_write_fail=1
15508
15509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15510 for (key in D) D_is_set[key] = 1
15511 FS = "\a"
15512}
15513/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15514 line = \$ 0
15515 split(line, arg, " ")
15516 if (arg[1] == "#") {
15517 defundef = arg[2]
15518 mac1 = arg[3]
15519 } else {
15520 defundef = substr(arg[1], 2)
15521 mac1 = arg[2]
15522 }
15523 split(mac1, mac2, "(") #)
15524 macro = mac2[1]
15525 prefix = substr(line, 1, index(line, defundef) - 1)
15526 if (D_is_set[macro]) {
15527 # Preserve the white space surrounding the "#".
15528 print prefix "define", macro P[macro] D[macro]
15529 next
15530 } else {
15531 # Replace #undef with comments. This is necessary, for example,
15532 # in the case of _POSIX_SOURCE, which is predefined and required
15533 # on some systems where configure will not decide to define it.
15534 if (defundef == "undef") {
15535 print "/*", prefix defundef, macro, "*/"
15536 next
15537 }
15538 }
b4e70030 15539}
81ecdfbb
RW
15540{ print }
15541_ACAWK
b4e70030 15542_ACEOF
81ecdfbb
RW
15543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15544 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15545fi # test -n "$CONFIG_HEADERS"
4e8d927d 15546
4e8d927d 15547
81ecdfbb
RW
15548eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15549shift
15550for ac_tag
15551do
15552 case $ac_tag in
15553 :[FHLC]) ac_mode=$ac_tag; continue;;
15554 esac
15555 case $ac_mode$ac_tag in
15556 :[FHL]*:*);;
15557 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15558 :[FH]-) ac_tag=-:-;;
15559 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15560 esac
15561 ac_save_IFS=$IFS
15562 IFS=:
15563 set x $ac_tag
15564 IFS=$ac_save_IFS
15565 shift
15566 ac_file=$1
15567 shift
4e8d927d 15568
81ecdfbb
RW
15569 case $ac_mode in
15570 :L) ac_source=$1;;
15571 :[FH])
15572 ac_file_inputs=
15573 for ac_f
15574 do
15575 case $ac_f in
15576 -) ac_f="$tmp/stdin";;
15577 *) # Look for the file first in the build tree, then in the source tree
15578 # (if the path is not absolute). The absolute path cannot be DOS-style,
15579 # because $ac_f cannot contain `:'.
15580 test -f "$ac_f" ||
15581 case $ac_f in
15582 [\\/$]*) false;;
15583 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15584 esac ||
15585 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15586 esac
15587 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15588 as_fn_append ac_file_inputs " '$ac_f'"
15589 done
15590
15591 # Let's still pretend it is `configure' which instantiates (i.e., don't
15592 # use $as_me), people would be surprised to read:
15593 # /* config.h. Generated by config.status. */
15594 configure_input='Generated from '`
15595 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15596 `' by configure.'
15597 if test x"$ac_file" != x-; then
15598 configure_input="$ac_file. $configure_input"
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15600$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15601 fi
81ecdfbb
RW
15602 # Neutralize special characters interpreted by sed in replacement strings.
15603 case $configure_input in #(
15604 *\&* | *\|* | *\\* )
15605 ac_sed_conf_input=`$as_echo "$configure_input" |
15606 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15607 *) ac_sed_conf_input=$configure_input;;
15608 esac
4e8d927d 15609
81ecdfbb
RW
15610 case $ac_tag in
15611 *:-:* | *:-) cat >"$tmp/stdin" \
15612 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15613 esac
15614 ;;
c906108c
SS
15615 esac
15616
81ecdfbb 15617 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15618$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15619 X"$ac_file" : 'X\(//\)[^/]' \| \
15620 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15621 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15622$as_echo X"$ac_file" |
15623 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15624 s//\1/
15625 q
15626 }
15627 /^X\(\/\/\)[^/].*/{
15628 s//\1/
15629 q
15630 }
15631 /^X\(\/\/\)$/{
15632 s//\1/
15633 q
15634 }
15635 /^X\(\/\).*/{
15636 s//\1/
15637 q
15638 }
15639 s/.*/./; q'`
15640 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15641 ac_builddir=.
15642
81ecdfbb
RW
15643case "$ac_dir" in
15644.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15645*)
15646 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15647 # A ".." for each directory in $ac_dir_suffix.
15648 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15649 case $ac_top_builddir_sub in
15650 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15651 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15652 esac ;;
15653esac
15654ac_abs_top_builddir=$ac_pwd
15655ac_abs_builddir=$ac_pwd$ac_dir_suffix
15656# for backward compatibility:
15657ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15658
15659case $srcdir in
81ecdfbb 15660 .) # We are building in place.
bec39cab 15661 ac_srcdir=.
81ecdfbb
RW
15662 ac_top_srcdir=$ac_top_builddir_sub
15663 ac_abs_top_srcdir=$ac_pwd ;;
15664 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15665 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15666 ac_top_srcdir=$srcdir
15667 ac_abs_top_srcdir=$srcdir ;;
15668 *) # Relative name.
15669 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15670 ac_top_srcdir=$ac_top_build_prefix$srcdir
15671 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15672esac
81ecdfbb 15673ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15674
c906108c 15675
81ecdfbb
RW
15676 case $ac_mode in
15677 :F)
15678 #
15679 # CONFIG_FILE
15680 #
c906108c 15681
bec39cab
AC
15682 case $INSTALL in
15683 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15684 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15685 esac
81ecdfbb
RW
15686 ac_MKDIR_P=$MKDIR_P
15687 case $MKDIR_P in
15688 [\\/$]* | ?:[\\/]* ) ;;
15689 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15690 esac
15691_ACEOF
121ce6e5 15692
81ecdfbb
RW
15693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15694# If the template does not know about datarootdir, expand it.
15695# FIXME: This hack should be removed a few years after 2.60.
15696ac_datarootdir_hack=; ac_datarootdir_seen=
15697ac_sed_dataroot='
15698/datarootdir/ {
15699 p
15700 q
15701}
15702/@datadir@/p
15703/@docdir@/p
15704/@infodir@/p
15705/@localedir@/p
15706/@mandir@/p'
15707case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15708*datarootdir*) ac_datarootdir_seen=yes;;
15709*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15711$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15712_ACEOF
15713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15714 ac_datarootdir_hack='
15715 s&@datadir@&$datadir&g
15716 s&@docdir@&$docdir&g
15717 s&@infodir@&$infodir&g
15718 s&@localedir@&$localedir&g
15719 s&@mandir@&$mandir&g
15720 s&\\\${datarootdir}&$datarootdir&g' ;;
15721esac
4e8d927d 15722_ACEOF
81ecdfbb
RW
15723
15724# Neutralize VPATH when `$srcdir' = `.'.
15725# Shell code in configure.ac might set extrasub.
15726# FIXME: do we really want to maintain this feature?
15727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15728ac_sed_extra="$ac_vpsub
bec39cab
AC
15729$extrasub
15730_ACEOF
81ecdfbb 15731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
15732:t
15733/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
15734s|@configure_input@|$ac_sed_conf_input|;t t
15735s&@top_builddir@&$ac_top_builddir_sub&;t t
15736s&@top_build_prefix@&$ac_top_build_prefix&;t t
15737s&@srcdir@&$ac_srcdir&;t t
15738s&@abs_srcdir@&$ac_abs_srcdir&;t t
15739s&@top_srcdir@&$ac_top_srcdir&;t t
15740s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15741s&@builddir@&$ac_builddir&;t t
15742s&@abs_builddir@&$ac_abs_builddir&;t t
15743s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15744s&@INSTALL@&$ac_INSTALL&;t t
15745s&@MKDIR_P@&$ac_MKDIR_P&;t t
15746$ac_datarootdir_hack
15747"
15748eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15749if $ac_cs_awk_getline; then
15750 $AWK -f "$tmp/subs.awk"
15751else
15752 $AWK -f "$tmp/subs.awk" | $SHELL
15753fi >$tmp/out \
15754 || as_fn_error "could not create $ac_file" "$LINENO" 5
15755
15756test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15757 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15758 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15760which seems to be undefined. Please make sure it is defined." >&5
15761$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15762which seems to be undefined. Please make sure it is defined." >&2;}
15763
15764 rm -f "$tmp/stdin"
bec39cab 15765 case $ac_file in
81ecdfbb
RW
15766 -) cat "$tmp/out" && rm -f "$tmp/out";;
15767 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15768 esac \
15769 || as_fn_error "could not create $ac_file" "$LINENO" 5
15770 ;;
15771 :H)
15772 #
15773 # CONFIG_HEADER
15774 #
bec39cab 15775 if test x"$ac_file" != x-; then
81ecdfbb
RW
15776 {
15777 $as_echo "/* $configure_input */" \
15778 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15779 } >"$tmp/config.h" \
15780 || as_fn_error "could not create $ac_file" "$LINENO" 5
15781 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15783$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 15784 else
81ecdfbb
RW
15785 rm -f "$ac_file"
15786 mv "$tmp/config.h" "$ac_file" \
15787 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
15788 fi
15789 else
81ecdfbb
RW
15790 $as_echo "/* $configure_input */" \
15791 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15792 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 15793 fi
81ecdfbb
RW
15794# Compute "$ac_file"'s index in $config_headers.
15795_am_arg="$ac_file"
e28b3332
DJ
15796_am_stamp_count=1
15797for _am_header in $config_headers :; do
15798 case $_am_header in
81ecdfbb 15799 $_am_arg | $_am_arg:* )
e28b3332
DJ
15800 break ;;
15801 * )
15802 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15803 esac
15804done
81ecdfbb
RW
15805echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15806$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15807 X"$_am_arg" : 'X\(//\)[^/]' \| \
15808 X"$_am_arg" : 'X\(//\)$' \| \
15809 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15810$as_echo X"$_am_arg" |
15811 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15812 s//\1/
15813 q
15814 }
15815 /^X\(\/\/\)[^/].*/{
15816 s//\1/
15817 q
15818 }
15819 /^X\(\/\/\)$/{
15820 s//\1/
15821 q
15822 }
15823 /^X\(\/\).*/{
15824 s//\1/
15825 q
15826 }
15827 s/.*/./; q'`/stamp-h$_am_stamp_count
15828 ;;
15829 :L)
15830 #
15831 # CONFIG_LINK
15832 #
c906108c 15833
81ecdfbb
RW
15834 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15835 :
b4e70030 15836 else
81ecdfbb
RW
15837 # Prefer the file from the source tree if names are identical.
15838 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15839 ac_source=$srcdir/$ac_source
15840 fi
b4e70030 15841
81ecdfbb
RW
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15843$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 15844
81ecdfbb
RW
15845 if test ! -r "$ac_source"; then
15846 as_fn_error "$ac_source: file not found" "$LINENO" 5
15847 fi
15848 rm -f "$ac_file"
bec39cab 15849
81ecdfbb
RW
15850 # Try a relative symlink, then a hard link, then a copy.
15851 case $srcdir in
15852 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15853 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15854 esac
15855 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15856 ln "$ac_source" "$ac_file" 2>/dev/null ||
15857 cp -p "$ac_source" "$ac_file" ||
15858 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15859 fi
15860 ;;
15861 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15862$as_echo "$as_me: executing $ac_file commands" >&6;}
15863 ;;
c906108c 15864 esac
b4e70030 15865
bec39cab 15866
81ecdfbb
RW
15867 case $ac_file$ac_mode in
15868 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
15869 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15870 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15871 # are listed without --file. Let's play safe and only enable the eval
15872 # if we detect the quoting.
15873 case $CONFIG_FILES in
15874 *\'*) eval set x "$CONFIG_FILES" ;;
15875 *) set x $CONFIG_FILES ;;
15876 esac
15877 shift
15878 for mf
15879 do
15880 # Strip MF so we end up with the name of the file.
15881 mf=`echo "$mf" | sed -e 's/:.*$//'`
15882 # Check whether this is an Automake generated Makefile or not.
15883 # We used to match only the files named `Makefile.in', but
15884 # some people rename them; so instead we look at the file content.
15885 # Grep'ing the first line is not enough: some people post-process
15886 # each Makefile.in and add a new line on top of each file to say so.
15887 # Grep'ing the whole file is not good either: AIX grep has a line
15888 # limit of 2048, but all sed's we know have understand at least 4000.
15889 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15890 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
15891$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15892 X"$mf" : 'X\(//\)[^/]' \| \
15893 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
15894 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15895$as_echo X"$mf" |
15896 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15897 s//\1/
15898 q
15899 }
15900 /^X\(\/\/\)[^/].*/{
15901 s//\1/
15902 q
15903 }
15904 /^X\(\/\/\)$/{
15905 s//\1/
15906 q
15907 }
15908 /^X\(\/\).*/{
15909 s//\1/
15910 q
15911 }
15912 s/.*/./; q'`
15913 else
15914 continue
15915 fi
15916 # Extract the definition of DEPDIR, am__include, and am__quote
15917 # from the Makefile without running `make'.
15918 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15919 test -z "$DEPDIR" && continue
15920 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15921 test -z "am__include" && continue
15922 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15923 # When using ansi2knr, U may be empty or an underscore; expand it
15924 U=`sed -n 's/^U = //p' < "$mf"`
15925 # Find all dependency output files, they are included files with
15926 # $(DEPDIR) in their names. We invoke sed twice because it is the
15927 # simplest approach to changing $(DEPDIR) to its actual value in the
15928 # expansion.
15929 for file in `sed -n "
15930 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
15931 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15932 # Make sure the directory exists.
15933 test -f "$dirpart/$file" && continue
15934 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
15935$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15936 X"$file" : 'X\(//\)[^/]' \| \
15937 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
15938 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
15939$as_echo X"$file" |
15940 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15941 s//\1/
15942 q
15943 }
15944 /^X\(\/\/\)[^/].*/{
15945 s//\1/
15946 q
15947 }
15948 /^X\(\/\/\)$/{
15949 s//\1/
15950 q
15951 }
15952 /^X\(\/\).*/{
15953 s//\1/
15954 q
15955 }
15956 s/.*/./; q'`
15957 as_dir=$dirpart/$fdir; as_fn_mkdir_p
15958 # echo "creating $dirpart/$file"
15959 echo '# dummy' > "$dirpart/$file"
e28b3332 15960 done
e28b3332 15961 done
81ecdfbb 15962}
4e8d927d 15963 ;;
81ecdfbb 15964 "default":C)
c906108c
SS
15965case x$CONFIG_HEADERS in
15966xconfig.h:config.in)
15967echo > stamp-h ;;
15968esac
bec39cab 15969 ;;
81ecdfbb 15970
bec39cab 15971 esac
81ecdfbb 15972done # for ac_tag
c906108c 15973
bec39cab 15974
81ecdfbb 15975as_fn_exit 0
bec39cab 15976_ACEOF
bec39cab
AC
15977ac_clean_files=$ac_clean_files_save
15978
81ecdfbb
RW
15979test $ac_write_fail = 0 ||
15980 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
15981
bec39cab
AC
15982
15983# configure is writing to config.log, and then calls config.status.
15984# config.status does its own redirection, appending to config.log.
15985# Unfortunately, on DOS this fails, as config.log is still kept open
15986# by configure, so config.status won't be able to write to it; its
15987# output is simply discarded. So we exec the FD to /dev/null,
15988# effectively closing config.log, so it can be properly (re)opened and
15989# appended to by config.status. When coming back to configure, we
15990# need to make the FD available again.
15991if test "$no_create" != yes; then
15992 ac_cs_success=:
15993 ac_config_status_args=
15994 test "$silent" = yes &&
15995 ac_config_status_args="$ac_config_status_args --quiet"
15996 exec 5>/dev/null
15997 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15998 exec 5>>config.log
15999 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16000 # would make configure fail if this is the last instruction.
81ecdfbb 16001 $ac_cs_success || as_fn_exit $?
bec39cab 16002fi
c906108c 16003
bec39cab 16004#
81ecdfbb 16005# CONFIG_SUBDIRS section.
bec39cab 16006#
c906108c
SS
16007if test "$no_recursion" != yes; then
16008
81ecdfbb
RW
16009 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16010 # so they do not pile up.
c906108c
SS
16011 ac_sub_configure_args=
16012 ac_prev=
fdc59709
PB
16013 eval "set x $ac_configure_args"
16014 shift
16015 for ac_arg
16016 do
c906108c
SS
16017 if test -n "$ac_prev"; then
16018 ac_prev=
16019 continue
16020 fi
bec39cab 16021 case $ac_arg in
c906108c
SS
16022 -cache-file | --cache-file | --cache-fil | --cache-fi \
16023 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16024 ac_prev=cache_file ;;
16025 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16026 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16027 | --c=*)
16028 ;;
16029 --config-cache | -C)
c906108c
SS
16030 ;;
16031 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16032 ac_prev=srcdir ;;
16033 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16034 ;;
bec39cab
AC
16035 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16036 ac_prev=prefix ;;
16037 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16038 ;;
81ecdfbb
RW
16039 --disable-option-checking)
16040 ;;
fdc59709
PB
16041 *)
16042 case $ac_arg in
81ecdfbb 16043 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16044 esac
81ecdfbb 16045 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16046 esac
16047 done
16048
bec39cab
AC
16049 # Always prepend --prefix to ensure using the same prefix
16050 # in subdir configurations.
fdc59709
PB
16051 ac_arg="--prefix=$prefix"
16052 case $ac_arg in
81ecdfbb 16053 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16054 esac
81ecdfbb
RW
16055 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16056
16057 # Pass --silent
16058 if test "$silent" = yes; then
16059 ac_sub_configure_args="--silent $ac_sub_configure_args"
16060 fi
16061
16062 # Always prepend --disable-option-checking to silence warnings, since
16063 # different subdirs can have different --enable and --with options.
16064 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16065
b4e70030 16066 ac_popdir=`pwd`
bec39cab 16067 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16068
16069 # Do not complain, so a configure script can configure whichever
16070 # parts of a large source tree are present.
fdc59709 16071 test -d "$srcdir/$ac_dir" || continue
c906108c 16072
81ecdfbb
RW
16073 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16074 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16075 $as_echo "$ac_msg" >&6
16076 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16077 ac_builddir=.
16078
81ecdfbb
RW
16079case "$ac_dir" in
16080.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16081*)
16082 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16083 # A ".." for each directory in $ac_dir_suffix.
16084 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16085 case $ac_top_builddir_sub in
16086 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16087 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16088 esac ;;
16089esac
16090ac_abs_top_builddir=$ac_pwd
16091ac_abs_builddir=$ac_pwd$ac_dir_suffix
16092# for backward compatibility:
16093ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16094
16095case $srcdir in
81ecdfbb 16096 .) # We are building in place.
bec39cab 16097 ac_srcdir=.
81ecdfbb
RW
16098 ac_top_srcdir=$ac_top_builddir_sub
16099 ac_abs_top_srcdir=$ac_pwd ;;
16100 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16101 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16102 ac_top_srcdir=$srcdir
16103 ac_abs_top_srcdir=$srcdir ;;
16104 *) # Relative name.
16105 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16106 ac_top_srcdir=$ac_top_build_prefix$srcdir
16107 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16108esac
81ecdfbb 16109ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16110
c906108c 16111
fdc59709 16112 cd "$ac_dir"
c906108c
SS
16113
16114 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16115 if test -f "$ac_srcdir/configure.gnu"; then
16116 ac_sub_configure=$ac_srcdir/configure.gnu
16117 elif test -f "$ac_srcdir/configure"; then
16118 ac_sub_configure=$ac_srcdir/configure
16119 elif test -f "$ac_srcdir/configure.in"; then
16120 # This should be Cygnus configure.
16121 ac_sub_configure=$ac_aux_dir/configure
c906108c 16122 else
81ecdfbb
RW
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16124$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16125 ac_sub_configure=
16126 fi
16127
16128 # The recursion is here.
16129 if test -n "$ac_sub_configure"; then
c906108c 16130 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16131 case $cache_file in
16132 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16133 *) # Relative name.
16134 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16135 esac
c906108c 16136
81ecdfbb
RW
16137 { $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
16138$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16139 # The eval makes quoting arguments work.
fdc59709
PB
16140 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16141 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16142 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16143 fi
16144
fdc59709 16145 cd "$ac_popdir"
c906108c
SS
16146 done
16147fi
81ecdfbb
RW
16148if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16150$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16151fi
c906108c
SS
16152
16153
16154exit 0
This page took 2.449521 seconds and 4 git commands to generate.