gdb/
[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
3388710e
JM
4090ac_aux_dir=
4091for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4092 for ac_t in install-sh install.sh shtool; do
4093 if test -f "$ac_dir/$ac_t"; then
4094 ac_aux_dir=$ac_dir
4095 ac_install_sh="$ac_aux_dir/$ac_t -c"
4096 break 2
4097 fi
4098 done
4099done
4100if test -z "$ac_aux_dir"; then
4101 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4102fi
4103
4104# These three variables are undocumented and unsupported,
4105# and are intended to be withdrawn in a future Autoconf release.
4106# They can cause serious problems if a builder's source tree is in a directory
4107# whose full name contains unusual characters.
4108ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4109ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4110ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4111
4112
4113# Make sure we can run config.sub.
4114$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4115 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4116
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4118$as_echo_n "checking build system type... " >&6; }
4119if test "${ac_cv_build+set}" = set; then :
4120 $as_echo_n "(cached) " >&6
4121else
4122 ac_build_alias=$build_alias
4123test "x$ac_build_alias" = x &&
4124 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4125test "x$ac_build_alias" = x &&
4126 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4127ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4128 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4129
4130fi
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4132$as_echo "$ac_cv_build" >&6; }
4133case $ac_cv_build in
4134*-*-*) ;;
4135*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4136esac
4137build=$ac_cv_build
4138ac_save_IFS=$IFS; IFS='-'
4139set x $ac_cv_build
4140shift
4141build_cpu=$1
4142build_vendor=$2
4143shift; shift
4144# Remember, the first character of IFS is used to create $*,
4145# except with old shells:
4146build_os=$*
4147IFS=$ac_save_IFS
4148case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4149
4150
4151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4152$as_echo_n "checking host system type... " >&6; }
4153if test "${ac_cv_host+set}" = set; then :
4154 $as_echo_n "(cached) " >&6
4155else
4156 if test "x$host_alias" = x; then
4157 ac_cv_host=$ac_cv_build
4158else
4159 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4160 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4161fi
4162
4163fi
4164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4165$as_echo "$ac_cv_host" >&6; }
4166case $ac_cv_host in
4167*-*-*) ;;
4168*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4169esac
4170host=$ac_cv_host
4171ac_save_IFS=$IFS; IFS='-'
4172set x $ac_cv_host
4173shift
4174host_cpu=$1
4175host_vendor=$2
4176shift; shift
4177# Remember, the first character of IFS is used to create $*,
4178# except with old shells:
4179host_os=$*
4180IFS=$ac_save_IFS
4181case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4182
4183
4184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4185$as_echo_n "checking target system type... " >&6; }
4186if test "${ac_cv_target+set}" = set; then :
4187 $as_echo_n "(cached) " >&6
4188else
4189 if test "x$target_alias" = x; then
4190 ac_cv_target=$ac_cv_host
4191else
4192 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4193 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4194fi
4195
4196fi
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4198$as_echo "$ac_cv_target" >&6; }
4199case $ac_cv_target in
4200*-*-*) ;;
4201*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4202esac
4203target=$ac_cv_target
4204ac_save_IFS=$IFS; IFS='-'
4205set x $ac_cv_target
4206shift
4207target_cpu=$1
4208target_vendor=$2
4209shift; shift
4210# Remember, the first character of IFS is used to create $*,
4211# except with old shells:
4212target_os=$*
4213IFS=$ac_save_IFS
4214case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4215
4216
4217# The aliases save the names the user supplied, while $host etc.
4218# will get canonicalized.
4219test -n "$target_alias" &&
4220 test "$program_prefix$program_suffix$program_transform_name" = \
4221 NONENONEs,x,x, &&
4222 program_prefix=${target_alias}-
4223
4224# The tests for host and target for $enable_largefile require
4225# canonical names.
4226
4227
81ecdfbb 4228
da2f07f1
JK
4229# As the $enable_largefile decision depends on --enable-plugins we must set it
4230# even in directories otherwise not depending on the $plugins option.
4231
4232
4233# Check whether --enable-plugins was given.
4234if test "${enable_plugins+set}" = set; then :
4235 enableval=$enable_plugins; case "${enableval}" in
4236 yes | "") plugins=yes ;;
4237 no) plugins=no ;;
4238 *) plugins=yes ;;
4239 esac
4240else
4241 plugins=no
4242fi
4243
4244
4245
4246case "${host}" in
4247 sparc-*-solaris*|i[3-7]86-*-solaris*)
4248 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4249 # are mutually exclusive; and without procfs support, the bfd/ elf module
4250 # cannot provide certain routines such as elfcore_write_prpsinfo
4251 # or elfcore_write_prstatus. So unless the user explicitly requested
4252 # large-file support through the --enable-largefile switch, disable
4253 # large-file support in favor of procfs support.
4254 test "${target}" = "${host}" -a "x$plugins" = xno \
4255 && : ${enable_largefile="no"}
4256 ;;
4257esac
4258
4259# Check whether --enable-largefile was given.
4260if test "${enable_largefile+set}" = set; then :
4261 enableval=$enable_largefile;
4262fi
4263
4264if test "$enable_largefile" != no; then
4265
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4267$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4268if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4269 $as_echo_n "(cached) " >&6
4270else
4271 ac_cv_sys_largefile_CC=no
4272 if test "$GCC" != yes; then
4273 ac_save_CC=$CC
4274 while :; do
4275 # IRIX 6.2 and later do not support large files by default,
4276 # so use the C compiler's -n32 option if that helps.
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278/* end confdefs.h. */
4279#include <sys/types.h>
4280 /* Check that off_t can represent 2**63 - 1 correctly.
4281 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4282 since some C++ compilers masquerading as C compilers
4283 incorrectly reject 9223372036854775807. */
4284#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4285 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4286 && LARGE_OFF_T % 2147483647 == 1)
4287 ? 1 : -1];
4288int
4289main ()
4290{
4291
4292 ;
4293 return 0;
4294}
4295_ACEOF
4296 if ac_fn_c_try_compile "$LINENO"; then :
4297 break
4298fi
4299rm -f core conftest.err conftest.$ac_objext
4300 CC="$CC -n32"
4301 if ac_fn_c_try_compile "$LINENO"; then :
4302 ac_cv_sys_largefile_CC=' -n32'; break
4303fi
4304rm -f core conftest.err conftest.$ac_objext
4305 break
4306 done
4307 CC=$ac_save_CC
4308 rm -f conftest.$ac_ext
4309 fi
4310fi
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4312$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4313 if test "$ac_cv_sys_largefile_CC" != no; then
4314 CC=$CC$ac_cv_sys_largefile_CC
4315 fi
4316
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4318$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4319if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4320 $as_echo_n "(cached) " >&6
4321else
4322 while :; do
4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4324/* end confdefs.h. */
4325#include <sys/types.h>
4326 /* Check that off_t can represent 2**63 - 1 correctly.
4327 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4328 since some C++ compilers masquerading as C compilers
4329 incorrectly reject 9223372036854775807. */
4330#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4331 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4332 && LARGE_OFF_T % 2147483647 == 1)
4333 ? 1 : -1];
4334int
4335main ()
4336{
4337
4338 ;
4339 return 0;
4340}
4341_ACEOF
4342if ac_fn_c_try_compile "$LINENO"; then :
4343 ac_cv_sys_file_offset_bits=no; break
4344fi
4345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4347/* end confdefs.h. */
4348#define _FILE_OFFSET_BITS 64
4349#include <sys/types.h>
4350 /* Check that off_t can represent 2**63 - 1 correctly.
4351 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4352 since some C++ compilers masquerading as C compilers
4353 incorrectly reject 9223372036854775807. */
4354#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4355 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4356 && LARGE_OFF_T % 2147483647 == 1)
4357 ? 1 : -1];
4358int
4359main ()
4360{
4361
4362 ;
4363 return 0;
4364}
4365_ACEOF
4366if ac_fn_c_try_compile "$LINENO"; then :
4367 ac_cv_sys_file_offset_bits=64; break
4368fi
4369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4370 ac_cv_sys_file_offset_bits=unknown
4371 break
4372done
4373fi
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4375$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4376case $ac_cv_sys_file_offset_bits in #(
4377 no | unknown) ;;
4378 *)
4379cat >>confdefs.h <<_ACEOF
4380#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4381_ACEOF
4382;;
4383esac
4384rm -rf conftest*
4385 if test $ac_cv_sys_file_offset_bits = unknown; then
4386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4387$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4388if test "${ac_cv_sys_large_files+set}" = set; then :
4389 $as_echo_n "(cached) " >&6
4390else
4391 while :; do
4392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4393/* end confdefs.h. */
4394#include <sys/types.h>
4395 /* Check that off_t can represent 2**63 - 1 correctly.
4396 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4397 since some C++ compilers masquerading as C compilers
4398 incorrectly reject 9223372036854775807. */
4399#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4400 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4401 && LARGE_OFF_T % 2147483647 == 1)
4402 ? 1 : -1];
4403int
4404main ()
4405{
4406
4407 ;
4408 return 0;
4409}
4410_ACEOF
4411if ac_fn_c_try_compile "$LINENO"; then :
4412 ac_cv_sys_large_files=no; break
4413fi
4414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416/* end confdefs.h. */
4417#define _LARGE_FILES 1
4418#include <sys/types.h>
4419 /* Check that off_t can represent 2**63 - 1 correctly.
4420 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4421 since some C++ compilers masquerading as C compilers
4422 incorrectly reject 9223372036854775807. */
4423#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4424 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4425 && LARGE_OFF_T % 2147483647 == 1)
4426 ? 1 : -1];
4427int
4428main ()
4429{
4430
4431 ;
4432 return 0;
4433}
4434_ACEOF
4435if ac_fn_c_try_compile "$LINENO"; then :
4436 ac_cv_sys_large_files=1; break
4437fi
4438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4439 ac_cv_sys_large_files=unknown
4440 break
4441done
4442fi
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4444$as_echo "$ac_cv_sys_large_files" >&6; }
4445case $ac_cv_sys_large_files in #(
4446 no | unknown) ;;
4447 *)
4448cat >>confdefs.h <<_ACEOF
4449#define _LARGE_FILES $ac_cv_sys_large_files
4450_ACEOF
4451;;
4452esac
4453rm -rf conftest*
4454 fi
4455fi
4456
4457
4458
81ecdfbb
RW
4459
4460
4461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4462$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4463if test "${am_cv_prog_cc_stdc+set}" = set; then :
4464 $as_echo_n "(cached) " >&6
4465else
4466 am_cv_prog_cc_stdc=no
4467ac_save_CC="$CC"
4468# Don't try gcc -ansi; that turns off useful extensions and
4469# breaks some systems' header files.
4470# AIX -qlanglvl=ansi
4471# Ultrix and OSF/1 -std1
4472# HP-UX 10.20 and later -Ae
4473# HP-UX older versions -Aa -D_HPUX_SOURCE
4474# SVR4 -Xc -D__EXTENSIONS__
4475for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4476do
783e057b 4477 CC="$ac_save_CC $ac_arg"
81ecdfbb 4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4479/* end confdefs.h. */
4480#include <stdarg.h>
4481#include <stdio.h>
4482#include <sys/types.h>
4483#include <sys/stat.h>
4484/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4485struct buf { int x; };
4486FILE * (*rcsopen) (struct buf *, struct stat *, int);
4487static char *e (p, i)
4488 char **p;
4489 int i;
4490{
4491 return p[i];
4492}
4493static char *f (char * (*g) (char **, int), char **p, ...)
4494{
4495 char *s;
4496 va_list v;
4497 va_start (v,p);
4498 s = g (p, va_arg (v,int));
4499 va_end (v);
4500 return s;
4501}
4502int test (int i, double x);
4503struct s1 {int (*f) (int a);};
4504struct s2 {int (*f) (double a);};
4505int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4506int argc;
4507char **argv;
4508
4509int
4510main ()
4511{
4512
4513return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4514
4515 ;
4516 return 0;
4517}
4518_ACEOF
81ecdfbb 4519if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4520 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4521fi
81ecdfbb 4522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4523done
4524CC="$ac_save_CC"
4525
4526fi
4527
4528if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4530$as_echo "none needed" >&6; }
783e057b 4531else
81ecdfbb
RW
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4533$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4534fi
4535case "x$am_cv_prog_cc_stdc" in
4536 x|xno) ;;
4537 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4538esac
4539
4540
4541ac_aux_dir=
81ecdfbb
RW
4542for ac_dir in .. "$srcdir"/..; do
4543 for ac_t in install-sh install.sh shtool; do
4544 if test -f "$ac_dir/$ac_t"; then
4545 ac_aux_dir=$ac_dir
4546 ac_install_sh="$ac_aux_dir/$ac_t -c"
4547 break 2
4548 fi
4549 done
783e057b
DJ
4550done
4551if test -z "$ac_aux_dir"; then
81ecdfbb 4552 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4553fi
81ecdfbb
RW
4554
4555# These three variables are undocumented and unsupported,
4556# and are intended to be withdrawn in a future Autoconf release.
4557# They can cause serious problems if a builder's source tree is in a directory
4558# whose full name contains unusual characters.
4559ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4560ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4561ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4562
783e057b 4563
783e057b 4564
81ecdfbb 4565
a417dc56
RW
4566# Dependency checking.
4567rm -rf .tst 2>/dev/null
4568mkdir .tst 2>/dev/null
4569if test -d .tst; then
4570 am__leading_dot=.
4571else
4572 am__leading_dot=_
4573fi
4574rmdir .tst 2>/dev/null
4575
4576DEPDIR="${am__leading_dot}deps"
4577
81ecdfbb 4578ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4579
4580
4581depcc="$CC" am_compiler_list=
4582
4583am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4585$as_echo_n "checking dependency style of $depcc... " >&6; }
4586if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4587 $as_echo_n "(cached) " >&6
a417dc56
RW
4588else
4589 if test -f "$am_depcomp"; then
4590 # We make a subdir and do the tests there. Otherwise we can end up
4591 # making bogus files that we don't know about and never remove. For
4592 # instance it was reported that on HP-UX the gcc test will end up
4593 # making a dummy file named `D' -- because `-MD' means `put the output
4594 # in D'.
4595 mkdir conftest.dir
4596 # Copy depcomp to subdir because otherwise we won't find it if we're
4597 # using a relative directory.
4598 cp "$am_depcomp" conftest.dir
4599 cd conftest.dir
4600 # We will build objects and dependencies in a subdirectory because
4601 # it helps to detect inapplicable dependency modes. For instance
4602 # both Tru64's cc and ICC support -MD to output dependencies as a
4603 # side effect of compilation, but ICC will put the dependencies in
4604 # the current directory while Tru64 will put them in the object
4605 # directory.
4606 mkdir sub
4607
4608 am_cv_CC_dependencies_compiler_type=none
4609 if test "$am_compiler_list" = ""; then
4610 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4611 fi
4612 for depmode in $am_compiler_list; do
4613 if test $depmode = none; then break; fi
4614
81ecdfbb 4615 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4616 # Setup a source with many dependencies, because some compilers
4617 # like to wrap large dependency lists on column 80 (with \), and
4618 # we should not choose a depcomp mode which is confused by this.
4619 #
4620 # We need to recreate these files for each test, as the compiler may
4621 # overwrite some of them when testing with obscure command lines.
4622 # This happens at least with the AIX C compiler.
4623 : > sub/conftest.c
4624 for i in 1 2 3 4 5 6; do
4625 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4626 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4627 # Solaris 8's {/usr,}/bin/sh.
4628 touch sub/conftst$i.h
4629 done
4630 echo "include sub/conftest.Po" > confmf
4631
4632 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4633 # mode. It turns out that the SunPro C++ compiler does not properly
4634 # handle `-M -o', and we need to detect this.
4635 depcmd="depmode=$depmode \
4636 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4637 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4638 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4639 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4640 if env $depcmd > conftest.err 2>&1 &&
4641 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4642 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4643 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4644 # icc doesn't choke on unknown options, it will just issue warnings
4645 # or remarks (even with -Werror). So we grep stderr for any message
4646 # that says an option was ignored or not supported.
4647 # When given -MP, icc 7.0 and 7.1 complain thusly:
4648 # icc: Command line warning: ignoring option '-M'; no argument required
4649 # The diagnosis changed in icc 8.0:
4650 # icc: Command line remark: option '-MP' not supported
4651 if (grep 'ignoring option' conftest.err ||
4652 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4653 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4654 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4655 break
4656 fi
4657 fi
81ecdfbb 4658 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4659 sed -e 's/^/| /' < conftest.err >&5
4660 done
4661
4662 cd ..
4663 rm -rf conftest.dir
4664else
4665 am_cv_CC_dependencies_compiler_type=none
4666fi
4667
4668fi
81ecdfbb
RW
4669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4670$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4671if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4672then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4673else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4674
4675fi
4676
4677
4678# Check for the 'make' the user wants to use.
4679for ac_prog in make
4680do
4681 # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if test "${ac_cv_prog_MAKE+set}" = set; then :
4686 $as_echo_n "(cached) " >&6
a417dc56
RW
4687else
4688 if test -n "$MAKE"; then
4689 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4690else
4691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4696 for ac_exec_ext in '' $ac_executable_extensions; do
4697 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4698 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4700 break 2
4701 fi
4702done
81ecdfbb
RW
4703 done
4704IFS=$as_save_IFS
a417dc56
RW
4705
4706fi
4707fi
4708MAKE=$ac_cv_prog_MAKE
4709if test -n "$MAKE"; then
81ecdfbb
RW
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4711$as_echo "$MAKE" >&6; }
a417dc56 4712else
81ecdfbb
RW
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
a417dc56
RW
4715fi
4716
81ecdfbb 4717
a417dc56
RW
4718 test -n "$MAKE" && break
4719done
4720
4721MAKE_IS_GNU=
4722case "`$MAKE --version 2>&1 | sed 1q`" in
4723 *GNU*)
4724 MAKE_IS_GNU=yes
4725 ;;
4726esac
81ecdfbb 4727 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4728 GMAKE_TRUE=
4729 GMAKE_FALSE='#'
4730else
4731 GMAKE_TRUE='#'
4732 GMAKE_FALSE=
4733fi
4734
81ecdfbb
RW
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4736$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4737set x ${MAKE-make}
4738ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4739if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4740 $as_echo_n "(cached) " >&6
a417dc56
RW
4741else
4742 cat >conftest.make <<\_ACEOF
81ecdfbb 4743SHELL = /bin/sh
a417dc56 4744all:
81ecdfbb 4745 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4746_ACEOF
4747# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4748case `${MAKE-make} -f conftest.make 2>/dev/null` in
4749 *@@@%%%=?*=@@@%%%*)
4750 eval ac_cv_prog_make_${ac_make}_set=yes;;
4751 *)
4752 eval ac_cv_prog_make_${ac_make}_set=no;;
4753esac
a417dc56
RW
4754rm -f conftest.make
4755fi
81ecdfbb
RW
4756if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4758$as_echo "yes" >&6; }
a417dc56
RW
4759 SET_MAKE=
4760else
81ecdfbb
RW
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
a417dc56
RW
4763 SET_MAKE="MAKE=${MAKE-make}"
4764fi
4765
4766
783e057b
DJ
4767
4768CONFIG_OBS=
4769CONFIG_DEPS=
4770CONFIG_SRCS=
4771ENABLE_CFLAGS=
4772
4773CONFIG_ALL=
4774CONFIG_CLEAN=
4775CONFIG_INSTALL=
4776CONFIG_UNINSTALL=
4777
4778# If we haven't got the data from the intl directory,
4779# assume NLS is disabled.
4780USE_NLS=no
4781LIBINTL=
4782LIBINTL_DEP=
4783INCINTL=
4784XGETTEXT=
4785GMSGFMT=
4786POSUB=
4787
4788if test -f ../intl/config.intl; then
4789 . ../intl/config.intl
4790fi
81ecdfbb
RW
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4792$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4793if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795$as_echo "no" >&6; }
783e057b 4796else
81ecdfbb
RW
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4798$as_echo "yes" >&6; }
783e057b 4799
81ecdfbb 4800$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4801
4802
81ecdfbb
RW
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4804$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4805 # Look for .po and .gmo files in the source directory.
4806 CATALOGS=
4807 XLINGUAS=
4808 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4809 # If there aren't any .gmo files the shell will give us the
4810 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4811 # weeded out.
4812 case "$cat" in *\**)
4813 continue;;
4814 esac
4815 # The quadruple backslash is collapsed to a double backslash
4816 # by the backticks, then collapsed again by the double quotes,
4817 # leaving us with one backslash in the sed expression (right
4818 # before the dot that mustn't act as a wildcard).
4819 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4820 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4821 # The user is allowed to set LINGUAS to a list of languages to
4822 # install catalogs for. If it's empty that means "all of them."
4823 if test "x$LINGUAS" = x; then
4824 CATALOGS="$CATALOGS $cat"
4825 XLINGUAS="$XLINGUAS $lang"
4826 else
4827 case "$LINGUAS" in *$lang*)
4828 CATALOGS="$CATALOGS $cat"
4829 XLINGUAS="$XLINGUAS $lang"
4830 ;;
4831 esac
4832 fi
4833 done
4834 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4836$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4837
4838
4839 DATADIRNAME=share
4840
4841 INSTOBJEXT=.mo
4842
4843 GENCAT=gencat
4844
4845 CATOBJEXT=.gmo
4846
4847fi
4848
4849localedir='${datadir}/locale'
4850
4851
4852if test x"$USE_NLS" = xyes; then
4853 CONFIG_ALL="$CONFIG_ALL all-po"
4854 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4855 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4856 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4857fi
4858
4859
4860 GNULIB_MEMMEM=0;
4861 GNULIB_MEMPCPY=0;
4862 GNULIB_MEMRCHR=0;
4863 GNULIB_STPCPY=0;
4864 GNULIB_STPNCPY=0;
4865 GNULIB_STRCHRNUL=0;
4866 GNULIB_STRDUP=0;
4867 GNULIB_STRNDUP=0;
4868 GNULIB_STRNLEN=0;
4869 GNULIB_STRPBRK=0;
4870 GNULIB_STRSEP=0;
4871 GNULIB_STRSTR=0;
4872 GNULIB_STRCASESTR=0;
4873 GNULIB_STRTOK_R=0;
4874 GNULIB_MBSLEN=0;
4875 GNULIB_MBSNLEN=0;
4876 GNULIB_MBSCHR=0;
4877 GNULIB_MBSRCHR=0;
4878 GNULIB_MBSSTR=0;
4879 GNULIB_MBSCASECMP=0;
4880 GNULIB_MBSNCASECMP=0;
4881 GNULIB_MBSPCASECMP=0;
4882 GNULIB_MBSCASESTR=0;
4883 GNULIB_MBSCSPN=0;
4884 GNULIB_MBSPBRK=0;
4885 GNULIB_MBSSPN=0;
4886 GNULIB_MBSSEP=0;
4887 GNULIB_MBSTOK_R=0;
4888 GNULIB_STRERROR=0;
4889 GNULIB_STRSIGNAL=0;
4890 HAVE_DECL_MEMMEM=1;
4891 HAVE_MEMPCPY=1;
4892 HAVE_DECL_MEMRCHR=1;
4893 HAVE_STPCPY=1;
4894 HAVE_STPNCPY=1;
4895 HAVE_STRCHRNUL=1;
4896 HAVE_DECL_STRDUP=1;
4897 HAVE_STRNDUP=1;
4898 HAVE_DECL_STRNDUP=1;
4899 HAVE_DECL_STRNLEN=1;
4900 HAVE_STRPBRK=1;
4901 HAVE_STRSEP=1;
4902 HAVE_STRCASESTR=1;
4903 HAVE_DECL_STRTOK_R=1;
4904 HAVE_DECL_STRERROR=1;
4905 HAVE_DECL_STRSIGNAL=1;
4906 REPLACE_STRERROR=0;
4907 REPLACE_STRSIGNAL=0;
4908 REPLACE_MEMMEM=0;
4909 REPLACE_STRCASESTR=0;
4910 REPLACE_STRSTR=0;
4911
4912
81ecdfbb
RW
4913 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
4914if test "x$ac_cv_have_decl_memmem" = x""yes; then :
4915 ac_have_decl=1
783e057b 4916else
81ecdfbb 4917 ac_have_decl=0
783e057b 4918fi
783e057b
DJ
4919
4920cat >>confdefs.h <<_ACEOF
81ecdfbb 4921#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
4922_ACEOF
4923
4924
783e057b
DJ
4925
4926
4927
4928
4929
4930
4931
4932
783e057b 4933
783e057b 4934
783e057b 4935
81ecdfbb
RW
4936 for ac_func in memmem
4937do :
4938 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
4939if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 4940 cat >>confdefs.h <<_ACEOF
81ecdfbb 4941#define HAVE_MEMMEM 1
783e057b
DJ
4942_ACEOF
4943
4944else
4945
4946 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4947
4948fi
4949done
4950
4951
4952
4953 :
4954
4955
4956
4957
4958
4959 if test $ac_cv_have_decl_memmem = no; then
4960 HAVE_DECL_MEMMEM=0
4961 fi
4962 :
4963
4964
81ecdfbb
RW
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4966$as_echo_n "checking for long long int... " >&6; }
4967if test "${ac_cv_type_long_long_int+set}" = set; then :
4968 $as_echo_n "(cached) " >&6
783e057b 4969else
81ecdfbb 4970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 4971/* end confdefs.h. */
81ecdfbb
RW
4972
4973 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
4974 implementations with broken preprocessors. Perhaps this can
4975 be revisited in 2012. In the meantime, code should not expect
4976 #if to work with literals wider than 32 bits. */
4977 /* Test literals. */
4978 long long int ll = 9223372036854775807ll;
4979 long long int nll = -9223372036854775807LL;
4980 unsigned long long int ull = 18446744073709551615ULL;
4981 /* Test constant expressions. */
4982 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4983 ? 1 : -1)];
4984 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4985 ? 1 : -1)];
4986 int i = 63;
4987int
4988main ()
4989{
4990/* Test availability of runtime routines for shift and division. */
4991 long long int llmax = 9223372036854775807ll;
4992 unsigned long long int ullmax = 18446744073709551615ull;
4993 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4994 | (llmax / ll) | (llmax % ll)
4995 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4996 | (ullmax / ull) | (ullmax % ull));
4997 ;
4998 return 0;
4999}
5000
5001_ACEOF
81ecdfbb
RW
5002if ac_fn_c_try_link "$LINENO"; then :
5003 if test "$cross_compiling" = yes; then :
783e057b
DJ
5004 ac_cv_type_long_long_int=yes
5005else
81ecdfbb 5006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5007/* end confdefs.h. */
5008#include <limits.h>
5009 #ifndef LLONG_MAX
5010 # define HALF \
5011 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5012 # define LLONG_MAX (HALF - 1 + HALF)
5013 #endif
5014int
5015main ()
5016{
5017long long int n = 1;
5018 int i;
5019 for (i = 0; ; i++)
5020 {
5021 long long int m = n << i;
5022 if (m >> i != n)
5023 return 1;
5024 if (LLONG_MAX / 2 < m)
5025 break;
5026 }
5027 return 0;
5028 ;
5029 return 0;
5030}
5031_ACEOF
81ecdfbb 5032if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5033 ac_cv_type_long_long_int=yes
5034else
81ecdfbb 5035 ac_cv_type_long_long_int=no
783e057b 5036fi
81ecdfbb
RW
5037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5038 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5039fi
783e057b 5040
81ecdfbb
RW
5041else
5042 ac_cv_type_long_long_int=no
783e057b 5043fi
81ecdfbb
RW
5044rm -f core conftest.err conftest.$ac_objext \
5045 conftest$ac_exeext conftest.$ac_ext
783e057b 5046fi
81ecdfbb
RW
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5048$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5049 if test $ac_cv_type_long_long_int = yes; then
5050
81ecdfbb 5051$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5052
5053 fi
5054
5055
81ecdfbb
RW
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5057$as_echo_n "checking for unsigned long long int... " >&6; }
5058if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5059 $as_echo_n "(cached) " >&6
783e057b 5060else
81ecdfbb 5061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5062/* end confdefs.h. */
81ecdfbb
RW
5063
5064 /* For now, do not test the preprocessor; as of 2007 there are too many
783e057b
DJ
5065 implementations with broken preprocessors. Perhaps this can
5066 be revisited in 2012. In the meantime, code should not expect
5067 #if to work with literals wider than 32 bits. */
5068 /* Test literals. */
5069 long long int ll = 9223372036854775807ll;
5070 long long int nll = -9223372036854775807LL;
5071 unsigned long long int ull = 18446744073709551615ULL;
5072 /* Test constant expressions. */
5073 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5074 ? 1 : -1)];
5075 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5076 ? 1 : -1)];
5077 int i = 63;
5078int
5079main ()
5080{
5081/* Test availability of runtime routines for shift and division. */
5082 long long int llmax = 9223372036854775807ll;
5083 unsigned long long int ullmax = 18446744073709551615ull;
5084 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5085 | (llmax / ll) | (llmax % ll)
5086 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5087 | (ullmax / ull) | (ullmax % ull));
5088 ;
5089 return 0;
5090}
5091
5092_ACEOF
81ecdfbb 5093if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5094 ac_cv_type_unsigned_long_long_int=yes
5095else
81ecdfbb 5096 ac_cv_type_unsigned_long_long_int=no
783e057b 5097fi
81ecdfbb
RW
5098rm -f core conftest.err conftest.$ac_objext \
5099 conftest$ac_exeext conftest.$ac_ext
783e057b 5100fi
81ecdfbb
RW
5101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5102$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5103 if test $ac_cv_type_unsigned_long_long_int = yes; then
5104
81ecdfbb 5105$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5106
5107 fi
5108
5109
5110
81ecdfbb
RW
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5112$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5113if test "${gl_cv_have_include_next+set}" = set; then :
5114 $as_echo_n "(cached) " >&6
783e057b
DJ
5115else
5116 rm -rf conftestd1 conftestd2
5117 mkdir conftestd1 conftestd2
5118 cat <<EOF > conftestd1/conftest.h
5119#define DEFINED_IN_CONFTESTD1
5120#include_next <conftest.h>
5121#ifdef DEFINED_IN_CONFTESTD2
5122int foo;
5123#else
5124#error "include_next doesn't work"
5125#endif
5126EOF
5127 cat <<EOF > conftestd2/conftest.h
5128#ifndef DEFINED_IN_CONFTESTD1
5129#error "include_next test doesn't work"
5130#endif
5131#define DEFINED_IN_CONFTESTD2
5132EOF
5133 save_CPPFLAGS="$CPPFLAGS"
5134 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
81ecdfbb
RW
5135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5136/* end confdefs.h. */
783e057b
DJ
5137#include <conftest.h>
5138_ACEOF
81ecdfbb 5139if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5140 gl_cv_have_include_next=yes
5141else
81ecdfbb 5142 gl_cv_have_include_next=no
783e057b 5143fi
81ecdfbb 5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5145 CPPFLAGS="$save_CPPFLAGS"
5146 rm -rf conftestd1 conftestd2
5147
5148fi
81ecdfbb
RW
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5150$as_echo "$gl_cv_have_include_next" >&6; }
783e057b
DJ
5151 if test $gl_cv_have_include_next = yes; then
5152
5153
81ecdfbb 5154$as_echo "#define HAVE_INCLUDE_NEXT 1" >>confdefs.h
783e057b
DJ
5155
5156
5157 INCLUDE_NEXT=include_next
5158 else
5159 INCLUDE_NEXT=include
5160 fi
5161
5162
5163
5164
5165
5166
81ecdfbb
RW
5167 for ac_header in $gl_header_list
5168do :
5169 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5170ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5171eval as_val=\$$as_ac_Header
5172 if test "x$as_val" = x""yes; then :
783e057b 5173 cat >>confdefs.h <<_ACEOF
81ecdfbb 5174#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5175_ACEOF
5176
5177fi
5178
5179done
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
81ecdfbb
RW
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5191$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5192if test "${ac_cv_c_restrict+set}" = set; then :
5193 $as_echo_n "(cached) " >&6
783e057b
DJ
5194else
5195 ac_cv_c_restrict=no
5196 # The order here caters to the fact that C++ does not require restrict.
5197 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5199/* end confdefs.h. */
5200typedef int * int_ptr;
5201 int foo (int_ptr $ac_kw ip) {
5202 return ip[0];
5203 }
5204int
5205main ()
5206{
5207int s[1];
5208 int * $ac_kw t = s;
5209 t[0] = 0;
5210 return foo(t)
5211 ;
5212 return 0;
5213}
5214_ACEOF
81ecdfbb 5215if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5216 ac_cv_c_restrict=$ac_kw
783e057b 5217fi
81ecdfbb 5218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5219 test "$ac_cv_c_restrict" != no && break
5220 done
5221
5222fi
81ecdfbb
RW
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5224$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5225
5226 case $ac_cv_c_restrict in
5227 restrict) ;;
81ecdfbb 5228 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5229 ;;
5230 *) cat >>confdefs.h <<_ACEOF
5231#define restrict $ac_cv_c_restrict
5232_ACEOF
5233 ;;
5234 esac
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
783e057b
DJ
5247 :
5248
5249
5250
5251
5252
5253
5254
5255 if test $gl_cv_have_include_next = yes; then
5256 gl_cv_next_string_h='<'string.h'>'
5257 else
81ecdfbb
RW
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5259$as_echo_n "checking absolute name of <string.h>... " >&6; }
5260if test "${gl_cv_next_string_h+set}" = set; then :
5261 $as_echo_n "(cached) " >&6
783e057b
DJ
5262else
5263
5264 if test $ac_cv_header_string_h = yes; then
81ecdfbb 5265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5266/* end confdefs.h. */
5267#include <string.h>
5268
5269_ACEOF
5270 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5271 sed -n '\#/string.h#{
5272 s#.*"\(.*/string.h\)".*#\1#
5273 s#^/[^/]#//&#
5274 p
5275 q
5276 }'`'"'
5277 else
5278 gl_cv_next_string_h='<'string.h'>'
5279 fi
5280
5281fi
81ecdfbb
RW
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5283$as_echo "$gl_cv_next_string_h" >&6; }
783e057b
DJ
5284 fi
5285 NEXT_STRING_H=$gl_cv_next_string_h
5286
5287
5288
5289
5290
5291 GNULIB_WCWIDTH=0;
5292 HAVE_DECL_WCWIDTH=1;
5293 REPLACE_WCWIDTH=0;
5294 WCHAR_H=
5295
5296
5297
81ecdfbb 5298 if false; then
783e057b
DJ
5299 GL_COND_LIBTOOL_TRUE=
5300 GL_COND_LIBTOOL_FALSE='#'
5301else
5302 GL_COND_LIBTOOL_TRUE='#'
5303 GL_COND_LIBTOOL_FALSE=
5304fi
5305
5306 gl_cond_libtool=false
5307 gl_libdeps=
5308 gl_ltlibdeps=
5309
5310
5311
5312 gl_source_base='gnulib'
5313
5314
5315
5316
5317
5318
5319
5320
81ecdfbb
RW
5321 for ac_func in memchr
5322do :
5323 ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
5324if test "x$ac_cv_func_memchr" = x""yes; then :
783e057b 5325 cat >>confdefs.h <<_ACEOF
81ecdfbb 5326#define HAVE_MEMCHR 1
783e057b
DJ
5327_ACEOF
5328
5329else
5330
5331 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5332
5333fi
5334done
5335
5336
5337 if test $ac_cv_func_memchr = no; then
5338
81ecdfbb
RW
5339 for ac_header in bp-sym.h
5340do :
5341 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5342if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
783e057b 5343 cat >>confdefs.h <<_ACEOF
81ecdfbb 5344#define HAVE_BP_SYM_H 1
783e057b
DJ
5345_ACEOF
5346
5347fi
5348
5349done
5350
5351
5352 fi
5353
5354
81ecdfbb
RW
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
5356$as_echo_n "checking for working memcmp... " >&6; }
5357if test "${ac_cv_func_memcmp_working+set}" = set; then :
5358 $as_echo_n "(cached) " >&6
783e057b 5359else
81ecdfbb 5360 if test "$cross_compiling" = yes; then :
783e057b
DJ
5361 ac_cv_func_memcmp_working=no
5362else
81ecdfbb 5363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5364/* end confdefs.h. */
5365$ac_includes_default
5366int
5367main ()
5368{
5369
5370 /* Some versions of memcmp are not 8-bit clean. */
81ecdfbb 5371 char c0 = '\100', c1 = '\200', c2 = '\201';
783e057b 5372 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
81ecdfbb 5373 return 1;
783e057b
DJ
5374
5375 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5376 or more and with at least one buffer not starting on a 4-byte boundary.
5377 William Lewis provided this test program. */
5378 {
5379 char foo[21];
5380 char bar[21];
5381 int i;
5382 for (i = 0; i < 4; i++)
5383 {
5384 char *a = foo + i;
5385 char *b = bar + i;
5386 strcpy (a, "--------01111111");
5387 strcpy (b, "--------10000000");
5388 if (memcmp (a, b, 16) >= 0)
81ecdfbb 5389 return 1;
783e057b 5390 }
81ecdfbb 5391 return 0;
783e057b
DJ
5392 }
5393
5394 ;
5395 return 0;
5396}
5397_ACEOF
81ecdfbb 5398if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5399 ac_cv_func_memcmp_working=yes
5400else
81ecdfbb 5401 ac_cv_func_memcmp_working=no
783e057b 5402fi
81ecdfbb
RW
5403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5404 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5405fi
81ecdfbb 5406
783e057b 5407fi
81ecdfbb
RW
5408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
5409$as_echo "$ac_cv_func_memcmp_working" >&6; }
783e057b
DJ
5410test $ac_cv_func_memcmp_working = no &&
5411
5412
5413
5414
5415
5416
5417 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5418
5419
5420 if test $ac_cv_func_memcmp_working = no; then
5421
81ecdfbb 5422$as_echo "#define memcmp rpl_memcmp" >>confdefs.h
783e057b
DJ
5423
5424 :
5425 fi
5426
5427
5428
5429 if test $ac_cv_have_decl_memmem = yes; then
81ecdfbb
RW
5430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
5431$as_echo_n "checking whether memmem works in linear time... " >&6; }
5432if test "${gl_cv_func_memmem_works+set}" = set; then :
5433 $as_echo_n "(cached) " >&6
783e057b 5434else
81ecdfbb 5435 if test "$cross_compiling" = yes; then :
783e057b
DJ
5436 gl_cv_func_memmem_works="guessing no"
5437else
81ecdfbb 5438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5439/* end confdefs.h. */
5440
5441#include <string.h> /* for memmem */
5442#include <stdlib.h> /* for malloc */
5443#include <unistd.h> /* for alarm */
5444
5445int
5446main ()
5447{
5448size_t m = 1000000;
5449 char *haystack = (char *) malloc (2 * m + 1);
5450 char *needle = (char *) malloc (m + 1);
5451 void *result = 0;
5452 /* Failure to compile this test due to missing alarm is okay,
5453 since all such platforms (mingw) also lack memmem. */
5454 alarm (5);
5455 /* Check for quadratic performance. */
5456 if (haystack && needle)
5457 {
5458 memset (haystack, 'A', 2 * m);
5459 haystack[2 * m] = 'B';
5460 memset (needle, 'A', m);
5461 needle[m] = 'B';
5462 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5463 }
5464 /* Check for empty needle behavior. */
5465 return !result || !memmem ("a", 1, 0, 0);
5466 ;
5467 return 0;
5468}
5469_ACEOF
81ecdfbb 5470if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5471 gl_cv_func_memmem_works=yes
5472else
81ecdfbb 5473 gl_cv_func_memmem_works=no
783e057b 5474fi
81ecdfbb
RW
5475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5476 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5477fi
81ecdfbb 5478
783e057b 5479fi
81ecdfbb
RW
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
5481$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
5482 if test "$gl_cv_func_memmem_works" != yes; then
5483 REPLACE_MEMMEM=1
5484
5485
5486
5487
5488
5489
5490
5491 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5492
5493 fi
5494 fi
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
81ecdfbb
RW
5507 for ac_func in memmem
5508do :
5509 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5510if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5511 cat >>confdefs.h <<_ACEOF
81ecdfbb 5512#define HAVE_MEMMEM 1
783e057b
DJ
5513_ACEOF
5514
5515else
5516
5517 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5518
5519fi
5520done
5521
5522
5523
5524 :
5525
5526
5527
5528
5529
5530 if test $ac_cv_have_decl_memmem = no; then
5531 HAVE_DECL_MEMMEM=0
5532 fi
5533 :
5534
5535
5536
5537 GNULIB_MEMMEM=1
5538
5539
5540
5541
5542 if test $ac_cv_type_long_long_int = yes; then
5543 HAVE_LONG_LONG_INT=1
5544 else
5545 HAVE_LONG_LONG_INT=0
5546 fi
5547
5548
5549 if test $ac_cv_type_unsigned_long_long_int = yes; then
5550 HAVE_UNSIGNED_LONG_LONG_INT=1
5551 else
5552 HAVE_UNSIGNED_LONG_LONG_INT=0
5553 fi
5554
5555
5556 if test $ac_cv_header_inttypes_h = yes; then
5557 HAVE_INTTYPES_H=1
5558 else
5559 HAVE_INTTYPES_H=0
5560 fi
5561
5562
5563 if test $ac_cv_header_sys_types_h = yes; then
5564 HAVE_SYS_TYPES_H=1
5565 else
5566 HAVE_SYS_TYPES_H=0
5567 fi
5568
5569
5570
5571
5572
5573 :
5574
5575
5576
5577
5578
5579
5580
5581 if test $gl_cv_have_include_next = yes; then
5582 gl_cv_next_stdint_h='<'stdint.h'>'
5583 else
81ecdfbb
RW
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
5585$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
5586if test "${gl_cv_next_stdint_h+set}" = set; then :
5587 $as_echo_n "(cached) " >&6
783e057b
DJ
5588else
5589
5590 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb 5591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5592/* end confdefs.h. */
5593#include <stdint.h>
5594
5595_ACEOF
5596 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5597 sed -n '\#/stdint.h#{
5598 s#.*"\(.*/stdint.h\)".*#\1#
5599 s#^/[^/]#//&#
5600 p
5601 q
5602 }'`'"'
5603 else
5604 gl_cv_next_stdint_h='<'stdint.h'>'
5605 fi
5606
5607fi
81ecdfbb
RW
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
5609$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
5610 fi
5611 NEXT_STDINT_H=$gl_cv_next_stdint_h
5612
5613
5614
5615 if test $ac_cv_header_stdint_h = yes; then
5616 HAVE_STDINT_H=1
5617 else
5618 HAVE_STDINT_H=0
5619 fi
5620
5621
5622 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
5624$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
5625if test "${gl_cv_header_working_stdint_h+set}" = set; then :
5626 $as_echo_n "(cached) " >&6
783e057b
DJ
5627else
5628 gl_cv_header_working_stdint_h=no
81ecdfbb 5629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5630/* end confdefs.h. */
5631
81ecdfbb 5632
783e057b
DJ
5633#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5634#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5635#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5636#include <stdint.h>
5637/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5638#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5639#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5640#endif
5641
5642
5643 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5644 included before <wchar.h>. */
5645 #include <stddef.h>
5646 #include <signal.h>
5647 #if HAVE_WCHAR_H
5648 # include <stdio.h>
5649 # include <time.h>
5650 # include <wchar.h>
5651 #endif
5652
5653
5654#ifdef INT8_MAX
5655int8_t a1 = INT8_MAX;
5656int8_t a1min = INT8_MIN;
5657#endif
5658#ifdef INT16_MAX
5659int16_t a2 = INT16_MAX;
5660int16_t a2min = INT16_MIN;
5661#endif
5662#ifdef INT32_MAX
5663int32_t a3 = INT32_MAX;
5664int32_t a3min = INT32_MIN;
5665#endif
5666#ifdef INT64_MAX
5667int64_t a4 = INT64_MAX;
5668int64_t a4min = INT64_MIN;
5669#endif
5670#ifdef UINT8_MAX
5671uint8_t b1 = UINT8_MAX;
5672#else
5673typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5674#endif
5675#ifdef UINT16_MAX
5676uint16_t b2 = UINT16_MAX;
5677#endif
5678#ifdef UINT32_MAX
5679uint32_t b3 = UINT32_MAX;
5680#endif
5681#ifdef UINT64_MAX
5682uint64_t b4 = UINT64_MAX;
5683#endif
5684int_least8_t c1 = INT8_C (0x7f);
5685int_least8_t c1max = INT_LEAST8_MAX;
5686int_least8_t c1min = INT_LEAST8_MIN;
5687int_least16_t c2 = INT16_C (0x7fff);
5688int_least16_t c2max = INT_LEAST16_MAX;
5689int_least16_t c2min = INT_LEAST16_MIN;
5690int_least32_t c3 = INT32_C (0x7fffffff);
5691int_least32_t c3max = INT_LEAST32_MAX;
5692int_least32_t c3min = INT_LEAST32_MIN;
5693int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5694int_least64_t c4max = INT_LEAST64_MAX;
5695int_least64_t c4min = INT_LEAST64_MIN;
5696uint_least8_t d1 = UINT8_C (0xff);
5697uint_least8_t d1max = UINT_LEAST8_MAX;
5698uint_least16_t d2 = UINT16_C (0xffff);
5699uint_least16_t d2max = UINT_LEAST16_MAX;
5700uint_least32_t d3 = UINT32_C (0xffffffff);
5701uint_least32_t d3max = UINT_LEAST32_MAX;
5702uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5703uint_least64_t d4max = UINT_LEAST64_MAX;
5704int_fast8_t e1 = INT_FAST8_MAX;
5705int_fast8_t e1min = INT_FAST8_MIN;
5706int_fast16_t e2 = INT_FAST16_MAX;
5707int_fast16_t e2min = INT_FAST16_MIN;
5708int_fast32_t e3 = INT_FAST32_MAX;
5709int_fast32_t e3min = INT_FAST32_MIN;
5710int_fast64_t e4 = INT_FAST64_MAX;
5711int_fast64_t e4min = INT_FAST64_MIN;
5712uint_fast8_t f1 = UINT_FAST8_MAX;
5713uint_fast16_t f2 = UINT_FAST16_MAX;
5714uint_fast32_t f3 = UINT_FAST32_MAX;
5715uint_fast64_t f4 = UINT_FAST64_MAX;
5716#ifdef INTPTR_MAX
5717intptr_t g = INTPTR_MAX;
5718intptr_t gmin = INTPTR_MIN;
5719#endif
5720#ifdef UINTPTR_MAX
5721uintptr_t h = UINTPTR_MAX;
5722#endif
5723intmax_t i = INTMAX_MAX;
5724uintmax_t j = UINTMAX_MAX;
5725
5726#include <limits.h> /* for CHAR_BIT */
5727#define TYPE_MINIMUM(t) \
5728 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5729#define TYPE_MAXIMUM(t) \
5730 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5731struct s {
5732 int check_PTRDIFF:
5733 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5734 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5735 ? 1 : -1;
5736 /* Detect bug in FreeBSD 6.0 / ia64. */
5737 int check_SIG_ATOMIC:
5738 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5739 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5740 ? 1 : -1;
5741 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5742 int check_WCHAR:
5743 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5744 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5745 ? 1 : -1;
5746 /* Detect bug in mingw. */
5747 int check_WINT:
5748 WINT_MIN == TYPE_MINIMUM (wint_t)
5749 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5750 ? 1 : -1;
5751
5752 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5753 int check_UINT8_C:
5754 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5755 int check_UINT16_C:
5756 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5757
5758 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5759#ifdef UINT8_MAX
5760 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5761#endif
5762#ifdef UINT16_MAX
5763 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5764#endif
5765#ifdef UINT32_MAX
5766 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5767#endif
5768#ifdef UINT64_MAX
5769 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5770#endif
5771 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5772 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5773 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5774 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5775 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5776 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5777 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5778 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5779 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5780 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5781 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5782};
5783
5784int
5785main ()
5786{
5787
5788 ;
5789 return 0;
5790}
5791_ACEOF
81ecdfbb 5792if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5793 gl_cv_header_working_stdint_h=yes
783e057b 5794fi
81ecdfbb 5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 5796fi
81ecdfbb
RW
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
5798$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
5799 fi
5800 if test "$gl_cv_header_working_stdint_h" = yes; then
5801 STDINT_H=
5802 else
81ecdfbb
RW
5803 for ac_header in sys/inttypes.h sys/bitypes.h
5804do :
5805 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5806ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5807eval as_val=\$$as_ac_Header
5808 if test "x$as_val" = x""yes; then :
783e057b 5809 cat >>confdefs.h <<_ACEOF
81ecdfbb 5810#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
5811_ACEOF
5812
5813fi
5814
5815done
5816
5817 if test $ac_cv_header_sys_inttypes_h = yes; then
5818 HAVE_SYS_INTTYPES_H=1
5819 else
5820 HAVE_SYS_INTTYPES_H=0
5821 fi
5822
5823 if test $ac_cv_header_sys_bitypes_h = yes; then
5824 HAVE_SYS_BITYPES_H=1
5825 else
5826 HAVE_SYS_BITYPES_H=0
5827 fi
5828
5829
5830
5831 :
5832
5833
5834
5835
5836
5837
5838
5839
5840
81ecdfbb
RW
5841 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5843$as_echo_n "checking for bit size of $gltype... " >&6; }
5844if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5845 $as_echo_n "(cached) " >&6
5846else
5847 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5848 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5849 included before <wchar.h>. */
5850 #include <stddef.h>
5851 #include <signal.h>
5852 #if HAVE_WCHAR_H
5853 # include <stdio.h>
5854 # include <time.h>
5855 # include <wchar.h>
5856 #endif
5857
5858#include <limits.h>"; then :
5859
5860else
5861 result=unknown
5862fi
5863
5864 eval gl_cv_bitsizeof_${gltype}=\$result
5865
5866fi
5867eval ac_res=\$gl_cv_bitsizeof_${gltype}
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5869$as_echo "$ac_res" >&6; }
5870 eval result=\$gl_cv_bitsizeof_${gltype}
5871 if test $result = unknown; then
5872 result=0
5873 fi
5874 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5875 cat >>confdefs.h <<_ACEOF
5876#define BITSIZEOF_${GLTYPE} $result
5877_ACEOF
783e057b 5878
81ecdfbb
RW
5879 eval BITSIZEOF_${GLTYPE}=\$result
5880 done
783e057b
DJ
5881
5882
5883
5884
81ecdfbb
RW
5885 for gltype in sig_atomic_t wchar_t wint_t ; do
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
5887$as_echo_n "checking whether $gltype is signed... " >&6; }
5888if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
5889 $as_echo_n "(cached) " >&6
783e057b 5890else
81ecdfbb 5891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5892/* end confdefs.h. */
5893
5894 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5895 included before <wchar.h>. */
5896 #include <stddef.h>
5897 #include <signal.h>
5898 #if HAVE_WCHAR_H
5899 # include <stdio.h>
5900 # include <time.h>
5901 # include <wchar.h>
5902 #endif
5903
5904 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
5905int
5906main ()
5907{
5908
5909 ;
5910 return 0;
5911}
5912_ACEOF
81ecdfbb 5913if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
5914 result=yes
5915else
81ecdfbb 5916 result=no
20e95c23 5917fi
81ecdfbb 5918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5919 eval gl_cv_type_${gltype}_signed=\$result
5920
5921fi
81ecdfbb
RW
5922eval ac_res=\$gl_cv_type_${gltype}_signed
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5924$as_echo "$ac_res" >&6; }
783e057b
DJ
5925 eval result=\$gl_cv_type_${gltype}_signed
5926 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5927 if test "$result" = yes; then
5928 cat >>confdefs.h <<_ACEOF
5929#define HAVE_SIGNED_${GLTYPE} 1
5930_ACEOF
5931
5932 eval HAVE_SIGNED_${GLTYPE}=1
5933 else
5934 eval HAVE_SIGNED_${GLTYPE}=0
5935 fi
5936 done
5937
5938
5939 gl_cv_type_ptrdiff_t_signed=yes
5940 gl_cv_type_size_t_signed=no
5941
5942
783e057b 5943 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
81ecdfbb
RW
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
5945$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
5946if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
5947 $as_echo_n "(cached) " >&6
c906108c 5948else
783e057b
DJ
5949 eval gl_cv_type_${gltype}_suffix=no
5950 eval result=\$gl_cv_type_${gltype}_signed
5951 if test "$result" = yes; then
5952 glsufu=
5953 else
5954 glsufu=u
5955 fi
5956 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
5957 case $glsuf in
5958 '') gltype1='int';;
5959 l) gltype1='long int';;
5960 ll) gltype1='long long int';;
5961 i64) gltype1='__int64';;
5962 u) gltype1='unsigned int';;
5963 ul) gltype1='unsigned long int';;
5964 ull) gltype1='unsigned long long int';;
5965 ui64)gltype1='unsigned __int64';;
5966 esac
81ecdfbb 5967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5968/* end confdefs.h. */
5969
5970 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5971 included before <wchar.h>. */
5972 #include <stddef.h>
5973 #include <signal.h>
5974 #if HAVE_WCHAR_H
5975 # include <stdio.h>
5976 # include <time.h>
5977 # include <wchar.h>
5978 #endif
5979
5980 extern $gltype foo;
5981 extern $gltype1 foo;
5982int
5983main ()
5984{
5985
5986 ;
5987 return 0;
5988}
5989_ACEOF
81ecdfbb 5990if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5991 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 5992fi
81ecdfbb 5993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5994 eval result=\$gl_cv_type_${gltype}_suffix
5995 test "$result" != no && break
5996 done
5997fi
81ecdfbb
RW
5998eval ac_res=\$gl_cv_type_${gltype}_suffix
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6000$as_echo "$ac_res" >&6; }
783e057b
DJ
6001 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6002 eval result=\$gl_cv_type_${gltype}_suffix
6003 test "$result" = no && result=
6004 eval ${GLTYPE}_SUFFIX=\$result
6005 cat >>confdefs.h <<_ACEOF
6006#define ${GLTYPE}_SUFFIX $result
6007_ACEOF
6008
6009 done
6010
6011
6012
6013 STDINT_H=stdint.h
6014 fi
6015
6016
6017
6018
6019
6020
6021
81ecdfbb
RW
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> is standalone" >&5
6023$as_echo_n "checking whether <wchar.h> is standalone... " >&6; }
6024if test "${gl_cv_header_wchar_h_standalone+set}" = set; then :
6025 $as_echo_n "(cached) " >&6
783e057b 6026else
81ecdfbb
RW
6027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6028/* end confdefs.h. */
783e057b
DJ
6029#include <wchar.h>
6030wchar_t w;
6031_ACEOF
81ecdfbb 6032if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6033 gl_cv_header_wchar_h_standalone=yes
6034else
81ecdfbb 6035 gl_cv_header_wchar_h_standalone=no
783e057b 6036fi
81ecdfbb 6037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 6038fi
81ecdfbb
RW
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_standalone" >&5
6040$as_echo "$gl_cv_header_wchar_h_standalone" >&6; }
783e057b
DJ
6041 if test $gl_cv_header_wchar_h_standalone != yes; then
6042 WCHAR_H=wchar.h
6043 fi
6044
6045
6046 :
6047
6048
6049
6050
6051
6052 if test $ac_cv_header_wchar_h = yes; then
6053 HAVE_WCHAR_H=1
6054 else
6055 HAVE_WCHAR_H=0
6056 fi
6057
6058
6059
6060
6061 :
6062
6063
6064
6065
6066
6067
6068
6069 if test $gl_cv_have_include_next = yes; then
6070 gl_cv_next_wchar_h='<'wchar.h'>'
6071 else
81ecdfbb
RW
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6073$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6074if test "${gl_cv_next_wchar_h+set}" = set; then :
6075 $as_echo_n "(cached) " >&6
783e057b
DJ
6076else
6077
6078 if test $ac_cv_header_wchar_h = yes; then
81ecdfbb 6079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6080/* end confdefs.h. */
6081#include <wchar.h>
6082
6083_ACEOF
6084 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6085 sed -n '\#/wchar.h#{
6086 s#.*"\(.*/wchar.h\)".*#\1#
6087 s#^/[^/]#//&#
6088 p
6089 q
6090 }'`'"'
6091 else
6092 gl_cv_next_wchar_h='<'wchar.h'>'
6093 fi
6094
6095fi
81ecdfbb
RW
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
6097$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
6098 fi
6099 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6100
c906108c 6101
c906108c 6102
c906108c 6103
c906108c 6104
c906108c 6105
c906108c 6106
c906108c 6107
783e057b
DJ
6108 gltests_libdeps=
6109 gltests_ltlibdeps=
20e95c23 6110
20e95c23 6111
20e95c23 6112
783e057b 6113 gl_source_base='tests'
c906108c 6114
bec39cab 6115
bec39cab 6116
783e057b
DJ
6117
6118 LIBGNU_LIBDEPS="$gl_libdeps"
6119
6120 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6121
6122
e28b3332 6123
d5af19ba
DJ
6124# For Makefile dependencies.
6125GNULIB_STDINT_H=
6126if test x"$STDINT_H" != x; then
6127 GNULIB_STDINT_H=gnulib/$STDINT_H
6128fi
6129
6130
bec39cab
AC
6131PACKAGE=gdb
6132
6133cat >>confdefs.h <<_ACEOF
6134#define PACKAGE "$PACKAGE"
6135_ACEOF
6136
6137
6138
e28b3332
DJ
6139# GDB does not use automake, but gnulib does. This line lets us
6140# generate its Makefile.in.
81ecdfbb
RW
6141am__api_version='1.11'
6142
e28b3332
DJ
6143# Find a good install program. We prefer a C program (faster),
6144# so one script is as good as another. But avoid the broken or
6145# incompatible versions:
6146# SysV /etc/install, /usr/sbin/install
6147# SunOS /usr/etc/install
6148# IRIX /sbin/install
6149# AIX /bin/install
6150# AmigaOS /C/install, which installs bootblocks on floppy discs
6151# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6152# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6153# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6154# OS/2's system install, which has a completely different semantic
6155# ./install, which can be erroneously created by make from ./install.sh.
85541719 6156# Reject install programs that cannot install multiple files.
81ecdfbb
RW
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6158$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 6159if test -z "$INSTALL"; then
81ecdfbb
RW
6160if test "${ac_cv_path_install+set}" = set; then :
6161 $as_echo_n "(cached) " >&6
e28b3332
DJ
6162else
6163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH
6165do
6166 IFS=$as_save_IFS
6167 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6168 # Account for people who put trailing slashes in PATH elements.
6169case $as_dir/ in #((
6170 ./ | .// | /[cC]/* | \
e28b3332 6171 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 6172 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
6173 /usr/ucb/* ) ;;
6174 *)
6175 # OSF1 and SCO ODT 3.0 have their own names for install.
6176 # Don't use installbsd from OSF since it installs stuff as root
6177 # by default.
6178 for ac_prog in ginstall scoinst install; do
6179 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 6180 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
6181 if test $ac_prog = install &&
6182 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6183 # AIX install. It has an incompatible calling convention.
6184 :
6185 elif test $ac_prog = install &&
6186 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6187 # program-specific install script used by HP pwplus--don't use.
6188 :
6189 else
85541719
DE
6190 rm -rf conftest.one conftest.two conftest.dir
6191 echo one > conftest.one
6192 echo two > conftest.two
6193 mkdir conftest.dir
6194 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6195 test -s conftest.one && test -s conftest.two &&
6196 test -s conftest.dir/conftest.one &&
6197 test -s conftest.dir/conftest.two
6198 then
6199 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6200 break 3
6201 fi
e28b3332
DJ
6202 fi
6203 fi
6204 done
6205 done
6206 ;;
6207esac
81ecdfbb
RW
6208
6209 done
6210IFS=$as_save_IFS
e28b3332 6211
85541719 6212rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6213
6214fi
6215 if test "${ac_cv_path_install+set}" = set; then
6216 INSTALL=$ac_cv_path_install
6217 else
85541719
DE
6218 # As a last resort, use the slow shell script. Don't cache a
6219 # value for INSTALL within a source directory, because that will
e28b3332 6220 # break other packages using the cache if that directory is
85541719 6221 # removed, or if the value is a relative name.
e28b3332
DJ
6222 INSTALL=$ac_install_sh
6223 fi
6224fi
81ecdfbb
RW
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6226$as_echo "$INSTALL" >&6; }
e28b3332
DJ
6227
6228# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6229# It thinks the first close brace ends the variable substitution.
6230test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6231
6232test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6233
6234test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6235
81ecdfbb
RW
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
6237$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
6238# Just in case
6239sleep 1
6240echo timestamp > conftest.file
81ecdfbb
RW
6241# Reject unsafe characters in $srcdir or the absolute working directory
6242# name. Accept space and tab only in the latter.
6243am_lf='
6244'
6245case `pwd` in
6246 *[\\\"\#\$\&\'\`$am_lf]*)
6247 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
6248esac
6249case $srcdir in
6250 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
6251 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
6252esac
6253
e28b3332
DJ
6254# Do `set' in a subshell so we don't clobber the current shell's
6255# arguments. Must try -L first in case configure is actually a
6256# symlink; some systems play weird games with the mod time of symlinks
6257# (eg FreeBSD returns the mod time of the symlink's containing
6258# directory).
6259if (
81ecdfbb 6260 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
6261 if test "$*" = "X"; then
6262 # -L didn't work.
81ecdfbb 6263 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
6264 fi
6265 rm -f conftest.file
6266 if test "$*" != "X $srcdir/configure conftest.file" \
6267 && test "$*" != "X conftest.file $srcdir/configure"; then
6268
6269 # If neither matched, then we have a broken ls. This can happen
6270 # if, for instance, CONFIG_SHELL is bash and it inherits a
6271 # broken ls alias from the environment. This has actually
6272 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
6273 as_fn_error "ls -t appears to fail. Make sure there is not a broken
6274alias in your environment" "$LINENO" 5
e28b3332
DJ
6275 fi
6276
6277 test "$2" = conftest.file
6278 )
6279then
6280 # Ok.
6281 :
6282else
81ecdfbb
RW
6283 as_fn_error "newly created file is older than distributed files!
6284Check your system clock" "$LINENO" 5
e28b3332 6285fi
81ecdfbb
RW
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6287$as_echo "yes" >&6; }
e28b3332 6288test "$program_prefix" != NONE &&
81ecdfbb 6289 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
6290# Use a double $ so make ignores it.
6291test "$program_suffix" != NONE &&
81ecdfbb
RW
6292 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
6293# Double any \ or $.
e28b3332 6294# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
6295ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
6296program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
6297
6298# expand $ac_aux_dir to an absolute path
6299am_aux_dir=`cd $ac_aux_dir && pwd`
6300
81ecdfbb
RW
6301if test x"${MISSING+set}" != xset; then
6302 case $am_aux_dir in
6303 *\ * | *\ *)
6304 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
6305 *)
6306 MISSING="\${SHELL} $am_aux_dir/missing" ;;
6307 esac
6308fi
e28b3332
DJ
6309# Use eval to expand $SHELL
6310if eval "$MISSING --run true"; then
6311 am_missing_run="$MISSING --run "
6312else
6313 am_missing_run=
81ecdfbb
RW
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
6315$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6316fi
6317
6318if test x"${install_sh}" != xset; then
6319 case $am_aux_dir in
6320 *\ * | *\ *)
6321 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6322 *)
6323 install_sh="\${SHELL} $am_aux_dir/install-sh"
6324 esac
6325fi
6326
6327# Installed binaries are usually stripped using `strip' when the user
6328# run `make install-strip'. However `strip' might not be the right
6329# tool to use in cross-compilation environments, therefore Automake
6330# will honor the `STRIP' environment variable to overrule this program.
6331if test "$cross_compiling" != no; then
6332 if test -n "$ac_tool_prefix"; then
6333 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6334set dummy ${ac_tool_prefix}strip; ac_word=$2
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6336$as_echo_n "checking for $ac_word... " >&6; }
6337if test "${ac_cv_prog_STRIP+set}" = set; then :
6338 $as_echo_n "(cached) " >&6
6339else
6340 if test -n "$STRIP"; then
6341 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6342else
6343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6344for as_dir in $PATH
6345do
6346 IFS=$as_save_IFS
6347 test -z "$as_dir" && as_dir=.
6348 for ac_exec_ext in '' $ac_executable_extensions; do
6349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6350 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6352 break 2
6353 fi
6354done
6355 done
6356IFS=$as_save_IFS
6357
6358fi
6359fi
6360STRIP=$ac_cv_prog_STRIP
6361if test -n "$STRIP"; then
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6363$as_echo "$STRIP" >&6; }
6364else
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6366$as_echo "no" >&6; }
6367fi
6368
6369
6370fi
6371if test -z "$ac_cv_prog_STRIP"; then
6372 ac_ct_STRIP=$STRIP
6373 # Extract the first word of "strip", so it can be a program name with args.
6374set dummy strip; ac_word=$2
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
6378 $as_echo_n "(cached) " >&6
6379else
6380 if test -n "$ac_ct_STRIP"; then
6381 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6382else
6383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384for as_dir in $PATH
6385do
6386 IFS=$as_save_IFS
6387 test -z "$as_dir" && as_dir=.
6388 for ac_exec_ext in '' $ac_executable_extensions; do
6389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6390 ac_cv_prog_ac_ct_STRIP="strip"
6391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6392 break 2
6393 fi
6394done
6395 done
6396IFS=$as_save_IFS
6397
6398fi
6399fi
6400ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6401if test -n "$ac_ct_STRIP"; then
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6403$as_echo "$ac_ct_STRIP" >&6; }
6404else
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409 if test "x$ac_ct_STRIP" = x; then
6410 STRIP=":"
6411 else
6412 case $cross_compiling:$ac_tool_warned in
6413yes:)
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6416ac_tool_warned=yes ;;
6417esac
6418 STRIP=$ac_ct_STRIP
6419 fi
6420else
6421 STRIP="$ac_cv_prog_STRIP"
6422fi
6423
6424fi
6425INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
6426
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6428$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6429if test -z "$MKDIR_P"; then
6430 if test "${ac_cv_path_mkdir+set}" = set; then :
6431 $as_echo_n "(cached) " >&6
6432else
6433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6435do
6436 IFS=$as_save_IFS
6437 test -z "$as_dir" && as_dir=.
6438 for ac_prog in mkdir gmkdir; do
6439 for ac_exec_ext in '' $ac_executable_extensions; do
6440 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
6441 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6442 'mkdir (GNU coreutils) '* | \
6443 'mkdir (coreutils) '* | \
6444 'mkdir (fileutils) '4.1*)
6445 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6446 break 3;;
6447 esac
6448 done
6449 done
e28b3332 6450 done
81ecdfbb
RW
6451IFS=$as_save_IFS
6452
6453fi
6454
6455 if test "${ac_cv_path_mkdir+set}" = set; then
6456 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 6457 else
81ecdfbb
RW
6458 # As a last resort, use the slow shell script. Don't cache a
6459 # value for MKDIR_P within a source directory, because that will
6460 # break other packages using the cache if that directory is
6461 # removed, or if the value is a relative name.
6462 test -d ./--version && rmdir ./--version
6463 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
6464 fi
6465fi
81ecdfbb
RW
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6467$as_echo "$MKDIR_P" >&6; }
6468
6469mkdir_p="$MKDIR_P"
6470case $mkdir_p in
6471 [\\/$]* | ?:[\\/]*) ;;
6472 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
6473esac
e28b3332
DJ
6474
6475for ac_prog in gawk mawk nawk awk
6476do
6477 # Extract the first word of "$ac_prog", so it can be a program name with args.
6478set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6480$as_echo_n "checking for $ac_word... " >&6; }
6481if test "${ac_cv_prog_AWK+set}" = set; then :
6482 $as_echo_n "(cached) " >&6
e28b3332
DJ
6483else
6484 if test -n "$AWK"; then
6485 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6486else
6487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490 IFS=$as_save_IFS
6491 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6492 for ac_exec_ext in '' $ac_executable_extensions; do
6493 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 6494 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
6496 break 2
6497 fi
6498done
81ecdfbb
RW
6499 done
6500IFS=$as_save_IFS
e28b3332
DJ
6501
6502fi
6503fi
6504AWK=$ac_cv_prog_AWK
6505if test -n "$AWK"; then
81ecdfbb
RW
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6507$as_echo "$AWK" >&6; }
e28b3332 6508else
81ecdfbb
RW
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
e28b3332
DJ
6511fi
6512
81ecdfbb 6513
e28b3332
DJ
6514 test -n "$AWK" && break
6515done
6516
81ecdfbb 6517ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
6518
6519
6520am_make=${MAKE-make}
6521cat > confinc << 'END'
6522am__doit:
81ecdfbb 6523 @echo this is the am__doit target
e28b3332
DJ
6524.PHONY: am__doit
6525END
6526# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
6528$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
6529am__include="#"
6530am__quote=
6531_am_result=none
6532# First try GNU make style include.
6533echo "include confinc" > confmf
81ecdfbb
RW
6534# Ignore all kinds of additional output from `make'.
6535case `$am_make -s -f confmf 2> /dev/null` in #(
6536*the\ am__doit\ target*)
6537 am__include=include
6538 am__quote=
6539 _am_result=GNU
6540 ;;
6541esac
e28b3332
DJ
6542# Now try BSD make style include.
6543if test "$am__include" = "#"; then
6544 echo '.include "confinc"' > confmf
81ecdfbb
RW
6545 case `$am_make -s -f confmf 2> /dev/null` in #(
6546 *the\ am__doit\ target*)
6547 am__include=.include
6548 am__quote="\""
6549 _am_result=BSD
6550 ;;
6551 esac
e28b3332
DJ
6552fi
6553
6554
81ecdfbb
RW
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
6556$as_echo "$_am_result" >&6; }
e28b3332
DJ
6557rm -f confinc confmf
6558
81ecdfbb
RW
6559# Check whether --enable-dependency-tracking was given.
6560if test "${enable_dependency_tracking+set}" = set; then :
6561 enableval=$enable_dependency_tracking;
6562fi
e28b3332 6563
e28b3332
DJ
6564if test "x$enable_dependency_tracking" != xno; then
6565 am_depcomp="$ac_aux_dir/depcomp"
6566 AMDEPBACKSLASH='\'
6567fi
81ecdfbb 6568 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
6569 AMDEP_TRUE=
6570 AMDEP_FALSE='#'
6571else
6572 AMDEP_TRUE='#'
6573 AMDEP_FALSE=
6574fi
6575
6576
81ecdfbb
RW
6577if test "`cd $srcdir && pwd`" != "`pwd`"; then
6578 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6579 # is not polluted with repeated "-I."
6580 am__isrc=' -I$(srcdir)'
6581 # test to see if srcdir already configured
6582 if test -f $srcdir/config.status; then
6583 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6584 fi
e28b3332
DJ
6585fi
6586
6587# test whether we have cygpath
6588if test -z "$CYGPATH_W"; then
6589 if (cygpath --version) >/dev/null 2>/dev/null; then
6590 CYGPATH_W='cygpath -w'
6591 else
6592 CYGPATH_W=echo
6593 fi
6594fi
6595
6596
6597# Define the identity of the package.
6598 PACKAGE=gdb
6599 VERSION=UNUSED-VERSION
6600
6601
6602# Some tools Automake needs.
6603
6604ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6605
6606
6607AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6608
6609
6610AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6611
6612
6613AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6614
6615
6616MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6617
e28b3332
DJ
6618# We need awk for the "check" target. The system "awk" is bad on
6619# some platforms.
6620# Always define AMTAR for backward compatibility.
6621
6622AMTAR=${AMTAR-"${am_missing_run}tar"}
6623
6624am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6625
6626
6627
6628
6629depcc="$CC" am_compiler_list=
6630
81ecdfbb
RW
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6632$as_echo_n "checking dependency style of $depcc... " >&6; }
6633if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6634 $as_echo_n "(cached) " >&6
e28b3332
DJ
6635else
6636 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6637 # We make a subdir and do the tests there. Otherwise we can end up
6638 # making bogus files that we don't know about and never remove. For
6639 # instance it was reported that on HP-UX the gcc test will end up
6640 # making a dummy file named `D' -- because `-MD' means `put the output
6641 # in D'.
6642 mkdir conftest.dir
6643 # Copy depcomp to subdir because otherwise we won't find it if we're
6644 # using a relative directory.
6645 cp "$am_depcomp" conftest.dir
6646 cd conftest.dir
6647 # We will build objects and dependencies in a subdirectory because
6648 # it helps to detect inapplicable dependency modes. For instance
6649 # both Tru64's cc and ICC support -MD to output dependencies as a
6650 # side effect of compilation, but ICC will put the dependencies in
6651 # the current directory while Tru64 will put them in the object
6652 # directory.
6653 mkdir sub
6654
6655 am_cv_CC_dependencies_compiler_type=none
6656 if test "$am_compiler_list" = ""; then
6657 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6658 fi
81ecdfbb
RW
6659 am__universal=false
6660 case " $depcc " in #(
6661 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6662 esac
6663
e28b3332
DJ
6664 for depmode in $am_compiler_list; do
6665 # Setup a source with many dependencies, because some compilers
6666 # like to wrap large dependency lists on column 80 (with \), and
6667 # we should not choose a depcomp mode which is confused by this.
6668 #
6669 # We need to recreate these files for each test, as the compiler may
6670 # overwrite some of them when testing with obscure command lines.
6671 # This happens at least with the AIX C compiler.
6672 : > sub/conftest.c
6673 for i in 1 2 3 4 5 6; do
6674 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6675 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6676 # Solaris 8's {/usr,}/bin/sh.
6677 touch sub/conftst$i.h
6678 done
6679 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6680
81ecdfbb
RW
6681 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6682 # mode. It turns out that the SunPro C++ compiler does not properly
6683 # handle `-M -o', and we need to detect this. Also, some Intel
6684 # versions had trouble with output in subdirs
6685 am__obj=sub/conftest.${OBJEXT-o}
6686 am__minus_obj="-o $am__obj"
e28b3332 6687 case $depmode in
81ecdfbb
RW
6688 gcc)
6689 # This depmode causes a compiler race in universal mode.
6690 test "$am__universal" = false || continue
6691 ;;
e28b3332
DJ
6692 nosideeffect)
6693 # after this tag, mechanisms are not by side-effect, so they'll
6694 # only be used when explicitly requested
6695 if test "x$enable_dependency_tracking" = xyes; then
6696 continue
6697 else
6698 break
6699 fi
6700 ;;
81ecdfbb
RW
6701 msvisualcpp | msvcmsys)
6702 # This compiler won't grok `-c -o', but also, the minuso test has
6703 # not run yet. These depmodes are late enough in the game, and
6704 # so weak that their functioning should not be impacted.
6705 am__obj=conftest.${OBJEXT-o}
6706 am__minus_obj=
6707 ;;
e28b3332
DJ
6708 none) break ;;
6709 esac
e28b3332 6710 if depmode=$depmode \
81ecdfbb 6711 source=sub/conftest.c object=$am__obj \
e28b3332 6712 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 6713 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 6714 >/dev/null 2>conftest.err &&
81ecdfbb 6715 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 6716 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 6717 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
6718 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6719 # icc doesn't choke on unknown options, it will just issue warnings
6720 # or remarks (even with -Werror). So we grep stderr for any message
6721 # that says an option was ignored or not supported.
6722 # When given -MP, icc 7.0 and 7.1 complain thusly:
6723 # icc: Command line warning: ignoring option '-M'; no argument required
6724 # The diagnosis changed in icc 8.0:
6725 # icc: Command line remark: option '-MP' not supported
6726 if (grep 'ignoring option' conftest.err ||
6727 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6728 am_cv_CC_dependencies_compiler_type=$depmode
6729 break
6730 fi
6731 fi
6732 done
6733
6734 cd ..
6735 rm -rf conftest.dir
6736else
6737 am_cv_CC_dependencies_compiler_type=none
6738fi
6739
6740fi
81ecdfbb
RW
6741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6742$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
6743CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6744
81ecdfbb 6745 if
e28b3332
DJ
6746 test "x$enable_dependency_tracking" != xno \
6747 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6748 am__fastdepCC_TRUE=
6749 am__fastdepCC_FALSE='#'
6750else
6751 am__fastdepCC_TRUE='#'
6752 am__fastdepCC_FALSE=
6753fi
6754
6755
6756
6757
bec39cab
AC
6758
6759
81ecdfbb
RW
6760# Check whether --with-separate-debug-dir was given.
6761if test "${with_separate_debug_dir+set}" = set; then :
6762 withval=$with_separate_debug_dir;
b14b1491
TT
6763 DEBUGDIR=$withval
6764else
6765 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6766fi
6767
20e95c23 6768
783e057b
DJ
6769 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6770 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6771 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6772 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6773
783e057b
DJ
6774cat >>confdefs.h <<_ACEOF
6775#define DEBUGDIR "$ac_define_dir"
20e95c23 6776_ACEOF
20e95c23 6777
20e95c23 6778
20e95c23 6779
b14b1491
TT
6780 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6781 if test "x$prefix" = xNONE; then
6782 test_prefix=/usr/local
6783 else
6784 test_prefix=$prefix
6785 fi
783e057b 6786 else
b14b1491 6787 test_prefix=$exec_prefix
783e057b 6788 fi
b14b1491
TT
6789 value=0
6790 case ${ac_define_dir} in
6791 "${test_prefix}"|"${test_prefix}/"*|\
6792 '${exec_prefix}'|'${exec_prefix}/'*)
6793 value=1
6794 ;;
6795 esac
6796
6797cat >>confdefs.h <<_ACEOF
6798#define DEBUGDIR_RELOCATABLE $value
6799_ACEOF
6800
6801
6802
6803# GDB's datadir relocation
6804
6805
6806
81ecdfbb
RW
6807# Check whether --with-gdb-datadir was given.
6808if test "${with_gdb_datadir+set}" = set; then :
6809 withval=$with_gdb_datadir;
b14b1491 6810 GDB_DATADIR=$withval
20e95c23 6811else
b14b1491 6812 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6813fi
6814
20e95c23 6815
b14b1491
TT
6816 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6817 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6818 ac_define_dir=`eval echo $GDB_DATADIR`
6819 ac_define_dir=`eval echo $ac_define_dir`
6820
6821cat >>confdefs.h <<_ACEOF
6822#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6823_ACEOF
6824
b14b1491
TT
6825
6826
6827 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6828 if test "x$prefix" = xNONE; then
6829 test_prefix=/usr/local
6830 else
6831 test_prefix=$prefix
6832 fi
6833 else
6834 test_prefix=$exec_prefix
6835 fi
6836 value=0
6837 case ${ac_define_dir} in
6838 "${test_prefix}"|"${test_prefix}/"*|\
6839 '${exec_prefix}'|'${exec_prefix}/'*)
6840 value=1
6841 ;;
6842 esac
6843
6844cat >>confdefs.h <<_ACEOF
6845#define GDB_DATADIR_RELOCATABLE $value
6846_ACEOF
6847
6848
783e057b 6849
20e95c23 6850
81ecdfbb
RW
6851# Check whether --with-relocated-sources was given.
6852if test "${with_relocated_sources+set}" = set; then :
6853 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6854
6855 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6856 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6857 ac_define_dir=`eval echo $reloc_srcdir`
6858 ac_define_dir=`eval echo $ac_define_dir`
6859
6860cat >>confdefs.h <<_ACEOF
6861#define RELOC_SRCDIR "$ac_define_dir"
6862_ACEOF
6863
6864
6865
81ecdfbb
RW
6866fi
6867
29b0e8a2
JM
6868
6869
20e95c23 6870
783e057b 6871subdirs="$subdirs doc testsuite"
20e95c23
DJ
6872
6873
783e057b 6874# Check whether to support alternative target configurations
81ecdfbb
RW
6875# Check whether --enable-targets was given.
6876if test "${enable_targets+set}" = set; then :
6877 enableval=$enable_targets; case "${enableval}" in
6878 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6879 ;;
6880 no) enable_targets= ;;
6881 *) enable_targets=$enableval ;;
6882esac
81ecdfbb
RW
6883fi
6884
20e95c23 6885
783e057b 6886# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6887# Check whether --enable-64-bit-bfd was given.
6888if test "${enable_64_bit_bfd+set}" = set; then :
6889 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6890 yes) want64=true ;;
6891 no) want64=false ;;
81ecdfbb 6892 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6893esac
6894else
6895 want64=false
81ecdfbb
RW
6896fi
6897
783e057b
DJ
6898# Provide defaults for some variables set by the per-host and per-target
6899# configuration.
6900gdb_host_obs=posix-hdep.o
20e95c23 6901
783e057b
DJ
6902if test "${target}" = "${host}"; then
6903 gdb_native=yes
6904else
6905 gdb_native=no
6906fi
20e95c23 6907
783e057b 6908. $srcdir/configure.host
20e95c23 6909
783e057b 6910# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6911
783e057b
DJ
6912TARGET_OBS=
6913all_targets=
20e95c23 6914
783e057b 6915for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6916do
783e057b
DJ
6917 if test "$targ_alias" = "all"; then
6918 all_targets=true
6919 else
6920 # Canonicalize the secondary target names.
6921 result=`$ac_config_sub $targ_alias 2>/dev/null`
6922 if test -n "$result"; then
6923 targ=$result
6924 else
6925 targ=$targ_alias
6926 fi
20e95c23 6927
783e057b 6928 . ${srcdir}/configure.tgt
20e95c23 6929
bf307134
JB
6930 if test -z "${gdb_target_obs}"; then :
6931 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6932fi
6933
783e057b
DJ
6934 # Target-specific object files
6935 for i in ${gdb_target_obs}; do
6936 case " $TARGET_OBS " in
6937 *" ${i} "*) ;;
6938 *)
6939 TARGET_OBS="$TARGET_OBS ${i}"
6940 ;;
6941 esac
6942 done
20e95c23 6943
783e057b
DJ
6944 # Check whether this target needs 64-bit CORE_ADDR
6945 if test x${want64} = xfalse; then
6946 . ${srcdir}/../bfd/config.bfd
6947 fi
6948 fi
20e95c23
DJ
6949done
6950
783e057b
DJ
6951if test x${all_targets} = xtrue; then
6952
6953 # We want all 64-bit targets if we either:
6954 # - run on a 64-bit host or
6955 # - already require 64-bit support for some other target or
6956 # - the --enable-64-bit-bfd option was supplied
6957 # Otherwise we only support all 32-bit targets.
6958 #
6959 # NOTE: This test must be in sync with the corresponding
6960 # tests in BFD!
20e95c23 6961
783e057b 6962 if test x${want64} = xfalse; then
81ecdfbb
RW
6963 # The cast to long int works around a bug in the HP C Compiler
6964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6966# This bug is HP SR number 8606223364.
6967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6968$as_echo_n "checking size of long... " >&6; }
6969if test "${ac_cv_sizeof_long+set}" = set; then :
6970 $as_echo_n "(cached) " >&6
c0993dbe 6971else
81ecdfbb 6972 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6973
81ecdfbb
RW
6974else
6975 if test "$ac_cv_type_long" = yes; then
6976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6978{ as_fn_set_status 77
6979as_fn_error "cannot compute sizeof (long)
6980See \`config.log' for more details." "$LINENO" 5; }; }
6981 else
6982 ac_cv_sizeof_long=0
6983 fi
c0993dbe 6984fi
81ecdfbb 6985
c0993dbe 6986fi
81ecdfbb
RW
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6988$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6989
c0993dbe 6990
c0993dbe 6991
c0993dbe
UW
6992cat >>confdefs.h <<_ACEOF
6993#define SIZEOF_LONG $ac_cv_sizeof_long
6994_ACEOF
6995
6996
6997 if test "x${ac_cv_sizeof_long}" = "x8"; then
6998 want64=true
6999 fi
7000 fi
7001 if test x${want64} = xtrue; then
7002 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7003 else
7004 TARGET_OBS='$(ALL_TARGET_OBS)'
7005 fi
7006fi
7007
7008
7009
7010# For other settings, only the main target counts.
7011gdb_sim=
7012gdb_osabi=
7013build_gdbserver=
7014targ=$target; . ${srcdir}/configure.tgt
7015
7016# Fetch the default architecture and default target vector from BFD.
7017targ=$target; . $srcdir/../bfd/config.bfd
7018
7019# We only want the first architecture, so strip off the others if
7020# there is more than one.
7021targ_archs=`echo $targ_archs | sed 's/ .*//'`
7022
7023if test "x$targ_archs" != x; then
7024
7025cat >>confdefs.h <<_ACEOF
7026#define DEFAULT_BFD_ARCH $targ_archs
7027_ACEOF
7028
7029fi
7030if test "x$targ_defvec" != x; then
7031
7032cat >>confdefs.h <<_ACEOF
7033#define DEFAULT_BFD_VEC $targ_defvec
7034_ACEOF
7035
7036fi
7037
c0993dbe
UW
7038# The CLI cannot be disabled yet, but may be in the future.
7039
7040# Enable CLI.
81ecdfbb
RW
7041# Check whether --enable-gdbcli was given.
7042if test "${enable_gdbcli+set}" = set; then :
7043 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
7044 yes)
7045 ;;
7046 no)
81ecdfbb 7047 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 7048 *)
81ecdfbb 7049 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
7050 esac
7051else
7052 enable_gdbcli=yes
81ecdfbb
RW
7053fi
7054
c0993dbe
UW
7055if test x"$enable_gdbcli" = xyes; then
7056 if test -d $srcdir/cli; then
7057 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7058 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7059 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7060 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7061 fi
7062fi
7063
7064# Enable MI.
81ecdfbb
RW
7065# Check whether --enable-gdbmi was given.
7066if test "${enable_gdbmi+set}" = set; then :
7067 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
7068 yes | no)
7069 ;;
7070 *)
81ecdfbb 7071 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
7072 esac
7073else
7074 enable_gdbmi=yes
81ecdfbb
RW
7075fi
7076
c0993dbe
UW
7077if test x"$enable_gdbmi" = xyes; then
7078 if test -d $srcdir/mi; then
7079 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7080 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7081 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7082 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7083 fi
7084fi
7085
7086# Enable TUI.
81ecdfbb
RW
7087# Check whether --enable-tui was given.
7088if test "${enable_tui+set}" = set; then :
7089 enableval=$enable_tui; case $enableval in
3ca64bd3 7090 yes | no | auto)
c0993dbe
UW
7091 ;;
7092 *)
81ecdfbb 7093 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
7094 esac
7095else
3ca64bd3 7096 enable_tui=auto
81ecdfbb
RW
7097fi
7098
c0993dbe
UW
7099
7100# Enable gdbtk.
81ecdfbb
RW
7101# Check whether --enable-gdbtk was given.
7102if test "${enable_gdbtk+set}" = set; then :
7103 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
7104 yes | no)
7105 ;;
7106 *)
81ecdfbb 7107 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
7108 esac
7109else
5062cc19 7110 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7111 enable_gdbtk=yes
7112 else
7113 enable_gdbtk=no
7114 fi
81ecdfbb
RW
7115fi
7116
c0993dbe
UW
7117# We unconditionally disable gdbtk tests on selected platforms.
7118case $host_os in
7119 go32* | windows*)
81ecdfbb
RW
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
7121$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
7122 enable_gdbtk=no ;;
7123esac
7124
7125# Libunwind support.
bec39cab 7126
81ecdfbb
RW
7127# Check whether --with-libunwind was given.
7128if test "${with_libunwind+set}" = set; then :
7129 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
7130 yes) enable_libunwind=yes ;;
7131 no) enable_libunwind=no ;;
81ecdfbb 7132 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 7133esac
bec39cab 7134else
bec39cab 7135
81ecdfbb
RW
7136 for ac_header in libunwind.h libunwind-ia64.h
7137do :
7138 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7139ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7140eval as_val=\$$as_ac_Header
7141 if test "x$as_val" = x""yes; then :
bec39cab 7142 cat >>confdefs.h <<_ACEOF
81ecdfbb 7143#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7144_ACEOF
7145
7146fi
7147
7148done
7149
a9322a30
TT
7150 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7151 enable_libunwind=yes;
7152 fi
7153
bec39cab 7154fi
bec39cab 7155
bec39cab 7156
81ecdfbb
RW
7157if test x"$enable_libunwind" = xyes; then
7158 for ac_header in libunwind.h libunwind-ia64.h
7159do :
7160 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7161ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7162eval as_val=\$$as_ac_Header
7163 if test "x$as_val" = x""yes; then :
bec39cab 7164 cat >>confdefs.h <<_ACEOF
81ecdfbb 7165#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
7166_ACEOF
7167
7168fi
7169
7170done
7171
bec39cab 7172
81ecdfbb 7173$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
7174
7175 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
7176 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
7177 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
7178fi
7179
cb01cfba
JB
7180opt_curses=no
7181
81ecdfbb
RW
7182# Check whether --with-curses was given.
7183if test "${with_curses+set}" = set; then :
7184 withval=$with_curses; opt_curses=$withval
7185fi
7186
cb01cfba 7187
76a39ba7 7188prefer_curses=no
cb01cfba 7189if test "$opt_curses" = "yes"; then
76a39ba7 7190 prefer_curses=yes
cb01cfba
JB
7191fi
7192
a9322a30 7193# Profiling support.
81ecdfbb
RW
7194# Check whether --enable-profiling was given.
7195if test "${enable_profiling+set}" = set; then :
7196 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7197 yes | no)
7198 ;;
7199 *)
81ecdfbb 7200 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7201 esac
7202else
7203 enable_profiling=no
81ecdfbb 7204fi
bec39cab 7205
a9322a30
TT
7206
7207for ac_func in monstartup _mcleanup
81ecdfbb
RW
7208do :
7209 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7210ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7211eval as_val=\$$as_ac_var
7212 if test "x$as_val" = x""yes; then :
7213 cat >>confdefs.h <<_ACEOF
7214#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7215_ACEOF
a9322a30 7216
81ecdfbb
RW
7217fi
7218done
a9322a30 7219
81ecdfbb
RW
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7221$as_echo_n "checking for _etext... " >&6; }
7222if test "${ac_cv_var__etext+set}" = set; then :
7223 $as_echo_n "(cached) " >&6
7224else
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226/* end confdefs.h. */
7227#include <stdlib.h>
7228extern char _etext;
a9322a30
TT
7229
7230int
7231main ()
7232{
7233free (&_etext);
7234 ;
7235 return 0;
7236}
bec39cab 7237_ACEOF
81ecdfbb 7238if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7239 ac_cv_var__etext=yes
bec39cab 7240else
81ecdfbb 7241 ac_cv_var__etext=no
bec39cab 7242fi
81ecdfbb
RW
7243rm -f core conftest.err conftest.$ac_objext \
7244 conftest$ac_exeext conftest.$ac_ext
bec39cab 7245fi
81ecdfbb
RW
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7247$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 7248if test $ac_cv_var__etext = yes; then
60ca704f 7249
81ecdfbb 7250$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7251
bec39cab 7252fi
81ecdfbb
RW
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7254$as_echo_n "checking for etext... " >&6; }
7255if test "${ac_cv_var_etext+set}" = set; then :
7256 $as_echo_n "(cached) " >&6
bec39cab 7257else
81ecdfbb 7258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7259/* end confdefs.h. */
a9322a30
TT
7260#include <stdlib.h>
7261extern char etext;
bec39cab
AC
7262
7263int
7264main ()
7265{
a9322a30 7266free (&etext);
bec39cab
AC
7267 ;
7268 return 0;
7269}
7270_ACEOF
81ecdfbb 7271if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7272 ac_cv_var_etext=yes
bec39cab 7273else
81ecdfbb 7274 ac_cv_var_etext=no
bec39cab 7275fi
81ecdfbb
RW
7276rm -f core conftest.err conftest.$ac_objext \
7277 conftest$ac_exeext conftest.$ac_ext
bec39cab 7278fi
81ecdfbb
RW
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7280$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7281if test $ac_cv_var_etext = yes; then
7282
81ecdfbb 7283$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7284
7285fi
a9322a30
TT
7286if test "$enable_profiling" = yes ; then
7287 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 7288 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7289 fi
7290 PROFILE_CFLAGS=-pg
7291 OLD_CFLAGS="$CFLAGS"
7292 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7293
81ecdfbb
RW
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7295$as_echo_n "checking whether $CC supports -pg... " >&6; }
7296if test "${ac_cv_cc_supports_pg+set}" = set; then :
7297 $as_echo_n "(cached) " >&6
bec39cab 7298else
81ecdfbb 7299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7300/* end confdefs.h. */
bec39cab
AC
7301
7302int
7303main ()
7304{
a9322a30 7305int x;
bec39cab
AC
7306 ;
7307 return 0;
7308}
7309_ACEOF
81ecdfbb 7310if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7311 ac_cv_cc_supports_pg=yes
bec39cab 7312else
81ecdfbb 7313 ac_cv_cc_supports_pg=no
bec39cab 7314fi
81ecdfbb 7315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7316fi
81ecdfbb
RW
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7318$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7319
a9322a30 7320 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 7321 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7322 fi
bec39cab 7323
a9322a30 7324 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7325fi
7326
c16158bc
JM
7327
7328
81ecdfbb
RW
7329# Check whether --with-pkgversion was given.
7330if test "${with_pkgversion+set}" = set; then :
7331 withval=$with_pkgversion; case "$withval" in
7332 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7333 no) PKGVERSION= ;;
7334 *) PKGVERSION="($withval) " ;;
7335 esac
7336else
7337 PKGVERSION="(GDB) "
7338
81ecdfbb 7339fi
c16158bc
JM
7340
7341
7342
7343
81ecdfbb
RW
7344
7345# Check whether --with-bugurl was given.
7346if test "${with_bugurl+set}" = set; then :
7347 withval=$with_bugurl; case "$withval" in
7348 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7349 no) BUGURL=
7350 ;;
7351 *) BUGURL="$withval"
7352 ;;
7353 esac
7354else
7355 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7356
81ecdfbb
RW
7357fi
7358
c16158bc
JM
7359 case ${BUGURL} in
7360 "")
7361 REPORT_BUGS_TO=
7362 REPORT_BUGS_TEXI=
7363 ;;
7364 *)
7365 REPORT_BUGS_TO="<$BUGURL>"
7366 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7367 ;;
7368 esac;
7369
7370
7371
7372
7373cat >>confdefs.h <<_ACEOF
7374#define PKGVERSION "$PKGVERSION"
7375_ACEOF
7376
7377
7378cat >>confdefs.h <<_ACEOF
7379#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7380_ACEOF
7381
7382
bec39cab
AC
7383# --------------------- #
7384# Checks for programs. #
7385# --------------------- #
7386
7387for ac_prog in gawk mawk nawk awk
7388do
7389 # Extract the first word of "$ac_prog", so it can be a program name with args.
7390set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392$as_echo_n "checking for $ac_word... " >&6; }
7393if test "${ac_cv_prog_AWK+set}" = set; then :
7394 $as_echo_n "(cached) " >&6
bec39cab
AC
7395else
7396 if test -n "$AWK"; then
7397 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7398else
7399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402 IFS=$as_save_IFS
7403 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7404 for ac_exec_ext in '' $ac_executable_extensions; do
7405 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7406 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7408 break 2
7409 fi
7410done
81ecdfbb
RW
7411 done
7412IFS=$as_save_IFS
bec39cab
AC
7413
7414fi
7415fi
7416AWK=$ac_cv_prog_AWK
7417if test -n "$AWK"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7419$as_echo "$AWK" >&6; }
bec39cab 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
bec39cab
AC
7423fi
7424
bec39cab 7425
81ecdfbb 7426 test -n "$AWK" && break
bec39cab
AC
7427done
7428
bec39cab 7429
81ecdfbb
RW
7430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7431$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7432LN_S=$as_ln_s
7433if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7435$as_echo "yes" >&6; }
bec39cab 7436else
81ecdfbb
RW
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7438$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7439fi
7440
7441if test -n "$ac_tool_prefix"; then
7442 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7443set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7445$as_echo_n "checking for $ac_word... " >&6; }
7446if test "${ac_cv_prog_RANLIB+set}" = set; then :
7447 $as_echo_n "(cached) " >&6
bec39cab
AC
7448else
7449 if test -n "$RANLIB"; then
7450 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7451else
7452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453for as_dir in $PATH
7454do
7455 IFS=$as_save_IFS
7456 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7457 for ac_exec_ext in '' $ac_executable_extensions; do
7458 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7459 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7461 break 2
7462 fi
7463done
81ecdfbb
RW
7464 done
7465IFS=$as_save_IFS
bec39cab
AC
7466
7467fi
7468fi
7469RANLIB=$ac_cv_prog_RANLIB
7470if test -n "$RANLIB"; then
81ecdfbb
RW
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7472$as_echo "$RANLIB" >&6; }
bec39cab 7473else
81ecdfbb
RW
7474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
bec39cab
AC
7476fi
7477
81ecdfbb 7478
bec39cab
AC
7479fi
7480if test -z "$ac_cv_prog_RANLIB"; then
7481 ac_ct_RANLIB=$RANLIB
7482 # Extract the first word of "ranlib", so it can be a program name with args.
7483set dummy ranlib; ac_word=$2
81ecdfbb
RW
7484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485$as_echo_n "checking for $ac_word... " >&6; }
7486if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7487 $as_echo_n "(cached) " >&6
bec39cab
AC
7488else
7489 if test -n "$ac_ct_RANLIB"; then
7490 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7491else
7492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493for as_dir in $PATH
7494do
7495 IFS=$as_save_IFS
7496 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7497 for ac_exec_ext in '' $ac_executable_extensions; do
7498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7499 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7501 break 2
7502 fi
7503done
81ecdfbb
RW
7504 done
7505IFS=$as_save_IFS
bec39cab 7506
bec39cab
AC
7507fi
7508fi
7509ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7510if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7512$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7513else
81ecdfbb
RW
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515$as_echo "no" >&6; }
bec39cab
AC
7516fi
7517
81ecdfbb
RW
7518 if test "x$ac_ct_RANLIB" = x; then
7519 RANLIB=":"
7520 else
7521 case $cross_compiling:$ac_tool_warned in
7522yes:)
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7525ac_tool_warned=yes ;;
7526esac
7527 RANLIB=$ac_ct_RANLIB
7528 fi
bec39cab
AC
7529else
7530 RANLIB="$ac_cv_prog_RANLIB"
7531fi
7532
7533for ac_prog in 'bison -y' byacc
7534do
7535 # Extract the first word of "$ac_prog", so it can be a program name with args.
7536set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if test "${ac_cv_prog_YACC+set}" = set; then :
7540 $as_echo_n "(cached) " >&6
bec39cab
AC
7541else
7542 if test -n "$YACC"; then
7543 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7544else
7545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548 IFS=$as_save_IFS
7549 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7550 for ac_exec_ext in '' $ac_executable_extensions; do
7551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7552 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7554 break 2
7555 fi
7556done
81ecdfbb
RW
7557 done
7558IFS=$as_save_IFS
bec39cab
AC
7559
7560fi
7561fi
7562YACC=$ac_cv_prog_YACC
7563if test -n "$YACC"; then
81ecdfbb
RW
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7565$as_echo "$YACC" >&6; }
bec39cab 7566else
81ecdfbb
RW
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568$as_echo "no" >&6; }
bec39cab
AC
7569fi
7570
81ecdfbb 7571
bec39cab
AC
7572 test -n "$YACC" && break
7573done
7574test -n "$YACC" || YACC="yacc"
7575
7576
7577if test -n "$ac_tool_prefix"; then
7578 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7579set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7581$as_echo_n "checking for $ac_word... " >&6; }
7582if test "${ac_cv_prog_AR+set}" = set; then :
7583 $as_echo_n "(cached) " >&6
bec39cab
AC
7584else
7585 if test -n "$AR"; then
7586 ac_cv_prog_AR="$AR" # Let the user override the test.
7587else
7588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7589for as_dir in $PATH
7590do
7591 IFS=$as_save_IFS
7592 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7593 for ac_exec_ext in '' $ac_executable_extensions; do
7594 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7595 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7597 break 2
7598 fi
7599done
81ecdfbb
RW
7600 done
7601IFS=$as_save_IFS
bec39cab
AC
7602
7603fi
7604fi
7605AR=$ac_cv_prog_AR
7606if test -n "$AR"; then
81ecdfbb
RW
7607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7608$as_echo "$AR" >&6; }
bec39cab 7609else
81ecdfbb
RW
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
bec39cab
AC
7612fi
7613
81ecdfbb 7614
bec39cab
AC
7615fi
7616if test -z "$ac_cv_prog_AR"; then
7617 ac_ct_AR=$AR
7618 # Extract the first word of "ar", so it can be a program name with args.
7619set dummy ar; ac_word=$2
81ecdfbb
RW
7620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7621$as_echo_n "checking for $ac_word... " >&6; }
7622if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7623 $as_echo_n "(cached) " >&6
bec39cab
AC
7624else
7625 if test -n "$ac_ct_AR"; then
7626 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7627else
7628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7629for as_dir in $PATH
7630do
7631 IFS=$as_save_IFS
7632 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7633 for ac_exec_ext in '' $ac_executable_extensions; do
7634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7635 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7637 break 2
7638 fi
7639done
81ecdfbb
RW
7640 done
7641IFS=$as_save_IFS
bec39cab
AC
7642
7643fi
7644fi
7645ac_ct_AR=$ac_cv_prog_ac_ct_AR
7646if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7648$as_echo "$ac_ct_AR" >&6; }
bec39cab 7649else
81ecdfbb
RW
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7651$as_echo "no" >&6; }
bec39cab
AC
7652fi
7653
81ecdfbb
RW
7654 if test "x$ac_ct_AR" = x; then
7655 AR=""
7656 else
7657 case $cross_compiling:$ac_tool_warned in
7658yes:)
7659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7661ac_tool_warned=yes ;;
7662esac
7663 AR=$ac_ct_AR
7664 fi
bec39cab
AC
7665else
7666 AR="$ac_cv_prog_AR"
7667fi
7668
7669if test -n "$ac_tool_prefix"; then
7670 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7671set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7675 $as_echo_n "(cached) " >&6
bec39cab
AC
7676else
7677 if test -n "$DLLTOOL"; then
7678 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7679else
7680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681for as_dir in $PATH
7682do
7683 IFS=$as_save_IFS
7684 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7685 for ac_exec_ext in '' $ac_executable_extensions; do
7686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7687 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7689 break 2
7690 fi
7691done
81ecdfbb
RW
7692 done
7693IFS=$as_save_IFS
bec39cab
AC
7694
7695fi
7696fi
7697DLLTOOL=$ac_cv_prog_DLLTOOL
7698if test -n "$DLLTOOL"; then
81ecdfbb
RW
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7700$as_echo "$DLLTOOL" >&6; }
bec39cab 7701else
81ecdfbb
RW
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
bec39cab
AC
7704fi
7705
81ecdfbb 7706
bec39cab
AC
7707fi
7708if test -z "$ac_cv_prog_DLLTOOL"; then
7709 ac_ct_DLLTOOL=$DLLTOOL
7710 # Extract the first word of "dlltool", so it can be a program name with args.
7711set dummy dlltool; ac_word=$2
81ecdfbb
RW
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713$as_echo_n "checking for $ac_word... " >&6; }
7714if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7715 $as_echo_n "(cached) " >&6
bec39cab
AC
7716else
7717 if test -n "$ac_ct_DLLTOOL"; then
7718 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7719else
7720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723 IFS=$as_save_IFS
7724 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7725 for ac_exec_ext in '' $ac_executable_extensions; do
7726 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7727 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7729 break 2
7730 fi
7731done
81ecdfbb
RW
7732 done
7733IFS=$as_save_IFS
bec39cab
AC
7734
7735fi
7736fi
7737ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7738if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7740$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7741else
81ecdfbb
RW
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743$as_echo "no" >&6; }
bec39cab
AC
7744fi
7745
81ecdfbb
RW
7746 if test "x$ac_ct_DLLTOOL" = x; then
7747 DLLTOOL=""
7748 else
7749 case $cross_compiling:$ac_tool_warned in
7750yes:)
7751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7753ac_tool_warned=yes ;;
7754esac
7755 DLLTOOL=$ac_ct_DLLTOOL
7756 fi
bec39cab
AC
7757else
7758 DLLTOOL="$ac_cv_prog_DLLTOOL"
7759fi
7760
7761if test -n "$ac_tool_prefix"; then
7762 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7763set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7765$as_echo_n "checking for $ac_word... " >&6; }
7766if test "${ac_cv_prog_WINDRES+set}" = set; then :
7767 $as_echo_n "(cached) " >&6
bec39cab
AC
7768else
7769 if test -n "$WINDRES"; then
7770 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7771else
7772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773for as_dir in $PATH
7774do
7775 IFS=$as_save_IFS
7776 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7777 for ac_exec_ext in '' $ac_executable_extensions; do
7778 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7779 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7781 break 2
7782 fi
7783done
81ecdfbb
RW
7784 done
7785IFS=$as_save_IFS
bec39cab
AC
7786
7787fi
7788fi
7789WINDRES=$ac_cv_prog_WINDRES
7790if test -n "$WINDRES"; then
81ecdfbb
RW
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7792$as_echo "$WINDRES" >&6; }
bec39cab 7793else
81ecdfbb
RW
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7795$as_echo "no" >&6; }
bec39cab
AC
7796fi
7797
81ecdfbb 7798
bec39cab
AC
7799fi
7800if test -z "$ac_cv_prog_WINDRES"; then
7801 ac_ct_WINDRES=$WINDRES
7802 # Extract the first word of "windres", so it can be a program name with args.
7803set dummy windres; ac_word=$2
81ecdfbb
RW
7804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7805$as_echo_n "checking for $ac_word... " >&6; }
7806if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7807 $as_echo_n "(cached) " >&6
bec39cab
AC
7808else
7809 if test -n "$ac_ct_WINDRES"; then
7810 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7811else
7812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7813for as_dir in $PATH
7814do
7815 IFS=$as_save_IFS
7816 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7817 for ac_exec_ext in '' $ac_executable_extensions; do
7818 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7819 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7821 break 2
7822 fi
7823done
81ecdfbb
RW
7824 done
7825IFS=$as_save_IFS
bec39cab
AC
7826
7827fi
7828fi
7829ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7830if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7832$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7833else
81ecdfbb
RW
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7835$as_echo "no" >&6; }
c906108c 7836fi
bec39cab 7837
81ecdfbb
RW
7838 if test "x$ac_ct_WINDRES" = x; then
7839 WINDRES=""
7840 else
7841 case $cross_compiling:$ac_tool_warned in
7842yes:)
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7845ac_tool_warned=yes ;;
7846esac
7847 WINDRES=$ac_ct_WINDRES
7848 fi
c906108c 7849else
bec39cab 7850 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7851fi
7852
bec39cab
AC
7853
7854# Needed for GNU/Hurd.
7855if test -n "$ac_tool_prefix"; then
7856 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7857set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
7860if test "${ac_cv_prog_MIG+set}" = set; then :
7861 $as_echo_n "(cached) " >&6
c906108c 7862else
bec39cab
AC
7863 if test -n "$MIG"; then
7864 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7865else
7866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867for as_dir in $PATH
7868do
7869 IFS=$as_save_IFS
7870 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7871 for ac_exec_ext in '' $ac_executable_extensions; do
7872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7873 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7875 break 2
7876 fi
7877done
81ecdfbb
RW
7878 done
7879IFS=$as_save_IFS
bec39cab 7880
c906108c 7881fi
bec39cab
AC
7882fi
7883MIG=$ac_cv_prog_MIG
7884if test -n "$MIG"; then
81ecdfbb
RW
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7886$as_echo "$MIG" >&6; }
c906108c 7887else
81ecdfbb
RW
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889$as_echo "no" >&6; }
c906108c
SS
7890fi
7891
81ecdfbb 7892
bec39cab
AC
7893fi
7894if test -z "$ac_cv_prog_MIG"; then
7895 ac_ct_MIG=$MIG
7896 # Extract the first word of "mig", so it can be a program name with args.
7897set dummy mig; ac_word=$2
81ecdfbb
RW
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7899$as_echo_n "checking for $ac_word... " >&6; }
7900if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7901 $as_echo_n "(cached) " >&6
bec39cab
AC
7902else
7903 if test -n "$ac_ct_MIG"; then
7904 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7905else
7906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907for as_dir in $PATH
7908do
7909 IFS=$as_save_IFS
7910 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7911 for ac_exec_ext in '' $ac_executable_extensions; do
7912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7913 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7915 break 2
7916 fi
7917done
81ecdfbb
RW
7918 done
7919IFS=$as_save_IFS
c906108c 7920
bec39cab
AC
7921fi
7922fi
7923ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7924if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7926$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7927else
81ecdfbb
RW
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
bec39cab 7930fi
c906108c 7931
81ecdfbb
RW
7932 if test "x$ac_ct_MIG" = x; then
7933 MIG=""
7934 else
7935 case $cross_compiling:$ac_tool_warned in
7936yes:)
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7939ac_tool_warned=yes ;;
7940esac
7941 MIG=$ac_ct_MIG
7942 fi
bec39cab
AC
7943else
7944 MIG="$ac_cv_prog_MIG"
7945fi
c906108c 7946
c906108c 7947
bec39cab
AC
7948# ---------------------- #
7949# Checks for libraries. #
7950# ---------------------- #
c906108c 7951
bec39cab 7952# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7954$as_echo_n "checking for main in -lm... " >&6; }
7955if test "${ac_cv_lib_m_main+set}" = set; then :
7956 $as_echo_n "(cached) " >&6
bec39cab
AC
7957else
7958 ac_check_lib_save_LIBS=$LIBS
7959LIBS="-lm $LIBS"
81ecdfbb 7960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7961/* end confdefs.h. */
c906108c 7962
c906108c 7963
bec39cab
AC
7964int
7965main ()
7966{
81ecdfbb 7967return main ();
bec39cab
AC
7968 ;
7969 return 0;
7970}
7971_ACEOF
81ecdfbb 7972if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7973 ac_cv_lib_m_main=yes
7974else
81ecdfbb 7975 ac_cv_lib_m_main=no
bec39cab 7976fi
81ecdfbb
RW
7977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7979LIBS=$ac_check_lib_save_LIBS
7980fi
81ecdfbb
RW
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7982$as_echo "$ac_cv_lib_m_main" >&6; }
7983if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7984 cat >>confdefs.h <<_ACEOF
7985#define HAVE_LIBM 1
7986_ACEOF
7987
7988 LIBS="-lm $LIBS"
c906108c 7989
c906108c 7990fi
bec39cab
AC
7991
7992
7993# We need to link with -lw to get `wctype' on Solaris before Solaris
7994# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
7995# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7996# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
7997ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7998if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 7999
c906108c 8000else
81ecdfbb
RW
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
8002$as_echo_n "checking for wctype in -lw... " >&6; }
8003if test "${ac_cv_lib_w_wctype+set}" = set; then :
8004 $as_echo_n "(cached) " >&6
bec39cab
AC
8005else
8006 ac_check_lib_save_LIBS=$LIBS
8007LIBS="-lw $LIBS"
81ecdfbb 8008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8009/* end confdefs.h. */
c906108c 8010
81ecdfbb
RW
8011/* Override any GCC internal prototype to avoid an error.
8012 Use char because int might match the return type of a GCC
8013 builtin and then its argument prototype would still apply. */
bec39cab
AC
8014#ifdef __cplusplus
8015extern "C"
8016#endif
bec39cab
AC
8017char wctype ();
8018int
8019main ()
8020{
81ecdfbb 8021return wctype ();
bec39cab
AC
8022 ;
8023 return 0;
8024}
8025_ACEOF
81ecdfbb 8026if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8027 ac_cv_lib_w_wctype=yes
8028else
81ecdfbb 8029 ac_cv_lib_w_wctype=no
bec39cab 8030fi
81ecdfbb
RW
8031rm -f core conftest.err conftest.$ac_objext \
8032 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8033LIBS=$ac_check_lib_save_LIBS
8034fi
81ecdfbb
RW
8035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
8036$as_echo "$ac_cv_lib_w_wctype" >&6; }
8037if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
8038 cat >>confdefs.h <<_ACEOF
8039#define HAVE_LIBW 1
8040_ACEOF
c906108c 8041
bec39cab 8042 LIBS="-lw $LIBS"
c906108c 8043
bec39cab 8044fi
c906108c 8045
bec39cab 8046fi
c906108c 8047
ddc9cd0f 8048
bec39cab 8049# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8051$as_echo_n "checking for library containing gethostbyname... " >&6; }
8052if test "${ac_cv_search_gethostbyname+set}" = set; then :
8053 $as_echo_n "(cached) " >&6
bec39cab
AC
8054else
8055 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8057/* end confdefs.h. */
ddc9cd0f 8058
81ecdfbb
RW
8059/* Override any GCC internal prototype to avoid an error.
8060 Use char because int might match the return type of a GCC
8061 builtin and then its argument prototype would still apply. */
bec39cab
AC
8062#ifdef __cplusplus
8063extern "C"
8064#endif
bec39cab
AC
8065char gethostbyname ();
8066int
8067main ()
8068{
81ecdfbb 8069return gethostbyname ();
bec39cab
AC
8070 ;
8071 return 0;
8072}
8073_ACEOF
81ecdfbb
RW
8074for ac_lib in '' nsl; do
8075 if test -z "$ac_lib"; then
8076 ac_res="none required"
8077 else
8078 ac_res=-l$ac_lib
b4e70030 8079 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8080 fi
8081 if ac_fn_c_try_link "$LINENO"; then :
8082 ac_cv_search_gethostbyname=$ac_res
8083fi
8084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext
8086 if test "${ac_cv_search_gethostbyname+set}" = set; then :
8087 break
8088fi
8089done
8090if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 8091
bec39cab 8092else
81ecdfbb 8093 ac_cv_search_gethostbyname=no
bec39cab 8094fi
81ecdfbb 8095rm conftest.$ac_ext
bec39cab
AC
8096LIBS=$ac_func_search_save_LIBS
8097fi
81ecdfbb
RW
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8099$as_echo "$ac_cv_search_gethostbyname" >&6; }
8100ac_res=$ac_cv_search_gethostbyname
8101if test "$ac_res" != no; then :
8102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8103
bec39cab 8104fi
96baa820 8105
c906108c 8106
b4e70030 8107# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8109$as_echo_n "checking for library containing socketpair... " >&6; }
8110if test "${ac_cv_search_socketpair+set}" = set; then :
8111 $as_echo_n "(cached) " >&6
b4e70030
JB
8112else
8113 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8115/* end confdefs.h. */
8116
81ecdfbb
RW
8117/* Override any GCC internal prototype to avoid an error.
8118 Use char because int might match the return type of a GCC
8119 builtin and then its argument prototype would still apply. */
b4e70030
JB
8120#ifdef __cplusplus
8121extern "C"
8122#endif
b4e70030
JB
8123char socketpair ();
8124int
8125main ()
8126{
81ecdfbb 8127return socketpair ();
b4e70030
JB
8128 ;
8129 return 0;
8130}
8131_ACEOF
81ecdfbb
RW
8132for ac_lib in '' socket; do
8133 if test -z "$ac_lib"; then
8134 ac_res="none required"
8135 else
8136 ac_res=-l$ac_lib
b4e70030 8137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8138 fi
8139 if ac_fn_c_try_link "$LINENO"; then :
8140 ac_cv_search_socketpair=$ac_res
8141fi
8142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext
8144 if test "${ac_cv_search_socketpair+set}" = set; then :
8145 break
8146fi
8147done
8148if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 8149
b4e70030 8150else
81ecdfbb 8151 ac_cv_search_socketpair=no
b4e70030 8152fi
81ecdfbb 8153rm conftest.$ac_ext
b4e70030
JB
8154LIBS=$ac_func_search_save_LIBS
8155fi
81ecdfbb
RW
8156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8157$as_echo "$ac_cv_search_socketpair" >&6; }
8158ac_res=$ac_cv_search_socketpair
8159if test "$ac_res" != no; then :
8160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8161
8162fi
8163
8164
233a11ab 8165# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
8166
8167 # See if the user specified whether he wants zlib support or not.
8168
8169# Check whether --with-zlib was given.
8170if test "${with_zlib+set}" = set; then :
8171 withval=$with_zlib;
8172else
8173 with_zlib=auto
8174fi
8175
8176
8177 if test "$with_zlib" != "no"; then
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
8179$as_echo_n "checking for library containing zlibVersion... " >&6; }
8180if test "${ac_cv_search_zlibVersion+set}" = set; then :
8181 $as_echo_n "(cached) " >&6
233a11ab
CS
8182else
8183 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
8185/* end confdefs.h. */
8186
81ecdfbb
RW
8187/* Override any GCC internal prototype to avoid an error.
8188 Use char because int might match the return type of a GCC
233a11ab 8189 builtin and then its argument prototype would still apply. */
233a11ab
CS
8190#ifdef __cplusplus
8191extern "C"
8192#endif
233a11ab
CS
8193char zlibVersion ();
8194int
8195main ()
8196{
81ecdfbb 8197return zlibVersion ();
233a11ab
CS
8198 ;
8199 return 0;
8200}
8201_ACEOF
81ecdfbb
RW
8202for ac_lib in '' z; do
8203 if test -z "$ac_lib"; then
8204 ac_res="none required"
233a11ab 8205 else
81ecdfbb
RW
8206 ac_res=-l$ac_lib
8207 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 8208 fi
81ecdfbb
RW
8209 if ac_fn_c_try_link "$LINENO"; then :
8210 ac_cv_search_zlibVersion=$ac_res
233a11ab 8211fi
81ecdfbb
RW
8212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext
8214 if test "${ac_cv_search_zlibVersion+set}" = set; then :
8215 break
233a11ab 8216fi
81ecdfbb
RW
8217done
8218if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 8219
233a11ab 8220else
81ecdfbb 8221 ac_cv_search_zlibVersion=no
233a11ab 8222fi
81ecdfbb
RW
8223rm conftest.$ac_ext
8224LIBS=$ac_func_search_save_LIBS
233a11ab 8225fi
81ecdfbb
RW
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
8227$as_echo "$ac_cv_search_zlibVersion" >&6; }
8228ac_res=$ac_cv_search_zlibVersion
8229if test "$ac_res" != no; then :
8230 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8231 for ac_header in zlib.h
8232do :
8233 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8234if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 8235 cat >>confdefs.h <<_ACEOF
81ecdfbb 8236#define HAVE_ZLIB_H 1
233a11ab
CS
8237_ACEOF
8238
8239fi
8240
8241done
8242
8243fi
8244
b040ad30
JB
8245 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
8246 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
8247 fi
8248 fi
8249
233a11ab 8250
77f120bf 8251# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
8253$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
8254if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8255 $as_echo_n "(cached) " >&6
bec39cab
AC
8256else
8257 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8259/* end confdefs.h. */
c906108c 8260
81ecdfbb
RW
8261/* Override any GCC internal prototype to avoid an error.
8262 Use char because int might match the return type of a GCC
8263 builtin and then its argument prototype would still apply. */
bec39cab
AC
8264#ifdef __cplusplus
8265extern "C"
8266#endif
77f120bf 8267char dlgetmodinfo ();
bec39cab
AC
8268int
8269main ()
8270{
81ecdfbb 8271return dlgetmodinfo ();
bec39cab
AC
8272 ;
8273 return 0;
8274}
8275_ACEOF
81ecdfbb
RW
8276for ac_lib in '' dl xpdl; do
8277 if test -z "$ac_lib"; then
8278 ac_res="none required"
8279 else
8280 ac_res=-l$ac_lib
b4e70030 8281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8282 fi
8283 if ac_fn_c_try_link "$LINENO"; then :
8284 ac_cv_search_dlgetmodinfo=$ac_res
8285fi
8286rm -f core conftest.err conftest.$ac_objext \
8287 conftest$ac_exeext
8288 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
8289 break
8290fi
8291done
8292if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 8293
4e8d927d 8294else
81ecdfbb 8295 ac_cv_search_dlgetmodinfo=no
1ba607ad 8296fi
81ecdfbb 8297rm conftest.$ac_ext
bec39cab
AC
8298LIBS=$ac_func_search_save_LIBS
8299fi
81ecdfbb
RW
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
8301$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
8302ac_res=$ac_cv_search_dlgetmodinfo
8303if test "$ac_res" != no; then :
8304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 8305
8bb2c122 8306fi
8bb2c122 8307
8bb2c122 8308
77f120bf 8309
77f120bf 8310
6c7a06a3 8311
81ecdfbb
RW
8312# Check whether --with-libiconv-prefix was given.
8313if test "${with_libiconv_prefix+set}" = set; then :
8314 withval=$with_libiconv_prefix;
6c7a06a3 8315 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
8316 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
8317 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
8318 done
8319
81ecdfbb
RW
8320fi
8321
6c7a06a3 8322
f18c4681 8323 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
8324 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
8325
81ecdfbb
RW
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8327$as_echo_n "checking for iconv... " >&6; }
8328if test "${am_cv_func_iconv+set}" = set; then :
8329 $as_echo_n "(cached) " >&6
d542061a 8330else
6c7a06a3
TT
8331
8332 am_cv_func_iconv="no, consider installing GNU libiconv"
8333 am_cv_lib_iconv=no
8334 am_cv_use_build_libiconv=no
f0f20949 8335 am_cv_build_libiconv_path=
4edb1e84
JB
8336
8337 # If libiconv is part of the build tree, then try using it over
8338 # any system iconv.
8339 if test -d ../libiconv; then
f18c4681
JB
8340 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
8341 am_save_LIBS="$LIBS"
8342 am_save_CPPFLAGS="$CPPFLAGS"
8343 LIBS="$LIBS $lib_dir/libiconv.a"
8344 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
8345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8346/* end confdefs.h. */
6c7a06a3
TT
8347#include <stdlib.h>
8348#include <iconv.h>
d542061a
UW
8349int
8350main ()
8351{
6c7a06a3 8352iconv_t cd = iconv_open("","");
f18c4681
JB
8353 iconv(cd,NULL,NULL,NULL,NULL);
8354 iconv_close(cd);
d542061a
UW
8355 ;
8356 return 0;
8357}
8358_ACEOF
81ecdfbb 8359if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8360 am_cv_use_build_libiconv=yes
f0f20949 8361 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
8362 am_cv_lib_iconv=yes
8363 am_cv_func_iconv=yes
d542061a 8364fi
81ecdfbb
RW
8365rm -f core conftest.err conftest.$ac_objext \
8366 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
8367 LIBS="$am_save_LIBS"
8368 CPPFLAGS="$am_save_CPPFLAGS"
8369 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
8370 break
8371 fi
8372 done
4edb1e84 8373 fi
94ae1714 8374
4edb1e84 8375 # Next, try to find iconv in libc.
6c7a06a3 8376 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 8377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8378/* end confdefs.h. */
6c7a06a3
TT
8379#include <stdlib.h>
8380#include <iconv.h>
d542061a
UW
8381int
8382main ()
8383{
6c7a06a3
TT
8384iconv_t cd = iconv_open("","");
8385 iconv(cd,NULL,NULL,NULL,NULL);
8386 iconv_close(cd);
d542061a
UW
8387 ;
8388 return 0;
8389}
8390_ACEOF
81ecdfbb 8391if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8392 am_cv_func_iconv=yes
d542061a 8393fi
81ecdfbb
RW
8394rm -f core conftest.err conftest.$ac_objext \
8395 conftest$ac_exeext conftest.$ac_ext
77f120bf 8396 fi
94ae1714 8397
4edb1e84
JB
8398 # If iconv was not in libc, try -liconv. In this case, arrange to
8399 # look in the libiconv prefix, if it was specified by the user.
8400 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8401 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
8402 am_save_LIBS="$LIBS"
8403 if test -n "$LIBICONV_INCLUDE"; then
8404 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8405 LIBS="$LIBS $LIBICONV_LIBDIR"
8406 fi
8407 LIBS="$LIBS -liconv"
81ecdfbb 8408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8409/* end confdefs.h. */
6c7a06a3
TT
8410#include <stdlib.h>
8411#include <iconv.h>
bec39cab
AC
8412int
8413main ()
8414{
6c7a06a3
TT
8415iconv_t cd = iconv_open("","");
8416 iconv(cd,NULL,NULL,NULL,NULL);
8417 iconv_close(cd);
bec39cab
AC
8418 ;
8419 return 0;
8420}
8421_ACEOF
81ecdfbb 8422if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8423 am_cv_lib_iconv=yes
6c7a06a3 8424 am_cv_func_iconv=yes
627af7ea 8425fi
81ecdfbb
RW
8426rm -f core conftest.err conftest.$ac_objext \
8427 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 8428 LIBS="$am_save_LIBS"
fc3b640d 8429 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
8430 fi
8431
8432fi
81ecdfbb
RW
8433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8434$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
8435
8436 # Set the various flags based on the cache variables. We can't rely
8437 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
8438 LIBICONV=
8439 if test "$am_cv_lib_iconv" = yes; then
8440 LIBICONV="-liconv"
94ae1714
TT
8441 else
8442 LIBICONV_LIBDIR=
8443 LIBICONV_INCLUDE=
fc3b640d
TT
8444 fi
8445 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 8446 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 8447 LIBICONV_LIBDIR=""
fc3b640d
TT
8448 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
8449 fi
8450 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
8451 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 8452
6c7a06a3
TT
8453 if test "$am_cv_func_iconv" = yes; then
8454
81ecdfbb 8455$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 8456
81ecdfbb
RW
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8458$as_echo_n "checking for iconv declaration... " >&6; }
8459 if test "${am_cv_proto_iconv+set}" = set; then :
8460 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8461else
8462
81ecdfbb 8463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8464/* end confdefs.h. */
8465
6c7a06a3
TT
8466#include <stdlib.h>
8467#include <iconv.h>
8468extern
b4e70030 8469#ifdef __cplusplus
6c7a06a3 8470"C"
b4e70030 8471#endif
6c7a06a3
TT
8472#if defined(__STDC__) || defined(__cplusplus)
8473size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8474#else
8475size_t iconv();
8476#endif
8477
b4e70030
JB
8478int
8479main ()
8480{
6c7a06a3 8481
b4e70030
JB
8482 ;
8483 return 0;
8484}
8485_ACEOF
81ecdfbb 8486if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8487 am_cv_proto_iconv_arg1=""
4e8d927d 8488else
81ecdfbb 8489 am_cv_proto_iconv_arg1="const"
b4e70030 8490fi
81ecdfbb 8491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8492 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);"
8493fi
8494
8495 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8497 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8498$as_echo "${ac_t:-
8499 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8500
8501cat >>confdefs.h <<_ACEOF
8502#define ICONV_CONST $am_cv_proto_iconv_arg1
8503_ACEOF
8504
8505 fi
6c7a06a3
TT
8506
8507
8508# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
8509# There is a very specific comment in /usr/include/curses.h explaining that
8510# termcap routines built into libcurses must not be used.
8511#
8512# The symptoms we observed so far is GDB unexpectedly changing
8513# the terminal settings when tgetent is called - this is particularly
8514# visible as the output is missing carriage returns, and so rapidly
8515# becomes very hard to read.
8516#
8517# The readline configure script has already decided that libtermcap
8518# was enough for its purposes, and so decided to build readline using
8519# libtermcap. Since the TUI mode requires curses, building GDB with
8520# TUI enabled results in both libraries to be used at the same time,
8521# which is not allowed. This basically means that GDB with TUI is
8522# broken on alpha-osf.
8523
8524case $host_os in
6bcc772d
RO
8525 osf* )
8526 if test x"$enable_tui" = xyes; then
81ecdfbb 8527 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 8528 fi
6bcc772d 8529 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
8530 enable_tui=no
8531 fi
8532 ;;
8533esac
8534
cb01cfba 8535# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8536if test x"$enable_tui" != xno; then
cb01cfba
JB
8537 prefer_curses=yes
8538fi
8539
8540curses_found=no
8541if test x"$prefer_curses" = xyes; then
8542 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8543 # curses library because the latter might not provide all the
8544 # functionality we need. However, this leads to problems on systems
8545 # where the linker searches /usr/local/lib, but the compiler doesn't
8546 # search /usr/local/include, if ncurses is installed in /usr/local. A
8547 # default installation of ncurses on alpha*-dec-osf* will lead to such
8548 # a situation.
81ecdfbb
RW
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8550$as_echo_n "checking for library containing waddstr... " >&6; }
8551if test "${ac_cv_search_waddstr+set}" = set; then :
8552 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8553else
8554 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8556/* end confdefs.h. */
8557
81ecdfbb
RW
8558/* Override any GCC internal prototype to avoid an error.
8559 Use char because int might match the return type of a GCC
8560 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8561#ifdef __cplusplus
8562extern "C"
8563#endif
6c7a06a3
TT
8564char waddstr ();
8565int
8566main ()
8567{
81ecdfbb 8568return waddstr ();
6c7a06a3
TT
8569 ;
8570 return 0;
8571}
8572_ACEOF
81ecdfbb
RW
8573for ac_lib in '' ncurses cursesX curses; do
8574 if test -z "$ac_lib"; then
8575 ac_res="none required"
8576 else
8577 ac_res=-l$ac_lib
8578 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8579 fi
8580 if ac_fn_c_try_link "$LINENO"; then :
8581 ac_cv_search_waddstr=$ac_res
8582fi
8583rm -f core conftest.err conftest.$ac_objext \
8584 conftest$ac_exeext
8585 if test "${ac_cv_search_waddstr+set}" = set; then :
8586 break
8587fi
8588done
8589if test "${ac_cv_search_waddstr+set}" = set; then :
8590
6c7a06a3 8591else
81ecdfbb
RW
8592 ac_cv_search_waddstr=no
8593fi
8594rm conftest.$ac_ext
8595LIBS=$ac_func_search_save_LIBS
8596fi
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8598$as_echo "$ac_cv_search_waddstr" >&6; }
8599ac_res=$ac_cv_search_waddstr
8600if test "$ac_res" != no; then :
8601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8602
8603fi
8604
8605
cb01cfba
JB
8606 if test "$ac_cv_search_waddstr" != no; then
8607 curses_found=yes
8608 fi
8609fi
8610
8611# Check whether we should enable the TUI, but only do so if we really
8612# can.
8613if test x"$enable_tui" != xno; then
8614 if test -d $srcdir/tui; then
8615 if test "$curses_found" != no; then
6c7a06a3
TT
8616 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8617 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8618 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8619 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8620 CONFIG_ALL="${CONFIG_ALL} all-tui"
8621 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
8622 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
8623 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
8624 else
8625 if test x"$enable_tui" = xyes; then
81ecdfbb 8626 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8627 else
81ecdfbb
RW
8628 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8629$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8630 fi
8631 fi
8632 fi
8633fi
8634
8635# Since GDB uses Readline, we need termcap functionality. In many
8636# cases this will be provided by the curses library, but some systems
8637# have a seperate termcap library, or no curses library at all.
8638
8639case $host_os in
8640 cygwin*)
8641 if test -d $srcdir/libtermcap; then
8642 LIBS="../libtermcap/libtermcap.a $LIBS"
8643 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8644 fi ;;
8645 go32* | *djgpp*)
8646 ac_cv_search_tgetent="none required"
8647 ;;
8648 *mingw32*)
8649 ac_cv_search_tgetent="none required"
8650 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
8651 ;;
8652esac
8653
8654# These are the libraries checked by Readline.
81ecdfbb
RW
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8656$as_echo_n "checking for library containing tgetent... " >&6; }
8657if test "${ac_cv_search_tgetent+set}" = set; then :
8658 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8659else
8660 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8662/* end confdefs.h. */
8663
81ecdfbb
RW
8664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8667#ifdef __cplusplus
8668extern "C"
8669#endif
6c7a06a3
TT
8670char tgetent ();
8671int
8672main ()
8673{
81ecdfbb 8674return tgetent ();
6c7a06a3
TT
8675 ;
8676 return 0;
8677}
8678_ACEOF
81ecdfbb
RW
8679for ac_lib in '' termcap tinfo curses ncurses; do
8680 if test -z "$ac_lib"; then
8681 ac_res="none required"
8682 else
8683 ac_res=-l$ac_lib
6c7a06a3 8684 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8685 fi
8686 if ac_fn_c_try_link "$LINENO"; then :
8687 ac_cv_search_tgetent=$ac_res
8688fi
8689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext
8691 if test "${ac_cv_search_tgetent+set}" = set; then :
8692 break
8693fi
8694done
8695if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8696
6c7a06a3 8697else
81ecdfbb 8698 ac_cv_search_tgetent=no
6c7a06a3 8699fi
81ecdfbb 8700rm conftest.$ac_ext
6c7a06a3
TT
8701LIBS=$ac_func_search_save_LIBS
8702fi
81ecdfbb
RW
8703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8704$as_echo "$ac_cv_search_tgetent" >&6; }
8705ac_res=$ac_cv_search_tgetent
8706if test "$ac_res" != no; then :
8707 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8708
06825bd1
MK
8709fi
8710
06825bd1 8711
bec39cab 8712if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 8713 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
8714fi
8715
3841debe 8716
81ecdfbb
RW
8717# Check whether --with-system-readline was given.
8718if test "${with_system_readline+set}" = set; then :
8719 withval=$with_system_readline;
8720fi
6a30b0a5 8721
6a30b0a5
AS
8722
8723if test "$with_system_readline" = yes; then
8724 READLINE=-lreadline
8725 READLINE_DEPS=
8726 READLINE_CFLAGS=
a71e0887
JK
8727
8728 # readline-6.0 started to use the name `_rl_echoing_p'.
8729 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
8730
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
8732$as_echo_n "checking for readline_echoing_p... " >&6; }
8733 save_LIBS=$LIBS
8734 LIBS="$LIBS $READLINE"
8735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736/* end confdefs.h. */
8737
8738int
8739main ()
8740{
8741extern int readline_echoing_p;
8742 return readline_echoing_p;
8743 ;
8744 return 0;
8745}
8746_ACEOF
8747if ac_fn_c_try_link "$LINENO"; then :
8748 READLINE_ECHOING_P=yes
8749else
8750 READLINE_ECHOING_P=no
8751
8752$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
8753
8754fi
8755rm -f core conftest.err conftest.$ac_objext \
8756 conftest$ac_exeext conftest.$ac_ext
8757 LIBS="$save_LIBS"
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
8759$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
8760else
8761 READLINE='$(READLINE_DIR)/libreadline.a'
8762 READLINE_DEPS='$(READLINE)'
8763 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8764fi
8765
8766
8767
8768
8769
81ecdfbb
RW
8770# Check whether --with-expat was given.
8771if test "${with_expat+set}" = set; then :
8772 withval=$with_expat;
5c39566f
DJ
8773else
8774 with_expat=auto
81ecdfbb
RW
8775fi
8776
8777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8778$as_echo_n "checking whether to use expat... " >&6; }
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8780$as_echo "$with_expat" >&6; }
5c39566f
DJ
8781
8782if test "${with_expat}" = no; then
81ecdfbb
RW
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8784$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8785 HAVE_LIBEXPAT=no
8786else
8787
3841debe
DJ
8788 if test "X$prefix" = "XNONE"; then
8789 acl_final_prefix="$ac_default_prefix"
8790 else
8791 acl_final_prefix="$prefix"
8792 fi
8793 if test "X$exec_prefix" = "XNONE"; then
8794 acl_final_exec_prefix='${prefix}'
8795 else
8796 acl_final_exec_prefix="$exec_prefix"
8797 fi
8798 acl_save_prefix="$prefix"
8799 prefix="$acl_final_prefix"
8800 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8801 prefix="$acl_save_prefix"
8802
8803
81ecdfbb
RW
8804# Check whether --with-gnu-ld was given.
8805if test "${with_gnu_ld+set}" = set; then :
8806 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
8807else
8808 with_gnu_ld=no
81ecdfbb
RW
8809fi
8810
3841debe
DJ
8811# Prepare PATH_SEPARATOR.
8812# The user is always right.
8813if test "${PATH_SEPARATOR+set}" != set; then
8814 echo "#! /bin/sh" >conf$$.sh
8815 echo "exit 0" >>conf$$.sh
8816 chmod +x conf$$.sh
8817 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8818 PATH_SEPARATOR=';'
8819 else
8820 PATH_SEPARATOR=:
8821 fi
8822 rm -f conf$$.sh
8823fi
8824ac_prog=ld
8825if test "$GCC" = yes; then
8826 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8828$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
8829 case $host in
8830 *-*-mingw*)
8831 # gcc leaves a trailing carriage return which upsets mingw
8832 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8833 *)
8834 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8835 esac
8836 case $ac_prog in
8837 # Accept absolute paths.
8838 [\\/]* | [A-Za-z]:[\\/]*)
8839 re_direlt='/[^/][^/]*/\.\./'
8840 # Canonicalize the path of ld
8841 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8842 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8843 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8844 done
8845 test -z "$LD" && LD="$ac_prog"
8846 ;;
8847 "")
8848 # If it fails, then pretend we aren't using GCC.
8849 ac_prog=ld
8850 ;;
8851 *)
8852 # If it is relative, then search for the first ld in PATH.
8853 with_gnu_ld=unknown
8854 ;;
8855 esac
8856elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8858$as_echo_n "checking for GNU ld... " >&6; }
3841debe 8859else
81ecdfbb
RW
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8861$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 8862fi
81ecdfbb
RW
8863if test "${acl_cv_path_LD+set}" = set; then :
8864 $as_echo_n "(cached) " >&6
3841debe
DJ
8865else
8866 if test -z "$LD"; then
8867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8868 for ac_dir in $PATH; do
8869 test -z "$ac_dir" && ac_dir=.
8870 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8871 acl_cv_path_LD="$ac_dir/$ac_prog"
8872 # Check to see if the program is GNU ld. I'd rather use --version,
8873 # but apparently some GNU ld's only accept -v.
8874 # Break only if it was the GNU/non-GNU ld that we prefer.
8875 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8876 test "$with_gnu_ld" != no && break
8877 else
8878 test "$with_gnu_ld" != yes && break
8879 fi
8880 fi
8881 done
8882 IFS="$ac_save_ifs"
8883else
8884 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8885fi
8886fi
8887
8888LD="$acl_cv_path_LD"
8889if test -n "$LD"; then
81ecdfbb
RW
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8891$as_echo "$LD" >&6; }
3841debe 8892else
81ecdfbb
RW
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8894$as_echo "no" >&6; }
3841debe 8895fi
81ecdfbb
RW
8896test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8898$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8899if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8900 $as_echo_n "(cached) " >&6
3841debe
DJ
8901else
8902 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8903if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8904 acl_cv_prog_gnu_ld=yes
8905else
8906 acl_cv_prog_gnu_ld=no
8907fi
8908fi
81ecdfbb
RW
8909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8910$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
8911with_gnu_ld=$acl_cv_prog_gnu_ld
8912
8913
8914
81ecdfbb
RW
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8916$as_echo_n "checking for shared library run path origin... " >&6; }
8917if test "${acl_cv_rpath+set}" = set; then :
8918 $as_echo_n "(cached) " >&6
3841debe
DJ
8919else
8920
8921 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8922 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8923 . ./conftest.sh
8924 rm -f ./conftest.sh
8925 acl_cv_rpath=done
8926
8927fi
81ecdfbb
RW
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8929$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
8930 wl="$acl_cv_wl"
8931 libext="$acl_cv_libext"
8932 shlibext="$acl_cv_shlibext"
8933 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8934 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8935 hardcode_direct="$acl_cv_hardcode_direct"
8936 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
8937 # Check whether --enable-rpath was given.
8938if test "${enable_rpath+set}" = set; then :
8939 enableval=$enable_rpath; :
3841debe
DJ
8940else
8941 enable_rpath=yes
81ecdfbb
RW
8942fi
8943
3841debe
DJ
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953 use_additional=yes
8954
8955 acl_save_prefix="$prefix"
8956 prefix="$acl_final_prefix"
8957 acl_save_exec_prefix="$exec_prefix"
8958 exec_prefix="$acl_final_exec_prefix"
8959
8960 eval additional_includedir=\"$includedir\"
8961 eval additional_libdir=\"$libdir\"
8962
8963 exec_prefix="$acl_save_exec_prefix"
8964 prefix="$acl_save_prefix"
8965
8966
81ecdfbb
RW
8967# Check whether --with-libexpat-prefix was given.
8968if test "${with_libexpat_prefix+set}" = set; then :
8969 withval=$with_libexpat_prefix;
3841debe
DJ
8970 if test "X$withval" = "Xno"; then
8971 use_additional=no
8972 else
8973 if test "X$withval" = "X"; then
8974
8975 acl_save_prefix="$prefix"
8976 prefix="$acl_final_prefix"
8977 acl_save_exec_prefix="$exec_prefix"
8978 exec_prefix="$acl_final_exec_prefix"
8979
8980 eval additional_includedir=\"$includedir\"
8981 eval additional_libdir=\"$libdir\"
8982
8983 exec_prefix="$acl_save_exec_prefix"
8984 prefix="$acl_save_prefix"
8985
8986 else
8987 additional_includedir="$withval/include"
8988 additional_libdir="$withval/lib"
8989 fi
8990 fi
8991
81ecdfbb
RW
8992fi
8993
3841debe
DJ
8994 LIBEXPAT=
8995 LTLIBEXPAT=
8996 INCEXPAT=
8997 rpathdirs=
8998 ltrpathdirs=
8999 names_already_handled=
9000 names_next_round='expat '
9001 while test -n "$names_next_round"; do
9002 names_this_round="$names_next_round"
9003 names_next_round=
9004 for name in $names_this_round; do
9005 already_handled=
9006 for n in $names_already_handled; do
9007 if test "$n" = "$name"; then
9008 already_handled=yes
9009 break
9010 fi
9011 done
9012 if test -z "$already_handled"; then
9013 names_already_handled="$names_already_handled $name"
9014 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9015 eval value=\"\$HAVE_LIB$uppername\"
9016 if test -n "$value"; then
9017 if test "$value" = yes; then
9018 eval value=\"\$LIB$uppername\"
9019 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9020 eval value=\"\$LTLIB$uppername\"
9021 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9022 else
9023 :
9024 fi
9025 else
9026 found_dir=
9027 found_la=
9028 found_so=
9029 found_a=
9030 if test $use_additional = yes; then
9031 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9032 found_dir="$additional_libdir"
9033 found_so="$additional_libdir/lib$name.$shlibext"
9034 if test -f "$additional_libdir/lib$name.la"; then
9035 found_la="$additional_libdir/lib$name.la"
9036 fi
9037 else
9038 if test -f "$additional_libdir/lib$name.$libext"; then
9039 found_dir="$additional_libdir"
9040 found_a="$additional_libdir/lib$name.$libext"
9041 if test -f "$additional_libdir/lib$name.la"; then
9042 found_la="$additional_libdir/lib$name.la"
9043 fi
9044 fi
9045 fi
9046 fi
9047 if test "X$found_dir" = "X"; then
9048 for x in $LDFLAGS $LTLIBEXPAT; do
9049
9050 acl_save_prefix="$prefix"
9051 prefix="$acl_final_prefix"
9052 acl_save_exec_prefix="$exec_prefix"
9053 exec_prefix="$acl_final_exec_prefix"
9054 eval x=\"$x\"
9055 exec_prefix="$acl_save_exec_prefix"
9056 prefix="$acl_save_prefix"
9057
9058 case "$x" in
9059 -L*)
9060 dir=`echo "X$x" | sed -e 's/^X-L//'`
9061 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9062 found_dir="$dir"
9063 found_so="$dir/lib$name.$shlibext"
9064 if test -f "$dir/lib$name.la"; then
9065 found_la="$dir/lib$name.la"
9066 fi
9067 else
9068 if test -f "$dir/lib$name.$libext"; then
9069 found_dir="$dir"
9070 found_a="$dir/lib$name.$libext"
9071 if test -f "$dir/lib$name.la"; then
9072 found_la="$dir/lib$name.la"
9073 fi
9074 fi
9075 fi
9076 ;;
9077 esac
9078 if test "X$found_dir" != "X"; then
9079 break
9080 fi
9081 done
9082 fi
9083 if test "X$found_dir" != "X"; then
9084 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9085 if test "X$found_so" != "X"; then
9086 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9087 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9088 else
9089 haveit=
9090 for x in $ltrpathdirs; do
9091 if test "X$x" = "X$found_dir"; then
9092 haveit=yes
9093 break
9094 fi
9095 done
9096 if test -z "$haveit"; then
9097 ltrpathdirs="$ltrpathdirs $found_dir"
9098 fi
9099 if test "$hardcode_direct" = yes; then
9100 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9101 else
9102 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9103 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9104 haveit=
9105 for x in $rpathdirs; do
9106 if test "X$x" = "X$found_dir"; then
9107 haveit=yes
9108 break
9109 fi
9110 done
9111 if test -z "$haveit"; then
9112 rpathdirs="$rpathdirs $found_dir"
9113 fi
9114 else
9115 haveit=
9116 for x in $LDFLAGS $LIBEXPAT; do
9117
9118 acl_save_prefix="$prefix"
9119 prefix="$acl_final_prefix"
9120 acl_save_exec_prefix="$exec_prefix"
9121 exec_prefix="$acl_final_exec_prefix"
9122 eval x=\"$x\"
9123 exec_prefix="$acl_save_exec_prefix"
9124 prefix="$acl_save_prefix"
9125
9126 if test "X$x" = "X-L$found_dir"; then
9127 haveit=yes
9128 break
9129 fi
9130 done
9131 if test -z "$haveit"; then
9132 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9133 fi
9134 if test "$hardcode_minus_L" != no; then
9135 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9136 else
9137 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9138 fi
9139 fi
9140 fi
9141 fi
9142 else
9143 if test "X$found_a" != "X"; then
9144 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9145 else
9146 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9147 fi
9148 fi
9149 additional_includedir=
9150 case "$found_dir" in
9151 */lib | */lib/)
9152 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9153 additional_includedir="$basedir/include"
9154 ;;
9155 esac
9156 if test "X$additional_includedir" != "X"; then
9157 if test "X$additional_includedir" != "X/usr/include"; then
9158 haveit=
9159 if test "X$additional_includedir" = "X/usr/local/include"; then
9160 if test -n "$GCC"; then
9161 case $host_os in
9162 linux*) haveit=yes;;
9163 esac
9164 fi
9165 fi
9166 if test -z "$haveit"; then
9167 for x in $CPPFLAGS $INCEXPAT; do
9168
9169 acl_save_prefix="$prefix"
9170 prefix="$acl_final_prefix"
9171 acl_save_exec_prefix="$exec_prefix"
9172 exec_prefix="$acl_final_exec_prefix"
9173 eval x=\"$x\"
9174 exec_prefix="$acl_save_exec_prefix"
9175 prefix="$acl_save_prefix"
9176
9177 if test "X$x" = "X-I$additional_includedir"; then
9178 haveit=yes
9179 break
9180 fi
9181 done
9182 if test -z "$haveit"; then
9183 if test -d "$additional_includedir"; then
9184 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9185 fi
9186 fi
9187 fi
9188 fi
9189 fi
9190 if test -n "$found_la"; then
9191 save_libdir="$libdir"
9192 case "$found_la" in
9193 */* | *\\*) . "$found_la" ;;
9194 *) . "./$found_la" ;;
9195 esac
9196 libdir="$save_libdir"
9197 for dep in $dependency_libs; do
9198 case "$dep" in
9199 -L*)
9200 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9201 if test "X$additional_libdir" != "X/usr/lib"; then
9202 haveit=
9203 if test "X$additional_libdir" = "X/usr/local/lib"; then
9204 if test -n "$GCC"; then
9205 case $host_os in
9206 linux*) haveit=yes;;
9207 esac
9208 fi
9209 fi
9210 if test -z "$haveit"; then
9211 haveit=
9212 for x in $LDFLAGS $LIBEXPAT; do
9213
9214 acl_save_prefix="$prefix"
9215 prefix="$acl_final_prefix"
9216 acl_save_exec_prefix="$exec_prefix"
9217 exec_prefix="$acl_final_exec_prefix"
9218 eval x=\"$x\"
9219 exec_prefix="$acl_save_exec_prefix"
9220 prefix="$acl_save_prefix"
9221
9222 if test "X$x" = "X-L$additional_libdir"; then
9223 haveit=yes
9224 break
9225 fi
9226 done
9227 if test -z "$haveit"; then
9228 if test -d "$additional_libdir"; then
9229 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9230 fi
9231 fi
9232 haveit=
9233 for x in $LDFLAGS $LTLIBEXPAT; do
9234
9235 acl_save_prefix="$prefix"
9236 prefix="$acl_final_prefix"
9237 acl_save_exec_prefix="$exec_prefix"
9238 exec_prefix="$acl_final_exec_prefix"
9239 eval x=\"$x\"
9240 exec_prefix="$acl_save_exec_prefix"
9241 prefix="$acl_save_prefix"
9242
9243 if test "X$x" = "X-L$additional_libdir"; then
9244 haveit=yes
9245 break
9246 fi
9247 done
9248 if test -z "$haveit"; then
9249 if test -d "$additional_libdir"; then
9250 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9251 fi
9252 fi
9253 fi
9254 fi
9255 ;;
9256 -R*)
9257 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9258 if test "$enable_rpath" != no; then
9259 haveit=
9260 for x in $rpathdirs; do
9261 if test "X$x" = "X$dir"; then
9262 haveit=yes
9263 break
9264 fi
9265 done
9266 if test -z "$haveit"; then
9267 rpathdirs="$rpathdirs $dir"
9268 fi
9269 haveit=
9270 for x in $ltrpathdirs; do
9271 if test "X$x" = "X$dir"; then
9272 haveit=yes
9273 break
9274 fi
9275 done
9276 if test -z "$haveit"; then
9277 ltrpathdirs="$ltrpathdirs $dir"
9278 fi
9279 fi
9280 ;;
9281 -l*)
9282 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9283 ;;
9284 *.la)
9285 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9286 ;;
9287 *)
9288 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9289 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9290 ;;
81ecdfbb
RW
9291 esac
9292 done
9293 fi
9294 else
9295 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9296 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9297 fi
9298 fi
9299 fi
9300 done
9301 done
9302 if test "X$rpathdirs" != "X"; then
9303 if test -n "$hardcode_libdir_separator"; then
9304 alldirs=
9305 for found_dir in $rpathdirs; do
9306 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9307 done
9308 acl_save_libdir="$libdir"
9309 libdir="$alldirs"
9310 eval flag=\"$hardcode_libdir_flag_spec\"
9311 libdir="$acl_save_libdir"
9312 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9313 else
9314 for found_dir in $rpathdirs; do
9315 acl_save_libdir="$libdir"
9316 libdir="$found_dir"
9317 eval flag=\"$hardcode_libdir_flag_spec\"
9318 libdir="$acl_save_libdir"
9319 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9320 done
9321 fi
9322 fi
9323 if test "X$ltrpathdirs" != "X"; then
9324 for found_dir in $ltrpathdirs; do
9325 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9326 done
9327 fi
a9322a30
TT
9328
9329
81ecdfbb 9330 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9331
81ecdfbb
RW
9332 for element in $INCEXPAT; do
9333 haveit=
9334 for x in $CPPFLAGS; do
a9322a30 9335
81ecdfbb
RW
9336 acl_save_prefix="$prefix"
9337 prefix="$acl_final_prefix"
9338 acl_save_exec_prefix="$exec_prefix"
9339 exec_prefix="$acl_final_exec_prefix"
9340 eval x=\"$x\"
9341 exec_prefix="$acl_save_exec_prefix"
9342 prefix="$acl_save_prefix"
a8111142 9343
81ecdfbb
RW
9344 if test "X$x" = "X$element"; then
9345 haveit=yes
9346 break
9347 fi
9348 done
9349 if test -z "$haveit"; then
9350 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9351 fi
9352 done
a9322a30
TT
9353
9354
81ecdfbb
RW
9355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9356$as_echo_n "checking for libexpat... " >&6; }
9357if test "${ac_cv_libexpat+set}" = set; then :
9358 $as_echo_n "(cached) " >&6
bec39cab 9359else
bec39cab 9360
81ecdfbb
RW
9361 ac_save_LIBS="$LIBS"
9362 LIBS="$LIBS $LIBEXPAT"
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9364/* end confdefs.h. */
81ecdfbb
RW
9365#include "expat.h"
9366int
9367main ()
9368{
9369XML_Parser p = XML_ParserCreate (0);
9370 ;
9371 return 0;
9372}
bec39cab 9373_ACEOF
81ecdfbb
RW
9374if ac_fn_c_try_link "$LINENO"; then :
9375 ac_cv_libexpat=yes
c906108c 9376else
81ecdfbb 9377 ac_cv_libexpat=no
bec39cab 9378fi
81ecdfbb
RW
9379rm -f core conftest.err conftest.$ac_objext \
9380 conftest$ac_exeext conftest.$ac_ext
9381 LIBS="$ac_save_LIBS"
c906108c 9382
95ca63c4 9383fi
81ecdfbb
RW
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9385$as_echo "$ac_cv_libexpat" >&6; }
9386 if test "$ac_cv_libexpat" = yes; then
9387 HAVE_LIBEXPAT=yes
bec39cab 9388
81ecdfbb 9389$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9390
81ecdfbb
RW
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9392$as_echo_n "checking how to link with libexpat... " >&6; }
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9394$as_echo "$LIBEXPAT" >&6; }
9395 else
9396 HAVE_LIBEXPAT=no
9397 CPPFLAGS="$ac_save_CPPFLAGS"
9398 LIBEXPAT=
9399 LTLIBEXPAT=
9400 fi
95ca63c4
CF
9401
9402
9403
7cb9022a
MK
9404
9405
bec39cab 9406
81ecdfbb
RW
9407 if test "$HAVE_LIBEXPAT" != yes; then
9408 if test "$with_expat" = yes; then
9409 as_fn_error "expat is missing or unusable" "$LINENO" 5
9410 else
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9412$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9413 fi
9414 else
9415 save_LIBS=$LIBS
9416 LIBS="$LIBS $LIBEXPAT"
9417 for ac_func in XML_StopParser
9418do :
9419 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9420if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9421 cat >>confdefs.h <<_ACEOF
81ecdfbb 9422#define HAVE_XML_STOPPARSER 1
bec39cab 9423_ACEOF
95ca63c4 9424
bec39cab 9425fi
bec39cab 9426done
95ca63c4 9427
81ecdfbb
RW
9428 LIBS=$save_LIBS
9429 fi
a9322a30
TT
9430fi
9431
a9322a30 9432
a9322a30
TT
9433
9434
81ecdfbb
RW
9435# Check whether --with-python was given.
9436if test "${with_python+set}" = set; then :
9437 withval=$with_python;
bec39cab 9438else
81ecdfbb 9439 with_python=auto
bec39cab 9440fi
bec39cab 9441
81ecdfbb
RW
9442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9443$as_echo_n "checking whether to use python... " >&6; }
9444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9445$as_echo "$with_python" >&6; }
9a156167 9446
81ecdfbb
RW
9447if test "${with_python}" = no; then
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9449$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9450 have_libpython=no
bec39cab 9451else
81ecdfbb
RW
9452 case "${with_python}" in
9453 yes | auto)
9454 # Leave as empty, use defaults.
9455 python_includes=
9456 python_libs=
9457 ;;
9458 /*)
9459 python_includes="-I${with_python}/include"
9460 python_libs="-L${with_python}/lib"
9461 ;;
9462 *)
9463 as_fn_error "invalid value for --with-python" "$LINENO" 5
9464 ;;
9465 esac
9466
9467 save_CPPFLAGS=$CPPFLAGS
9468 CPPFLAGS="$CPPFLAGS ${python_includes}"
9469 save_LIBS=$LIBS
9470 LIBS="$LIBS ${python_libs}"
9471 have_libpython=no
9472 if test "${have_libpython}" = no; then
bec39cab 9473
81ecdfbb 9474 version=python2.6
bec39cab 9475
81ecdfbb
RW
9476
9477 HAVE_LIBPYTHON2_6=no
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9479$as_echo_n "checking for ${version}... " >&6; }
9480 save_LIBS=$LIBS
9481 LIBS="$LIBS -l${version}"
9482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9483/* end confdefs.h. */
81ecdfbb
RW
9484#include "${version}/Python.h"
9485int
9486main ()
9487{
9488Py_Initialize ();
9489 ;
9490 return 0;
9491}
bec39cab 9492_ACEOF
81ecdfbb
RW
9493if ac_fn_c_try_link "$LINENO"; then :
9494 HAVE_LIBPYTHON2_6=yes
9495 have_libpython=yes
bec39cab 9496else
81ecdfbb 9497 LIBS=$save_LIBS
9a156167 9498fi
81ecdfbb
RW
9499rm -f core conftest.err conftest.$ac_objext \
9500 conftest$ac_exeext conftest.$ac_ext
9501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_6" >&5
9502$as_echo "$HAVE_LIBPYTHON2_6" >&6; }
9a156167 9503
81ecdfbb 9504 if test "${HAVE_LIBPYTHON2_6}" = yes; then
9a156167 9505
81ecdfbb 9506$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9a156167 9507
81ecdfbb
RW
9508 fi
9509 fi
9510 if test ${have_libpython} = no; then
9a156167 9511
81ecdfbb 9512 version=python2.5
9a156167 9513
9a156167 9514
81ecdfbb
RW
9515 HAVE_LIBPYTHON2_5=no
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9517$as_echo_n "checking for ${version}... " >&6; }
9518 save_LIBS=$LIBS
9519 LIBS="$LIBS -l${version}"
9520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9521/* end confdefs.h. */
81ecdfbb
RW
9522#include "${version}/Python.h"
9523int
9524main ()
9525{
9526Py_Initialize ();
9527 ;
9528 return 0;
9529}
436868fb 9530_ACEOF
81ecdfbb
RW
9531if ac_fn_c_try_link "$LINENO"; then :
9532 HAVE_LIBPYTHON2_5=yes
9533 have_libpython=yes
436868fb 9534else
81ecdfbb 9535 LIBS=$save_LIBS
436868fb 9536fi
81ecdfbb
RW
9537rm -f core conftest.err conftest.$ac_objext \
9538 conftest$ac_exeext conftest.$ac_ext
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_5" >&5
9540$as_echo "$HAVE_LIBPYTHON2_5" >&6; }
436868fb 9541
81ecdfbb 9542 if test "${HAVE_LIBPYTHON2_5}" = yes; then
a9322a30 9543
81ecdfbb 9544$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
a9322a30 9545
81ecdfbb
RW
9546 fi
9547 fi
9548 if test ${have_libpython} = no; then
a9322a30 9549
81ecdfbb 9550 version=python2.4
a9322a30 9551
81ecdfbb
RW
9552
9553 HAVE_LIBPYTHON2_4=no
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9555$as_echo_n "checking for ${version}... " >&6; }
9556 save_LIBS=$LIBS
9557 LIBS="$LIBS -l${version}"
9558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9559/* end confdefs.h. */
81ecdfbb 9560#include "${version}/Python.h"
a9322a30
TT
9561int
9562main ()
9563{
81ecdfbb 9564Py_Initialize ();
a9322a30
TT
9565 ;
9566 return 0;
9567}
436868fb 9568_ACEOF
81ecdfbb
RW
9569if ac_fn_c_try_link "$LINENO"; then :
9570 HAVE_LIBPYTHON2_4=yes
9571 have_libpython=yes
436868fb 9572else
81ecdfbb 9573 LIBS=$save_LIBS
436868fb 9574fi
81ecdfbb
RW
9575rm -f core conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext conftest.$ac_ext
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_4" >&5
9578$as_echo "$HAVE_LIBPYTHON2_4" >&6; }
9579
9580 if test "${HAVE_LIBPYTHON2_4}" = yes; then
9581
9582$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9583
9584 fi
9585 fi
9586 if test ${have_libpython} = no; then
9587 case "${with_python}" in
9588 yes)
9589 as_fn_error "python is missing or unusable" "$LINENO" 5
9590 ;;
9591 auto)
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9593$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9594 ;;
9595 *)
9596 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9597 ;;
9598 esac
9599 CPPFLAGS=$save_CPPFLAGS
9600 LIBS=$save_LIBS
9601 fi
436868fb 9602fi
436868fb 9603
81ecdfbb 9604if test "${have_libpython}" = yes; then
436868fb 9605
81ecdfbb 9606$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9607
81ecdfbb
RW
9608 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9609 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9610 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
9611 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9612
81ecdfbb
RW
9613 # Flags needed to compile Python code (taken from python-config --cflags).
9614 # We cannot call python-config directly because it will output whatever was
9615 # used when compiling the Python interpreter itself, including flags which
9616 # would make the python-related objects be compiled differently from the
9617 # rest of GDB (e.g., -O2 and -fPIC).
9618 if test "${GCC}" = yes; then
9619 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9620 fi
436868fb 9621
81ecdfbb
RW
9622 if test "x${tentative_python_cflags}" != x; then
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9624$as_echo_n "checking compiler flags for python code... " >&6; }
9625 for flag in ${tentative_python_cflags}; do
9626 # Check that the compiler accepts it
9627 saved_CFLAGS="$CFLAGS"
9628 CFLAGS="$CFLAGS $flag"
9629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9630/* end confdefs.h. */
81ecdfbb 9631
a9322a30
TT
9632int
9633main ()
9634{
a9322a30
TT
9635
9636 ;
9637 return 0;
9638}
bec39cab 9639_ACEOF
81ecdfbb
RW
9640if ac_fn_c_try_compile "$LINENO"; then :
9641 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9642fi
81ecdfbb
RW
9643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9644 CFLAGS="$saved_CFLAGS"
9645 done
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9647$as_echo "${PYTHON_CFLAGS}" >&6; }
9648 fi
9649else
9650 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
9651 # included.
9652 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
9653 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
9654 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 9655fi
9a156167 9656
9a156167 9657
81ecdfbb
RW
9658# ------------------------- #
9659# Checks for header files. #
9660# ------------------------- #
c890192f 9661
81ecdfbb
RW
9662ac_header_dirent=no
9663for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9664 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9666$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9667if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
9668 $as_echo_n "(cached) " >&6
bec39cab 9669else
81ecdfbb 9670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9671/* end confdefs.h. */
81ecdfbb
RW
9672#include <sys/types.h>
9673#include <$ac_hdr>
9674
a9322a30
TT
9675int
9676main ()
9677{
81ecdfbb
RW
9678if ((DIR *) 0)
9679return 0;
a9322a30
TT
9680 ;
9681 return 0;
9682}
bec39cab 9683_ACEOF
81ecdfbb
RW
9684if ac_fn_c_try_compile "$LINENO"; then :
9685 eval "$as_ac_Header=yes"
bec39cab 9686else
81ecdfbb 9687 eval "$as_ac_Header=no"
bec39cab 9688fi
81ecdfbb 9689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9690fi
81ecdfbb
RW
9691eval ac_res=\$$as_ac_Header
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9693$as_echo "$ac_res" >&6; }
9694eval as_val=\$$as_ac_Header
9695 if test "x$as_val" = x""yes; then :
9696 cat >>confdefs.h <<_ACEOF
9697#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 9698_ACEOF
bec39cab 9699
81ecdfbb
RW
9700ac_header_dirent=$ac_hdr; break
9701fi
bec39cab 9702
81ecdfbb
RW
9703done
9704# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9705if test $ac_header_dirent = dirent.h; then
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9707$as_echo_n "checking for library containing opendir... " >&6; }
9708if test "${ac_cv_search_opendir+set}" = set; then :
9709 $as_echo_n "(cached) " >&6
c890192f 9710else
81ecdfbb
RW
9711 ac_func_search_save_LIBS=$LIBS
9712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713/* end confdefs.h. */
9714
9715/* Override any GCC internal prototype to avoid an error.
9716 Use char because int might match the return type of a GCC
9717 builtin and then its argument prototype would still apply. */
9718#ifdef __cplusplus
9719extern "C"
9720#endif
9721char opendir ();
9722int
9723main ()
9724{
9725return opendir ();
9726 ;
9727 return 0;
9728}
bec39cab 9729_ACEOF
81ecdfbb
RW
9730for ac_lib in '' dir; do
9731 if test -z "$ac_lib"; then
9732 ac_res="none required"
9733 else
9734 ac_res=-l$ac_lib
9735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9736 fi
9737 if ac_fn_c_try_link "$LINENO"; then :
9738 ac_cv_search_opendir=$ac_res
9739fi
9740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext
9742 if test "${ac_cv_search_opendir+set}" = set; then :
9743 break
9744fi
9745done
9746if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 9747
81ecdfbb
RW
9748else
9749 ac_cv_search_opendir=no
9750fi
9751rm conftest.$ac_ext
9752LIBS=$ac_func_search_save_LIBS
9753fi
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9755$as_echo "$ac_cv_search_opendir" >&6; }
9756ac_res=$ac_cv_search_opendir
9757if test "$ac_res" != no; then :
9758 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9759
bec39cab 9760fi
81ecdfbb 9761
bec39cab 9762else
81ecdfbb
RW
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9764$as_echo_n "checking for library containing opendir... " >&6; }
9765if test "${ac_cv_search_opendir+set}" = set; then :
9766 $as_echo_n "(cached) " >&6
9767else
9768 ac_func_search_save_LIBS=$LIBS
9769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9770/* end confdefs.h. */
81ecdfbb
RW
9771
9772/* Override any GCC internal prototype to avoid an error.
9773 Use char because int might match the return type of a GCC
9774 builtin and then its argument prototype would still apply. */
9775#ifdef __cplusplus
9776extern "C"
9777#endif
9778char opendir ();
a9322a30
TT
9779int
9780main ()
9781{
81ecdfbb 9782return opendir ();
a9322a30
TT
9783 ;
9784 return 0;
9785}
bec39cab 9786_ACEOF
81ecdfbb
RW
9787for ac_lib in '' x; do
9788 if test -z "$ac_lib"; then
9789 ac_res="none required"
9790 else
9791 ac_res=-l$ac_lib
9792 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9793 fi
9794 if ac_fn_c_try_link "$LINENO"; then :
9795 ac_cv_search_opendir=$ac_res
9796fi
9797rm -f core conftest.err conftest.$ac_objext \
9798 conftest$ac_exeext
9799 if test "${ac_cv_search_opendir+set}" = set; then :
9800 break
9801fi
9802done
9803if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 9804
81ecdfbb
RW
9805else
9806 ac_cv_search_opendir=no
bec39cab 9807fi
81ecdfbb
RW
9808rm conftest.$ac_ext
9809LIBS=$ac_func_search_save_LIBS
a9322a30 9810fi
81ecdfbb
RW
9811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9812$as_echo "$ac_cv_search_opendir" >&6; }
9813ac_res=$ac_cv_search_opendir
9814if test "$ac_res" != no; then :
9815 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 9816
81ecdfbb 9817fi
bec39cab 9818
81ecdfbb 9819fi
bec39cab 9820
81ecdfbb
RW
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9822$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
9823if test "${ac_cv_header_stat_broken+set}" = set; then :
9824 $as_echo_n "(cached) " >&6
9a156167 9825else
81ecdfbb
RW
9826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9827/* end confdefs.h. */
9828#include <sys/types.h>
9829#include <sys/stat.h>
9830
9831#if defined S_ISBLK && defined S_IFDIR
9832extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9833#endif
9834
9835#if defined S_ISBLK && defined S_IFCHR
9836extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9837#endif
9838
9839#if defined S_ISLNK && defined S_IFREG
9840extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9841#endif
9842
9843#if defined S_ISSOCK && defined S_IFREG
9844extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9845#endif
9846
bec39cab 9847_ACEOF
81ecdfbb
RW
9848if ac_fn_c_try_compile "$LINENO"; then :
9849 ac_cv_header_stat_broken=no
9850else
9851 ac_cv_header_stat_broken=yes
9852fi
9853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9854fi
9855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9856$as_echo "$ac_cv_header_stat_broken" >&6; }
9857if test $ac_cv_header_stat_broken = yes; then
9a156167 9858
81ecdfbb 9859$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 9860
bec39cab 9861fi
81ecdfbb
RW
9862
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9864$as_echo_n "checking for ANSI C header files... " >&6; }
9865if test "${ac_cv_header_stdc+set}" = set; then :
9866 $as_echo_n "(cached) " >&6
bec39cab 9867else
81ecdfbb 9868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9869/* end confdefs.h. */
81ecdfbb
RW
9870#include <stdlib.h>
9871#include <stdarg.h>
9872#include <string.h>
9873#include <float.h>
9874
a9322a30
TT
9875int
9876main ()
9877{
a9322a30
TT
9878
9879 ;
9880 return 0;
9881}
bec39cab 9882_ACEOF
81ecdfbb
RW
9883if ac_fn_c_try_compile "$LINENO"; then :
9884 ac_cv_header_stdc=yes
bec39cab 9885else
81ecdfbb 9886 ac_cv_header_stdc=no
a9322a30 9887fi
81ecdfbb 9888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9889
81ecdfbb
RW
9890if test $ac_cv_header_stdc = yes; then
9891 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893/* end confdefs.h. */
9894#include <string.h>
bec39cab 9895
81ecdfbb
RW
9896_ACEOF
9897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9898 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9899
bec39cab 9900else
81ecdfbb
RW
9901 ac_cv_header_stdc=no
9902fi
9903rm -f conftest*
9904
9905fi
9906
9907if test $ac_cv_header_stdc = yes; then
9908 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9910/* end confdefs.h. */
9911#include <stdlib.h>
9912
bec39cab 9913_ACEOF
81ecdfbb
RW
9914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9915 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9916
81ecdfbb
RW
9917else
9918 ac_cv_header_stdc=no
9919fi
9920rm -f conftest*
bec39cab 9921
bec39cab 9922fi
81ecdfbb
RW
9923
9924if test $ac_cv_header_stdc = yes; then
9925 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9926 if test "$cross_compiling" = yes; then :
9927 :
bec39cab 9928else
81ecdfbb 9929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9930/* end confdefs.h. */
81ecdfbb
RW
9931#include <ctype.h>
9932#include <stdlib.h>
9933#if ((' ' & 0x0FF) == 0x020)
9934# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9935# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9936#else
9937# define ISLOWER(c) \
9938 (('a' <= (c) && (c) <= 'i') \
9939 || ('j' <= (c) && (c) <= 'r') \
9940 || ('s' <= (c) && (c) <= 'z'))
9941# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9942#endif
9943
9944#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9945int
9946main ()
9947{
81ecdfbb
RW
9948 int i;
9949 for (i = 0; i < 256; i++)
9950 if (XOR (islower (i), ISLOWER (i))
9951 || toupper (i) != TOUPPER (i))
9952 return 2;
a9322a30
TT
9953 return 0;
9954}
bec39cab 9955_ACEOF
81ecdfbb
RW
9956if ac_fn_c_try_run "$LINENO"; then :
9957
bec39cab 9958else
81ecdfbb
RW
9959 ac_cv_header_stdc=no
9960fi
9961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9962 conftest.$ac_objext conftest.beam conftest.$ac_ext
9963fi
bec39cab 9964
bec39cab 9965fi
a9322a30 9966fi
81ecdfbb
RW
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9968$as_echo "$ac_cv_header_stdc" >&6; }
9969if test $ac_cv_header_stdc = yes; then
bec39cab 9970
81ecdfbb 9971$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9972
81ecdfbb 9973fi
bec39cab 9974
81ecdfbb
RW
9975# elf_hp.h is for HP/UX 64-bit shared library support.
9976# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
9977# unconditionally, so what's the point in checking these?
9978for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9979 thread_db.h gnu/libc-version.h signal.h stddef.h \
9980 stdlib.h string.h memory.h strings.h sys/fault.h \
9981 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9982 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9983 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9984 sys/types.h sys/wait.h wait.h termios.h termio.h \
9985 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
9986do :
9987 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9988ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9989eval as_val=\$$as_ac_Header
9990 if test "x$as_val" = x""yes; then :
bec39cab 9991 cat >>confdefs.h <<_ACEOF
81ecdfbb 9992#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9993_ACEOF
c906108c 9994
bec39cab 9995fi
81ecdfbb
RW
9996
9997done
9998
9999for ac_header in link.h
10000do :
10001 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
10002# include <sys/types.h>
10003#endif
10004#if HAVE_NLIST_H
10005# include <nlist.h>
a9322a30
TT
10006#endif
10007
81ecdfbb
RW
10008"
10009if test "x$ac_cv_header_link_h" = x""yes; then :
10010 cat >>confdefs.h <<_ACEOF
10011#define HAVE_LINK_H 1
bec39cab 10012_ACEOF
bec39cab 10013
a9322a30 10014fi
bec39cab 10015
81ecdfbb 10016done
c906108c 10017
81ecdfbb
RW
10018for ac_header in sys/proc.h
10019do :
10020 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10021# include <sys/param.h>
10022#endif
c906108c 10023
81ecdfbb
RW
10024"
10025if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10026 cat >>confdefs.h <<_ACEOF
81ecdfbb 10027#define HAVE_SYS_PROC_H 1
bec39cab 10028_ACEOF
5ee754fc 10029
bec39cab 10030fi
81ecdfbb
RW
10031
10032done
10033
10034for ac_header in sys/user.h
10035do :
10036 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10037# include <sys/param.h>
a9322a30
TT
10038#endif
10039
81ecdfbb
RW
10040"
10041if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10042 cat >>confdefs.h <<_ACEOF
10043#define HAVE_SYS_USER_H 1
bec39cab 10044_ACEOF
bec39cab 10045
a9322a30 10046fi
bec39cab 10047
81ecdfbb 10048done
5ee754fc 10049
5ee754fc 10050
81ecdfbb
RW
10051# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10052# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10053# think that we don't have <curses.h> if we're using GCC.
10054case $host_os in
10055 solaris2.[789])
10056 if test "$GCC" = yes; then
10057
10058$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10059
10060 fi ;;
10061esac
10062for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10063do :
10064 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10065ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10066eval as_val=\$$as_ac_Header
10067 if test "x$as_val" = x""yes; then :
bec39cab 10068 cat >>confdefs.h <<_ACEOF
81ecdfbb 10069#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10070_ACEOF
5ee754fc
MK
10071
10072fi
10073
81ecdfbb 10074done
bec39cab 10075
81ecdfbb
RW
10076for ac_header in term.h
10077do :
10078 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10079# include <curses.h>
10080#endif
bec39cab 10081
81ecdfbb
RW
10082"
10083if test "x$ac_cv_header_term_h" = x""yes; then :
10084 cat >>confdefs.h <<_ACEOF
10085#define HAVE_TERM_H 1
a8111142 10086_ACEOF
a8111142 10087
a8111142 10088fi
a8111142 10089
81ecdfbb 10090done
a8111142
TT
10091
10092
81ecdfbb
RW
10093# ------------------------- #
10094# Checks for declarations. #
10095# ------------------------- #
a9322a30 10096
81ecdfbb
RW
10097ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10098if test "x$ac_cv_have_decl_free" = x""yes; then :
10099 ac_have_decl=1
bec39cab 10100else
81ecdfbb
RW
10101 ac_have_decl=0
10102fi
10103
10104cat >>confdefs.h <<_ACEOF
10105#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10106_ACEOF
81ecdfbb
RW
10107ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10108if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10109 ac_have_decl=1
10110else
10111 ac_have_decl=0
10112fi
10113
10114cat >>confdefs.h <<_ACEOF
10115#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10116_ACEOF
81ecdfbb
RW
10117ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10118if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10119 ac_have_decl=1
bec39cab 10120else
81ecdfbb
RW
10121 ac_have_decl=0
10122fi
bec39cab 10123
81ecdfbb
RW
10124cat >>confdefs.h <<_ACEOF
10125#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10126_ACEOF
81ecdfbb
RW
10127ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10128if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10129 ac_have_decl=1
10130else
10131 ac_have_decl=0
10132fi
10133
10134cat >>confdefs.h <<_ACEOF
10135#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 10136_ACEOF
81ecdfbb
RW
10137ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10138if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10139 ac_have_decl=1
bec39cab 10140else
81ecdfbb
RW
10141 ac_have_decl=0
10142fi
5ee754fc 10143
81ecdfbb
RW
10144cat >>confdefs.h <<_ACEOF
10145#define HAVE_DECL_STRSTR $ac_have_decl
10146_ACEOF
10147ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
10148if test "x$ac_cv_have_decl_getopt" = x""yes; then :
10149 ac_have_decl=1
10150else
10151 ac_have_decl=0
5ee754fc 10152fi
81ecdfbb
RW
10153
10154cat >>confdefs.h <<_ACEOF
10155#define HAVE_DECL_GETOPT $ac_have_decl
10156_ACEOF
10157ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10158if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10159 ac_have_decl=1
10160else
10161 ac_have_decl=0
5ee754fc 10162fi
81ecdfbb
RW
10163
10164cat >>confdefs.h <<_ACEOF
10165#define HAVE_DECL_SNPRINTF $ac_have_decl
10166_ACEOF
10167ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10168if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10169 ac_have_decl=1
10170else
10171 ac_have_decl=0
5ee754fc
MK
10172fi
10173
a9322a30 10174cat >>confdefs.h <<_ACEOF
81ecdfbb 10175#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 10176_ACEOF
5ee754fc 10177
5ee754fc 10178
81ecdfbb
RW
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10180$as_echo_n "checking for LC_MESSAGES... " >&6; }
10181if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10182 $as_echo_n "(cached) " >&6
bec39cab 10183else
81ecdfbb 10184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10185/* end confdefs.h. */
81ecdfbb 10186#include <locale.h>
a9322a30
TT
10187int
10188main ()
10189{
81ecdfbb 10190return LC_MESSAGES
a9322a30
TT
10191 ;
10192 return 0;
10193}
bec39cab 10194_ACEOF
81ecdfbb
RW
10195if ac_fn_c_try_link "$LINENO"; then :
10196 am_cv_val_LC_MESSAGES=yes
bec39cab 10197else
81ecdfbb
RW
10198 am_cv_val_LC_MESSAGES=no
10199fi
10200rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
10202fi
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10204$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10205 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 10206
81ecdfbb
RW
10207$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
10208
10209 fi
10210
10211
10212# ----------------------- #
10213# Checks for structures. #
10214# ----------------------- #
10215
10216ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10217if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
10218
10219cat >>confdefs.h <<_ACEOF
10220#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 10221_ACEOF
7eb368b3 10222
81ecdfbb 10223
7eb368b3 10224fi
81ecdfbb
RW
10225ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10226if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 10227
a9322a30
TT
10228cat >>confdefs.h <<_ACEOF
10229#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
10230_ACEOF
10231
a9322a30 10232
7eb368b3
NR
10233fi
10234
7eb368b3 10235
a9322a30
TT
10236# ------------------ #
10237# Checks for types. #
10238# ------------------ #
7eb368b3 10239
81ecdfbb
RW
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10241$as_echo_n "checking return type of signal handlers... " >&6; }
10242if test "${ac_cv_type_signal+set}" = set; then :
10243 $as_echo_n "(cached) " >&6
bec39cab 10244else
81ecdfbb 10245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10246/* end confdefs.h. */
a9322a30
TT
10247#include <sys/types.h>
10248#include <signal.h>
7cb9022a 10249
a9322a30
TT
10250int
10251main ()
10252{
81ecdfbb 10253return *(signal (0, 0)) (0) == 1;
a9322a30
TT
10254 ;
10255 return 0;
10256}
bec39cab 10257_ACEOF
81ecdfbb
RW
10258if ac_fn_c_try_compile "$LINENO"; then :
10259 ac_cv_type_signal=int
bec39cab 10260else
81ecdfbb 10261 ac_cv_type_signal=void
bec39cab 10262fi
81ecdfbb 10263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10264fi
81ecdfbb
RW
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10266$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 10267
a9322a30
TT
10268cat >>confdefs.h <<_ACEOF
10269#define RETSIGTYPE $ac_cv_type_signal
10270_ACEOF
5ee754fc 10271
bec39cab 10272
81ecdfbb 10273ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
10274#include <sys/socket.h>
10275
81ecdfbb
RW
10276"
10277if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 10278
a9322a30
TT
10279cat >>confdefs.h <<_ACEOF
10280#define HAVE_SOCKLEN_T 1
10281_ACEOF
10282
10283
10284fi
10285
10286
10287# ------------------------------------- #
10288# Checks for compiler characteristics. #
10289# ------------------------------------- #
10290
81ecdfbb
RW
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10292$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10293if test "${ac_cv_c_const+set}" = set; then :
10294 $as_echo_n "(cached) " >&6
a9322a30 10295else
81ecdfbb 10296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10297/* end confdefs.h. */
a9322a30
TT
10298
10299int
10300main ()
10301{
10302/* FIXME: Include the comments suggested by Paul. */
10303#ifndef __cplusplus
10304 /* Ultrix mips cc rejects this. */
10305 typedef int charset[2];
81ecdfbb 10306 const charset cs;
a9322a30 10307 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
10308 char const *const *pcpcc;
10309 char **ppc;
a9322a30
TT
10310 /* NEC SVR4.0.2 mips cc rejects this. */
10311 struct point {int x, y;};
10312 static struct point const zero = {0,0};
10313 /* AIX XL C 1.02.0.0 rejects this.
10314 It does not let you subtract one const X* pointer from another in
10315 an arm of an if-expression whose if-part is not a constant
10316 expression */
10317 const char *g = "string";
81ecdfbb 10318 pcpcc = &g + (g ? g-g : 0);
a9322a30 10319 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
10320 ++pcpcc;
10321 ppc = (char**) pcpcc;
10322 pcpcc = (char const *const *) ppc;
a9322a30
TT
10323 { /* SCO 3.2v4 cc rejects this. */
10324 char *t;
10325 char const *s = 0 ? (char *) 0 : (char const *) 0;
10326
10327 *t++ = 0;
81ecdfbb 10328 if (s) return 0;
a9322a30
TT
10329 }
10330 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10331 int x[] = {25, 17};
10332 const int *foo = &x[0];
10333 ++foo;
10334 }
10335 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10336 typedef const int *iptr;
10337 iptr p = 0;
10338 ++p;
10339 }
10340 { /* AIX XL C 1.02.0.0 rejects this saying
10341 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10342 struct s { int j; const int *ap[3]; };
10343 struct s *b; b->j = 5;
10344 }
10345 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10346 const int foo = 10;
81ecdfbb 10347 if (!foo) return 0;
a9322a30 10348 }
81ecdfbb 10349 return !cs[0] && !zero.x;
a9322a30
TT
10350#endif
10351
10352 ;
10353 return 0;
10354}
bec39cab 10355_ACEOF
81ecdfbb 10356if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10357 ac_cv_c_const=yes
5ee754fc 10358else
81ecdfbb 10359 ac_cv_c_const=no
5ee754fc 10360fi
81ecdfbb 10361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10362fi
81ecdfbb
RW
10363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10364$as_echo "$ac_cv_c_const" >&6; }
a9322a30 10365if test $ac_cv_c_const = no; then
bec39cab 10366
81ecdfbb 10367$as_echo "#define const /**/" >>confdefs.h
bec39cab 10368
5ee754fc 10369fi
bec39cab 10370
81ecdfbb
RW
10371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10372$as_echo_n "checking for inline... " >&6; }
10373if test "${ac_cv_c_inline+set}" = set; then :
10374 $as_echo_n "(cached) " >&6
bec39cab 10375else
a9322a30
TT
10376 ac_cv_c_inline=no
10377for ac_kw in inline __inline__ __inline; do
81ecdfbb 10378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10379/* end confdefs.h. */
a9322a30
TT
10380#ifndef __cplusplus
10381typedef int foo_t;
10382static $ac_kw foo_t static_foo () {return 0; }
10383$ac_kw foo_t foo () {return 0; }
10384#endif
10385
bec39cab 10386_ACEOF
81ecdfbb
RW
10387if ac_fn_c_try_compile "$LINENO"; then :
10388 ac_cv_c_inline=$ac_kw
bec39cab 10389fi
81ecdfbb
RW
10390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10391 test "$ac_cv_c_inline" != no && break
a9322a30 10392done
bec39cab 10393
5ee754fc 10394fi
81ecdfbb
RW
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10396$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10397
a9322a30
TT
10398case $ac_cv_c_inline in
10399 inline | yes) ;;
10400 *)
10401 case $ac_cv_c_inline in
10402 no) ac_val=;;
10403 *) ac_val=$ac_cv_c_inline;;
10404 esac
10405 cat >>confdefs.h <<_ACEOF
10406#ifndef __cplusplus
10407#define inline $ac_val
10408#endif
10409_ACEOF
bec39cab
AC
10410 ;;
10411esac
bec39cab 10412
81ecdfbb
RW
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10414$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10415if test "${ac_cv_c_bigendian+set}" = set; then :
10416 $as_echo_n "(cached) " >&6
bec39cab 10417else
81ecdfbb
RW
10418 ac_cv_c_bigendian=unknown
10419 # See if we're dealing with a universal compiler.
10420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10421/* end confdefs.h. */
10422#ifndef __APPLE_CC__
10423 not a universal capable compiler
10424 #endif
10425 typedef int dummy;
10426
10427_ACEOF
10428if ac_fn_c_try_compile "$LINENO"; then :
10429
10430 # Check for potential -arch flags. It is not universal unless
10431 # there are at least two -arch flags with different values.
10432 ac_arch=
10433 ac_prev=
10434 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10435 if test -n "$ac_prev"; then
10436 case $ac_word in
10437 i?86 | x86_64 | ppc | ppc64)
10438 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10439 ac_arch=$ac_word
10440 else
10441 ac_cv_c_bigendian=universal
10442 break
10443 fi
10444 ;;
10445 esac
10446 ac_prev=
10447 elif test "x$ac_word" = "x-arch"; then
10448 ac_prev=arch
10449 fi
10450 done
10451fi
10452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10453 if test $ac_cv_c_bigendian = unknown; then
10454 # See if sys/param.h defines the BYTE_ORDER macro.
10455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10456/* end confdefs.h. */
a9322a30 10457#include <sys/types.h>
81ecdfbb 10458 #include <sys/param.h>
a9322a30
TT
10459
10460int
10461main ()
10462{
81ecdfbb
RW
10463#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10464 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10465 && LITTLE_ENDIAN)
10466 bogus endian macros
10467 #endif
a9322a30
TT
10468
10469 ;
10470 return 0;
10471}
bec39cab 10472_ACEOF
81ecdfbb 10473if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10474 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10476/* end confdefs.h. */
a9322a30 10477#include <sys/types.h>
81ecdfbb 10478 #include <sys/param.h>
a9322a30
TT
10479
10480int
10481main ()
10482{
10483#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10484 not big endian
10485 #endif
a9322a30
TT
10486
10487 ;
10488 return 0;
10489}
bec39cab 10490_ACEOF
81ecdfbb 10491if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10492 ac_cv_c_bigendian=yes
5ee754fc 10493else
81ecdfbb 10494 ac_cv_c_bigendian=no
5ee754fc 10495fi
81ecdfbb
RW
10496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10497fi
10498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10499 fi
10500 if test $ac_cv_c_bigendian = unknown; then
10501 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10503/* end confdefs.h. */
10504#include <limits.h>
bec39cab 10505
81ecdfbb
RW
10506int
10507main ()
10508{
10509#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10510 bogus endian macros
10511 #endif
10512
10513 ;
10514 return 0;
10515}
7eb368b3 10516_ACEOF
81ecdfbb
RW
10517if ac_fn_c_try_compile "$LINENO"; then :
10518 # It does; now see whether it defined to _BIG_ENDIAN or not.
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10520/* end confdefs.h. */
81ecdfbb
RW
10521#include <limits.h>
10522
7eb368b3
NR
10523int
10524main ()
10525{
81ecdfbb
RW
10526#ifndef _BIG_ENDIAN
10527 not big endian
10528 #endif
10529
7eb368b3
NR
10530 ;
10531 return 0;
10532}
10533_ACEOF
81ecdfbb 10534if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10535 ac_cv_c_bigendian=yes
81ecdfbb
RW
10536else
10537 ac_cv_c_bigendian=no
a9322a30 10538fi
81ecdfbb 10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10540fi
81ecdfbb
RW
10541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10542 fi
10543 if test $ac_cv_c_bigendian = unknown; then
10544 # Compile a test program.
10545 if test "$cross_compiling" = yes; then :
10546 # Try to guess by grepping values from an object file.
10547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10548/* end confdefs.h. */
10549short int ascii_mm[] =
10550 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10551 short int ascii_ii[] =
10552 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10553 int use_ascii (int i) {
10554 return ascii_mm[i] + ascii_ii[i];
10555 }
10556 short int ebcdic_ii[] =
10557 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10558 short int ebcdic_mm[] =
10559 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10560 int use_ebcdic (int i) {
10561 return ebcdic_mm[i] + ebcdic_ii[i];
10562 }
10563 extern int foo;
7eb368b3 10564
81ecdfbb
RW
10565int
10566main ()
10567{
10568return use_ascii (foo) == use_ebcdic (foo);
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573if ac_fn_c_try_compile "$LINENO"; then :
10574 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10575 ac_cv_c_bigendian=yes
10576 fi
10577 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10578 if test "$ac_cv_c_bigendian" = unknown; then
10579 ac_cv_c_bigendian=no
10580 else
10581 # finding both strings is unlikely to happen, but who knows?
10582 ac_cv_c_bigendian=unknown
10583 fi
10584 fi
7eb368b3 10585fi
81ecdfbb 10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10587else
81ecdfbb 10588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10589/* end confdefs.h. */
81ecdfbb 10590$ac_includes_default
d3ea6809
MM
10591int
10592main ()
10593{
81ecdfbb
RW
10594
10595 /* Are we little or big endian? From Harbison&Steele. */
10596 union
10597 {
10598 long int l;
10599 char c[sizeof (long int)];
10600 } u;
10601 u.l = 1;
10602 return u.c[sizeof (long int) - 1] == 1;
10603
10604 ;
10605 return 0;
d3ea6809
MM
10606}
10607_ACEOF
81ecdfbb 10608if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10609 ac_cv_c_bigendian=no
d3ea6809 10610else
81ecdfbb 10611 ac_cv_c_bigendian=yes
d3ea6809 10612fi
81ecdfbb
RW
10613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10614 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10615fi
a9322a30 10616
81ecdfbb
RW
10617 fi
10618fi
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10620$as_echo "$ac_cv_c_bigendian" >&6; }
10621 case $ac_cv_c_bigendian in #(
10622 yes)
10623 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10624;; #(
10625 no)
10626 ;; #(
10627 universal)
10628
10629$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10630
10631 ;; #(
10632 *)
10633 as_fn_error "unknown endianness
10634 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10635 esac
d3ea6809
MM
10636
10637
a9322a30
TT
10638# ------------------------------ #
10639# Checks for library functions. #
10640# ------------------------------ #
d3ea6809 10641
a9322a30
TT
10642# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10643# for constant arguments. Useless!
81ecdfbb
RW
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10645$as_echo_n "checking for working alloca.h... " >&6; }
10646if test "${ac_cv_working_alloca_h+set}" = set; then :
10647 $as_echo_n "(cached) " >&6
d3ea6809 10648else
81ecdfbb 10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 10650/* end confdefs.h. */
a9322a30 10651#include <alloca.h>
bec39cab
AC
10652int
10653main ()
10654{
a9322a30 10655char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 10656 if (p) return 0;
bec39cab
AC
10657 ;
10658 return 0;
10659}
10660_ACEOF
81ecdfbb 10661if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10662 ac_cv_working_alloca_h=yes
bec39cab 10663else
81ecdfbb 10664 ac_cv_working_alloca_h=no
bec39cab 10665fi
81ecdfbb
RW
10666rm -f core conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
bec39cab 10668fi
81ecdfbb
RW
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10670$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
10671if test $ac_cv_working_alloca_h = yes; then
10672
81ecdfbb 10673$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 10674
c906108c 10675fi
bec39cab 10676
81ecdfbb
RW
10677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10678$as_echo_n "checking for alloca... " >&6; }
10679if test "${ac_cv_func_alloca_works+set}" = set; then :
10680 $as_echo_n "(cached) " >&6
bec39cab 10681else
81ecdfbb 10682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10683/* end confdefs.h. */
a9322a30
TT
10684#ifdef __GNUC__
10685# define alloca __builtin_alloca
b4e70030 10686#else
a9322a30
TT
10687# ifdef _MSC_VER
10688# include <malloc.h>
10689# define alloca _alloca
10690# else
81ecdfbb 10691# ifdef HAVE_ALLOCA_H
a9322a30
TT
10692# include <alloca.h>
10693# else
10694# ifdef _AIX
10695 #pragma alloca
10696# else
10697# ifndef alloca /* predefined by HP cc +Olibcalls */
10698char *alloca ();
10699# endif
10700# endif
10701# endif
10702# endif
c906108c 10703#endif
97bf5e38 10704
bec39cab
AC
10705int
10706main ()
10707{
a9322a30 10708char *p = (char *) alloca (1);
81ecdfbb 10709 if (p) return 0;
bec39cab
AC
10710 ;
10711 return 0;
10712}
10713_ACEOF
81ecdfbb 10714if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10715 ac_cv_func_alloca_works=yes
bec39cab 10716else
81ecdfbb 10717 ac_cv_func_alloca_works=no
bec39cab 10718fi
81ecdfbb
RW
10719rm -f core conftest.err conftest.$ac_objext \
10720 conftest$ac_exeext conftest.$ac_ext
bec39cab 10721fi
81ecdfbb
RW
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10723$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
10724
10725if test $ac_cv_func_alloca_works = yes; then
10726
81ecdfbb 10727$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 10728
a9322a30
TT
10729else
10730 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10731# that cause trouble. Some versions do not even contain alloca or
10732# contain a buggy version. If you still want to use their alloca,
10733# use ar to extract alloca.o from them instead of compiling alloca.c.
10734
81ecdfbb 10735ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 10736
81ecdfbb 10737$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 10738
bec39cab 10739
81ecdfbb
RW
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10741$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10742if test "${ac_cv_os_cray+set}" = set; then :
10743 $as_echo_n "(cached) " >&6
a9322a30 10744else
81ecdfbb 10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 10746/* end confdefs.h. */
81ecdfbb 10747#if defined CRAY && ! defined CRAY2
a9322a30
TT
10748webecray
10749#else
10750wenotbecray
10751#endif
10752
10753_ACEOF
10754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10755 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10756 ac_cv_os_cray=yes
10757else
81ecdfbb 10758 ac_cv_os_cray=no
bec39cab 10759fi
81ecdfbb
RW
10760rm -f conftest*
10761
bec39cab 10762fi
81ecdfbb
RW
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10764$as_echo "$ac_cv_os_cray" >&6; }
10765if test $ac_cv_os_cray = yes; then
10766 for ac_func in _getb67 GETB67 getb67; do
10767 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10768ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10769eval as_val=\$$as_ac_var
10770 if test "x$as_val" = x""yes; then :
a9322a30
TT
10771
10772cat >>confdefs.h <<_ACEOF
10773#define CRAY_STACKSEG_END $ac_func
bec39cab 10774_ACEOF
c906108c 10775
a9322a30 10776 break
c906108c
SS
10777fi
10778
a9322a30
TT
10779 done
10780fi
bec39cab 10781
81ecdfbb
RW
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10783$as_echo_n "checking stack direction for C alloca... " >&6; }
10784if test "${ac_cv_c_stack_direction+set}" = set; then :
10785 $as_echo_n "(cached) " >&6
a9322a30 10786else
81ecdfbb 10787 if test "$cross_compiling" = yes; then :
a9322a30 10788 ac_cv_c_stack_direction=0
bec39cab 10789else
81ecdfbb 10790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10791/* end confdefs.h. */
81ecdfbb 10792$ac_includes_default
a9322a30
TT
10793int
10794find_stack_direction ()
b4e70030 10795{
a9322a30
TT
10796 static char *addr = 0;
10797 auto char dummy;
10798 if (addr == 0)
10799 {
10800 addr = &dummy;
10801 return find_stack_direction ();
10802 }
10803 else
10804 return (&dummy > addr) ? 1 : -1;
b4e70030 10805}
b757528f 10806
bec39cab
AC
10807int
10808main ()
10809{
81ecdfbb 10810 return find_stack_direction () < 0;
bec39cab
AC
10811}
10812_ACEOF
81ecdfbb 10813if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10814 ac_cv_c_stack_direction=1
10815else
81ecdfbb 10816 ac_cv_c_stack_direction=-1
a9322a30 10817fi
81ecdfbb
RW
10818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10819 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10820fi
a9322a30 10821
81ecdfbb
RW
10822fi
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10824$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10825cat >>confdefs.h <<_ACEOF
10826#define STACK_DIRECTION $ac_cv_c_stack_direction
10827_ACEOF
10828
10829
10830fi
10831
a9322a30 10832for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10833do :
10834 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10835ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10836eval as_val=\$$as_ac_Header
10837 if test "x$as_val" = x""yes; then :
bec39cab 10838 cat >>confdefs.h <<_ACEOF
81ecdfbb 10839#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10840_ACEOF
b757528f 10841
b757528f 10842fi
bec39cab 10843
a9322a30 10844done
a3828db0 10845
a9322a30 10846for ac_func in getpagesize
81ecdfbb
RW
10847do :
10848 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10849if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10850 cat >>confdefs.h <<_ACEOF
81ecdfbb 10851#define HAVE_GETPAGESIZE 1
bec39cab 10852_ACEOF
bcb3dc3d 10853
bcb3dc3d
MK
10854fi
10855done
10856
81ecdfbb
RW
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10858$as_echo_n "checking for working mmap... " >&6; }
10859if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10860 $as_echo_n "(cached) " >&6
a9322a30 10861else
81ecdfbb 10862 if test "$cross_compiling" = yes; then :
a9322a30 10863 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10864else
81ecdfbb 10865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10866/* end confdefs.h. */
a9322a30
TT
10867$ac_includes_default
10868/* malloc might have been renamed as rpl_malloc. */
10869#undef malloc
bec39cab 10870
a9322a30
TT
10871/* Thanks to Mike Haertel and Jim Avera for this test.
10872 Here is a matrix of mmap possibilities:
10873 mmap private not fixed
10874 mmap private fixed at somewhere currently unmapped
10875 mmap private fixed at somewhere already mapped
10876 mmap shared not fixed
10877 mmap shared fixed at somewhere currently unmapped
10878 mmap shared fixed at somewhere already mapped
10879 For private mappings, we should verify that changes cannot be read()
10880 back from the file, nor mmap's back from the file at a different
10881 address. (There have been systems where private was not correctly
10882 implemented like the infamous i386 svr4.0, and systems where the
10883 VM page cache was not coherent with the file system buffer cache
10884 like early versions of FreeBSD and possibly contemporary NetBSD.)
10885 For shared mappings, we should conversely verify that changes get
10886 propagated back to all the places they're supposed to be.
bec39cab 10887
a9322a30
TT
10888 Grep wants private fixed already mapped.
10889 The main things grep needs to know about mmap are:
10890 * does it exist and is it safe to write into the mmap'd area
10891 * how to use it (BSD variants) */
8b9cf735 10892
a9322a30
TT
10893#include <fcntl.h>
10894#include <sys/mman.h>
8b9cf735 10895
81ecdfbb 10896#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10897char *malloc ();
a3828db0
MK
10898#endif
10899
a9322a30 10900/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10901#ifndef HAVE_GETPAGESIZE
a9322a30 10902/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10903# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10904# define HAVE_SYS_PARAM_H 1
10905# endif
10906
10907# ifdef _SC_PAGESIZE
10908# define getpagesize() sysconf(_SC_PAGESIZE)
10909# else /* no _SC_PAGESIZE */
81ecdfbb 10910# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10911# include <sys/param.h>
10912# ifdef EXEC_PAGESIZE
10913# define getpagesize() EXEC_PAGESIZE
10914# else /* no EXEC_PAGESIZE */
10915# ifdef NBPG
10916# define getpagesize() NBPG * CLSIZE
10917# ifndef CLSIZE
10918# define CLSIZE 1
10919# endif /* no CLSIZE */
10920# else /* no NBPG */
10921# ifdef NBPC
10922# define getpagesize() NBPC
10923# else /* no NBPC */
10924# ifdef PAGESIZE
10925# define getpagesize() PAGESIZE
10926# endif /* PAGESIZE */
10927# endif /* no NBPC */
10928# endif /* no NBPG */
10929# endif /* no EXEC_PAGESIZE */
10930# else /* no HAVE_SYS_PARAM_H */
10931# define getpagesize() 8192 /* punt totally */
10932# endif /* no HAVE_SYS_PARAM_H */
10933# endif /* no _SC_PAGESIZE */
10934
10935#endif /* no HAVE_GETPAGESIZE */
10936
bec39cab
AC
10937int
10938main ()
10939{
a9322a30
TT
10940 char *data, *data2, *data3;
10941 int i, pagesize;
10942 int fd;
10943
10944 pagesize = getpagesize ();
10945
10946 /* First, make a file with some known garbage in it. */
10947 data = (char *) malloc (pagesize);
10948 if (!data)
81ecdfbb 10949 return 1;
a9322a30
TT
10950 for (i = 0; i < pagesize; ++i)
10951 *(data + i) = rand ();
10952 umask (0);
10953 fd = creat ("conftest.mmap", 0600);
10954 if (fd < 0)
81ecdfbb 10955 return 1;
a9322a30 10956 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10957 return 1;
a9322a30
TT
10958 close (fd);
10959
10960 /* Next, try to mmap the file at a fixed address which already has
10961 something else allocated at it. If we can, also make sure that
10962 we see the same garbage. */
10963 fd = open ("conftest.mmap", O_RDWR);
10964 if (fd < 0)
81ecdfbb 10965 return 1;
a9322a30
TT
10966 data2 = (char *) malloc (2 * pagesize);
10967 if (!data2)
81ecdfbb
RW
10968 return 1;
10969 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10970 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10971 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10972 return 1;
a9322a30
TT
10973 for (i = 0; i < pagesize; ++i)
10974 if (*(data + i) != *(data2 + i))
81ecdfbb 10975 return 1;
a9322a30
TT
10976
10977 /* Finally, make sure that changes to the mapped area do not
10978 percolate back to the file as seen by read(). (This is a bug on
10979 some variants of i386 svr4.0.) */
10980 for (i = 0; i < pagesize; ++i)
10981 *(data2 + i) = *(data2 + i) + 1;
10982 data3 = (char *) malloc (pagesize);
10983 if (!data3)
81ecdfbb 10984 return 1;
a9322a30 10985 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10986 return 1;
a9322a30
TT
10987 for (i = 0; i < pagesize; ++i)
10988 if (*(data + i) != *(data3 + i))
81ecdfbb 10989 return 1;
a9322a30 10990 close (fd);
81ecdfbb 10991 return 0;
bec39cab
AC
10992}
10993_ACEOF
81ecdfbb 10994if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10995 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10996else
81ecdfbb 10997 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10998fi
81ecdfbb
RW
10999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11000 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11001fi
81ecdfbb 11002
a9322a30 11003fi
81ecdfbb
RW
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11005$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11006if test $ac_cv_func_mmap_fixed_mapped = yes; then
11007
81ecdfbb 11008$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11009
086ec9eb 11010fi
a9322a30 11011rm -f conftest.mmap
a3828db0 11012
81ecdfbb
RW
11013ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11014if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11015
a9322a30
TT
11016else
11017
11018cat >>confdefs.h <<_ACEOF
11019#define pid_t int
bec39cab 11020_ACEOF
086ec9eb
MK
11021
11022fi
11023
81ecdfbb
RW
11024for ac_header in vfork.h
11025do :
11026 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11027if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11028 cat >>confdefs.h <<_ACEOF
81ecdfbb 11029#define HAVE_VFORK_H 1
bec39cab 11030_ACEOF
c906108c
SS
11031
11032fi
a9322a30 11033
a3828db0 11034done
c906108c 11035
a9322a30 11036for ac_func in fork vfork
81ecdfbb
RW
11037do :
11038 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11039ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11040eval as_val=\$$as_ac_var
11041 if test "x$as_val" = x""yes; then :
a3828db0 11042 cat >>confdefs.h <<_ACEOF
81ecdfbb 11043#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11044_ACEOF
b83266a0 11045
97bf5e38 11046fi
a3828db0 11047done
b83266a0 11048
a9322a30 11049if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11051$as_echo_n "checking for working fork... " >&6; }
11052if test "${ac_cv_func_fork_works+set}" = set; then :
11053 $as_echo_n "(cached) " >&6
a9322a30 11054else
81ecdfbb 11055 if test "$cross_compiling" = yes; then :
a9322a30
TT
11056 ac_cv_func_fork_works=cross
11057else
81ecdfbb
RW
11058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11059/* end confdefs.h. */
11060$ac_includes_default
11061int
11062main ()
11063{
11064
11065 /* By Ruediger Kuhlmann. */
11066 return fork () < 0;
11067
11068 ;
11069 return 0;
11070}
a9322a30 11071_ACEOF
81ecdfbb 11072if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11073 ac_cv_func_fork_works=yes
11074else
81ecdfbb 11075 ac_cv_func_fork_works=no
a9322a30 11076fi
81ecdfbb
RW
11077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11078 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11079fi
81ecdfbb 11080
a9322a30 11081fi
81ecdfbb
RW
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11083$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11084
11085else
11086 ac_cv_func_fork_works=$ac_cv_func_fork
11087fi
11088if test "x$ac_cv_func_fork_works" = xcross; then
11089 case $host in
11090 *-*-amigaos* | *-*-msdosdjgpp*)
11091 # Override, as these systems have only a dummy fork() stub
11092 ac_cv_func_fork_works=no
11093 ;;
11094 *)
11095 ac_cv_func_fork_works=yes
11096 ;;
11097 esac
81ecdfbb
RW
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11099$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11100fi
11101ac_cv_func_vfork_works=$ac_cv_func_vfork
11102if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11104$as_echo_n "checking for working vfork... " >&6; }
11105if test "${ac_cv_func_vfork_works+set}" = set; then :
11106 $as_echo_n "(cached) " >&6
a9322a30 11107else
81ecdfbb 11108 if test "$cross_compiling" = yes; then :
a9322a30
TT
11109 ac_cv_func_vfork_works=cross
11110else
81ecdfbb 11111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11112/* end confdefs.h. */
11113/* Thanks to Paul Eggert for this test. */
81ecdfbb 11114$ac_includes_default
a9322a30 11115#include <sys/wait.h>
81ecdfbb 11116#ifdef HAVE_VFORK_H
a9322a30
TT
11117# include <vfork.h>
11118#endif
11119/* On some sparc systems, changes by the child to local and incoming
11120 argument registers are propagated back to the parent. The compiler
11121 is told about this with #include <vfork.h>, but some compilers
11122 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11123 static variable whose address is put into a register that is
11124 clobbered by the vfork. */
11125static void
11126#ifdef __cplusplus
11127sparc_address_test (int arg)
11128# else
11129sparc_address_test (arg) int arg;
11130#endif
11131{
11132 static pid_t child;
11133 if (!child) {
11134 child = vfork ();
11135 if (child < 0) {
11136 perror ("vfork");
11137 _exit(2);
11138 }
11139 if (!child) {
11140 arg = getpid();
11141 write(-1, "", 0);
11142 _exit (arg);
11143 }
11144 }
11145}
11146
11147int
11148main ()
11149{
11150 pid_t parent = getpid ();
11151 pid_t child;
11152
11153 sparc_address_test (0);
11154
11155 child = vfork ();
11156
11157 if (child == 0) {
11158 /* Here is another test for sparc vfork register problems. This
11159 test uses lots of local variables, at least as many local
11160 variables as main has allocated so far including compiler
11161 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11162 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11163 reuse the register of parent for one of the local variables,
11164 since it will think that parent can't possibly be used any more
11165 in this routine. Assigning to the local variable will thus
11166 munge parent in the parent process. */
11167 pid_t
11168 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11169 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11170 /* Convince the compiler that p..p7 are live; otherwise, it might
11171 use the same hardware register for all 8 local variables. */
11172 if (p != p1 || p != p2 || p != p3 || p != p4
11173 || p != p5 || p != p6 || p != p7)
11174 _exit(1);
11175
11176 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11177 from child file descriptors. If the child closes a descriptor
11178 before it execs or exits, this munges the parent's descriptor
11179 as well. Test for this by closing stdout in the child. */
11180 _exit(close(fileno(stdout)) != 0);
11181 } else {
11182 int status;
11183 struct stat st;
11184
11185 while (wait(&status) != child)
11186 ;
81ecdfbb 11187 return (
a9322a30
TT
11188 /* Was there some problem with vforking? */
11189 child < 0
11190
11191 /* Did the child fail? (This shouldn't happen.) */
11192 || status
11193
11194 /* Did the vfork/compiler bug occur? */
11195 || parent != getpid()
11196
11197 /* Did the file descriptor bug occur? */
11198 || fstat(fileno(stdout), &st) != 0
11199 );
11200 }
11201}
11202_ACEOF
81ecdfbb 11203if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11204 ac_cv_func_vfork_works=yes
11205else
81ecdfbb 11206 ac_cv_func_vfork_works=no
a9322a30 11207fi
81ecdfbb
RW
11208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11209 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11210fi
81ecdfbb 11211
a9322a30 11212fi
81ecdfbb
RW
11213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11214$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11215
11216fi;
11217if test "x$ac_cv_func_fork_works" = xcross; then
11218 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11220$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11221fi
11222
11223if test "x$ac_cv_func_vfork_works" = xyes; then
11224
81ecdfbb 11225$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11226
11227else
11228
81ecdfbb 11229$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11230
11231fi
11232if test "x$ac_cv_func_fork_works" = xyes; then
11233
81ecdfbb 11234$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11235
11236fi
11237
a9322a30 11238for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 11239 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 11240 sigaction sigprocmask sigsetmask socketpair syscall \
7991dee7 11241 ttrace wborder setlocale iconvlist libiconvlist btowc \
be391dca 11242 setrlimit getrlimit posix_madvise
81ecdfbb
RW
11243do :
11244 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11245ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11246eval as_val=\$$as_ac_var
11247 if test "x$as_val" = x""yes; then :
6c7a06a3 11248 cat >>confdefs.h <<_ACEOF
81ecdfbb 11249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11250_ACEOF
11251
11252fi
11253done
11254
11255
81ecdfbb
RW
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11257$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11258if test "${am_cv_langinfo_codeset+set}" = set; then :
11259 $as_echo_n "(cached) " >&6
6c7a06a3 11260else
81ecdfbb 11261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11262/* end confdefs.h. */
11263#include <langinfo.h>
11264int
11265main ()
11266{
11267char* cs = nl_langinfo(CODESET);
bec39cab
AC
11268 ;
11269 return 0;
11270}
11271_ACEOF
81ecdfbb 11272if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11273 am_cv_langinfo_codeset=yes
a4db0f07 11274else
81ecdfbb 11275 am_cv_langinfo_codeset=no
a4db0f07 11276fi
81ecdfbb
RW
11277rm -f core conftest.err conftest.$ac_objext \
11278 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11279
a4db0f07 11280fi
81ecdfbb
RW
11281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11282$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11283 if test $am_cv_langinfo_codeset = yes; then
11284
81ecdfbb 11285$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11286
6c7a06a3 11287 fi
c906108c 11288
06825bd1 11289
a3828db0
MK
11290# Check the return and argument types of ptrace. No canned test for
11291# this, so roll our own.
11292gdb_ptrace_headers='
11293#if HAVE_SYS_TYPES_H
11294# include <sys/types.h>
11295#endif
11296#if HAVE_SYS_PTRACE_H
11297# include <sys/ptrace.h>
11298#endif
11299#if HAVE_UNISTD_H
11300# include <unistd.h>
11301#endif
11302'
11303# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11304ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11305"
11306if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11307 ac_have_decl=1
06825bd1 11308else
81ecdfbb 11309 ac_have_decl=0
06825bd1 11310fi
06825bd1 11311
a3828db0 11312cat >>confdefs.h <<_ACEOF
81ecdfbb 11313#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11314_ACEOF
81ecdfbb 11315if test $ac_have_decl = 1; then :
bec39cab 11316
a3828db0 11317else
a3828db0
MK
11318
11319 : ${gdb_cv_func_ptrace_ret='int'}
11320 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11321
06825bd1
MK
11322fi
11323
064ef605
DJ
11324# Check return type. Varargs (used on GNU/Linux) conflict with the
11325# empty argument list, so check for that explicitly.
81ecdfbb
RW
11326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11327$as_echo_n "checking return type of ptrace... " >&6; }
11328if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11329 $as_echo_n "(cached) " >&6
bec39cab 11330else
81ecdfbb 11331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11332/* end confdefs.h. */
a3828db0 11333$gdb_ptrace_headers
bec39cab
AC
11334int
11335main ()
11336{
064ef605
DJ
11337extern long ptrace (enum __ptrace_request, ...);
11338 ;
11339 return 0;
11340}
11341_ACEOF
81ecdfbb 11342if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11343 gdb_cv_func_ptrace_ret='long'
11344else
81ecdfbb 11345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11346/* end confdefs.h. */
11347$gdb_ptrace_headers
11348int
11349main ()
11350{
a3828db0 11351extern int ptrace ();
bec39cab
AC
11352 ;
11353 return 0;
11354}
11355_ACEOF
81ecdfbb 11356if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11357 gdb_cv_func_ptrace_ret='int'
70f9f479 11358else
81ecdfbb 11359 gdb_cv_func_ptrace_ret='long'
70f9f479 11360fi
81ecdfbb 11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11362fi
81ecdfbb 11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11364fi
81ecdfbb
RW
11365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11366$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11367
a3828db0
MK
11368cat >>confdefs.h <<_ACEOF
11369#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11370_ACEOF
70f9f479 11371
a3828db0 11372# Check argument types.
81ecdfbb
RW
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11374$as_echo_n "checking types of arguments for ptrace... " >&6; }
11375if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11376 $as_echo_n "(cached) " >&6
bec39cab 11377else
a3828db0 11378
81ecdfbb 11379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11380/* end confdefs.h. */
11381$gdb_ptrace_headers
11382int
11383main ()
11384{
11385extern long ptrace (enum __ptrace_request, ...);
11386 ;
11387 return 0;
11388}
11389_ACEOF
81ecdfbb 11390if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11391 gdb_cv_func_ptrace_args='int,int,long,long'
11392else
064ef605 11393
a3828db0
MK
11394for gdb_arg1 in 'int' 'long'; do
11395 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11396 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 11397 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 11398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11399/* end confdefs.h. */
a3828db0 11400$gdb_ptrace_headers
bec39cab
AC
11401int
11402main ()
11403{
a3828db0
MK
11404
11405extern $gdb_cv_func_ptrace_ret
11406 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11407
bec39cab
AC
11408 ;
11409 return 0;
11410}
11411_ACEOF
81ecdfbb 11412if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11413 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11414 break 4;
5c7f2947 11415fi
81ecdfbb 11416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11417 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11419/* end confdefs.h. */
a3828db0 11420$gdb_ptrace_headers
bec39cab
AC
11421int
11422main ()
11423{
a3828db0
MK
11424
11425extern $gdb_cv_func_ptrace_ret
11426 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11427
bec39cab
AC
11428 ;
11429 return 0;
11430}
11431_ACEOF
81ecdfbb 11432if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11433
11434gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11435 break 5;
78434e59 11436fi
81ecdfbb 11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11438 done
11439 done
11440 done
11441 done
11442done
11443# Provide a safe default value.
11444: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11445
064ef605 11446fi
81ecdfbb 11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11448fi
81ecdfbb
RW
11449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11450$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11451ac_save_IFS=$IFS; IFS=','
11452set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11453IFS=$ac_save_IFS
11454shift
bec39cab 11455
a3828db0
MK
11456cat >>confdefs.h <<_ACEOF
11457#define PTRACE_TYPE_ARG3 $3
11458_ACEOF
11459
11460if test -n "$5"; then
11461
11462cat >>confdefs.h <<_ACEOF
11463#define PTRACE_TYPE_ARG5 $5
bec39cab 11464_ACEOF
78434e59
MK
11465
11466fi
11467
a3828db0 11468if test "$cross_compiling" = no; then
81ecdfbb
RW
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11470$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11471if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11472 $as_echo_n "(cached) " >&6
a3828db0 11473else
81ecdfbb
RW
11474 if test "$cross_compiling" = yes; then :
11475 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11476else
81ecdfbb 11477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11478/* end confdefs.h. */
81ecdfbb 11479$ac_includes_default
bec39cab
AC
11480int
11481main ()
11482{
a3828db0
MK
11483/* If this system has a BSD-style setpgrp which takes arguments,
11484 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11485 exit successfully. */
81ecdfbb 11486 return setpgrp (1,1) != -1;
bec39cab
AC
11487 ;
11488 return 0;
11489}
11490_ACEOF
81ecdfbb 11491if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11492 ac_cv_func_setpgrp_void=no
c906108c 11493else
81ecdfbb 11494 ac_cv_func_setpgrp_void=yes
c906108c 11495fi
81ecdfbb
RW
11496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11497 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11498fi
81ecdfbb 11499
a3828db0 11500fi
81ecdfbb
RW
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11502$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11503if test $ac_cv_func_setpgrp_void = yes; then
11504
81ecdfbb 11505$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11506
11507fi
a3828db0
MK
11508
11509else
81ecdfbb
RW
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11511$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11512if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11513 $as_echo_n "(cached) " >&6
97bf5e38 11514else
81ecdfbb 11515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11516/* end confdefs.h. */
a3828db0
MK
11517
11518#include <unistd.h>
11519
bec39cab
AC
11520int
11521main ()
11522{
a3828db0
MK
11523
11524 if (setpgrp(1,1) == -1)
11525 exit (0);
11526 else
11527 exit (1);
11528
bec39cab
AC
11529 ;
11530 return 0;
11531}
11532_ACEOF
81ecdfbb 11533if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11534 ac_cv_func_setpgrp_void=no
c906108c 11535else
81ecdfbb 11536 ac_cv_func_setpgrp_void=yes
c906108c 11537fi
81ecdfbb 11538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11539fi
81ecdfbb
RW
11540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11541$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11542if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11543 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11544
a3828db0 11545fi
c906108c
SS
11546fi
11547
a3828db0
MK
11548# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
11549# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11551$as_echo_n "checking for sigsetjmp... " >&6; }
11552if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11553 $as_echo_n "(cached) " >&6
bec39cab 11554else
81ecdfbb 11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11556/* end confdefs.h. */
a3828db0
MK
11557
11558#include <setjmp.h>
11559
bec39cab
AC
11560int
11561main ()
11562{
a3828db0 11563sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
11564 ;
11565 return 0;
11566}
11567_ACEOF
81ecdfbb 11568if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11569 gdb_cv_func_sigsetjmp=yes
c906108c 11570else
81ecdfbb 11571 gdb_cv_func_sigsetjmp=no
c906108c 11572fi
81ecdfbb 11573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11574fi
81ecdfbb
RW
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11576$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 11577if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 11578
81ecdfbb 11579$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 11580
97bf5e38 11581fi
c906108c 11582
a3828db0
MK
11583# Assume we'll default to using the included libiberty regex.
11584gdb_use_included_regex=yes
11585
11586# However, if the system regex is GNU regex, then default to *not*
11587# using the included regex.
81ecdfbb
RW
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11589$as_echo_n "checking for GNU regex... " >&6; }
11590if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11591 $as_echo_n "(cached) " >&6
bec39cab 11592else
81ecdfbb 11593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11594/* end confdefs.h. */
a3828db0 11595#include <gnu-versions.h>
bec39cab
AC
11596int
11597main ()
11598{
81ecdfbb
RW
11599#define REGEX_INTERFACE_VERSION 1
11600#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11601# error "Version mismatch"
11602#endif
5c45e068
MK
11603 ;
11604 return 0;
11605}
11606_ACEOF
81ecdfbb
RW
11607if ac_fn_c_try_compile "$LINENO"; then :
11608 gdb_cv_have_gnu_regex=yes
5c45e068 11609else
81ecdfbb
RW
11610 gdb_cv_have_gnu_regex=no
11611fi
11612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11613fi
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11615$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11616if test $gdb_cv_have_gnu_regex = yes; then
11617 gdb_use_included_regex=no
5c45e068 11618fi
81ecdfbb
RW
11619
11620
11621# Check whether --with-included-regex was given.
11622if test "${with_included_regex+set}" = set; then :
11623 withval=$with_included_regex; gdb_with_regex=$withval
11624else
11625 gdb_with_regex=$gdb_use_included_regex
c906108c 11626fi
81ecdfbb
RW
11627
11628if test "$gdb_with_regex" = yes; then
11629
11630$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11631
c906108c 11632fi
81ecdfbb
RW
11633
11634# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11635ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11636#include <sys/proc.h>
11637
11638"
11639if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11640
5c45e068 11641cat >>confdefs.h <<_ACEOF
a3828db0 11642#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11643_ACEOF
c906108c 11644
5c45e068 11645
97bf5e38 11646fi
c906108c 11647
5c45e068 11648
a3828db0 11649# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11651$as_echo_n "checking for struct lwp... " >&6; }
11652if test "${gdb_cv_struct_lwp+set}" = set; then :
11653 $as_echo_n "(cached) " >&6
bec39cab 11654else
81ecdfbb 11655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11656/* end confdefs.h. */
a3828db0
MK
11657#include <sys/param.h>
11658#include <sys/lwp.h>
bec39cab
AC
11659int
11660main ()
11661{
a3828db0 11662struct lwp l;
bec39cab
AC
11663 ;
11664 return 0;
11665}
11666_ACEOF
81ecdfbb 11667if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11668 gdb_cv_struct_lwp=yes
c906108c 11669else
81ecdfbb 11670 gdb_cv_struct_lwp=no
c906108c 11671fi
81ecdfbb 11672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11673fi
81ecdfbb
RW
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11675$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11676if test $gdb_cv_struct_lwp = yes; then
c906108c 11677
81ecdfbb 11678$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11679
97bf5e38 11680fi
c906108c 11681
a3828db0 11682# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11684$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11685if test "${gdb_cv_struct_reg+set}" = set; then :
11686 $as_echo_n "(cached) " >&6
bec39cab 11687else
81ecdfbb 11688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11689/* end confdefs.h. */
a3828db0
MK
11690#include <sys/types.h>
11691#include <machine/reg.h>
bec39cab
AC
11692int
11693main ()
11694{
a3828db0 11695struct reg r;
bec39cab
AC
11696 ;
11697 return 0;
11698}
11699_ACEOF
81ecdfbb 11700if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11701 gdb_cv_struct_reg=yes
27ca5dad 11702else
81ecdfbb 11703 gdb_cv_struct_reg=no
27ca5dad 11704fi
81ecdfbb 11705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11706fi
81ecdfbb
RW
11707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11708$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11709if test $gdb_cv_struct_reg = yes; then
bec39cab 11710
81ecdfbb 11711$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11712
11713fi
97bf5e38 11714
a3828db0
MK
11715# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11716# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11717ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11718"
11719if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11720
11721cat >>confdefs.h <<_ACEOF
a3828db0 11722#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11723_ACEOF
3862412b 11724
5c45e068 11725
97bf5e38 11726fi
81ecdfbb
RW
11727ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11728"
11729if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11730
11731cat >>confdefs.h <<_ACEOF
a3828db0 11732#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11733_ACEOF
3862412b 11734
5c45e068 11735
97bf5e38 11736fi
3862412b 11737
5c45e068 11738
a3828db0 11739# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11741$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11742if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11743 $as_echo_n "(cached) " >&6
451928c5 11744else
81ecdfbb 11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11746/* end confdefs.h. */
a3828db0 11747#include <sys/ptrace.h>
bec39cab
AC
11748int
11749main ()
11750{
a3828db0 11751PTRACE_GETREGS;
bec39cab
AC
11752 ;
11753 return 0;
11754}
11755_ACEOF
81ecdfbb 11756if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11757 gdb_cv_have_ptrace_getregs=yes
451928c5 11758else
81ecdfbb 11759 gdb_cv_have_ptrace_getregs=no
451928c5 11760fi
81ecdfbb 11761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11762fi
11763
81ecdfbb
RW
11764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11765$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11766if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11767
81ecdfbb 11768$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11769
97bf5e38 11770fi
451928c5 11771
a3828db0 11772# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11774$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11775if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11776 $as_echo_n "(cached) " >&6
451928c5 11777else
81ecdfbb 11778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11779/* end confdefs.h. */
a3828db0 11780#include <sys/ptrace.h>
bec39cab
AC
11781int
11782main ()
11783{
a3828db0 11784PTRACE_GETFPXREGS;
bec39cab
AC
11785 ;
11786 return 0;
11787}
11788_ACEOF
81ecdfbb 11789if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11790 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11791else
81ecdfbb 11792 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11793fi
81ecdfbb 11794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11795fi
11796
81ecdfbb
RW
11797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11798$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11799if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11800
81ecdfbb 11801$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11802
97bf5e38 11803fi
451928c5 11804
a3828db0 11805# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11807$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11808if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11809 $as_echo_n "(cached) " >&6
3862412b 11810else
81ecdfbb 11811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11812/* end confdefs.h. */
a3828db0
MK
11813#include <sys/types.h>
11814#include <sys/ptrace.h>
bec39cab
AC
11815int
11816main ()
11817{
a3828db0 11818PT_GETDBREGS;
bec39cab
AC
11819 ;
11820 return 0;
11821}
11822_ACEOF
81ecdfbb 11823if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11824 gdb_cv_have_pt_getdbregs=yes
3862412b 11825else
81ecdfbb 11826 gdb_cv_have_pt_getdbregs=no
3862412b 11827fi
81ecdfbb 11828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11829fi
11830
81ecdfbb
RW
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11832$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11833if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11834
81ecdfbb 11835$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11836
97bf5e38 11837fi
3862412b 11838
a3828db0 11839# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11841$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11842if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11843 $as_echo_n "(cached) " >&6
3862412b 11844else
81ecdfbb 11845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11846/* end confdefs.h. */
a3828db0
MK
11847#include <sys/types.h>
11848#include <sys/ptrace.h>
bec39cab
AC
11849int
11850main ()
11851{
a3828db0 11852PT_GETXMMREGS;
bec39cab
AC
11853 ;
11854 return 0;
11855}
11856_ACEOF
81ecdfbb 11857if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11858 gdb_cv_have_pt_getxmmregs=yes
3862412b 11859else
81ecdfbb 11860 gdb_cv_have_pt_getxmmregs=no
3862412b 11861fi
81ecdfbb 11862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11863fi
11864
81ecdfbb
RW
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11866$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11867if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11868
81ecdfbb 11869$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11870
97bf5e38 11871fi
3862412b 11872
eb368090 11873# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
11874
11875if test "${target}" = "${host}"; then
11876 case "${host}" in
97bf5e38 11877 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 11878
81ecdfbb 11879$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11880
11881 ;;
c162e8c9 11882 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11883
81ecdfbb 11884$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11885
11886 ;;
11887 mips-sgi-irix5*)
11888 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11889
81ecdfbb 11890$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11891
11892 ;;
11893 esac
11894fi
11895
11896if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
11898$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
11899 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
11900 $as_echo_n "(cached) " >&6
bec39cab 11901else
81ecdfbb 11902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11903/* end confdefs.h. */
596c9d4b
KB
11904
11905#define _SYSCALL32
d30c5336
JK
11906/* Needed for new procfs interface on sparc-solaris. */
11907#define _STRUCTURED_PROC 1
596c9d4b 11908#include <sys/procfs.h>
bec39cab
AC
11909int
11910main ()
11911{
97bf5e38 11912pstatus_t avar
bec39cab
AC
11913 ;
11914 return 0;
11915}
11916_ACEOF
81ecdfbb 11917if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11918 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 11919else
81ecdfbb 11920 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 11921
596c9d4b 11922fi
81ecdfbb 11923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11924fi
11925
97bf5e38 11926 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 11927
81ecdfbb 11928$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
11929
11930 fi
81ecdfbb
RW
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
11932$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 11933
81ecdfbb
RW
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
11935$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
11936 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
11937 $as_echo_n "(cached) " >&6
596c9d4b 11938else
81ecdfbb 11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11940/* end confdefs.h. */
596c9d4b
KB
11941
11942#define _SYSCALL32
d30c5336
JK
11943/* Needed for new procfs interface on sparc-solaris. */
11944#define _STRUCTURED_PROC 1
596c9d4b 11945#include <sys/procfs.h>
bec39cab
AC
11946int
11947main ()
11948{
97bf5e38 11949prrun_t avar
bec39cab
AC
11950 ;
11951 return 0;
11952}
11953_ACEOF
81ecdfbb 11954if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11955 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 11956else
81ecdfbb 11957 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 11958
596c9d4b 11959fi
81ecdfbb 11960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11961fi
11962
97bf5e38 11963 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 11964
81ecdfbb 11965$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
11966
11967 fi
81ecdfbb
RW
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
11969$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 11970
81ecdfbb
RW
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11972$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11973 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11974 $as_echo_n "(cached) " >&6
596c9d4b 11975else
81ecdfbb 11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11977/* end confdefs.h. */
596c9d4b
KB
11978
11979#define _SYSCALL32
d30c5336
JK
11980/* Needed for new procfs interface on sparc-solaris. */
11981#define _STRUCTURED_PROC 1
596c9d4b 11982#include <sys/procfs.h>
bec39cab
AC
11983int
11984main ()
11985{
97bf5e38 11986gregset_t avar
bec39cab
AC
11987 ;
11988 return 0;
11989}
11990_ACEOF
81ecdfbb 11991if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11992 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11993else
81ecdfbb 11994 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11995
596c9d4b 11996fi
81ecdfbb 11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11998fi
11999
97bf5e38 12000 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12001
81ecdfbb 12002$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12003
12004 fi
81ecdfbb
RW
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12006$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12007
81ecdfbb
RW
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12009$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12010 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12011 $as_echo_n "(cached) " >&6
d84dd0c5 12012else
81ecdfbb 12013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12014/* end confdefs.h. */
97bf5e38
MK
12015
12016#define _SYSCALL32
d30c5336
JK
12017/* Needed for new procfs interface on sparc-solaris. */
12018#define _STRUCTURED_PROC 1
d84dd0c5 12019#include <sys/procfs.h>
bec39cab
AC
12020int
12021main ()
12022{
97bf5e38 12023fpregset_t avar
bec39cab
AC
12024 ;
12025 return 0;
12026}
12027_ACEOF
81ecdfbb 12028if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12029 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 12030else
81ecdfbb 12031 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 12032
d84dd0c5 12033fi
81ecdfbb 12034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
12035fi
12036
97bf5e38 12037 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 12038
81ecdfbb 12039$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 12040
97bf5e38 12041 fi
81ecdfbb
RW
12042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
12043$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 12044
81ecdfbb
RW
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
12046$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
12047 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
12048 $as_echo_n "(cached) " >&6
c906108c 12049else
81ecdfbb 12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12051/* end confdefs.h. */
c906108c 12052
97bf5e38 12053#define _SYSCALL32
d30c5336
JK
12054/* Needed for new procfs interface on sparc-solaris. */
12055#define _STRUCTURED_PROC 1
97bf5e38 12056#include <sys/procfs.h>
bec39cab
AC
12057int
12058main ()
12059{
97bf5e38 12060prgregset_t avar
bec39cab
AC
12061 ;
12062 return 0;
12063}
12064_ACEOF
81ecdfbb 12065if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12066 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 12067else
81ecdfbb 12068 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 12069
c906108c 12070fi
81ecdfbb 12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12072fi
12073
97bf5e38 12074 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 12075
81ecdfbb 12076$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 12077
97bf5e38 12078 fi
81ecdfbb
RW
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
12080$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 12081
81ecdfbb
RW
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
12083$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
12084 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
12085 $as_echo_n "(cached) " >&6
d45fe813 12086else
81ecdfbb 12087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12088/* end confdefs.h. */
97bf5e38
MK
12089
12090#define _SYSCALL32
d30c5336
JK
12091/* Needed for new procfs interface on sparc-solaris. */
12092#define _STRUCTURED_PROC 1
97bf5e38 12093#include <sys/procfs.h>
bec39cab
AC
12094int
12095main ()
12096{
97bf5e38 12097prfpregset_t avar
bec39cab
AC
12098 ;
12099 return 0;
12100}
12101_ACEOF
81ecdfbb 12102if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12103 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 12104else
81ecdfbb 12105 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 12106
d45fe813 12107fi
81ecdfbb 12108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12109fi
12110
97bf5e38 12111 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 12112
81ecdfbb 12113$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 12114
97bf5e38 12115 fi
81ecdfbb
RW
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
12117$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 12118
81ecdfbb
RW
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
12120$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
12121 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
12122 $as_echo_n "(cached) " >&6
d45fe813 12123else
81ecdfbb 12124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12125/* end confdefs.h. */
97bf5e38
MK
12126
12127#define _SYSCALL32
d30c5336
JK
12128/* Needed for new procfs interface on sparc-solaris. */
12129#define _STRUCTURED_PROC 1
97bf5e38 12130#include <sys/procfs.h>
bec39cab
AC
12131int
12132main ()
12133{
97bf5e38 12134prgregset32_t avar
bec39cab
AC
12135 ;
12136 return 0;
12137}
12138_ACEOF
81ecdfbb 12139if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12140 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 12141else
81ecdfbb 12142 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 12143
d45fe813 12144fi
81ecdfbb 12145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12146fi
12147
97bf5e38 12148 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 12149
81ecdfbb 12150$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 12151
97bf5e38 12152 fi
81ecdfbb
RW
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
12154$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 12155
81ecdfbb
RW
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
12157$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
12158 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
12159 $as_echo_n "(cached) " >&6
d45fe813 12160else
81ecdfbb 12161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12162/* end confdefs.h. */
97bf5e38
MK
12163
12164#define _SYSCALL32
d30c5336
JK
12165/* Needed for new procfs interface on sparc-solaris. */
12166#define _STRUCTURED_PROC 1
97bf5e38 12167#include <sys/procfs.h>
bec39cab
AC
12168int
12169main ()
12170{
97bf5e38 12171prfpregset32_t avar
bec39cab
AC
12172 ;
12173 return 0;
12174}
12175_ACEOF
81ecdfbb 12176if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12177 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 12178else
81ecdfbb 12179 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 12180
d45fe813 12181fi
81ecdfbb 12182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12183fi
12184
97bf5e38 12185 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 12186
81ecdfbb 12187$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 12188
97bf5e38 12189 fi
81ecdfbb
RW
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
12191$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 12192
81ecdfbb
RW
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
12194$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
12195 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
12196 $as_echo_n "(cached) " >&6
d45fe813 12197else
81ecdfbb 12198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12199/* end confdefs.h. */
97bf5e38 12200
d45fe813 12201#define _SYSCALL32
d30c5336
JK
12202/* Needed for new procfs interface on sparc-solaris. */
12203#define _STRUCTURED_PROC 1
97bf5e38 12204#include <sys/procfs.h>
bec39cab
AC
12205int
12206main ()
12207{
97bf5e38 12208lwpid_t avar
bec39cab
AC
12209 ;
12210 return 0;
12211}
12212_ACEOF
81ecdfbb 12213if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12214 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 12215else
81ecdfbb 12216 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 12217
d45fe813 12218fi
81ecdfbb 12219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12220fi
12221
97bf5e38 12222 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12223
81ecdfbb 12224$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12225
97bf5e38 12226 fi
81ecdfbb
RW
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12228$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12229
81ecdfbb
RW
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12231$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12232 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12233 $as_echo_n "(cached) " >&6
c906108c 12234else
81ecdfbb 12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12236/* end confdefs.h. */
c906108c 12237
97bf5e38 12238#define _SYSCALL32
d30c5336
JK
12239/* Needed for new procfs interface on sparc-solaris. */
12240#define _STRUCTURED_PROC 1
97bf5e38 12241#include <sys/procfs.h>
bec39cab
AC
12242int
12243main ()
12244{
97bf5e38 12245psaddr_t avar
bec39cab
AC
12246 ;
12247 return 0;
12248}
12249_ACEOF
81ecdfbb 12250if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12251 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12252else
81ecdfbb 12253 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12254
c906108c 12255fi
81ecdfbb 12256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12257fi
12258
97bf5e38 12259 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12260
81ecdfbb 12261$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12262
97bf5e38 12263 fi
81ecdfbb
RW
12264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12265$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12266
81ecdfbb
RW
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12268$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12269 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12270 $as_echo_n "(cached) " >&6
c906108c 12271else
81ecdfbb 12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12273/* end confdefs.h. */
c906108c 12274
97bf5e38 12275#define _SYSCALL32
d30c5336
JK
12276/* Needed for new procfs interface on sparc-solaris. */
12277#define _STRUCTURED_PROC 1
97bf5e38 12278#include <sys/procfs.h>
bec39cab
AC
12279int
12280main ()
12281{
97bf5e38 12282prsysent_t avar
bec39cab
AC
12283 ;
12284 return 0;
12285}
12286_ACEOF
81ecdfbb 12287if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12288 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12289else
81ecdfbb 12290 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12291
c906108c 12292fi
81ecdfbb 12293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12294fi
12295
97bf5e38 12296 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12297
81ecdfbb 12298$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12299
97bf5e38 12300 fi
81ecdfbb
RW
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12302$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12303
81ecdfbb
RW
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12305$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12306 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12307 $as_echo_n "(cached) " >&6
c906108c 12308else
81ecdfbb 12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12310/* end confdefs.h. */
c906108c 12311
97bf5e38 12312#define _SYSCALL32
d30c5336
JK
12313/* Needed for new procfs interface on sparc-solaris. */
12314#define _STRUCTURED_PROC 1
97bf5e38 12315#include <sys/procfs.h>
bec39cab
AC
12316int
12317main ()
12318{
97bf5e38 12319pr_sigset_t avar
bec39cab
AC
12320 ;
12321 return 0;
12322}
12323_ACEOF
81ecdfbb 12324if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12325 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12326else
81ecdfbb 12327 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12328
c906108c 12329fi
81ecdfbb 12330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12331fi
12332
97bf5e38 12333 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12334
81ecdfbb 12335$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12336
97bf5e38 12337 fi
81ecdfbb
RW
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12339$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12340
81ecdfbb
RW
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12342$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12343 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12344 $as_echo_n "(cached) " >&6
c906108c 12345else
81ecdfbb 12346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12347/* end confdefs.h. */
c906108c 12348
97bf5e38 12349#define _SYSCALL32
d30c5336
JK
12350/* Needed for new procfs interface on sparc-solaris. */
12351#define _STRUCTURED_PROC 1
97bf5e38 12352#include <sys/procfs.h>
bec39cab
AC
12353int
12354main ()
12355{
97bf5e38 12356pr_sigaction64_t avar
bec39cab
AC
12357 ;
12358 return 0;
12359}
12360_ACEOF
81ecdfbb 12361if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12362 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12363else
81ecdfbb 12364 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12365
c906108c 12366fi
81ecdfbb 12367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12368fi
12369
97bf5e38 12370 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12371
81ecdfbb 12372$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12373
97bf5e38 12374 fi
81ecdfbb
RW
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12376$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12377
81ecdfbb
RW
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12379$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12380 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12381 $as_echo_n "(cached) " >&6
97bf5e38 12382else
81ecdfbb 12383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12384/* end confdefs.h. */
97bf5e38
MK
12385
12386#define _SYSCALL32
d30c5336
JK
12387/* Needed for new procfs interface on sparc-solaris. */
12388#define _STRUCTURED_PROC 1
97bf5e38 12389#include <sys/procfs.h>
bec39cab
AC
12390int
12391main ()
12392{
97bf5e38 12393pr_siginfo64_t avar
bec39cab
AC
12394 ;
12395 return 0;
12396}
12397_ACEOF
81ecdfbb 12398if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12399 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12400else
81ecdfbb 12401 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12402
97bf5e38 12403fi
81ecdfbb 12404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12405fi
c906108c 12406
97bf5e38 12407 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12408
81ecdfbb 12409$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12410
97bf5e38 12411 fi
81ecdfbb
RW
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12413$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12414
12415
97bf5e38
MK
12416
12417
12418
97bf5e38 12419 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12421$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12422 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12423 $as_echo_n "(cached) " >&6
c906108c 12424else
81ecdfbb 12425 if test "$cross_compiling" = yes; then :
97bf5e38 12426 gdb_cv_prfpregset_t_broken=yes
c906108c 12427else
81ecdfbb 12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12429/* end confdefs.h. */
97bf5e38
MK
12430#include <sys/procfs.h>
12431 int main ()
12432 {
12433 if (sizeof (prfpregset_t) == sizeof (void *))
12434 return 1;
12435 return 0;
12436 }
bec39cab 12437_ACEOF
81ecdfbb 12438if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12439 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12440else
12441 gdb_cv_prfpregset_t_broken=yes
c906108c 12442fi
81ecdfbb
RW
12443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12444 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12445fi
81ecdfbb 12446
c906108c
SS
12447fi
12448
81ecdfbb
RW
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12450$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12451 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12452
81ecdfbb 12453$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12454
97bf5e38
MK
12455 fi
12456 fi
c906108c 12457
bec39cab 12458
81ecdfbb
RW
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
12460$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
12461 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
12462 $as_echo_n "(cached) " >&6
c906108c 12463else
81ecdfbb 12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12465/* end confdefs.h. */
97bf5e38
MK
12466#include <unistd.h>
12467#include <sys/types.h>
12468#include <sys/procfs.h>
12469
bec39cab
AC
12470int
12471main ()
12472{
97bf5e38
MK
12473
12474 int dummy;;
12475 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
12476
12477 ;
12478 return 0;
12479}
12480_ACEOF
81ecdfbb 12481if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12482 gdb_cv_have_procfs_piocset=yes
c906108c 12483else
81ecdfbb 12484 gdb_cv_have_procfs_piocset=no
c906108c 12485fi
81ecdfbb 12486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12487fi
97bf5e38 12488
81ecdfbb
RW
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
12490$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 12491 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 12492
81ecdfbb 12493$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
12494
12495 fi
c906108c 12496fi
c906108c 12497
97bf5e38 12498if test ${host} = ${target} ; then
bec39cab 12499
81ecdfbb
RW
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
12501$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
12502 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
12503 $as_echo_n "(cached) " >&6
bec39cab 12504else
81ecdfbb 12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12506/* end confdefs.h. */
97bf5e38 12507#include <link.h>
bec39cab
AC
12508int
12509main ()
12510{
97bf5e38 12511struct link_map lm; (void) lm.l_addr;
bec39cab
AC
12512 ;
12513 return 0;
12514}
12515_ACEOF
81ecdfbb 12516if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12517 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 12518else
81ecdfbb 12519 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 12520fi
81ecdfbb 12521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12522fi
12523
81ecdfbb
RW
12524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
12525$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 12526 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 12527
81ecdfbb 12528$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12529
12530 fi
12531
bec39cab 12532
81ecdfbb
RW
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
12534$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
12535 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
12536 $as_echo_n "(cached) " >&6
c906108c 12537else
81ecdfbb 12538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12539/* end confdefs.h. */
97bf5e38
MK
12540#include <sys/types.h>
12541#include <link.h>
bec39cab
AC
12542int
12543main ()
12544{
97bf5e38 12545struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
12546 ;
12547 return 0;
12548}
12549_ACEOF
81ecdfbb 12550if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12551 gdb_cv_have_struct_link_map_with_lm_members=yes
12552else
81ecdfbb 12553 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 12554fi
81ecdfbb 12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12556fi
c906108c 12557
81ecdfbb
RW
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
12559$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 12560 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 12561
81ecdfbb 12562$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
12563
12564 fi
12565
bec39cab 12566
81ecdfbb
RW
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
12568$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
12569 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
12570 $as_echo_n "(cached) " >&6
c906108c 12571else
81ecdfbb 12572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12573/* end confdefs.h. */
97bf5e38
MK
12574#include <sys/types.h>
12575#ifdef HAVE_NLIST_H
12576#include <nlist.h>
12577#endif
12578#include <link.h>
bec39cab
AC
12579int
12580main ()
12581{
97bf5e38 12582struct so_map lm; (void) lm.som_addr;
bec39cab
AC
12583 ;
12584 return 0;
12585}
12586_ACEOF
81ecdfbb 12587if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12588 gdb_cv_have_struct_so_map_with_som_members=yes
12589else
81ecdfbb 12590 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 12591fi
81ecdfbb 12592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12593fi
c906108c 12594
81ecdfbb
RW
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
12596$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 12597 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 12598
81ecdfbb 12599$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 12600
97bf5e38 12601 fi
c906108c 12602
bec39cab 12603
81ecdfbb
RW
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
12605$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
12606 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
12607 $as_echo_n "(cached) " >&6
97bf5e38 12608else
81ecdfbb 12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12610/* end confdefs.h. */
97bf5e38
MK
12611#define _SYSCALL32
12612#include <sys/link.h>
bec39cab
AC
12613int
12614main ()
12615{
97bf5e38 12616struct link_map32 l;
bec39cab
AC
12617 ;
12618 return 0;
12619}
12620_ACEOF
81ecdfbb 12621if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12622 gdb_cv_have_struct_link_map32=yes
12623else
81ecdfbb 12624 gdb_cv_have_struct_link_map32=no
97bf5e38 12625fi
81ecdfbb 12626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12627fi
c906108c 12628
81ecdfbb
RW
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
12630$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 12631 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 12632
81ecdfbb 12633$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 12634
60ca704f 12635
81ecdfbb 12636$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 12637
97bf5e38
MK
12638 fi
12639fi
c906108c 12640
bc8bcb4b 12641# Check if the compiler supports the `long long' type.
c906108c 12642
81ecdfbb
RW
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12644$as_echo_n "checking for long long support in compiler... " >&6; }
12645if test "${gdb_cv_c_long_long+set}" = set; then :
12646 $as_echo_n "(cached) " >&6
97bf5e38 12647else
81ecdfbb 12648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12649/* end confdefs.h. */
bc8bcb4b 12650extern long long foo;
bec39cab
AC
12651int
12652main ()
12653{
bc8bcb4b 12654switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12655 ;
12656 return 0;
12657}
12658_ACEOF
81ecdfbb 12659if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12660 gdb_cv_c_long_long=yes
12661else
81ecdfbb 12662 gdb_cv_c_long_long=no
97bf5e38 12663fi
81ecdfbb 12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12665fi
81ecdfbb
RW
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12667$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 12668if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 12669
81ecdfbb 12670$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12671
12672fi
12673
bc8bcb4b 12674# Check if the compiler and runtime support printing long longs.
97bf5e38 12675
81ecdfbb
RW
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12677$as_echo_n "checking for long long support in printf... " >&6; }
12678if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12679 $as_echo_n "(cached) " >&6
97bf5e38 12680else
81ecdfbb 12681 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12682 gdb_cv_printf_has_long_long=no
12683else
81ecdfbb 12684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12685/* end confdefs.h. */
bc8bcb4b
MK
12686$ac_includes_default
12687int
12688main ()
12689{
12690char buf[32];
97bf5e38
MK
12691 long long l = 0;
12692 l = (l << 16) + 0x0123;
12693 l = (l << 16) + 0x4567;
12694 l = (l << 16) + 0x89ab;
12695 l = (l << 16) + 0xcdef;
12696 sprintf (buf, "0x%016llx", l);
12697 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12698 ;
12699 return 0;
c906108c 12700}
bec39cab 12701_ACEOF
81ecdfbb 12702if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12703 gdb_cv_printf_has_long_long=yes
12704else
81ecdfbb 12705 gdb_cv_printf_has_long_long=no
97bf5e38 12706fi
81ecdfbb
RW
12707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12708 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12709fi
81ecdfbb 12710
97bf5e38 12711fi
81ecdfbb
RW
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12713$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12714if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12715
81ecdfbb 12716$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12717
12718fi
97bf5e38 12719
1a619819
LM
12720# Check if the compiler and runtime support printing decfloats.
12721
81ecdfbb
RW
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12723$as_echo_n "checking for decfloat support in printf... " >&6; }
12724if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12725 $as_echo_n "(cached) " >&6
1a619819 12726else
81ecdfbb 12727 if test "$cross_compiling" = yes; then :
1a619819
LM
12728 gdb_cv_printf_has_decfloat=no
12729else
81ecdfbb 12730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12731/* end confdefs.h. */
12732$ac_includes_default
12733int
12734main ()
12735{
12736char buf[64];
12737 _Decimal32 d32 = 1.2345df;
12738 _Decimal64 d64 = 1.2345dd;
12739 _Decimal128 d128 = 1.2345dl;
12740 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12741 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12742 ;
12743 return 0;
12744}
12745_ACEOF
81ecdfbb 12746if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12747 gdb_cv_printf_has_decfloat=yes
12748else
81ecdfbb 12749 gdb_cv_printf_has_decfloat=no
1a619819 12750fi
81ecdfbb
RW
12751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12752 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12753fi
81ecdfbb 12754
1a619819 12755fi
81ecdfbb
RW
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12757$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12758if test $gdb_cv_printf_has_decfloat = yes; then
12759
81ecdfbb 12760$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12761
12762fi
12763
bc8bcb4b
MK
12764# Check if the compiler supports the `long double' type. We can't use
12765# AC_C_LONG_DOUBLE because that one does additional checks on the
12766# constants defined in <float.h> that fail on some systems,
12767# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12768
81ecdfbb
RW
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12770$as_echo_n "checking for long double support in compiler... " >&6; }
12771if test "${gdb_cv_c_long_double+set}" = set; then :
12772 $as_echo_n "(cached) " >&6
97bf5e38 12773else
81ecdfbb 12774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12775/* end confdefs.h. */
97bf5e38 12776long double foo;
bec39cab 12777_ACEOF
81ecdfbb 12778if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12779 gdb_cv_c_long_double=yes
97bf5e38 12780else
81ecdfbb 12781 gdb_cv_c_long_double=no
97bf5e38 12782fi
81ecdfbb 12783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12784fi
81ecdfbb
RW
12785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12786$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12787if test $gdb_cv_c_long_double = yes; then
c906108c 12788
81ecdfbb 12789$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12790
12791fi
12792
bc8bcb4b 12793# Check if the compiler and runtime support printing long doubles.
97bf5e38 12794
81ecdfbb
RW
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12796$as_echo_n "checking for long double support in printf... " >&6; }
12797if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12798 $as_echo_n "(cached) " >&6
97bf5e38 12799else
81ecdfbb 12800 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12801 gdb_cv_printf_has_long_double=no
12802else
81ecdfbb 12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12804/* end confdefs.h. */
bc8bcb4b
MK
12805$ac_includes_default
12806int
12807main ()
12808{
12809char buf[16];
97bf5e38
MK
12810 long double f = 3.141592653;
12811 sprintf (buf, "%Lg", f);
12812 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12813 ;
12814 return 0;
97bf5e38 12815}
bec39cab 12816_ACEOF
81ecdfbb 12817if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12818 gdb_cv_printf_has_long_double=yes
c906108c 12819else
81ecdfbb 12820 gdb_cv_printf_has_long_double=no
c906108c 12821fi
81ecdfbb
RW
12822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12823 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12824fi
81ecdfbb 12825
c906108c 12826fi
81ecdfbb
RW
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12828$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12829if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12830
81ecdfbb 12831$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12832
12833fi
97bf5e38 12834
bc8bcb4b 12835# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12836
81ecdfbb
RW
12837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12838$as_echo_n "checking for long double support in scanf... " >&6; }
12839if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12840 $as_echo_n "(cached) " >&6
97bf5e38 12841else
81ecdfbb 12842 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12843 gdb_cv_scanf_has_long_double=no
12844else
81ecdfbb 12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12846/* end confdefs.h. */
bc8bcb4b
MK
12847#include <stdio.h>
12848int
12849main ()
12850{
12851char *buf = "3.141592653";
97bf5e38
MK
12852 long double f = 0;
12853 sscanf (buf, "%Lg", &f);
12854 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12855 ;
12856 return 0;
97bf5e38 12857}
bec39cab 12858_ACEOF
81ecdfbb 12859if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12860 gdb_cv_scanf_has_long_double=yes
12861else
81ecdfbb 12862 gdb_cv_scanf_has_long_double=no
97bf5e38 12863fi
81ecdfbb
RW
12864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12865 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12866fi
81ecdfbb 12867
c906108c 12868fi
81ecdfbb
RW
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12870$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12871if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12872
81ecdfbb 12873$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12874
12875fi
c906108c 12876
438013df
AO
12877case ${host_os} in
12878aix*)
81ecdfbb
RW
12879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12880$as_echo_n "checking for -bbigtoc option... " >&6; }
12881if test "${gdb_cv_bigtoc+set}" = set; then :
12882 $as_echo_n "(cached) " >&6
438013df 12883else
bec39cab 12884
438013df
AO
12885 SAVE_LDFLAGS=$LDFLAGS
12886
12887 case $GCC in
12888 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12889 *) gdb_cv_bigtoc=-bbigtoc ;;
12890 esac
12891
12892 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12894/* end confdefs.h. */
438013df 12895
bec39cab
AC
12896int
12897main ()
12898{
438013df 12899int i;
bec39cab
AC
12900 ;
12901 return 0;
12902}
12903_ACEOF
81ecdfbb 12904if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12905
81ecdfbb
RW
12906else
12907 gdb_cv_bigtoc=
438013df 12908fi
81ecdfbb
RW
12909rm -f core conftest.err conftest.$ac_objext \
12910 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12911 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12912
bec39cab 12913fi
81ecdfbb
RW
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12915$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12916 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12917 ;;
12918esac
12919
c906108c
SS
12920
12921
12922if test ${build} = ${host} -a ${host} = ${target} ; then
12923 case ${host_os} in
12924 hpux*)
81ecdfbb
RW
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
12926$as_echo_n "checking for HPUX/OSF thread support... " >&6; }
c906108c
SS
12927 if test -f /usr/include/dce/cma_config.h ; then
12928 if test "$GCC" = "yes" ; then
81ecdfbb
RW
12929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12930$as_echo "yes" >&6; }
60ca704f 12931
81ecdfbb 12932$as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h
c906108c 12933
3483b318 12934 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
12935 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
12936 else
81ecdfbb
RW
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5
12938$as_echo "no (suppressed because you are not using GCC)" >&6; }
c906108c
SS
12939 fi
12940 else
81ecdfbb
RW
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12942$as_echo "no" >&6; }
c906108c
SS
12943 fi
12944 ;;
12945 solaris*)
d92419e5
JB
12946 # See if thread_db library is around for Solaris thread debugging.
12947 # Note that we must explicitly test for version 1 of the library
12948 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12949 # the same API.
81ecdfbb
RW
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12951$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12952 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12954$as_echo "yes" >&6; }
60ca704f 12955
81ecdfbb 12956$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12957
3483b318 12958 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12959 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12961$as_echo_n "checking for dlopen in -ldl... " >&6; }
12962if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12963 $as_echo_n "(cached) " >&6
c906108c 12964else
bec39cab 12965 ac_check_lib_save_LIBS=$LIBS
c906108c 12966LIBS="-ldl $LIBS"
81ecdfbb 12967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12968/* end confdefs.h. */
12969
81ecdfbb
RW
12970/* Override any GCC internal prototype to avoid an error.
12971 Use char because int might match the return type of a GCC
12972 builtin and then its argument prototype would still apply. */
bec39cab
AC
12973#ifdef __cplusplus
12974extern "C"
12975#endif
bec39cab
AC
12976char dlopen ();
12977int
12978main ()
12979{
81ecdfbb 12980return dlopen ();
bec39cab
AC
12981 ;
12982 return 0;
12983}
12984_ACEOF
81ecdfbb 12985if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12986 ac_cv_lib_dl_dlopen=yes
12987else
81ecdfbb 12988 ac_cv_lib_dl_dlopen=no
bec39cab 12989fi
81ecdfbb
RW
12990rm -f core conftest.err conftest.$ac_objext \
12991 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12992LIBS=$ac_check_lib_save_LIBS
12993fi
81ecdfbb
RW
12994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12995$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12996if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12997 cat >>confdefs.h <<_ACEOF
12998#define HAVE_LIBDL 1
12999_ACEOF
c906108c
SS
13000
13001 LIBS="-ldl $LIBS"
13002
c906108c
SS
13003fi
13004
13005 if test "$GCC" = "yes" ; then
13006 # The GNU linker requires the -export-dynamic option to make
13007 # all symbols visible in the dynamic symbol table.
13008 hold_ldflags=$LDFLAGS
81ecdfbb
RW
13009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5
13010$as_echo_n "checking for the ld -export-dynamic flag... " >&6; }
c906108c 13011 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
81ecdfbb 13012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13013/* end confdefs.h. */
c906108c 13014
bec39cab
AC
13015int
13016main ()
13017{
c906108c 13018int i;
bec39cab
AC
13019 ;
13020 return 0;
13021}
13022_ACEOF
81ecdfbb 13023if ac_fn_c_try_link "$LINENO"; then :
c906108c
SS
13024 found=yes
13025else
81ecdfbb 13026 found=no
c906108c 13027fi
81ecdfbb
RW
13028rm -f core conftest.err conftest.$ac_objext \
13029 conftest$ac_exeext conftest.$ac_ext
c906108c 13030 LDFLAGS=$hold_ldflags
81ecdfbb
RW
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
13032$as_echo "$found" >&6; }
c906108c
SS
13033 if test $found = yes; then
13034 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
13035 fi
13036 fi
13037 # Sun randomly tweaked the prototypes in <proc_service.h>
13038 # at one point.
81ecdfbb
RW
13039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13040$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13041 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13042 $as_echo_n "(cached) " >&6
c906108c 13043else
bec39cab 13044
81ecdfbb 13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13046/* end confdefs.h. */
c906108c
SS
13047
13048 #include <proc_service.h>
13049 ps_err_e ps_pdwrite
13050 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13051
bec39cab
AC
13052int
13053main ()
13054{
13055
13056 ;
13057 return 0;
13058}
13059_ACEOF
81ecdfbb 13060if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13061 gdb_cv_proc_service_is_old=no
13062else
81ecdfbb 13063 gdb_cv_proc_service_is_old=yes
c906108c 13064fi
81ecdfbb 13065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13066
c906108c
SS
13067fi
13068
81ecdfbb
RW
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13070$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13071 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13072
81ecdfbb 13073$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13074
13075 fi
13076 else
81ecdfbb
RW
13077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
c906108c
SS
13079 fi
13080 ;;
d92419e5 13081 aix*)
81ecdfbb
RW
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13083$as_echo_n "checking for AiX thread debugging library... " >&6; }
13084 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13085 $as_echo_n "(cached) " >&6
bec39cab 13086else
81ecdfbb 13087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13088/* end confdefs.h. */
d92419e5 13089#include <sys/pthdebug.h>
bec39cab
AC
13090int
13091main ()
13092{
d92419e5
JB
13093#ifndef PTHDB_VERSION_3
13094 #error
13095 #endif
bec39cab
AC
13096 ;
13097 return 0;
13098}
13099_ACEOF
81ecdfbb 13100if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13101 gdb_cv_have_aix_thread_debug=yes
13102else
81ecdfbb 13103 gdb_cv_have_aix_thread_debug=no
d92419e5 13104fi
81ecdfbb 13105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13106fi
13107
81ecdfbb
RW
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13109$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13110 if test $gdb_cv_have_aix_thread_debug = yes; then
13111 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13112 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
13113 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
13114 fi
13115 ;;
c906108c 13116 esac
bec39cab 13117
c906108c
SS
13118fi
13119
3f47be5c 13120if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13122$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13123if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13124 $as_echo_n "(cached) " >&6
bec39cab 13125else
81ecdfbb 13126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13127/* end confdefs.h. */
3f47be5c 13128#include <thread_db.h>
bec39cab
AC
13129int
13130main ()
13131{
3f47be5c 13132int i = TD_NOTALLOC;
bec39cab
AC
13133 ;
13134 return 0;
13135}
13136_ACEOF
81ecdfbb 13137if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13138 gdb_cv_thread_db_h_has_td_notalloc=yes
13139else
81ecdfbb 13140 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13141
3f47be5c 13142fi
81ecdfbb 13143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13144
bec39cab 13145fi
81ecdfbb
RW
13146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13147$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13149$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13150if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13151 $as_echo_n "(cached) " >&6
59f80f10 13152else
81ecdfbb 13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13154/* end confdefs.h. */
13155#include <thread_db.h>
13156int
13157main ()
13158{
13159int i = TD_VERSION;
13160 ;
13161 return 0;
13162}
13163_ACEOF
81ecdfbb 13164if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13165 gdb_cv_thread_db_h_has_td_version=yes
13166else
81ecdfbb 13167 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13168
13169fi
81ecdfbb 13170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13171
13172fi
81ecdfbb
RW
13173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13174$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13176$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13177if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13178 $as_echo_n "(cached) " >&6
59f80f10 13179else
81ecdfbb 13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13181/* end confdefs.h. */
13182#include <thread_db.h>
13183int
13184main ()
13185{
13186int i = TD_NOTLS;
13187 ;
13188 return 0;
13189}
13190_ACEOF
81ecdfbb 13191if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13192 gdb_cv_thread_db_h_has_td_notls=yes
13193else
81ecdfbb 13194 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13195
13196fi
81ecdfbb 13197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13198
13199fi
81ecdfbb
RW
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13201$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13202fi
13203if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 13204
81ecdfbb 13205$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 13206
59f80f10
DJ
13207fi
13208if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
13209
81ecdfbb 13210$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
13211
13212fi
13213if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
13214
81ecdfbb 13215$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 13216
3f47be5c
EZ
13217fi
13218
b757528f 13219if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
13220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
13221$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
13222if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
13223 $as_echo_n "(cached) " >&6
bec39cab 13224else
81ecdfbb 13225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13226/* end confdefs.h. */
b757528f 13227#include <sys/syscall.h>
bec39cab
AC
13228int
13229main ()
13230{
b757528f 13231int i = __NR_tkill;
bec39cab
AC
13232 ;
13233 return 0;
13234}
13235_ACEOF
81ecdfbb 13236if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
13237 gdb_cv_sys_syscall_h_has_tkill=yes
13238else
81ecdfbb 13239 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 13240
b757528f 13241fi
81ecdfbb 13242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 13243
bec39cab 13244fi
81ecdfbb
RW
13245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
13246$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
13247fi
13248if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 13249
81ecdfbb 13250$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
13251
13252fi
13253
81ecdfbb
RW
13254ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13255"
13256if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
13257 ac_have_decl=1
10568435 13258else
81ecdfbb 13259 ac_have_decl=0
10568435 13260fi
10568435
JK
13261
13262cat >>confdefs.h <<_ACEOF
81ecdfbb 13263#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
13264_ACEOF
13265
13266
81ecdfbb
RW
13267if test "$cross_compiling" = yes; then :
13268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13269/* end confdefs.h. */
13270#include <sys/personality.h>
13271int
13272main ()
13273{
13274
13275# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13276# define ADDR_NO_RANDOMIZE 0x0040000
13277# endif
13278 /* Test the flag could be set and stays set. */
13279 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13280 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13281 return 1
13282 ;
13283 return 0;
13284}
13285_ACEOF
81ecdfbb 13286if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
13287 have_personality=true
13288else
81ecdfbb 13289 have_personality=false
10568435 13290fi
81ecdfbb
RW
13291rm -f core conftest.err conftest.$ac_objext \
13292 conftest$ac_exeext conftest.$ac_ext
10568435 13293else
81ecdfbb 13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13295/* end confdefs.h. */
13296#include <sys/personality.h>
13297int
13298main ()
13299{
13300
13301# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13302# define ADDR_NO_RANDOMIZE 0x0040000
13303# endif
13304 /* Test the flag could be set and stays set. */
13305 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13306 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13307 return 1
13308 ;
13309 return 0;
13310}
13311_ACEOF
81ecdfbb 13312if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
13313 have_personality=true
13314else
81ecdfbb 13315 have_personality=false
10568435 13316fi
81ecdfbb
RW
13317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 13319fi
81ecdfbb 13320
10568435
JK
13321if $have_personality
13322then
13323
81ecdfbb 13324$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
13325
13326fi
13327
fb40c209 13328
b14b1491 13329target_sysroot_reloc=0
bec39cab 13330
81ecdfbb
RW
13331# Check whether --with-sysroot was given.
13332if test "${with_sysroot+set}" = set; then :
13333 withval=$with_sysroot;
030292b7 13334 case ${with_sysroot} in
715d1656 13335 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
13336 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
13337 esac
13338
13339 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
13340
07abfebf
RS
13341 if test "x$prefix" = xNONE; then
13342 test_prefix=/usr/local
13343 else
13344 test_prefix=$prefix
13345 fi
aa28a74e 13346 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 13347 test_exec_prefix=$test_prefix
030292b7 13348 else
07abfebf 13349 test_exec_prefix=$exec_prefix
030292b7
DJ
13350 fi
13351 case ${TARGET_SYSTEM_ROOT} in
715d1656 13352 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
13353 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
13354 '${prefix}'|'${prefix}/'*|\
715d1656 13355 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 13356 target_sysroot_reloc=1
030292b7
DJ
13357 ;;
13358 esac
13359
13360else
bec39cab 13361
030292b7
DJ
13362 TARGET_SYSTEM_ROOT=
13363 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
13364
81ecdfbb 13365fi
b14b1491 13366
81ecdfbb 13367TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
13368
13369
13370
16e7150e 13371
16e7150e 13372
81ecdfbb
RW
13373# Check whether --with-system-gdbinit was given.
13374if test "${with_system_gdbinit+set}" = set; then :
13375 withval=$with_system_gdbinit;
b14b1491
TT
13376 SYSTEM_GDBINIT=$withval
13377else
13378 SYSTEM_GDBINIT=
81ecdfbb
RW
13379fi
13380
16e7150e
JG
13381
13382 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13384 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13385 ac_define_dir=`eval echo $ac_define_dir`
13386
13387cat >>confdefs.h <<_ACEOF
13388#define SYSTEM_GDBINIT "$ac_define_dir"
13389_ACEOF
13390
13391
13392
b14b1491
TT
13393 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13394 if test "x$prefix" = xNONE; then
13395 test_prefix=/usr/local
13396 else
13397 test_prefix=$prefix
13398 fi
13399 else
13400 test_prefix=$exec_prefix
13401 fi
13402 value=0
13403 case ${ac_define_dir} in
13404 "${test_prefix}"|"${test_prefix}/"*|\
13405 '${exec_prefix}'|'${exec_prefix}/'*)
13406 value=1
13407 ;;
13408 esac
16e7150e 13409
b14b1491
TT
13410cat >>confdefs.h <<_ACEOF
13411#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13412_ACEOF
13413
b14b1491 13414
16e7150e 13415
81ecdfbb
RW
13416# Check whether --enable-werror was given.
13417if test "${enable_werror+set}" = set; then :
13418 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13419 yes | y) ERROR_ON_WARNING="yes" ;;
13420 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13421 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13422 esac
81ecdfbb
RW
13423fi
13424
094a342e
MK
13425
13426# Enable -Werror by default when using gcc
13427if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
13428 ERROR_ON_WARNING=yes
13429fi
13430
13431WERROR_CFLAGS=""
13432if test "${ERROR_ON_WARNING}" = yes ; then
13433 WERROR_CFLAGS="-Werror"
13434fi
13435
aa79a185
DJ
13436# The entries after -Wno-pointer-sign are disabled warnings which may
13437# be enabled in the future, which can not currently be used to build
13438# GDB.
13439# NOTE: If you change this list, remember to update
3b851bce 13440# gdb/doc/gdbint.texinfo.
aa79a185
DJ
13441build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
13442-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
13443-Wno-unused -Wunused-value -Wunused-function \
13444-Wno-switch -Wno-char-subscripts"
a3b362c4 13445
3526781e
DJ
13446# Enable -Wno-format by default when using gcc on mingw since many
13447# GCC versions complain about %I64.
13448case "${host}" in
13449 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
13450esac
13451
81ecdfbb
RW
13452# Check whether --enable-build-warnings was given.
13453if test "${enable_build_warnings+set}" = set; then :
13454 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13455 yes) ;;
13456 no) build_warnings="-w";;
13457 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13458 build_warnings="${build_warnings} ${t}";;
13459 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13460 build_warnings="${t} ${build_warnings}";;
13461 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13462esac
d4f3574e 13463if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13464 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13465fi
81ecdfbb
RW
13466fi
13467# Check whether --enable-gdb-build-warnings was given.
13468if test "${enable_gdb_build_warnings+set}" = set; then :
13469 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13470 yes) ;;
13471 no) build_warnings="-w";;
13472 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13473 build_warnings="${build_warnings} ${t}";;
13474 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13475 build_warnings="${t} ${build_warnings}";;
13476 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13477esac
13478if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13479 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13480fi
81ecdfbb
RW
13481fi
13482WARN_CFLAGS=""
c906108c
SS
13483if test "x${build_warnings}" != x -a "x$GCC" = xyes
13484then
81ecdfbb
RW
13485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13486$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13487 # Separate out the -Werror flag as some files just cannot be
13488 # compiled with it enabled.
13489 for w in ${build_warnings}; do
13490 case $w in
13491 -Werr*) WERROR_CFLAGS=-Werror ;;
13492 *) # Check that GCC accepts it
4536bbc6
AC
13493 saved_CFLAGS="$CFLAGS"
13494 CFLAGS="$CFLAGS $w"
81ecdfbb 13495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13496/* end confdefs.h. */
4536bbc6 13497
bec39cab
AC
13498int
13499main ()
13500{
4536bbc6 13501
bec39cab
AC
13502 ;
13503 return 0;
13504}
13505_ACEOF
81ecdfbb 13506if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13507 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13508fi
81ecdfbb 13509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13510 CFLAGS="$saved_CFLAGS"
746a987d
AC
13511 esac
13512 done
81ecdfbb
RW
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13514$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13515fi
13516
13517
104c1213 13518
7a292a7a 13519# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13521$as_echo_n "checking for cygwin... " >&6; }
13522if test "${gdb_cv_os_cygwin+set}" = set; then :
13523 $as_echo_n "(cached) " >&6
bec39cab 13524else
81ecdfbb 13525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13526/* end confdefs.h. */
7a292a7a
SS
13527
13528#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13529lose
13530#endif
bec39cab 13531_ACEOF
7a292a7a 13532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 13533 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
13534 gdb_cv_os_cygwin=yes
13535else
7a292a7a
SS
13536 gdb_cv_os_cygwin=no
13537fi
13538rm -f conftest*
13539
13540fi
81ecdfbb
RW
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13542$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13543
aff38e61 13544
3eb25fda 13545SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13546case ${host} in
95cbc983
AC
13547 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13548 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13549 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13550esac
13551
13552
cd0fc7c3
SS
13553# libreadline needs libuser32.a in a cygwin environment
13554WIN32LIBS=
13555if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13556 WIN32LIBS="-luser32"
13557 case "${target}" in
13558 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13559 ;;
13560 esac
cd0fc7c3 13561fi
c906108c 13562
b4505029
MM
13563# The ser-tcp.c module requires sockets.
13564case ${host} in
13565 *mingw32*)
13566
81ecdfbb 13567$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13568
13569 WIN32LIBS="$WIN32LIBS -lws2_32"
13570 ;;
13571esac
13572
7a292a7a 13573
31d99776
DJ
13574# Add ELF support to GDB, but only if BFD includes ELF support.
13575OLD_CFLAGS=$CFLAGS
13576OLD_LDFLAGS=$LDFLAGS
13577OLD_LIBS=$LIBS
cab58a69 13578CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 13579LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 13580intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 13581LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
13582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13583$as_echo_n "checking for ELF support in BFD... " >&6; }
13584if test "${gdb_cv_var_elf+set}" = set; then :
13585 $as_echo_n "(cached) " >&6
31d99776 13586else
81ecdfbb 13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13588/* end confdefs.h. */
13589#include <stdlib.h>
13590#include "bfd.h"
13591#include "elf-bfd.h"
13592
13593int
13594main ()
13595{
13596bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
13597 ;
13598 return 0;
13599}
13600_ACEOF
81ecdfbb 13601if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13602 gdb_cv_var_elf=yes
13603else
81ecdfbb 13604 gdb_cv_var_elf=no
31d99776 13605fi
81ecdfbb
RW
13606rm -f core conftest.err conftest.$ac_objext \
13607 conftest$ac_exeext conftest.$ac_ext
31d99776 13608fi
81ecdfbb
RW
13609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13610$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
13611if test $gdb_cv_var_elf = yes; then
13612 CONFIG_OBS="$CONFIG_OBS elfread.o"
13613
81ecdfbb 13614$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776
DJ
13615
13616fi
13617CFLAGS=$OLD_CFLAGS
13618LDFLAGS=$OLD_LDFLAGS
13619LIBS=$OLD_LIBS
13620
121ce6e5
DJ
13621# Add any host-specific objects to GDB.
13622CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13623
3fc11d3e
JM
13624LIBGUI="../libgui/src/libgui.a"
13625GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13626
13627
7a292a7a 13628
3fc11d3e
JM
13629WIN32LDAPP=
13630
13631
13632
d91670b9 13633case "${host}" in
686a5eed 13634*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13635 configdir="win"
13636 ;;
13637*)
13638 configdir="unix"
13639 ;;
13640esac
3fc11d3e
JM
13641
13642GDBTKLIBS=
13643if test "${enable_gdbtk}" = "yes"; then
13644
d1c3b63a
KS
13645 # Gdbtk must have an absolute path to srcdir in order to run
13646 # properly when not installed.
13647 here=`pwd`
13648 cd ${srcdir}
13649 GDBTK_SRC_DIR=`pwd`
13650 cd $here
13651
bec39cab 13652
5062cc19
KS
13653 #
13654 # Ok, lets find the tcl configuration
13655 # First, look for one uninstalled.
13656 # the alternative search directory is invoked by --with-tcl
13657 #
3fc11d3e 13658
5062cc19
KS
13659 if test x"${no_tcl}" = x ; then
13660 # we reset no_tcl in case something fails here
13661 no_tcl=true
bec39cab 13662
81ecdfbb
RW
13663# Check whether --with-tcl was given.
13664if test "${with_tcl+set}" = set; then :
13665 withval=$with_tcl; with_tclconfig=${withval}
13666fi
13667
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13669$as_echo_n "checking for Tcl configuration... " >&6; }
13670 if test "${ac_cv_c_tclconfig+set}" = set; then :
13671 $as_echo_n "(cached) " >&6
3fc11d3e 13672else
bec39cab 13673
3fc11d3e 13674
5062cc19
KS
13675 # First check to see if --with-tcl was specified.
13676 case "${host}" in
13677 *-*-cygwin*) platDir="win" ;;
13678 *) platDir="unix" ;;
13679 esac
13680 if test x"${with_tclconfig}" != x ; then
13681 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13682 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13683 else
81ecdfbb 13684 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13685 fi
13686 fi
13687
13688 # then check for a private Tcl installation
13689 if test x"${ac_cv_c_tclconfig}" = x ; then
13690 for i in \
13691 ../tcl \
13692 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13693 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13694 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13695 ../../tcl \
13696 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13697 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13698 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13699 ../../../tcl \
13700 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13701 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13702 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13703 if test -f "$i/$platDir/tclConfig.sh" ; then
13704 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13705 break
13706 fi
13707 done
13708 fi
13709
13710 # on Darwin, check in Framework installation locations
13711 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13712 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13713 `ls -d /Library/Frameworks 2>/dev/null` \
13714 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13715 `ls -d /System/Library/Frameworks 2>/dev/null` \
13716 ; do
13717 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13718 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13719 break
13720 fi
13721 done
13722 fi
13723
13724 # check in a few common install locations
13725 if test x"${ac_cv_c_tclconfig}" = x ; then
13726 for i in `ls -d ${libdir} 2>/dev/null` \
13727 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13728 `ls -d ${prefix}/lib 2>/dev/null` \
13729 `ls -d /usr/local/lib 2>/dev/null` \
13730 `ls -d /usr/contrib/lib 2>/dev/null` \
13731 `ls -d /usr/lib 2>/dev/null` \
13732 ; do
13733 if test -f "$i/tclConfig.sh" ; then
13734 ac_cv_c_tclconfig=`(cd $i; pwd)`
13735 break
13736 fi
13737 done
13738 fi
3fc11d3e 13739
5062cc19
KS
13740 # check in a few other private locations
13741 if test x"${ac_cv_c_tclconfig}" = x ; then
13742 for i in \
13743 ${srcdir}/../tcl \
13744 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13745 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13746 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13747 if test -f "$i/$platDir/tclConfig.sh" ; then
13748 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13749 break
13750 fi
13751 done
13752 fi
bec39cab 13753
3fc11d3e
JM
13754fi
13755
5062cc19
KS
13756
13757 if test x"${ac_cv_c_tclconfig}" = x ; then
13758 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13760$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13761 else
13762 no_tcl=
13763 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13765$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13766 fi
13767 fi
3fc11d3e 13768
bec39cab 13769
85541719
DE
13770 # If $no_tk is nonempty, then we can't do Tk, and there is no
13771 # point to doing Tcl.
bec39cab 13772
5062cc19
KS
13773 #
13774 # Ok, lets find the tk configuration
13775 # First, look for one uninstalled.
13776 # the alternative search directory is invoked by --with-tk
13777 #
3fc11d3e 13778
5062cc19
KS
13779 if test x"${no_tk}" = x ; then
13780 # we reset no_tk in case something fails here
13781 no_tk=true
bec39cab 13782
81ecdfbb
RW
13783# Check whether --with-tk was given.
13784if test "${with_tk+set}" = set; then :
13785 withval=$with_tk; with_tkconfig=${withval}
13786fi
13787
13788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13789$as_echo_n "checking for Tk configuration... " >&6; }
13790 if test "${ac_cv_c_tkconfig+set}" = set; then :
13791 $as_echo_n "(cached) " >&6
bec39cab 13792else
3fc11d3e
JM
13793
13794
5062cc19
KS
13795 # First check to see if --with-tkconfig was specified.
13796 if test x"${with_tkconfig}" != x ; then
13797 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13798 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13799 else
81ecdfbb 13800 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13801 fi
13802 fi
3fc11d3e 13803
5062cc19
KS
13804 # then check for a private Tk library
13805 case "${host}" in
13806 *-*-cygwin*) platDir="win" ;;
13807 *) platDir="unix" ;;
13808 esac
13809 if test x"${ac_cv_c_tkconfig}" = x ; then
13810 for i in \
13811 ../tk \
13812 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13813 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13814 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13815 ../../tk \
13816 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13817 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13818 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13819 ../../../tk \
13820 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13821 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13822 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13823 if test -f "$i/$platDir/tkConfig.sh" ; then
13824 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13825 break
13826 fi
13827 done
13828 fi
13829
13830 # on Darwin, check in Framework installation locations
13831 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13832 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13833 `ls -d /Library/Frameworks 2>/dev/null` \
13834 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13835 `ls -d /System/Library/Frameworks 2>/dev/null` \
13836 ; do
13837 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13838 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13839 break
13840 fi
13841 done
13842 fi
13843
13844 # check in a few common install locations
13845 if test x"${ac_cv_c_tkconfig}" = x ; then
13846 for i in `ls -d ${libdir} 2>/dev/null` \
13847 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13848 `ls -d ${prefix}/lib 2>/dev/null` \
13849 `ls -d /usr/local/lib 2>/dev/null` \
13850 `ls -d /usr/contrib/lib 2>/dev/null` \
13851 `ls -d /usr/lib 2>/dev/null` \
13852 ; do
13853 if test -f "$i/tkConfig.sh" ; then
13854 ac_cv_c_tkconfig=`(cd $i; pwd)`
13855 break
13856 fi
13857 done
13858 fi
13859 # check in a few other private locations
13860 if test x"${ac_cv_c_tkconfig}" = x ; then
13861 for i in \
13862 ${srcdir}/../tk \
13863 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13864 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13865 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13866 if test -f "$i/$platDir/tkConfig.sh" ; then
13867 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13868 break
13869 fi
13870 done
13871 fi
3fc11d3e 13872
3fc11d3e
JM
13873fi
13874
13875
5062cc19
KS
13876 if test x"${ac_cv_c_tkconfig}" = x ; then
13877 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13879$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13880 else
13881 no_tk=
13882 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13884$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13885 fi
3fc11d3e 13886 fi
dd2504ab 13887
dd2504ab 13888
85541719
DE
13889 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13890
81ecdfbb
RW
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13892$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13893
13894 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13896$as_echo "loading" >&6; }
85541719
DE
13897 . ${TCL_BIN_DIR}/tclConfig.sh
13898 else
81ecdfbb
RW
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13900$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13901 fi
13902
13903 # eval is required to do the TCL_DBGX substitution
13904 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13905 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13906
13907 # If the TCL_BIN_DIR is the build directory (not the install directory),
13908 # then set the common variable name to the value of the build variables.
13909 # For example, the variable TCL_LIB_SPEC will be set to the value
13910 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13911 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13912 # installed and uninstalled version of Tcl.
13913 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13914 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13915 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13916 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13917 elif test "`uname -s`" = "Darwin"; then
13918 # If Tcl was built as a framework, attempt to use the libraries
13919 # from the framework at the given location so that linking works
13920 # against Tcl.framework installed in an arbitary location.
13921 case ${TCL_DEFS} in
13922 *TCL_FRAMEWORK*)
13923 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13924 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13925 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13926 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13927 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13928 break
13929 fi
13930 done
13931 fi
13932 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13933 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13934 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13935 fi
13936 ;;
13937 esac
13938 fi
13939
13940 # eval is required to do the TCL_DBGX substitution
13941 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13942 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13943 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13944 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960 # Check for in-tree tcl
13961 here=`pwd`
13962 cd ${srcdir}/..
13963 topdir=`pwd`
13964 cd ${here}
13965
13966 intree="no"
13967 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13968 intree="yes"
13969 fi
13970
13971 # Find Tcl private headers
13972 if test x"${intree}" = xno; then
13973
81ecdfbb
RW
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13975$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13976 private_dir=""
13977 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13978 if test -f ${dir}/tclInt.h ; then
13979 private_dir=${dir}
13980 fi
13981
13982 if test x"${private_dir}" = x; then
81ecdfbb 13983 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13984 else
13985 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13987$as_echo "${private_dir}" >&6; }
85541719
DE
13988 fi
13989
13990 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13991 TCL_LIBRARY="${TCL_LIB_SPEC}"
13992 TCL_DEPS=""
13993 else
13994 # If building tcl in the same src tree, private headers
13995 # are not needed, but we need to be sure to use the right
13996 # headers library
13997 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13998 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13999 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14000 fi
14001
14002
14003
14004
14005
81ecdfbb
RW
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14007$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14008
5062cc19 14009 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14011$as_echo "loading" >&6; }
5062cc19 14012 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14013 else
81ecdfbb
RW
14014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14015$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14016 fi
bec39cab 14017
5062cc19
KS
14018 # eval is required to do the TK_DBGX substitution
14019 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14020 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14021
14022 # If the TK_BIN_DIR is the build directory (not the install directory),
14023 # then set the common variable name to the value of the build variables.
14024 # For example, the variable TK_LIB_SPEC will be set to the value
14025 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14026 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14027 # installed and uninstalled version of Tcl.
85541719 14028 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14029 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14030 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14031 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14032 elif test "`uname -s`" = "Darwin"; then
14033 # If Tk was built as a framework, attempt to use the libraries
14034 # from the framework at the given location so that linking works
14035 # against Tk.framework installed in an arbitary location.
14036 case ${TK_DEFS} in
14037 *TK_FRAMEWORK*)
85541719 14038 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14039 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14040 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14041 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14042 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14043 break
14044 fi
14045 done
14046 fi
85541719 14047 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14048 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14049 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14050 fi
14051 ;;
14052 esac
3fc11d3e
JM
14053 fi
14054
5062cc19
KS
14055 # eval is required to do the TK_DBGX substitution
14056 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14057 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14058 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14059 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14060
3fc11d3e
JM
14061
14062
bec39cab
AC
14063
14064
14065
14066
14067
14068
14069
3fc11d3e 14070
3fc11d3e 14071
bec39cab 14072
bec39cab 14073
85541719
DE
14074 # Check for in-tree Tk
14075 intree="no"
14076 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14077 intree="yes"
14078 fi
3fc11d3e 14079
85541719
DE
14080 # Find Tk private headers
14081 if test x"${intree}" = xno; then
3fc11d3e 14082
81ecdfbb
RW
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14084$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14085 private_dir=""
14086 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14087 if test -f ${dir}/tkInt.h; then
14088 private_dir=${dir}
3fc11d3e 14089 fi
bec39cab 14090
5062cc19 14091 if test x"${private_dir}" = x; then
81ecdfbb 14092 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14093 else
5062cc19 14094 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14096$as_echo "${private_dir}" >&6; }
3fc11d3e 14097 fi
3fc11d3e 14098
85541719
DE
14099 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14100 TK_LIBRARY=${TK_LIB_SPEC}
14101 TK_DEPS=""
14102 else
14103 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14104 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14105 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14106 fi
3fc11d3e
JM
14107
14108
3fc11d3e
JM
14109
14110
3fc11d3e 14111
85541719 14112 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14113
85541719
DE
14114 # Include some libraries that Tcl and Tk want.
14115 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14116 # Yes, the ordering seems wrong here. But it isn't.
14117 # TK_LIBS is the list of libraries that need to be linked
14118 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14119 # were in LIBS then any link tests after this point would
14120 # try to include things like `$(LIBGUI)', which wouldn't work.
14121 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14122
85541719
DE
14123 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14124 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14125 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14126 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14127 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14128 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14129 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14130
85541719
DE
14131 if test x$gdb_cv_os_cygwin = xyes; then
14132 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14133 WIN32LDAPP="-Wl,--subsystem,console"
14134 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14135 fi
ffc6a242 14136
81ecdfbb 14137 subdirs="$subdirs gdbtk"
3ace7edb 14138
85541719 14139 fi
3fc11d3e
JM
14140fi
14141
14142
14143
14144
14145
14146
14147
14148
81ecdfbb
RW
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14150$as_echo_n "checking for X... " >&6; }
bec39cab 14151
c906108c 14152
81ecdfbb
RW
14153# Check whether --with-x was given.
14154if test "${with_x+set}" = set; then :
14155 withval=$with_x;
14156fi
c906108c
SS
14157
14158# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14159if test "x$with_x" = xno; then
14160 # The user explicitly disabled X.
14161 have_x=disabled
14162else
81ecdfbb
RW
14163 case $x_includes,$x_libraries in #(
14164 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14165 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14166 $as_echo_n "(cached) " >&6
c906108c
SS
14167else
14168 # One or both of the vars are not set, and there is no cached value.
bec39cab 14169ac_x_includes=no ac_x_libraries=no
81ecdfbb 14170rm -f -r conftest.dir
bec39cab
AC
14171if mkdir conftest.dir; then
14172 cd conftest.dir
bec39cab 14173 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14174incroot:
14175 @echo incroot='${INCROOT}'
14176usrlibdir:
14177 @echo usrlibdir='${USRLIBDIR}'
14178libdir:
14179 @echo libdir='${LIBDIR}'
14180_ACEOF
14181 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14182 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14183 for ac_var in incroot usrlibdir libdir; do
14184 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14185 done
c906108c 14186 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14187 for ac_extension in a so sl dylib la dll; do
14188 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14189 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14190 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14191 fi
14192 done
14193 # Screen out bogus values from the imake configuration. They are
14194 # bogus both because they are the default anyway, and because
14195 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14196 case $ac_im_incroot in
81ecdfbb 14197 /usr/include) ac_x_includes= ;;
bec39cab 14198 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14199 esac
bec39cab 14200 case $ac_im_usrlibdir in
81ecdfbb 14201 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14202 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14203 esac
14204 fi
14205 cd ..
81ecdfbb 14206 rm -f -r conftest.dir
c906108c
SS
14207fi
14208
bec39cab
AC
14209# Standard set of common directories for X headers.
14210# Check X11 before X11Rn because it is often a symlink to the current release.
14211ac_x_header_dirs='
14212/usr/X11/include
81ecdfbb 14213/usr/X11R7/include
bec39cab
AC
14214/usr/X11R6/include
14215/usr/X11R5/include
14216/usr/X11R4/include
14217
14218/usr/include/X11
81ecdfbb 14219/usr/include/X11R7
bec39cab
AC
14220/usr/include/X11R6
14221/usr/include/X11R5
14222/usr/include/X11R4
14223
14224/usr/local/X11/include
81ecdfbb 14225/usr/local/X11R7/include
bec39cab
AC
14226/usr/local/X11R6/include
14227/usr/local/X11R5/include
14228/usr/local/X11R4/include
14229
14230/usr/local/include/X11
81ecdfbb 14231/usr/local/include/X11R7
bec39cab
AC
14232/usr/local/include/X11R6
14233/usr/local/include/X11R5
14234/usr/local/include/X11R4
14235
14236/usr/X386/include
14237/usr/x386/include
14238/usr/XFree86/include/X11
14239
14240/usr/include
14241/usr/local/include
14242/usr/unsupported/include
14243/usr/athena/include
14244/usr/local/x11r5/include
14245/usr/lpp/Xamples/include
14246
14247/usr/openwin/include
14248/usr/openwin/share/include'
14249
14250if test "$ac_x_includes" = no; then
81ecdfbb 14251 # Guess where to find include files, by looking for Xlib.h.
c906108c 14252 # First, try using that file with no special directory specified.
81ecdfbb 14253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14254/* end confdefs.h. */
81ecdfbb 14255#include <X11/Xlib.h>
bec39cab 14256_ACEOF
81ecdfbb 14257if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14258 # We can compile using X headers with no special include directory.
14259ac_x_includes=
14260else
bec39cab 14261 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14262 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14263 ac_x_includes=$ac_dir
14264 break
14265 fi
14266done
c906108c 14267fi
bec39cab
AC
14268rm -f conftest.err conftest.$ac_ext
14269fi # $ac_x_includes = no
c906108c 14270
bec39cab 14271if test "$ac_x_libraries" = no; then
c906108c 14272 # Check for the libraries.
c906108c
SS
14273 # See if we find them without any special options.
14274 # Don't add to $LIBS permanently.
bec39cab 14275 ac_save_LIBS=$LIBS
81ecdfbb
RW
14276 LIBS="-lX11 $LIBS"
14277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14278/* end confdefs.h. */
81ecdfbb 14279#include <X11/Xlib.h>
bec39cab
AC
14280int
14281main ()
14282{
81ecdfbb 14283XrmInitialize ()
bec39cab
AC
14284 ;
14285 return 0;
14286}
14287_ACEOF
81ecdfbb 14288if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14289 LIBS=$ac_save_LIBS
c906108c
SS
14290# We can link X programs with no special library path.
14291ac_x_libraries=
14292else
81ecdfbb
RW
14293 LIBS=$ac_save_LIBS
14294for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14295do
bec39cab 14296 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14297 for ac_extension in a so sl dylib la dll; do
14298 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14299 ac_x_libraries=$ac_dir
14300 break 2
14301 fi
14302 done
14303done
14304fi
81ecdfbb
RW
14305rm -f core conftest.err conftest.$ac_objext \
14306 conftest$ac_exeext conftest.$ac_ext
bec39cab 14307fi # $ac_x_libraries = no
c906108c 14308
81ecdfbb
RW
14309case $ac_x_includes,$ac_x_libraries in #(
14310 no,* | *,no | *\'*)
14311 # Didn't find X, or a directory has "'" in its name.
14312 ac_cv_have_x="have_x=no";; #(
14313 *)
14314 # Record where we found X for the cache.
14315 ac_cv_have_x="have_x=yes\
14316 ac_x_includes='$ac_x_includes'\
14317 ac_x_libraries='$ac_x_libraries'"
14318esac
c906108c 14319fi
81ecdfbb
RW
14320;; #(
14321 *) have_x=yes;;
14322 esac
c906108c
SS
14323 eval "$ac_cv_have_x"
14324fi # $with_x != no
14325
14326if test "$have_x" != yes; then
81ecdfbb
RW
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14328$as_echo "$have_x" >&6; }
c906108c
SS
14329 no_x=yes
14330else
14331 # If each of the values was on the command line, it overrides each guess.
14332 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14333 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14334 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14335 ac_cv_have_x="have_x=yes\
14336 ac_x_includes='$x_includes'\
14337 ac_x_libraries='$x_libraries'"
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14339$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14340fi
14341
14342
bec39cab 14343# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14344# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14345# This code just checks for a few cases where we'd like to ignore those
14346# definitions, even when they're present in the '.mt' file. These cases
14347# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14348# not part of the source tree.
7a292a7a 14349#
81ecdfbb
RW
14350# Check whether --enable-sim was given.
14351if test "${enable_sim+set}" = set; then :
14352 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14353 echo "enableval = ${enableval}";
14354 case "${enableval}" in
14355 yes) ignore_sim=false ;;
14356 no) ignore_sim=true ;;
14357 *) ignore_sim=false ;;
14358 esac
14359else
14360 ignore_sim=false
81ecdfbb
RW
14361fi
14362
7a292a7a
SS
14363
14364if test ! -d "${srcdir}/../sim"; then
14365 ignore_sim=true
14366fi
14367
9b624dbe
UW
14368SIM=
14369SIM_OBS=
14370if test "${ignore_sim}" = "false"; then
14371 if test x"${gdb_sim}" != x ; then
14372 SIM="${gdb_sim}"
14373 SIM_OBS="remote-sim.o"
60ca704f 14374
81ecdfbb 14375$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14376
9b624dbe 14377 fi
7a292a7a
SS
14378fi
14379
14380
14381
c906108c
SS
14382
14383
14384
14385
14386
14387
dfcd3bfb 14388
e56ac5c3
AC
14389
14390
b3a90332
AC
14391
14392
c35f4ffc 14393# List of host floatformats.
bec39cab
AC
14394
14395cat >>confdefs.h <<_ACEOF
c35f4ffc 14396#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14397_ACEOF
c35f4ffc 14398
bec39cab
AC
14399
14400cat >>confdefs.h <<_ACEOF
c35f4ffc 14401#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14402_ACEOF
14403
c35f4ffc 14404
bec39cab 14405cat >>confdefs.h <<_ACEOF
c35f4ffc 14406#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14407_ACEOF
c35f4ffc
AC
14408
14409
c906108c
SS
14410# target_subdir is used by the testsuite to find the target libraries.
14411target_subdir=
14412if test "${host}" != "${target}"; then
14413 target_subdir="${target_alias}/"
14414fi
14415
14416
14417frags=
771b4502 14418if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14419 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14420 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14421 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14422 fi
14423 frags="$frags $host_makefile_frag"
14424else
14425 host_makefile_frag=/dev/null
c906108c 14426fi
c906108c 14427
c906108c
SS
14428
14429
14430
771b4502 14431if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14432# We pick this up from the host configuration file (.mh) because we
14433# do not have a native configuration Makefile fragment.
c906108c
SS
14434nativefile=`sed -n '
14435s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14436' ${host_makefile_frag}`
c906108c
SS
14437fi
14438
14439
b00a8037 14440if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14441
14442cat >>confdefs.h <<_ACEOF
b00a8037 14443#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14444_ACEOF
b00a8037
DJ
14445
14446fi
14447
8dcde887 14448# Enable multi-ice-gdb-server.
81ecdfbb
RW
14449# Check whether --enable-multi-ice was given.
14450if test "${enable_multi_ice+set}" = set; then :
14451 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14452 yes | no)
14453 ;;
81ecdfbb 14454 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14455 esac
81ecdfbb 14456fi
b4e70030 14457
81ecdfbb
RW
14458if test "x$enable_multi_ice" = xyes; then
14459 subdirs="$subdirs multi-ice"
3ace7edb 14460
a85f51e7
DJ
14461fi
14462
a13e2c95
UW
14463# We only build gdbserver automatically in a native configuration.
14464if test "$gdb_native" = "yes"; then
81ecdfbb
RW
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14466$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14467 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14469$as_echo "yes" >&6; }
14470 subdirs="$subdirs gdbserver"
3ace7edb 14471
8dcde887 14472 else
81ecdfbb
RW
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14474$as_echo "no" >&6; }
8dcde887
MK
14475 fi
14476fi
14477
db985757 14478# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14479# to an empty version.
c906108c
SS
14480
14481files=
14482links=
5a2402b8 14483
c906108c
SS
14484rm -f nm.h
14485if test "${nativefile}" != ""; then
0f475e27
AC
14486 case "${nativefile}" in
14487 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14488 * ) GDB_NM_FILE="${nativefile}"
14489 esac
5a2402b8
AC
14490 files="${files} ${GDB_NM_FILE}"
14491 links="${links} nm.h"
60ca704f
SE
14492
14493cat >>confdefs.h <<_ACEOF
b78960be 14494#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14495_ACEOF
5a2402b8 14496
c906108c 14497fi
5a2402b8
AC
14498
14499
bec39cab
AC
14500ac_sources="$files"
14501ac_dests="$links"
14502while test -n "$ac_sources"; do
14503 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14504 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14505 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14506done
81ecdfbb 14507ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14508
14509
c906108c
SS
14510
14511
c906108c 14512
81ecdfbb 14513$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14514
bec39cab 14515
81ecdfbb
RW
14516ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
14517
14518ac_config_commands="$ac_config_commands default"
89a34d1b 14519
bec39cab
AC
14520cat >confcache <<\_ACEOF
14521# This file is a shell script that caches the results of configure
14522# tests run on this system so they can be shared between configure
14523# scripts and configure runs, see configure's option --config-cache.
14524# It is not useful on other systems. If it contains results you don't
14525# want to keep, you may remove or edit it.
14526#
14527# config.status only pays attention to the cache file if you give it
14528# the --recheck option to rerun configure.
14529#
14530# `ac_cv_env_foo' variables (set or unset) will be overridden when
14531# loading this file, other *unset* `ac_cv_foo' will be assigned the
14532# following values.
14533
14534_ACEOF
14535
14536# The following way of writing the cache mishandles newlines in values,
14537# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14538# So, we kill variables containing newlines.
bec39cab
AC
14539# Ultrix sh set writes to stderr and can't be redirected directly,
14540# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14541(
14542 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14543 eval ac_val=\$$ac_var
14544 case $ac_val in #(
14545 *${as_nl}*)
14546 case $ac_var in #(
14547 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14548$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14549 esac
14550 case $ac_var in #(
14551 _ | IFS | as_nl) ;; #(
14552 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14553 *) { eval $ac_var=; unset $ac_var;} ;;
14554 esac ;;
14555 esac
14556 done
14557
bec39cab 14558 (set) 2>&1 |
81ecdfbb
RW
14559 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14560 *${as_nl}ac_space=\ *)
14561 # `set' does not quote correctly, so add quotes: double-quote
14562 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14563 sed -n \
14564 "s/'/'\\\\''/g;
14565 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14566 ;; #(
bec39cab
AC
14567 *)
14568 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14569 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14570 ;;
81ecdfbb
RW
14571 esac |
14572 sort
14573) |
bec39cab 14574 sed '
81ecdfbb 14575 /^ac_cv_env_/b end
bec39cab 14576 t clear
81ecdfbb 14577 :clear
bec39cab
AC
14578 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14579 t end
81ecdfbb
RW
14580 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14581 :end' >>confcache
14582if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14583 if test -w "$cache_file"; then
14584 test "x$cache_file" != "x/dev/null" &&
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14586$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14587 cat confcache >$cache_file
14588 else
81ecdfbb
RW
14589 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14590$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14591 fi
14592fi
14593rm -f confcache
14594
14595test "x$prefix" = xNONE && prefix=$ac_default_prefix
14596# Let make expand exec_prefix.
14597test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14598
bec39cab
AC
14599DEFS=-DHAVE_CONFIG_H
14600
14601ac_libobjs=
14602ac_ltlibobjs=
14603for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14604 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14605 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14606 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14607 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14608 # will be set to the directory where LIBOBJS objects are built.
14609 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14610 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14611done
14612LIBOBJS=$ac_libobjs
14613
14614LTLIBOBJS=$ac_ltlibobjs
14615
14616
85981d60 14617if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14618 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14619Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14620fi
a417dc56 14621if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14622 as_fn_error "conditional \"GMAKE\" was never defined.
14623Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14624fi
783e057b 14625if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
14626 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
14627Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
14628fi
14629
14630 gl_libobjs=
14631 gl_ltlibobjs=
14632 if test -n "$gl_LIBOBJS"; then
14633 # Remove the extension.
14634 sed_drop_objext='s/\.o$//;s/\.obj$//'
14635 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14636 gl_libobjs="$gl_libobjs $i.$ac_objext"
14637 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
14638 done
14639 fi
14640 gl_LIBOBJS=$gl_libobjs
14641
14642 gl_LTLIBOBJS=$gl_ltlibobjs
14643
14644
14645
14646 gltests_libobjs=
14647 gltests_ltlibobjs=
14648 if test -n "$gltests_LIBOBJS"; then
14649 # Remove the extension.
14650 sed_drop_objext='s/\.o$//;s/\.obj$//'
14651 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
14652 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
14653 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
14654 done
14655 fi
14656 gltests_LIBOBJS=$gltests_libobjs
14657
14658 gltests_LTLIBOBJS=$gltests_ltlibobjs
14659
14660
e28b3332 14661if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
14662 as_fn_error "conditional \"AMDEP\" was never defined.
14663Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
14664fi
14665if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
14666 as_fn_error "conditional \"am__fastdepCC\" was never defined.
14667Usually this means the macro was only invoked conditionally." "$LINENO" 5
14668fi
14669 if test -n "$EXEEXT"; then
14670 am__EXEEXT_TRUE=
14671 am__EXEEXT_FALSE='#'
14672else
14673 am__EXEEXT_TRUE='#'
14674 am__EXEEXT_FALSE=
e28b3332 14675fi
bec39cab 14676
81ecdfbb
RW
14677
14678
bec39cab 14679: ${CONFIG_STATUS=./config.status}
81ecdfbb 14680ac_write_fail=0
bec39cab
AC
14681ac_clean_files_save=$ac_clean_files
14682ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14683{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14684$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14685as_write_fail=0
14686cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14687#! $SHELL
14688# Generated by $as_me.
14689# Run this file to recreate the current configuration.
14690# Compiler output produced by configure, useful for debugging
14691# configure, is in config.log if it exists.
14692
14693debug=false
14694ac_cs_recheck=false
14695ac_cs_silent=false
bec39cab 14696
81ecdfbb
RW
14697SHELL=\${CONFIG_SHELL-$SHELL}
14698export SHELL
14699_ASEOF
14700cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14701## -------------------- ##
14702## M4sh Initialization. ##
14703## -------------------- ##
14704
14705# Be more Bourne compatible
14706DUALCASE=1; export DUALCASE # for MKS sh
14707if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14708 emulate sh
14709 NULLCMD=:
81ecdfbb 14710 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14711 # is contrary to our usage. Disable this feature.
14712 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14713 setopt NO_GLOB_SUBST
14714else
14715 case `(set -o) 2>/dev/null` in #(
14716 *posix*) :
14717 set -o posix ;; #(
14718 *) :
14719 ;;
14720esac
bec39cab 14721fi
bec39cab 14722
81ecdfbb
RW
14723
14724as_nl='
14725'
14726export as_nl
14727# Printing a long string crashes Solaris 7 /usr/bin/printf.
14728as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14729as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14730as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14731# Prefer a ksh shell builtin over an external printf program on Solaris,
14732# but without wasting forks for bash or zsh.
14733if test -z "$BASH_VERSION$ZSH_VERSION" \
14734 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14735 as_echo='print -r --'
14736 as_echo_n='print -rn --'
14737elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14738 as_echo='printf %s\n'
14739 as_echo_n='printf %s'
14740else
14741 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14742 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14743 as_echo_n='/usr/ucb/echo -n'
14744 else
14745 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14746 as_echo_n_body='eval
14747 arg=$1;
14748 case $arg in #(
14749 *"$as_nl"*)
14750 expr "X$arg" : "X\\(.*\\)$as_nl";
14751 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14752 esac;
14753 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14754 '
14755 export as_echo_n_body
14756 as_echo_n='sh -c $as_echo_n_body as_echo'
14757 fi
14758 export as_echo_body
14759 as_echo='sh -c $as_echo_body as_echo'
14760fi
14761
14762# The user is always right.
14763if test "${PATH_SEPARATOR+set}" != set; then
14764 PATH_SEPARATOR=:
14765 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14766 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14767 PATH_SEPARATOR=';'
14768 }
bec39cab
AC
14769fi
14770
14771
81ecdfbb
RW
14772# IFS
14773# We need space, tab and new line, in precisely that order. Quoting is
14774# there to prevent editors from complaining about space-tab.
14775# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14776# splitting by setting IFS to empty value.)
14777IFS=" "" $as_nl"
14778
14779# Find who we are. Look in the path if we contain no directory separator.
14780case $0 in #((
14781 *[\\/]* ) as_myself=$0 ;;
14782 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14783for as_dir in $PATH
14784do
14785 IFS=$as_save_IFS
14786 test -z "$as_dir" && as_dir=.
14787 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14788 done
14789IFS=$as_save_IFS
14790
14791 ;;
14792esac
14793# We did not find ourselves, most probably we were run as `sh COMMAND'
14794# in which case we are not to be found in the path.
14795if test "x$as_myself" = x; then
14796 as_myself=$0
14797fi
14798if test ! -f "$as_myself"; then
14799 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14800 exit 1
14801fi
14802
14803# Unset variables that we do not need and which cause bugs (e.g. in
14804# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14805# suppresses any "Segmentation fault" message there. '((' could
14806# trigger a bug in pdksh 5.2.14.
14807for as_var in BASH_ENV ENV MAIL MAILPATH
14808do eval test x\${$as_var+set} = xset \
14809 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14810done
bec39cab
AC
14811PS1='$ '
14812PS2='> '
14813PS4='+ '
14814
14815# NLS nuisances.
81ecdfbb
RW
14816LC_ALL=C
14817export LC_ALL
14818LANGUAGE=C
14819export LANGUAGE
14820
14821# CDPATH.
14822(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14823
14824
14825# as_fn_error ERROR [LINENO LOG_FD]
14826# ---------------------------------
14827# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14828# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14829# script with status $?, using 1 if that was 0.
14830as_fn_error ()
14831{
14832 as_status=$?; test $as_status -eq 0 && as_status=1
14833 if test "$3"; then
14834 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14835 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14836 fi
14837 $as_echo "$as_me: error: $1" >&2
14838 as_fn_exit $as_status
14839} # as_fn_error
14840
14841
14842# as_fn_set_status STATUS
14843# -----------------------
14844# Set $? to STATUS, without forking.
14845as_fn_set_status ()
14846{
14847 return $1
14848} # as_fn_set_status
14849
14850# as_fn_exit STATUS
14851# -----------------
14852# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14853as_fn_exit ()
14854{
14855 set +e
14856 as_fn_set_status $1
14857 exit $1
14858} # as_fn_exit
14859
14860# as_fn_unset VAR
14861# ---------------
14862# Portably unset VAR.
14863as_fn_unset ()
14864{
14865 { eval $1=; unset $1;}
14866}
14867as_unset=as_fn_unset
14868# as_fn_append VAR VALUE
14869# ----------------------
14870# Append the text in VALUE to the end of the definition contained in VAR. Take
14871# advantage of any shell optimizations that allow amortized linear growth over
14872# repeated appends, instead of the typical quadratic growth present in naive
14873# implementations.
14874if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14875 eval 'as_fn_append ()
14876 {
14877 eval $1+=\$2
14878 }'
14879else
14880 as_fn_append ()
14881 {
14882 eval $1=\$$1\$2
14883 }
14884fi # as_fn_append
14885
14886# as_fn_arith ARG...
14887# ------------------
14888# Perform arithmetic evaluation on the ARGs, and store the result in the
14889# global $as_val. Take advantage of shells that can avoid forks. The arguments
14890# must be portable across $(()) and expr.
14891if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14892 eval 'as_fn_arith ()
14893 {
14894 as_val=$(( $* ))
14895 }'
14896else
14897 as_fn_arith ()
14898 {
14899 as_val=`expr "$@" || test $? -eq 1`
14900 }
14901fi # as_fn_arith
bec39cab 14902
81ecdfbb
RW
14903
14904if expr a : '\(a\)' >/dev/null 2>&1 &&
14905 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
14906 as_expr=expr
14907else
14908 as_expr=false
14909fi
14910
81ecdfbb 14911if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
14912 as_basename=basename
14913else
14914 as_basename=false
14915fi
14916
81ecdfbb
RW
14917if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14918 as_dirname=dirname
14919else
14920 as_dirname=false
14921fi
bec39cab 14922
81ecdfbb 14923as_me=`$as_basename -- "$0" ||
bec39cab
AC
14924$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14925 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
14926 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14927$as_echo X/"$0" |
14928 sed '/^.*\/\([^/][^/]*\)\/*$/{
14929 s//\1/
14930 q
14931 }
14932 /^X\/\(\/\/\)$/{
14933 s//\1/
14934 q
14935 }
14936 /^X\/\(\/\).*/{
14937 s//\1/
14938 q
14939 }
14940 s/.*/./; q'`
b4e70030 14941
b4e70030
JB
14942# Avoid depending upon Character Ranges.
14943as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14944as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14945as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14946as_cr_digits='0123456789'
14947as_cr_alnum=$as_cr_Letters$as_cr_digits
14948
81ecdfbb
RW
14949ECHO_C= ECHO_N= ECHO_T=
14950case `echo -n x` in #(((((
14951-n*)
14952 case `echo 'xy\c'` in
14953 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14954 xy) ECHO_C='\c';;
14955 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14956 ECHO_T=' ';;
14957 esac;;
14958*)
14959 ECHO_N='-n';;
bec39cab
AC
14960esac
14961
81ecdfbb
RW
14962rm -f conf$$ conf$$.exe conf$$.file
14963if test -d conf$$.dir; then
14964 rm -f conf$$.dir/conf$$.file
bec39cab 14965else
81ecdfbb
RW
14966 rm -f conf$$.dir
14967 mkdir conf$$.dir 2>/dev/null
bec39cab 14968fi
81ecdfbb
RW
14969if (echo >conf$$.file) 2>/dev/null; then
14970 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 14971 as_ln_s='ln -s'
81ecdfbb
RW
14972 # ... but there are two gotchas:
14973 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14974 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14975 # In both cases, we have to default to `cp -p'.
14976 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14977 as_ln_s='cp -p'
14978 elif ln conf$$.file conf$$ 2>/dev/null; then
14979 as_ln_s=ln
14980 else
14981 as_ln_s='cp -p'
b4e70030 14982 fi
bec39cab
AC
14983else
14984 as_ln_s='cp -p'
14985fi
81ecdfbb
RW
14986rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14987rmdir conf$$.dir 2>/dev/null
14988
14989
14990# as_fn_mkdir_p
14991# -------------
14992# Create "$as_dir" as a directory, including parents if necessary.
14993as_fn_mkdir_p ()
14994{
14995
14996 case $as_dir in #(
14997 -*) as_dir=./$as_dir;;
14998 esac
14999 test -d "$as_dir" || eval $as_mkdir_p || {
15000 as_dirs=
15001 while :; do
15002 case $as_dir in #(
15003 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15004 *) as_qdir=$as_dir;;
15005 esac
15006 as_dirs="'$as_qdir' $as_dirs"
15007 as_dir=`$as_dirname -- "$as_dir" ||
15008$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15009 X"$as_dir" : 'X\(//\)[^/]' \| \
15010 X"$as_dir" : 'X\(//\)$' \| \
15011 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15012$as_echo X"$as_dir" |
15013 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15014 s//\1/
15015 q
15016 }
15017 /^X\(\/\/\)[^/].*/{
15018 s//\1/
15019 q
15020 }
15021 /^X\(\/\/\)$/{
15022 s//\1/
15023 q
15024 }
15025 /^X\(\/\).*/{
15026 s//\1/
15027 q
15028 }
15029 s/.*/./; q'`
15030 test -d "$as_dir" && break
15031 done
15032 test -z "$as_dirs" || eval "mkdir $as_dirs"
15033 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15034
bec39cab 15035
81ecdfbb 15036} # as_fn_mkdir_p
bec39cab 15037if mkdir -p . 2>/dev/null; then
81ecdfbb 15038 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15039else
15040 test -d ./-p && rmdir ./-p
15041 as_mkdir_p=false
15042fi
15043
81ecdfbb
RW
15044if test -x / >/dev/null 2>&1; then
15045 as_test_x='test -x'
15046else
15047 if ls -dL / >/dev/null 2>&1; then
15048 as_ls_L_option=L
15049 else
15050 as_ls_L_option=
15051 fi
15052 as_test_x='
15053 eval sh -c '\''
15054 if test -d "$1"; then
15055 test -d "$1/.";
15056 else
15057 case $1 in #(
15058 -*)set "./$1";;
15059 esac;
15060 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15061 ???[sx]*):;;*)false;;esac;fi
15062 '\'' sh
15063 '
15064fi
15065as_executable_p=$as_test_x
bec39cab
AC
15066
15067# Sed expression to map a string onto a valid CPP name.
15068as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15069
15070# Sed expression to map a string onto a valid variable name.
15071as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15072
15073
bec39cab 15074exec 6>&1
81ecdfbb
RW
15075## ----------------------------------- ##
15076## Main body of $CONFIG_STATUS script. ##
15077## ----------------------------------- ##
15078_ASEOF
15079test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15080
15081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15082# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15083# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15084# values after options handling.
15085ac_log="
bec39cab 15086This file was extended by $as_me, which was
81ecdfbb 15087generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15088
15089 CONFIG_FILES = $CONFIG_FILES
15090 CONFIG_HEADERS = $CONFIG_HEADERS
15091 CONFIG_LINKS = $CONFIG_LINKS
15092 CONFIG_COMMANDS = $CONFIG_COMMANDS
15093 $ $0 $@
15094
81ecdfbb
RW
15095on `(hostname || uname -n) 2>/dev/null | sed 1q`
15096"
15097
bec39cab
AC
15098_ACEOF
15099
81ecdfbb
RW
15100case $ac_config_files in *"
15101"*) set x $ac_config_files; shift; ac_config_files=$*;;
15102esac
234b45d4 15103
81ecdfbb
RW
15104case $ac_config_headers in *"
15105"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15106esac
b4e70030 15107
b4e70030 15108
81ecdfbb
RW
15109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15110# Files that config.status was made for.
15111config_files="$ac_config_files"
15112config_headers="$ac_config_headers"
15113config_links="$ac_config_links"
15114config_commands="$ac_config_commands"
234b45d4 15115
81ecdfbb 15116_ACEOF
b4e70030 15117
81ecdfbb 15118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15119ac_cs_usage="\
81ecdfbb
RW
15120\`$as_me' instantiates files and other configuration actions
15121from templates according to the current configuration. Unless the files
15122and actions are specified as TAGs, all are instantiated by default.
234b45d4 15123
81ecdfbb 15124Usage: $0 [OPTION]... [TAG]...
234b45d4 15125
bec39cab 15126 -h, --help print this help, then exit
81ecdfbb
RW
15127 -V, --version print version number and configuration settings, then exit
15128 -q, --quiet, --silent
15129 do not print progress messages
bec39cab
AC
15130 -d, --debug don't remove temporary files
15131 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15132 --file=FILE[:TEMPLATE]
15133 instantiate the configuration file FILE
15134 --header=FILE[:TEMPLATE]
15135 instantiate the configuration header FILE
234b45d4 15136
bec39cab
AC
15137Configuration files:
15138$config_files
234b45d4 15139
bec39cab
AC
15140Configuration headers:
15141$config_headers
234b45d4 15142
bec39cab
AC
15143Configuration links:
15144$config_links
234b45d4 15145
bec39cab
AC
15146Configuration commands:
15147$config_commands
15148
81ecdfbb 15149Report bugs to the package provider."
b4e70030 15150
81ecdfbb
RW
15151_ACEOF
15152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15153ac_cs_version="\\
15154config.status
81ecdfbb
RW
15155configured by $0, generated by GNU Autoconf 2.64,
15156 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15157
81ecdfbb 15158Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15159This config.status script is free software; the Free Software Foundation
15160gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15161
15162ac_pwd='$ac_pwd'
15163srcdir='$srcdir'
15164INSTALL='$INSTALL'
15165MKDIR_P='$MKDIR_P'
15166AWK='$AWK'
15167test -n "\$AWK" || AWK=awk
bec39cab
AC
15168_ACEOF
15169
81ecdfbb
RW
15170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15171# The default lists apply if the user does not specify any file.
bec39cab
AC
15172ac_need_defaults=:
15173while test $# != 0
15174do
15175 case $1 in
15176 --*=*)
81ecdfbb
RW
15177 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15178 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15179 ac_shift=:
c906108c 15180 ;;
81ecdfbb 15181 *)
bec39cab
AC
15182 ac_option=$1
15183 ac_optarg=$2
15184 ac_shift=shift
c906108c 15185 ;;
bec39cab 15186 esac
c906108c 15187
bec39cab
AC
15188 case $ac_option in
15189 # Handling of the options.
bec39cab
AC
15190 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15191 ac_cs_recheck=: ;;
81ecdfbb
RW
15192 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15193 $as_echo "$ac_cs_version"; exit ;;
15194 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15195 debug=: ;;
15196 --file | --fil | --fi | --f )
15197 $ac_shift
81ecdfbb
RW
15198 case $ac_optarg in
15199 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15200 esac
15201 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15202 ac_need_defaults=false;;
15203 --header | --heade | --head | --hea )
15204 $ac_shift
81ecdfbb
RW
15205 case $ac_optarg in
15206 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15207 esac
15208 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15209 ac_need_defaults=false;;
81ecdfbb
RW
15210 --he | --h)
15211 # Conflict between --help and --header
15212 as_fn_error "ambiguous option: \`$1'
15213Try \`$0 --help' for more information.";;
15214 --help | --hel | -h )
15215 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15216 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15217 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15218 ac_cs_silent=: ;;
c906108c 15219
bec39cab 15220 # This is an error.
81ecdfbb
RW
15221 -*) as_fn_error "unrecognized option: \`$1'
15222Try \`$0 --help' for more information." ;;
c906108c 15223
81ecdfbb
RW
15224 *) as_fn_append ac_config_targets " $1"
15225 ac_need_defaults=false ;;
c906108c 15226
bec39cab
AC
15227 esac
15228 shift
15229done
c906108c 15230
bec39cab 15231ac_configure_extra_args=
c906108c 15232
bec39cab
AC
15233if $ac_cs_silent; then
15234 exec 6>/dev/null
15235 ac_configure_extra_args="$ac_configure_extra_args --silent"
15236fi
c906108c 15237
bec39cab 15238_ACEOF
81ecdfbb 15239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15240if \$ac_cs_recheck; then
81ecdfbb
RW
15241 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15242 shift
15243 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15244 CONFIG_SHELL='$SHELL'
15245 export CONFIG_SHELL
15246 exec "\$@"
bec39cab
AC
15247fi
15248
15249_ACEOF
81ecdfbb
RW
15250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15251exec 5>>config.log
15252{
15253 echo
15254 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15255## Running $as_me. ##
15256_ASBOX
15257 $as_echo "$ac_log"
15258} >&5
bec39cab 15259
81ecdfbb
RW
15260_ACEOF
15261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15262#
81ecdfbb 15263# INIT-COMMANDS
c906108c 15264#
a417dc56 15265ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 15266AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 15267
bec39cab
AC
15268_ACEOF
15269
81ecdfbb 15270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15271
81ecdfbb 15272# Handling of arguments.
bec39cab 15273for ac_config_target in $ac_config_targets
c906108c 15274do
81ecdfbb
RW
15275 case $ac_config_target in
15276 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15277 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15278 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15279 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
15280 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15281 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
15282 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
15283 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15284
15285 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15286 esac
15287done
15288
81ecdfbb 15289
bec39cab
AC
15290# If the user did not use the arguments to specify the items to instantiate,
15291# then the envvar interface is used. Set only those that are not.
15292# We use the long form for the default assignment because of an extremely
15293# bizarre bug on SunOS 4.1.3.
15294if $ac_need_defaults; then
15295 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15296 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15297 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15298 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15299fi
15300
b4e70030 15301# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15302# simply because there is no reason against having it here, and in addition,
b4e70030 15303# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15304# Hook for its removal unless debugging.
15305# Note that there is a small window in which the directory will not be cleaned:
15306# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15307$debug ||
15308{
81ecdfbb
RW
15309 tmp=
15310 trap 'exit_status=$?
15311 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15312' 0
15313 trap 'as_fn_exit 1' 1 2 13 15
15314}
15315# Create a (secure) tmp directory for tmp files.
15316
15317{
15318 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15319 test -n "$tmp" && test -d "$tmp"
15320} ||
15321{
15322 tmp=./conf$$-$RANDOM
15323 (umask 077 && mkdir "$tmp")
15324} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15325
15326# Set up the scripts for CONFIG_FILES section.
15327# No need to generate them if there are no CONFIG_FILES.
15328# This happens for instance with `./config.status config.h'.
15329if test -n "$CONFIG_FILES"; then
15330
15331if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15332 ac_cs_awk_getline=:
15333 ac_cs_awk_pipe_init=
15334 ac_cs_awk_read_file='
15335 while ((getline aline < (F[key])) > 0)
15336 print(aline)
15337 close(F[key])'
15338 ac_cs_awk_pipe_fini=
15339else
15340 ac_cs_awk_getline=false
15341 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15342 ac_cs_awk_read_file='
15343 print "|#_!!_#|"
15344 print "cat " F[key] " &&"
15345 '$ac_cs_awk_pipe_init
15346 # The final `:' finishes the AND list.
15347 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15348fi
15349ac_cr=`echo X | tr X '\015'`
15350# On cygwin, bash can eat \r inside `` if the user requested igncr.
15351# But we know of no other shell where ac_cr would be empty at this
15352# point, so we can use a bashism as a fallback.
15353if test "x$ac_cr" = x; then
15354 eval ac_cr=\$\'\\r\'
15355fi
15356ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15357if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15358 ac_cs_awk_cr='\r'
15359else
15360 ac_cs_awk_cr=$ac_cr
15361fi
15362
15363echo 'BEGIN {' >"$tmp/subs1.awk" &&
15364_ACEOF
15365
15366# Create commands to substitute file output variables.
15367{
15368 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15369 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15370 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15371 echo "_ACAWK" &&
15372 echo "_ACEOF"
15373} >conf$$files.sh &&
15374. ./conf$$files.sh ||
15375 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15376rm -f conf$$files.sh
15377
15378{
15379 echo "cat >conf$$subs.awk <<_ACEOF" &&
15380 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15381 echo "_ACEOF"
15382} >conf$$subs.sh ||
15383 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15384ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15385ac_delim='%!_!# '
15386for ac_last_try in false false false false false :; do
15387 . ./conf$$subs.sh ||
15388 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15389
15390 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15391 if test $ac_delim_n = $ac_delim_num; then
15392 break
15393 elif $ac_last_try; then
15394 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15395 else
15396 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15397 fi
15398done
15399rm -f conf$$subs.sh
15400
15401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15402cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15403_ACEOF
15404sed -n '
15405h
15406s/^/S["/; s/!.*/"]=/
15407p
15408g
15409s/^[^!]*!//
15410:repl
15411t repl
15412s/'"$ac_delim"'$//
15413t delim
15414:nl
15415h
15416s/\(.\{148\}\).*/\1/
15417t more1
15418s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15419p
15420n
15421b repl
15422:more1
15423s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15424p
15425g
15426s/.\{148\}//
15427t nl
15428:delim
15429h
15430s/\(.\{148\}\).*/\1/
15431t more2
15432s/["\\]/\\&/g; s/^/"/; s/$/"/
15433p
15434b
15435:more2
15436s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15437p
15438g
15439s/.\{148\}//
15440t delim
15441' <conf$$subs.awk | sed '
15442/^[^""]/{
15443 N
15444 s/\n//
15445}
15446' >>$CONFIG_STATUS || ac_write_fail=1
15447rm -f conf$$subs.awk
15448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15449_ACAWK
15450cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15451 for (key in S) S_is_set[key] = 1
15452 FS = "\a"
15453 \$ac_cs_awk_pipe_init
15454}
15455{
15456 line = $ 0
15457 nfields = split(line, field, "@")
15458 substed = 0
15459 len = length(field[1])
15460 for (i = 2; i < nfields; i++) {
15461 key = field[i]
15462 keylen = length(key)
15463 if (S_is_set[key]) {
15464 value = S[key]
15465 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15466 len += length(value) + length(field[++i])
15467 substed = 1
15468 } else
15469 len += 1 + keylen
15470 }
15471 if (nfields == 3 && !substed) {
15472 key = field[2]
15473 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15474 \$ac_cs_awk_read_file
15475 next
15476 }
15477 }
15478 print line
b4e70030 15479}
81ecdfbb
RW
15480\$ac_cs_awk_pipe_fini
15481_ACAWK
15482_ACEOF
15483cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15484if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15485 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15486else
15487 cat
15488fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15489 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15490_ACEOF
15491
15492# VPATH may cause trouble with some makes, so we remove $(srcdir),
15493# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15494# trailing colons and then remove the whole line if VPATH becomes empty
15495# (actually we leave an empty line to preserve line numbers).
15496if test "x$srcdir" = x.; then
15497 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15498s/:*\$(srcdir):*/:/
15499s/:*\${srcdir}:*/:/
15500s/:*@srcdir@:*/:/
15501s/^\([^=]*=[ ]*\):*/\1/
15502s/:*$//
15503s/^[^=]*=[ ]*$//
15504}'
15505fi
15506
15507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15508fi # test -n "$CONFIG_FILES"
15509
15510# Set up the scripts for CONFIG_HEADERS section.
15511# No need to generate them if there are no CONFIG_HEADERS.
15512# This happens for instance with `./config.status Makefile'.
15513if test -n "$CONFIG_HEADERS"; then
15514cat >"$tmp/defines.awk" <<\_ACAWK ||
15515BEGIN {
15516_ACEOF
15517
15518# Transform confdefs.h into an awk script `defines.awk', embedded as
15519# here-document in config.status, that substitutes the proper values into
15520# config.h.in to produce config.h.
4e8d927d 15521
81ecdfbb
RW
15522# Create a delimiter string that does not exist in confdefs.h, to ease
15523# handling of long lines.
15524ac_delim='%!_!# '
15525for ac_last_try in false false :; do
15526 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15527 if test -z "$ac_t"; then
15528 break
15529 elif $ac_last_try; then
15530 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15531 else
15532 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15533 fi
15534done
4e8d927d 15535
81ecdfbb
RW
15536# For the awk script, D is an array of macro values keyed by name,
15537# likewise P contains macro parameters if any. Preserve backslash
15538# newline sequences.
15539
15540ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15541sed -n '
15542s/.\{148\}/&'"$ac_delim"'/g
15543t rset
15544:rset
15545s/^[ ]*#[ ]*define[ ][ ]*/ /
15546t def
15547d
15548:def
15549s/\\$//
15550t bsnl
15551s/["\\]/\\&/g
15552s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15553D["\1"]=" \3"/p
15554s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15555d
15556:bsnl
15557s/["\\]/\\&/g
15558s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15559D["\1"]=" \3\\\\\\n"\\/p
15560t cont
15561s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15562t cont
15563d
15564:cont
15565n
15566s/.\{148\}/&'"$ac_delim"'/g
15567t clear
15568:clear
15569s/\\$//
15570t bsnlc
15571s/["\\]/\\&/g; s/^/"/; s/$/"/p
15572d
15573:bsnlc
15574s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15575b cont
15576' <confdefs.h | sed '
15577s/'"$ac_delim"'/"\\\
15578"/g' >>$CONFIG_STATUS || ac_write_fail=1
15579
15580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15581 for (key in D) D_is_set[key] = 1
15582 FS = "\a"
15583}
15584/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15585 line = \$ 0
15586 split(line, arg, " ")
15587 if (arg[1] == "#") {
15588 defundef = arg[2]
15589 mac1 = arg[3]
15590 } else {
15591 defundef = substr(arg[1], 2)
15592 mac1 = arg[2]
15593 }
15594 split(mac1, mac2, "(") #)
15595 macro = mac2[1]
15596 prefix = substr(line, 1, index(line, defundef) - 1)
15597 if (D_is_set[macro]) {
15598 # Preserve the white space surrounding the "#".
15599 print prefix "define", macro P[macro] D[macro]
15600 next
15601 } else {
15602 # Replace #undef with comments. This is necessary, for example,
15603 # in the case of _POSIX_SOURCE, which is predefined and required
15604 # on some systems where configure will not decide to define it.
15605 if (defundef == "undef") {
15606 print "/*", prefix defundef, macro, "*/"
15607 next
15608 }
15609 }
b4e70030 15610}
81ecdfbb
RW
15611{ print }
15612_ACAWK
b4e70030 15613_ACEOF
81ecdfbb
RW
15614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15615 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15616fi # test -n "$CONFIG_HEADERS"
4e8d927d 15617
4e8d927d 15618
81ecdfbb
RW
15619eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15620shift
15621for ac_tag
15622do
15623 case $ac_tag in
15624 :[FHLC]) ac_mode=$ac_tag; continue;;
15625 esac
15626 case $ac_mode$ac_tag in
15627 :[FHL]*:*);;
15628 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15629 :[FH]-) ac_tag=-:-;;
15630 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15631 esac
15632 ac_save_IFS=$IFS
15633 IFS=:
15634 set x $ac_tag
15635 IFS=$ac_save_IFS
15636 shift
15637 ac_file=$1
15638 shift
4e8d927d 15639
81ecdfbb
RW
15640 case $ac_mode in
15641 :L) ac_source=$1;;
15642 :[FH])
15643 ac_file_inputs=
15644 for ac_f
15645 do
15646 case $ac_f in
15647 -) ac_f="$tmp/stdin";;
15648 *) # Look for the file first in the build tree, then in the source tree
15649 # (if the path is not absolute). The absolute path cannot be DOS-style,
15650 # because $ac_f cannot contain `:'.
15651 test -f "$ac_f" ||
15652 case $ac_f in
15653 [\\/$]*) false;;
15654 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15655 esac ||
15656 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15657 esac
15658 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15659 as_fn_append ac_file_inputs " '$ac_f'"
15660 done
15661
15662 # Let's still pretend it is `configure' which instantiates (i.e., don't
15663 # use $as_me), people would be surprised to read:
15664 # /* config.h. Generated by config.status. */
15665 configure_input='Generated from '`
15666 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15667 `' by configure.'
15668 if test x"$ac_file" != x-; then
15669 configure_input="$ac_file. $configure_input"
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15671$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15672 fi
81ecdfbb
RW
15673 # Neutralize special characters interpreted by sed in replacement strings.
15674 case $configure_input in #(
15675 *\&* | *\|* | *\\* )
15676 ac_sed_conf_input=`$as_echo "$configure_input" |
15677 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15678 *) ac_sed_conf_input=$configure_input;;
15679 esac
4e8d927d 15680
81ecdfbb
RW
15681 case $ac_tag in
15682 *:-:* | *:-) cat >"$tmp/stdin" \
15683 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15684 esac
15685 ;;
c906108c
SS
15686 esac
15687
81ecdfbb 15688 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15689$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15690 X"$ac_file" : 'X\(//\)[^/]' \| \
15691 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15692 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15693$as_echo X"$ac_file" |
15694 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15695 s//\1/
15696 q
15697 }
15698 /^X\(\/\/\)[^/].*/{
15699 s//\1/
15700 q
15701 }
15702 /^X\(\/\/\)$/{
15703 s//\1/
15704 q
15705 }
15706 /^X\(\/\).*/{
15707 s//\1/
15708 q
15709 }
15710 s/.*/./; q'`
15711 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15712 ac_builddir=.
15713
81ecdfbb
RW
15714case "$ac_dir" in
15715.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15716*)
15717 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15718 # A ".." for each directory in $ac_dir_suffix.
15719 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15720 case $ac_top_builddir_sub in
15721 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15722 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15723 esac ;;
15724esac
15725ac_abs_top_builddir=$ac_pwd
15726ac_abs_builddir=$ac_pwd$ac_dir_suffix
15727# for backward compatibility:
15728ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15729
15730case $srcdir in
81ecdfbb 15731 .) # We are building in place.
bec39cab 15732 ac_srcdir=.
81ecdfbb
RW
15733 ac_top_srcdir=$ac_top_builddir_sub
15734 ac_abs_top_srcdir=$ac_pwd ;;
15735 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15736 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15737 ac_top_srcdir=$srcdir
15738 ac_abs_top_srcdir=$srcdir ;;
15739 *) # Relative name.
15740 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15741 ac_top_srcdir=$ac_top_build_prefix$srcdir
15742 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15743esac
81ecdfbb 15744ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15745
c906108c 15746
81ecdfbb
RW
15747 case $ac_mode in
15748 :F)
15749 #
15750 # CONFIG_FILE
15751 #
c906108c 15752
bec39cab
AC
15753 case $INSTALL in
15754 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15755 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15756 esac
81ecdfbb
RW
15757 ac_MKDIR_P=$MKDIR_P
15758 case $MKDIR_P in
15759 [\\/$]* | ?:[\\/]* ) ;;
15760 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15761 esac
15762_ACEOF
121ce6e5 15763
81ecdfbb
RW
15764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15765# If the template does not know about datarootdir, expand it.
15766# FIXME: This hack should be removed a few years after 2.60.
15767ac_datarootdir_hack=; ac_datarootdir_seen=
15768ac_sed_dataroot='
15769/datarootdir/ {
15770 p
15771 q
15772}
15773/@datadir@/p
15774/@docdir@/p
15775/@infodir@/p
15776/@localedir@/p
15777/@mandir@/p'
15778case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15779*datarootdir*) ac_datarootdir_seen=yes;;
15780*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15782$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15783_ACEOF
15784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15785 ac_datarootdir_hack='
15786 s&@datadir@&$datadir&g
15787 s&@docdir@&$docdir&g
15788 s&@infodir@&$infodir&g
15789 s&@localedir@&$localedir&g
15790 s&@mandir@&$mandir&g
15791 s&\\\${datarootdir}&$datarootdir&g' ;;
15792esac
4e8d927d 15793_ACEOF
81ecdfbb
RW
15794
15795# Neutralize VPATH when `$srcdir' = `.'.
15796# Shell code in configure.ac might set extrasub.
15797# FIXME: do we really want to maintain this feature?
15798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15799ac_sed_extra="$ac_vpsub
bec39cab
AC
15800$extrasub
15801_ACEOF
81ecdfbb 15802cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
15803:t
15804/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
15805s|@configure_input@|$ac_sed_conf_input|;t t
15806s&@top_builddir@&$ac_top_builddir_sub&;t t
15807s&@top_build_prefix@&$ac_top_build_prefix&;t t
15808s&@srcdir@&$ac_srcdir&;t t
15809s&@abs_srcdir@&$ac_abs_srcdir&;t t
15810s&@top_srcdir@&$ac_top_srcdir&;t t
15811s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15812s&@builddir@&$ac_builddir&;t t
15813s&@abs_builddir@&$ac_abs_builddir&;t t
15814s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15815s&@INSTALL@&$ac_INSTALL&;t t
15816s&@MKDIR_P@&$ac_MKDIR_P&;t t
15817$ac_datarootdir_hack
15818"
15819eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15820if $ac_cs_awk_getline; then
15821 $AWK -f "$tmp/subs.awk"
15822else
15823 $AWK -f "$tmp/subs.awk" | $SHELL
15824fi >$tmp/out \
15825 || as_fn_error "could not create $ac_file" "$LINENO" 5
15826
15827test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15828 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15829 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15831which seems to be undefined. Please make sure it is defined." >&5
15832$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15833which seems to be undefined. Please make sure it is defined." >&2;}
15834
15835 rm -f "$tmp/stdin"
bec39cab 15836 case $ac_file in
81ecdfbb
RW
15837 -) cat "$tmp/out" && rm -f "$tmp/out";;
15838 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15839 esac \
15840 || as_fn_error "could not create $ac_file" "$LINENO" 5
15841 ;;
15842 :H)
15843 #
15844 # CONFIG_HEADER
15845 #
bec39cab 15846 if test x"$ac_file" != x-; then
81ecdfbb
RW
15847 {
15848 $as_echo "/* $configure_input */" \
15849 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15850 } >"$tmp/config.h" \
15851 || as_fn_error "could not create $ac_file" "$LINENO" 5
15852 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15854$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 15855 else
81ecdfbb
RW
15856 rm -f "$ac_file"
15857 mv "$tmp/config.h" "$ac_file" \
15858 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
15859 fi
15860 else
81ecdfbb
RW
15861 $as_echo "/* $configure_input */" \
15862 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15863 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 15864 fi
81ecdfbb
RW
15865# Compute "$ac_file"'s index in $config_headers.
15866_am_arg="$ac_file"
e28b3332
DJ
15867_am_stamp_count=1
15868for _am_header in $config_headers :; do
15869 case $_am_header in
81ecdfbb 15870 $_am_arg | $_am_arg:* )
e28b3332
DJ
15871 break ;;
15872 * )
15873 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15874 esac
15875done
81ecdfbb
RW
15876echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15877$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15878 X"$_am_arg" : 'X\(//\)[^/]' \| \
15879 X"$_am_arg" : 'X\(//\)$' \| \
15880 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15881$as_echo X"$_am_arg" |
15882 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15883 s//\1/
15884 q
15885 }
15886 /^X\(\/\/\)[^/].*/{
15887 s//\1/
15888 q
15889 }
15890 /^X\(\/\/\)$/{
15891 s//\1/
15892 q
15893 }
15894 /^X\(\/\).*/{
15895 s//\1/
15896 q
15897 }
15898 s/.*/./; q'`/stamp-h$_am_stamp_count
15899 ;;
15900 :L)
15901 #
15902 # CONFIG_LINK
15903 #
c906108c 15904
81ecdfbb
RW
15905 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15906 :
b4e70030 15907 else
81ecdfbb
RW
15908 # Prefer the file from the source tree if names are identical.
15909 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15910 ac_source=$srcdir/$ac_source
15911 fi
b4e70030 15912
81ecdfbb
RW
15913 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15914$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 15915
81ecdfbb
RW
15916 if test ! -r "$ac_source"; then
15917 as_fn_error "$ac_source: file not found" "$LINENO" 5
15918 fi
15919 rm -f "$ac_file"
bec39cab 15920
81ecdfbb
RW
15921 # Try a relative symlink, then a hard link, then a copy.
15922 case $srcdir in
15923 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15924 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15925 esac
15926 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15927 ln "$ac_source" "$ac_file" 2>/dev/null ||
15928 cp -p "$ac_source" "$ac_file" ||
15929 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15930 fi
15931 ;;
15932 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15933$as_echo "$as_me: executing $ac_file commands" >&6;}
15934 ;;
c906108c 15935 esac
b4e70030 15936
bec39cab 15937
81ecdfbb
RW
15938 case $ac_file$ac_mode in
15939 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
15940 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15941 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15942 # are listed without --file. Let's play safe and only enable the eval
15943 # if we detect the quoting.
15944 case $CONFIG_FILES in
15945 *\'*) eval set x "$CONFIG_FILES" ;;
15946 *) set x $CONFIG_FILES ;;
15947 esac
15948 shift
15949 for mf
15950 do
15951 # Strip MF so we end up with the name of the file.
15952 mf=`echo "$mf" | sed -e 's/:.*$//'`
15953 # Check whether this is an Automake generated Makefile or not.
15954 # We used to match only the files named `Makefile.in', but
15955 # some people rename them; so instead we look at the file content.
15956 # Grep'ing the first line is not enough: some people post-process
15957 # each Makefile.in and add a new line on top of each file to say so.
15958 # Grep'ing the whole file is not good either: AIX grep has a line
15959 # limit of 2048, but all sed's we know have understand at least 4000.
15960 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15961 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
15962$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15963 X"$mf" : 'X\(//\)[^/]' \| \
15964 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
15965 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15966$as_echo X"$mf" |
15967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15968 s//\1/
15969 q
15970 }
15971 /^X\(\/\/\)[^/].*/{
15972 s//\1/
15973 q
15974 }
15975 /^X\(\/\/\)$/{
15976 s//\1/
15977 q
15978 }
15979 /^X\(\/\).*/{
15980 s//\1/
15981 q
15982 }
15983 s/.*/./; q'`
15984 else
15985 continue
15986 fi
15987 # Extract the definition of DEPDIR, am__include, and am__quote
15988 # from the Makefile without running `make'.
15989 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15990 test -z "$DEPDIR" && continue
15991 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15992 test -z "am__include" && continue
15993 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15994 # When using ansi2knr, U may be empty or an underscore; expand it
15995 U=`sed -n 's/^U = //p' < "$mf"`
15996 # Find all dependency output files, they are included files with
15997 # $(DEPDIR) in their names. We invoke sed twice because it is the
15998 # simplest approach to changing $(DEPDIR) to its actual value in the
15999 # expansion.
16000 for file in `sed -n "
16001 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
16002 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
16003 # Make sure the directory exists.
16004 test -f "$dirpart/$file" && continue
16005 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
16006$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16007 X"$file" : 'X\(//\)[^/]' \| \
16008 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
16009 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
16010$as_echo X"$file" |
16011 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16012 s//\1/
16013 q
16014 }
16015 /^X\(\/\/\)[^/].*/{
16016 s//\1/
16017 q
16018 }
16019 /^X\(\/\/\)$/{
16020 s//\1/
16021 q
16022 }
16023 /^X\(\/\).*/{
16024 s//\1/
16025 q
16026 }
16027 s/.*/./; q'`
16028 as_dir=$dirpart/$fdir; as_fn_mkdir_p
16029 # echo "creating $dirpart/$file"
16030 echo '# dummy' > "$dirpart/$file"
e28b3332 16031 done
e28b3332 16032 done
81ecdfbb 16033}
4e8d927d 16034 ;;
81ecdfbb 16035 "default":C)
c906108c
SS
16036case x$CONFIG_HEADERS in
16037xconfig.h:config.in)
16038echo > stamp-h ;;
16039esac
bec39cab 16040 ;;
81ecdfbb 16041
bec39cab 16042 esac
81ecdfbb 16043done # for ac_tag
c906108c 16044
bec39cab 16045
81ecdfbb 16046as_fn_exit 0
bec39cab 16047_ACEOF
bec39cab
AC
16048ac_clean_files=$ac_clean_files_save
16049
81ecdfbb
RW
16050test $ac_write_fail = 0 ||
16051 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16052
bec39cab
AC
16053
16054# configure is writing to config.log, and then calls config.status.
16055# config.status does its own redirection, appending to config.log.
16056# Unfortunately, on DOS this fails, as config.log is still kept open
16057# by configure, so config.status won't be able to write to it; its
16058# output is simply discarded. So we exec the FD to /dev/null,
16059# effectively closing config.log, so it can be properly (re)opened and
16060# appended to by config.status. When coming back to configure, we
16061# need to make the FD available again.
16062if test "$no_create" != yes; then
16063 ac_cs_success=:
16064 ac_config_status_args=
16065 test "$silent" = yes &&
16066 ac_config_status_args="$ac_config_status_args --quiet"
16067 exec 5>/dev/null
16068 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16069 exec 5>>config.log
16070 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16071 # would make configure fail if this is the last instruction.
81ecdfbb 16072 $ac_cs_success || as_fn_exit $?
bec39cab 16073fi
c906108c 16074
bec39cab 16075#
81ecdfbb 16076# CONFIG_SUBDIRS section.
bec39cab 16077#
c906108c
SS
16078if test "$no_recursion" != yes; then
16079
81ecdfbb
RW
16080 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16081 # so they do not pile up.
c906108c
SS
16082 ac_sub_configure_args=
16083 ac_prev=
fdc59709
PB
16084 eval "set x $ac_configure_args"
16085 shift
16086 for ac_arg
16087 do
c906108c
SS
16088 if test -n "$ac_prev"; then
16089 ac_prev=
16090 continue
16091 fi
bec39cab 16092 case $ac_arg in
c906108c
SS
16093 -cache-file | --cache-file | --cache-fil | --cache-fi \
16094 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16095 ac_prev=cache_file ;;
16096 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16097 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16098 | --c=*)
16099 ;;
16100 --config-cache | -C)
c906108c
SS
16101 ;;
16102 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16103 ac_prev=srcdir ;;
16104 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16105 ;;
bec39cab
AC
16106 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16107 ac_prev=prefix ;;
16108 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16109 ;;
81ecdfbb
RW
16110 --disable-option-checking)
16111 ;;
fdc59709
PB
16112 *)
16113 case $ac_arg in
81ecdfbb 16114 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16115 esac
81ecdfbb 16116 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16117 esac
16118 done
16119
bec39cab
AC
16120 # Always prepend --prefix to ensure using the same prefix
16121 # in subdir configurations.
fdc59709
PB
16122 ac_arg="--prefix=$prefix"
16123 case $ac_arg in
81ecdfbb 16124 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16125 esac
81ecdfbb
RW
16126 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16127
16128 # Pass --silent
16129 if test "$silent" = yes; then
16130 ac_sub_configure_args="--silent $ac_sub_configure_args"
16131 fi
16132
16133 # Always prepend --disable-option-checking to silence warnings, since
16134 # different subdirs can have different --enable and --with options.
16135 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16136
b4e70030 16137 ac_popdir=`pwd`
bec39cab 16138 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16139
16140 # Do not complain, so a configure script can configure whichever
16141 # parts of a large source tree are present.
fdc59709 16142 test -d "$srcdir/$ac_dir" || continue
c906108c 16143
81ecdfbb
RW
16144 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16145 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16146 $as_echo "$ac_msg" >&6
16147 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16148 ac_builddir=.
16149
81ecdfbb
RW
16150case "$ac_dir" in
16151.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16152*)
16153 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16154 # A ".." for each directory in $ac_dir_suffix.
16155 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16156 case $ac_top_builddir_sub in
16157 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16158 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16159 esac ;;
16160esac
16161ac_abs_top_builddir=$ac_pwd
16162ac_abs_builddir=$ac_pwd$ac_dir_suffix
16163# for backward compatibility:
16164ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16165
16166case $srcdir in
81ecdfbb 16167 .) # We are building in place.
bec39cab 16168 ac_srcdir=.
81ecdfbb
RW
16169 ac_top_srcdir=$ac_top_builddir_sub
16170 ac_abs_top_srcdir=$ac_pwd ;;
16171 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16172 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16173 ac_top_srcdir=$srcdir
16174 ac_abs_top_srcdir=$srcdir ;;
16175 *) # Relative name.
16176 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16177 ac_top_srcdir=$ac_top_build_prefix$srcdir
16178 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16179esac
81ecdfbb 16180ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16181
c906108c 16182
fdc59709 16183 cd "$ac_dir"
c906108c
SS
16184
16185 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16186 if test -f "$ac_srcdir/configure.gnu"; then
16187 ac_sub_configure=$ac_srcdir/configure.gnu
16188 elif test -f "$ac_srcdir/configure"; then
16189 ac_sub_configure=$ac_srcdir/configure
16190 elif test -f "$ac_srcdir/configure.in"; then
16191 # This should be Cygnus configure.
16192 ac_sub_configure=$ac_aux_dir/configure
c906108c 16193 else
81ecdfbb
RW
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16195$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16196 ac_sub_configure=
16197 fi
16198
16199 # The recursion is here.
16200 if test -n "$ac_sub_configure"; then
c906108c 16201 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16202 case $cache_file in
16203 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16204 *) # Relative name.
16205 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16206 esac
c906108c 16207
81ecdfbb
RW
16208 { $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
16209$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16210 # The eval makes quoting arguments work.
fdc59709
PB
16211 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16212 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16213 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16214 fi
16215
fdc59709 16216 cd "$ac_popdir"
c906108c
SS
16217 done
16218fi
81ecdfbb
RW
16219if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16221$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16222fi
c906108c
SS
16223
16224
16225exit 0
This page took 2.234879 seconds and 4 git commands to generate.