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=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
ac534cba
JB
662PYTHON_LIBS
663PYTHON_CPPFLAGS
81ecdfbb 664PYTHON_CFLAGS
ec685c5e 665python_prog_path
81ecdfbb
RW
666LTLIBEXPAT
667LIBEXPAT
668HAVE_LIBEXPAT
f997c383 669TARGET_PTR
39037522 670READLINE_TEXI_INCFLAG
81ecdfbb
RW
671READLINE_CFLAGS
672READLINE_DEPS
673READLINE
674MIG
675WINDRES
676DLLTOOL
677AR
678YFLAGS
679YACC
680LN_S
681REPORT_BUGS_TEXI
682REPORT_BUGS_TO
683PKGVERSION
684TARGET_OBS
685subdirs
686GDB_DATADIR
687DEBUGDIR
688am__fastdepCC_FALSE
689am__fastdepCC_TRUE
690AMDEPBACKSLASH
691AMDEP_FALSE
692AMDEP_TRUE
693am__quote
694am__include
695am__untar
696am__tar
697AMTAR
698AWK
699mkdir_p
700MKDIR_P
701INSTALL_STRIP_PROGRAM
702STRIP
703install_sh
81ecdfbb
RW
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709CYGPATH_W
710am__isrc
711INSTALL_DATA
712INSTALL_SCRIPT
713INSTALL_PROGRAM
5048e516
JK
714MAKEINFO_EXTRA_FLAGS
715MAKEINFOFLAGS
716MAKEINFO
81ecdfbb
RW
717PACKAGE
718GNULIB_STDINT_H
719LIBGNU_LTLIBDEPS
720LIBGNU_LIBDEPS
f434ba03
PA
721gltests_WITNESS
722HAVE_WINT_T
81ecdfbb 723HAVE_WCHAR_H
f434ba03
PA
724NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
725NEXT_WCHAR_H
81ecdfbb 726REPLACE_WCWIDTH
f434ba03
PA
727REPLACE_WCSNRTOMBS
728REPLACE_WCSRTOMBS
729REPLACE_WCRTOMB
730REPLACE_MBSNRTOWCS
731REPLACE_MBSRTOWCS
732REPLACE_MBRLEN
733REPLACE_MBRTOWC
734REPLACE_MBSINIT
735REPLACE_WCTOB
736REPLACE_BTOWC
737REPLACE_MBSTATE_T
81ecdfbb 738HAVE_DECL_WCWIDTH
f434ba03
PA
739HAVE_DECL_WCTOB
740HAVE_WCSNRTOMBS
741HAVE_WCSRTOMBS
742HAVE_WCRTOMB
743HAVE_MBSNRTOWCS
744HAVE_MBSRTOWCS
745HAVE_MBRLEN
746HAVE_MBRTOWC
747HAVE_MBSINIT
748HAVE_BTOWC
81ecdfbb 749GNULIB_WCWIDTH
f434ba03
PA
750GNULIB_WCSNRTOMBS
751GNULIB_WCSRTOMBS
752GNULIB_WCRTOMB
753GNULIB_MBSNRTOWCS
754GNULIB_MBSRTOWCS
755GNULIB_MBRLEN
756GNULIB_MBRTOWC
757GNULIB_MBSINIT
758GNULIB_WCTOB
759GNULIB_BTOWC
760NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
761NEXT_STRING_H
762STDINT_H
763WINT_T_SUFFIX
764WCHAR_T_SUFFIX
81ecdfbb 765SIG_ATOMIC_T_SUFFIX
f434ba03 766SIZE_T_SUFFIX
81ecdfbb
RW
767PTRDIFF_T_SUFFIX
768HAVE_SIGNED_WINT_T
769HAVE_SIGNED_WCHAR_T
770HAVE_SIGNED_SIG_ATOMIC_T
771BITSIZEOF_WINT_T
772BITSIZEOF_WCHAR_T
81ecdfbb 773BITSIZEOF_SIG_ATOMIC_T
f434ba03 774BITSIZEOF_SIZE_T
81ecdfbb
RW
775BITSIZEOF_PTRDIFF_T
776HAVE_SYS_BITYPES_H
777HAVE_SYS_INTTYPES_H
778HAVE_STDINT_H
f434ba03 779NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 780NEXT_STDINT_H
81ecdfbb
RW
781HAVE_SYS_TYPES_H
782HAVE_INTTYPES_H
783HAVE_UNSIGNED_LONG_LONG_INT
784HAVE_LONG_LONG_INT
f434ba03
PA
785NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
786NEXT_STDDEF_H
787PRAGMA_SYSTEM_HEADER
788INCLUDE_NEXT_AS_FIRST_DIRECTIVE
789INCLUDE_NEXT
790STDDEF_H
791HAVE_WCHAR_T
792REPLACE_NULL
793APPLE_UNIVERSAL_BUILD
794UNDEFINE_STRTOK_R
795REPLACE_STRTOK_R
81ecdfbb 796REPLACE_STRSIGNAL
f434ba03
PA
797REPLACE_STRNLEN
798REPLACE_STRNDUP
799REPLACE_STRNCAT
81ecdfbb 800REPLACE_STRERROR
f434ba03
PA
801REPLACE_STRCASESTR
802REPLACE_STRSTR
803REPLACE_STRDUP
804REPLACE_STPNCPY
805REPLACE_MEMMEM
806REPLACE_MEMCHR
807HAVE_STRVERSCMP
81ecdfbb 808HAVE_DECL_STRSIGNAL
81ecdfbb
RW
809HAVE_DECL_STRTOK_R
810HAVE_STRCASESTR
811HAVE_STRSEP
812HAVE_STRPBRK
813HAVE_DECL_STRNLEN
814HAVE_DECL_STRNDUP
81ecdfbb
RW
815HAVE_DECL_STRDUP
816HAVE_STRCHRNUL
817HAVE_STPNCPY
818HAVE_STPCPY
f434ba03 819HAVE_RAWMEMCHR
81ecdfbb
RW
820HAVE_DECL_MEMRCHR
821HAVE_MEMPCPY
822HAVE_DECL_MEMMEM
f434ba03
PA
823HAVE_MEMCHR
824HAVE_MBSLEN
825GNULIB_STRVERSCMP
81ecdfbb
RW
826GNULIB_STRSIGNAL
827GNULIB_STRERROR
828GNULIB_MBSTOK_R
829GNULIB_MBSSEP
830GNULIB_MBSSPN
831GNULIB_MBSPBRK
832GNULIB_MBSCSPN
833GNULIB_MBSCASESTR
834GNULIB_MBSPCASECMP
835GNULIB_MBSNCASECMP
836GNULIB_MBSCASECMP
837GNULIB_MBSSTR
838GNULIB_MBSRCHR
839GNULIB_MBSCHR
840GNULIB_MBSNLEN
841GNULIB_MBSLEN
842GNULIB_STRTOK_R
843GNULIB_STRCASESTR
844GNULIB_STRSTR
845GNULIB_STRSEP
846GNULIB_STRPBRK
847GNULIB_STRNLEN
848GNULIB_STRNDUP
f434ba03 849GNULIB_STRNCAT
81ecdfbb
RW
850GNULIB_STRDUP
851GNULIB_STRCHRNUL
852GNULIB_STPNCPY
853GNULIB_STPCPY
f434ba03 854GNULIB_RAWMEMCHR
81ecdfbb
RW
855GNULIB_MEMRCHR
856GNULIB_MEMPCPY
857GNULIB_MEMMEM
f434ba03 858GNULIB_MEMCHR
81ecdfbb
RW
859GL_COND_LIBTOOL_FALSE
860GL_COND_LIBTOOL_TRUE
861CATOBJEXT
862GENCAT
863INSTOBJEXT
864DATADIRNAME
865CATALOGS
866POSUB
867GMSGFMT
868XGETTEXT
869INCINTL
870LIBINTL_DEP
871LIBINTL
872USE_NLS
873SET_MAKE
874GMAKE_FALSE
875GMAKE_TRUE
876MAKE
877CCDEPMODE
878DEPDIR
879am__leading_dot
880target_os
881target_vendor
882target_cpu
883target
f434ba03
PA
884RANLIB
885EGREP
886GREP
887CPP
81ecdfbb
RW
888host_os
889host_vendor
890host_cpu
891host
892build_os
893build_vendor
894build_cpu
895build
81ecdfbb
RW
896OBJEXT
897EXEEXT
898ac_ct_CC
899CPPFLAGS
900LDFLAGS
901CFLAGS
902CC
903MAINT
904MAINTAINER_MODE_FALSE
905MAINTAINER_MODE_TRUE
906target_alias
907host_alias
908build_alias
909LIBS
910ECHO_T
911ECHO_N
912ECHO_C
913DEFS
914mandir
915localedir
916libdir
917psdir
918pdfdir
919dvidir
920htmldir
921infodir
922docdir
923oldincludedir
924includedir
925localstatedir
926sharedstatedir
927sysconfdir
928datadir
929datarootdir
930libexecdir
931sbindir
932bindir
933program_transform_name
934prefix
935exec_prefix
936PACKAGE_URL
937PACKAGE_BUGREPORT
938PACKAGE_STRING
939PACKAGE_VERSION
940PACKAGE_TARNAME
941PACKAGE_NAME
942PATH_SEPARATOR
943SHELL'
a4ce5b0d 944ac_subst_files='host_makefile_frag'
81ecdfbb
RW
945ac_user_opts='
946enable_option_checking
947enable_maintainer_mode
da2f07f1
JK
948enable_plugins
949enable_largefile
81ecdfbb
RW
950enable_dependency_tracking
951with_separate_debug_dir
952with_gdb_datadir
953with_relocated_sources
954enable_targets
955enable_64_bit_bfd
956enable_gdbcli
957enable_gdbmi
958enable_tui
959enable_gdbtk
960with_libunwind
961with_curses
962enable_profiling
963with_pkgversion
964with_bugurl
b040ad30 965with_zlib
81ecdfbb 966with_libiconv_prefix
478aac75 967with_iconv_bin
81ecdfbb
RW
968with_system_readline
969with_expat
970with_gnu_ld
971enable_rpath
972with_libexpat_prefix
973with_python
974with_included_regex
975with_sysroot
976with_system_gdbinit
977enable_werror
978enable_build_warnings
979enable_gdb_build_warnings
980with_tcl
981with_tk
982with_x
983enable_sim
984enable_multi_ice
496c0e1b 985enable_gdbserver
81ecdfbb
RW
986'
987 ac_precious_vars='build_alias
988host_alias
989target_alias
990CC
991CFLAGS
992LDFLAGS
993LIBS
994CPPFLAGS
995CPP
996YACC
997YFLAGS
998XMKMF'
5ae98d25 999ac_subdirs_all='testsuite
81ecdfbb
RW
1000gdbtk
1001multi-ice
1002gdbserver'
c906108c
SS
1003
1004# Initialize some variables set by options.
bec39cab
AC
1005ac_init_help=
1006ac_init_version=false
81ecdfbb
RW
1007ac_unrecognized_opts=
1008ac_unrecognized_sep=
c906108c
SS
1009# The variables have the same names as the options, with
1010# dashes changed to underlines.
bec39cab 1011cache_file=/dev/null
c906108c 1012exec_prefix=NONE
c906108c 1013no_create=
c906108c
SS
1014no_recursion=
1015prefix=NONE
1016program_prefix=NONE
1017program_suffix=NONE
1018program_transform_name=s,x,x,
1019silent=
1020site=
1021srcdir=
c906108c
SS
1022verbose=
1023x_includes=NONE
1024x_libraries=NONE
bec39cab
AC
1025
1026# Installation directory options.
1027# These are left unexpanded so users can "make install exec_prefix=/foo"
1028# and all the variables that are supposed to be based on exec_prefix
1029# by default will actually change.
1030# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1031# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1032bindir='${exec_prefix}/bin'
1033sbindir='${exec_prefix}/sbin'
1034libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1035datarootdir='${prefix}/share'
1036datadir='${datarootdir}'
c906108c
SS
1037sysconfdir='${prefix}/etc'
1038sharedstatedir='${prefix}/com'
1039localstatedir='${prefix}/var'
c906108c
SS
1040includedir='${prefix}/include'
1041oldincludedir='/usr/include'
81ecdfbb
RW
1042docdir='${datarootdir}/doc/${PACKAGE}'
1043infodir='${datarootdir}/info'
1044htmldir='${docdir}'
1045dvidir='${docdir}'
1046pdfdir='${docdir}'
1047psdir='${docdir}'
1048libdir='${exec_prefix}/lib'
1049localedir='${datarootdir}/locale'
1050mandir='${datarootdir}/man'
c906108c 1051
c906108c 1052ac_prev=
81ecdfbb 1053ac_dashdash=
c906108c
SS
1054for ac_option
1055do
c906108c
SS
1056 # If the previous option needs an argument, assign it.
1057 if test -n "$ac_prev"; then
81ecdfbb 1058 eval $ac_prev=\$ac_option
c906108c
SS
1059 ac_prev=
1060 continue
1061 fi
1062
81ecdfbb
RW
1063 case $ac_option in
1064 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1065 *) ac_optarg=yes ;;
1066 esac
c906108c
SS
1067
1068 # Accept the important Cygnus configure options, so we can diagnose typos.
1069
81ecdfbb
RW
1070 case $ac_dashdash$ac_option in
1071 --)
1072 ac_dashdash=yes ;;
c906108c
SS
1073
1074 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1075 ac_prev=bindir ;;
1076 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1077 bindir=$ac_optarg ;;
c906108c
SS
1078
1079 -build | --build | --buil | --bui | --bu)
bec39cab 1080 ac_prev=build_alias ;;
c906108c 1081 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1082 build_alias=$ac_optarg ;;
c906108c
SS
1083
1084 -cache-file | --cache-file | --cache-fil | --cache-fi \
1085 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1086 ac_prev=cache_file ;;
1087 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1088 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1089 cache_file=$ac_optarg ;;
1090
1091 --config-cache | -C)
1092 cache_file=config.cache ;;
c906108c 1093
81ecdfbb 1094 -datadir | --datadir | --datadi | --datad)
c906108c 1095 ac_prev=datadir ;;
81ecdfbb 1096 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1097 datadir=$ac_optarg ;;
c906108c 1098
81ecdfbb
RW
1099 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1100 | --dataroo | --dataro | --datar)
1101 ac_prev=datarootdir ;;
1102 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1103 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1104 datarootdir=$ac_optarg ;;
1105
c906108c 1106 -disable-* | --disable-*)
81ecdfbb 1107 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1108 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1109 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1110 as_fn_error "invalid feature name: $ac_useropt"
1111 ac_useropt_orig=$ac_useropt
1112 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1113 case $ac_user_opts in
1114 *"
1115"enable_$ac_useropt"
1116"*) ;;
1117 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1118 ac_unrecognized_sep=', ';;
1119 esac
1120 eval enable_$ac_useropt=no ;;
1121
1122 -docdir | --docdir | --docdi | --doc | --do)
1123 ac_prev=docdir ;;
1124 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1125 docdir=$ac_optarg ;;
1126
1127 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1128 ac_prev=dvidir ;;
1129 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1130 dvidir=$ac_optarg ;;
c906108c
SS
1131
1132 -enable-* | --enable-*)
81ecdfbb 1133 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1134 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136 as_fn_error "invalid feature name: $ac_useropt"
1137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"enable_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
b4e70030 1145 esac
81ecdfbb 1146 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1147
1148 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1149 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1150 | --exec | --exe | --ex)
1151 ac_prev=exec_prefix ;;
1152 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1153 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1154 | --exec=* | --exe=* | --ex=*)
bec39cab 1155 exec_prefix=$ac_optarg ;;
c906108c
SS
1156
1157 -gas | --gas | --ga | --g)
1158 # Obsolete; use --with-gas.
1159 with_gas=yes ;;
1160
bec39cab
AC
1161 -help | --help | --hel | --he | -h)
1162 ac_init_help=long ;;
1163 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1164 ac_init_help=recursive ;;
1165 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1166 ac_init_help=short ;;
c906108c
SS
1167
1168 -host | --host | --hos | --ho)
bec39cab 1169 ac_prev=host_alias ;;
c906108c 1170 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1171 host_alias=$ac_optarg ;;
c906108c 1172
81ecdfbb
RW
1173 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1174 ac_prev=htmldir ;;
1175 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1176 | --ht=*)
1177 htmldir=$ac_optarg ;;
1178
c906108c
SS
1179 -includedir | --includedir | --includedi | --included | --include \
1180 | --includ | --inclu | --incl | --inc)
1181 ac_prev=includedir ;;
1182 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1183 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1184 includedir=$ac_optarg ;;
c906108c
SS
1185
1186 -infodir | --infodir | --infodi | --infod | --info | --inf)
1187 ac_prev=infodir ;;
1188 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1189 infodir=$ac_optarg ;;
c906108c
SS
1190
1191 -libdir | --libdir | --libdi | --libd)
1192 ac_prev=libdir ;;
1193 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1194 libdir=$ac_optarg ;;
c906108c
SS
1195
1196 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1197 | --libexe | --libex | --libe)
1198 ac_prev=libexecdir ;;
1199 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1200 | --libexe=* | --libex=* | --libe=*)
bec39cab 1201 libexecdir=$ac_optarg ;;
c906108c 1202
81ecdfbb
RW
1203 -localedir | --localedir | --localedi | --localed | --locale)
1204 ac_prev=localedir ;;
1205 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1206 localedir=$ac_optarg ;;
1207
c906108c 1208 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1209 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1210 ac_prev=localstatedir ;;
1211 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1212 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1213 localstatedir=$ac_optarg ;;
c906108c
SS
1214
1215 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1216 ac_prev=mandir ;;
1217 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1218 mandir=$ac_optarg ;;
c906108c
SS
1219
1220 -nfp | --nfp | --nf)
1221 # Obsolete; use --without-fp.
1222 with_fp=no ;;
1223
1224 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1225 | --no-cr | --no-c | -n)
c906108c
SS
1226 no_create=yes ;;
1227
1228 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1229 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1230 no_recursion=yes ;;
1231
1232 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1233 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1234 | --oldin | --oldi | --old | --ol | --o)
1235 ac_prev=oldincludedir ;;
1236 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1237 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1238 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1239 oldincludedir=$ac_optarg ;;
c906108c
SS
1240
1241 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1242 ac_prev=prefix ;;
1243 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1244 prefix=$ac_optarg ;;
c906108c
SS
1245
1246 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1247 | --program-pre | --program-pr | --program-p)
1248 ac_prev=program_prefix ;;
1249 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1250 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1251 program_prefix=$ac_optarg ;;
c906108c
SS
1252
1253 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1254 | --program-suf | --program-su | --program-s)
1255 ac_prev=program_suffix ;;
1256 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1257 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1258 program_suffix=$ac_optarg ;;
c906108c
SS
1259
1260 -program-transform-name | --program-transform-name \
1261 | --program-transform-nam | --program-transform-na \
1262 | --program-transform-n | --program-transform- \
1263 | --program-transform | --program-transfor \
1264 | --program-transfo | --program-transf \
1265 | --program-trans | --program-tran \
1266 | --progr-tra | --program-tr | --program-t)
1267 ac_prev=program_transform_name ;;
1268 -program-transform-name=* | --program-transform-name=* \
1269 | --program-transform-nam=* | --program-transform-na=* \
1270 | --program-transform-n=* | --program-transform-=* \
1271 | --program-transform=* | --program-transfor=* \
1272 | --program-transfo=* | --program-transf=* \
1273 | --program-trans=* | --program-tran=* \
1274 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1275 program_transform_name=$ac_optarg ;;
c906108c 1276
81ecdfbb
RW
1277 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1278 ac_prev=pdfdir ;;
1279 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1280 pdfdir=$ac_optarg ;;
1281
1282 -psdir | --psdir | --psdi | --psd | --ps)
1283 ac_prev=psdir ;;
1284 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1285 psdir=$ac_optarg ;;
1286
c906108c
SS
1287 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1288 | -silent | --silent | --silen | --sile | --sil)
1289 silent=yes ;;
1290
1291 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1292 ac_prev=sbindir ;;
1293 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1294 | --sbi=* | --sb=*)
bec39cab 1295 sbindir=$ac_optarg ;;
c906108c
SS
1296
1297 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1298 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1299 | --sharedst | --shareds | --shared | --share | --shar \
1300 | --sha | --sh)
1301 ac_prev=sharedstatedir ;;
1302 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1303 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1304 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1305 | --sha=* | --sh=*)
bec39cab 1306 sharedstatedir=$ac_optarg ;;
c906108c
SS
1307
1308 -site | --site | --sit)
1309 ac_prev=site ;;
1310 -site=* | --site=* | --sit=*)
bec39cab 1311 site=$ac_optarg ;;
3ace7edb 1312
c906108c
SS
1313 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1314 ac_prev=srcdir ;;
1315 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1316 srcdir=$ac_optarg ;;
c906108c
SS
1317
1318 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1319 | --syscon | --sysco | --sysc | --sys | --sy)
1320 ac_prev=sysconfdir ;;
1321 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1322 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1323 sysconfdir=$ac_optarg ;;
c906108c
SS
1324
1325 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1326 ac_prev=target_alias ;;
c906108c 1327 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1328 target_alias=$ac_optarg ;;
c906108c
SS
1329
1330 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1331 verbose=yes ;;
1332
bec39cab
AC
1333 -version | --version | --versio | --versi | --vers | -V)
1334 ac_init_version=: ;;
c906108c
SS
1335
1336 -with-* | --with-*)
81ecdfbb 1337 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1338 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1339 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1340 as_fn_error "invalid package name: $ac_useropt"
1341 ac_useropt_orig=$ac_useropt
1342 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1343 case $ac_user_opts in
1344 *"
1345"with_$ac_useropt"
1346"*) ;;
1347 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1348 ac_unrecognized_sep=', ';;
b4e70030 1349 esac
81ecdfbb 1350 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1351
1352 -without-* | --without-*)
81ecdfbb 1353 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1354 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1355 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1356 as_fn_error "invalid package name: $ac_useropt"
1357 ac_useropt_orig=$ac_useropt
1358 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1359 case $ac_user_opts in
1360 *"
1361"with_$ac_useropt"
1362"*) ;;
1363 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1364 ac_unrecognized_sep=', ';;
1365 esac
1366 eval with_$ac_useropt=no ;;
c906108c
SS
1367
1368 --x)
1369 # Obsolete; use --with-x.
1370 with_x=yes ;;
1371
1372 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1373 | --x-incl | --x-inc | --x-in | --x-i)
1374 ac_prev=x_includes ;;
1375 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1376 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1377 x_includes=$ac_optarg ;;
c906108c
SS
1378
1379 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1380 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1381 ac_prev=x_libraries ;;
1382 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1383 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1384 x_libraries=$ac_optarg ;;
c906108c 1385
81ecdfbb
RW
1386 -*) as_fn_error "unrecognized option: \`$ac_option'
1387Try \`$0 --help' for more information."
c906108c
SS
1388 ;;
1389
bec39cab
AC
1390 *=*)
1391 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1392 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1393 case $ac_envvar in #(
1394 '' | [0-9]* | *[!_$as_cr_alnum]* )
1395 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1396 esac
1397 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1398 export $ac_envvar ;;
1399
c906108c 1400 *)
bec39cab 1401 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1402 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1403 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1404 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1405 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1406 ;;
1407
1408 esac
1409done
1410
1411if test -n "$ac_prev"; then
bec39cab 1412 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1413 as_fn_error "missing argument to $ac_option"
c906108c 1414fi
c906108c 1415
81ecdfbb
RW
1416if test -n "$ac_unrecognized_opts"; then
1417 case $enable_option_checking in
1418 no) ;;
1419 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1420 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1421 esac
81ecdfbb 1422fi
b4e70030 1423
81ecdfbb
RW
1424# Check all directory arguments for consistency.
1425for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1426 datadir sysconfdir sharedstatedir localstatedir includedir \
1427 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1428 libdir localedir mandir
b4e70030 1429do
81ecdfbb
RW
1430 eval ac_val=\$$ac_var
1431 # Remove trailing slashes.
1432 case $ac_val in
1433 */ )
1434 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1435 eval $ac_var=\$ac_val;;
1436 esac
1437 # Be sure to have absolute directory names.
b4e70030 1438 case $ac_val in
81ecdfbb
RW
1439 [\\/$]* | ?:[\\/]* ) continue;;
1440 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1441 esac
81ecdfbb 1442 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1443done
1444
bec39cab
AC
1445# There might be people who depend on the old broken behavior: `$host'
1446# used to hold the argument of --host etc.
1447# FIXME: To remove some day.
1448build=$build_alias
1449host=$host_alias
1450target=$target_alias
1451
1452# FIXME: To remove some day.
1453if test "x$host_alias" != x; then
1454 if test "x$build_alias" = x; then
1455 cross_compiling=maybe
81ecdfbb 1456 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1457 If a cross compiler is detected then cross compile mode will be used." >&2
1458 elif test "x$build_alias" != "x$host_alias"; then
1459 cross_compiling=yes
1460 fi
1461fi
c906108c 1462
bec39cab
AC
1463ac_tool_prefix=
1464test -n "$host_alias" && ac_tool_prefix=$host_alias-
1465
1466test "$silent" = yes && exec 6>/dev/null
c906108c 1467
c906108c 1468
81ecdfbb
RW
1469ac_pwd=`pwd` && test -n "$ac_pwd" &&
1470ac_ls_di=`ls -di .` &&
1471ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1472 as_fn_error "working directory cannot be determined"
1473test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1474 as_fn_error "pwd does not report name of working directory"
1475
1476
c906108c
SS
1477# Find the source files, if location was not specified.
1478if test -z "$srcdir"; then
1479 ac_srcdir_defaulted=yes
81ecdfbb
RW
1480 # Try the directory containing this script, then the parent directory.
1481 ac_confdir=`$as_dirname -- "$as_myself" ||
1482$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1483 X"$as_myself" : 'X\(//\)[^/]' \| \
1484 X"$as_myself" : 'X\(//\)$' \| \
1485 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1486$as_echo X"$as_myself" |
1487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1488 s//\1/
1489 q
1490 }
1491 /^X\(\/\/\)[^/].*/{
1492 s//\1/
1493 q
1494 }
1495 /^X\(\/\/\)$/{
1496 s//\1/
1497 q
1498 }
1499 /^X\(\/\).*/{
1500 s//\1/
1501 q
1502 }
1503 s/.*/./; q'`
c906108c 1504 srcdir=$ac_confdir
81ecdfbb 1505 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1506 srcdir=..
1507 fi
1508else
1509 ac_srcdir_defaulted=no
1510fi
81ecdfbb
RW
1511if test ! -r "$srcdir/$ac_unique_file"; then
1512 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1513 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1514fi
1515ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1516ac_abs_confdir=`(
1517 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1518 pwd)`
1519# When building in place, set srcdir=.
1520if test "$ac_abs_confdir" = "$ac_pwd"; then
1521 srcdir=.
1522fi
1523# Remove unnecessary trailing slashes from srcdir.
1524# Double slashes in file names in object file debugging info
1525# mess up M-x gdb in Emacs.
1526case $srcdir in
1527*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1528esac
1529for ac_var in $ac_precious_vars; do
1530 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1531 eval ac_env_${ac_var}_value=\$${ac_var}
1532 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1533 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1534done
c906108c 1535
bec39cab
AC
1536#
1537# Report the --help message.
1538#
1539if test "$ac_init_help" = "long"; then
1540 # Omit some internal or obsolete options to make the list less imposing.
1541 # This message is too long to be a string in the A/UX 3.1 sh.
1542 cat <<_ACEOF
1543\`configure' configures this package to adapt to many kinds of systems.
1544
1545Usage: $0 [OPTION]... [VAR=VALUE]...
1546
1547To assign environment variables (e.g., CC, CFLAGS...), specify them as
1548VAR=VALUE. See below for descriptions of some of the useful variables.
1549
1550Defaults for the options are specified in brackets.
1551
1552Configuration:
1553 -h, --help display this help and exit
1554 --help=short display options specific to this package
1555 --help=recursive display the short help of all the included packages
1556 -V, --version display version information and exit
1557 -q, --quiet, --silent do not print \`checking...' messages
1558 --cache-file=FILE cache test results in FILE [disabled]
1559 -C, --config-cache alias for \`--cache-file=config.cache'
1560 -n, --no-create do not create output files
1561 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1562
bec39cab
AC
1563Installation directories:
1564 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1565 [$ac_default_prefix]
bec39cab 1566 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1567 [PREFIX]
bec39cab
AC
1568
1569By default, \`make install' will install all the files in
1570\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1571an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1572for instance \`--prefix=\$HOME'.
1573
1574For better control, use the options below.
1575
1576Fine tuning of the installation directories:
81ecdfbb
RW
1577 --bindir=DIR user executables [EPREFIX/bin]
1578 --sbindir=DIR system admin executables [EPREFIX/sbin]
1579 --libexecdir=DIR program executables [EPREFIX/libexec]
1580 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1581 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1582 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1583 --libdir=DIR object code libraries [EPREFIX/lib]
1584 --includedir=DIR C header files [PREFIX/include]
1585 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1586 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1587 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1588 --infodir=DIR info documentation [DATAROOTDIR/info]
1589 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1590 --mandir=DIR man documentation [DATAROOTDIR/man]
1591 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1592 --htmldir=DIR html documentation [DOCDIR]
1593 --dvidir=DIR dvi documentation [DOCDIR]
1594 --pdfdir=DIR pdf documentation [DOCDIR]
1595 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1596_ACEOF
1597
1598 cat <<\_ACEOF
1599
1600Program names:
1601 --program-prefix=PREFIX prepend PREFIX to installed program names
1602 --program-suffix=SUFFIX append SUFFIX to installed program names
1603 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1604
1605X features:
1606 --x-includes=DIR X include files are in DIR
1607 --x-libraries=DIR X library files are in DIR
1608
1609System types:
1610 --build=BUILD configure for building on BUILD [guessed]
1611 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1612 --target=TARGET configure for building compilers for TARGET [HOST]
1613_ACEOF
1614fi
1615
1616if test -n "$ac_init_help"; then
1617
1618 cat <<\_ACEOF
1619
1620Optional Features:
81ecdfbb 1621 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1622 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1623 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1624 --enable-maintainer-mode enable make rules and dependencies not useful
1625 (and sometimes confusing) to the casual installer
da2f07f1
JK
1626 --enable-plugins Enable support for plugins (defaults no)
1627 --disable-largefile omit support for large files
e28b3332
DJ
1628 --disable-dependency-tracking speeds up one-time build
1629 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1630 --enable-targets=TARGETS
1631 alternative target configurations
c0993dbe 1632 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1633 --disable-gdbcli disable command-line interface (CLI)
1634 --disable-gdbmi disable machine-interface (MI)
1635 --enable-tui enable full-screen terminal user interface (TUI)
1636 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1637 --enable-profiling enable profiling of GDB
3841debe 1638 --disable-rpath do not hardcode runtime library paths
a1220294 1639 --enable-werror treat compile warnings as errors
32c1c914 1640 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1641 --enable-gdb-build-warnings
32c1c914 1642 enable GDB specific build-time compiler warnings if
a1220294 1643 gcc is used
32c1c914 1644 --enable-sim link gdb with simulator
bec39cab 1645 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1646 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1647 is auto)
bec39cab
AC
1648
1649Optional Packages:
1650 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1652 --with-separate-debug-dir=PATH
32c1c914 1653 look for global separate debug info in this path
62e4f60c 1654 [LIBDIR/debug]
b14b1491
TT
1655 --with-gdb-datadir=PATH look for global separate data files in this path
1656 [DATADIR/gdb]
29b0e8a2 1657 --with-relocated-sources=PATH
32c1c914
TT
1658 automatically relocate this path for source files
1659 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1660 --with-curses use the curses library instead of the termcap
1661 library
c16158bc
JM
1662 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1663 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1664 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1665 --with-libiconv-prefix=DIR
1666 search for libiconv in DIR/include and DIR/lib
478aac75 1667 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1668 --with-system-readline use installed readline library
5c39566f 1669 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1670 --with-gnu-ld assume the C compiler uses GNU ld default=no
1671 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1672 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1673 --with-python[=PYTHON] include python support
1674 (auto/yes/no/<python-program>)
a1220294
TT
1675 --without-included-regex
1676 don't use included regex; this is the default on
1677 systems with version 2 of the GNU C library (use
1678 with caution on other system)
81ecdfbb 1679 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1680 --with-system-gdbinit=PATH
32c1c914 1681 automatically load a system-wide gdbinit file
5062cc19
KS
1682 --with-tcl directory containing tcl configuration (tclConfig.sh)
1683 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1684 --with-x use the X Window System
bec39cab
AC
1685
1686Some influential environment variables:
1687 CC C compiler command
1688 CFLAGS C compiler flags
1689 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1690 nonstandard directory <lib dir>
81ecdfbb
RW
1691 LIBS libraries to pass to the linker, e.g. -l<library>
1692 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1693 you have headers in a nonstandard directory <include dir>
bec39cab 1694 CPP C preprocessor
81ecdfbb
RW
1695 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1696 the first program found out of: `bison -y', `byacc', `yacc'.
1697 YFLAGS The list of arguments that will be passed by default to $YACC.
1698 This script will default YFLAGS to the empty string to avoid a
1699 default value of `-d' given by some make applications.
1700 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1701
1702Use these variables to override the choices made by `configure' or to help
1703it to find libraries and programs with nonstandard names/locations.
1704
81ecdfbb 1705Report bugs to the package provider.
bec39cab 1706_ACEOF
81ecdfbb 1707ac_status=$?
bec39cab
AC
1708fi
1709
1710if test "$ac_init_help" = "recursive"; then
1711 # If there are subdirs, report their specific --help.
bec39cab 1712 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1713 test -d "$ac_dir" ||
1714 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1715 continue
bec39cab
AC
1716 ac_builddir=.
1717
81ecdfbb
RW
1718case "$ac_dir" in
1719.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1720*)
1721 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1722 # A ".." for each directory in $ac_dir_suffix.
1723 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1724 case $ac_top_builddir_sub in
1725 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1726 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1727 esac ;;
1728esac
1729ac_abs_top_builddir=$ac_pwd
1730ac_abs_builddir=$ac_pwd$ac_dir_suffix
1731# for backward compatibility:
1732ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1733
1734case $srcdir in
81ecdfbb 1735 .) # We are building in place.
bec39cab 1736 ac_srcdir=.
81ecdfbb
RW
1737 ac_top_srcdir=$ac_top_builddir_sub
1738 ac_abs_top_srcdir=$ac_pwd ;;
1739 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1740 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1741 ac_top_srcdir=$srcdir
1742 ac_abs_top_srcdir=$srcdir ;;
1743 *) # Relative name.
1744 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1745 ac_top_srcdir=$ac_top_build_prefix$srcdir
1746 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1747esac
81ecdfbb 1748ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1749
81ecdfbb
RW
1750 cd "$ac_dir" || { ac_status=$?; continue; }
1751 # Check for guested configure.
1752 if test -f "$ac_srcdir/configure.gnu"; then
1753 echo &&
1754 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1755 elif test -f "$ac_srcdir/configure"; then
1756 echo &&
1757 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1758 else
81ecdfbb
RW
1759 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1760 fi || ac_status=$?
1761 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1762 done
1763fi
1764
81ecdfbb 1765test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1766if $ac_init_version; then
1767 cat <<\_ACEOF
81ecdfbb
RW
1768configure
1769generated by GNU Autoconf 2.64
bec39cab 1770
81ecdfbb 1771Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1772This configure script is free software; the Free Software Foundation
1773gives unlimited permission to copy, distribute and modify it.
1774_ACEOF
81ecdfbb 1775 exit
bec39cab 1776fi
bec39cab 1777
81ecdfbb
RW
1778## ------------------------ ##
1779## Autoconf initialization. ##
1780## ------------------------ ##
bec39cab 1781
81ecdfbb
RW
1782# ac_fn_c_try_compile LINENO
1783# --------------------------
1784# Try to compile conftest.$ac_ext, and return whether this succeeded.
1785ac_fn_c_try_compile ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 rm -f conftest.$ac_objext
1789 if { { ac_try="$ac_compile"
1790case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793esac
1794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795$as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_compile") 2>conftest.err
1797 ac_status=$?
1798 if test -s conftest.err; then
1799 grep -v '^ *+' conftest.err >conftest.er1
1800 cat conftest.er1 >&5
1801 mv -f conftest.er1 conftest.err
1802 fi
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && {
1805 test -z "$ac_c_werror_flag" ||
1806 test ! -s conftest.err
1807 } && test -s conftest.$ac_objext; then :
1808 ac_retval=0
1809else
1810 $as_echo "$as_me: failed program was:" >&5
1811sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1812
81ecdfbb
RW
1813 ac_retval=1
1814fi
1815 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1816 return $ac_retval
1817
1818} # ac_fn_c_try_compile
1819
1820# ac_fn_c_try_cpp LINENO
1821# ----------------------
1822# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1823ac_fn_c_try_cpp ()
bec39cab 1824{
81ecdfbb
RW
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 if { { ac_try="$ac_cpp conftest.$ac_ext"
1827case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1839 fi
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } >/dev/null && {
1842 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 }; then :
1845 ac_retval=0
1846else
1847 $as_echo "$as_me: failed program was:" >&5
1848sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1849
81ecdfbb
RW
1850 ac_retval=1
1851fi
1852 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1853 return $ac_retval
bec39cab 1854
81ecdfbb 1855} # ac_fn_c_try_cpp
bec39cab 1856
81ecdfbb
RW
1857# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1858# -------------------------------------------------------
1859# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1860# the include files in INCLUDES and setting the cache variable VAR
1861# accordingly.
1862ac_fn_c_check_header_mongrel ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867$as_echo_n "checking for $2... " >&6; }
1868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1869 $as_echo_n "(cached) " >&6
1870fi
1871eval ac_res=\$$3
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873$as_echo "$ac_res" >&6; }
1874else
1875 # Is the header compilable?
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1877$as_echo_n "checking $2 usability... " >&6; }
1878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884 ac_header_compiler=yes
1885else
1886 ac_header_compiler=no
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1890$as_echo "$ac_header_compiler" >&6; }
bec39cab 1891
81ecdfbb
RW
1892# Is the header present?
1893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1894$as_echo_n "checking $2 presence... " >&6; }
1895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896/* end confdefs.h. */
1897#include <$2>
1898_ACEOF
1899if ac_fn_c_try_cpp "$LINENO"; then :
1900 ac_header_preproc=yes
1901else
1902 ac_header_preproc=no
1903fi
1904rm -f conftest.err conftest.$ac_ext
1905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1906$as_echo "$ac_header_preproc" >&6; }
bec39cab 1907
81ecdfbb
RW
1908# So? What about this header?
1909case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1910 yes:no: )
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1912$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1915 ;;
1916 no:yes:* )
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1918$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1920$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1922$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1924$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927 ;;
1928esac
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
1931if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=\$ac_header_compiler"
1935fi
1936eval ac_res=\$$3
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938$as_echo "$ac_res" >&6; }
1939fi
1940 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1941
81ecdfbb 1942} # ac_fn_c_check_header_mongrel
bec39cab 1943
81ecdfbb
RW
1944# ac_fn_c_try_run LINENO
1945# ----------------------
1946# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1947# that executables *can* be run.
1948ac_fn_c_try_run ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 if { { ac_try="$ac_link"
1952case "(($ac_try" in
1953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954 *) ac_try_echo=$ac_try;;
1955esac
1956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957$as_echo "$ac_try_echo"; } >&5
1958 (eval "$ac_link") 2>&5
1959 ac_status=$?
1960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1962 { { case "(($ac_try" in
1963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1964 *) ac_try_echo=$ac_try;;
1965esac
1966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1967$as_echo "$ac_try_echo"; } >&5
1968 (eval "$ac_try") 2>&5
1969 ac_status=$?
1970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971 test $ac_status = 0; }; }; then :
1972 ac_retval=0
1973else
1974 $as_echo "$as_me: program exited with status $ac_status" >&5
1975 $as_echo "$as_me: failed program was:" >&5
1976sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1977
81ecdfbb
RW
1978 ac_retval=$ac_status
1979fi
1980 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1982 return $ac_retval
bec39cab 1983
81ecdfbb 1984} # ac_fn_c_try_run
bec39cab 1985
81ecdfbb
RW
1986# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1987# -------------------------------------------------------
1988# Tests whether HEADER exists and can be compiled using the include files in
1989# INCLUDES, setting the cache variable VAR accordingly.
1990ac_fn_c_check_header_compile ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1994$as_echo_n "checking for $2... " >&6; }
1995if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1996 $as_echo_n "(cached) " >&6
1997else
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001#include <$2>
bec39cab 2002_ACEOF
81ecdfbb
RW
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 eval "$3=yes"
2005else
2006 eval "$3=no"
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2009fi
2010eval ac_res=\$$3
2011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2012$as_echo "$ac_res" >&6; }
2013 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2014
81ecdfbb 2015} # ac_fn_c_check_header_compile
bec39cab 2016
81ecdfbb
RW
2017# ac_fn_c_try_link LINENO
2018# -----------------------
2019# Try to link conftest.$ac_ext, and return whether this succeeded.
2020ac_fn_c_try_link ()
b4e70030 2021{
81ecdfbb
RW
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 rm -f conftest.$ac_objext conftest$ac_exeext
2024 if { { ac_try="$ac_link"
2025case "(($ac_try" in
2026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2027 *) ac_try_echo=$ac_try;;
2028esac
2029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2030$as_echo "$ac_try_echo"; } >&5
2031 (eval "$ac_link") 2>conftest.err
2032 ac_status=$?
2033 if test -s conftest.err; then
2034 grep -v '^ *+' conftest.err >conftest.er1
2035 cat conftest.er1 >&5
2036 mv -f conftest.er1 conftest.err
2037 fi
2038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2039 test $ac_status = 0; } && {
2040 test -z "$ac_c_werror_flag" ||
2041 test ! -s conftest.err
2042 } && test -s conftest$ac_exeext && {
2043 test "$cross_compiling" = yes ||
2044 $as_test_x conftest$ac_exeext
2045 }; then :
2046 ac_retval=0
2047else
2048 $as_echo "$as_me: failed program was:" >&5
2049sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2050
81ecdfbb
RW
2051 ac_retval=1
2052fi
2053 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2054 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2055 # interfere with the next link command; also delete a directory that is
2056 # left behind by Apple's compiler. We do this before executing the actions.
2057 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2058 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059 return $ac_retval
bec39cab 2060
81ecdfbb 2061} # ac_fn_c_try_link
bec39cab 2062
81ecdfbb
RW
2063# ac_fn_c_check_func LINENO FUNC VAR
2064# ----------------------------------
2065# Tests whether FUNC exists, setting the cache variable VAR accordingly
2066ac_fn_c_check_func ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2070$as_echo_n "checking for $2... " >&6; }
2071if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2072 $as_echo_n "(cached) " >&6
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2078#define $2 innocuous_$2
bec39cab 2079
81ecdfbb
RW
2080/* System header to define __stub macros and hopefully few prototypes,
2081 which can conflict with char $2 (); below.
2082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2083 <limits.h> exists even on freestanding compilers. */
bec39cab 2084
81ecdfbb
RW
2085#ifdef __STDC__
2086# include <limits.h>
2087#else
2088# include <assert.h>
2089#endif
bec39cab 2090
81ecdfbb 2091#undef $2
bec39cab 2092
81ecdfbb
RW
2093/* Override any GCC internal prototype to avoid an error.
2094 Use char because int might match the return type of a GCC
2095 builtin and then its argument prototype would still apply. */
2096#ifdef __cplusplus
2097extern "C"
2098#endif
2099char $2 ();
2100/* The GNU C library defines this for functions which it implements
2101 to always fail with ENOSYS. Some functions are actually named
2102 something starting with __ and the normal name is an alias. */
2103#if defined __stub_$2 || defined __stub___$2
2104choke me
2105#endif
bec39cab 2106
81ecdfbb
RW
2107int
2108main ()
2109{
2110return $2 ();
2111 ;
2112 return 0;
2113}
bec39cab 2114_ACEOF
81ecdfbb
RW
2115if ac_fn_c_try_link "$LINENO"; then :
2116 eval "$3=yes"
2117else
2118 eval "$3=no"
2119fi
2120rm -f core conftest.err conftest.$ac_objext \
2121 conftest$ac_exeext conftest.$ac_ext
2122fi
2123eval ac_res=\$$3
2124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2125$as_echo "$ac_res" >&6; }
2126 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2127
81ecdfbb 2128} # ac_fn_c_check_func
bec39cab 2129
81ecdfbb
RW
2130# ac_fn_c_check_decl LINENO SYMBOL VAR
2131# ------------------------------------
2132# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2133ac_fn_c_check_decl ()
2134{
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2136 as_decl_name=`echo $2|sed 's/ *(.*//'`
2137 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2139$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2140if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2141 $as_echo_n "(cached) " >&6
2142else
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
2147main ()
2148{
e7a30f46
DE
2149#ifndef $as_decl_name
2150#ifdef __cplusplus
2151 (void) $as_decl_use;
2152#else
2153 (void) $as_decl_name;
2154#endif
81ecdfbb 2155#endif
bec39cab 2156
81ecdfbb
RW
2157 ;
2158 return 0;
2159}
bec39cab 2160_ACEOF
81ecdfbb
RW
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 eval "$3=yes"
2163else
2164 eval "$3=no"
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167fi
2168eval ac_res=\$$3
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170$as_echo "$ac_res" >&6; }
2171 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2172
81ecdfbb 2173} # ac_fn_c_check_decl
bec39cab 2174
81ecdfbb
RW
2175# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2176# --------------------------------------------
2177# Tries to find the compile-time value of EXPR in a program that includes
2178# INCLUDES, setting VAR accordingly. Returns whether the value could be
2179# computed
2180ac_fn_c_compute_int ()
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 if test "$cross_compiling" = yes; then
2184 # Depending upon the size, compute the lo and hi bounds.
2185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188int
2189main ()
2190{
2191static int test_array [1 - 2 * !(($2) >= 0)];
2192test_array [0] = 0
bec39cab 2193
81ecdfbb
RW
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_compile "$LINENO"; then :
2199 ac_lo=0 ac_mid=0
2200 while :; do
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2208test_array [0] = 0
bec39cab 2209
81ecdfbb
RW
2210 ;
2211 return 0;
2212}
2213_ACEOF
2214if ac_fn_c_try_compile "$LINENO"; then :
2215 ac_hi=$ac_mid; break
2216else
2217 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2218 if test $ac_lo -le $ac_mid; then
2219 ac_lo= ac_hi=
2220 break
2221 fi
2222 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2223fi
81ecdfbb
RW
2224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225 done
c906108c 2226else
81ecdfbb
RW
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230int
2231main ()
2232{
2233static int test_array [1 - 2 * !(($2) < 0)];
2234test_array [0] = 0
bec39cab 2235
81ecdfbb
RW
2236 ;
2237 return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=-1 ac_mid=-1
2242 while :; do
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245$4
2246int
2247main ()
2248{
2249static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2250test_array [0] = 0
bec39cab 2251
81ecdfbb
RW
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
2257 ac_lo=$ac_mid; break
2258else
2259 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2260 if test $ac_mid -le $ac_hi; then
2261 ac_lo= ac_hi=
2262 break
2263 fi
2264 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2265fi
2266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2267 done
2268else
2269 ac_lo= ac_hi=
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274# Binary search between lo and hi bounds.
2275while test "x$ac_lo" != "x$ac_hi"; do
2276 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$4
2280int
2281main ()
2282{
2283static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2284test_array [0] = 0
bec39cab 2285
81ecdfbb
RW
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291 ac_hi=$ac_mid
2292else
2293 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296done
2297case $ac_lo in #((
2298?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2299'') ac_retval=1 ;;
2300esac
2301 else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304$4
2305static long int longval () { return $2; }
2306static unsigned long int ulongval () { return $2; }
2307#include <stdio.h>
2308#include <stdlib.h>
2309int
2310main ()
2311{
bec39cab 2312
81ecdfbb
RW
2313 FILE *f = fopen ("conftest.val", "w");
2314 if (! f)
2315 return 1;
2316 if (($2) < 0)
2317 {
2318 long int i = longval ();
2319 if (i != ($2))
2320 return 1;
2321 fprintf (f, "%ld", i);
2322 }
2323 else
2324 {
2325 unsigned long int i = ulongval ();
2326 if (i != ($2))
2327 return 1;
2328 fprintf (f, "%lu", i);
2329 }
2330 /* Do not output a trailing newline, as this causes \r\n confusion
2331 on some platforms. */
2332 return ferror (f) || fclose (f) != 0;
bec39cab 2333
81ecdfbb
RW
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_run "$LINENO"; then :
2339 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2340else
2341 ac_retval=1
2342fi
2343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2344 conftest.$ac_objext conftest.beam conftest.$ac_ext
2345rm -f conftest.val
bec39cab 2346
81ecdfbb
RW
2347 fi
2348 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2349 return $ac_retval
bec39cab 2350
81ecdfbb 2351} # ac_fn_c_compute_int
bec39cab 2352
81ecdfbb
RW
2353# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2354# ----------------------------------------------------
2355# Tries to find if the field MEMBER exists in type AGGR, after including
2356# INCLUDES, setting cache variable VAR accordingly.
2357ac_fn_c_check_member ()
2358{
2359 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2361$as_echo_n "checking for $2.$3... " >&6; }
2362if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2363 $as_echo_n "(cached) " >&6
2364else
2365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366/* end confdefs.h. */
2367$5
2368int
2369main ()
2370{
2371static $2 ac_aggr;
2372if (ac_aggr.$3)
2373return 0;
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379 eval "$4=yes"
2380else
2381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2382/* end confdefs.h. */
2383$5
2384int
2385main ()
2386{
2387static $2 ac_aggr;
2388if (sizeof ac_aggr.$3)
2389return 0;
2390 ;
2391 return 0;
2392}
2393_ACEOF
2394if ac_fn_c_try_compile "$LINENO"; then :
2395 eval "$4=yes"
2396else
2397 eval "$4=no"
2398fi
2399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2400fi
2401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402fi
2403eval ac_res=\$$4
2404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2405$as_echo "$ac_res" >&6; }
2406 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2407
81ecdfbb 2408} # ac_fn_c_check_member
bec39cab 2409
81ecdfbb
RW
2410# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2411# -------------------------------------------
2412# Tests whether TYPE exists after having included INCLUDES, setting cache
2413# variable VAR accordingly.
2414ac_fn_c_check_type ()
2415{
2416 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2418$as_echo_n "checking for $2... " >&6; }
2419if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2420 $as_echo_n "(cached) " >&6
2421else
2422 eval "$3=no"
2423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h. */
2425$4
2426int
2427main ()
2428{
2429if (sizeof ($2))
2430 return 0;
2431 ;
2432 return 0;
2433}
2434_ACEOF
2435if ac_fn_c_try_compile "$LINENO"; then :
2436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h. */
2438$4
2439int
2440main ()
2441{
2442if (sizeof (($2)))
2443 return 0;
2444 ;
2445 return 0;
2446}
2447_ACEOF
2448if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2449
81ecdfbb
RW
2450else
2451 eval "$3=yes"
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2456fi
2457eval ac_res=\$$3
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2459$as_echo "$ac_res" >&6; }
2460 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2461
81ecdfbb
RW
2462} # ac_fn_c_check_type
2463cat >config.log <<_ACEOF
2464This file contains any messages produced by compilers while
2465running configure, to aid debugging if configure makes a mistake.
d5af19ba 2466
81ecdfbb
RW
2467It was created by $as_me, which was
2468generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2469
81ecdfbb 2470 $ $0 $@
413ccac7 2471
81ecdfbb
RW
2472_ACEOF
2473exec 5>>config.log
2474{
2475cat <<_ASUNAME
2476## --------- ##
2477## Platform. ##
2478## --------- ##
413ccac7 2479
81ecdfbb
RW
2480hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2481uname -m = `(uname -m) 2>/dev/null || echo unknown`
2482uname -r = `(uname -r) 2>/dev/null || echo unknown`
2483uname -s = `(uname -s) 2>/dev/null || echo unknown`
2484uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2485
81ecdfbb
RW
2486/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2487/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2488
81ecdfbb
RW
2489/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2490/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2491/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2492/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2493/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2494/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2495/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2496
81ecdfbb 2497_ASUNAME
bec39cab 2498
bec39cab
AC
2499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2500for as_dir in $PATH
2501do
2502 IFS=$as_save_IFS
2503 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2504 $as_echo "PATH: $as_dir"
2505 done
2506IFS=$as_save_IFS
bec39cab 2507
81ecdfbb 2508} >&5
bec39cab 2509
81ecdfbb 2510cat >&5 <<_ACEOF
bec39cab 2511
bec39cab 2512
81ecdfbb
RW
2513## ----------- ##
2514## Core tests. ##
2515## ----------- ##
2516
2517_ACEOF
2518
2519
2520# Keep a trace of the command line.
2521# Strip out --no-create and --no-recursion so they do not pile up.
2522# Strip out --silent because we don't want to record it for future runs.
2523# Also quote any args containing shell meta-characters.
2524# Make two passes to allow for proper duplicate-argument suppression.
2525ac_configure_args=
2526ac_configure_args0=
2527ac_configure_args1=
2528ac_must_keep_next=false
2529for ac_pass in 1 2
2530do
2531 for ac_arg
2532 do
2533 case $ac_arg in
2534 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2535 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2536 | -silent | --silent | --silen | --sile | --sil)
2537 continue ;;
2538 *\'*)
2539 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2540 esac
2541 case $ac_pass in
2542 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2543 2)
2544 as_fn_append ac_configure_args1 " '$ac_arg'"
2545 if test $ac_must_keep_next = true; then
2546 ac_must_keep_next=false # Got value, back to normal.
2547 else
2548 case $ac_arg in
2549 *=* | --config-cache | -C | -disable-* | --disable-* \
2550 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2551 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2552 | -with-* | --with-* | -without-* | --without-* | --x)
2553 case "$ac_configure_args0 " in
2554 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2555 esac
2556 ;;
2557 -* ) ac_must_keep_next=true ;;
2558 esac
2559 fi
2560 as_fn_append ac_configure_args " '$ac_arg'"
2561 ;;
2562 esac
2563 done
2564done
2565{ ac_configure_args0=; unset ac_configure_args0;}
2566{ ac_configure_args1=; unset ac_configure_args1;}
2567
2568# When interrupted or exit'd, cleanup temporary files, and complete
2569# config.log. We remove comments because anyway the quotes in there
2570# would cause problems or look ugly.
2571# WARNING: Use '\'' to represent an apostrophe within the trap.
2572# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2573trap 'exit_status=$?
2574 # Save into config.log some information that might help in debugging.
2575 {
2576 echo
2577
2578 cat <<\_ASBOX
2579## ---------------- ##
2580## Cache variables. ##
2581## ---------------- ##
2582_ASBOX
2583 echo
2584 # The following way of writing the cache mishandles newlines in values,
2585(
2586 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2587 eval ac_val=\$$ac_var
2588 case $ac_val in #(
2589 *${as_nl}*)
2590 case $ac_var in #(
2591 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2592$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2593 esac
2594 case $ac_var in #(
2595 _ | IFS | as_nl) ;; #(
2596 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2597 *) { eval $ac_var=; unset $ac_var;} ;;
2598 esac ;;
2599 esac
2600 done
2601 (set) 2>&1 |
2602 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2603 *${as_nl}ac_space=\ *)
2604 sed -n \
2605 "s/'\''/'\''\\\\'\'''\''/g;
2606 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2607 ;; #(
2608 *)
2609 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2610 ;;
2611 esac |
2612 sort
2613)
2614 echo
2615
2616 cat <<\_ASBOX
2617## ----------------- ##
2618## Output variables. ##
2619## ----------------- ##
2620_ASBOX
2621 echo
2622 for ac_var in $ac_subst_vars
2623 do
2624 eval ac_val=\$$ac_var
2625 case $ac_val in
2626 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2627 esac
2628 $as_echo "$ac_var='\''$ac_val'\''"
2629 done | sort
2630 echo
2631
2632 if test -n "$ac_subst_files"; then
2633 cat <<\_ASBOX
2634## ------------------- ##
2635## File substitutions. ##
2636## ------------------- ##
2637_ASBOX
2638 echo
2639 for ac_var in $ac_subst_files
2640 do
2641 eval ac_val=\$$ac_var
2642 case $ac_val in
2643 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2644 esac
2645 $as_echo "$ac_var='\''$ac_val'\''"
2646 done | sort
2647 echo
2648 fi
2649
2650 if test -s confdefs.h; then
2651 cat <<\_ASBOX
2652## ----------- ##
2653## confdefs.h. ##
2654## ----------- ##
2655_ASBOX
2656 echo
2657 cat confdefs.h
2658 echo
2659 fi
2660 test "$ac_signal" != 0 &&
2661 $as_echo "$as_me: caught signal $ac_signal"
2662 $as_echo "$as_me: exit $exit_status"
2663 } >&5
2664 rm -f core *.core core.conftest.* &&
2665 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2666 exit $exit_status
2667' 0
2668for ac_signal in 1 2 13 15; do
2669 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2670done
2671ac_signal=0
2672
2673# confdefs.h avoids OS command line length limits that DEFS can exceed.
2674rm -f -r conftest* confdefs.h
2675
2676$as_echo "/* confdefs.h */" > confdefs.h
2677
2678# Predefined preprocessor variables.
2679
2680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_NAME "$PACKAGE_NAME"
2682_ACEOF
2683
2684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2686_ACEOF
2687
2688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_VERSION "$PACKAGE_VERSION"
2690_ACEOF
2691
2692cat >>confdefs.h <<_ACEOF
2693#define PACKAGE_STRING "$PACKAGE_STRING"
2694_ACEOF
2695
2696cat >>confdefs.h <<_ACEOF
2697#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2698_ACEOF
2699
2700cat >>confdefs.h <<_ACEOF
2701#define PACKAGE_URL "$PACKAGE_URL"
2702_ACEOF
2703
2704
2705# Let the site file select an alternate cache file if it wants to.
2706# Prefer an explicitly selected file to automatically selected ones.
2707ac_site_file1=NONE
2708ac_site_file2=NONE
2709if test -n "$CONFIG_SITE"; then
2710 ac_site_file1=$CONFIG_SITE
2711elif test "x$prefix" != xNONE; then
2712 ac_site_file1=$prefix/share/config.site
2713 ac_site_file2=$prefix/etc/config.site
2714else
2715 ac_site_file1=$ac_default_prefix/share/config.site
2716 ac_site_file2=$ac_default_prefix/etc/config.site
2717fi
2718for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2719do
2720 test "x$ac_site_file" = xNONE && continue
2721 if test -r "$ac_site_file"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2723$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2724 sed 's/^/| /' "$ac_site_file" >&5
2725 . "$ac_site_file"
2726 fi
2727done
2728
2729if test -r "$cache_file"; then
2730 # Some versions of bash will fail to source /dev/null (special
2731 # files actually), so we avoid doing that.
2732 if test -f "$cache_file"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2734$as_echo "$as_me: loading cache $cache_file" >&6;}
2735 case $cache_file in
2736 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2737 *) . "./$cache_file";;
2738 esac
2739 fi
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2742$as_echo "$as_me: creating cache $cache_file" >&6;}
2743 >$cache_file
bec39cab
AC
2744fi
2745
f434ba03
PA
2746gl_header_list="$gl_header_list sys/mman.h"
2747gl_func_list="$gl_func_list mprotect"
2748gl_func_list="$gl_func_list memchr"
2749gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2750gl_header_list="$gl_header_list stdint.h"
2751gl_header_list="$gl_header_list wchar.h"
2752gl_header_list="$gl_header_list string.h"
2753# Check that the precious variables saved in the cache have kept the same
2754# value.
2755ac_cache_corrupted=false
2756for ac_var in $ac_precious_vars; do
2757 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2758 eval ac_new_set=\$ac_env_${ac_var}_set
2759 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2760 eval ac_new_val=\$ac_env_${ac_var}_value
2761 case $ac_old_set,$ac_new_set in
2762 set,)
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2764$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2765 ac_cache_corrupted=: ;;
2766 ,set)
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2768$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2769 ac_cache_corrupted=: ;;
2770 ,);;
2771 *)
2772 if test "x$ac_old_val" != "x$ac_new_val"; then
2773 # differences in whitespace do not lead to failure.
2774 ac_old_val_w=`echo x $ac_old_val`
2775 ac_new_val_w=`echo x $ac_new_val`
2776 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2778$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2779 ac_cache_corrupted=:
2780 else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2782$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2783 eval $ac_var=\$ac_old_val
2784 fi
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2786$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2788$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2789 fi;;
2790 esac
2791 # Pass precious variables to config.status.
2792 if test "$ac_new_set" = set; then
2793 case $ac_new_val in
2794 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2795 *) ac_arg=$ac_var=$ac_new_val ;;
2796 esac
2797 case " $ac_configure_args " in
2798 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2799 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2800 esac
2801 fi
2802done
2803if $ac_cache_corrupted; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2807$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2808 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2809fi
2810## -------------------- ##
2811## Main body of script. ##
2812## -------------------- ##
2813
2814ac_ext=c
2815ac_cpp='$CPP $CPPFLAGS'
2816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2818ac_compiler_gnu=$ac_cv_c_compiler_gnu
2819
2820
2821
2822
2823
2824ac_config_headers="$ac_config_headers config.h:config.in"
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2828$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2829 # Check whether --enable-maintainer-mode was given.
2830if test "${enable_maintainer_mode+set}" = set; then :
2831 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2832else
2833 USE_MAINTAINER_MODE=no
2834fi
2835
2836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2837$as_echo "$USE_MAINTAINER_MODE" >&6; }
2838 if test $USE_MAINTAINER_MODE = yes; then
2839 MAINTAINER_MODE_TRUE=
2840 MAINTAINER_MODE_FALSE='#'
2841else
2842 MAINTAINER_MODE_TRUE='#'
2843 MAINTAINER_MODE_FALSE=
2844fi
2845
2846 MAINT=$MAINTAINER_MODE_TRUE
2847
2848
2849
2850ac_ext=c
2851ac_cpp='$CPP $CPPFLAGS'
2852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855if test -n "$ac_tool_prefix"; then
2856 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2857set dummy ${ac_tool_prefix}gcc; ac_word=$2
2858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2859$as_echo_n "checking for $ac_word... " >&6; }
2860if test "${ac_cv_prog_CC+set}" = set; then :
2861 $as_echo_n "(cached) " >&6
c906108c
SS
2862else
2863 if test -n "$CC"; then
2864 ac_cv_prog_CC="$CC" # Let the user override the test.
2865else
bec39cab
AC
2866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867for as_dir in $PATH
2868do
2869 IFS=$as_save_IFS
2870 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2871 for ac_exec_ext in '' $ac_executable_extensions; do
2872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2873 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2875 break 2
2876 fi
2877done
81ecdfbb
RW
2878 done
2879IFS=$as_save_IFS
bec39cab 2880
c906108c
SS
2881fi
2882fi
bec39cab 2883CC=$ac_cv_prog_CC
c906108c 2884if test -n "$CC"; then
81ecdfbb
RW
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2886$as_echo "$CC" >&6; }
c906108c 2887else
81ecdfbb
RW
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2889$as_echo "no" >&6; }
c906108c
SS
2890fi
2891
81ecdfbb 2892
b4e70030
JB
2893fi
2894if test -z "$ac_cv_prog_CC"; then
2895 ac_ct_CC=$CC
81ecdfbb
RW
2896 # Extract the first word of "gcc", so it can be a program name with args.
2897set dummy gcc; ac_word=$2
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2899$as_echo_n "checking for $ac_word... " >&6; }
2900if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2901 $as_echo_n "(cached) " >&6
b4e70030
JB
2902else
2903 if test -n "$ac_ct_CC"; then
2904 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2905else
2906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907for as_dir in $PATH
2908do
2909 IFS=$as_save_IFS
2910 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2911 for ac_exec_ext in '' $ac_executable_extensions; do
2912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2913 ac_cv_prog_ac_ct_CC="gcc"
2914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2915 break 2
4e8d927d 2916 fi
b4e70030 2917done
81ecdfbb
RW
2918 done
2919IFS=$as_save_IFS
b4e70030
JB
2920
2921fi
2922fi
2923ac_ct_CC=$ac_cv_prog_ac_ct_CC
2924if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2926$as_echo "$ac_ct_CC" >&6; }
b4e70030 2927else
81ecdfbb
RW
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2929$as_echo "no" >&6; }
b4e70030
JB
2930fi
2931
81ecdfbb
RW
2932 if test "x$ac_ct_CC" = x; then
2933 CC=""
2934 else
2935 case $cross_compiling:$ac_tool_warned in
2936yes:)
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2939ac_tool_warned=yes ;;
2940esac
2941 CC=$ac_ct_CC
2942 fi
b4e70030
JB
2943else
2944 CC="$ac_cv_prog_CC"
2945fi
2946
c906108c 2947if test -z "$CC"; then
81ecdfbb
RW
2948 if test -n "$ac_tool_prefix"; then
2949 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2950set dummy ${ac_tool_prefix}cc; ac_word=$2
2951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2952$as_echo_n "checking for $ac_word... " >&6; }
2953if test "${ac_cv_prog_CC+set}" = set; then :
2954 $as_echo_n "(cached) " >&6
c906108c
SS
2955else
2956 if test -n "$CC"; then
2957 ac_cv_prog_CC="$CC" # Let the user override the test.
2958else
bec39cab
AC
2959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2960for as_dir in $PATH
2961do
2962 IFS=$as_save_IFS
2963 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2964 for ac_exec_ext in '' $ac_executable_extensions; do
2965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2966 ac_cv_prog_CC="${ac_tool_prefix}cc"
2967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2968 break 2
2969 fi
2970done
81ecdfbb
RW
2971 done
2972IFS=$as_save_IFS
2973
2974fi
2975fi
2976CC=$ac_cv_prog_CC
2977if test -n "$CC"; then
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2979$as_echo "$CC" >&6; }
2980else
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2982$as_echo "no" >&6; }
2983fi
2984
2985
2986 fi
2987fi
2988if test -z "$CC"; then
2989 # Extract the first word of "cc", so it can be a program name with args.
2990set dummy cc; ac_word=$2
2991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2992$as_echo_n "checking for $ac_word... " >&6; }
2993if test "${ac_cv_prog_CC+set}" = set; then :
2994 $as_echo_n "(cached) " >&6
2995else
2996 if test -n "$CC"; then
2997 ac_cv_prog_CC="$CC" # Let the user override the test.
2998else
2999 ac_prog_rejected=no
3000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001for as_dir in $PATH
3002do
3003 IFS=$as_save_IFS
3004 test -z "$as_dir" && as_dir=.
3005 for ac_exec_ext in '' $ac_executable_extensions; do
3006 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3007 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3008 ac_prog_rejected=yes
3009 continue
3010 fi
3011 ac_cv_prog_CC="cc"
3012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3013 break 2
3014 fi
3015done
3016 done
3017IFS=$as_save_IFS
bec39cab 3018
c906108c
SS
3019if test $ac_prog_rejected = yes; then
3020 # We found a bogon in the path, so make sure we never use it.
3021 set dummy $ac_cv_prog_CC
3022 shift
bec39cab 3023 if test $# != 0; then
c906108c
SS
3024 # We chose a different compiler from the bogus one.
3025 # However, it has the same basename, so the bogon will be chosen
3026 # first if we set CC to just the basename; use the full file name.
3027 shift
bec39cab 3028 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3029 fi
3030fi
3031fi
3032fi
bec39cab 3033CC=$ac_cv_prog_CC
c906108c 3034if test -n "$CC"; then
81ecdfbb
RW
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3036$as_echo "$CC" >&6; }
c906108c 3037else
81ecdfbb
RW
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3039$as_echo "no" >&6; }
c906108c
SS
3040fi
3041
81ecdfbb 3042
bec39cab
AC
3043fi
3044if test -z "$CC"; then
3045 if test -n "$ac_tool_prefix"; then
81ecdfbb 3046 for ac_prog in cl.exe
bec39cab
AC
3047 do
3048 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3051$as_echo_n "checking for $ac_word... " >&6; }
3052if test "${ac_cv_prog_CC+set}" = set; then :
3053 $as_echo_n "(cached) " >&6
c906108c
SS
3054else
3055 if test -n "$CC"; then
3056 ac_cv_prog_CC="$CC" # Let the user override the test.
3057else
bec39cab
AC
3058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3059for as_dir in $PATH
3060do
3061 IFS=$as_save_IFS
3062 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3063 for ac_exec_ext in '' $ac_executable_extensions; do
3064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3065 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3067 break 2
3068 fi
3069done
81ecdfbb
RW
3070 done
3071IFS=$as_save_IFS
bec39cab 3072
c906108c
SS
3073fi
3074fi
bec39cab 3075CC=$ac_cv_prog_CC
c906108c 3076if test -n "$CC"; then
81ecdfbb
RW
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3078$as_echo "$CC" >&6; }
c906108c 3079else
81ecdfbb
RW
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3081$as_echo "no" >&6; }
c906108c 3082fi
bec39cab 3083
81ecdfbb 3084
bec39cab
AC
3085 test -n "$CC" && break
3086 done
3087fi
3088if test -z "$CC"; then
3089 ac_ct_CC=$CC
81ecdfbb 3090 for ac_prog in cl.exe
bec39cab
AC
3091do
3092 # Extract the first word of "$ac_prog", so it can be a program name with args.
3093set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3095$as_echo_n "checking for $ac_word... " >&6; }
3096if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3097 $as_echo_n "(cached) " >&6
bec39cab
AC
3098else
3099 if test -n "$ac_ct_CC"; then
3100 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3101else
3102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103for as_dir in $PATH
3104do
3105 IFS=$as_save_IFS
3106 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3107 for ac_exec_ext in '' $ac_executable_extensions; do
3108 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3109 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3111 break 2
c906108c 3112 fi
bec39cab 3113done
81ecdfbb
RW
3114 done
3115IFS=$as_save_IFS
bec39cab
AC
3116
3117fi
3118fi
3119ac_ct_CC=$ac_cv_prog_ac_ct_CC
3120if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3122$as_echo "$ac_ct_CC" >&6; }
bec39cab 3123else
81ecdfbb
RW
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
c906108c
SS
3126fi
3127
81ecdfbb 3128
bec39cab
AC
3129 test -n "$ac_ct_CC" && break
3130done
c906108c 3131
81ecdfbb
RW
3132 if test "x$ac_ct_CC" = x; then
3133 CC=""
3134 else
3135 case $cross_compiling:$ac_tool_warned in
3136yes:)
3137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3139ac_tool_warned=yes ;;
3140esac
3141 CC=$ac_ct_CC
3142 fi
bec39cab
AC
3143fi
3144
3145fi
3146
3147
81ecdfbb
RW
3148test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3150as_fn_error "no acceptable C compiler found in \$PATH
3151See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3152
3153# Provide some information about the compiler.
81ecdfbb
RW
3154$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3155set X $ac_compile
3156ac_compiler=$2
3157for ac_option in --version -v -V -qversion; do
3158 { { ac_try="$ac_compiler $ac_option >&5"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
3163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164$as_echo "$ac_try_echo"; } >&5
3165 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3166 ac_status=$?
81ecdfbb
RW
3167 if test -s conftest.err; then
3168 sed '10a\
3169... rest of stderr output deleted ...
3170 10q' conftest.err >conftest.er1
3171 cat conftest.er1 >&5
3172 rm -f conftest.er1 conftest.err
3173 fi
3174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3175 test $ac_status = 0; }
3176done
bec39cab 3177
81ecdfbb 3178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3179/* end confdefs.h. */
3180
3181int
3182main ()
3183{
3184
3185 ;
3186 return 0;
3187}
3188_ACEOF
3189ac_clean_files_save=$ac_clean_files
81ecdfbb 3190ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3191# Try to create an executable without -o first, disregard a.out.
3192# It will help us diagnose broken compilers, and finding out an intuition
3193# of exeext.
81ecdfbb
RW
3194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3195$as_echo_n "checking for C compiler default output file name... " >&6; }
3196ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3197
3198# The possible output files:
3199ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3200
3201ac_rmfiles=
3202for ac_file in $ac_files
3203do
3204 case $ac_file in
3205 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3206 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3207 esac
3208done
3209rm -f $ac_rmfiles
3210
3211if { { ac_try="$ac_link_default"
3212case "(($ac_try" in
3213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3214 *) ac_try_echo=$ac_try;;
3215esac
3216eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3217$as_echo "$ac_try_echo"; } >&5
3218 (eval "$ac_link_default") 2>&5
3219 ac_status=$?
3220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3221 test $ac_status = 0; }; then :
3222 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3223# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3224# in a Makefile. We should not override ac_cv_exeext if it was cached,
3225# so that the user can short-circuit this test for compilers unknown to
3226# Autoconf.
3227for ac_file in $ac_files ''
bec39cab
AC
3228do
3229 test -f "$ac_file" || continue
3230 case $ac_file in
81ecdfbb 3231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3232 ;;
3233 [ab].out )
3234 # We found the default executable, but exeext='' is most
3235 # certainly right.
3236 break;;
3237 *.* )
81ecdfbb
RW
3238 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3239 then :; else
3240 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3241 fi
3242 # We set ac_cv_exeext here because the later test for it is not
3243 # safe: cross compilers may not add the suffix if given an `-o'
3244 # argument, so we may need to know it at that point already.
3245 # Even if this section looks crufty: it has the advantage of
3246 # actually working.
b4e70030
JB
3247 break;;
3248 * )
3249 break;;
bec39cab
AC
3250 esac
3251done
81ecdfbb
RW
3252test "$ac_cv_exeext" = no && ac_cv_exeext=
3253
bec39cab 3254else
81ecdfbb
RW
3255 ac_file=''
3256fi
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3258$as_echo "$ac_file" >&6; }
3259if test -z "$ac_file"; then :
3260 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3261sed 's/^/| /' conftest.$ac_ext >&5
3262
81ecdfbb
RW
3263{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3265{ as_fn_set_status 77
3266as_fn_error "C compiler cannot create executables
3267See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3268fi
b4e70030 3269ac_exeext=$ac_cv_exeext
b4e70030 3270
81ecdfbb 3271# Check that the compiler produces executables we can run. If not, either
bec39cab 3272# the compiler is broken, or we cross compile.
81ecdfbb
RW
3273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3274$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3275# If not cross compiling, check that we can run a simple program.
3276if test "$cross_compiling" != yes; then
3277 if { ac_try='./$ac_file'
81ecdfbb
RW
3278 { { case "(($ac_try" in
3279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280 *) ac_try_echo=$ac_try;;
3281esac
3282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3283$as_echo "$ac_try_echo"; } >&5
3284 (eval "$ac_try") 2>&5
bec39cab 3285 ac_status=$?
81ecdfbb
RW
3286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3287 test $ac_status = 0; }; }; then
bec39cab 3288 cross_compiling=no
c906108c 3289 else
bec39cab
AC
3290 if test "$cross_compiling" = maybe; then
3291 cross_compiling=yes
3292 else
81ecdfbb
RW
3293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295as_fn_error "cannot run C compiled programs.
bec39cab 3296If you meant to cross compile, use \`--host'.
81ecdfbb 3297See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3298 fi
c906108c 3299 fi
bec39cab 3300fi
81ecdfbb
RW
3301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3302$as_echo "yes" >&6; }
bec39cab 3303
81ecdfbb 3304rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3305ac_clean_files=$ac_clean_files_save
81ecdfbb 3306# Check that the compiler produces executables we can run. If not, either
b4e70030 3307# the compiler is broken, or we cross compile.
81ecdfbb
RW
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3309$as_echo_n "checking whether we are cross compiling... " >&6; }
3310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3311$as_echo "$cross_compiling" >&6; }
3312
3313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3314$as_echo_n "checking for suffix of executables... " >&6; }
3315if { { ac_try="$ac_link"
3316case "(($ac_try" in
3317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3318 *) ac_try_echo=$ac_try;;
3319esac
3320eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3321$as_echo "$ac_try_echo"; } >&5
3322 (eval "$ac_link") 2>&5
bec39cab 3323 ac_status=$?
81ecdfbb
RW
3324 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3325 test $ac_status = 0; }; then :
b4e70030
JB
3326 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3327# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3328# work properly (i.e., refer to `conftest.exe'), while it won't with
3329# `rm'.
3330for ac_file in conftest.exe conftest conftest.*; do
3331 test -f "$ac_file" || continue
3332 case $ac_file in
81ecdfbb 3333 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3334 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3335 break;;
3336 * ) break;;
3337 esac
3338done
c906108c 3339else
81ecdfbb
RW
3340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3342as_fn_error "cannot compute suffix of executables: cannot compile and link
3343See \`config.log' for more details." "$LINENO" 5; }
c906108c 3344fi
b4e70030 3345rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3347$as_echo "$ac_cv_exeext" >&6; }
c906108c 3348
b4e70030 3349rm -f conftest.$ac_ext
bec39cab
AC
3350EXEEXT=$ac_cv_exeext
3351ac_exeext=$EXEEXT
81ecdfbb
RW
3352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3353$as_echo_n "checking for suffix of object files... " >&6; }
3354if test "${ac_cv_objext+set}" = set; then :
3355 $as_echo_n "(cached) " >&6
bec39cab 3356else
81ecdfbb 3357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3358/* end confdefs.h. */
3359
3360int
3361main ()
3362{
3363
3364 ;
3365 return 0;
3366}
3367_ACEOF
3368rm -f conftest.o conftest.obj
81ecdfbb
RW
3369if { { ac_try="$ac_compile"
3370case "(($ac_try" in
3371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3372 *) ac_try_echo=$ac_try;;
3373esac
3374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3375$as_echo "$ac_try_echo"; } >&5
3376 (eval "$ac_compile") 2>&5
3377 ac_status=$?
3378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3379 test $ac_status = 0; }; then :
3380 for ac_file in conftest.o conftest.obj conftest.*; do
3381 test -f "$ac_file" || continue;
bec39cab 3382 case $ac_file in
81ecdfbb 3383 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3384 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3385 break;;
3386 esac
3387done
c906108c 3388else
81ecdfbb 3389 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3390sed 's/^/| /' conftest.$ac_ext >&5
3391
81ecdfbb
RW
3392{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3394as_fn_error "cannot compute suffix of object files: cannot compile
3395See \`config.log' for more details." "$LINENO" 5; }
c906108c 3396fi
b4e70030 3397rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3398fi
81ecdfbb
RW
3399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3400$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3401OBJEXT=$ac_cv_objext
3402ac_objext=$OBJEXT
81ecdfbb
RW
3403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3404$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3405if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3406 $as_echo_n "(cached) " >&6
c906108c 3407else
81ecdfbb 3408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3409/* end confdefs.h. */
3410
3411int
3412main ()
3413{
3414#ifndef __GNUC__
3415 choke me
3416#endif
3417
3418 ;
3419 return 0;
3420}
3421_ACEOF
81ecdfbb 3422if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3423 ac_compiler_gnu=yes
3424else
81ecdfbb 3425 ac_compiler_gnu=no
bec39cab 3426fi
81ecdfbb 3427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3428ac_cv_c_compiler_gnu=$ac_compiler_gnu
3429
3430fi
81ecdfbb
RW
3431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3432$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3433if test $ac_compiler_gnu = yes; then
3434 GCC=yes
3435else
3436 GCC=
3437fi
bec39cab
AC
3438ac_test_CFLAGS=${CFLAGS+set}
3439ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3441$as_echo_n "checking whether $CC accepts -g... " >&6; }
3442if test "${ac_cv_prog_cc_g+set}" = set; then :
3443 $as_echo_n "(cached) " >&6
bec39cab 3444else
81ecdfbb
RW
3445 ac_save_c_werror_flag=$ac_c_werror_flag
3446 ac_c_werror_flag=yes
3447 ac_cv_prog_cc_g=no
3448 CFLAGS="-g"
3449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3450/* end confdefs.h. */
3451
3452int
3453main ()
3454{
3455
3456 ;
3457 return 0;
3458}
3459_ACEOF
81ecdfbb 3460if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3461 ac_cv_prog_cc_g=yes
3462else
81ecdfbb
RW
3463 CFLAGS=""
3464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3465/* end confdefs.h. */
3466
3467int
3468main ()
3469{
3470
3471 ;
3472 return 0;
3473}
3474_ACEOF
3475if ac_fn_c_try_compile "$LINENO"; then :
3476
3477else
3478 ac_c_werror_flag=$ac_save_c_werror_flag
3479 CFLAGS="-g"
3480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3481/* end confdefs.h. */
3482
3483int
3484main ()
3485{
c906108c 3486
81ecdfbb
RW
3487 ;
3488 return 0;
3489}
3490_ACEOF
3491if ac_fn_c_try_compile "$LINENO"; then :
3492 ac_cv_prog_cc_g=yes
3493fi
3494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3495fi
3496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3497fi
81ecdfbb
RW
3498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3499 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3500fi
81ecdfbb
RW
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3502$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3503if test "$ac_test_CFLAGS" = set; then
bec39cab 3504 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3505elif test $ac_cv_prog_cc_g = yes; then
3506 if test "$GCC" = yes; then
3507 CFLAGS="-g -O2"
3508 else
3509 CFLAGS="-g"
3510 fi
3511else
3512 if test "$GCC" = yes; then
3513 CFLAGS="-O2"
3514 else
3515 CFLAGS=
3516 fi
3517fi
81ecdfbb
RW
3518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3519$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3520if test "${ac_cv_prog_cc_c89+set}" = set; then :
3521 $as_echo_n "(cached) " >&6
bec39cab 3522else
81ecdfbb 3523 ac_cv_prog_cc_c89=no
bec39cab 3524ac_save_CC=$CC
81ecdfbb 3525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3526/* end confdefs.h. */
c906108c
SS
3527#include <stdarg.h>
3528#include <stdio.h>
3529#include <sys/types.h>
3530#include <sys/stat.h>
3531/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3532struct buf { int x; };
3533FILE * (*rcsopen) (struct buf *, struct stat *, int);
3534static char *e (p, i)
3535 char **p;
3536 int i;
3537{
3538 return p[i];
3539}
3540static char *f (char * (*g) (char **, int), char **p, ...)
3541{
3542 char *s;
3543 va_list v;
3544 va_start (v,p);
3545 s = g (p, va_arg (v,int));
3546 va_end (v);
3547 return s;
3548}
bec39cab
AC
3549
3550/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3551 function prototypes and stuff, but not '\xHH' hex character constants.
3552 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3553 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3554 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3555 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3556 that's true only with -std. */
bec39cab
AC
3557int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3558
81ecdfbb
RW
3559/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3560 inside strings and character constants. */
3561#define FOO(x) 'x'
3562int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3563
c906108c
SS
3564int test (int i, double x);
3565struct s1 {int (*f) (int a);};
3566struct s2 {int (*f) (double a);};
3567int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3568int argc;
3569char **argv;
bec39cab
AC
3570int
3571main ()
3572{
c906108c 3573return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3574 ;
3575 return 0;
3576}
3577_ACEOF
81ecdfbb
RW
3578for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3579 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3580do
3581 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3582 if ac_fn_c_try_compile "$LINENO"; then :
3583 ac_cv_prog_cc_c89=$ac_arg
c906108c 3584fi
81ecdfbb
RW
3585rm -f core conftest.err conftest.$ac_objext
3586 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3587done
81ecdfbb 3588rm -f conftest.$ac_ext
bec39cab 3589CC=$ac_save_CC
c906108c
SS
3590
3591fi
81ecdfbb
RW
3592# AC_CACHE_VAL
3593case "x$ac_cv_prog_cc_c89" in
3594 x)
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3596$as_echo "none needed" >&6; } ;;
3597 xno)
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3599$as_echo "unsupported" >&6; } ;;
bec39cab 3600 *)
81ecdfbb
RW
3601 CC="$CC $ac_cv_prog_cc_c89"
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3603$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3604esac
81ecdfbb 3605if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3606
b4e70030
JB
3607fi
3608
bec39cab
AC
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3614
f434ba03
PA
3615ac_aux_dir=
3616for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3617 for ac_t in install-sh install.sh shtool; do
3618 if test -f "$ac_dir/$ac_t"; then
3619 ac_aux_dir=$ac_dir
3620 ac_install_sh="$ac_aux_dir/$ac_t -c"
3621 break 2
3622 fi
3623 done
3624done
3625if test -z "$ac_aux_dir"; then
3626 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3627fi
3628
3629# These three variables are undocumented and unsupported,
3630# and are intended to be withdrawn in a future Autoconf release.
3631# They can cause serious problems if a builder's source tree is in a directory
3632# whose full name contains unusual characters.
3633ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3634ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3635ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3636
3637
3638# Make sure we can run config.sub.
3639$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3640 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3641
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3643$as_echo_n "checking build system type... " >&6; }
3644if test "${ac_cv_build+set}" = set; then :
3645 $as_echo_n "(cached) " >&6
3646else
3647 ac_build_alias=$build_alias
3648test "x$ac_build_alias" = x &&
3649 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3650test "x$ac_build_alias" = x &&
3651 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3652ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3653 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3654
3655fi
3656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3657$as_echo "$ac_cv_build" >&6; }
3658case $ac_cv_build in
3659*-*-*) ;;
3660*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3661esac
3662build=$ac_cv_build
3663ac_save_IFS=$IFS; IFS='-'
3664set x $ac_cv_build
3665shift
3666build_cpu=$1
3667build_vendor=$2
3668shift; shift
3669# Remember, the first character of IFS is used to create $*,
3670# except with old shells:
3671build_os=$*
3672IFS=$ac_save_IFS
3673case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3674
3675
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3677$as_echo_n "checking host system type... " >&6; }
3678if test "${ac_cv_host+set}" = set; then :
3679 $as_echo_n "(cached) " >&6
3680else
3681 if test "x$host_alias" = x; then
3682 ac_cv_host=$ac_cv_build
3683else
3684 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3685 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3686fi
3687
3688fi
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3690$as_echo "$ac_cv_host" >&6; }
3691case $ac_cv_host in
3692*-*-*) ;;
3693*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3694esac
3695host=$ac_cv_host
3696ac_save_IFS=$IFS; IFS='-'
3697set x $ac_cv_host
3698shift
3699host_cpu=$1
3700host_vendor=$2
3701shift; shift
3702# Remember, the first character of IFS is used to create $*,
3703# except with old shells:
3704host_os=$*
3705IFS=$ac_save_IFS
3706case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3707
3708
60ca704f 3709
bec39cab
AC
3710ac_ext=c
3711ac_cpp='$CPP $CPPFLAGS'
3712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3714ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3716$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3717# On Suns, sometimes $CPP names a directory.
3718if test -n "$CPP" && test -d "$CPP"; then
3719 CPP=
8bb2c122 3720fi
bec39cab 3721if test -z "$CPP"; then
81ecdfbb
RW
3722 if test "${ac_cv_prog_CPP+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
bec39cab
AC
3724else
3725 # Double quotes because CPP needs to be expanded
3726 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3727 do
3728 ac_preproc_ok=false
3729for ac_c_preproc_warn_flag in '' yes
3730do
3731 # Use a header file that comes with gcc, so configuring glibc
3732 # with a fresh cross-compiler works.
3733 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3734 # <limits.h> exists even on freestanding compilers.
3735 # On the NeXT, cc -E runs the code through the compiler's parser,
3736 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3738/* end confdefs.h. */
3739#ifdef __STDC__
3740# include <limits.h>
3741#else
3742# include <assert.h>
3743#endif
3744 Syntax error
3745_ACEOF
81ecdfbb 3746if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3747
81ecdfbb 3748else
bec39cab
AC
3749 # Broken: fails on valid input.
3750continue
3751fi
3752rm -f conftest.err conftest.$ac_ext
3753
81ecdfbb 3754 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3755 # can be detected and how.
81ecdfbb 3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3757/* end confdefs.h. */
3758#include <ac_nonexistent.h>
3759_ACEOF
81ecdfbb 3760if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3761 # Broken: success on invalid input.
3762continue
8bb2c122 3763else
bec39cab
AC
3764 # Passes both tests.
3765ac_preproc_ok=:
3766break
8bb2c122 3767fi
bec39cab 3768rm -f conftest.err conftest.$ac_ext
8bb2c122 3769
bec39cab
AC
3770done
3771# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3772rm -f conftest.err conftest.$ac_ext
81ecdfbb 3773if $ac_preproc_ok; then :
bec39cab
AC
3774 break
3775fi
8bb2c122 3776
bec39cab
AC
3777 done
3778 ac_cv_prog_CPP=$CPP
ddc9cd0f 3779
c906108c 3780fi
bec39cab
AC
3781 CPP=$ac_cv_prog_CPP
3782else
3783 ac_cv_prog_CPP=$CPP
c906108c 3784fi
81ecdfbb
RW
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3786$as_echo "$CPP" >&6; }
bec39cab
AC
3787ac_preproc_ok=false
3788for ac_c_preproc_warn_flag in '' yes
3789do
3790 # Use a header file that comes with gcc, so configuring glibc
3791 # with a fresh cross-compiler works.
3792 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3793 # <limits.h> exists even on freestanding compilers.
3794 # On the NeXT, cc -E runs the code through the compiler's parser,
3795 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3797/* end confdefs.h. */
3798#ifdef __STDC__
3799# include <limits.h>
3800#else
3801# include <assert.h>
3802#endif
3803 Syntax error
3804_ACEOF
81ecdfbb 3805if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3806
81ecdfbb 3807else
bec39cab
AC
3808 # Broken: fails on valid input.
3809continue
3810fi
3811rm -f conftest.err conftest.$ac_ext
3812
81ecdfbb 3813 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3814 # can be detected and how.
81ecdfbb 3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3816/* end confdefs.h. */
3817#include <ac_nonexistent.h>
3818_ACEOF
81ecdfbb 3819if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3820 # Broken: success on invalid input.
3821continue
c906108c 3822else
bec39cab
AC
3823 # Passes both tests.
3824ac_preproc_ok=:
3825break
c906108c 3826fi
bec39cab 3827rm -f conftest.err conftest.$ac_ext
c906108c 3828
bec39cab
AC
3829done
3830# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3831rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3832if $ac_preproc_ok; then :
3833
c906108c 3834else
81ecdfbb
RW
3835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3837as_fn_error "C preprocessor \"$CPP\" fails sanity check
3838See \`config.log' for more details." "$LINENO" 5; }
c906108c 3839fi
c906108c 3840
bec39cab
AC
3841ac_ext=c
3842ac_cpp='$CPP $CPPFLAGS'
3843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3845ac_compiler_gnu=$ac_cv_c_compiler_gnu
3846
3847
81ecdfbb
RW
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3849$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3850if test "${ac_cv_path_GREP+set}" = set; then :
3851 $as_echo_n "(cached) " >&6
4e8d927d 3852else
81ecdfbb
RW
3853 if test -z "$GREP"; then
3854 ac_path_GREP_found=false
3855 # Loop through the user's path and test for each of PROGNAME-LIST
3856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3858do
3859 IFS=$as_save_IFS
3860 test -z "$as_dir" && as_dir=.
3861 for ac_prog in grep ggrep; do
3862 for ac_exec_ext in '' $ac_executable_extensions; do
3863 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3864 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3865# Check for GNU ac_path_GREP and select it if it is found.
3866 # Check for GNU $ac_path_GREP
3867case `"$ac_path_GREP" --version 2>&1` in
3868*GNU*)
3869 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3870*)
3871 ac_count=0
3872 $as_echo_n 0123456789 >"conftest.in"
3873 while :
3874 do
3875 cat "conftest.in" "conftest.in" >"conftest.tmp"
3876 mv "conftest.tmp" "conftest.in"
3877 cp "conftest.in" "conftest.nl"
3878 $as_echo 'GREP' >> "conftest.nl"
3879 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3880 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3881 as_fn_arith $ac_count + 1 && ac_count=$as_val
3882 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3883 # Best one so far, save it but keep looking for a better one
3884 ac_cv_path_GREP="$ac_path_GREP"
3885 ac_path_GREP_max=$ac_count
bec39cab 3886 fi
81ecdfbb
RW
3887 # 10*(2^10) chars as input seems more than enough
3888 test $ac_count -gt 10 && break
3889 done
3890 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3891esac
bec39cab 3892
81ecdfbb
RW
3893 $ac_path_GREP_found && break 3
3894 done
3895 done
3896 done
3897IFS=$as_save_IFS
3898 if test -z "$ac_cv_path_GREP"; then
3899 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3900 fi
c906108c 3901else
81ecdfbb 3902 ac_cv_path_GREP=$GREP
c906108c 3903fi
c906108c 3904
81ecdfbb
RW
3905fi
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3907$as_echo "$ac_cv_path_GREP" >&6; }
3908 GREP="$ac_cv_path_GREP"
c906108c 3909
c906108c 3910
81ecdfbb
RW
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3912$as_echo_n "checking for egrep... " >&6; }
3913if test "${ac_cv_path_EGREP+set}" = set; then :
3914 $as_echo_n "(cached) " >&6
783e057b 3915else
81ecdfbb
RW
3916 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3917 then ac_cv_path_EGREP="$GREP -E"
3918 else
3919 if test -z "$EGREP"; then
3920 ac_path_EGREP_found=false
3921 # Loop through the user's path and test for each of PROGNAME-LIST
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3924do
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3927 for ac_prog in egrep; do
3928 for ac_exec_ext in '' $ac_executable_extensions; do
3929 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3930 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3931# Check for GNU ac_path_EGREP and select it if it is found.
3932 # Check for GNU $ac_path_EGREP
3933case `"$ac_path_EGREP" --version 2>&1` in
3934*GNU*)
3935 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3936*)
3937 ac_count=0
3938 $as_echo_n 0123456789 >"conftest.in"
3939 while :
3940 do
3941 cat "conftest.in" "conftest.in" >"conftest.tmp"
3942 mv "conftest.tmp" "conftest.in"
3943 cp "conftest.in" "conftest.nl"
3944 $as_echo 'EGREP' >> "conftest.nl"
3945 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3946 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3947 as_fn_arith $ac_count + 1 && ac_count=$as_val
3948 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3949 # Best one so far, save it but keep looking for a better one
3950 ac_cv_path_EGREP="$ac_path_EGREP"
3951 ac_path_EGREP_max=$ac_count
3952 fi
3953 # 10*(2^10) chars as input seems more than enough
3954 test $ac_count -gt 10 && break
3955 done
3956 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3957esac
bec39cab 3958
81ecdfbb
RW
3959 $ac_path_EGREP_found && break 3
3960 done
3961 done
3962 done
3963IFS=$as_save_IFS
3964 if test -z "$ac_cv_path_EGREP"; then
3965 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3966 fi
783e057b 3967else
81ecdfbb 3968 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3969fi
3970
81ecdfbb 3971 fi
783e057b 3972fi
81ecdfbb
RW
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3974$as_echo "$ac_cv_path_EGREP" >&6; }
3975 EGREP="$ac_cv_path_EGREP"
3976
783e057b 3977
81ecdfbb
RW
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3979$as_echo_n "checking for ANSI C header files... " >&6; }
3980if test "${ac_cv_header_stdc+set}" = set; then :
3981 $as_echo_n "(cached) " >&6
783e057b 3982else
81ecdfbb 3983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3984/* end confdefs.h. */
783e057b 3985#include <stdlib.h>
bec39cab 3986#include <stdarg.h>
783e057b
DJ
3987#include <string.h>
3988#include <float.h>
c906108c 3989
bec39cab
AC
3990int
3991main ()
3992{
c906108c 3993
bec39cab
AC
3994 ;
3995 return 0;
3996}
3997_ACEOF
81ecdfbb 3998if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3999 ac_cv_header_stdc=yes
c906108c 4000else
81ecdfbb 4001 ac_cv_header_stdc=no
c906108c 4002fi
81ecdfbb 4003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4004
783e057b
DJ
4005if test $ac_cv_header_stdc = yes; then
4006 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4008/* end confdefs.h. */
4009#include <string.h>
c906108c 4010
783e057b
DJ
4011_ACEOF
4012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4013 $EGREP "memchr" >/dev/null 2>&1; then :
4014
c906108c 4015else
783e057b 4016 ac_cv_header_stdc=no
c906108c 4017fi
783e057b 4018rm -f conftest*
c906108c
SS
4019
4020fi
4021
783e057b
DJ
4022if test $ac_cv_header_stdc = yes; then
4023 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4025/* end confdefs.h. */
4026#include <stdlib.h>
bec39cab 4027
783e057b
DJ
4028_ACEOF
4029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4030 $EGREP "free" >/dev/null 2>&1; then :
4031
bec39cab 4032else
783e057b 4033 ac_cv_header_stdc=no
bec39cab 4034fi
783e057b 4035rm -f conftest*
bec39cab
AC
4036
4037fi
bec39cab 4038
783e057b
DJ
4039if test $ac_cv_header_stdc = yes; then
4040 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4041 if test "$cross_compiling" = yes; then :
783e057b 4042 :
bec39cab 4043else
81ecdfbb 4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4045/* end confdefs.h. */
4046#include <ctype.h>
81ecdfbb 4047#include <stdlib.h>
783e057b
DJ
4048#if ((' ' & 0x0FF) == 0x020)
4049# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4050# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4051#else
4052# define ISLOWER(c) \
4053 (('a' <= (c) && (c) <= 'i') \
4054 || ('j' <= (c) && (c) <= 'r') \
4055 || ('s' <= (c) && (c) <= 'z'))
4056# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4057#endif
4058
4059#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4060int
4061main ()
4062{
4063 int i;
4064 for (i = 0; i < 256; i++)
4065 if (XOR (islower (i), ISLOWER (i))
4066 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4067 return 2;
4068 return 0;
783e057b
DJ
4069}
4070_ACEOF
81ecdfbb 4071if ac_fn_c_try_run "$LINENO"; then :
783e057b 4072
81ecdfbb
RW
4073else
4074 ac_cv_header_stdc=no
783e057b 4075fi
81ecdfbb
RW
4076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4077 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4078fi
81ecdfbb 4079
783e057b
DJ
4080fi
4081fi
81ecdfbb
RW
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4083$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4084if test $ac_cv_header_stdc = yes; then
4085
81ecdfbb 4086$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4087
4088fi
4089
4090# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4091for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4092 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4093do :
4094 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4095ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4096"
4097eval as_val=\$$as_ac_Header
4098 if test "x$as_val" = x""yes; then :
783e057b 4099 cat >>confdefs.h <<_ACEOF
81ecdfbb 4100#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4101_ACEOF
4102
4103fi
4104
4105done
4106
4107
4108
f434ba03
PA
4109
4110
81ecdfbb
RW
4111 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4112if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4113 MINIX=yes
4114else
4115 MINIX=
4116fi
4117
4118
4119 if test "$MINIX" = yes; then
4120
81ecdfbb 4121$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4122
4123
81ecdfbb 4124$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4125
4126
81ecdfbb 4127$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4128
4129 fi
4130
f434ba03
PA
4131 case "$host_os" in
4132 hpux*)
4133
4134$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4135
4136 ;;
4137 esac
4138
783e057b 4139
81ecdfbb
RW
4140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4141$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4142if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4143 $as_echo_n "(cached) " >&6
783e057b 4144else
81ecdfbb 4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4146/* end confdefs.h. */
4147
f434ba03
PA
4148# define __EXTENSIONS__ 1
4149 $ac_includes_default
783e057b
DJ
4150int
4151main ()
4152{
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
81ecdfbb 4158if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4159 ac_cv_safe_to_define___extensions__=yes
4160else
81ecdfbb 4161 ac_cv_safe_to_define___extensions__=no
783e057b 4162fi
81ecdfbb 4163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4164fi
81ecdfbb
RW
4165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4166$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4167 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4168 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4169
81ecdfbb 4170 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4171
81ecdfbb 4172 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4173
81ecdfbb 4174 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4175
81ecdfbb 4176 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4177
4178
81ecdfbb
RW
4179if test -n "$ac_tool_prefix"; then
4180 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4181set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4183$as_echo_n "checking for $ac_word... " >&6; }
4184if test "${ac_cv_prog_RANLIB+set}" = set; then :
4185 $as_echo_n "(cached) " >&6
4186else
4187 if test -n "$RANLIB"; then
4188 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4189else
4190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4191for as_dir in $PATH
4192do
4193 IFS=$as_save_IFS
4194 test -z "$as_dir" && as_dir=.
4195 for ac_exec_ext in '' $ac_executable_extensions; do
4196 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4197 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4199 break 2
4200 fi
4201done
4202 done
4203IFS=$as_save_IFS
783e057b 4204
81ecdfbb
RW
4205fi
4206fi
4207RANLIB=$ac_cv_prog_RANLIB
4208if test -n "$RANLIB"; then
4209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4210$as_echo "$RANLIB" >&6; }
4211else
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4213$as_echo "no" >&6; }
4214fi
783e057b
DJ
4215
4216
81ecdfbb
RW
4217fi
4218if test -z "$ac_cv_prog_RANLIB"; then
4219 ac_ct_RANLIB=$RANLIB
4220 # Extract the first word of "ranlib", so it can be a program name with args.
4221set dummy ranlib; ac_word=$2
4222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4223$as_echo_n "checking for $ac_word... " >&6; }
4224if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4225 $as_echo_n "(cached) " >&6
783e057b 4226else
81ecdfbb
RW
4227 if test -n "$ac_ct_RANLIB"; then
4228 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4229else
4230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4231for as_dir in $PATH
4232do
4233 IFS=$as_save_IFS
4234 test -z "$as_dir" && as_dir=.
4235 for ac_exec_ext in '' $ac_executable_extensions; do
4236 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4237 ac_cv_prog_ac_ct_RANLIB="ranlib"
4238 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4239 break 2
4240 fi
4241done
4242 done
4243IFS=$as_save_IFS
4244
4245fi
4246fi
4247ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4248if test -n "$ac_ct_RANLIB"; then
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4250$as_echo "$ac_ct_RANLIB" >&6; }
4251else
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
4254fi
4255
4256 if test "x$ac_ct_RANLIB" = x; then
4257 RANLIB=":"
4258 else
4259 case $cross_compiling:$ac_tool_warned in
4260yes:)
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4263ac_tool_warned=yes ;;
4264esac
4265 RANLIB=$ac_ct_RANLIB
4266 fi
4267else
4268 RANLIB="$ac_cv_prog_RANLIB"
4269fi
4270
4271
4272
4273
4274
4275
3388710e
JM
4276
4277
3388710e 4278
f434ba03
PA
4279 # Code from module arg-nonnull:
4280 # Code from module c++defs:
4281 # Code from module extensions:
3388710e 4282
f434ba03
PA
4283 # Code from module include_next:
4284 # Code from module memchr:
4285 # Code from module memmem:
4286 # Code from module memmem-simple:
4287 # Code from module multiarch:
4288 # Code from module stddef:
4289 # Code from module stdint:
4290 # Code from module string:
4291 # Code from module warn-on-use:
4292 # Code from module wchar:
3388710e
JM
4293
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4295$as_echo_n "checking target system type... " >&6; }
4296if test "${ac_cv_target+set}" = set; then :
4297 $as_echo_n "(cached) " >&6
4298else
4299 if test "x$target_alias" = x; then
4300 ac_cv_target=$ac_cv_host
4301else
4302 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4303 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4304fi
4305
4306fi
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4308$as_echo "$ac_cv_target" >&6; }
4309case $ac_cv_target in
4310*-*-*) ;;
4311*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4312esac
4313target=$ac_cv_target
4314ac_save_IFS=$IFS; IFS='-'
4315set x $ac_cv_target
4316shift
4317target_cpu=$1
4318target_vendor=$2
4319shift; shift
4320# Remember, the first character of IFS is used to create $*,
4321# except with old shells:
4322target_os=$*
4323IFS=$ac_save_IFS
4324case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4325
4326
4327# The aliases save the names the user supplied, while $host etc.
4328# will get canonicalized.
4329test -n "$target_alias" &&
4330 test "$program_prefix$program_suffix$program_transform_name" = \
4331 NONENONEs,x,x, &&
4332 program_prefix=${target_alias}-
4333
4334# The tests for host and target for $enable_largefile require
4335# canonical names.
4336
4337
81ecdfbb 4338
da2f07f1
JK
4339# As the $enable_largefile decision depends on --enable-plugins we must set it
4340# even in directories otherwise not depending on the $plugins option.
4341
4342
4343# Check whether --enable-plugins was given.
4344if test "${enable_plugins+set}" = set; then :
4345 enableval=$enable_plugins; case "${enableval}" in
4346 yes | "") plugins=yes ;;
4347 no) plugins=no ;;
4348 *) plugins=yes ;;
4349 esac
4350else
4351 plugins=no
4352fi
4353
4354
4355
4356case "${host}" in
4357 sparc-*-solaris*|i[3-7]86-*-solaris*)
4358 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4359 # are mutually exclusive; and without procfs support, the bfd/ elf module
4360 # cannot provide certain routines such as elfcore_write_prpsinfo
4361 # or elfcore_write_prstatus. So unless the user explicitly requested
4362 # large-file support through the --enable-largefile switch, disable
4363 # large-file support in favor of procfs support.
4364 test "${target}" = "${host}" -a "x$plugins" = xno \
4365 && : ${enable_largefile="no"}
4366 ;;
4367esac
4368
4369# Check whether --enable-largefile was given.
4370if test "${enable_largefile+set}" = set; then :
4371 enableval=$enable_largefile;
4372fi
4373
4374if test "$enable_largefile" != no; then
4375
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4377$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4378if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4379 $as_echo_n "(cached) " >&6
4380else
4381 ac_cv_sys_largefile_CC=no
4382 if test "$GCC" != yes; then
4383 ac_save_CC=$CC
4384 while :; do
4385 # IRIX 6.2 and later do not support large files by default,
4386 # so use the C compiler's -n32 option if that helps.
4387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h. */
4389#include <sys/types.h>
4390 /* Check that off_t can represent 2**63 - 1 correctly.
4391 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4392 since some C++ compilers masquerading as C compilers
4393 incorrectly reject 9223372036854775807. */
4394#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4395 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4396 && LARGE_OFF_T % 2147483647 == 1)
4397 ? 1 : -1];
4398int
4399main ()
4400{
4401
4402 ;
4403 return 0;
4404}
4405_ACEOF
4406 if ac_fn_c_try_compile "$LINENO"; then :
4407 break
4408fi
4409rm -f core conftest.err conftest.$ac_objext
4410 CC="$CC -n32"
4411 if ac_fn_c_try_compile "$LINENO"; then :
4412 ac_cv_sys_largefile_CC=' -n32'; break
4413fi
4414rm -f core conftest.err conftest.$ac_objext
4415 break
4416 done
4417 CC=$ac_save_CC
4418 rm -f conftest.$ac_ext
4419 fi
4420fi
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4422$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4423 if test "$ac_cv_sys_largefile_CC" != no; then
4424 CC=$CC$ac_cv_sys_largefile_CC
4425 fi
4426
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4428$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4429if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4430 $as_echo_n "(cached) " >&6
4431else
4432 while :; do
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434/* end confdefs.h. */
4435#include <sys/types.h>
4436 /* Check that off_t can represent 2**63 - 1 correctly.
4437 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4438 since some C++ compilers masquerading as C compilers
4439 incorrectly reject 9223372036854775807. */
4440#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4441 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4442 && LARGE_OFF_T % 2147483647 == 1)
4443 ? 1 : -1];
4444int
4445main ()
4446{
4447
4448 ;
4449 return 0;
4450}
4451_ACEOF
4452if ac_fn_c_try_compile "$LINENO"; then :
4453 ac_cv_sys_file_offset_bits=no; break
4454fi
4455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4457/* end confdefs.h. */
4458#define _FILE_OFFSET_BITS 64
4459#include <sys/types.h>
4460 /* Check that off_t can represent 2**63 - 1 correctly.
4461 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4462 since some C++ compilers masquerading as C compilers
4463 incorrectly reject 9223372036854775807. */
4464#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4465 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4466 && LARGE_OFF_T % 2147483647 == 1)
4467 ? 1 : -1];
4468int
4469main ()
4470{
4471
4472 ;
4473 return 0;
4474}
4475_ACEOF
4476if ac_fn_c_try_compile "$LINENO"; then :
4477 ac_cv_sys_file_offset_bits=64; break
4478fi
4479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4480 ac_cv_sys_file_offset_bits=unknown
4481 break
4482done
4483fi
4484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4485$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4486case $ac_cv_sys_file_offset_bits in #(
4487 no | unknown) ;;
4488 *)
4489cat >>confdefs.h <<_ACEOF
4490#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4491_ACEOF
4492;;
4493esac
4494rm -rf conftest*
4495 if test $ac_cv_sys_file_offset_bits = unknown; then
4496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4497$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4498if test "${ac_cv_sys_large_files+set}" = set; then :
4499 $as_echo_n "(cached) " >&6
4500else
4501 while :; do
4502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503/* end confdefs.h. */
4504#include <sys/types.h>
4505 /* Check that off_t can represent 2**63 - 1 correctly.
4506 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4507 since some C++ compilers masquerading as C compilers
4508 incorrectly reject 9223372036854775807. */
4509#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4510 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4511 && LARGE_OFF_T % 2147483647 == 1)
4512 ? 1 : -1];
4513int
4514main ()
4515{
4516
4517 ;
4518 return 0;
4519}
4520_ACEOF
4521if ac_fn_c_try_compile "$LINENO"; then :
4522 ac_cv_sys_large_files=no; break
4523fi
4524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#define _LARGE_FILES 1
4528#include <sys/types.h>
4529 /* Check that off_t can represent 2**63 - 1 correctly.
4530 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4531 since some C++ compilers masquerading as C compilers
4532 incorrectly reject 9223372036854775807. */
4533#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4534 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4535 && LARGE_OFF_T % 2147483647 == 1)
4536 ? 1 : -1];
4537int
4538main ()
4539{
4540
4541 ;
4542 return 0;
4543}
4544_ACEOF
4545if ac_fn_c_try_compile "$LINENO"; then :
4546 ac_cv_sys_large_files=1; break
4547fi
4548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4549 ac_cv_sys_large_files=unknown
4550 break
4551done
4552fi
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4554$as_echo "$ac_cv_sys_large_files" >&6; }
4555case $ac_cv_sys_large_files in #(
4556 no | unknown) ;;
4557 *)
4558cat >>confdefs.h <<_ACEOF
4559#define _LARGE_FILES $ac_cv_sys_large_files
4560_ACEOF
4561;;
4562esac
4563rm -rf conftest*
4564 fi
4565fi
4566
4567
4568
81ecdfbb
RW
4569
4570
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4572$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4573if test "${am_cv_prog_cc_stdc+set}" = set; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 am_cv_prog_cc_stdc=no
4577ac_save_CC="$CC"
4578# Don't try gcc -ansi; that turns off useful extensions and
4579# breaks some systems' header files.
4580# AIX -qlanglvl=ansi
4581# Ultrix and OSF/1 -std1
4582# HP-UX 10.20 and later -Ae
4583# HP-UX older versions -Aa -D_HPUX_SOURCE
4584# SVR4 -Xc -D__EXTENSIONS__
4585for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4586do
783e057b 4587 CC="$ac_save_CC $ac_arg"
81ecdfbb 4588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4589/* end confdefs.h. */
4590#include <stdarg.h>
4591#include <stdio.h>
4592#include <sys/types.h>
4593#include <sys/stat.h>
4594/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4595struct buf { int x; };
4596FILE * (*rcsopen) (struct buf *, struct stat *, int);
4597static char *e (p, i)
4598 char **p;
4599 int i;
4600{
4601 return p[i];
4602}
4603static char *f (char * (*g) (char **, int), char **p, ...)
4604{
4605 char *s;
4606 va_list v;
4607 va_start (v,p);
4608 s = g (p, va_arg (v,int));
4609 va_end (v);
4610 return s;
4611}
4612int test (int i, double x);
4613struct s1 {int (*f) (int a);};
4614struct s2 {int (*f) (double a);};
4615int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4616int argc;
4617char **argv;
4618
4619int
4620main ()
4621{
4622
4623return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4624
4625 ;
4626 return 0;
4627}
4628_ACEOF
81ecdfbb 4629if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4630 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4631fi
81ecdfbb 4632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4633done
4634CC="$ac_save_CC"
4635
4636fi
4637
4638if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4640$as_echo "none needed" >&6; }
783e057b 4641else
81ecdfbb
RW
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4643$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4644fi
4645case "x$am_cv_prog_cc_stdc" in
4646 x|xno) ;;
4647 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4648esac
4649
4650
4651ac_aux_dir=
81ecdfbb
RW
4652for ac_dir in .. "$srcdir"/..; do
4653 for ac_t in install-sh install.sh shtool; do
4654 if test -f "$ac_dir/$ac_t"; then
4655 ac_aux_dir=$ac_dir
4656 ac_install_sh="$ac_aux_dir/$ac_t -c"
4657 break 2
4658 fi
4659 done
783e057b
DJ
4660done
4661if test -z "$ac_aux_dir"; then
81ecdfbb 4662 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4663fi
81ecdfbb
RW
4664
4665# These three variables are undocumented and unsupported,
4666# and are intended to be withdrawn in a future Autoconf release.
4667# They can cause serious problems if a builder's source tree is in a directory
4668# whose full name contains unusual characters.
4669ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4670ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4671ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4672
783e057b 4673
783e057b 4674
81ecdfbb 4675
a417dc56
RW
4676# Dependency checking.
4677rm -rf .tst 2>/dev/null
4678mkdir .tst 2>/dev/null
4679if test -d .tst; then
4680 am__leading_dot=.
4681else
4682 am__leading_dot=_
4683fi
4684rmdir .tst 2>/dev/null
4685
4686DEPDIR="${am__leading_dot}deps"
4687
81ecdfbb 4688ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4689
4690
4691depcc="$CC" am_compiler_list=
4692
4693am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4695$as_echo_n "checking dependency style of $depcc... " >&6; }
4696if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4697 $as_echo_n "(cached) " >&6
a417dc56
RW
4698else
4699 if test -f "$am_depcomp"; then
4700 # We make a subdir and do the tests there. Otherwise we can end up
4701 # making bogus files that we don't know about and never remove. For
4702 # instance it was reported that on HP-UX the gcc test will end up
4703 # making a dummy file named `D' -- because `-MD' means `put the output
4704 # in D'.
4705 mkdir conftest.dir
4706 # Copy depcomp to subdir because otherwise we won't find it if we're
4707 # using a relative directory.
4708 cp "$am_depcomp" conftest.dir
4709 cd conftest.dir
4710 # We will build objects and dependencies in a subdirectory because
4711 # it helps to detect inapplicable dependency modes. For instance
4712 # both Tru64's cc and ICC support -MD to output dependencies as a
4713 # side effect of compilation, but ICC will put the dependencies in
4714 # the current directory while Tru64 will put them in the object
4715 # directory.
4716 mkdir sub
4717
4718 am_cv_CC_dependencies_compiler_type=none
4719 if test "$am_compiler_list" = ""; then
4720 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4721 fi
4722 for depmode in $am_compiler_list; do
4723 if test $depmode = none; then break; fi
4724
81ecdfbb 4725 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4726 # Setup a source with many dependencies, because some compilers
4727 # like to wrap large dependency lists on column 80 (with \), and
4728 # we should not choose a depcomp mode which is confused by this.
4729 #
4730 # We need to recreate these files for each test, as the compiler may
4731 # overwrite some of them when testing with obscure command lines.
4732 # This happens at least with the AIX C compiler.
4733 : > sub/conftest.c
4734 for i in 1 2 3 4 5 6; do
4735 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4736 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4737 # Solaris 8's {/usr,}/bin/sh.
4738 touch sub/conftst$i.h
4739 done
4740 echo "include sub/conftest.Po" > confmf
4741
4742 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4743 # mode. It turns out that the SunPro C++ compiler does not properly
4744 # handle `-M -o', and we need to detect this.
4745 depcmd="depmode=$depmode \
4746 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4747 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4748 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4749 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4750 if env $depcmd > conftest.err 2>&1 &&
4751 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4752 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4753 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4754 # icc doesn't choke on unknown options, it will just issue warnings
4755 # or remarks (even with -Werror). So we grep stderr for any message
4756 # that says an option was ignored or not supported.
4757 # When given -MP, icc 7.0 and 7.1 complain thusly:
4758 # icc: Command line warning: ignoring option '-M'; no argument required
4759 # The diagnosis changed in icc 8.0:
4760 # icc: Command line remark: option '-MP' not supported
4761 if (grep 'ignoring option' conftest.err ||
4762 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4763 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4764 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4765 break
4766 fi
4767 fi
81ecdfbb 4768 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4769 sed -e 's/^/| /' < conftest.err >&5
4770 done
4771
4772 cd ..
4773 rm -rf conftest.dir
4774else
4775 am_cv_CC_dependencies_compiler_type=none
4776fi
4777
4778fi
81ecdfbb
RW
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4780$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4781if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4782then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4783else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4784
4785fi
4786
4787
4788# Check for the 'make' the user wants to use.
4789for ac_prog in make
4790do
4791 # Extract the first word of "$ac_prog", so it can be a program name with args.
4792set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if test "${ac_cv_prog_MAKE+set}" = set; then :
4796 $as_echo_n "(cached) " >&6
a417dc56
RW
4797else
4798 if test -n "$MAKE"; then
4799 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4806 for ac_exec_ext in '' $ac_executable_extensions; do
4807 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4808 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4810 break 2
4811 fi
4812done
81ecdfbb
RW
4813 done
4814IFS=$as_save_IFS
a417dc56
RW
4815
4816fi
4817fi
4818MAKE=$ac_cv_prog_MAKE
4819if test -n "$MAKE"; then
81ecdfbb
RW
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4821$as_echo "$MAKE" >&6; }
a417dc56 4822else
81ecdfbb
RW
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
a417dc56
RW
4825fi
4826
81ecdfbb 4827
a417dc56
RW
4828 test -n "$MAKE" && break
4829done
4830
4831MAKE_IS_GNU=
4832case "`$MAKE --version 2>&1 | sed 1q`" in
4833 *GNU*)
4834 MAKE_IS_GNU=yes
4835 ;;
4836esac
81ecdfbb 4837 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4838 GMAKE_TRUE=
4839 GMAKE_FALSE='#'
4840else
4841 GMAKE_TRUE='#'
4842 GMAKE_FALSE=
4843fi
4844
81ecdfbb
RW
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4846$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4847set x ${MAKE-make}
4848ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4849if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4850 $as_echo_n "(cached) " >&6
a417dc56
RW
4851else
4852 cat >conftest.make <<\_ACEOF
81ecdfbb 4853SHELL = /bin/sh
a417dc56 4854all:
81ecdfbb 4855 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4856_ACEOF
4857# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4858case `${MAKE-make} -f conftest.make 2>/dev/null` in
4859 *@@@%%%=?*=@@@%%%*)
4860 eval ac_cv_prog_make_${ac_make}_set=yes;;
4861 *)
4862 eval ac_cv_prog_make_${ac_make}_set=no;;
4863esac
a417dc56
RW
4864rm -f conftest.make
4865fi
81ecdfbb
RW
4866if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4868$as_echo "yes" >&6; }
a417dc56
RW
4869 SET_MAKE=
4870else
81ecdfbb
RW
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
a417dc56
RW
4873 SET_MAKE="MAKE=${MAKE-make}"
4874fi
4875
4876
783e057b
DJ
4877
4878CONFIG_OBS=
4879CONFIG_DEPS=
4880CONFIG_SRCS=
4881ENABLE_CFLAGS=
4882
4883CONFIG_ALL=
4884CONFIG_CLEAN=
4885CONFIG_INSTALL=
4886CONFIG_UNINSTALL=
4887
4888# If we haven't got the data from the intl directory,
4889# assume NLS is disabled.
4890USE_NLS=no
4891LIBINTL=
4892LIBINTL_DEP=
4893INCINTL=
4894XGETTEXT=
4895GMSGFMT=
4896POSUB=
4897
4898if test -f ../intl/config.intl; then
4899 . ../intl/config.intl
4900fi
81ecdfbb
RW
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4902$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4903if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
783e057b 4906else
81ecdfbb
RW
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4908$as_echo "yes" >&6; }
783e057b 4909
81ecdfbb 4910$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4911
4912
81ecdfbb
RW
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4914$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4915 # Look for .po and .gmo files in the source directory.
4916 CATALOGS=
4917 XLINGUAS=
4918 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4919 # If there aren't any .gmo files the shell will give us the
4920 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4921 # weeded out.
4922 case "$cat" in *\**)
4923 continue;;
4924 esac
4925 # The quadruple backslash is collapsed to a double backslash
4926 # by the backticks, then collapsed again by the double quotes,
4927 # leaving us with one backslash in the sed expression (right
4928 # before the dot that mustn't act as a wildcard).
4929 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4930 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4931 # The user is allowed to set LINGUAS to a list of languages to
4932 # install catalogs for. If it's empty that means "all of them."
4933 if test "x$LINGUAS" = x; then
4934 CATALOGS="$CATALOGS $cat"
4935 XLINGUAS="$XLINGUAS $lang"
4936 else
4937 case "$LINGUAS" in *$lang*)
4938 CATALOGS="$CATALOGS $cat"
4939 XLINGUAS="$XLINGUAS $lang"
4940 ;;
4941 esac
4942 fi
4943 done
4944 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4946$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4947
4948
4949 DATADIRNAME=share
4950
4951 INSTOBJEXT=.mo
4952
4953 GENCAT=gencat
4954
4955 CATOBJEXT=.gmo
4956
4957fi
4958
4959localedir='${datadir}/locale'
4960
4961
4962if test x"$USE_NLS" = xyes; then
4963 CONFIG_ALL="$CONFIG_ALL all-po"
4964 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4965 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4966 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4967fi
4968
4969
f434ba03
PA
4970
4971
4972
4973 LIBC_FATAL_STDERR_=1
4974 export LIBC_FATAL_STDERR_
4975
4976
4977
4978
4979
4980 for ac_header in $gl_header_list
4981do :
4982 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4983ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4984eval as_val=\$$as_ac_Header
4985 if test "x$as_val" = x""yes; then :
4986 cat >>confdefs.h <<_ACEOF
4987#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4988_ACEOF
4989
4990fi
4991
4992done
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002 for ac_func in $gl_func_list
5003do :
5004 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5005ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5006eval as_val=\$$as_ac_var
5007 if test "x$as_val" = x""yes; then :
5008 cat >>confdefs.h <<_ACEOF
5009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5010_ACEOF
5011
5012fi
5013done
5014
5015
5016
5017
5018
5019
5020 GNULIB_MEMCHR=0;
5021 GNULIB_MEMMEM=0;
5022 GNULIB_MEMPCPY=0;
5023 GNULIB_MEMRCHR=0;
5024 GNULIB_RAWMEMCHR=0;
5025 GNULIB_STPCPY=0;
5026 GNULIB_STPNCPY=0;
5027 GNULIB_STRCHRNUL=0;
5028 GNULIB_STRDUP=0;
5029 GNULIB_STRNCAT=0;
5030 GNULIB_STRNDUP=0;
5031 GNULIB_STRNLEN=0;
5032 GNULIB_STRPBRK=0;
5033 GNULIB_STRSEP=0;
5034 GNULIB_STRSTR=0;
5035 GNULIB_STRCASESTR=0;
5036 GNULIB_STRTOK_R=0;
5037 GNULIB_MBSLEN=0;
5038 GNULIB_MBSNLEN=0;
5039 GNULIB_MBSCHR=0;
5040 GNULIB_MBSRCHR=0;
5041 GNULIB_MBSSTR=0;
5042 GNULIB_MBSCASECMP=0;
5043 GNULIB_MBSNCASECMP=0;
5044 GNULIB_MBSPCASECMP=0;
5045 GNULIB_MBSCASESTR=0;
5046 GNULIB_MBSCSPN=0;
5047 GNULIB_MBSPBRK=0;
5048 GNULIB_MBSSPN=0;
5049 GNULIB_MBSSEP=0;
5050 GNULIB_MBSTOK_R=0;
5051 GNULIB_STRERROR=0;
5052 GNULIB_STRSIGNAL=0;
5053 GNULIB_STRVERSCMP=0;
5054 HAVE_MBSLEN=0;
5055 HAVE_MEMCHR=1;
5056 HAVE_DECL_MEMMEM=1;
5057 HAVE_MEMPCPY=1;
5058 HAVE_DECL_MEMRCHR=1;
5059 HAVE_RAWMEMCHR=1;
5060 HAVE_STPCPY=1;
5061 HAVE_STPNCPY=1;
5062 HAVE_STRCHRNUL=1;
5063 HAVE_DECL_STRDUP=1;
5064 HAVE_DECL_STRNDUP=1;
5065 HAVE_DECL_STRNLEN=1;
5066 HAVE_STRPBRK=1;
5067 HAVE_STRSEP=1;
5068 HAVE_STRCASESTR=1;
5069 HAVE_DECL_STRTOK_R=1;
5070 HAVE_DECL_STRSIGNAL=1;
5071 HAVE_STRVERSCMP=1;
5072 REPLACE_MEMCHR=0;
783e057b 5073 REPLACE_MEMMEM=0;
f434ba03
PA
5074 REPLACE_STPNCPY=0;
5075 REPLACE_STRDUP=0;
783e057b 5076 REPLACE_STRSTR=0;
f434ba03
PA
5077 REPLACE_STRCASESTR=0;
5078 REPLACE_STRERROR=0;
5079 REPLACE_STRNCAT=0;
5080 REPLACE_STRNDUP=0;
5081 REPLACE_STRNLEN=0;
5082 REPLACE_STRSIGNAL=0;
5083 REPLACE_STRTOK_R=0;
5084 UNDEFINE_STRTOK_R=0;
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5099 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5100 # irrelevant for anonymous mappings.
5101 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5102if test "x$ac_cv_func_mmap" = x""yes; then :
5103 gl_have_mmap=yes
5104else
5105 gl_have_mmap=no
5106fi
5107
5108
5109 # Try to allow MAP_ANONYMOUS.
5110 gl_have_mmap_anonymous=no
5111 if test $gl_have_mmap = yes; then
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5113$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115/* end confdefs.h. */
5116
5117#include <sys/mman.h>
5118#ifdef MAP_ANONYMOUS
5119 I cant identify this map.
5120#endif
5121
5122_ACEOF
5123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5124 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5125 gl_have_mmap_anonymous=yes
5126fi
5127rm -f conftest*
5128
5129 if test $gl_have_mmap_anonymous != yes; then
5130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5131/* end confdefs.h. */
5132
5133#include <sys/mman.h>
5134#ifdef MAP_ANON
5135 I cant identify this map.
5136#endif
5137
5138_ACEOF
5139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5140 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5141
5142$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5143
5144 gl_have_mmap_anonymous=yes
5145fi
5146rm -f conftest*
5147
5148 fi
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5150$as_echo "$gl_have_mmap_anonymous" >&6; }
5151 if test $gl_have_mmap_anonymous = yes; then
5152
5153$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5154
5155 fi
5156 fi
5157
5158
5159 :
5160
5161
5162
5163
5164
5165
5166 :
5167
5168
5169
5170
5171
5172
5173
5174
5175 :
5176
5177
5178
5179
5180
5181 if test $ac_cv_func_memchr = yes; then
5182 # Detect platform-specific bugs in some versions of glibc:
5183 # memchr should not dereference anything with length 0
5184 # http://bugzilla.redhat.com/499689
5185 # memchr should not dereference overestimated length after a match
5186 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5187 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5188 # Assume that memchr works on platforms that lack mprotect.
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5190$as_echo_n "checking whether memchr works... " >&6; }
5191if test "${gl_cv_func_memchr_works+set}" = set; then :
5192 $as_echo_n "(cached) " >&6
5193else
5194 if test "$cross_compiling" = yes; then :
5195 gl_cv_func_memchr_works="guessing no"
5196else
5197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5198/* end confdefs.h. */
5199
5200#include <string.h>
5201#if HAVE_SYS_MMAN_H
5202# include <fcntl.h>
5203# include <unistd.h>
5204# include <sys/types.h>
5205# include <sys/mman.h>
5206# ifndef MAP_FILE
5207# define MAP_FILE 0
5208# endif
5209#endif
5210
5211int
5212main ()
5213{
5214
5215 char *fence = NULL;
5216#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5217# if HAVE_MAP_ANONYMOUS
5218 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5219 const int fd = -1;
5220# else /* !HAVE_MAP_ANONYMOUS */
5221 const int flags = MAP_FILE | MAP_PRIVATE;
5222 int fd = open ("/dev/zero", O_RDONLY, 0666);
5223 if (fd >= 0)
5224# endif
5225 {
5226 int pagesize = getpagesize ();
5227 char *two_pages =
5228 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5229 flags, fd, 0);
5230 if (two_pages != (char *)(-1)
5231 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5232 fence = two_pages + pagesize;
5233 }
5234#endif
5235 if (fence)
5236 {
5237 if (memchr (fence, 0, 0))
5238 return 1;
5239 strcpy (fence - 9, "12345678");
5240 if (memchr (fence - 9, 0, 79) != fence - 1)
5241 return 2;
5242 }
5243 return 0;
5244
5245 ;
5246 return 0;
5247}
5248_ACEOF
5249if ac_fn_c_try_run "$LINENO"; then :
5250 gl_cv_func_memchr_works=yes
5251else
5252 gl_cv_func_memchr_works=no
5253fi
5254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5255 conftest.$ac_objext conftest.beam conftest.$ac_ext
5256fi
5257
5258fi
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5260$as_echo "$gl_cv_func_memchr_works" >&6; }
5261 if test "$gl_cv_func_memchr_works" != yes; then
5262 REPLACE_MEMCHR=1
5263 fi
5264 else
5265 HAVE_MEMCHR=0
5266 fi
5267 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5268
5269
5270
5271
5272
5273
5274
5275
5276 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5277
5278
5279 for ac_header in bp-sym.h
5280do :
5281 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5282if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5283 cat >>confdefs.h <<_ACEOF
5284#define HAVE_BP_SYM_H 1
5285_ACEOF
5286
5287fi
5288
5289done
5290
5291
5292 fi
783e057b
DJ
5293
5294
81ecdfbb
RW
5295 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5296if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5297 ac_have_decl=1
783e057b 5298else
81ecdfbb 5299 ac_have_decl=0
783e057b 5300fi
783e057b
DJ
5301
5302cat >>confdefs.h <<_ACEOF
81ecdfbb 5303#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5304_ACEOF
5305
5306
783e057b
DJ
5307
5308
5309
5310
5311
5312
5313
5314
783e057b 5315
783e057b 5316
783e057b 5317
f434ba03 5318
81ecdfbb
RW
5319 for ac_func in memmem
5320do :
5321 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5322if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5323 cat >>confdefs.h <<_ACEOF
81ecdfbb 5324#define HAVE_MEMMEM 1
783e057b
DJ
5325_ACEOF
5326
5327else
5328
5329 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5330
5331fi
5332done
5333
5334
5335
5336 :
5337
5338
5339
5340
5341
5342 if test $ac_cv_have_decl_memmem = no; then
5343 HAVE_DECL_MEMMEM=0
5344 fi
5345 :
5346
5347
f434ba03
PA
5348 gl_cv_c_multiarch=no
5349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5350/* end confdefs.h. */
5351#ifndef __APPLE_CC__
5352 not a universal capable compiler
5353 #endif
5354 typedef int dummy;
5355
5356_ACEOF
5357if ac_fn_c_try_compile "$LINENO"; then :
5358
5359 arch=
5360 prev=
5361 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5362 if test -n "$prev"; then
5363 case $word in
5364 i?86 | x86_64 | ppc | ppc64)
5365 if test -z "$arch" || test "$arch" = "$word"; then
5366 arch="$word"
5367 else
5368 gl_cv_c_multiarch=yes
5369 fi
5370 ;;
5371 esac
5372 prev=
5373 else
5374 if test "x$word" = "x-arch"; then
5375 prev=arch
5376 fi
5377 fi
5378 done
5379
5380fi
5381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5382 if test $gl_cv_c_multiarch = yes; then
5383
5384$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5385
5386 APPLE_UNIVERSAL_BUILD=1
5387 else
5388 APPLE_UNIVERSAL_BUILD=0
5389 fi
5390
5391
5392
5393 REPLACE_NULL=0;
5394 HAVE_WCHAR_T=1;
5395 STDDEF_H='';
5396
5397
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5399$as_echo_n "checking for wchar_t... " >&6; }
5400if test "${gt_cv_c_wchar_t+set}" = set; then :
5401 $as_echo_n "(cached) " >&6
5402else
5403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5404/* end confdefs.h. */
5405#include <stddef.h>
5406 wchar_t foo = (wchar_t)'\0';
5407int
5408main ()
5409{
5410
5411 ;
5412 return 0;
5413}
5414_ACEOF
5415if ac_fn_c_try_compile "$LINENO"; then :
5416 gt_cv_c_wchar_t=yes
5417else
5418 gt_cv_c_wchar_t=no
5419fi
5420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5421fi
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5423$as_echo "$gt_cv_c_wchar_t" >&6; }
5424 if test $gt_cv_c_wchar_t = yes; then
5425
5426$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5427
5428 fi
5429
5430
5431
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5433$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5434if test "${gl_cv_have_include_next+set}" = set; then :
5435 $as_echo_n "(cached) " >&6
5436else
5437 rm -rf conftestd1a conftestd1b conftestd2
5438 mkdir conftestd1a conftestd1b conftestd2
5439 cat <<EOF > conftestd1a/conftest.h
5440#define DEFINED_IN_CONFTESTD1
5441#include_next <conftest.h>
5442#ifdef DEFINED_IN_CONFTESTD2
5443int foo;
5444#else
5445#error "include_next doesn't work"
5446#endif
5447EOF
5448 cat <<EOF > conftestd1b/conftest.h
5449#define DEFINED_IN_CONFTESTD1
5450#include <stdio.h>
5451#include_next <conftest.h>
5452#ifdef DEFINED_IN_CONFTESTD2
5453int foo;
5454#else
5455#error "include_next doesn't work"
5456#endif
5457EOF
5458 cat <<EOF > conftestd2/conftest.h
5459#ifndef DEFINED_IN_CONFTESTD1
5460#error "include_next test doesn't work"
5461#endif
5462#define DEFINED_IN_CONFTESTD2
5463EOF
5464 gl_save_CPPFLAGS="$CPPFLAGS"
5465 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467/* end confdefs.h. */
5468#include <conftest.h>
5469_ACEOF
5470if ac_fn_c_try_compile "$LINENO"; then :
5471 gl_cv_have_include_next=yes
5472else
5473 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <conftest.h>
5477_ACEOF
5478if ac_fn_c_try_compile "$LINENO"; then :
5479 gl_cv_have_include_next=buggy
5480else
5481 gl_cv_have_include_next=no
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487 CPPFLAGS="$gl_save_CPPFLAGS"
5488 rm -rf conftestd1a conftestd1b conftestd2
5489
5490fi
5491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5492$as_echo "$gl_cv_have_include_next" >&6; }
5493 PRAGMA_SYSTEM_HEADER=
5494 if test $gl_cv_have_include_next = yes; then
5495 INCLUDE_NEXT=include_next
5496 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5497 if test -n "$GCC"; then
5498 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5499 fi
5500 else
5501 if test $gl_cv_have_include_next = buggy; then
5502 INCLUDE_NEXT=include
5503 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5504 else
5505 INCLUDE_NEXT=include
5506 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5507 fi
5508 fi
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
81ecdfbb
RW
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5520$as_echo_n "checking for long long int... " >&6; }
5521if test "${ac_cv_type_long_long_int+set}" = set; then :
5522 $as_echo_n "(cached) " >&6
783e057b 5523else
81ecdfbb 5524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5525/* end confdefs.h. */
81ecdfbb
RW
5526
5527 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5528 implementations with broken preprocessors. Perhaps this can
5529 be revisited in 2012. In the meantime, code should not expect
5530 #if to work with literals wider than 32 bits. */
783e057b
DJ
5531 /* Test literals. */
5532 long long int ll = 9223372036854775807ll;
5533 long long int nll = -9223372036854775807LL;
5534 unsigned long long int ull = 18446744073709551615ULL;
5535 /* Test constant expressions. */
5536 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5537 ? 1 : -1)];
783e057b 5538 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5539 ? 1 : -1)];
783e057b
DJ
5540 int i = 63;
5541int
5542main ()
5543{
5544/* Test availability of runtime routines for shift and division. */
5545 long long int llmax = 9223372036854775807ll;
5546 unsigned long long int ullmax = 18446744073709551615ull;
5547 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5548 | (llmax / ll) | (llmax % ll)
5549 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5550 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5551 ;
5552 return 0;
5553}
5554
5555_ACEOF
81ecdfbb 5556if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5557 if test "$cross_compiling" = yes; then :
783e057b
DJ
5558 ac_cv_type_long_long_int=yes
5559else
81ecdfbb 5560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5561/* end confdefs.h. */
5562#include <limits.h>
f434ba03
PA
5563 #ifndef LLONG_MAX
5564 # define HALF \
5565 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5566 # define LLONG_MAX (HALF - 1 + HALF)
5567 #endif
783e057b
DJ
5568int
5569main ()
5570{
5571long long int n = 1;
f434ba03
PA
5572 int i;
5573 for (i = 0; ; i++)
5574 {
5575 long long int m = n << i;
5576 if (m >> i != n)
5577 return 1;
5578 if (LLONG_MAX / 2 < m)
5579 break;
5580 }
5581 return 0;
783e057b
DJ
5582 ;
5583 return 0;
5584}
5585_ACEOF
81ecdfbb 5586if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5587 ac_cv_type_long_long_int=yes
5588else
81ecdfbb 5589 ac_cv_type_long_long_int=no
783e057b 5590fi
81ecdfbb
RW
5591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5592 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5593fi
783e057b 5594
81ecdfbb
RW
5595else
5596 ac_cv_type_long_long_int=no
783e057b 5597fi
81ecdfbb
RW
5598rm -f core conftest.err conftest.$ac_objext \
5599 conftest$ac_exeext conftest.$ac_ext
783e057b 5600fi
81ecdfbb
RW
5601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5602$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5603 if test $ac_cv_type_long_long_int = yes; then
5604
81ecdfbb 5605$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5606
5607 fi
5608
5609
81ecdfbb
RW
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5611$as_echo_n "checking for unsigned long long int... " >&6; }
5612if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5613 $as_echo_n "(cached) " >&6
783e057b 5614else
81ecdfbb 5615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5616/* end confdefs.h. */
81ecdfbb
RW
5617
5618 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5619 implementations with broken preprocessors. Perhaps this can
5620 be revisited in 2012. In the meantime, code should not expect
5621 #if to work with literals wider than 32 bits. */
783e057b
DJ
5622 /* Test literals. */
5623 long long int ll = 9223372036854775807ll;
5624 long long int nll = -9223372036854775807LL;
5625 unsigned long long int ull = 18446744073709551615ULL;
5626 /* Test constant expressions. */
5627 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5628 ? 1 : -1)];
783e057b 5629 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5630 ? 1 : -1)];
783e057b
DJ
5631 int i = 63;
5632int
5633main ()
5634{
5635/* Test availability of runtime routines for shift and division. */
5636 long long int llmax = 9223372036854775807ll;
5637 unsigned long long int ullmax = 18446744073709551615ull;
5638 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5639 | (llmax / ll) | (llmax % ll)
5640 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5641 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5642 ;
5643 return 0;
5644}
5645
5646_ACEOF
81ecdfbb 5647if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5648 ac_cv_type_unsigned_long_long_int=yes
5649else
81ecdfbb 5650 ac_cv_type_unsigned_long_long_int=no
783e057b 5651fi
81ecdfbb
RW
5652rm -f core conftest.err conftest.$ac_objext \
5653 conftest$ac_exeext conftest.$ac_ext
783e057b 5654fi
81ecdfbb
RW
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5656$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5657 if test $ac_cv_type_unsigned_long_long_int = yes; then
5658
81ecdfbb 5659$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5660
5661 fi
5662
5663
5664
783e057b
DJ
5665
5666
5667
5668
5669
5670
5671
5672
81ecdfbb
RW
5673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5674$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5675if test "${ac_cv_c_restrict+set}" = set; then :
5676 $as_echo_n "(cached) " >&6
783e057b
DJ
5677else
5678 ac_cv_c_restrict=no
5679 # The order here caters to the fact that C++ does not require restrict.
5680 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5682/* end confdefs.h. */
5683typedef int * int_ptr;
5684 int foo (int_ptr $ac_kw ip) {
5685 return ip[0];
5686 }
5687int
5688main ()
5689{
5690int s[1];
5691 int * $ac_kw t = s;
5692 t[0] = 0;
5693 return foo(t)
5694 ;
5695 return 0;
5696}
5697_ACEOF
81ecdfbb 5698if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5699 ac_cv_c_restrict=$ac_kw
783e057b 5700fi
81ecdfbb 5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5702 test "$ac_cv_c_restrict" != no && break
5703 done
5704
5705fi
81ecdfbb
RW
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5707$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5708
5709 case $ac_cv_c_restrict in
5710 restrict) ;;
81ecdfbb 5711 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5712 ;;
5713 *) cat >>confdefs.h <<_ACEOF
5714#define restrict $ac_cv_c_restrict
5715_ACEOF
5716 ;;
5717 esac
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
f434ba03 5730
783e057b
DJ
5731 :
5732
5733
5734
5735
5736
5737
5738
f434ba03
PA
5739 if test $gl_cv_have_include_next = yes; then
5740 gl_cv_next_string_h='<'string.h'>'
5741 else
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5743$as_echo_n "checking absolute name of <string.h>... " >&6; }
5744if test "${gl_cv_next_string_h+set}" = set; then :
5745 $as_echo_n "(cached) " >&6
5746else
5747
5748 if test $ac_cv_header_string_h = yes; then
5749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5750/* end confdefs.h. */
5751#include <string.h>
5752
5753_ACEOF
5754 case "$host_os" in
5755 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5756 *) gl_absname_cpp="$ac_cpp" ;;
5757 esac
5758 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5759 sed -n '\#/string.h#{
5760 s#.*"\(.*/string.h\)".*#\1#
5761 s#^/[^/]#//&#
5762 p
5763 q
5764 }'`'"'
5765 else
5766 gl_cv_next_string_h='<'string.h'>'
5767 fi
5768
5769fi
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5771$as_echo "$gl_cv_next_string_h" >&6; }
5772 fi
5773 NEXT_STRING_H=$gl_cv_next_string_h
5774
5775 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5777 gl_next_as_first_directive='<'string.h'>'
5778 else
5779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5780 gl_next_as_first_directive=$gl_cv_next_string_h
5781 fi
5782 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5783
5784
5785
5786
5787
5788 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5789 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5791$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5792if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5793 $as_echo_n "(cached) " >&6
5794else
5795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5796/* end confdefs.h. */
5797#include <string.h>
5798
5799int
5800main ()
5801{
5802#undef $gl_func
5803 (void) $gl_func;
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808if ac_fn_c_try_compile "$LINENO"; then :
5809 eval "$as_gl_Symbol=yes"
5810else
5811 eval "$as_gl_Symbol=no"
5812fi
5813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5814fi
5815eval ac_res=\$$as_gl_Symbol
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5817$as_echo "$ac_res" >&6; }
5818 eval as_val=\$$as_gl_Symbol
5819 if test "x$as_val" = x""yes; then :
5820 cat >>confdefs.h <<_ACEOF
5821#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5822_ACEOF
5823
5824 eval ac_cv_have_decl_$gl_func=yes
5825fi
5826 done
5827
5828
5829
5830 GNULIB_BTOWC=0;
5831 GNULIB_WCTOB=0;
5832 GNULIB_MBSINIT=0;
5833 GNULIB_MBRTOWC=0;
5834 GNULIB_MBRLEN=0;
5835 GNULIB_MBSRTOWCS=0;
5836 GNULIB_MBSNRTOWCS=0;
5837 GNULIB_WCRTOMB=0;
5838 GNULIB_WCSRTOMBS=0;
5839 GNULIB_WCSNRTOMBS=0;
5840 GNULIB_WCWIDTH=0;
5841 HAVE_BTOWC=1;
5842 HAVE_MBSINIT=1;
5843 HAVE_MBRTOWC=1;
5844 HAVE_MBRLEN=1;
5845 HAVE_MBSRTOWCS=1;
5846 HAVE_MBSNRTOWCS=1;
5847 HAVE_WCRTOMB=1;
5848 HAVE_WCSRTOMBS=1;
5849 HAVE_WCSNRTOMBS=1;
5850 HAVE_DECL_WCTOB=1;
5851 HAVE_DECL_WCWIDTH=1;
5852 REPLACE_MBSTATE_T=0;
5853 REPLACE_BTOWC=0;
5854 REPLACE_WCTOB=0;
5855 REPLACE_MBSINIT=0;
5856 REPLACE_MBRTOWC=0;
5857 REPLACE_MBRLEN=0;
5858 REPLACE_MBSRTOWCS=0;
5859 REPLACE_MBSNRTOWCS=0;
5860 REPLACE_WCRTOMB=0;
5861 REPLACE_WCSRTOMBS=0;
5862 REPLACE_WCSNRTOMBS=0;
5863 REPLACE_WCWIDTH=0;
5864
5865
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5867$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5868if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5869 $as_echo_n "(cached) " >&6
783e057b 5870else
f434ba03
PA
5871 gl_cv_header_wchar_h_correct_inline=yes
5872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5873/* end confdefs.h. */
783e057b 5874
f434ba03
PA
5875 #define wcstod renamed_wcstod
5876#include <wchar.h>
5877extern int zero (void);
5878int main () { return zero(); }
5879
5880_ACEOF
5881 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5882 (eval $ac_compile) 2>&5
5883 ac_status=$?
5884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5885 test $ac_status = 0; }; then
5886 mv conftest.$ac_objext conftest1.$ac_objext
5887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5888/* end confdefs.h. */
f434ba03
PA
5889
5890 #define wcstod renamed_wcstod
5891#include <wchar.h>
5892int zero (void) { return 0; }
783e057b
DJ
5893
5894_ACEOF
f434ba03
PA
5895 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5896 (eval $ac_compile) 2>&5
5897 ac_status=$?
5898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5899 test $ac_status = 0; }; then
5900 mv conftest.$ac_objext conftest2.$ac_objext
5901 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5902 :
5903 else
5904 gl_cv_header_wchar_h_correct_inline=no
5905 fi
5906 fi
5907 fi
5908 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5909
5910fi
f434ba03
PA
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5912$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5913 if test $gl_cv_header_wchar_h_correct_inline = no; then
5914 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5915This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5916C99 mode. You have four options:
5917 - Add the flag -fgnu89-inline to CC and reconfigure, or
5918 - Fix your include files, using parts of
5919 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5920 - Use a gcc version older than 4.3, or
5921 - Don't use the flags -std=c99 or -std=gnu99.
5922Configuration aborted." "$LINENO" 5
5923 fi
783e057b
DJ
5924
5925
f434ba03
PA
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5927$as_echo_n "checking for wint_t... " >&6; }
5928if test "${gt_cv_c_wint_t+set}" = set; then :
5929 $as_echo_n "(cached) " >&6
5930else
5931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5932/* end confdefs.h. */
783e057b 5933
f434ba03
PA
5934/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5935 <wchar.h>.
5936 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5937 before <wchar.h>. */
5938#include <stddef.h>
5939#include <stdio.h>
5940#include <time.h>
5941#include <wchar.h>
5942 wint_t foo = (wchar_t)'\0';
5943int
5944main ()
5945{
783e057b 5946
f434ba03
PA
5947 ;
5948 return 0;
5949}
5950_ACEOF
5951if ac_fn_c_try_compile "$LINENO"; then :
5952 gt_cv_c_wint_t=yes
5953else
5954 gt_cv_c_wint_t=no
5955fi
5956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5957fi
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5959$as_echo "$gt_cv_c_wint_t" >&6; }
5960 if test $gt_cv_c_wint_t = yes; then
783e057b 5961
f434ba03 5962$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5963
f434ba03 5964 fi
783e057b
DJ
5965
5966
81ecdfbb 5967 if false; then
783e057b
DJ
5968 GL_COND_LIBTOOL_TRUE=
5969 GL_COND_LIBTOOL_FALSE='#'
5970else
5971 GL_COND_LIBTOOL_TRUE='#'
5972 GL_COND_LIBTOOL_FALSE=
5973fi
5974
5975 gl_cond_libtool=false
5976 gl_libdeps=
5977 gl_ltlibdeps=
f434ba03 5978 gl_m4_base='gnulib/m4'
783e057b
DJ
5979
5980
5981
783e057b
DJ
5982
5983
5984
5985
5986
5987
f434ba03
PA
5988 gl_source_base='gnulib'
5989 # Code from module arg-nonnull:
5990 # Code from module c++defs:
5991 # Code from module extensions:
5992 # Code from module include_next:
5993 # Code from module memchr:
783e057b 5994
783e057b 5995
783e057b 5996
783e057b 5997
f434ba03 5998 GNULIB_MEMCHR=1
783e057b 5999
783e057b 6000
783e057b 6001
f434ba03 6002$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6003
783e057b
DJ
6004
6005
f434ba03 6006 # Code from module memmem:
783e057b
DJ
6007
6008
f434ba03
PA
6009 if test $ac_cv_have_decl_memmem = yes; then
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6011$as_echo_n "checking whether memmem works in linear time... " >&6; }
6012if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6013 $as_echo_n "(cached) " >&6
783e057b 6014else
81ecdfbb 6015 if test "$cross_compiling" = yes; then :
f434ba03 6016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6017/* end confdefs.h. */
783e057b 6018
f434ba03
PA
6019#include <features.h>
6020#ifdef __GNU_LIBRARY__
6021 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6022 Lucky user
6023 #endif
6024#endif
6025#ifdef __CYGWIN__
6026 #include <cygwin/version.h>
6027 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6028 Lucky user
6029 #endif
6030#endif
783e057b 6031
783e057b 6032_ACEOF
f434ba03
PA
6033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6034 $EGREP "Lucky user" >/dev/null 2>&1; then :
6035 gl_cv_func_memmem_works=yes
783e057b 6036else
f434ba03 6037 gl_cv_func_memmem_works="guessing no"
783e057b 6038fi
f434ba03 6039rm -f conftest*
783e057b
DJ
6040
6041
783e057b 6042else
81ecdfbb 6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6044/* end confdefs.h. */
6045
f434ba03 6046#include <signal.h> /* for signal */
783e057b
DJ
6047#include <string.h> /* for memmem */
6048#include <stdlib.h> /* for malloc */
6049#include <unistd.h> /* for alarm */
6050
6051int
6052main ()
6053{
6054size_t m = 1000000;
6055 char *haystack = (char *) malloc (2 * m + 1);
6056 char *needle = (char *) malloc (m + 1);
6057 void *result = 0;
6058 /* Failure to compile this test due to missing alarm is okay,
6059 since all such platforms (mingw) also lack memmem. */
f434ba03 6060 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6061 alarm (5);
6062 /* Check for quadratic performance. */
6063 if (haystack && needle)
6064 {
f434ba03
PA
6065 memset (haystack, 'A', 2 * m);
6066 haystack[2 * m] = 'B';
6067 memset (needle, 'A', m);
6068 needle[m] = 'B';
6069 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6070 }
6071 /* Check for empty needle behavior. */
6072 return !result || !memmem ("a", 1, 0, 0);
6073 ;
6074 return 0;
6075}
6076_ACEOF
81ecdfbb 6077if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6078 gl_cv_func_memmem_works=yes
6079else
81ecdfbb 6080 gl_cv_func_memmem_works=no
783e057b 6081fi
81ecdfbb
RW
6082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6083 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6084fi
81ecdfbb 6085
f434ba03 6086
783e057b 6087fi
81ecdfbb
RW
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6089$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6090 if test "$gl_cv_func_memmem_works" != yes; then
6091 REPLACE_MEMMEM=1
6092
6093
6094
6095
6096
6097
6098
f434ba03 6099
783e057b
DJ
6100 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6101
6102 fi
6103 fi
6104
f434ba03
PA
6105 # Code from module memmem-simple:
6106
783e057b
DJ
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
81ecdfbb
RW
6118 for ac_func in memmem
6119do :
6120 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6121if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6122 cat >>confdefs.h <<_ACEOF
81ecdfbb 6123#define HAVE_MEMMEM 1
783e057b
DJ
6124_ACEOF
6125
6126else
6127
6128 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6129
6130fi
6131done
6132
6133
6134
6135 :
6136
6137
6138
6139
6140
6141 if test $ac_cv_have_decl_memmem = no; then
6142 HAVE_DECL_MEMMEM=0
6143 fi
6144 :
6145
6146
6147
f434ba03 6148
783e057b
DJ
6149 GNULIB_MEMMEM=1
6150
6151
6152
f434ba03
PA
6153$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6154
6155
6156
6157 # Code from module multiarch:
6158
6159 # Code from module stddef:
6160
6161
6162
6163 if test $gt_cv_c_wchar_t = no; then
6164 HAVE_WCHAR_T=0
6165 STDDEF_H=stddef.h
6166 fi
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6168$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6169if test "${gl_cv_decl_null_works+set}" = set; then :
6170 $as_echo_n "(cached) " >&6
6171else
6172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6173/* end confdefs.h. */
6174#include <stddef.h>
6175 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6176
6177int
6178main ()
6179{
6180
6181 ;
6182 return 0;
6183}
6184_ACEOF
6185if ac_fn_c_try_compile "$LINENO"; then :
6186 gl_cv_decl_null_works=yes
6187else
6188 gl_cv_decl_null_works=no
6189fi
6190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6191fi
6192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6193$as_echo "$gl_cv_decl_null_works" >&6; }
6194 if test $gl_cv_decl_null_works = no; then
6195 REPLACE_NULL=1
6196 STDDEF_H=stddef.h
6197 fi
6198 if test -n "$STDDEF_H"; then
6199
6200
6201
6202
6203 :
6204
6205
6206
6207
6208
6209
6210
6211 if test $gl_cv_have_include_next = yes; then
6212 gl_cv_next_stddef_h='<'stddef.h'>'
6213 else
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6215$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6216if test "${gl_cv_next_stddef_h+set}" = set; then :
6217 $as_echo_n "(cached) " >&6
6218else
6219
6220 if test $ac_cv_header_stddef_h = yes; then
6221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6222/* end confdefs.h. */
6223#include <stddef.h>
6224
6225_ACEOF
6226 case "$host_os" in
6227 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6228 *) gl_absname_cpp="$ac_cpp" ;;
6229 esac
6230 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6231 sed -n '\#/stddef.h#{
6232 s#.*"\(.*/stddef.h\)".*#\1#
6233 s#^/[^/]#//&#
6234 p
6235 q
6236 }'`'"'
6237 else
6238 gl_cv_next_stddef_h='<'stddef.h'>'
6239 fi
6240
6241fi
6242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6243$as_echo "$gl_cv_next_stddef_h" >&6; }
6244 fi
6245 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6246
6247 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6248 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6249 gl_next_as_first_directive='<'stddef.h'>'
6250 else
6251 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6252 gl_next_as_first_directive=$gl_cv_next_stddef_h
6253 fi
6254 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6255
6256
6257
6258 fi
6259
6260 # Code from module stdint:
6261
6262
783e057b
DJ
6263
6264 if test $ac_cv_type_long_long_int = yes; then
6265 HAVE_LONG_LONG_INT=1
6266 else
6267 HAVE_LONG_LONG_INT=0
6268 fi
6269
6270
6271 if test $ac_cv_type_unsigned_long_long_int = yes; then
6272 HAVE_UNSIGNED_LONG_LONG_INT=1
6273 else
6274 HAVE_UNSIGNED_LONG_LONG_INT=0
6275 fi
6276
6277
6278 if test $ac_cv_header_inttypes_h = yes; then
6279 HAVE_INTTYPES_H=1
6280 else
6281 HAVE_INTTYPES_H=0
6282 fi
6283
6284
6285 if test $ac_cv_header_sys_types_h = yes; then
6286 HAVE_SYS_TYPES_H=1
6287 else
6288 HAVE_SYS_TYPES_H=0
6289 fi
6290
6291
6292
6293
6294
f434ba03 6295
783e057b
DJ
6296 :
6297
6298
6299
6300
6301
6302
6303
6304 if test $gl_cv_have_include_next = yes; then
6305 gl_cv_next_stdint_h='<'stdint.h'>'
6306 else
81ecdfbb
RW
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6308$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6309if test "${gl_cv_next_stdint_h+set}" = set; then :
6310 $as_echo_n "(cached) " >&6
783e057b
DJ
6311else
6312
f434ba03
PA
6313 if test $ac_cv_header_stdint_h = yes; then
6314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6315/* end confdefs.h. */
6316#include <stdint.h>
6317
6318_ACEOF
f434ba03
PA
6319 case "$host_os" in
6320 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6321 *) gl_absname_cpp="$ac_cpp" ;;
6322 esac
6323 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6324 sed -n '\#/stdint.h#{
6325 s#.*"\(.*/stdint.h\)".*#\1#
6326 s#^/[^/]#//&#
6327 p
6328 q
6329 }'`'"'
6330 else
6331 gl_cv_next_stdint_h='<'stdint.h'>'
6332 fi
783e057b
DJ
6333
6334fi
81ecdfbb
RW
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6336$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6337 fi
6338 NEXT_STDINT_H=$gl_cv_next_stdint_h
6339
f434ba03
PA
6340 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6342 gl_next_as_first_directive='<'stdint.h'>'
6343 else
6344 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6345 gl_next_as_first_directive=$gl_cv_next_stdint_h
6346 fi
6347 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6348
783e057b
DJ
6349
6350
6351 if test $ac_cv_header_stdint_h = yes; then
6352 HAVE_STDINT_H=1
6353 else
6354 HAVE_STDINT_H=0
6355 fi
6356
6357
6358 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6360$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6361if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6362 $as_echo_n "(cached) " >&6
783e057b
DJ
6363else
6364 gl_cv_header_working_stdint_h=no
81ecdfbb 6365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6366/* end confdefs.h. */
6367
81ecdfbb 6368
783e057b
DJ
6369#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6370#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6371#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6372#include <stdint.h>
6373/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6374#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6375#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6376#endif
6377
6378
6379 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6380 included before <wchar.h>. */
6381 #include <stddef.h>
6382 #include <signal.h>
6383 #if HAVE_WCHAR_H
6384 # include <stdio.h>
6385 # include <time.h>
6386 # include <wchar.h>
6387 #endif
6388
6389
6390#ifdef INT8_MAX
6391int8_t a1 = INT8_MAX;
6392int8_t a1min = INT8_MIN;
6393#endif
6394#ifdef INT16_MAX
6395int16_t a2 = INT16_MAX;
6396int16_t a2min = INT16_MIN;
6397#endif
6398#ifdef INT32_MAX
6399int32_t a3 = INT32_MAX;
6400int32_t a3min = INT32_MIN;
6401#endif
6402#ifdef INT64_MAX
6403int64_t a4 = INT64_MAX;
6404int64_t a4min = INT64_MIN;
6405#endif
6406#ifdef UINT8_MAX
6407uint8_t b1 = UINT8_MAX;
6408#else
6409typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6410#endif
6411#ifdef UINT16_MAX
6412uint16_t b2 = UINT16_MAX;
6413#endif
6414#ifdef UINT32_MAX
6415uint32_t b3 = UINT32_MAX;
6416#endif
6417#ifdef UINT64_MAX
6418uint64_t b4 = UINT64_MAX;
6419#endif
6420int_least8_t c1 = INT8_C (0x7f);
6421int_least8_t c1max = INT_LEAST8_MAX;
6422int_least8_t c1min = INT_LEAST8_MIN;
6423int_least16_t c2 = INT16_C (0x7fff);
6424int_least16_t c2max = INT_LEAST16_MAX;
6425int_least16_t c2min = INT_LEAST16_MIN;
6426int_least32_t c3 = INT32_C (0x7fffffff);
6427int_least32_t c3max = INT_LEAST32_MAX;
6428int_least32_t c3min = INT_LEAST32_MIN;
6429int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6430int_least64_t c4max = INT_LEAST64_MAX;
6431int_least64_t c4min = INT_LEAST64_MIN;
6432uint_least8_t d1 = UINT8_C (0xff);
6433uint_least8_t d1max = UINT_LEAST8_MAX;
6434uint_least16_t d2 = UINT16_C (0xffff);
6435uint_least16_t d2max = UINT_LEAST16_MAX;
6436uint_least32_t d3 = UINT32_C (0xffffffff);
6437uint_least32_t d3max = UINT_LEAST32_MAX;
6438uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6439uint_least64_t d4max = UINT_LEAST64_MAX;
6440int_fast8_t e1 = INT_FAST8_MAX;
6441int_fast8_t e1min = INT_FAST8_MIN;
6442int_fast16_t e2 = INT_FAST16_MAX;
6443int_fast16_t e2min = INT_FAST16_MIN;
6444int_fast32_t e3 = INT_FAST32_MAX;
6445int_fast32_t e3min = INT_FAST32_MIN;
6446int_fast64_t e4 = INT_FAST64_MAX;
6447int_fast64_t e4min = INT_FAST64_MIN;
6448uint_fast8_t f1 = UINT_FAST8_MAX;
6449uint_fast16_t f2 = UINT_FAST16_MAX;
6450uint_fast32_t f3 = UINT_FAST32_MAX;
6451uint_fast64_t f4 = UINT_FAST64_MAX;
6452#ifdef INTPTR_MAX
6453intptr_t g = INTPTR_MAX;
6454intptr_t gmin = INTPTR_MIN;
6455#endif
6456#ifdef UINTPTR_MAX
6457uintptr_t h = UINTPTR_MAX;
6458#endif
6459intmax_t i = INTMAX_MAX;
6460uintmax_t j = UINTMAX_MAX;
6461
6462#include <limits.h> /* for CHAR_BIT */
6463#define TYPE_MINIMUM(t) \
6464 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6465#define TYPE_MAXIMUM(t) \
6466 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6467struct s {
6468 int check_PTRDIFF:
6469 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6470 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6471 ? 1 : -1;
6472 /* Detect bug in FreeBSD 6.0 / ia64. */
6473 int check_SIG_ATOMIC:
6474 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6475 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6476 ? 1 : -1;
6477 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6478 int check_WCHAR:
6479 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6480 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6481 ? 1 : -1;
6482 /* Detect bug in mingw. */
6483 int check_WINT:
6484 WINT_MIN == TYPE_MINIMUM (wint_t)
6485 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6486 ? 1 : -1;
6487
f434ba03
PA
6488 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6489 int check_UINT8_C:
6490 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6491 int check_UINT16_C:
6492 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6493
6494 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6495#ifdef UINT8_MAX
6496 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6497#endif
6498#ifdef UINT16_MAX
6499 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6500#endif
6501#ifdef UINT32_MAX
6502 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6503#endif
6504#ifdef UINT64_MAX
6505 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6506#endif
6507 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6508 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6509 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6510 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6511 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6512 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6513 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6514 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6515 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6516 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6517 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6518};
6519
6520int
6521main ()
6522{
6523
6524 ;
6525 return 0;
6526}
6527_ACEOF
6528if ac_fn_c_try_compile "$LINENO"; then :
6529 if test "$cross_compiling" = yes; then :
6530 gl_cv_header_working_stdint_h=yes
6531
6532else
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534/* end confdefs.h. */
6535
6536
6537#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6538#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6539#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6540#include <stdint.h>
6541
783e057b 6542
f434ba03
PA
6543 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6544 included before <wchar.h>. */
6545 #include <stddef.h>
6546 #include <signal.h>
6547 #if HAVE_WCHAR_H
6548 # include <stdio.h>
6549 # include <time.h>
6550 # include <wchar.h>
6551 #endif
6552
6553
6554#include <stdio.h>
6555#include <string.h>
6556#define MVAL(macro) MVAL1(macro)
6557#define MVAL1(expression) #expression
6558static const char *macro_values[] =
6559 {
6560#ifdef INT8_MAX
6561 MVAL (INT8_MAX),
6562#endif
6563#ifdef INT16_MAX
6564 MVAL (INT16_MAX),
6565#endif
6566#ifdef INT32_MAX
6567 MVAL (INT32_MAX),
6568#endif
6569#ifdef INT64_MAX
6570 MVAL (INT64_MAX),
6571#endif
783e057b 6572#ifdef UINT8_MAX
f434ba03 6573 MVAL (UINT8_MAX),
783e057b
DJ
6574#endif
6575#ifdef UINT16_MAX
f434ba03 6576 MVAL (UINT16_MAX),
783e057b
DJ
6577#endif
6578#ifdef UINT32_MAX
f434ba03 6579 MVAL (UINT32_MAX),
783e057b
DJ
6580#endif
6581#ifdef UINT64_MAX
f434ba03 6582 MVAL (UINT64_MAX),
783e057b 6583#endif
f434ba03
PA
6584 NULL
6585 };
783e057b
DJ
6586
6587int
6588main ()
6589{
6590
f434ba03
PA
6591 const char **mv;
6592 for (mv = macro_values; *mv != NULL; mv++)
6593 {
6594 const char *value = *mv;
6595 /* Test whether it looks like a cast expression. */
6596 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6597 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6598 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6599 || strncmp (value, "((int)"/*)*/, 6) == 0
6600 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6601 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6602 return 1;
6603 }
6604 return 0;
6605
783e057b
DJ
6606 ;
6607 return 0;
6608}
6609_ACEOF
f434ba03 6610if ac_fn_c_try_run "$LINENO"; then :
783e057b 6611 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6612fi
6613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6614 conftest.$ac_objext conftest.beam conftest.$ac_ext
6615fi
6616
6617
783e057b 6618fi
81ecdfbb 6619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6620
783e057b 6621fi
81ecdfbb
RW
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6623$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6624 fi
6625 if test "$gl_cv_header_working_stdint_h" = yes; then
6626 STDINT_H=
6627 else
81ecdfbb
RW
6628 for ac_header in sys/inttypes.h sys/bitypes.h
6629do :
6630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6631ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6632eval as_val=\$$as_ac_Header
6633 if test "x$as_val" = x""yes; then :
783e057b 6634 cat >>confdefs.h <<_ACEOF
81ecdfbb 6635#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6636_ACEOF
6637
6638fi
6639
6640done
6641
6642 if test $ac_cv_header_sys_inttypes_h = yes; then
6643 HAVE_SYS_INTTYPES_H=1
6644 else
6645 HAVE_SYS_INTTYPES_H=0
6646 fi
6647
6648 if test $ac_cv_header_sys_bitypes_h = yes; then
6649 HAVE_SYS_BITYPES_H=1
6650 else
6651 HAVE_SYS_BITYPES_H=0
6652 fi
6653
6654
6655
6656 :
6657
6658
6659
6660
6661
6662
6663
6664
f434ba03
PA
6665 if test $APPLE_UNIVERSAL_BUILD = 0; then
6666
6667
6668 for gltype in ptrdiff_t size_t ; do
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6670$as_echo_n "checking for bit size of $gltype... " >&6; }
6671if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6672 $as_echo_n "(cached) " >&6
6673else
6674 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6675 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6676 included before <wchar.h>. */
6677 #include <stddef.h>
6678 #include <signal.h>
6679 #if HAVE_WCHAR_H
6680 # include <stdio.h>
6681 # include <time.h>
6682 # include <wchar.h>
6683 #endif
6684
6685#include <limits.h>"; then :
6686
6687else
6688 result=unknown
6689fi
6690
6691 eval gl_cv_bitsizeof_${gltype}=\$result
6692
6693fi
6694eval ac_res=\$gl_cv_bitsizeof_${gltype}
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6696$as_echo "$ac_res" >&6; }
6697 eval result=\$gl_cv_bitsizeof_${gltype}
6698 if test $result = unknown; then
6699 result=0
6700 fi
6701 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6702 cat >>confdefs.h <<_ACEOF
6703#define BITSIZEOF_${GLTYPE} $result
6704_ACEOF
6705
6706 eval BITSIZEOF_${GLTYPE}=\$result
6707 done
6708
6709
6710 fi
6711
783e057b 6712
f434ba03 6713 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6715$as_echo_n "checking for bit size of $gltype... " >&6; }
6716if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6717 $as_echo_n "(cached) " >&6
6718else
6719 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6720 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6721 included before <wchar.h>. */
6722 #include <stddef.h>
6723 #include <signal.h>
6724 #if HAVE_WCHAR_H
6725 # include <stdio.h>
6726 # include <time.h>
6727 # include <wchar.h>
6728 #endif
6729
6730#include <limits.h>"; then :
6731
6732else
6733 result=unknown
6734fi
6735
6736 eval gl_cv_bitsizeof_${gltype}=\$result
6737
6738fi
6739eval ac_res=\$gl_cv_bitsizeof_${gltype}
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6741$as_echo "$ac_res" >&6; }
6742 eval result=\$gl_cv_bitsizeof_${gltype}
6743 if test $result = unknown; then
6744 result=0
6745 fi
6746 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6747 cat >>confdefs.h <<_ACEOF
6748#define BITSIZEOF_${GLTYPE} $result
6749_ACEOF
783e057b 6750
81ecdfbb
RW
6751 eval BITSIZEOF_${GLTYPE}=\$result
6752 done
783e057b
DJ
6753
6754
6755
6756
81ecdfbb
RW
6757 for gltype in sig_atomic_t wchar_t wint_t ; do
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6759$as_echo_n "checking whether $gltype is signed... " >&6; }
6760if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6761 $as_echo_n "(cached) " >&6
783e057b 6762else
81ecdfbb 6763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6764/* end confdefs.h. */
6765
6766 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6767 included before <wchar.h>. */
6768 #include <stddef.h>
6769 #include <signal.h>
6770 #if HAVE_WCHAR_H
6771 # include <stdio.h>
6772 # include <time.h>
6773 # include <wchar.h>
6774 #endif
6775
6776 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6777int
6778main ()
6779{
6780
6781 ;
6782 return 0;
6783}
6784_ACEOF
81ecdfbb 6785if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6786 result=yes
6787else
81ecdfbb 6788 result=no
20e95c23 6789fi
81ecdfbb 6790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6791 eval gl_cv_type_${gltype}_signed=\$result
6792
6793fi
81ecdfbb
RW
6794eval ac_res=\$gl_cv_type_${gltype}_signed
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6796$as_echo "$ac_res" >&6; }
783e057b
DJ
6797 eval result=\$gl_cv_type_${gltype}_signed
6798 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6799 if test "$result" = yes; then
6800 cat >>confdefs.h <<_ACEOF
6801#define HAVE_SIGNED_${GLTYPE} 1
6802_ACEOF
6803
6804 eval HAVE_SIGNED_${GLTYPE}=1
6805 else
6806 eval HAVE_SIGNED_${GLTYPE}=0
6807 fi
6808 done
6809
6810
6811 gl_cv_type_ptrdiff_t_signed=yes
6812 gl_cv_type_size_t_signed=no
f434ba03 6813 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6814
6815
f434ba03 6816 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6818$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6819if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6820 $as_echo_n "(cached) " >&6
c906108c 6821else
783e057b
DJ
6822 eval gl_cv_type_${gltype}_suffix=no
6823 eval result=\$gl_cv_type_${gltype}_signed
6824 if test "$result" = yes; then
6825 glsufu=
6826 else
6827 glsufu=u
6828 fi
6829 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6830 case $glsuf in
6831 '') gltype1='int';;
f434ba03
PA
6832 l) gltype1='long int';;
6833 ll) gltype1='long long int';;
6834 i64) gltype1='__int64';;
6835 u) gltype1='unsigned int';;
6836 ul) gltype1='unsigned long int';;
6837 ull) gltype1='unsigned long long int';;
783e057b
DJ
6838 ui64)gltype1='unsigned __int64';;
6839 esac
81ecdfbb 6840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6841/* end confdefs.h. */
6842
6843 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6844 included before <wchar.h>. */
6845 #include <stddef.h>
6846 #include <signal.h>
6847 #if HAVE_WCHAR_H
6848 # include <stdio.h>
6849 # include <time.h>
6850 # include <wchar.h>
6851 #endif
6852
6853 extern $gltype foo;
6854 extern $gltype1 foo;
6855int
6856main ()
6857{
6858
6859 ;
6860 return 0;
6861}
6862_ACEOF
81ecdfbb 6863if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6864 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6865fi
81ecdfbb 6866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6867 eval result=\$gl_cv_type_${gltype}_suffix
6868 test "$result" != no && break
6869 done
6870fi
81ecdfbb
RW
6871eval ac_res=\$gl_cv_type_${gltype}_suffix
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6873$as_echo "$ac_res" >&6; }
783e057b
DJ
6874 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6875 eval result=\$gl_cv_type_${gltype}_suffix
6876 test "$result" = no && result=
6877 eval ${GLTYPE}_SUFFIX=\$result
6878 cat >>confdefs.h <<_ACEOF
6879#define ${GLTYPE}_SUFFIX $result
6880_ACEOF
6881
6882 done
6883
6884
783e057b
DJ
6885 fi
6886
6887
f434ba03
PA
6888 for gltype in sig_atomic_t wchar_t wint_t ; do
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6890$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6891if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6892 $as_echo_n "(cached) " >&6
783e057b 6893else
f434ba03
PA
6894 eval gl_cv_type_${gltype}_suffix=no
6895 eval result=\$gl_cv_type_${gltype}_signed
6896 if test "$result" = yes; then
6897 glsufu=
6898 else
6899 glsufu=u
6900 fi
6901 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6902 case $glsuf in
6903 '') gltype1='int';;
6904 l) gltype1='long int';;
6905 ll) gltype1='long long int';;
6906 i64) gltype1='__int64';;
6907 u) gltype1='unsigned int';;
6908 ul) gltype1='unsigned long int';;
6909 ull) gltype1='unsigned long long int';;
6910 ui64)gltype1='unsigned __int64';;
6911 esac
6912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6913/* end confdefs.h. */
f434ba03
PA
6914
6915 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6916 included before <wchar.h>. */
6917 #include <stddef.h>
6918 #include <signal.h>
6919 #if HAVE_WCHAR_H
6920 # include <stdio.h>
6921 # include <time.h>
6922 # include <wchar.h>
6923 #endif
6924
6925 extern $gltype foo;
6926 extern $gltype1 foo;
6927int
6928main ()
6929{
6930
6931 ;
6932 return 0;
6933}
783e057b 6934_ACEOF
81ecdfbb 6935if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6936 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6937fi
81ecdfbb 6938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6939 eval result=\$gl_cv_type_${gltype}_suffix
6940 test "$result" != no && break
6941 done
783e057b 6942fi
f434ba03
PA
6943eval ac_res=\$gl_cv_type_${gltype}_suffix
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6945$as_echo "$ac_res" >&6; }
6946 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6947 eval result=\$gl_cv_type_${gltype}_suffix
6948 test "$result" = no && result=
6949 eval ${GLTYPE}_SUFFIX=\$result
6950 cat >>confdefs.h <<_ACEOF
6951#define ${GLTYPE}_SUFFIX $result
6952_ACEOF
6953
6954 done
6955
6956
6957
6958 STDINT_H=stdint.h
783e057b
DJ
6959 fi
6960
6961
f434ba03
PA
6962 # Code from module string:
6963
6964
6965
6966 # Code from module warn-on-use:
6967 # Code from module wchar:
6968
6969
6970
6971
783e057b
DJ
6972 :
6973
6974
6975
6976
6977
783e057b
DJ
6978
6979
6980
6981
6982 :
6983
6984
6985
6986
6987
6988
6989
6990 if test $gl_cv_have_include_next = yes; then
6991 gl_cv_next_wchar_h='<'wchar.h'>'
6992 else
81ecdfbb
RW
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6994$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6995if test "${gl_cv_next_wchar_h+set}" = set; then :
6996 $as_echo_n "(cached) " >&6
783e057b
DJ
6997else
6998
f434ba03
PA
6999 if test $ac_cv_header_wchar_h = yes; then
7000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7001/* end confdefs.h. */
7002#include <wchar.h>
7003
7004_ACEOF
f434ba03
PA
7005 case "$host_os" in
7006 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7007 *) gl_absname_cpp="$ac_cpp" ;;
7008 esac
7009 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7010 sed -n '\#/wchar.h#{
7011 s#.*"\(.*/wchar.h\)".*#\1#
7012 s#^/[^/]#//&#
7013 p
7014 q
7015 }'`'"'
7016 else
7017 gl_cv_next_wchar_h='<'wchar.h'>'
7018 fi
783e057b
DJ
7019
7020fi
81ecdfbb
RW
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7022$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7023 fi
7024 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7025
f434ba03
PA
7026 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7027 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7028 gl_next_as_first_directive='<'wchar.h'>'
7029 else
7030 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7031 gl_next_as_first_directive=$gl_cv_next_wchar_h
7032 fi
7033 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7034
7035
7036
7037 if test $ac_cv_header_wchar_h = yes; then
7038 HAVE_WCHAR_H=1
7039 else
7040 HAVE_WCHAR_H=0
7041 fi
7042
7043
7044
7045 if test $gt_cv_c_wint_t = yes; then
7046 HAVE_WINT_T=1
7047 else
7048 HAVE_WINT_T=0
7049 fi
7050
7051
7052
7053 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7054 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7056$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7057if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7058 $as_echo_n "(cached) " >&6
7059else
7060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7061/* end confdefs.h. */
7062
7063/* Some systems require additional headers. */
7064#ifndef __GLIBC__
7065# include <stddef.h>
7066# include <stdio.h>
7067# include <time.h>
7068#endif
7069#include <wchar.h>
7070
7071int
7072main ()
7073{
7074#undef $gl_func
7075 (void) $gl_func;
7076 ;
7077 return 0;
7078}
7079_ACEOF
7080if ac_fn_c_try_compile "$LINENO"; then :
7081 eval "$as_gl_Symbol=yes"
7082else
7083 eval "$as_gl_Symbol=no"
7084fi
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086fi
7087eval ac_res=\$$as_gl_Symbol
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7089$as_echo "$ac_res" >&6; }
7090 eval as_val=\$$as_gl_Symbol
7091 if test "x$as_val" = x""yes; then :
7092 cat >>confdefs.h <<_ACEOF
7093#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7094_ACEOF
7095
7096 eval ac_cv_have_decl_$gl_func=yes
7097fi
7098 done
7099
7100
7101 # Code from module dummy:
7102 # End of code from modules
7103
7104
c906108c 7105
c906108c 7106
c906108c 7107
c906108c 7108
c906108c 7109
c906108c 7110
c906108c 7111
783e057b
DJ
7112 gltests_libdeps=
7113 gltests_ltlibdeps=
20e95c23 7114
20e95c23 7115
20e95c23 7116
f434ba03
PA
7117
7118
7119
7120
7121
7122
783e057b 7123 gl_source_base='tests'
f434ba03
PA
7124 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
7125
7126 gl_module_indicator_condition=$gltests_WITNESS
7127
7128
7129
7130
7131
c906108c 7132
bec39cab 7133
bec39cab 7134
783e057b
DJ
7135
7136 LIBGNU_LIBDEPS="$gl_libdeps"
7137
7138 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7139
7140
e28b3332 7141
d5af19ba
DJ
7142# For Makefile dependencies.
7143GNULIB_STDINT_H=
7144if test x"$STDINT_H" != x; then
7145 GNULIB_STDINT_H=gnulib/$STDINT_H
7146fi
7147
7148
bec39cab
AC
7149PACKAGE=gdb
7150
7151cat >>confdefs.h <<_ACEOF
7152#define PACKAGE "$PACKAGE"
7153_ACEOF
7154
7155
7156
5048e516
JK
7157# Do we have a single-tree copy of texinfo? Even if we do, we can't
7158# rely on it - libiberty is built before texinfo.
7159# Extract the first word of "makeinfo", so it can be a program name with args.
7160set dummy makeinfo; ac_word=$2
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162$as_echo_n "checking for $ac_word... " >&6; }
7163if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7164 $as_echo_n "(cached) " >&6
7165else
7166 if test -n "$MAKEINFO"; then
7167 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7168else
7169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7170for as_dir in $PATH
7171do
7172 IFS=$as_save_IFS
7173 test -z "$as_dir" && as_dir=.
7174 for ac_exec_ext in '' $ac_executable_extensions; do
7175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7176 ac_cv_prog_MAKEINFO="makeinfo"
7177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7178 break 2
7179 fi
7180done
7181 done
7182IFS=$as_save_IFS
7183
7184fi
7185fi
7186MAKEINFO=$ac_cv_prog_MAKEINFO
7187if test -n "$MAKEINFO"; then
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7189$as_echo "$MAKEINFO" >&6; }
7190else
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7192$as_echo "no" >&6; }
7193fi
7194
7195
7196if test "x$MAKEINFO" = "x"; then
7197 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7198else
7199 case "$MAKEINFO" in
7200 */missing\ makeinfo*)
7201 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7202 ;;
7203 esac
7204fi
7205
7206
7207# --split-size=5000000 may be already in $MAKEINFO from parent configure.
7208# Re-running configure in gdb/ would lose it so ensure it stays present.
7209MAKEINFOFLAGS=${MAKEINFOFLAGS---split-size=5000000}
7210
7211
7212MAKEINFO_EXTRA_FLAGS=""
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7214$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7215if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7216 $as_echo_n "(cached) " >&6
7217else
7218 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7219 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7220 gdb_cv_have_makeinfo_click=yes
7221 else
7222 gdb_cv_have_makeinfo_click=no
7223 fi
7224fi
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7226$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7227if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7228 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7229fi
7230
7231
e28b3332
DJ
7232# GDB does not use automake, but gnulib does. This line lets us
7233# generate its Makefile.in.
81ecdfbb
RW
7234am__api_version='1.11'
7235
e28b3332
DJ
7236# Find a good install program. We prefer a C program (faster),
7237# so one script is as good as another. But avoid the broken or
7238# incompatible versions:
7239# SysV /etc/install, /usr/sbin/install
7240# SunOS /usr/etc/install
7241# IRIX /sbin/install
7242# AIX /bin/install
7243# AmigaOS /C/install, which installs bootblocks on floppy discs
7244# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7245# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7246# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7247# OS/2's system install, which has a completely different semantic
7248# ./install, which can be erroneously created by make from ./install.sh.
85541719 7249# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7251$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7252if test -z "$INSTALL"; then
81ecdfbb
RW
7253if test "${ac_cv_path_install+set}" = set; then :
7254 $as_echo_n "(cached) " >&6
e28b3332
DJ
7255else
7256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259 IFS=$as_save_IFS
7260 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7261 # Account for people who put trailing slashes in PATH elements.
7262case $as_dir/ in #((
7263 ./ | .// | /[cC]/* | \
e28b3332 7264 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7265 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7266 /usr/ucb/* ) ;;
7267 *)
7268 # OSF1 and SCO ODT 3.0 have their own names for install.
7269 # Don't use installbsd from OSF since it installs stuff as root
7270 # by default.
7271 for ac_prog in ginstall scoinst install; do
7272 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7273 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7274 if test $ac_prog = install &&
7275 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7276 # AIX install. It has an incompatible calling convention.
7277 :
7278 elif test $ac_prog = install &&
7279 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7280 # program-specific install script used by HP pwplus--don't use.
7281 :
7282 else
85541719
DE
7283 rm -rf conftest.one conftest.two conftest.dir
7284 echo one > conftest.one
7285 echo two > conftest.two
7286 mkdir conftest.dir
7287 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7288 test -s conftest.one && test -s conftest.two &&
7289 test -s conftest.dir/conftest.one &&
7290 test -s conftest.dir/conftest.two
7291 then
7292 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7293 break 3
7294 fi
e28b3332
DJ
7295 fi
7296 fi
7297 done
7298 done
7299 ;;
7300esac
81ecdfbb
RW
7301
7302 done
7303IFS=$as_save_IFS
e28b3332 7304
85541719 7305rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7306
7307fi
7308 if test "${ac_cv_path_install+set}" = set; then
7309 INSTALL=$ac_cv_path_install
7310 else
85541719
DE
7311 # As a last resort, use the slow shell script. Don't cache a
7312 # value for INSTALL within a source directory, because that will
e28b3332 7313 # break other packages using the cache if that directory is
85541719 7314 # removed, or if the value is a relative name.
e28b3332
DJ
7315 INSTALL=$ac_install_sh
7316 fi
7317fi
81ecdfbb
RW
7318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7319$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7320
7321# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7322# It thinks the first close brace ends the variable substitution.
7323test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7324
7325test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7326
7327test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7328
81ecdfbb
RW
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7330$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7331# Just in case
7332sleep 1
7333echo timestamp > conftest.file
81ecdfbb
RW
7334# Reject unsafe characters in $srcdir or the absolute working directory
7335# name. Accept space and tab only in the latter.
7336am_lf='
7337'
7338case `pwd` in
7339 *[\\\"\#\$\&\'\`$am_lf]*)
7340 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7341esac
7342case $srcdir in
7343 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7344 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7345esac
7346
e28b3332
DJ
7347# Do `set' in a subshell so we don't clobber the current shell's
7348# arguments. Must try -L first in case configure is actually a
7349# symlink; some systems play weird games with the mod time of symlinks
7350# (eg FreeBSD returns the mod time of the symlink's containing
7351# directory).
7352if (
81ecdfbb 7353 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7354 if test "$*" = "X"; then
7355 # -L didn't work.
81ecdfbb 7356 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7357 fi
7358 rm -f conftest.file
7359 if test "$*" != "X $srcdir/configure conftest.file" \
7360 && test "$*" != "X conftest.file $srcdir/configure"; then
7361
7362 # If neither matched, then we have a broken ls. This can happen
7363 # if, for instance, CONFIG_SHELL is bash and it inherits a
7364 # broken ls alias from the environment. This has actually
7365 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7366 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7367alias in your environment" "$LINENO" 5
e28b3332
DJ
7368 fi
7369
7370 test "$2" = conftest.file
7371 )
7372then
7373 # Ok.
7374 :
7375else
81ecdfbb
RW
7376 as_fn_error "newly created file is older than distributed files!
7377Check your system clock" "$LINENO" 5
e28b3332 7378fi
81ecdfbb
RW
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7380$as_echo "yes" >&6; }
e28b3332 7381test "$program_prefix" != NONE &&
81ecdfbb 7382 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7383# Use a double $ so make ignores it.
7384test "$program_suffix" != NONE &&
81ecdfbb
RW
7385 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7386# Double any \ or $.
e28b3332 7387# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7388ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7389program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7390
7391# expand $ac_aux_dir to an absolute path
7392am_aux_dir=`cd $ac_aux_dir && pwd`
7393
81ecdfbb
RW
7394if test x"${MISSING+set}" != xset; then
7395 case $am_aux_dir in
7396 *\ * | *\ *)
7397 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7398 *)
7399 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7400 esac
7401fi
e28b3332
DJ
7402# Use eval to expand $SHELL
7403if eval "$MISSING --run true"; then
7404 am_missing_run="$MISSING --run "
7405else
7406 am_missing_run=
81ecdfbb
RW
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7408$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7409fi
7410
7411if test x"${install_sh}" != xset; then
7412 case $am_aux_dir in
7413 *\ * | *\ *)
7414 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7415 *)
7416 install_sh="\${SHELL} $am_aux_dir/install-sh"
7417 esac
7418fi
7419
7420# Installed binaries are usually stripped using `strip' when the user
7421# run `make install-strip'. However `strip' might not be the right
7422# tool to use in cross-compilation environments, therefore Automake
7423# will honor the `STRIP' environment variable to overrule this program.
7424if test "$cross_compiling" != no; then
7425 if test -n "$ac_tool_prefix"; then
7426 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7427set dummy ${ac_tool_prefix}strip; ac_word=$2
7428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7429$as_echo_n "checking for $ac_word... " >&6; }
7430if test "${ac_cv_prog_STRIP+set}" = set; then :
7431 $as_echo_n "(cached) " >&6
7432else
7433 if test -n "$STRIP"; then
7434 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7435else
7436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7437for as_dir in $PATH
7438do
7439 IFS=$as_save_IFS
7440 test -z "$as_dir" && as_dir=.
7441 for ac_exec_ext in '' $ac_executable_extensions; do
7442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7443 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7445 break 2
7446 fi
7447done
7448 done
7449IFS=$as_save_IFS
7450
7451fi
7452fi
7453STRIP=$ac_cv_prog_STRIP
7454if test -n "$STRIP"; then
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7456$as_echo "$STRIP" >&6; }
7457else
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459$as_echo "no" >&6; }
7460fi
7461
7462
7463fi
7464if test -z "$ac_cv_prog_STRIP"; then
7465 ac_ct_STRIP=$STRIP
7466 # Extract the first word of "strip", so it can be a program name with args.
7467set dummy strip; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7471 $as_echo_n "(cached) " >&6
7472else
7473 if test -n "$ac_ct_STRIP"; then
7474 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7475else
7476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7477for as_dir in $PATH
7478do
7479 IFS=$as_save_IFS
7480 test -z "$as_dir" && as_dir=.
7481 for ac_exec_ext in '' $ac_executable_extensions; do
7482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7483 ac_cv_prog_ac_ct_STRIP="strip"
7484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7485 break 2
7486 fi
7487done
7488 done
7489IFS=$as_save_IFS
7490
7491fi
7492fi
7493ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7494if test -n "$ac_ct_STRIP"; then
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7496$as_echo "$ac_ct_STRIP" >&6; }
7497else
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502 if test "x$ac_ct_STRIP" = x; then
7503 STRIP=":"
7504 else
7505 case $cross_compiling:$ac_tool_warned in
7506yes:)
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7509ac_tool_warned=yes ;;
7510esac
7511 STRIP=$ac_ct_STRIP
7512 fi
7513else
7514 STRIP="$ac_cv_prog_STRIP"
7515fi
7516
7517fi
7518INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7519
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7521$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7522if test -z "$MKDIR_P"; then
7523 if test "${ac_cv_path_mkdir+set}" = set; then :
7524 $as_echo_n "(cached) " >&6
7525else
7526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7528do
7529 IFS=$as_save_IFS
7530 test -z "$as_dir" && as_dir=.
7531 for ac_prog in mkdir gmkdir; do
7532 for ac_exec_ext in '' $ac_executable_extensions; do
7533 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7534 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7535 'mkdir (GNU coreutils) '* | \
7536 'mkdir (coreutils) '* | \
7537 'mkdir (fileutils) '4.1*)
7538 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7539 break 3;;
7540 esac
7541 done
7542 done
e28b3332 7543 done
81ecdfbb
RW
7544IFS=$as_save_IFS
7545
7546fi
7547
7548 if test "${ac_cv_path_mkdir+set}" = set; then
7549 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7550 else
81ecdfbb
RW
7551 # As a last resort, use the slow shell script. Don't cache a
7552 # value for MKDIR_P within a source directory, because that will
7553 # break other packages using the cache if that directory is
7554 # removed, or if the value is a relative name.
7555 test -d ./--version && rmdir ./--version
7556 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7557 fi
7558fi
81ecdfbb
RW
7559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7560$as_echo "$MKDIR_P" >&6; }
7561
f434ba03 7562
81ecdfbb
RW
7563mkdir_p="$MKDIR_P"
7564case $mkdir_p in
7565 [\\/$]* | ?:[\\/]*) ;;
7566 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7567esac
e28b3332
DJ
7568
7569for ac_prog in gawk mawk nawk awk
7570do
7571 # Extract the first word of "$ac_prog", so it can be a program name with args.
7572set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7574$as_echo_n "checking for $ac_word... " >&6; }
7575if test "${ac_cv_prog_AWK+set}" = set; then :
7576 $as_echo_n "(cached) " >&6
e28b3332
DJ
7577else
7578 if test -n "$AWK"; then
7579 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7580else
7581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582for as_dir in $PATH
7583do
7584 IFS=$as_save_IFS
7585 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7586 for ac_exec_ext in '' $ac_executable_extensions; do
7587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7588 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7590 break 2
7591 fi
7592done
81ecdfbb
RW
7593 done
7594IFS=$as_save_IFS
e28b3332
DJ
7595
7596fi
7597fi
7598AWK=$ac_cv_prog_AWK
7599if test -n "$AWK"; then
81ecdfbb
RW
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7601$as_echo "$AWK" >&6; }
e28b3332 7602else
81ecdfbb
RW
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7604$as_echo "no" >&6; }
e28b3332
DJ
7605fi
7606
81ecdfbb 7607
e28b3332
DJ
7608 test -n "$AWK" && break
7609done
7610
81ecdfbb 7611ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7612
7613
7614am_make=${MAKE-make}
7615cat > confinc << 'END'
7616am__doit:
81ecdfbb 7617 @echo this is the am__doit target
e28b3332
DJ
7618.PHONY: am__doit
7619END
7620# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7622$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7623am__include="#"
7624am__quote=
7625_am_result=none
7626# First try GNU make style include.
7627echo "include confinc" > confmf
81ecdfbb
RW
7628# Ignore all kinds of additional output from `make'.
7629case `$am_make -s -f confmf 2> /dev/null` in #(
7630*the\ am__doit\ target*)
7631 am__include=include
7632 am__quote=
7633 _am_result=GNU
7634 ;;
7635esac
e28b3332
DJ
7636# Now try BSD make style include.
7637if test "$am__include" = "#"; then
7638 echo '.include "confinc"' > confmf
81ecdfbb
RW
7639 case `$am_make -s -f confmf 2> /dev/null` in #(
7640 *the\ am__doit\ target*)
7641 am__include=.include
7642 am__quote="\""
7643 _am_result=BSD
7644 ;;
7645 esac
e28b3332
DJ
7646fi
7647
7648
81ecdfbb
RW
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7650$as_echo "$_am_result" >&6; }
e28b3332
DJ
7651rm -f confinc confmf
7652
81ecdfbb
RW
7653# Check whether --enable-dependency-tracking was given.
7654if test "${enable_dependency_tracking+set}" = set; then :
7655 enableval=$enable_dependency_tracking;
7656fi
e28b3332 7657
e28b3332
DJ
7658if test "x$enable_dependency_tracking" != xno; then
7659 am_depcomp="$ac_aux_dir/depcomp"
7660 AMDEPBACKSLASH='\'
7661fi
81ecdfbb 7662 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7663 AMDEP_TRUE=
7664 AMDEP_FALSE='#'
7665else
7666 AMDEP_TRUE='#'
7667 AMDEP_FALSE=
7668fi
7669
7670
81ecdfbb
RW
7671if test "`cd $srcdir && pwd`" != "`pwd`"; then
7672 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7673 # is not polluted with repeated "-I."
7674 am__isrc=' -I$(srcdir)'
7675 # test to see if srcdir already configured
7676 if test -f $srcdir/config.status; then
7677 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7678 fi
e28b3332
DJ
7679fi
7680
7681# test whether we have cygpath
7682if test -z "$CYGPATH_W"; then
7683 if (cygpath --version) >/dev/null 2>/dev/null; then
7684 CYGPATH_W='cygpath -w'
7685 else
7686 CYGPATH_W=echo
7687 fi
7688fi
7689
7690
7691# Define the identity of the package.
7692 PACKAGE=gdb
7693 VERSION=UNUSED-VERSION
7694
7695
7696# Some tools Automake needs.
7697
7698ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7699
7700
7701AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7702
7703
7704AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7705
7706
7707AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7708
7709
7710MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7711
e28b3332
DJ
7712# We need awk for the "check" target. The system "awk" is bad on
7713# some platforms.
7714# Always define AMTAR for backward compatibility.
7715
7716AMTAR=${AMTAR-"${am_missing_run}tar"}
7717
7718am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7719
7720
7721
7722
7723depcc="$CC" am_compiler_list=
7724
81ecdfbb
RW
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7726$as_echo_n "checking dependency style of $depcc... " >&6; }
7727if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7728 $as_echo_n "(cached) " >&6
e28b3332
DJ
7729else
7730 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7731 # We make a subdir and do the tests there. Otherwise we can end up
7732 # making bogus files that we don't know about and never remove. For
7733 # instance it was reported that on HP-UX the gcc test will end up
7734 # making a dummy file named `D' -- because `-MD' means `put the output
7735 # in D'.
7736 mkdir conftest.dir
7737 # Copy depcomp to subdir because otherwise we won't find it if we're
7738 # using a relative directory.
7739 cp "$am_depcomp" conftest.dir
7740 cd conftest.dir
7741 # We will build objects and dependencies in a subdirectory because
7742 # it helps to detect inapplicable dependency modes. For instance
7743 # both Tru64's cc and ICC support -MD to output dependencies as a
7744 # side effect of compilation, but ICC will put the dependencies in
7745 # the current directory while Tru64 will put them in the object
7746 # directory.
7747 mkdir sub
7748
7749 am_cv_CC_dependencies_compiler_type=none
7750 if test "$am_compiler_list" = ""; then
7751 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7752 fi
81ecdfbb
RW
7753 am__universal=false
7754 case " $depcc " in #(
7755 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7756 esac
7757
e28b3332
DJ
7758 for depmode in $am_compiler_list; do
7759 # Setup a source with many dependencies, because some compilers
7760 # like to wrap large dependency lists on column 80 (with \), and
7761 # we should not choose a depcomp mode which is confused by this.
7762 #
7763 # We need to recreate these files for each test, as the compiler may
7764 # overwrite some of them when testing with obscure command lines.
7765 # This happens at least with the AIX C compiler.
7766 : > sub/conftest.c
7767 for i in 1 2 3 4 5 6; do
7768 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7769 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7770 # Solaris 8's {/usr,}/bin/sh.
7771 touch sub/conftst$i.h
7772 done
7773 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7774
81ecdfbb
RW
7775 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7776 # mode. It turns out that the SunPro C++ compiler does not properly
7777 # handle `-M -o', and we need to detect this. Also, some Intel
7778 # versions had trouble with output in subdirs
7779 am__obj=sub/conftest.${OBJEXT-o}
7780 am__minus_obj="-o $am__obj"
e28b3332 7781 case $depmode in
81ecdfbb
RW
7782 gcc)
7783 # This depmode causes a compiler race in universal mode.
7784 test "$am__universal" = false || continue
7785 ;;
e28b3332
DJ
7786 nosideeffect)
7787 # after this tag, mechanisms are not by side-effect, so they'll
7788 # only be used when explicitly requested
7789 if test "x$enable_dependency_tracking" = xyes; then
7790 continue
7791 else
7792 break
7793 fi
7794 ;;
81ecdfbb
RW
7795 msvisualcpp | msvcmsys)
7796 # This compiler won't grok `-c -o', but also, the minuso test has
7797 # not run yet. These depmodes are late enough in the game, and
7798 # so weak that their functioning should not be impacted.
7799 am__obj=conftest.${OBJEXT-o}
7800 am__minus_obj=
7801 ;;
e28b3332
DJ
7802 none) break ;;
7803 esac
e28b3332 7804 if depmode=$depmode \
81ecdfbb 7805 source=sub/conftest.c object=$am__obj \
e28b3332 7806 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7807 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7808 >/dev/null 2>conftest.err &&
81ecdfbb 7809 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7810 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7811 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7812 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7813 # icc doesn't choke on unknown options, it will just issue warnings
7814 # or remarks (even with -Werror). So we grep stderr for any message
7815 # that says an option was ignored or not supported.
7816 # When given -MP, icc 7.0 and 7.1 complain thusly:
7817 # icc: Command line warning: ignoring option '-M'; no argument required
7818 # The diagnosis changed in icc 8.0:
7819 # icc: Command line remark: option '-MP' not supported
7820 if (grep 'ignoring option' conftest.err ||
7821 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7822 am_cv_CC_dependencies_compiler_type=$depmode
7823 break
7824 fi
7825 fi
7826 done
7827
7828 cd ..
7829 rm -rf conftest.dir
7830else
7831 am_cv_CC_dependencies_compiler_type=none
7832fi
7833
7834fi
81ecdfbb
RW
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7836$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7837CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7838
81ecdfbb 7839 if
e28b3332
DJ
7840 test "x$enable_dependency_tracking" != xno \
7841 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7842 am__fastdepCC_TRUE=
7843 am__fastdepCC_FALSE='#'
7844else
7845 am__fastdepCC_TRUE='#'
7846 am__fastdepCC_FALSE=
7847fi
7848
7849
7850
7851
bec39cab
AC
7852
7853
81ecdfbb
RW
7854# Check whether --with-separate-debug-dir was given.
7855if test "${with_separate_debug_dir+set}" = set; then :
7856 withval=$with_separate_debug_dir;
b14b1491
TT
7857 DEBUGDIR=$withval
7858else
7859 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7860fi
7861
20e95c23 7862
783e057b
DJ
7863 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7864 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7865 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7866 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7867
783e057b
DJ
7868cat >>confdefs.h <<_ACEOF
7869#define DEBUGDIR "$ac_define_dir"
20e95c23 7870_ACEOF
20e95c23 7871
20e95c23 7872
20e95c23 7873
0c4a4063 7874
b14b1491
TT
7875 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7876 if test "x$prefix" = xNONE; then
7877 test_prefix=/usr/local
7878 else
7879 test_prefix=$prefix
7880 fi
783e057b 7881 else
b14b1491 7882 test_prefix=$exec_prefix
783e057b 7883 fi
b14b1491
TT
7884 value=0
7885 case ${ac_define_dir} in
7886 "${test_prefix}"|"${test_prefix}/"*|\
7887 '${exec_prefix}'|'${exec_prefix}/'*)
7888 value=1
7889 ;;
7890 esac
7891
7892cat >>confdefs.h <<_ACEOF
7893#define DEBUGDIR_RELOCATABLE $value
7894_ACEOF
7895
7896
7897
0c4a4063 7898
b14b1491
TT
7899# GDB's datadir relocation
7900
7901
7902
81ecdfbb
RW
7903# Check whether --with-gdb-datadir was given.
7904if test "${with_gdb_datadir+set}" = set; then :
7905 withval=$with_gdb_datadir;
b14b1491 7906 GDB_DATADIR=$withval
20e95c23 7907else
b14b1491 7908 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7909fi
7910
20e95c23 7911
b14b1491
TT
7912 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7913 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7914 ac_define_dir=`eval echo $GDB_DATADIR`
7915 ac_define_dir=`eval echo $ac_define_dir`
7916
7917cat >>confdefs.h <<_ACEOF
7918#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7919_ACEOF
7920
b14b1491
TT
7921
7922
0c4a4063 7923
b14b1491
TT
7924 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7925 if test "x$prefix" = xNONE; then
7926 test_prefix=/usr/local
7927 else
7928 test_prefix=$prefix
7929 fi
7930 else
7931 test_prefix=$exec_prefix
7932 fi
7933 value=0
7934 case ${ac_define_dir} in
7935 "${test_prefix}"|"${test_prefix}/"*|\
7936 '${exec_prefix}'|'${exec_prefix}/'*)
7937 value=1
7938 ;;
7939 esac
7940
7941cat >>confdefs.h <<_ACEOF
7942#define GDB_DATADIR_RELOCATABLE $value
7943_ACEOF
7944
7945
783e057b 7946
20e95c23 7947
0c4a4063 7948
81ecdfbb
RW
7949# Check whether --with-relocated-sources was given.
7950if test "${with_relocated_sources+set}" = set; then :
7951 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7952
7953 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7954 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7955 ac_define_dir=`eval echo $reloc_srcdir`
7956 ac_define_dir=`eval echo $ac_define_dir`
7957
7958cat >>confdefs.h <<_ACEOF
7959#define RELOC_SRCDIR "$ac_define_dir"
7960_ACEOF
7961
7962
7963
81ecdfbb
RW
7964fi
7965
29b0e8a2
JM
7966
7967
20e95c23 7968
5ae98d25 7969subdirs="$subdirs testsuite"
20e95c23
DJ
7970
7971
783e057b 7972# Check whether to support alternative target configurations
81ecdfbb
RW
7973# Check whether --enable-targets was given.
7974if test "${enable_targets+set}" = set; then :
7975 enableval=$enable_targets; case "${enableval}" in
7976 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7977 ;;
7978 no) enable_targets= ;;
7979 *) enable_targets=$enableval ;;
7980esac
81ecdfbb
RW
7981fi
7982
20e95c23 7983
783e057b 7984# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7985# Check whether --enable-64-bit-bfd was given.
7986if test "${enable_64_bit_bfd+set}" = set; then :
7987 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7988 yes) want64=true ;;
7989 no) want64=false ;;
81ecdfbb 7990 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7991esac
7992else
7993 want64=false
81ecdfbb
RW
7994fi
7995
783e057b
DJ
7996# Provide defaults for some variables set by the per-host and per-target
7997# configuration.
7998gdb_host_obs=posix-hdep.o
20e95c23 7999
783e057b
DJ
8000if test "${target}" = "${host}"; then
8001 gdb_native=yes
8002else
8003 gdb_native=no
8004fi
20e95c23 8005
783e057b 8006. $srcdir/configure.host
20e95c23 8007
783e057b 8008# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 8009
783e057b
DJ
8010TARGET_OBS=
8011all_targets=
20e95c23 8012
783e057b 8013for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 8014do
783e057b
DJ
8015 if test "$targ_alias" = "all"; then
8016 all_targets=true
8017 else
8018 # Canonicalize the secondary target names.
8019 result=`$ac_config_sub $targ_alias 2>/dev/null`
8020 if test -n "$result"; then
8021 targ=$result
8022 else
8023 targ=$targ_alias
8024 fi
20e95c23 8025
783e057b 8026 . ${srcdir}/configure.tgt
20e95c23 8027
bf307134
JB
8028 if test -z "${gdb_target_obs}"; then :
8029 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8030fi
8031
783e057b
DJ
8032 # Target-specific object files
8033 for i in ${gdb_target_obs}; do
8034 case " $TARGET_OBS " in
8035 *" ${i} "*) ;;
8036 *)
8037 TARGET_OBS="$TARGET_OBS ${i}"
8038 ;;
8039 esac
8040 done
20e95c23 8041
783e057b
DJ
8042 # Check whether this target needs 64-bit CORE_ADDR
8043 if test x${want64} = xfalse; then
8044 . ${srcdir}/../bfd/config.bfd
8045 fi
8046 fi
20e95c23
DJ
8047done
8048
783e057b
DJ
8049if test x${all_targets} = xtrue; then
8050
8051 # We want all 64-bit targets if we either:
8052 # - run on a 64-bit host or
8053 # - already require 64-bit support for some other target or
8054 # - the --enable-64-bit-bfd option was supplied
8055 # Otherwise we only support all 32-bit targets.
8056 #
8057 # NOTE: This test must be in sync with the corresponding
8058 # tests in BFD!
20e95c23 8059
783e057b 8060 if test x${want64} = xfalse; then
81ecdfbb
RW
8061 # The cast to long int works around a bug in the HP C Compiler
8062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064# This bug is HP SR number 8606223364.
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8066$as_echo_n "checking size of long... " >&6; }
8067if test "${ac_cv_sizeof_long+set}" = set; then :
8068 $as_echo_n "(cached) " >&6
c0993dbe 8069else
81ecdfbb 8070 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8071
81ecdfbb
RW
8072else
8073 if test "$ac_cv_type_long" = yes; then
8074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8076{ as_fn_set_status 77
8077as_fn_error "cannot compute sizeof (long)
8078See \`config.log' for more details." "$LINENO" 5; }; }
8079 else
8080 ac_cv_sizeof_long=0
8081 fi
c0993dbe 8082fi
81ecdfbb 8083
c0993dbe 8084fi
81ecdfbb
RW
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8086$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8087
c0993dbe 8088
c0993dbe 8089
c0993dbe
UW
8090cat >>confdefs.h <<_ACEOF
8091#define SIZEOF_LONG $ac_cv_sizeof_long
8092_ACEOF
8093
8094
8095 if test "x${ac_cv_sizeof_long}" = "x8"; then
8096 want64=true
8097 fi
8098 fi
8099 if test x${want64} = xtrue; then
8100 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8101 else
8102 TARGET_OBS='$(ALL_TARGET_OBS)'
8103 fi
8104fi
8105
8106
8107
8108# For other settings, only the main target counts.
8109gdb_sim=
8110gdb_osabi=
8111build_gdbserver=
8112targ=$target; . ${srcdir}/configure.tgt
8113
8114# Fetch the default architecture and default target vector from BFD.
8115targ=$target; . $srcdir/../bfd/config.bfd
8116
8117# We only want the first architecture, so strip off the others if
8118# there is more than one.
8119targ_archs=`echo $targ_archs | sed 's/ .*//'`
8120
8121if test "x$targ_archs" != x; then
8122
8123cat >>confdefs.h <<_ACEOF
8124#define DEFAULT_BFD_ARCH $targ_archs
8125_ACEOF
8126
8127fi
8128if test "x$targ_defvec" != x; then
8129
8130cat >>confdefs.h <<_ACEOF
8131#define DEFAULT_BFD_VEC $targ_defvec
8132_ACEOF
8133
8134fi
8135
c0993dbe
UW
8136# The CLI cannot be disabled yet, but may be in the future.
8137
8138# Enable CLI.
81ecdfbb
RW
8139# Check whether --enable-gdbcli was given.
8140if test "${enable_gdbcli+set}" = set; then :
8141 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8142 yes)
8143 ;;
8144 no)
81ecdfbb 8145 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8146 *)
81ecdfbb 8147 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8148 esac
8149else
8150 enable_gdbcli=yes
81ecdfbb
RW
8151fi
8152
c0993dbe
UW
8153if test x"$enable_gdbcli" = xyes; then
8154 if test -d $srcdir/cli; then
8155 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8156 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8157 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8158 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8159 fi
8160fi
8161
8162# Enable MI.
81ecdfbb
RW
8163# Check whether --enable-gdbmi was given.
8164if test "${enable_gdbmi+set}" = set; then :
8165 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8166 yes | no)
8167 ;;
8168 *)
81ecdfbb 8169 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8170 esac
8171else
8172 enable_gdbmi=yes
81ecdfbb
RW
8173fi
8174
c0993dbe
UW
8175if test x"$enable_gdbmi" = xyes; then
8176 if test -d $srcdir/mi; then
8177 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8178 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8179 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8180 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8181 fi
8182fi
8183
8184# Enable TUI.
81ecdfbb
RW
8185# Check whether --enable-tui was given.
8186if test "${enable_tui+set}" = set; then :
8187 enableval=$enable_tui; case $enableval in
3ca64bd3 8188 yes | no | auto)
c0993dbe
UW
8189 ;;
8190 *)
81ecdfbb 8191 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8192 esac
8193else
3ca64bd3 8194 enable_tui=auto
81ecdfbb
RW
8195fi
8196
c0993dbe
UW
8197
8198# Enable gdbtk.
81ecdfbb
RW
8199# Check whether --enable-gdbtk was given.
8200if test "${enable_gdbtk+set}" = set; then :
8201 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8202 yes | no)
8203 ;;
8204 *)
81ecdfbb 8205 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8206 esac
8207else
5062cc19 8208 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8209 enable_gdbtk=yes
8210 else
8211 enable_gdbtk=no
8212 fi
81ecdfbb
RW
8213fi
8214
c0993dbe
UW
8215# We unconditionally disable gdbtk tests on selected platforms.
8216case $host_os in
8217 go32* | windows*)
81ecdfbb
RW
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8219$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8220 enable_gdbtk=no ;;
8221esac
8222
8223# Libunwind support.
bec39cab 8224
81ecdfbb
RW
8225# Check whether --with-libunwind was given.
8226if test "${with_libunwind+set}" = set; then :
8227 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8228 yes) enable_libunwind=yes ;;
8229 no) enable_libunwind=no ;;
81ecdfbb 8230 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8231esac
bec39cab 8232else
bec39cab 8233
81ecdfbb
RW
8234 for ac_header in libunwind.h libunwind-ia64.h
8235do :
8236 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8237ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8238eval as_val=\$$as_ac_Header
8239 if test "x$as_val" = x""yes; then :
bec39cab 8240 cat >>confdefs.h <<_ACEOF
81ecdfbb 8241#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8242_ACEOF
8243
8244fi
8245
8246done
8247
a9322a30
TT
8248 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8249 enable_libunwind=yes;
8250 fi
8251
bec39cab 8252fi
bec39cab 8253
bec39cab 8254
81ecdfbb
RW
8255if test x"$enable_libunwind" = xyes; then
8256 for ac_header in libunwind.h libunwind-ia64.h
8257do :
8258 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8259ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8260eval as_val=\$$as_ac_Header
8261 if test "x$as_val" = x""yes; then :
bec39cab 8262 cat >>confdefs.h <<_ACEOF
81ecdfbb 8263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8264_ACEOF
8265
8266fi
8267
8268done
8269
bec39cab 8270
81ecdfbb 8271$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8272
8273 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8274 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8275 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8276fi
8277
cb01cfba
JB
8278opt_curses=no
8279
81ecdfbb
RW
8280# Check whether --with-curses was given.
8281if test "${with_curses+set}" = set; then :
8282 withval=$with_curses; opt_curses=$withval
8283fi
8284
cb01cfba 8285
76a39ba7 8286prefer_curses=no
cb01cfba 8287if test "$opt_curses" = "yes"; then
76a39ba7 8288 prefer_curses=yes
cb01cfba
JB
8289fi
8290
a9322a30 8291# Profiling support.
81ecdfbb
RW
8292# Check whether --enable-profiling was given.
8293if test "${enable_profiling+set}" = set; then :
8294 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8295 yes | no)
8296 ;;
8297 *)
81ecdfbb 8298 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8299 esac
8300else
8301 enable_profiling=no
81ecdfbb 8302fi
bec39cab 8303
a9322a30
TT
8304
8305for ac_func in monstartup _mcleanup
81ecdfbb
RW
8306do :
8307 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8308ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8309eval as_val=\$$as_ac_var
8310 if test "x$as_val" = x""yes; then :
8311 cat >>confdefs.h <<_ACEOF
8312#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8313_ACEOF
a9322a30 8314
81ecdfbb
RW
8315fi
8316done
a9322a30 8317
81ecdfbb
RW
8318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8319$as_echo_n "checking for _etext... " >&6; }
8320if test "${ac_cv_var__etext+set}" = set; then :
8321 $as_echo_n "(cached) " >&6
8322else
8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8324/* end confdefs.h. */
8325#include <stdlib.h>
8326extern char _etext;
a9322a30
TT
8327
8328int
8329main ()
8330{
8331free (&_etext);
8332 ;
8333 return 0;
8334}
bec39cab 8335_ACEOF
81ecdfbb 8336if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8337 ac_cv_var__etext=yes
bec39cab 8338else
81ecdfbb 8339 ac_cv_var__etext=no
bec39cab 8340fi
81ecdfbb
RW
8341rm -f core conftest.err conftest.$ac_objext \
8342 conftest$ac_exeext conftest.$ac_ext
bec39cab 8343fi
81ecdfbb
RW
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8345$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8346if test $ac_cv_var__etext = yes; then
60ca704f 8347
81ecdfbb 8348$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8349
bec39cab 8350fi
81ecdfbb
RW
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8352$as_echo_n "checking for etext... " >&6; }
8353if test "${ac_cv_var_etext+set}" = set; then :
8354 $as_echo_n "(cached) " >&6
bec39cab 8355else
81ecdfbb 8356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8357/* end confdefs.h. */
a9322a30
TT
8358#include <stdlib.h>
8359extern char etext;
bec39cab
AC
8360
8361int
8362main ()
8363{
a9322a30 8364free (&etext);
bec39cab
AC
8365 ;
8366 return 0;
8367}
8368_ACEOF
81ecdfbb 8369if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8370 ac_cv_var_etext=yes
bec39cab 8371else
81ecdfbb 8372 ac_cv_var_etext=no
bec39cab 8373fi
81ecdfbb
RW
8374rm -f core conftest.err conftest.$ac_objext \
8375 conftest$ac_exeext conftest.$ac_ext
bec39cab 8376fi
81ecdfbb
RW
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8378$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8379if test $ac_cv_var_etext = yes; then
8380
81ecdfbb 8381$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8382
8383fi
a9322a30
TT
8384if test "$enable_profiling" = yes ; then
8385 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8386 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8387 fi
8388 PROFILE_CFLAGS=-pg
8389 OLD_CFLAGS="$CFLAGS"
8390 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8391
81ecdfbb
RW
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8393$as_echo_n "checking whether $CC supports -pg... " >&6; }
8394if test "${ac_cv_cc_supports_pg+set}" = set; then :
8395 $as_echo_n "(cached) " >&6
bec39cab 8396else
81ecdfbb 8397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8398/* end confdefs.h. */
bec39cab
AC
8399
8400int
8401main ()
8402{
a9322a30 8403int x;
bec39cab
AC
8404 ;
8405 return 0;
8406}
8407_ACEOF
81ecdfbb 8408if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8409 ac_cv_cc_supports_pg=yes
bec39cab 8410else
81ecdfbb 8411 ac_cv_cc_supports_pg=no
bec39cab 8412fi
81ecdfbb 8413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8414fi
81ecdfbb
RW
8415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8416$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8417
a9322a30 8418 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8419 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8420 fi
bec39cab 8421
a9322a30 8422 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8423fi
8424
c16158bc
JM
8425
8426
81ecdfbb
RW
8427# Check whether --with-pkgversion was given.
8428if test "${with_pkgversion+set}" = set; then :
8429 withval=$with_pkgversion; case "$withval" in
8430 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8431 no) PKGVERSION= ;;
8432 *) PKGVERSION="($withval) " ;;
8433 esac
8434else
8435 PKGVERSION="(GDB) "
8436
81ecdfbb 8437fi
c16158bc
JM
8438
8439
8440
8441
81ecdfbb
RW
8442
8443# Check whether --with-bugurl was given.
8444if test "${with_bugurl+set}" = set; then :
8445 withval=$with_bugurl; case "$withval" in
8446 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8447 no) BUGURL=
8448 ;;
8449 *) BUGURL="$withval"
8450 ;;
8451 esac
8452else
8453 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8454
81ecdfbb
RW
8455fi
8456
c16158bc
JM
8457 case ${BUGURL} in
8458 "")
8459 REPORT_BUGS_TO=
8460 REPORT_BUGS_TEXI=
8461 ;;
8462 *)
8463 REPORT_BUGS_TO="<$BUGURL>"
8464 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8465 ;;
8466 esac;
8467
8468
8469
8470
8471cat >>confdefs.h <<_ACEOF
8472#define PKGVERSION "$PKGVERSION"
8473_ACEOF
8474
8475
8476cat >>confdefs.h <<_ACEOF
8477#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8478_ACEOF
8479
8480
bec39cab
AC
8481# --------------------- #
8482# Checks for programs. #
8483# --------------------- #
8484
8485for ac_prog in gawk mawk nawk awk
8486do
8487 # Extract the first word of "$ac_prog", so it can be a program name with args.
8488set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if test "${ac_cv_prog_AWK+set}" = set; then :
8492 $as_echo_n "(cached) " >&6
bec39cab
AC
8493else
8494 if test -n "$AWK"; then
8495 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8496else
8497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500 IFS=$as_save_IFS
8501 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8502 for ac_exec_ext in '' $ac_executable_extensions; do
8503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8504 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8506 break 2
8507 fi
8508done
81ecdfbb
RW
8509 done
8510IFS=$as_save_IFS
bec39cab
AC
8511
8512fi
8513fi
8514AWK=$ac_cv_prog_AWK
8515if test -n "$AWK"; then
81ecdfbb
RW
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8517$as_echo "$AWK" >&6; }
bec39cab 8518else
81ecdfbb
RW
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520$as_echo "no" >&6; }
bec39cab
AC
8521fi
8522
bec39cab 8523
81ecdfbb 8524 test -n "$AWK" && break
bec39cab
AC
8525done
8526
bec39cab 8527
81ecdfbb
RW
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8529$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8530LN_S=$as_ln_s
8531if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8533$as_echo "yes" >&6; }
bec39cab 8534else
81ecdfbb
RW
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8536$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8537fi
8538
8539if test -n "$ac_tool_prefix"; then
8540 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8541set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543$as_echo_n "checking for $ac_word... " >&6; }
8544if test "${ac_cv_prog_RANLIB+set}" = set; then :
8545 $as_echo_n "(cached) " >&6
bec39cab
AC
8546else
8547 if test -n "$RANLIB"; then
8548 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8549else
8550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553 IFS=$as_save_IFS
8554 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8555 for ac_exec_ext in '' $ac_executable_extensions; do
8556 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8557 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8559 break 2
8560 fi
8561done
81ecdfbb
RW
8562 done
8563IFS=$as_save_IFS
bec39cab
AC
8564
8565fi
8566fi
8567RANLIB=$ac_cv_prog_RANLIB
8568if test -n "$RANLIB"; then
81ecdfbb
RW
8569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8570$as_echo "$RANLIB" >&6; }
bec39cab 8571else
81ecdfbb
RW
8572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
bec39cab
AC
8574fi
8575
81ecdfbb 8576
bec39cab
AC
8577fi
8578if test -z "$ac_cv_prog_RANLIB"; then
8579 ac_ct_RANLIB=$RANLIB
8580 # Extract the first word of "ranlib", so it can be a program name with args.
8581set dummy ranlib; ac_word=$2
81ecdfbb
RW
8582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8583$as_echo_n "checking for $ac_word... " >&6; }
8584if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8585 $as_echo_n "(cached) " >&6
bec39cab
AC
8586else
8587 if test -n "$ac_ct_RANLIB"; then
8588 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8589else
8590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593 IFS=$as_save_IFS
8594 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8595 for ac_exec_ext in '' $ac_executable_extensions; do
8596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8597 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8599 break 2
8600 fi
8601done
81ecdfbb
RW
8602 done
8603IFS=$as_save_IFS
bec39cab 8604
bec39cab
AC
8605fi
8606fi
8607ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8608if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8610$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8611else
81ecdfbb
RW
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8613$as_echo "no" >&6; }
bec39cab
AC
8614fi
8615
81ecdfbb
RW
8616 if test "x$ac_ct_RANLIB" = x; then
8617 RANLIB=":"
8618 else
8619 case $cross_compiling:$ac_tool_warned in
8620yes:)
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8623ac_tool_warned=yes ;;
8624esac
8625 RANLIB=$ac_ct_RANLIB
8626 fi
bec39cab
AC
8627else
8628 RANLIB="$ac_cv_prog_RANLIB"
8629fi
8630
8631for ac_prog in 'bison -y' byacc
8632do
8633 # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if test "${ac_cv_prog_YACC+set}" = set; then :
8638 $as_echo_n "(cached) " >&6
bec39cab
AC
8639else
8640 if test -n "$YACC"; then
8641 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8642else
8643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8644for as_dir in $PATH
8645do
8646 IFS=$as_save_IFS
8647 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8648 for ac_exec_ext in '' $ac_executable_extensions; do
8649 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8650 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8652 break 2
8653 fi
8654done
81ecdfbb
RW
8655 done
8656IFS=$as_save_IFS
bec39cab
AC
8657
8658fi
8659fi
8660YACC=$ac_cv_prog_YACC
8661if test -n "$YACC"; then
81ecdfbb
RW
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8663$as_echo "$YACC" >&6; }
bec39cab 8664else
81ecdfbb
RW
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
bec39cab
AC
8667fi
8668
81ecdfbb 8669
bec39cab
AC
8670 test -n "$YACC" && break
8671done
8672test -n "$YACC" || YACC="yacc"
8673
8674
8675if test -n "$ac_tool_prefix"; then
8676 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8677set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679$as_echo_n "checking for $ac_word... " >&6; }
8680if test "${ac_cv_prog_AR+set}" = set; then :
8681 $as_echo_n "(cached) " >&6
bec39cab
AC
8682else
8683 if test -n "$AR"; then
8684 ac_cv_prog_AR="$AR" # Let the user override the test.
8685else
8686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689 IFS=$as_save_IFS
8690 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8691 for ac_exec_ext in '' $ac_executable_extensions; do
8692 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8693 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8695 break 2
8696 fi
8697done
81ecdfbb
RW
8698 done
8699IFS=$as_save_IFS
bec39cab
AC
8700
8701fi
8702fi
8703AR=$ac_cv_prog_AR
8704if test -n "$AR"; then
81ecdfbb
RW
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8706$as_echo "$AR" >&6; }
bec39cab 8707else
81ecdfbb
RW
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
bec39cab
AC
8710fi
8711
81ecdfbb 8712
bec39cab
AC
8713fi
8714if test -z "$ac_cv_prog_AR"; then
8715 ac_ct_AR=$AR
8716 # Extract the first word of "ar", so it can be a program name with args.
8717set dummy ar; ac_word=$2
81ecdfbb
RW
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719$as_echo_n "checking for $ac_word... " >&6; }
8720if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8721 $as_echo_n "(cached) " >&6
bec39cab
AC
8722else
8723 if test -n "$ac_ct_AR"; then
8724 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8725else
8726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727for as_dir in $PATH
8728do
8729 IFS=$as_save_IFS
8730 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8731 for ac_exec_ext in '' $ac_executable_extensions; do
8732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8733 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8735 break 2
8736 fi
8737done
81ecdfbb
RW
8738 done
8739IFS=$as_save_IFS
bec39cab
AC
8740
8741fi
8742fi
8743ac_ct_AR=$ac_cv_prog_ac_ct_AR
8744if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8746$as_echo "$ac_ct_AR" >&6; }
bec39cab 8747else
81ecdfbb
RW
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749$as_echo "no" >&6; }
bec39cab
AC
8750fi
8751
81ecdfbb
RW
8752 if test "x$ac_ct_AR" = x; then
8753 AR=""
8754 else
8755 case $cross_compiling:$ac_tool_warned in
8756yes:)
8757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8759ac_tool_warned=yes ;;
8760esac
8761 AR=$ac_ct_AR
8762 fi
bec39cab
AC
8763else
8764 AR="$ac_cv_prog_AR"
8765fi
8766
8767if test -n "$ac_tool_prefix"; then
8768 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8769set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8771$as_echo_n "checking for $ac_word... " >&6; }
8772if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8773 $as_echo_n "(cached) " >&6
bec39cab
AC
8774else
8775 if test -n "$DLLTOOL"; then
8776 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8777else
8778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8779for as_dir in $PATH
8780do
8781 IFS=$as_save_IFS
8782 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8783 for ac_exec_ext in '' $ac_executable_extensions; do
8784 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8785 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8787 break 2
8788 fi
8789done
81ecdfbb
RW
8790 done
8791IFS=$as_save_IFS
bec39cab
AC
8792
8793fi
8794fi
8795DLLTOOL=$ac_cv_prog_DLLTOOL
8796if test -n "$DLLTOOL"; then
81ecdfbb
RW
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8798$as_echo "$DLLTOOL" >&6; }
bec39cab 8799else
81ecdfbb
RW
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8801$as_echo "no" >&6; }
bec39cab
AC
8802fi
8803
81ecdfbb 8804
bec39cab
AC
8805fi
8806if test -z "$ac_cv_prog_DLLTOOL"; then
8807 ac_ct_DLLTOOL=$DLLTOOL
8808 # Extract the first word of "dlltool", so it can be a program name with args.
8809set dummy dlltool; ac_word=$2
81ecdfbb
RW
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8813 $as_echo_n "(cached) " >&6
bec39cab
AC
8814else
8815 if test -n "$ac_ct_DLLTOOL"; then
8816 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8817else
8818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821 IFS=$as_save_IFS
8822 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8823 for ac_exec_ext in '' $ac_executable_extensions; do
8824 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8825 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8827 break 2
8828 fi
8829done
81ecdfbb
RW
8830 done
8831IFS=$as_save_IFS
bec39cab
AC
8832
8833fi
8834fi
8835ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8836if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8838$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8839else
81ecdfbb
RW
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841$as_echo "no" >&6; }
bec39cab
AC
8842fi
8843
81ecdfbb
RW
8844 if test "x$ac_ct_DLLTOOL" = x; then
8845 DLLTOOL=""
8846 else
8847 case $cross_compiling:$ac_tool_warned in
8848yes:)
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8851ac_tool_warned=yes ;;
8852esac
8853 DLLTOOL=$ac_ct_DLLTOOL
8854 fi
bec39cab
AC
8855else
8856 DLLTOOL="$ac_cv_prog_DLLTOOL"
8857fi
8858
8859if test -n "$ac_tool_prefix"; then
8860 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8861set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863$as_echo_n "checking for $ac_word... " >&6; }
8864if test "${ac_cv_prog_WINDRES+set}" = set; then :
8865 $as_echo_n "(cached) " >&6
bec39cab
AC
8866else
8867 if test -n "$WINDRES"; then
8868 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8869else
8870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8871for as_dir in $PATH
8872do
8873 IFS=$as_save_IFS
8874 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8875 for ac_exec_ext in '' $ac_executable_extensions; do
8876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8877 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8879 break 2
8880 fi
8881done
81ecdfbb
RW
8882 done
8883IFS=$as_save_IFS
bec39cab
AC
8884
8885fi
8886fi
8887WINDRES=$ac_cv_prog_WINDRES
8888if test -n "$WINDRES"; then
81ecdfbb
RW
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8890$as_echo "$WINDRES" >&6; }
bec39cab 8891else
81ecdfbb
RW
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893$as_echo "no" >&6; }
bec39cab
AC
8894fi
8895
81ecdfbb 8896
bec39cab
AC
8897fi
8898if test -z "$ac_cv_prog_WINDRES"; then
8899 ac_ct_WINDRES=$WINDRES
8900 # Extract the first word of "windres", so it can be a program name with args.
8901set dummy windres; ac_word=$2
81ecdfbb
RW
8902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8903$as_echo_n "checking for $ac_word... " >&6; }
8904if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8905 $as_echo_n "(cached) " >&6
bec39cab
AC
8906else
8907 if test -n "$ac_ct_WINDRES"; then
8908 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8909else
8910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8911for as_dir in $PATH
8912do
8913 IFS=$as_save_IFS
8914 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8915 for ac_exec_ext in '' $ac_executable_extensions; do
8916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8917 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8919 break 2
8920 fi
8921done
81ecdfbb
RW
8922 done
8923IFS=$as_save_IFS
bec39cab
AC
8924
8925fi
8926fi
8927ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8928if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8930$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8931else
81ecdfbb
RW
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8933$as_echo "no" >&6; }
c906108c 8934fi
bec39cab 8935
81ecdfbb
RW
8936 if test "x$ac_ct_WINDRES" = x; then
8937 WINDRES=""
8938 else
8939 case $cross_compiling:$ac_tool_warned in
8940yes:)
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8943ac_tool_warned=yes ;;
8944esac
8945 WINDRES=$ac_ct_WINDRES
8946 fi
c906108c 8947else
bec39cab 8948 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8949fi
8950
bec39cab
AC
8951
8952# Needed for GNU/Hurd.
8953if test -n "$ac_tool_prefix"; then
8954 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8955set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957$as_echo_n "checking for $ac_word... " >&6; }
8958if test "${ac_cv_prog_MIG+set}" = set; then :
8959 $as_echo_n "(cached) " >&6
c906108c 8960else
bec39cab
AC
8961 if test -n "$MIG"; then
8962 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8963else
8964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967 IFS=$as_save_IFS
8968 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8969 for ac_exec_ext in '' $ac_executable_extensions; do
8970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8971 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8973 break 2
8974 fi
8975done
81ecdfbb
RW
8976 done
8977IFS=$as_save_IFS
bec39cab 8978
c906108c 8979fi
bec39cab
AC
8980fi
8981MIG=$ac_cv_prog_MIG
8982if test -n "$MIG"; then
81ecdfbb
RW
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8984$as_echo "$MIG" >&6; }
c906108c 8985else
81ecdfbb
RW
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8987$as_echo "no" >&6; }
c906108c
SS
8988fi
8989
81ecdfbb 8990
bec39cab
AC
8991fi
8992if test -z "$ac_cv_prog_MIG"; then
8993 ac_ct_MIG=$MIG
8994 # Extract the first word of "mig", so it can be a program name with args.
8995set dummy mig; ac_word=$2
81ecdfbb
RW
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8999 $as_echo_n "(cached) " >&6
bec39cab
AC
9000else
9001 if test -n "$ac_ct_MIG"; then
9002 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9003else
9004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007 IFS=$as_save_IFS
9008 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9009 for ac_exec_ext in '' $ac_executable_extensions; do
9010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9011 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 9012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9013 break 2
9014 fi
9015done
81ecdfbb
RW
9016 done
9017IFS=$as_save_IFS
c906108c 9018
bec39cab
AC
9019fi
9020fi
9021ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9022if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9024$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9025else
81ecdfbb
RW
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
bec39cab 9028fi
c906108c 9029
81ecdfbb
RW
9030 if test "x$ac_ct_MIG" = x; then
9031 MIG=""
9032 else
9033 case $cross_compiling:$ac_tool_warned in
9034yes:)
9035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9037ac_tool_warned=yes ;;
9038esac
9039 MIG=$ac_ct_MIG
9040 fi
bec39cab
AC
9041else
9042 MIG="$ac_cv_prog_MIG"
9043fi
c906108c 9044
c906108c 9045
bec39cab
AC
9046# ---------------------- #
9047# Checks for libraries. #
9048# ---------------------- #
c906108c 9049
bec39cab 9050# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9052$as_echo_n "checking for main in -lm... " >&6; }
9053if test "${ac_cv_lib_m_main+set}" = set; then :
9054 $as_echo_n "(cached) " >&6
bec39cab
AC
9055else
9056 ac_check_lib_save_LIBS=$LIBS
9057LIBS="-lm $LIBS"
81ecdfbb 9058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9059/* end confdefs.h. */
c906108c 9060
c906108c 9061
bec39cab
AC
9062int
9063main ()
9064{
81ecdfbb 9065return main ();
bec39cab
AC
9066 ;
9067 return 0;
9068}
9069_ACEOF
81ecdfbb 9070if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9071 ac_cv_lib_m_main=yes
9072else
81ecdfbb 9073 ac_cv_lib_m_main=no
bec39cab 9074fi
81ecdfbb
RW
9075rm -f core conftest.err conftest.$ac_objext \
9076 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9077LIBS=$ac_check_lib_save_LIBS
9078fi
81ecdfbb
RW
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9080$as_echo "$ac_cv_lib_m_main" >&6; }
9081if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9082 cat >>confdefs.h <<_ACEOF
9083#define HAVE_LIBM 1
9084_ACEOF
9085
9086 LIBS="-lm $LIBS"
c906108c 9087
c906108c 9088fi
bec39cab
AC
9089
9090
9091# We need to link with -lw to get `wctype' on Solaris before Solaris
9092# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9093# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9094# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9095ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9096if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9097
c906108c 9098else
81ecdfbb
RW
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9100$as_echo_n "checking for wctype in -lw... " >&6; }
9101if test "${ac_cv_lib_w_wctype+set}" = set; then :
9102 $as_echo_n "(cached) " >&6
bec39cab
AC
9103else
9104 ac_check_lib_save_LIBS=$LIBS
9105LIBS="-lw $LIBS"
81ecdfbb 9106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9107/* end confdefs.h. */
c906108c 9108
81ecdfbb
RW
9109/* Override any GCC internal prototype to avoid an error.
9110 Use char because int might match the return type of a GCC
9111 builtin and then its argument prototype would still apply. */
bec39cab
AC
9112#ifdef __cplusplus
9113extern "C"
9114#endif
bec39cab
AC
9115char wctype ();
9116int
9117main ()
9118{
81ecdfbb 9119return wctype ();
bec39cab
AC
9120 ;
9121 return 0;
9122}
9123_ACEOF
81ecdfbb 9124if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9125 ac_cv_lib_w_wctype=yes
9126else
81ecdfbb 9127 ac_cv_lib_w_wctype=no
bec39cab 9128fi
81ecdfbb
RW
9129rm -f core conftest.err conftest.$ac_objext \
9130 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9131LIBS=$ac_check_lib_save_LIBS
9132fi
81ecdfbb
RW
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9134$as_echo "$ac_cv_lib_w_wctype" >&6; }
9135if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9136 cat >>confdefs.h <<_ACEOF
9137#define HAVE_LIBW 1
9138_ACEOF
c906108c 9139
bec39cab 9140 LIBS="-lw $LIBS"
c906108c 9141
bec39cab 9142fi
c906108c 9143
bec39cab 9144fi
c906108c 9145
ddc9cd0f 9146
bec39cab 9147# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9149$as_echo_n "checking for library containing gethostbyname... " >&6; }
9150if test "${ac_cv_search_gethostbyname+set}" = set; then :
9151 $as_echo_n "(cached) " >&6
bec39cab
AC
9152else
9153 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9155/* end confdefs.h. */
ddc9cd0f 9156
81ecdfbb
RW
9157/* Override any GCC internal prototype to avoid an error.
9158 Use char because int might match the return type of a GCC
9159 builtin and then its argument prototype would still apply. */
bec39cab
AC
9160#ifdef __cplusplus
9161extern "C"
9162#endif
bec39cab
AC
9163char gethostbyname ();
9164int
9165main ()
9166{
81ecdfbb 9167return gethostbyname ();
bec39cab
AC
9168 ;
9169 return 0;
9170}
9171_ACEOF
81ecdfbb
RW
9172for ac_lib in '' nsl; do
9173 if test -z "$ac_lib"; then
9174 ac_res="none required"
9175 else
9176 ac_res=-l$ac_lib
b4e70030 9177 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9178 fi
9179 if ac_fn_c_try_link "$LINENO"; then :
9180 ac_cv_search_gethostbyname=$ac_res
9181fi
9182rm -f core conftest.err conftest.$ac_objext \
9183 conftest$ac_exeext
9184 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9185 break
9186fi
9187done
9188if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9189
bec39cab 9190else
81ecdfbb 9191 ac_cv_search_gethostbyname=no
bec39cab 9192fi
81ecdfbb 9193rm conftest.$ac_ext
bec39cab
AC
9194LIBS=$ac_func_search_save_LIBS
9195fi
81ecdfbb
RW
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9197$as_echo "$ac_cv_search_gethostbyname" >&6; }
9198ac_res=$ac_cv_search_gethostbyname
9199if test "$ac_res" != no; then :
9200 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9201
bec39cab 9202fi
96baa820 9203
c906108c 9204
b4e70030 9205# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9207$as_echo_n "checking for library containing socketpair... " >&6; }
9208if test "${ac_cv_search_socketpair+set}" = set; then :
9209 $as_echo_n "(cached) " >&6
b4e70030
JB
9210else
9211 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9213/* end confdefs.h. */
9214
81ecdfbb
RW
9215/* Override any GCC internal prototype to avoid an error.
9216 Use char because int might match the return type of a GCC
9217 builtin and then its argument prototype would still apply. */
b4e70030
JB
9218#ifdef __cplusplus
9219extern "C"
9220#endif
b4e70030
JB
9221char socketpair ();
9222int
9223main ()
9224{
81ecdfbb 9225return socketpair ();
b4e70030
JB
9226 ;
9227 return 0;
9228}
9229_ACEOF
81ecdfbb
RW
9230for ac_lib in '' socket; do
9231 if test -z "$ac_lib"; then
9232 ac_res="none required"
9233 else
9234 ac_res=-l$ac_lib
b4e70030 9235 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9236 fi
9237 if ac_fn_c_try_link "$LINENO"; then :
9238 ac_cv_search_socketpair=$ac_res
9239fi
9240rm -f core conftest.err conftest.$ac_objext \
9241 conftest$ac_exeext
9242 if test "${ac_cv_search_socketpair+set}" = set; then :
9243 break
9244fi
9245done
9246if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9247
b4e70030 9248else
81ecdfbb 9249 ac_cv_search_socketpair=no
b4e70030 9250fi
81ecdfbb 9251rm conftest.$ac_ext
b4e70030
JB
9252LIBS=$ac_func_search_save_LIBS
9253fi
81ecdfbb
RW
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9255$as_echo "$ac_cv_search_socketpair" >&6; }
9256ac_res=$ac_cv_search_socketpair
9257if test "$ac_res" != no; then :
9258 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9259
9260fi
9261
9262
233a11ab 9263# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9264
9265 # See if the user specified whether he wants zlib support or not.
9266
9267# Check whether --with-zlib was given.
9268if test "${with_zlib+set}" = set; then :
9269 withval=$with_zlib;
9270else
9271 with_zlib=auto
9272fi
9273
9274
9275 if test "$with_zlib" != "no"; then
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9277$as_echo_n "checking for library containing zlibVersion... " >&6; }
9278if test "${ac_cv_search_zlibVersion+set}" = set; then :
9279 $as_echo_n "(cached) " >&6
233a11ab
CS
9280else
9281 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9283/* end confdefs.h. */
9284
81ecdfbb
RW
9285/* Override any GCC internal prototype to avoid an error.
9286 Use char because int might match the return type of a GCC
233a11ab 9287 builtin and then its argument prototype would still apply. */
233a11ab
CS
9288#ifdef __cplusplus
9289extern "C"
9290#endif
233a11ab
CS
9291char zlibVersion ();
9292int
9293main ()
9294{
81ecdfbb 9295return zlibVersion ();
233a11ab
CS
9296 ;
9297 return 0;
9298}
9299_ACEOF
81ecdfbb
RW
9300for ac_lib in '' z; do
9301 if test -z "$ac_lib"; then
9302 ac_res="none required"
233a11ab 9303 else
81ecdfbb
RW
9304 ac_res=-l$ac_lib
9305 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9306 fi
81ecdfbb
RW
9307 if ac_fn_c_try_link "$LINENO"; then :
9308 ac_cv_search_zlibVersion=$ac_res
233a11ab 9309fi
81ecdfbb
RW
9310rm -f core conftest.err conftest.$ac_objext \
9311 conftest$ac_exeext
9312 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9313 break
233a11ab 9314fi
81ecdfbb
RW
9315done
9316if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9317
233a11ab 9318else
81ecdfbb 9319 ac_cv_search_zlibVersion=no
233a11ab 9320fi
81ecdfbb
RW
9321rm conftest.$ac_ext
9322LIBS=$ac_func_search_save_LIBS
233a11ab 9323fi
81ecdfbb
RW
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9325$as_echo "$ac_cv_search_zlibVersion" >&6; }
9326ac_res=$ac_cv_search_zlibVersion
9327if test "$ac_res" != no; then :
9328 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9329 for ac_header in zlib.h
9330do :
9331 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9332if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9333 cat >>confdefs.h <<_ACEOF
81ecdfbb 9334#define HAVE_ZLIB_H 1
233a11ab
CS
9335_ACEOF
9336
9337fi
9338
9339done
9340
9341fi
9342
b040ad30
JB
9343 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9344 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9345 fi
9346 fi
9347
233a11ab 9348
77f120bf 9349# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9351$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9352if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9353 $as_echo_n "(cached) " >&6
bec39cab
AC
9354else
9355 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9357/* end confdefs.h. */
c906108c 9358
81ecdfbb
RW
9359/* Override any GCC internal prototype to avoid an error.
9360 Use char because int might match the return type of a GCC
9361 builtin and then its argument prototype would still apply. */
bec39cab
AC
9362#ifdef __cplusplus
9363extern "C"
9364#endif
77f120bf 9365char dlgetmodinfo ();
bec39cab
AC
9366int
9367main ()
9368{
81ecdfbb 9369return dlgetmodinfo ();
bec39cab
AC
9370 ;
9371 return 0;
9372}
9373_ACEOF
81ecdfbb
RW
9374for ac_lib in '' dl xpdl; do
9375 if test -z "$ac_lib"; then
9376 ac_res="none required"
9377 else
9378 ac_res=-l$ac_lib
b4e70030 9379 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9380 fi
9381 if ac_fn_c_try_link "$LINENO"; then :
9382 ac_cv_search_dlgetmodinfo=$ac_res
9383fi
9384rm -f core conftest.err conftest.$ac_objext \
9385 conftest$ac_exeext
9386 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9387 break
9388fi
9389done
9390if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9391
4e8d927d 9392else
81ecdfbb 9393 ac_cv_search_dlgetmodinfo=no
1ba607ad 9394fi
81ecdfbb 9395rm conftest.$ac_ext
bec39cab
AC
9396LIBS=$ac_func_search_save_LIBS
9397fi
81ecdfbb
RW
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9399$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9400ac_res=$ac_cv_search_dlgetmodinfo
9401if test "$ac_res" != no; then :
9402 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9403
8bb2c122 9404fi
8bb2c122 9405
8bb2c122 9406
77f120bf 9407
77f120bf 9408
6c7a06a3 9409
81ecdfbb
RW
9410# Check whether --with-libiconv-prefix was given.
9411if test "${with_libiconv_prefix+set}" = set; then :
9412 withval=$with_libiconv_prefix;
6c7a06a3 9413 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9414 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9415 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9416 done
9417
81ecdfbb
RW
9418fi
9419
6c7a06a3 9420
f18c4681 9421 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9422 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9423
81ecdfbb
RW
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9425$as_echo_n "checking for iconv... " >&6; }
9426if test "${am_cv_func_iconv+set}" = set; then :
9427 $as_echo_n "(cached) " >&6
d542061a 9428else
6c7a06a3
TT
9429
9430 am_cv_func_iconv="no, consider installing GNU libiconv"
9431 am_cv_lib_iconv=no
9432 am_cv_use_build_libiconv=no
f0f20949 9433 am_cv_build_libiconv_path=
4edb1e84
JB
9434
9435 # If libiconv is part of the build tree, then try using it over
9436 # any system iconv.
9437 if test -d ../libiconv; then
f18c4681
JB
9438 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9439 am_save_LIBS="$LIBS"
9440 am_save_CPPFLAGS="$CPPFLAGS"
9441 LIBS="$LIBS $lib_dir/libiconv.a"
9442 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9444/* end confdefs.h. */
6c7a06a3
TT
9445#include <stdlib.h>
9446#include <iconv.h>
d542061a
UW
9447int
9448main ()
9449{
6c7a06a3 9450iconv_t cd = iconv_open("","");
f18c4681
JB
9451 iconv(cd,NULL,NULL,NULL,NULL);
9452 iconv_close(cd);
d542061a
UW
9453 ;
9454 return 0;
9455}
9456_ACEOF
81ecdfbb 9457if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9458 am_cv_use_build_libiconv=yes
f0f20949 9459 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9460 am_cv_lib_iconv=yes
9461 am_cv_func_iconv=yes
d542061a 9462fi
81ecdfbb
RW
9463rm -f core conftest.err conftest.$ac_objext \
9464 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9465 LIBS="$am_save_LIBS"
9466 CPPFLAGS="$am_save_CPPFLAGS"
9467 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9468 break
9469 fi
9470 done
4edb1e84 9471 fi
94ae1714 9472
4edb1e84 9473 # Next, try to find iconv in libc.
6c7a06a3 9474 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9476/* end confdefs.h. */
6c7a06a3
TT
9477#include <stdlib.h>
9478#include <iconv.h>
d542061a
UW
9479int
9480main ()
9481{
6c7a06a3
TT
9482iconv_t cd = iconv_open("","");
9483 iconv(cd,NULL,NULL,NULL,NULL);
9484 iconv_close(cd);
d542061a
UW
9485 ;
9486 return 0;
9487}
9488_ACEOF
81ecdfbb 9489if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9490 am_cv_func_iconv=yes
d542061a 9491fi
81ecdfbb
RW
9492rm -f core conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
77f120bf 9494 fi
94ae1714 9495
4edb1e84
JB
9496 # If iconv was not in libc, try -liconv. In this case, arrange to
9497 # look in the libiconv prefix, if it was specified by the user.
9498 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9499 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9500 am_save_LIBS="$LIBS"
9501 if test -n "$LIBICONV_INCLUDE"; then
9502 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9503 LIBS="$LIBS $LIBICONV_LIBDIR"
9504 fi
9505 LIBS="$LIBS -liconv"
81ecdfbb 9506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9507/* end confdefs.h. */
6c7a06a3
TT
9508#include <stdlib.h>
9509#include <iconv.h>
bec39cab
AC
9510int
9511main ()
9512{
6c7a06a3
TT
9513iconv_t cd = iconv_open("","");
9514 iconv(cd,NULL,NULL,NULL,NULL);
9515 iconv_close(cd);
bec39cab
AC
9516 ;
9517 return 0;
9518}
9519_ACEOF
81ecdfbb 9520if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9521 am_cv_lib_iconv=yes
6c7a06a3 9522 am_cv_func_iconv=yes
627af7ea 9523fi
81ecdfbb
RW
9524rm -f core conftest.err conftest.$ac_objext \
9525 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9526 LIBS="$am_save_LIBS"
fc3b640d 9527 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9528 fi
9529
9530fi
81ecdfbb
RW
9531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9532$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9533
9534 # Set the various flags based on the cache variables. We can't rely
9535 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9536 LIBICONV=
9537 if test "$am_cv_lib_iconv" = yes; then
9538 LIBICONV="-liconv"
94ae1714
TT
9539 else
9540 LIBICONV_LIBDIR=
9541 LIBICONV_INCLUDE=
fc3b640d
TT
9542 fi
9543 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9544 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9545 LIBICONV_LIBDIR=""
fc3b640d
TT
9546 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9547 fi
9548 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9549 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9550
6c7a06a3
TT
9551 if test "$am_cv_func_iconv" = yes; then
9552
81ecdfbb 9553$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9554
81ecdfbb
RW
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9556$as_echo_n "checking for iconv declaration... " >&6; }
9557 if test "${am_cv_proto_iconv+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9559else
9560
81ecdfbb 9561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9562/* end confdefs.h. */
9563
6c7a06a3
TT
9564#include <stdlib.h>
9565#include <iconv.h>
9566extern
b4e70030 9567#ifdef __cplusplus
6c7a06a3 9568"C"
b4e70030 9569#endif
6c7a06a3
TT
9570#if defined(__STDC__) || defined(__cplusplus)
9571size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9572#else
9573size_t iconv();
9574#endif
9575
b4e70030
JB
9576int
9577main ()
9578{
6c7a06a3 9579
b4e70030
JB
9580 ;
9581 return 0;
9582}
9583_ACEOF
81ecdfbb 9584if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9585 am_cv_proto_iconv_arg1=""
4e8d927d 9586else
81ecdfbb 9587 am_cv_proto_iconv_arg1="const"
b4e70030 9588fi
81ecdfbb 9589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9590 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);"
9591fi
9592
9593 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9595 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9596$as_echo "${ac_t:-
9597 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9598
9599cat >>confdefs.h <<_ACEOF
9600#define ICONV_CONST $am_cv_proto_iconv_arg1
9601_ACEOF
9602
9603 fi
6c7a06a3
TT
9604
9605
478aac75
DE
9606# GDB may fork/exec the iconv program to get the list of supported character
9607# sets. Allow the user to specify where to find it.
9608# There are several factors affecting the choice of option name:
9609# - There is already --with-libiconv-prefix but we can't use it, it specifies
9610# the build-time location of libiconv files.
9611# - The program we need to find is iconv, which comes with glibc. The user
9612# doesn't necessarily have libiconv installed. Therefore naming this
9613# --with-libiconv-foo feels wrong.
9614# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9615# defined to work on directories not files (though it really doesn't know
9616# the difference).
9617# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9618# with --with-libiconv-prefix.
9619# Putting these together is why the option name is --with-iconv-bin.
9620
9621
9622# Check whether --with-iconv-bin was given.
9623if test "${with_iconv_bin+set}" = set; then :
9624 withval=$with_iconv_bin; iconv_bin="${withval}"
9625
9626cat >>confdefs.h <<_ACEOF
9627#define ICONV_BIN "${iconv_bin}"
9628_ACEOF
9629
9630
9631 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9632 if test "x$prefix" = xNONE; then
9633 test_prefix=/usr/local
9634 else
9635 test_prefix=$prefix
9636 fi
9637 else
9638 test_prefix=$exec_prefix
9639 fi
9640 value=0
9641 case ${iconv_bin} in
9642 "${test_prefix}"|"${test_prefix}/"*|\
9643 '${exec_prefix}'|'${exec_prefix}/'*)
9644 value=1
9645 ;;
9646 esac
9647
9648cat >>confdefs.h <<_ACEOF
9649#define ICONV_BIN_RELOCATABLE $value
9650_ACEOF
9651
9652
9653
9654fi
9655
9656
6c7a06a3
TT
9657# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9658# There is a very specific comment in /usr/include/curses.h explaining that
9659# termcap routines built into libcurses must not be used.
9660#
9661# The symptoms we observed so far is GDB unexpectedly changing
9662# the terminal settings when tgetent is called - this is particularly
9663# visible as the output is missing carriage returns, and so rapidly
9664# becomes very hard to read.
9665#
9666# The readline configure script has already decided that libtermcap
9667# was enough for its purposes, and so decided to build readline using
9668# libtermcap. Since the TUI mode requires curses, building GDB with
9669# TUI enabled results in both libraries to be used at the same time,
9670# which is not allowed. This basically means that GDB with TUI is
9671# broken on alpha-osf.
9672
9673case $host_os in
6bcc772d
RO
9674 osf* )
9675 if test x"$enable_tui" = xyes; then
81ecdfbb 9676 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9677 fi
6bcc772d 9678 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9679 enable_tui=no
9680 fi
9681 ;;
9682esac
9683
cb01cfba 9684# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9685if test x"$enable_tui" != xno; then
cb01cfba
JB
9686 prefer_curses=yes
9687fi
9688
9689curses_found=no
9690if test x"$prefer_curses" = xyes; then
9691 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9692 # curses library because the latter might not provide all the
9693 # functionality we need. However, this leads to problems on systems
9694 # where the linker searches /usr/local/lib, but the compiler doesn't
9695 # search /usr/local/include, if ncurses is installed in /usr/local. A
9696 # default installation of ncurses on alpha*-dec-osf* will lead to such
9697 # a situation.
81ecdfbb
RW
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9699$as_echo_n "checking for library containing waddstr... " >&6; }
9700if test "${ac_cv_search_waddstr+set}" = set; then :
9701 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9702else
9703 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9705/* end confdefs.h. */
9706
81ecdfbb
RW
9707/* Override any GCC internal prototype to avoid an error.
9708 Use char because int might match the return type of a GCC
9709 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9710#ifdef __cplusplus
9711extern "C"
9712#endif
6c7a06a3
TT
9713char waddstr ();
9714int
9715main ()
9716{
81ecdfbb 9717return waddstr ();
6c7a06a3
TT
9718 ;
9719 return 0;
9720}
9721_ACEOF
81ecdfbb
RW
9722for ac_lib in '' ncurses cursesX curses; do
9723 if test -z "$ac_lib"; then
9724 ac_res="none required"
9725 else
9726 ac_res=-l$ac_lib
9727 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9728 fi
9729 if ac_fn_c_try_link "$LINENO"; then :
9730 ac_cv_search_waddstr=$ac_res
9731fi
9732rm -f core conftest.err conftest.$ac_objext \
9733 conftest$ac_exeext
9734 if test "${ac_cv_search_waddstr+set}" = set; then :
9735 break
9736fi
9737done
9738if test "${ac_cv_search_waddstr+set}" = set; then :
9739
6c7a06a3 9740else
81ecdfbb
RW
9741 ac_cv_search_waddstr=no
9742fi
9743rm conftest.$ac_ext
9744LIBS=$ac_func_search_save_LIBS
9745fi
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9747$as_echo "$ac_cv_search_waddstr" >&6; }
9748ac_res=$ac_cv_search_waddstr
9749if test "$ac_res" != no; then :
9750 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9751
9752fi
9753
9754
cb01cfba
JB
9755 if test "$ac_cv_search_waddstr" != no; then
9756 curses_found=yes
9757 fi
9758fi
9759
9760# Check whether we should enable the TUI, but only do so if we really
9761# can.
9762if test x"$enable_tui" != xno; then
9763 if test -d $srcdir/tui; then
9764 if test "$curses_found" != no; then
6c7a06a3
TT
9765 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9766 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9767 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9768 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9769 CONFIG_ALL="${CONFIG_ALL} all-tui"
9770 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9771 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9772 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9773 else
9774 if test x"$enable_tui" = xyes; then
81ecdfbb 9775 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9776 else
81ecdfbb
RW
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9778$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9779 fi
9780 fi
9781 fi
9782fi
9783
9784# Since GDB uses Readline, we need termcap functionality. In many
9785# cases this will be provided by the curses library, but some systems
9786# have a seperate termcap library, or no curses library at all.
9787
9788case $host_os in
9789 cygwin*)
9790 if test -d $srcdir/libtermcap; then
9791 LIBS="../libtermcap/libtermcap.a $LIBS"
9792 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9793 fi ;;
9794 go32* | *djgpp*)
9795 ac_cv_search_tgetent="none required"
9796 ;;
9797 *mingw32*)
9798 ac_cv_search_tgetent="none required"
9799 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9800 ;;
9801esac
9802
9803# These are the libraries checked by Readline.
81ecdfbb
RW
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9805$as_echo_n "checking for library containing tgetent... " >&6; }
9806if test "${ac_cv_search_tgetent+set}" = set; then :
9807 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9808else
9809 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9811/* end confdefs.h. */
9812
81ecdfbb
RW
9813/* Override any GCC internal prototype to avoid an error.
9814 Use char because int might match the return type of a GCC
9815 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9816#ifdef __cplusplus
9817extern "C"
9818#endif
6c7a06a3
TT
9819char tgetent ();
9820int
9821main ()
9822{
81ecdfbb 9823return tgetent ();
6c7a06a3
TT
9824 ;
9825 return 0;
9826}
9827_ACEOF
81ecdfbb
RW
9828for ac_lib in '' termcap tinfo curses ncurses; do
9829 if test -z "$ac_lib"; then
9830 ac_res="none required"
9831 else
9832 ac_res=-l$ac_lib
6c7a06a3 9833 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9834 fi
9835 if ac_fn_c_try_link "$LINENO"; then :
9836 ac_cv_search_tgetent=$ac_res
9837fi
9838rm -f core conftest.err conftest.$ac_objext \
9839 conftest$ac_exeext
9840 if test "${ac_cv_search_tgetent+set}" = set; then :
9841 break
9842fi
9843done
9844if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9845
6c7a06a3 9846else
81ecdfbb 9847 ac_cv_search_tgetent=no
6c7a06a3 9848fi
81ecdfbb 9849rm conftest.$ac_ext
6c7a06a3
TT
9850LIBS=$ac_func_search_save_LIBS
9851fi
81ecdfbb
RW
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9853$as_echo "$ac_cv_search_tgetent" >&6; }
9854ac_res=$ac_cv_search_tgetent
9855if test "$ac_res" != no; then :
9856 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9857
06825bd1
MK
9858fi
9859
06825bd1 9860
bec39cab 9861if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9862 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9863fi
9864
3841debe 9865
81ecdfbb
RW
9866# Check whether --with-system-readline was given.
9867if test "${with_system_readline+set}" = set; then :
9868 withval=$with_system_readline;
9869fi
6a30b0a5 9870
6a30b0a5
AS
9871
9872if test "$with_system_readline" = yes; then
9873 READLINE=-lreadline
9874 READLINE_DEPS=
9875 READLINE_CFLAGS=
39037522 9876 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9877else
9878 READLINE='$(READLINE_DIR)/libreadline.a'
9879 READLINE_DEPS='$(READLINE)'
9880 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9881 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9882fi
9883
9884
9885
9886
9887
f997c383
SD
9888# Generate jit-reader.h
9889
9890# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9891TARGET_PTR=
9892
9893# The cast to long int works around a bug in the HP C Compiler
9894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9896# This bug is HP SR number 8606223364.
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9898$as_echo_n "checking size of unsigned long long... " >&6; }
9899if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9900 $as_echo_n "(cached) " >&6
9901else
9902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9903
9904else
9905 if test "$ac_cv_type_unsigned_long_long" = yes; then
9906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9908{ as_fn_set_status 77
9909as_fn_error "cannot compute sizeof (unsigned long long)
9910See \`config.log' for more details." "$LINENO" 5; }; }
9911 else
9912 ac_cv_sizeof_unsigned_long_long=0
9913 fi
9914fi
9915
9916fi
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9918$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9919
9920
9921
9922cat >>confdefs.h <<_ACEOF
9923#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9924_ACEOF
9925
9926
9927# The cast to long int works around a bug in the HP C Compiler
9928# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9929# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9930# This bug is HP SR number 8606223364.
9931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9932$as_echo_n "checking size of unsigned long... " >&6; }
9933if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9934 $as_echo_n "(cached) " >&6
9935else
9936 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9937
9938else
9939 if test "$ac_cv_type_unsigned_long" = yes; then
9940 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9942{ as_fn_set_status 77
9943as_fn_error "cannot compute sizeof (unsigned long)
9944See \`config.log' for more details." "$LINENO" 5; }; }
9945 else
9946 ac_cv_sizeof_unsigned_long=0
9947 fi
9948fi
9949
9950fi
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9952$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9953
9954
9955
9956cat >>confdefs.h <<_ACEOF
9957#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9958_ACEOF
9959
9960
9961# The cast to long int works around a bug in the HP C Compiler
9962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9964# This bug is HP SR number 8606223364.
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9966$as_echo_n "checking size of unsigned __int128... " >&6; }
9967if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9968 $as_echo_n "(cached) " >&6
9969else
9970 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9971
9972else
9973 if test "$ac_cv_type_unsigned___int128" = yes; then
9974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9976{ as_fn_set_status 77
9977as_fn_error "cannot compute sizeof (unsigned __int128)
9978See \`config.log' for more details." "$LINENO" 5; }; }
9979 else
9980 ac_cv_sizeof_unsigned___int128=0
9981 fi
9982fi
9983
9984fi
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9986$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9987
9988
9989
9990cat >>confdefs.h <<_ACEOF
9991#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9992_ACEOF
9993
9994
9995
9996if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9997 TARGET_PTR="unsigned long"
9998elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9999 TARGET_PTR="unsigned long long"
10000elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
10001 TARGET_PTR="unsigned __int128"
10002else
10003 TARGET_PTR="unsigned long"
10004fi
10005
10006
10007ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
10008
10009
39037522 10010
81ecdfbb
RW
10011# Check whether --with-expat was given.
10012if test "${with_expat+set}" = set; then :
10013 withval=$with_expat;
5c39566f
DJ
10014else
10015 with_expat=auto
81ecdfbb
RW
10016fi
10017
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
10019$as_echo_n "checking whether to use expat... " >&6; }
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
10021$as_echo "$with_expat" >&6; }
5c39566f
DJ
10022
10023if test "${with_expat}" = no; then
81ecdfbb
RW
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
10025$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
10026 HAVE_LIBEXPAT=no
10027else
10028
3841debe
DJ
10029 if test "X$prefix" = "XNONE"; then
10030 acl_final_prefix="$ac_default_prefix"
10031 else
10032 acl_final_prefix="$prefix"
10033 fi
10034 if test "X$exec_prefix" = "XNONE"; then
10035 acl_final_exec_prefix='${prefix}'
10036 else
10037 acl_final_exec_prefix="$exec_prefix"
10038 fi
10039 acl_save_prefix="$prefix"
10040 prefix="$acl_final_prefix"
10041 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10042 prefix="$acl_save_prefix"
10043
10044
81ecdfbb
RW
10045# Check whether --with-gnu-ld was given.
10046if test "${with_gnu_ld+set}" = set; then :
10047 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
10048else
10049 with_gnu_ld=no
81ecdfbb
RW
10050fi
10051
3841debe
DJ
10052# Prepare PATH_SEPARATOR.
10053# The user is always right.
10054if test "${PATH_SEPARATOR+set}" != set; then
10055 echo "#! /bin/sh" >conf$$.sh
10056 echo "exit 0" >>conf$$.sh
10057 chmod +x conf$$.sh
10058 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10059 PATH_SEPARATOR=';'
10060 else
10061 PATH_SEPARATOR=:
10062 fi
10063 rm -f conf$$.sh
10064fi
10065ac_prog=ld
10066if test "$GCC" = yes; then
10067 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
10069$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
10070 case $host in
10071 *-*-mingw*)
10072 # gcc leaves a trailing carriage return which upsets mingw
10073 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10074 *)
10075 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10076 esac
10077 case $ac_prog in
10078 # Accept absolute paths.
10079 [\\/]* | [A-Za-z]:[\\/]*)
10080 re_direlt='/[^/][^/]*/\.\./'
10081 # Canonicalize the path of ld
10082 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10083 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10084 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10085 done
10086 test -z "$LD" && LD="$ac_prog"
10087 ;;
10088 "")
10089 # If it fails, then pretend we aren't using GCC.
10090 ac_prog=ld
10091 ;;
10092 *)
10093 # If it is relative, then search for the first ld in PATH.
10094 with_gnu_ld=unknown
10095 ;;
10096 esac
10097elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
10098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10099$as_echo_n "checking for GNU ld... " >&6; }
3841debe 10100else
81ecdfbb
RW
10101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10102$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 10103fi
81ecdfbb
RW
10104if test "${acl_cv_path_LD+set}" = set; then :
10105 $as_echo_n "(cached) " >&6
3841debe
DJ
10106else
10107 if test -z "$LD"; then
10108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10109 for ac_dir in $PATH; do
10110 test -z "$ac_dir" && ac_dir=.
10111 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10112 acl_cv_path_LD="$ac_dir/$ac_prog"
10113 # Check to see if the program is GNU ld. I'd rather use --version,
10114 # but apparently some GNU ld's only accept -v.
10115 # Break only if it was the GNU/non-GNU ld that we prefer.
10116 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10117 test "$with_gnu_ld" != no && break
10118 else
10119 test "$with_gnu_ld" != yes && break
10120 fi
10121 fi
10122 done
10123 IFS="$ac_save_ifs"
10124else
10125 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10126fi
10127fi
10128
10129LD="$acl_cv_path_LD"
10130if test -n "$LD"; then
81ecdfbb
RW
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10132$as_echo "$LD" >&6; }
3841debe 10133else
81ecdfbb
RW
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
3841debe 10136fi
81ecdfbb
RW
10137test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10139$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10140if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10141 $as_echo_n "(cached) " >&6
3841debe
DJ
10142else
10143 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10144if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10145 acl_cv_prog_gnu_ld=yes
10146else
10147 acl_cv_prog_gnu_ld=no
10148fi
10149fi
81ecdfbb
RW
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10151$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10152with_gnu_ld=$acl_cv_prog_gnu_ld
10153
10154
10155
81ecdfbb
RW
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10157$as_echo_n "checking for shared library run path origin... " >&6; }
10158if test "${acl_cv_rpath+set}" = set; then :
10159 $as_echo_n "(cached) " >&6
3841debe
DJ
10160else
10161
10162 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10163 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10164 . ./conftest.sh
10165 rm -f ./conftest.sh
10166 acl_cv_rpath=done
10167
10168fi
81ecdfbb
RW
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10170$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10171 wl="$acl_cv_wl"
10172 libext="$acl_cv_libext"
10173 shlibext="$acl_cv_shlibext"
10174 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10175 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10176 hardcode_direct="$acl_cv_hardcode_direct"
10177 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10178 # Check whether --enable-rpath was given.
10179if test "${enable_rpath+set}" = set; then :
10180 enableval=$enable_rpath; :
3841debe
DJ
10181else
10182 enable_rpath=yes
81ecdfbb
RW
10183fi
10184
3841debe
DJ
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194 use_additional=yes
10195
10196 acl_save_prefix="$prefix"
10197 prefix="$acl_final_prefix"
10198 acl_save_exec_prefix="$exec_prefix"
10199 exec_prefix="$acl_final_exec_prefix"
10200
10201 eval additional_includedir=\"$includedir\"
10202 eval additional_libdir=\"$libdir\"
10203
10204 exec_prefix="$acl_save_exec_prefix"
10205 prefix="$acl_save_prefix"
10206
10207
81ecdfbb
RW
10208# Check whether --with-libexpat-prefix was given.
10209if test "${with_libexpat_prefix+set}" = set; then :
10210 withval=$with_libexpat_prefix;
3841debe
DJ
10211 if test "X$withval" = "Xno"; then
10212 use_additional=no
10213 else
10214 if test "X$withval" = "X"; then
10215
10216 acl_save_prefix="$prefix"
10217 prefix="$acl_final_prefix"
10218 acl_save_exec_prefix="$exec_prefix"
10219 exec_prefix="$acl_final_exec_prefix"
10220
10221 eval additional_includedir=\"$includedir\"
10222 eval additional_libdir=\"$libdir\"
10223
10224 exec_prefix="$acl_save_exec_prefix"
10225 prefix="$acl_save_prefix"
10226
10227 else
10228 additional_includedir="$withval/include"
10229 additional_libdir="$withval/lib"
10230 fi
10231 fi
10232
81ecdfbb
RW
10233fi
10234
3841debe
DJ
10235 LIBEXPAT=
10236 LTLIBEXPAT=
10237 INCEXPAT=
10238 rpathdirs=
10239 ltrpathdirs=
10240 names_already_handled=
10241 names_next_round='expat '
10242 while test -n "$names_next_round"; do
10243 names_this_round="$names_next_round"
10244 names_next_round=
10245 for name in $names_this_round; do
10246 already_handled=
10247 for n in $names_already_handled; do
10248 if test "$n" = "$name"; then
10249 already_handled=yes
10250 break
10251 fi
10252 done
10253 if test -z "$already_handled"; then
10254 names_already_handled="$names_already_handled $name"
10255 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10256 eval value=\"\$HAVE_LIB$uppername\"
10257 if test -n "$value"; then
10258 if test "$value" = yes; then
10259 eval value=\"\$LIB$uppername\"
10260 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10261 eval value=\"\$LTLIB$uppername\"
10262 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10263 else
10264 :
10265 fi
10266 else
10267 found_dir=
10268 found_la=
10269 found_so=
10270 found_a=
10271 if test $use_additional = yes; then
10272 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10273 found_dir="$additional_libdir"
10274 found_so="$additional_libdir/lib$name.$shlibext"
10275 if test -f "$additional_libdir/lib$name.la"; then
10276 found_la="$additional_libdir/lib$name.la"
10277 fi
10278 else
10279 if test -f "$additional_libdir/lib$name.$libext"; then
10280 found_dir="$additional_libdir"
10281 found_a="$additional_libdir/lib$name.$libext"
10282 if test -f "$additional_libdir/lib$name.la"; then
10283 found_la="$additional_libdir/lib$name.la"
10284 fi
10285 fi
10286 fi
10287 fi
10288 if test "X$found_dir" = "X"; then
10289 for x in $LDFLAGS $LTLIBEXPAT; do
10290
10291 acl_save_prefix="$prefix"
10292 prefix="$acl_final_prefix"
10293 acl_save_exec_prefix="$exec_prefix"
10294 exec_prefix="$acl_final_exec_prefix"
10295 eval x=\"$x\"
10296 exec_prefix="$acl_save_exec_prefix"
10297 prefix="$acl_save_prefix"
10298
10299 case "$x" in
10300 -L*)
10301 dir=`echo "X$x" | sed -e 's/^X-L//'`
10302 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10303 found_dir="$dir"
10304 found_so="$dir/lib$name.$shlibext"
10305 if test -f "$dir/lib$name.la"; then
10306 found_la="$dir/lib$name.la"
10307 fi
10308 else
10309 if test -f "$dir/lib$name.$libext"; then
10310 found_dir="$dir"
10311 found_a="$dir/lib$name.$libext"
10312 if test -f "$dir/lib$name.la"; then
10313 found_la="$dir/lib$name.la"
10314 fi
10315 fi
10316 fi
10317 ;;
10318 esac
10319 if test "X$found_dir" != "X"; then
10320 break
10321 fi
10322 done
10323 fi
10324 if test "X$found_dir" != "X"; then
10325 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10326 if test "X$found_so" != "X"; then
10327 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10328 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10329 else
10330 haveit=
10331 for x in $ltrpathdirs; do
10332 if test "X$x" = "X$found_dir"; then
10333 haveit=yes
10334 break
10335 fi
10336 done
10337 if test -z "$haveit"; then
10338 ltrpathdirs="$ltrpathdirs $found_dir"
10339 fi
10340 if test "$hardcode_direct" = yes; then
10341 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10342 else
10343 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10344 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10345 haveit=
10346 for x in $rpathdirs; do
10347 if test "X$x" = "X$found_dir"; then
10348 haveit=yes
10349 break
10350 fi
10351 done
10352 if test -z "$haveit"; then
10353 rpathdirs="$rpathdirs $found_dir"
10354 fi
10355 else
10356 haveit=
10357 for x in $LDFLAGS $LIBEXPAT; do
10358
10359 acl_save_prefix="$prefix"
10360 prefix="$acl_final_prefix"
10361 acl_save_exec_prefix="$exec_prefix"
10362 exec_prefix="$acl_final_exec_prefix"
10363 eval x=\"$x\"
10364 exec_prefix="$acl_save_exec_prefix"
10365 prefix="$acl_save_prefix"
10366
10367 if test "X$x" = "X-L$found_dir"; then
10368 haveit=yes
10369 break
10370 fi
10371 done
10372 if test -z "$haveit"; then
10373 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10374 fi
10375 if test "$hardcode_minus_L" != no; then
10376 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10377 else
10378 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10379 fi
10380 fi
10381 fi
10382 fi
10383 else
10384 if test "X$found_a" != "X"; then
10385 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10386 else
10387 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10388 fi
10389 fi
10390 additional_includedir=
10391 case "$found_dir" in
10392 */lib | */lib/)
10393 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10394 additional_includedir="$basedir/include"
10395 ;;
10396 esac
10397 if test "X$additional_includedir" != "X"; then
10398 if test "X$additional_includedir" != "X/usr/include"; then
10399 haveit=
10400 if test "X$additional_includedir" = "X/usr/local/include"; then
10401 if test -n "$GCC"; then
10402 case $host_os in
10403 linux*) haveit=yes;;
10404 esac
10405 fi
10406 fi
10407 if test -z "$haveit"; then
10408 for x in $CPPFLAGS $INCEXPAT; do
10409
10410 acl_save_prefix="$prefix"
10411 prefix="$acl_final_prefix"
10412 acl_save_exec_prefix="$exec_prefix"
10413 exec_prefix="$acl_final_exec_prefix"
10414 eval x=\"$x\"
10415 exec_prefix="$acl_save_exec_prefix"
10416 prefix="$acl_save_prefix"
10417
10418 if test "X$x" = "X-I$additional_includedir"; then
10419 haveit=yes
10420 break
10421 fi
10422 done
10423 if test -z "$haveit"; then
10424 if test -d "$additional_includedir"; then
10425 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10426 fi
10427 fi
10428 fi
10429 fi
10430 fi
10431 if test -n "$found_la"; then
10432 save_libdir="$libdir"
10433 case "$found_la" in
10434 */* | *\\*) . "$found_la" ;;
10435 *) . "./$found_la" ;;
10436 esac
10437 libdir="$save_libdir"
10438 for dep in $dependency_libs; do
10439 case "$dep" in
10440 -L*)
10441 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10442 if test "X$additional_libdir" != "X/usr/lib"; then
10443 haveit=
10444 if test "X$additional_libdir" = "X/usr/local/lib"; then
10445 if test -n "$GCC"; then
10446 case $host_os in
10447 linux*) haveit=yes;;
10448 esac
10449 fi
10450 fi
10451 if test -z "$haveit"; then
10452 haveit=
10453 for x in $LDFLAGS $LIBEXPAT; do
10454
10455 acl_save_prefix="$prefix"
10456 prefix="$acl_final_prefix"
10457 acl_save_exec_prefix="$exec_prefix"
10458 exec_prefix="$acl_final_exec_prefix"
10459 eval x=\"$x\"
10460 exec_prefix="$acl_save_exec_prefix"
10461 prefix="$acl_save_prefix"
10462
10463 if test "X$x" = "X-L$additional_libdir"; then
10464 haveit=yes
10465 break
10466 fi
10467 done
10468 if test -z "$haveit"; then
10469 if test -d "$additional_libdir"; then
10470 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10471 fi
10472 fi
10473 haveit=
10474 for x in $LDFLAGS $LTLIBEXPAT; do
10475
10476 acl_save_prefix="$prefix"
10477 prefix="$acl_final_prefix"
10478 acl_save_exec_prefix="$exec_prefix"
10479 exec_prefix="$acl_final_exec_prefix"
10480 eval x=\"$x\"
10481 exec_prefix="$acl_save_exec_prefix"
10482 prefix="$acl_save_prefix"
10483
10484 if test "X$x" = "X-L$additional_libdir"; then
10485 haveit=yes
10486 break
10487 fi
10488 done
10489 if test -z "$haveit"; then
10490 if test -d "$additional_libdir"; then
10491 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10492 fi
10493 fi
10494 fi
10495 fi
10496 ;;
10497 -R*)
10498 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10499 if test "$enable_rpath" != no; then
10500 haveit=
10501 for x in $rpathdirs; do
10502 if test "X$x" = "X$dir"; then
10503 haveit=yes
10504 break
10505 fi
10506 done
10507 if test -z "$haveit"; then
10508 rpathdirs="$rpathdirs $dir"
10509 fi
10510 haveit=
10511 for x in $ltrpathdirs; do
10512 if test "X$x" = "X$dir"; then
10513 haveit=yes
10514 break
10515 fi
10516 done
10517 if test -z "$haveit"; then
10518 ltrpathdirs="$ltrpathdirs $dir"
10519 fi
10520 fi
10521 ;;
10522 -l*)
10523 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10524 ;;
10525 *.la)
10526 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10527 ;;
10528 *)
10529 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10530 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10531 ;;
81ecdfbb
RW
10532 esac
10533 done
10534 fi
10535 else
10536 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10537 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10538 fi
10539 fi
10540 fi
10541 done
10542 done
10543 if test "X$rpathdirs" != "X"; then
10544 if test -n "$hardcode_libdir_separator"; then
10545 alldirs=
10546 for found_dir in $rpathdirs; do
10547 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10548 done
10549 acl_save_libdir="$libdir"
10550 libdir="$alldirs"
10551 eval flag=\"$hardcode_libdir_flag_spec\"
10552 libdir="$acl_save_libdir"
10553 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10554 else
10555 for found_dir in $rpathdirs; do
10556 acl_save_libdir="$libdir"
10557 libdir="$found_dir"
10558 eval flag=\"$hardcode_libdir_flag_spec\"
10559 libdir="$acl_save_libdir"
10560 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10561 done
10562 fi
10563 fi
10564 if test "X$ltrpathdirs" != "X"; then
10565 for found_dir in $ltrpathdirs; do
10566 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10567 done
10568 fi
a9322a30
TT
10569
10570
81ecdfbb 10571 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10572
81ecdfbb
RW
10573 for element in $INCEXPAT; do
10574 haveit=
10575 for x in $CPPFLAGS; do
a9322a30 10576
81ecdfbb
RW
10577 acl_save_prefix="$prefix"
10578 prefix="$acl_final_prefix"
10579 acl_save_exec_prefix="$exec_prefix"
10580 exec_prefix="$acl_final_exec_prefix"
10581 eval x=\"$x\"
10582 exec_prefix="$acl_save_exec_prefix"
10583 prefix="$acl_save_prefix"
a8111142 10584
81ecdfbb
RW
10585 if test "X$x" = "X$element"; then
10586 haveit=yes
10587 break
10588 fi
10589 done
10590 if test -z "$haveit"; then
10591 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10592 fi
10593 done
a9322a30
TT
10594
10595
81ecdfbb
RW
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10597$as_echo_n "checking for libexpat... " >&6; }
10598if test "${ac_cv_libexpat+set}" = set; then :
10599 $as_echo_n "(cached) " >&6
bec39cab 10600else
bec39cab 10601
81ecdfbb
RW
10602 ac_save_LIBS="$LIBS"
10603 LIBS="$LIBS $LIBEXPAT"
10604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10605/* end confdefs.h. */
81ecdfbb
RW
10606#include "expat.h"
10607int
10608main ()
10609{
10610XML_Parser p = XML_ParserCreate (0);
10611 ;
10612 return 0;
10613}
bec39cab 10614_ACEOF
81ecdfbb
RW
10615if ac_fn_c_try_link "$LINENO"; then :
10616 ac_cv_libexpat=yes
c906108c 10617else
81ecdfbb 10618 ac_cv_libexpat=no
bec39cab 10619fi
81ecdfbb
RW
10620rm -f core conftest.err conftest.$ac_objext \
10621 conftest$ac_exeext conftest.$ac_ext
10622 LIBS="$ac_save_LIBS"
c906108c 10623
95ca63c4 10624fi
81ecdfbb
RW
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10626$as_echo "$ac_cv_libexpat" >&6; }
10627 if test "$ac_cv_libexpat" = yes; then
10628 HAVE_LIBEXPAT=yes
bec39cab 10629
81ecdfbb 10630$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10631
81ecdfbb
RW
10632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10633$as_echo_n "checking how to link with libexpat... " >&6; }
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10635$as_echo "$LIBEXPAT" >&6; }
10636 else
10637 HAVE_LIBEXPAT=no
10638 CPPFLAGS="$ac_save_CPPFLAGS"
10639 LIBEXPAT=
10640 LTLIBEXPAT=
10641 fi
95ca63c4
CF
10642
10643
10644
7cb9022a
MK
10645
10646
bec39cab 10647
81ecdfbb
RW
10648 if test "$HAVE_LIBEXPAT" != yes; then
10649 if test "$with_expat" = yes; then
10650 as_fn_error "expat is missing or unusable" "$LINENO" 5
10651 else
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10653$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10654 fi
10655 else
10656 save_LIBS=$LIBS
10657 LIBS="$LIBS $LIBEXPAT"
10658 for ac_func in XML_StopParser
10659do :
10660 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10661if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10662 cat >>confdefs.h <<_ACEOF
81ecdfbb 10663#define HAVE_XML_STOPPARSER 1
bec39cab 10664_ACEOF
95ca63c4 10665
bec39cab 10666fi
bec39cab 10667done
95ca63c4 10668
81ecdfbb
RW
10669 LIBS=$save_LIBS
10670 fi
a9322a30
TT
10671fi
10672
a9322a30 10673
a9322a30
TT
10674
10675
ec685c5e 10676
0c4a4063 10677
81ecdfbb
RW
10678# Check whether --with-python was given.
10679if test "${with_python+set}" = set; then :
10680 withval=$with_python;
bec39cab 10681else
81ecdfbb 10682 with_python=auto
bec39cab 10683fi
bec39cab 10684
81ecdfbb
RW
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10686$as_echo_n "checking whether to use python... " >&6; }
10687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10688$as_echo "$with_python" >&6; }
9a156167 10689
81ecdfbb
RW
10690if test "${with_python}" = no; then
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10692$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10693 have_libpython=no
bec39cab 10694else
81ecdfbb 10695 case "${with_python}" in
81ecdfbb 10696 /*)
ec685c5e
DE
10697 if test -d ${with_python}; then
10698 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10699 python_prog="${with_python}/bin/python"
0c4a4063 10700 python_prefix=
9c4ea6c5
JB
10701 # If python does not exit ${with_python}/bin, then try in
10702 # ${with_python}. On Windows/MinGW, this is where the Python
10703 # executable is.
10704 if test ! -x "${python_prog}"; then
10705 python_prog="${with_python}/python"
10706 python_prefix=
10707 fi
e7a30f46 10708 if test ! -x "${python_prog}"; then
ec685c5e
DE
10709 # Fall back to gdb 7.0/7.1 behaviour.
10710 python_prog=missing
0c4a4063 10711 python_prefix=${with_python}
ec685c5e 10712 fi
e7a30f46 10713 elif test -x "${with_python}"; then
ec685c5e
DE
10714 # While we can't run python compiled for $host (unless host == build),
10715 # the user could write a script that provides the needed information,
10716 # so we support that.
ec685c5e 10717 python_prog=${with_python}
0c4a4063 10718 python_prefix=
ec685c5e
DE
10719 else
10720 as_fn_error "invalid value for --with-python" "$LINENO" 5
10721 fi
81ecdfbb 10722 ;;
ec685c5e
DE
10723 */*)
10724 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10725 as_fn_error "invalid value for --with-python" "$LINENO" 5
10726 ;;
ec685c5e
DE
10727 *)
10728 # The user has either specified auto, yes, or the name of the python
10729 # program assumed to be in $PATH.
10730 python_prefix=
10731 case "${with_python}" in
10732 yes | auto)
10733 if test ${build} = ${host}; then
10734 # Extract the first word of "python", so it can be a program name with args.
10735set dummy python; ac_word=$2
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10737$as_echo_n "checking for $ac_word... " >&6; }
10738if test "${ac_cv_path_python_prog_path+set}" = set; then :
10739 $as_echo_n "(cached) " >&6
10740else
10741 case $python_prog_path in
10742 [\\/]* | ?:[\\/]*)
10743 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10744 ;;
10745 *)
10746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749 IFS=$as_save_IFS
10750 test -z "$as_dir" && as_dir=.
10751 for ac_exec_ext in '' $ac_executable_extensions; do
10752 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10753 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10755 break 2
10756 fi
10757done
10758 done
10759IFS=$as_save_IFS
10760
10761 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10762 ;;
10763esac
10764fi
10765python_prog_path=$ac_cv_path_python_prog_path
10766if test -n "$python_prog_path"; then
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10768$as_echo "$python_prog_path" >&6; }
10769else
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772fi
10773
10774
10775 if test "${python_prog_path}" = missing; then
10776 python_prog=missing
10777 else
10778 python_prog=${python_prog_path}
10779 fi
10780 else
10781 # Not much we can do except assume the cross-compiler will find the
10782 # right files.
10783 python_prog=missing
10784 fi
10785 ;;
10786 *)
10787 # While we can't run python compiled for $host (unless host == build),
10788 # the user could write a script that provides the needed information,
10789 # so we support that.
10790 python_prog="${with_python}"
10791 # Extract the first word of "${python_prog}", so it can be a program name with args.
10792set dummy ${python_prog}; ac_word=$2
10793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10794$as_echo_n "checking for $ac_word... " >&6; }
10795if test "${ac_cv_path_python_prog_path+set}" = set; then :
10796 $as_echo_n "(cached) " >&6
10797else
10798 case $python_prog_path in
10799 [\\/]* | ?:[\\/]*)
10800 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10801 ;;
10802 *)
10803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10804for as_dir in $PATH
10805do
10806 IFS=$as_save_IFS
10807 test -z "$as_dir" && as_dir=.
10808 for ac_exec_ext in '' $ac_executable_extensions; do
10809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10810 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10812 break 2
10813 fi
10814done
10815 done
10816IFS=$as_save_IFS
10817
10818 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10819 ;;
10820esac
10821fi
10822python_prog_path=$ac_cv_path_python_prog_path
10823if test -n "$python_prog_path"; then
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10825$as_echo "$python_prog_path" >&6; }
10826else
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832 if test "${python_prog_path}" = missing; then
10833 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10834 fi
10835 ;;
10836 esac
81ecdfbb
RW
10837 esac
10838
ec685c5e 10839 if test "${python_prog}" != missing; then
e7a30f46
DE
10840 # We have a python program to use, but it may be too old.
10841 # Don't flag an error for --with-python=auto (the default).
10842 have_python_config=yes
ec685c5e
DE
10843 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10844 if test $? != 0; then
e7a30f46
DE
10845 have_python_config=failed
10846 if test "${with_python}" != auto; then
10847 as_fn_error "failure running python-config --includes" "$LINENO" 5
10848 fi
ec685c5e
DE
10849 fi
10850 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10851 if test $? != 0; then
e7a30f46
DE
10852 have_python_config=failed
10853 if test "${with_python}" != auto; then
10854 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10855 fi
ec685c5e 10856 fi
0c4a4063
DE
10857 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10858 if test $? != 0; then
e7a30f46
DE
10859 have_python_config=failed
10860 if test "${with_python}" != auto; then
10861 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10862 fi
0c4a4063 10863 fi
ec685c5e 10864 else
ac534cba
JB
10865 # We do not have a python executable we can use to determine where
10866 # to find the Python headers and libs. We cannot guess the include
10867 # path from the python_prefix either, because that include path
10868 # depends on the Python version. So, there is nothing much we can
10869 # do except assume that the compiler will be able to find those files.
10870 python_includes=
10871 python_libs=
0c4a4063 10872 have_python_config=no
ec685c5e 10873 fi
bec39cab 10874
ec685c5e
DE
10875 # If we have python-config, only try the configuration it provides.
10876 # Otherwise fallback on the old way of trying different versions of
10877 # python in turn.
81ecdfbb 10878
ec685c5e
DE
10879 have_libpython=no
10880 if test "${have_python_config}" = yes; then
c1039e3c
JB
10881 # Determine the Python version by extracting "-lpython<version>"
10882 # part of the python_libs. <version> is usually X.Y with X and Y
10883 # being decimal numbers, but can also be XY (seen on Windows).
10884 #
10885 # The extraction is performed using sed with a regular expression.
10886 # Initially, the regexp used was using the '?' quantifier to make
10887 # the dot in the version number optional. Unfortunately, this
10888 # does not work with non-GNU versions of sed because, because of
10889 # what looks like a limitation (the '?' quantifier does not work
10890 # with back-references). We work around this limitation by using
10891 # the '*' quantifier instead. It means that, in theory, we might
10892 # match unexpected version strings such as "-lpython2..7", but
10893 # this seems unlikely in practice. And even if that happens,
10894 # an error will be triggered later on, when checking that version
10895 # number.
ec685c5e 10896 python_version=`echo " ${python_libs} " \
c1039e3c 10897 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10898 case "${python_version}" in
10899 python*)
ec685c5e
DE
10900
10901 version=${python_version}
10902
10903 new_CPPFLAGS=${python_includes}
10904 new_LIBS=${python_libs}
81ecdfbb
RW
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10906$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10907 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10908 save_LIBS=$LIBS
ec685c5e
DE
10909 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10910 LIBS="$LIBS $new_LIBS"
10911 found_usable_python=no
81ecdfbb 10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10913/* end confdefs.h. */
ac534cba 10914#include "Python.h"
81ecdfbb
RW
10915int
10916main ()
10917{
10918Py_Initialize ();
10919 ;
10920 return 0;
10921}
bec39cab 10922_ACEOF
81ecdfbb 10923if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10924 have_libpython=${version}
10925 found_usable_python=yes
ac534cba
JB
10926 PYTHON_CPPFLAGS=$new_CPPFLAGS
10927 PYTHON_LIBS=$new_LIBS
9a156167 10928fi
81ecdfbb
RW
10929rm -f core conftest.err conftest.$ac_objext \
10930 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10931 CPPFLAGS=$save_CPPFLAGS
10932 LIBS=$save_LIBS
ec685c5e
DE
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10934$as_echo "${found_usable_python}" >&6; }
9a156167 10935
0c4a4063
DE
10936 ;;
10937 *)
ec685c5e 10938 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10939 ;;
10940 esac
e7a30f46 10941 elif test "${have_python_config}" != failed; then
ec685c5e 10942 if test "${have_libpython}" = no; then
9a156167 10943
420697bb
TT
10944 version=python2.7
10945
10946 new_CPPFLAGS=${python_includes}
10947 new_LIBS="${python_libs} -lpython2.7"
10948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10949$as_echo_n "checking for ${version}... " >&6; }
10950 save_CPPFLAGS=$CPPFLAGS
10951 save_LIBS=$LIBS
10952 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10953 LIBS="$LIBS $new_LIBS"
10954 found_usable_python=no
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956/* end confdefs.h. */
ac534cba 10957#include "Python.h"
420697bb
TT
10958int
10959main ()
10960{
10961Py_Initialize ();
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966if ac_fn_c_try_link "$LINENO"; then :
10967 have_libpython=${version}
10968 found_usable_python=yes
ac534cba
JB
10969 PYTHON_CPPFLAGS=$new_CPPFLAGS
10970 PYTHON_LIBS=$new_LIBS
420697bb
TT
10971fi
10972rm -f core conftest.err conftest.$ac_objext \
10973 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10974 CPPFLAGS=$save_CPPFLAGS
10975 LIBS=$save_LIBS
420697bb
TT
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10977$as_echo "${found_usable_python}" >&6; }
10978
10979 fi
10980 if test "${have_libpython}" = no; then
10981
ec685c5e
DE
10982 version=python2.6
10983
10984 new_CPPFLAGS=${python_includes}
10985 new_LIBS="${python_libs} -lpython2.6"
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10987$as_echo_n "checking for ${version}... " >&6; }
10988 save_CPPFLAGS=$CPPFLAGS
10989 save_LIBS=$LIBS
10990 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10991 LIBS="$LIBS $new_LIBS"
10992 found_usable_python=no
10993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10994/* end confdefs.h. */
ac534cba 10995#include "Python.h"
ec685c5e
DE
10996int
10997main ()
10998{
10999Py_Initialize ();
11000 ;
11001 return 0;
11002}
11003_ACEOF
11004if ac_fn_c_try_link "$LINENO"; then :
11005 have_libpython=${version}
11006 found_usable_python=yes
ac534cba
JB
11007 PYTHON_CPPFLAGS=$new_CPPFLAGS
11008 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
11009fi
11010rm -f core conftest.err conftest.$ac_objext \
11011 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11012 CPPFLAGS=$save_CPPFLAGS
11013 LIBS=$save_LIBS
ec685c5e
DE
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11015$as_echo "${found_usable_python}" >&6; }
9a156167 11016
81ecdfbb 11017 fi
ec685c5e 11018 if test ${have_libpython} = no; then
9a156167 11019
81ecdfbb 11020 version=python2.5
9a156167 11021
ec685c5e
DE
11022 new_CPPFLAGS=${python_includes}
11023 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11025$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11026 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11027 save_LIBS=$LIBS
ec685c5e
DE
11028 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11029 LIBS="$LIBS $new_LIBS"
11030 found_usable_python=no
81ecdfbb 11031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11032/* end confdefs.h. */
ac534cba 11033#include "Python.h"
81ecdfbb
RW
11034int
11035main ()
11036{
11037Py_Initialize ();
11038 ;
11039 return 0;
11040}
436868fb 11041_ACEOF
81ecdfbb 11042if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11043 have_libpython=${version}
11044 found_usable_python=yes
ac534cba
JB
11045 PYTHON_CPPFLAGS=$new_CPPFLAGS
11046 PYTHON_LIBS=$new_LIBS
436868fb 11047fi
81ecdfbb
RW
11048rm -f core conftest.err conftest.$ac_objext \
11049 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11050 CPPFLAGS=$save_CPPFLAGS
11051 LIBS=$save_LIBS
ec685c5e
DE
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11053$as_echo "${found_usable_python}" >&6; }
a9322a30 11054
81ecdfbb 11055 fi
ec685c5e 11056 if test ${have_libpython} = no; then
a9322a30 11057
81ecdfbb 11058 version=python2.4
a9322a30 11059
ec685c5e
DE
11060 new_CPPFLAGS=${python_includes}
11061 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11063$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11064 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11065 save_LIBS=$LIBS
ec685c5e
DE
11066 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11067 LIBS="$LIBS $new_LIBS"
11068 found_usable_python=no
81ecdfbb 11069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11070/* end confdefs.h. */
ac534cba 11071#include "Python.h"
a9322a30
TT
11072int
11073main ()
11074{
81ecdfbb 11075Py_Initialize ();
a9322a30
TT
11076 ;
11077 return 0;
11078}
436868fb 11079_ACEOF
81ecdfbb 11080if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11081 have_libpython=${version}
11082 found_usable_python=yes
ac534cba
JB
11083 PYTHON_CPPFLAGS=$new_CPPFLAGS
11084 PYTHON_LIBS=$new_LIBS
436868fb 11085fi
81ecdfbb
RW
11086rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11088 CPPFLAGS=$save_CPPFLAGS
11089 LIBS=$save_LIBS
ec685c5e
DE
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11091$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11092
ec685c5e
DE
11093 fi
11094 fi
9c4ea6c5 11095 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
11096
11097$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
11098
9c4ea6c5 11099 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
11100
11101$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
11102
9c4ea6c5 11103 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
11104
11105$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
11106
9c4ea6c5 11107 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
11108
11109$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
11110
81ecdfbb 11111 fi
ec685c5e
DE
11112
11113 if test "${have_libpython}" = no; then
81ecdfbb
RW
11114 case "${with_python}" in
11115 yes)
11116 as_fn_error "python is missing or unusable" "$LINENO" 5
11117 ;;
11118 auto)
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11120$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11121 ;;
11122 *)
11123 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11124 ;;
11125 esac
0c4a4063
DE
11126 else
11127 if test -n "${python_prefix}"; then
11128
11129cat >>confdefs.h <<_ACEOF
11130#define WITH_PYTHON_PATH "${python_prefix}"
11131_ACEOF
11132
11133
11134 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11135 if test "x$prefix" = xNONE; then
11136 test_prefix=/usr/local
11137 else
11138 test_prefix=$prefix
11139 fi
11140 else
11141 test_prefix=$exec_prefix
11142 fi
11143 value=0
11144 case ${python_prefix} in
11145 "${test_prefix}"|"${test_prefix}/"*|\
11146 '${exec_prefix}'|'${exec_prefix}/'*)
11147 value=1
11148 ;;
11149 esac
11150
11151cat >>confdefs.h <<_ACEOF
11152#define PYTHON_PATH_RELOCATABLE $value
11153_ACEOF
11154
11155
11156 fi
81ecdfbb 11157 fi
436868fb 11158fi
436868fb 11159
ec685c5e 11160if test "${have_libpython}" != no; then
436868fb 11161
81ecdfbb 11162$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11163
81ecdfbb
RW
11164 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11165 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11166 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11167 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11168 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11169
81ecdfbb
RW
11170 # Flags needed to compile Python code (taken from python-config --cflags).
11171 # We cannot call python-config directly because it will output whatever was
11172 # used when compiling the Python interpreter itself, including flags which
11173 # would make the python-related objects be compiled differently from the
11174 # rest of GDB (e.g., -O2 and -fPIC).
11175 if test "${GCC}" = yes; then
11176 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11177 fi
436868fb 11178
81ecdfbb
RW
11179 if test "x${tentative_python_cflags}" != x; then
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11181$as_echo_n "checking compiler flags for python code... " >&6; }
11182 for flag in ${tentative_python_cflags}; do
11183 # Check that the compiler accepts it
11184 saved_CFLAGS="$CFLAGS"
11185 CFLAGS="$CFLAGS $flag"
11186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11187/* end confdefs.h. */
81ecdfbb 11188
a9322a30
TT
11189int
11190main ()
11191{
a9322a30
TT
11192
11193 ;
11194 return 0;
11195}
bec39cab 11196_ACEOF
81ecdfbb
RW
11197if ac_fn_c_try_compile "$LINENO"; then :
11198 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11199fi
81ecdfbb
RW
11200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11201 CFLAGS="$saved_CFLAGS"
11202 done
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11204$as_echo "${PYTHON_CFLAGS}" >&6; }
11205 fi
043b6510
JB
11206
11207 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11208 # #if _SGIAPI
11209 # #define siginfo __siginfo
11210 # #endif
11211 # The problem is that including Python causes some XOPEN macros to be
11212 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11213 # to false. So, we work around this issue by defining siginfo ourself
11214 # though the command-line.
11215 case "$gdb_host" in
11216 irix*) if test "${GCC}" = yes; then
11217 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11218 fi
11219 ;;
11220 esac
81ecdfbb
RW
11221else
11222 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11223 # included.
11224 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11225 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11226 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11227fi
9a156167 11228
9a156167 11229
ac534cba
JB
11230
11231
81ecdfbb
RW
11232# ------------------------- #
11233# Checks for header files. #
11234# ------------------------- #
c890192f 11235
81ecdfbb
RW
11236ac_header_dirent=no
11237for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11238 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11240$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11241if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11242 $as_echo_n "(cached) " >&6
bec39cab 11243else
81ecdfbb 11244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11245/* end confdefs.h. */
81ecdfbb
RW
11246#include <sys/types.h>
11247#include <$ac_hdr>
11248
a9322a30
TT
11249int
11250main ()
11251{
81ecdfbb
RW
11252if ((DIR *) 0)
11253return 0;
a9322a30
TT
11254 ;
11255 return 0;
11256}
bec39cab 11257_ACEOF
81ecdfbb
RW
11258if ac_fn_c_try_compile "$LINENO"; then :
11259 eval "$as_ac_Header=yes"
bec39cab 11260else
81ecdfbb 11261 eval "$as_ac_Header=no"
bec39cab 11262fi
81ecdfbb 11263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11264fi
81ecdfbb
RW
11265eval ac_res=\$$as_ac_Header
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11267$as_echo "$ac_res" >&6; }
11268eval as_val=\$$as_ac_Header
11269 if test "x$as_val" = x""yes; then :
11270 cat >>confdefs.h <<_ACEOF
11271#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11272_ACEOF
bec39cab 11273
81ecdfbb
RW
11274ac_header_dirent=$ac_hdr; break
11275fi
bec39cab 11276
81ecdfbb
RW
11277done
11278# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11279if test $ac_header_dirent = dirent.h; then
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11281$as_echo_n "checking for library containing opendir... " >&6; }
11282if test "${ac_cv_search_opendir+set}" = set; then :
11283 $as_echo_n "(cached) " >&6
c890192f 11284else
81ecdfbb
RW
11285 ac_func_search_save_LIBS=$LIBS
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287/* end confdefs.h. */
11288
11289/* Override any GCC internal prototype to avoid an error.
11290 Use char because int might match the return type of a GCC
11291 builtin and then its argument prototype would still apply. */
11292#ifdef __cplusplus
11293extern "C"
11294#endif
11295char opendir ();
11296int
11297main ()
11298{
11299return opendir ();
11300 ;
11301 return 0;
11302}
bec39cab 11303_ACEOF
81ecdfbb
RW
11304for ac_lib in '' dir; do
11305 if test -z "$ac_lib"; then
11306 ac_res="none required"
11307 else
11308 ac_res=-l$ac_lib
11309 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11310 fi
11311 if ac_fn_c_try_link "$LINENO"; then :
11312 ac_cv_search_opendir=$ac_res
11313fi
11314rm -f core conftest.err conftest.$ac_objext \
11315 conftest$ac_exeext
11316 if test "${ac_cv_search_opendir+set}" = set; then :
11317 break
11318fi
11319done
11320if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11321
81ecdfbb
RW
11322else
11323 ac_cv_search_opendir=no
11324fi
11325rm conftest.$ac_ext
11326LIBS=$ac_func_search_save_LIBS
11327fi
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11329$as_echo "$ac_cv_search_opendir" >&6; }
11330ac_res=$ac_cv_search_opendir
11331if test "$ac_res" != no; then :
11332 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11333
bec39cab 11334fi
81ecdfbb 11335
bec39cab 11336else
81ecdfbb
RW
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11338$as_echo_n "checking for library containing opendir... " >&6; }
11339if test "${ac_cv_search_opendir+set}" = set; then :
11340 $as_echo_n "(cached) " >&6
11341else
11342 ac_func_search_save_LIBS=$LIBS
11343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11344/* end confdefs.h. */
81ecdfbb
RW
11345
11346/* Override any GCC internal prototype to avoid an error.
11347 Use char because int might match the return type of a GCC
11348 builtin and then its argument prototype would still apply. */
11349#ifdef __cplusplus
11350extern "C"
11351#endif
11352char opendir ();
a9322a30
TT
11353int
11354main ()
11355{
81ecdfbb 11356return opendir ();
a9322a30
TT
11357 ;
11358 return 0;
11359}
bec39cab 11360_ACEOF
81ecdfbb
RW
11361for ac_lib in '' x; do
11362 if test -z "$ac_lib"; then
11363 ac_res="none required"
11364 else
11365 ac_res=-l$ac_lib
11366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11367 fi
11368 if ac_fn_c_try_link "$LINENO"; then :
11369 ac_cv_search_opendir=$ac_res
11370fi
11371rm -f core conftest.err conftest.$ac_objext \
11372 conftest$ac_exeext
11373 if test "${ac_cv_search_opendir+set}" = set; then :
11374 break
11375fi
11376done
11377if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11378
81ecdfbb
RW
11379else
11380 ac_cv_search_opendir=no
bec39cab 11381fi
81ecdfbb
RW
11382rm conftest.$ac_ext
11383LIBS=$ac_func_search_save_LIBS
a9322a30 11384fi
81ecdfbb
RW
11385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11386$as_echo "$ac_cv_search_opendir" >&6; }
11387ac_res=$ac_cv_search_opendir
11388if test "$ac_res" != no; then :
11389 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11390
81ecdfbb 11391fi
bec39cab 11392
81ecdfbb 11393fi
bec39cab 11394
81ecdfbb
RW
11395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11396$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11397if test "${ac_cv_header_stat_broken+set}" = set; then :
11398 $as_echo_n "(cached) " >&6
9a156167 11399else
81ecdfbb
RW
11400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401/* end confdefs.h. */
11402#include <sys/types.h>
11403#include <sys/stat.h>
11404
11405#if defined S_ISBLK && defined S_IFDIR
11406extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11407#endif
11408
11409#if defined S_ISBLK && defined S_IFCHR
11410extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11411#endif
11412
11413#if defined S_ISLNK && defined S_IFREG
11414extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11415#endif
11416
11417#if defined S_ISSOCK && defined S_IFREG
11418extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11419#endif
11420
bec39cab 11421_ACEOF
81ecdfbb
RW
11422if ac_fn_c_try_compile "$LINENO"; then :
11423 ac_cv_header_stat_broken=no
11424else
11425 ac_cv_header_stat_broken=yes
11426fi
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11428fi
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11430$as_echo "$ac_cv_header_stat_broken" >&6; }
11431if test $ac_cv_header_stat_broken = yes; then
9a156167 11432
81ecdfbb 11433$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11434
bec39cab 11435fi
81ecdfbb
RW
11436
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11438$as_echo_n "checking for ANSI C header files... " >&6; }
11439if test "${ac_cv_header_stdc+set}" = set; then :
11440 $as_echo_n "(cached) " >&6
bec39cab 11441else
81ecdfbb 11442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11443/* end confdefs.h. */
81ecdfbb
RW
11444#include <stdlib.h>
11445#include <stdarg.h>
11446#include <string.h>
11447#include <float.h>
11448
a9322a30
TT
11449int
11450main ()
11451{
a9322a30
TT
11452
11453 ;
11454 return 0;
11455}
bec39cab 11456_ACEOF
81ecdfbb
RW
11457if ac_fn_c_try_compile "$LINENO"; then :
11458 ac_cv_header_stdc=yes
bec39cab 11459else
81ecdfbb 11460 ac_cv_header_stdc=no
a9322a30 11461fi
81ecdfbb 11462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11463
81ecdfbb
RW
11464if test $ac_cv_header_stdc = yes; then
11465 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467/* end confdefs.h. */
11468#include <string.h>
bec39cab 11469
81ecdfbb
RW
11470_ACEOF
11471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11472 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11473
bec39cab 11474else
81ecdfbb
RW
11475 ac_cv_header_stdc=no
11476fi
11477rm -f conftest*
11478
11479fi
11480
11481if test $ac_cv_header_stdc = yes; then
11482 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11484/* end confdefs.h. */
11485#include <stdlib.h>
11486
bec39cab 11487_ACEOF
81ecdfbb
RW
11488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11489 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11490
81ecdfbb
RW
11491else
11492 ac_cv_header_stdc=no
11493fi
11494rm -f conftest*
bec39cab 11495
bec39cab 11496fi
81ecdfbb
RW
11497
11498if test $ac_cv_header_stdc = yes; then
11499 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11500 if test "$cross_compiling" = yes; then :
11501 :
bec39cab 11502else
81ecdfbb 11503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11504/* end confdefs.h. */
81ecdfbb
RW
11505#include <ctype.h>
11506#include <stdlib.h>
11507#if ((' ' & 0x0FF) == 0x020)
11508# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11509# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11510#else
11511# define ISLOWER(c) \
11512 (('a' <= (c) && (c) <= 'i') \
11513 || ('j' <= (c) && (c) <= 'r') \
11514 || ('s' <= (c) && (c) <= 'z'))
11515# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11516#endif
11517
11518#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11519int
11520main ()
11521{
81ecdfbb
RW
11522 int i;
11523 for (i = 0; i < 256; i++)
11524 if (XOR (islower (i), ISLOWER (i))
11525 || toupper (i) != TOUPPER (i))
11526 return 2;
a9322a30
TT
11527 return 0;
11528}
bec39cab 11529_ACEOF
81ecdfbb
RW
11530if ac_fn_c_try_run "$LINENO"; then :
11531
bec39cab 11532else
81ecdfbb
RW
11533 ac_cv_header_stdc=no
11534fi
11535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11536 conftest.$ac_objext conftest.beam conftest.$ac_ext
11537fi
bec39cab 11538
bec39cab 11539fi
a9322a30 11540fi
81ecdfbb
RW
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11542$as_echo "$ac_cv_header_stdc" >&6; }
11543if test $ac_cv_header_stdc = yes; then
bec39cab 11544
81ecdfbb 11545$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11546
81ecdfbb 11547fi
bec39cab 11548
81ecdfbb
RW
11549# elf_hp.h is for HP/UX 64-bit shared library support.
11550# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11551# unconditionally, so what's the point in checking these?
11552for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11553 thread_db.h gnu/libc-version.h signal.h stddef.h \
11554 stdlib.h string.h memory.h strings.h sys/fault.h \
11555 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11556 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11557 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11558 sys/types.h sys/wait.h wait.h termios.h termio.h \
11559 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11560do :
11561 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11562ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11563eval as_val=\$$as_ac_Header
11564 if test "x$as_val" = x""yes; then :
bec39cab 11565 cat >>confdefs.h <<_ACEOF
81ecdfbb 11566#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11567_ACEOF
c906108c 11568
bec39cab 11569fi
81ecdfbb
RW
11570
11571done
11572
11573for ac_header in link.h
11574do :
11575 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11576# include <sys/types.h>
11577#endif
11578#if HAVE_NLIST_H
11579# include <nlist.h>
a9322a30
TT
11580#endif
11581
81ecdfbb
RW
11582"
11583if test "x$ac_cv_header_link_h" = x""yes; then :
11584 cat >>confdefs.h <<_ACEOF
11585#define HAVE_LINK_H 1
bec39cab 11586_ACEOF
bec39cab 11587
a9322a30 11588fi
bec39cab 11589
81ecdfbb 11590done
c906108c 11591
81ecdfbb
RW
11592for ac_header in sys/proc.h
11593do :
11594 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11595# include <sys/param.h>
11596#endif
c906108c 11597
81ecdfbb
RW
11598"
11599if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11600 cat >>confdefs.h <<_ACEOF
81ecdfbb 11601#define HAVE_SYS_PROC_H 1
bec39cab 11602_ACEOF
5ee754fc 11603
bec39cab 11604fi
81ecdfbb
RW
11605
11606done
11607
11608for ac_header in sys/user.h
11609do :
11610 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11611# include <sys/param.h>
a9322a30
TT
11612#endif
11613
81ecdfbb
RW
11614"
11615if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11616 cat >>confdefs.h <<_ACEOF
11617#define HAVE_SYS_USER_H 1
bec39cab 11618_ACEOF
bec39cab 11619
a9322a30 11620fi
bec39cab 11621
81ecdfbb 11622done
5ee754fc 11623
5ee754fc 11624
81ecdfbb
RW
11625# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11626# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11627# think that we don't have <curses.h> if we're using GCC.
11628case $host_os in
11629 solaris2.[789])
11630 if test "$GCC" = yes; then
11631
11632$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11633
11634 fi ;;
11635esac
11636for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11637do :
11638 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11639ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11640eval as_val=\$$as_ac_Header
11641 if test "x$as_val" = x""yes; then :
bec39cab 11642 cat >>confdefs.h <<_ACEOF
81ecdfbb 11643#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11644_ACEOF
5ee754fc
MK
11645
11646fi
11647
81ecdfbb 11648done
bec39cab 11649
81ecdfbb
RW
11650for ac_header in term.h
11651do :
11652 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11653# include <curses.h>
11654#endif
bec39cab 11655
81ecdfbb
RW
11656"
11657if test "x$ac_cv_header_term_h" = x""yes; then :
11658 cat >>confdefs.h <<_ACEOF
11659#define HAVE_TERM_H 1
a8111142 11660_ACEOF
a8111142 11661
a8111142 11662fi
a8111142 11663
81ecdfbb 11664done
a8111142
TT
11665
11666
81ecdfbb
RW
11667# ------------------------- #
11668# Checks for declarations. #
11669# ------------------------- #
a9322a30 11670
81ecdfbb
RW
11671ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11672if test "x$ac_cv_have_decl_free" = x""yes; then :
11673 ac_have_decl=1
bec39cab 11674else
81ecdfbb
RW
11675 ac_have_decl=0
11676fi
11677
11678cat >>confdefs.h <<_ACEOF
11679#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11680_ACEOF
81ecdfbb
RW
11681ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11682if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11683 ac_have_decl=1
11684else
11685 ac_have_decl=0
11686fi
11687
11688cat >>confdefs.h <<_ACEOF
11689#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11690_ACEOF
81ecdfbb
RW
11691ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11692if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11693 ac_have_decl=1
bec39cab 11694else
81ecdfbb
RW
11695 ac_have_decl=0
11696fi
bec39cab 11697
81ecdfbb
RW
11698cat >>confdefs.h <<_ACEOF
11699#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11700_ACEOF
81ecdfbb
RW
11701ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11702if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11703 ac_have_decl=1
11704else
11705 ac_have_decl=0
11706fi
11707
11708cat >>confdefs.h <<_ACEOF
11709#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11710_ACEOF
81ecdfbb
RW
11711ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11712if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11713 ac_have_decl=1
bec39cab 11714else
81ecdfbb
RW
11715 ac_have_decl=0
11716fi
5ee754fc 11717
81ecdfbb
RW
11718cat >>confdefs.h <<_ACEOF
11719#define HAVE_DECL_STRSTR $ac_have_decl
11720_ACEOF
11721ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11722if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11723 ac_have_decl=1
11724else
11725 ac_have_decl=0
5ee754fc 11726fi
81ecdfbb
RW
11727
11728cat >>confdefs.h <<_ACEOF
11729#define HAVE_DECL_GETOPT $ac_have_decl
11730_ACEOF
11731ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11732if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11733 ac_have_decl=1
11734else
11735 ac_have_decl=0
5ee754fc 11736fi
81ecdfbb
RW
11737
11738cat >>confdefs.h <<_ACEOF
11739#define HAVE_DECL_SNPRINTF $ac_have_decl
11740_ACEOF
11741ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11742if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11743 ac_have_decl=1
11744else
11745 ac_have_decl=0
5ee754fc
MK
11746fi
11747
a9322a30 11748cat >>confdefs.h <<_ACEOF
81ecdfbb 11749#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11750_ACEOF
5ee754fc 11751
5ee754fc 11752
81ecdfbb
RW
11753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11754$as_echo_n "checking for LC_MESSAGES... " >&6; }
11755if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11756 $as_echo_n "(cached) " >&6
bec39cab 11757else
81ecdfbb 11758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11759/* end confdefs.h. */
81ecdfbb 11760#include <locale.h>
a9322a30
TT
11761int
11762main ()
11763{
81ecdfbb 11764return LC_MESSAGES
a9322a30
TT
11765 ;
11766 return 0;
11767}
bec39cab 11768_ACEOF
81ecdfbb
RW
11769if ac_fn_c_try_link "$LINENO"; then :
11770 am_cv_val_LC_MESSAGES=yes
bec39cab 11771else
81ecdfbb
RW
11772 am_cv_val_LC_MESSAGES=no
11773fi
11774rm -f core conftest.err conftest.$ac_objext \
11775 conftest$ac_exeext conftest.$ac_ext
11776fi
11777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11778$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11779 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11780
81ecdfbb
RW
11781$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11782
11783 fi
11784
11785
11786# ----------------------- #
11787# Checks for structures. #
11788# ----------------------- #
11789
11790ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11791if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11792
11793cat >>confdefs.h <<_ACEOF
11794#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11795_ACEOF
7eb368b3 11796
81ecdfbb 11797
7eb368b3 11798fi
81ecdfbb
RW
11799ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11800if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11801
a9322a30
TT
11802cat >>confdefs.h <<_ACEOF
11803#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11804_ACEOF
11805
a9322a30 11806
7eb368b3
NR
11807fi
11808
7eb368b3 11809
a9322a30
TT
11810# ------------------ #
11811# Checks for types. #
11812# ------------------ #
7eb368b3 11813
81ecdfbb
RW
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11815$as_echo_n "checking return type of signal handlers... " >&6; }
11816if test "${ac_cv_type_signal+set}" = set; then :
11817 $as_echo_n "(cached) " >&6
bec39cab 11818else
81ecdfbb 11819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11820/* end confdefs.h. */
a9322a30
TT
11821#include <sys/types.h>
11822#include <signal.h>
7cb9022a 11823
a9322a30
TT
11824int
11825main ()
11826{
81ecdfbb 11827return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11828 ;
11829 return 0;
11830}
bec39cab 11831_ACEOF
81ecdfbb
RW
11832if ac_fn_c_try_compile "$LINENO"; then :
11833 ac_cv_type_signal=int
bec39cab 11834else
81ecdfbb 11835 ac_cv_type_signal=void
bec39cab 11836fi
81ecdfbb 11837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11838fi
81ecdfbb
RW
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11840$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11841
a9322a30
TT
11842cat >>confdefs.h <<_ACEOF
11843#define RETSIGTYPE $ac_cv_type_signal
11844_ACEOF
5ee754fc 11845
bec39cab 11846
81ecdfbb 11847ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11848#include <sys/socket.h>
11849
81ecdfbb
RW
11850"
11851if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11852
a9322a30
TT
11853cat >>confdefs.h <<_ACEOF
11854#define HAVE_SOCKLEN_T 1
11855_ACEOF
11856
11857
11858fi
11859
11860
11861# ------------------------------------- #
11862# Checks for compiler characteristics. #
11863# ------------------------------------- #
11864
81ecdfbb
RW
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11866$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11867if test "${ac_cv_c_const+set}" = set; then :
11868 $as_echo_n "(cached) " >&6
a9322a30 11869else
81ecdfbb 11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11871/* end confdefs.h. */
a9322a30
TT
11872
11873int
11874main ()
11875{
11876/* FIXME: Include the comments suggested by Paul. */
11877#ifndef __cplusplus
11878 /* Ultrix mips cc rejects this. */
11879 typedef int charset[2];
81ecdfbb 11880 const charset cs;
a9322a30 11881 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11882 char const *const *pcpcc;
11883 char **ppc;
a9322a30
TT
11884 /* NEC SVR4.0.2 mips cc rejects this. */
11885 struct point {int x, y;};
11886 static struct point const zero = {0,0};
11887 /* AIX XL C 1.02.0.0 rejects this.
11888 It does not let you subtract one const X* pointer from another in
11889 an arm of an if-expression whose if-part is not a constant
11890 expression */
11891 const char *g = "string";
81ecdfbb 11892 pcpcc = &g + (g ? g-g : 0);
a9322a30 11893 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11894 ++pcpcc;
11895 ppc = (char**) pcpcc;
11896 pcpcc = (char const *const *) ppc;
a9322a30
TT
11897 { /* SCO 3.2v4 cc rejects this. */
11898 char *t;
11899 char const *s = 0 ? (char *) 0 : (char const *) 0;
11900
11901 *t++ = 0;
81ecdfbb 11902 if (s) return 0;
a9322a30
TT
11903 }
11904 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11905 int x[] = {25, 17};
11906 const int *foo = &x[0];
11907 ++foo;
11908 }
11909 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11910 typedef const int *iptr;
11911 iptr p = 0;
11912 ++p;
11913 }
11914 { /* AIX XL C 1.02.0.0 rejects this saying
11915 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11916 struct s { int j; const int *ap[3]; };
11917 struct s *b; b->j = 5;
11918 }
11919 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11920 const int foo = 10;
81ecdfbb 11921 if (!foo) return 0;
a9322a30 11922 }
81ecdfbb 11923 return !cs[0] && !zero.x;
a9322a30
TT
11924#endif
11925
11926 ;
11927 return 0;
11928}
bec39cab 11929_ACEOF
81ecdfbb 11930if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11931 ac_cv_c_const=yes
5ee754fc 11932else
81ecdfbb 11933 ac_cv_c_const=no
5ee754fc 11934fi
81ecdfbb 11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11936fi
81ecdfbb
RW
11937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11938$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11939if test $ac_cv_c_const = no; then
bec39cab 11940
81ecdfbb 11941$as_echo "#define const /**/" >>confdefs.h
bec39cab 11942
5ee754fc 11943fi
bec39cab 11944
81ecdfbb
RW
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11946$as_echo_n "checking for inline... " >&6; }
11947if test "${ac_cv_c_inline+set}" = set; then :
11948 $as_echo_n "(cached) " >&6
bec39cab 11949else
a9322a30
TT
11950 ac_cv_c_inline=no
11951for ac_kw in inline __inline__ __inline; do
81ecdfbb 11952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11953/* end confdefs.h. */
a9322a30
TT
11954#ifndef __cplusplus
11955typedef int foo_t;
11956static $ac_kw foo_t static_foo () {return 0; }
11957$ac_kw foo_t foo () {return 0; }
11958#endif
11959
bec39cab 11960_ACEOF
81ecdfbb
RW
11961if ac_fn_c_try_compile "$LINENO"; then :
11962 ac_cv_c_inline=$ac_kw
bec39cab 11963fi
81ecdfbb
RW
11964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11965 test "$ac_cv_c_inline" != no && break
a9322a30 11966done
bec39cab 11967
5ee754fc 11968fi
81ecdfbb
RW
11969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11970$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11971
a9322a30
TT
11972case $ac_cv_c_inline in
11973 inline | yes) ;;
11974 *)
11975 case $ac_cv_c_inline in
11976 no) ac_val=;;
11977 *) ac_val=$ac_cv_c_inline;;
11978 esac
11979 cat >>confdefs.h <<_ACEOF
11980#ifndef __cplusplus
11981#define inline $ac_val
11982#endif
11983_ACEOF
bec39cab
AC
11984 ;;
11985esac
bec39cab 11986
81ecdfbb
RW
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11988$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11989if test "${ac_cv_c_bigendian+set}" = set; then :
11990 $as_echo_n "(cached) " >&6
bec39cab 11991else
81ecdfbb
RW
11992 ac_cv_c_bigendian=unknown
11993 # See if we're dealing with a universal compiler.
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995/* end confdefs.h. */
11996#ifndef __APPLE_CC__
11997 not a universal capable compiler
11998 #endif
11999 typedef int dummy;
12000
12001_ACEOF
12002if ac_fn_c_try_compile "$LINENO"; then :
12003
12004 # Check for potential -arch flags. It is not universal unless
12005 # there are at least two -arch flags with different values.
12006 ac_arch=
12007 ac_prev=
12008 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12009 if test -n "$ac_prev"; then
12010 case $ac_word in
12011 i?86 | x86_64 | ppc | ppc64)
12012 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12013 ac_arch=$ac_word
12014 else
12015 ac_cv_c_bigendian=universal
12016 break
12017 fi
12018 ;;
12019 esac
12020 ac_prev=
12021 elif test "x$ac_word" = "x-arch"; then
12022 ac_prev=arch
12023 fi
12024 done
12025fi
12026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12027 if test $ac_cv_c_bigendian = unknown; then
12028 # See if sys/param.h defines the BYTE_ORDER macro.
12029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12030/* end confdefs.h. */
a9322a30 12031#include <sys/types.h>
81ecdfbb 12032 #include <sys/param.h>
a9322a30
TT
12033
12034int
12035main ()
12036{
81ecdfbb
RW
12037#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12038 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12039 && LITTLE_ENDIAN)
12040 bogus endian macros
12041 #endif
a9322a30
TT
12042
12043 ;
12044 return 0;
12045}
bec39cab 12046_ACEOF
81ecdfbb 12047if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12048 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12050/* end confdefs.h. */
a9322a30 12051#include <sys/types.h>
81ecdfbb 12052 #include <sys/param.h>
a9322a30
TT
12053
12054int
12055main ()
12056{
12057#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12058 not big endian
12059 #endif
a9322a30
TT
12060
12061 ;
12062 return 0;
12063}
bec39cab 12064_ACEOF
81ecdfbb 12065if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12066 ac_cv_c_bigendian=yes
5ee754fc 12067else
81ecdfbb 12068 ac_cv_c_bigendian=no
5ee754fc 12069fi
81ecdfbb
RW
12070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12071fi
12072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12073 fi
12074 if test $ac_cv_c_bigendian = unknown; then
12075 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077/* end confdefs.h. */
12078#include <limits.h>
bec39cab 12079
81ecdfbb
RW
12080int
12081main ()
12082{
12083#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12084 bogus endian macros
12085 #endif
12086
12087 ;
12088 return 0;
12089}
7eb368b3 12090_ACEOF
81ecdfbb
RW
12091if ac_fn_c_try_compile "$LINENO"; then :
12092 # It does; now see whether it defined to _BIG_ENDIAN or not.
12093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12094/* end confdefs.h. */
81ecdfbb
RW
12095#include <limits.h>
12096
7eb368b3
NR
12097int
12098main ()
12099{
81ecdfbb
RW
12100#ifndef _BIG_ENDIAN
12101 not big endian
12102 #endif
12103
7eb368b3
NR
12104 ;
12105 return 0;
12106}
12107_ACEOF
81ecdfbb 12108if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12109 ac_cv_c_bigendian=yes
81ecdfbb
RW
12110else
12111 ac_cv_c_bigendian=no
a9322a30 12112fi
81ecdfbb 12113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12114fi
81ecdfbb
RW
12115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12116 fi
12117 if test $ac_cv_c_bigendian = unknown; then
12118 # Compile a test program.
12119 if test "$cross_compiling" = yes; then :
12120 # Try to guess by grepping values from an object file.
12121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122/* end confdefs.h. */
12123short int ascii_mm[] =
12124 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12125 short int ascii_ii[] =
12126 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12127 int use_ascii (int i) {
12128 return ascii_mm[i] + ascii_ii[i];
12129 }
12130 short int ebcdic_ii[] =
12131 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12132 short int ebcdic_mm[] =
12133 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12134 int use_ebcdic (int i) {
12135 return ebcdic_mm[i] + ebcdic_ii[i];
12136 }
12137 extern int foo;
7eb368b3 12138
81ecdfbb
RW
12139int
12140main ()
12141{
12142return use_ascii (foo) == use_ebcdic (foo);
12143 ;
12144 return 0;
12145}
12146_ACEOF
12147if ac_fn_c_try_compile "$LINENO"; then :
12148 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12149 ac_cv_c_bigendian=yes
12150 fi
12151 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12152 if test "$ac_cv_c_bigendian" = unknown; then
12153 ac_cv_c_bigendian=no
12154 else
12155 # finding both strings is unlikely to happen, but who knows?
12156 ac_cv_c_bigendian=unknown
12157 fi
12158 fi
7eb368b3 12159fi
81ecdfbb 12160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12161else
81ecdfbb 12162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12163/* end confdefs.h. */
81ecdfbb 12164$ac_includes_default
d3ea6809
MM
12165int
12166main ()
12167{
81ecdfbb
RW
12168
12169 /* Are we little or big endian? From Harbison&Steele. */
12170 union
12171 {
12172 long int l;
12173 char c[sizeof (long int)];
12174 } u;
12175 u.l = 1;
12176 return u.c[sizeof (long int) - 1] == 1;
12177
12178 ;
12179 return 0;
d3ea6809
MM
12180}
12181_ACEOF
81ecdfbb 12182if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12183 ac_cv_c_bigendian=no
d3ea6809 12184else
81ecdfbb 12185 ac_cv_c_bigendian=yes
d3ea6809 12186fi
81ecdfbb
RW
12187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12188 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12189fi
a9322a30 12190
81ecdfbb
RW
12191 fi
12192fi
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12194$as_echo "$ac_cv_c_bigendian" >&6; }
12195 case $ac_cv_c_bigendian in #(
12196 yes)
12197 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12198;; #(
12199 no)
12200 ;; #(
12201 universal)
12202
12203$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12204
12205 ;; #(
12206 *)
12207 as_fn_error "unknown endianness
12208 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12209 esac
d3ea6809
MM
12210
12211
a9322a30
TT
12212# ------------------------------ #
12213# Checks for library functions. #
12214# ------------------------------ #
d3ea6809 12215
a9322a30
TT
12216# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12217# for constant arguments. Useless!
81ecdfbb
RW
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12219$as_echo_n "checking for working alloca.h... " >&6; }
12220if test "${ac_cv_working_alloca_h+set}" = set; then :
12221 $as_echo_n "(cached) " >&6
d3ea6809 12222else
81ecdfbb 12223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12224/* end confdefs.h. */
a9322a30 12225#include <alloca.h>
bec39cab
AC
12226int
12227main ()
12228{
a9322a30 12229char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12230 if (p) return 0;
bec39cab
AC
12231 ;
12232 return 0;
12233}
12234_ACEOF
81ecdfbb 12235if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12236 ac_cv_working_alloca_h=yes
bec39cab 12237else
81ecdfbb 12238 ac_cv_working_alloca_h=no
bec39cab 12239fi
81ecdfbb
RW
12240rm -f core conftest.err conftest.$ac_objext \
12241 conftest$ac_exeext conftest.$ac_ext
bec39cab 12242fi
81ecdfbb
RW
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12244$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12245if test $ac_cv_working_alloca_h = yes; then
12246
81ecdfbb 12247$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12248
c906108c 12249fi
bec39cab 12250
81ecdfbb
RW
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12252$as_echo_n "checking for alloca... " >&6; }
12253if test "${ac_cv_func_alloca_works+set}" = set; then :
12254 $as_echo_n "(cached) " >&6
bec39cab 12255else
81ecdfbb 12256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12257/* end confdefs.h. */
a9322a30
TT
12258#ifdef __GNUC__
12259# define alloca __builtin_alloca
b4e70030 12260#else
a9322a30
TT
12261# ifdef _MSC_VER
12262# include <malloc.h>
12263# define alloca _alloca
12264# else
81ecdfbb 12265# ifdef HAVE_ALLOCA_H
a9322a30
TT
12266# include <alloca.h>
12267# else
12268# ifdef _AIX
12269 #pragma alloca
12270# else
12271# ifndef alloca /* predefined by HP cc +Olibcalls */
12272char *alloca ();
12273# endif
12274# endif
12275# endif
12276# endif
c906108c 12277#endif
97bf5e38 12278
bec39cab
AC
12279int
12280main ()
12281{
a9322a30 12282char *p = (char *) alloca (1);
81ecdfbb 12283 if (p) return 0;
bec39cab
AC
12284 ;
12285 return 0;
12286}
12287_ACEOF
81ecdfbb 12288if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12289 ac_cv_func_alloca_works=yes
bec39cab 12290else
81ecdfbb 12291 ac_cv_func_alloca_works=no
bec39cab 12292fi
81ecdfbb
RW
12293rm -f core conftest.err conftest.$ac_objext \
12294 conftest$ac_exeext conftest.$ac_ext
bec39cab 12295fi
81ecdfbb
RW
12296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12297$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12298
12299if test $ac_cv_func_alloca_works = yes; then
12300
81ecdfbb 12301$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12302
a9322a30
TT
12303else
12304 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12305# that cause trouble. Some versions do not even contain alloca or
12306# contain a buggy version. If you still want to use their alloca,
12307# use ar to extract alloca.o from them instead of compiling alloca.c.
12308
81ecdfbb 12309ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12310
81ecdfbb 12311$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12312
bec39cab 12313
81ecdfbb
RW
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12315$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12316if test "${ac_cv_os_cray+set}" = set; then :
12317 $as_echo_n "(cached) " >&6
a9322a30 12318else
81ecdfbb 12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12320/* end confdefs.h. */
81ecdfbb 12321#if defined CRAY && ! defined CRAY2
a9322a30
TT
12322webecray
12323#else
12324wenotbecray
12325#endif
12326
12327_ACEOF
12328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12329 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12330 ac_cv_os_cray=yes
12331else
81ecdfbb 12332 ac_cv_os_cray=no
bec39cab 12333fi
81ecdfbb
RW
12334rm -f conftest*
12335
bec39cab 12336fi
81ecdfbb
RW
12337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12338$as_echo "$ac_cv_os_cray" >&6; }
12339if test $ac_cv_os_cray = yes; then
12340 for ac_func in _getb67 GETB67 getb67; do
12341 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12342ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12343eval as_val=\$$as_ac_var
12344 if test "x$as_val" = x""yes; then :
a9322a30
TT
12345
12346cat >>confdefs.h <<_ACEOF
12347#define CRAY_STACKSEG_END $ac_func
bec39cab 12348_ACEOF
c906108c 12349
a9322a30 12350 break
c906108c
SS
12351fi
12352
a9322a30
TT
12353 done
12354fi
bec39cab 12355
81ecdfbb
RW
12356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12357$as_echo_n "checking stack direction for C alloca... " >&6; }
12358if test "${ac_cv_c_stack_direction+set}" = set; then :
12359 $as_echo_n "(cached) " >&6
a9322a30 12360else
81ecdfbb 12361 if test "$cross_compiling" = yes; then :
a9322a30 12362 ac_cv_c_stack_direction=0
bec39cab 12363else
81ecdfbb 12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12365/* end confdefs.h. */
81ecdfbb 12366$ac_includes_default
a9322a30
TT
12367int
12368find_stack_direction ()
b4e70030 12369{
a9322a30
TT
12370 static char *addr = 0;
12371 auto char dummy;
12372 if (addr == 0)
12373 {
12374 addr = &dummy;
12375 return find_stack_direction ();
12376 }
12377 else
12378 return (&dummy > addr) ? 1 : -1;
b4e70030 12379}
b757528f 12380
bec39cab
AC
12381int
12382main ()
12383{
81ecdfbb 12384 return find_stack_direction () < 0;
bec39cab
AC
12385}
12386_ACEOF
81ecdfbb 12387if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12388 ac_cv_c_stack_direction=1
12389else
81ecdfbb 12390 ac_cv_c_stack_direction=-1
a9322a30 12391fi
81ecdfbb
RW
12392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12393 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12394fi
a9322a30 12395
81ecdfbb
RW
12396fi
12397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12398$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12399cat >>confdefs.h <<_ACEOF
12400#define STACK_DIRECTION $ac_cv_c_stack_direction
12401_ACEOF
12402
12403
12404fi
12405
a9322a30 12406for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12407do :
12408 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12409ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12410eval as_val=\$$as_ac_Header
12411 if test "x$as_val" = x""yes; then :
bec39cab 12412 cat >>confdefs.h <<_ACEOF
81ecdfbb 12413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12414_ACEOF
b757528f 12415
b757528f 12416fi
bec39cab 12417
a9322a30 12418done
a3828db0 12419
a9322a30 12420for ac_func in getpagesize
81ecdfbb
RW
12421do :
12422 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12423if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12424 cat >>confdefs.h <<_ACEOF
81ecdfbb 12425#define HAVE_GETPAGESIZE 1
bec39cab 12426_ACEOF
bcb3dc3d 12427
bcb3dc3d
MK
12428fi
12429done
12430
81ecdfbb
RW
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12432$as_echo_n "checking for working mmap... " >&6; }
12433if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12434 $as_echo_n "(cached) " >&6
a9322a30 12435else
81ecdfbb 12436 if test "$cross_compiling" = yes; then :
a9322a30 12437 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12438else
81ecdfbb 12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12440/* end confdefs.h. */
a9322a30
TT
12441$ac_includes_default
12442/* malloc might have been renamed as rpl_malloc. */
12443#undef malloc
bec39cab 12444
a9322a30
TT
12445/* Thanks to Mike Haertel and Jim Avera for this test.
12446 Here is a matrix of mmap possibilities:
12447 mmap private not fixed
12448 mmap private fixed at somewhere currently unmapped
12449 mmap private fixed at somewhere already mapped
12450 mmap shared not fixed
12451 mmap shared fixed at somewhere currently unmapped
12452 mmap shared fixed at somewhere already mapped
12453 For private mappings, we should verify that changes cannot be read()
12454 back from the file, nor mmap's back from the file at a different
12455 address. (There have been systems where private was not correctly
12456 implemented like the infamous i386 svr4.0, and systems where the
12457 VM page cache was not coherent with the file system buffer cache
12458 like early versions of FreeBSD and possibly contemporary NetBSD.)
12459 For shared mappings, we should conversely verify that changes get
12460 propagated back to all the places they're supposed to be.
bec39cab 12461
a9322a30
TT
12462 Grep wants private fixed already mapped.
12463 The main things grep needs to know about mmap are:
12464 * does it exist and is it safe to write into the mmap'd area
12465 * how to use it (BSD variants) */
8b9cf735 12466
a9322a30
TT
12467#include <fcntl.h>
12468#include <sys/mman.h>
8b9cf735 12469
81ecdfbb 12470#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12471char *malloc ();
a3828db0
MK
12472#endif
12473
a9322a30 12474/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12475#ifndef HAVE_GETPAGESIZE
a9322a30 12476/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12477# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12478# define HAVE_SYS_PARAM_H 1
12479# endif
12480
12481# ifdef _SC_PAGESIZE
12482# define getpagesize() sysconf(_SC_PAGESIZE)
12483# else /* no _SC_PAGESIZE */
81ecdfbb 12484# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12485# include <sys/param.h>
12486# ifdef EXEC_PAGESIZE
12487# define getpagesize() EXEC_PAGESIZE
12488# else /* no EXEC_PAGESIZE */
12489# ifdef NBPG
12490# define getpagesize() NBPG * CLSIZE
12491# ifndef CLSIZE
12492# define CLSIZE 1
12493# endif /* no CLSIZE */
12494# else /* no NBPG */
12495# ifdef NBPC
12496# define getpagesize() NBPC
12497# else /* no NBPC */
12498# ifdef PAGESIZE
12499# define getpagesize() PAGESIZE
12500# endif /* PAGESIZE */
12501# endif /* no NBPC */
12502# endif /* no NBPG */
12503# endif /* no EXEC_PAGESIZE */
12504# else /* no HAVE_SYS_PARAM_H */
12505# define getpagesize() 8192 /* punt totally */
12506# endif /* no HAVE_SYS_PARAM_H */
12507# endif /* no _SC_PAGESIZE */
12508
12509#endif /* no HAVE_GETPAGESIZE */
12510
bec39cab
AC
12511int
12512main ()
12513{
a9322a30
TT
12514 char *data, *data2, *data3;
12515 int i, pagesize;
12516 int fd;
12517
12518 pagesize = getpagesize ();
12519
12520 /* First, make a file with some known garbage in it. */
12521 data = (char *) malloc (pagesize);
12522 if (!data)
81ecdfbb 12523 return 1;
a9322a30
TT
12524 for (i = 0; i < pagesize; ++i)
12525 *(data + i) = rand ();
12526 umask (0);
12527 fd = creat ("conftest.mmap", 0600);
12528 if (fd < 0)
81ecdfbb 12529 return 1;
a9322a30 12530 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12531 return 1;
a9322a30
TT
12532 close (fd);
12533
12534 /* Next, try to mmap the file at a fixed address which already has
12535 something else allocated at it. If we can, also make sure that
12536 we see the same garbage. */
12537 fd = open ("conftest.mmap", O_RDWR);
12538 if (fd < 0)
81ecdfbb 12539 return 1;
a9322a30
TT
12540 data2 = (char *) malloc (2 * pagesize);
12541 if (!data2)
81ecdfbb
RW
12542 return 1;
12543 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12544 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12545 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12546 return 1;
a9322a30
TT
12547 for (i = 0; i < pagesize; ++i)
12548 if (*(data + i) != *(data2 + i))
81ecdfbb 12549 return 1;
a9322a30
TT
12550
12551 /* Finally, make sure that changes to the mapped area do not
12552 percolate back to the file as seen by read(). (This is a bug on
12553 some variants of i386 svr4.0.) */
12554 for (i = 0; i < pagesize; ++i)
12555 *(data2 + i) = *(data2 + i) + 1;
12556 data3 = (char *) malloc (pagesize);
12557 if (!data3)
81ecdfbb 12558 return 1;
a9322a30 12559 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12560 return 1;
a9322a30
TT
12561 for (i = 0; i < pagesize; ++i)
12562 if (*(data + i) != *(data3 + i))
81ecdfbb 12563 return 1;
a9322a30 12564 close (fd);
81ecdfbb 12565 return 0;
bec39cab
AC
12566}
12567_ACEOF
81ecdfbb 12568if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12569 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12570else
81ecdfbb 12571 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12572fi
81ecdfbb
RW
12573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12574 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12575fi
81ecdfbb 12576
a9322a30 12577fi
81ecdfbb
RW
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12579$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12580if test $ac_cv_func_mmap_fixed_mapped = yes; then
12581
81ecdfbb 12582$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12583
086ec9eb 12584fi
a9322a30 12585rm -f conftest.mmap
a3828db0 12586
81ecdfbb
RW
12587ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12588if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12589
a9322a30
TT
12590else
12591
12592cat >>confdefs.h <<_ACEOF
12593#define pid_t int
bec39cab 12594_ACEOF
086ec9eb
MK
12595
12596fi
12597
81ecdfbb
RW
12598for ac_header in vfork.h
12599do :
12600 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12601if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12602 cat >>confdefs.h <<_ACEOF
81ecdfbb 12603#define HAVE_VFORK_H 1
bec39cab 12604_ACEOF
c906108c
SS
12605
12606fi
a9322a30 12607
a3828db0 12608done
c906108c 12609
a9322a30 12610for ac_func in fork vfork
81ecdfbb
RW
12611do :
12612 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12614eval as_val=\$$as_ac_var
12615 if test "x$as_val" = x""yes; then :
a3828db0 12616 cat >>confdefs.h <<_ACEOF
81ecdfbb 12617#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12618_ACEOF
b83266a0 12619
97bf5e38 12620fi
a3828db0 12621done
b83266a0 12622
a9322a30 12623if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12625$as_echo_n "checking for working fork... " >&6; }
12626if test "${ac_cv_func_fork_works+set}" = set; then :
12627 $as_echo_n "(cached) " >&6
a9322a30 12628else
81ecdfbb 12629 if test "$cross_compiling" = yes; then :
a9322a30
TT
12630 ac_cv_func_fork_works=cross
12631else
81ecdfbb
RW
12632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12633/* end confdefs.h. */
12634$ac_includes_default
12635int
12636main ()
12637{
12638
12639 /* By Ruediger Kuhlmann. */
12640 return fork () < 0;
12641
12642 ;
12643 return 0;
12644}
a9322a30 12645_ACEOF
81ecdfbb 12646if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12647 ac_cv_func_fork_works=yes
12648else
81ecdfbb 12649 ac_cv_func_fork_works=no
a9322a30 12650fi
81ecdfbb
RW
12651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12652 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12653fi
81ecdfbb 12654
a9322a30 12655fi
81ecdfbb
RW
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12657$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12658
12659else
12660 ac_cv_func_fork_works=$ac_cv_func_fork
12661fi
12662if test "x$ac_cv_func_fork_works" = xcross; then
12663 case $host in
12664 *-*-amigaos* | *-*-msdosdjgpp*)
12665 # Override, as these systems have only a dummy fork() stub
12666 ac_cv_func_fork_works=no
12667 ;;
12668 *)
12669 ac_cv_func_fork_works=yes
12670 ;;
12671 esac
81ecdfbb
RW
12672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12673$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12674fi
12675ac_cv_func_vfork_works=$ac_cv_func_vfork
12676if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12678$as_echo_n "checking for working vfork... " >&6; }
12679if test "${ac_cv_func_vfork_works+set}" = set; then :
12680 $as_echo_n "(cached) " >&6
a9322a30 12681else
81ecdfbb 12682 if test "$cross_compiling" = yes; then :
a9322a30
TT
12683 ac_cv_func_vfork_works=cross
12684else
81ecdfbb 12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12686/* end confdefs.h. */
12687/* Thanks to Paul Eggert for this test. */
81ecdfbb 12688$ac_includes_default
a9322a30 12689#include <sys/wait.h>
81ecdfbb 12690#ifdef HAVE_VFORK_H
a9322a30
TT
12691# include <vfork.h>
12692#endif
12693/* On some sparc systems, changes by the child to local and incoming
12694 argument registers are propagated back to the parent. The compiler
12695 is told about this with #include <vfork.h>, but some compilers
12696 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12697 static variable whose address is put into a register that is
12698 clobbered by the vfork. */
12699static void
12700#ifdef __cplusplus
12701sparc_address_test (int arg)
12702# else
12703sparc_address_test (arg) int arg;
12704#endif
12705{
12706 static pid_t child;
12707 if (!child) {
12708 child = vfork ();
12709 if (child < 0) {
12710 perror ("vfork");
12711 _exit(2);
12712 }
12713 if (!child) {
12714 arg = getpid();
12715 write(-1, "", 0);
12716 _exit (arg);
12717 }
12718 }
12719}
12720
12721int
12722main ()
12723{
12724 pid_t parent = getpid ();
12725 pid_t child;
12726
12727 sparc_address_test (0);
12728
12729 child = vfork ();
12730
12731 if (child == 0) {
12732 /* Here is another test for sparc vfork register problems. This
12733 test uses lots of local variables, at least as many local
12734 variables as main has allocated so far including compiler
12735 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12736 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12737 reuse the register of parent for one of the local variables,
12738 since it will think that parent can't possibly be used any more
12739 in this routine. Assigning to the local variable will thus
12740 munge parent in the parent process. */
12741 pid_t
12742 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12743 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12744 /* Convince the compiler that p..p7 are live; otherwise, it might
12745 use the same hardware register for all 8 local variables. */
12746 if (p != p1 || p != p2 || p != p3 || p != p4
12747 || p != p5 || p != p6 || p != p7)
12748 _exit(1);
12749
12750 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12751 from child file descriptors. If the child closes a descriptor
12752 before it execs or exits, this munges the parent's descriptor
12753 as well. Test for this by closing stdout in the child. */
12754 _exit(close(fileno(stdout)) != 0);
12755 } else {
12756 int status;
12757 struct stat st;
12758
12759 while (wait(&status) != child)
12760 ;
81ecdfbb 12761 return (
a9322a30
TT
12762 /* Was there some problem with vforking? */
12763 child < 0
12764
12765 /* Did the child fail? (This shouldn't happen.) */
12766 || status
12767
12768 /* Did the vfork/compiler bug occur? */
12769 || parent != getpid()
12770
12771 /* Did the file descriptor bug occur? */
12772 || fstat(fileno(stdout), &st) != 0
12773 );
12774 }
12775}
12776_ACEOF
81ecdfbb 12777if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12778 ac_cv_func_vfork_works=yes
12779else
81ecdfbb 12780 ac_cv_func_vfork_works=no
a9322a30 12781fi
81ecdfbb
RW
12782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12783 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12784fi
81ecdfbb 12785
a9322a30 12786fi
81ecdfbb
RW
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12788$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12789
12790fi;
12791if test "x$ac_cv_func_fork_works" = xcross; then
12792 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12794$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12795fi
12796
12797if test "x$ac_cv_func_vfork_works" = xyes; then
12798
81ecdfbb 12799$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12800
12801else
12802
81ecdfbb 12803$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12804
12805fi
12806if test "x$ac_cv_func_fork_works" = xyes; then
12807
81ecdfbb 12808$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12809
12810fi
12811
a9322a30 12812for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12813 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12814 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12815 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12816 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12817do :
12818 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12819ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12820eval as_val=\$$as_ac_var
12821 if test "x$as_val" = x""yes; then :
6c7a06a3 12822 cat >>confdefs.h <<_ACEOF
81ecdfbb 12823#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12824_ACEOF
12825
12826fi
12827done
12828
12829
81ecdfbb
RW
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12831$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12832if test "${am_cv_langinfo_codeset+set}" = set; then :
12833 $as_echo_n "(cached) " >&6
6c7a06a3 12834else
81ecdfbb 12835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12836/* end confdefs.h. */
12837#include <langinfo.h>
12838int
12839main ()
12840{
12841char* cs = nl_langinfo(CODESET);
bec39cab
AC
12842 ;
12843 return 0;
12844}
12845_ACEOF
81ecdfbb 12846if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12847 am_cv_langinfo_codeset=yes
a4db0f07 12848else
81ecdfbb 12849 am_cv_langinfo_codeset=no
a4db0f07 12850fi
81ecdfbb
RW
12851rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12853
a4db0f07 12854fi
81ecdfbb
RW
12855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12856$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12857 if test $am_cv_langinfo_codeset = yes; then
12858
81ecdfbb 12859$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12860
6c7a06a3 12861 fi
c906108c 12862
06825bd1 12863
a3828db0
MK
12864# Check the return and argument types of ptrace. No canned test for
12865# this, so roll our own.
12866gdb_ptrace_headers='
12867#if HAVE_SYS_TYPES_H
12868# include <sys/types.h>
12869#endif
12870#if HAVE_SYS_PTRACE_H
12871# include <sys/ptrace.h>
12872#endif
12873#if HAVE_UNISTD_H
12874# include <unistd.h>
12875#endif
12876'
12877# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12878ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12879"
12880if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12881 ac_have_decl=1
06825bd1 12882else
81ecdfbb 12883 ac_have_decl=0
06825bd1 12884fi
06825bd1 12885
a3828db0 12886cat >>confdefs.h <<_ACEOF
81ecdfbb 12887#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12888_ACEOF
81ecdfbb 12889if test $ac_have_decl = 1; then :
bec39cab 12890
a3828db0 12891else
a3828db0
MK
12892
12893 : ${gdb_cv_func_ptrace_ret='int'}
12894 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12895
06825bd1
MK
12896fi
12897
064ef605
DJ
12898# Check return type. Varargs (used on GNU/Linux) conflict with the
12899# empty argument list, so check for that explicitly.
81ecdfbb
RW
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12901$as_echo_n "checking return type of ptrace... " >&6; }
12902if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12903 $as_echo_n "(cached) " >&6
bec39cab 12904else
81ecdfbb 12905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12906/* end confdefs.h. */
a3828db0 12907$gdb_ptrace_headers
bec39cab
AC
12908int
12909main ()
12910{
064ef605
DJ
12911extern long ptrace (enum __ptrace_request, ...);
12912 ;
12913 return 0;
12914}
12915_ACEOF
81ecdfbb 12916if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12917 gdb_cv_func_ptrace_ret='long'
12918else
81ecdfbb 12919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12920/* end confdefs.h. */
12921$gdb_ptrace_headers
12922int
12923main ()
12924{
a3828db0 12925extern int ptrace ();
bec39cab
AC
12926 ;
12927 return 0;
12928}
12929_ACEOF
81ecdfbb 12930if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12931 gdb_cv_func_ptrace_ret='int'
70f9f479 12932else
81ecdfbb 12933 gdb_cv_func_ptrace_ret='long'
70f9f479 12934fi
81ecdfbb 12935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12936fi
81ecdfbb 12937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12938fi
81ecdfbb
RW
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12940$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12941
a3828db0
MK
12942cat >>confdefs.h <<_ACEOF
12943#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12944_ACEOF
70f9f479 12945
a3828db0 12946# Check argument types.
81ecdfbb
RW
12947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12948$as_echo_n "checking types of arguments for ptrace... " >&6; }
12949if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12950 $as_echo_n "(cached) " >&6
bec39cab 12951else
a3828db0 12952
81ecdfbb 12953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12954/* end confdefs.h. */
12955$gdb_ptrace_headers
12956int
12957main ()
12958{
12959extern long ptrace (enum __ptrace_request, ...);
12960 ;
12961 return 0;
12962}
12963_ACEOF
81ecdfbb 12964if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12965 gdb_cv_func_ptrace_args='int,int,long,long'
12966else
064ef605 12967
a3828db0
MK
12968for gdb_arg1 in 'int' 'long'; do
12969 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12970 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12971 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12973/* end confdefs.h. */
a3828db0 12974$gdb_ptrace_headers
bec39cab
AC
12975int
12976main ()
12977{
a3828db0
MK
12978
12979extern $gdb_cv_func_ptrace_ret
12980 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12981
bec39cab
AC
12982 ;
12983 return 0;
12984}
12985_ACEOF
81ecdfbb 12986if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12987 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12988 break 4;
5c7f2947 12989fi
81ecdfbb 12990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12991 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12993/* end confdefs.h. */
a3828db0 12994$gdb_ptrace_headers
bec39cab
AC
12995int
12996main ()
12997{
a3828db0
MK
12998
12999extern $gdb_cv_func_ptrace_ret
13000 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13001
bec39cab
AC
13002 ;
13003 return 0;
13004}
13005_ACEOF
81ecdfbb 13006if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13007
13008gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13009 break 5;
78434e59 13010fi
81ecdfbb 13011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13012 done
13013 done
13014 done
13015 done
13016done
13017# Provide a safe default value.
13018: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13019
064ef605 13020fi
81ecdfbb 13021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13022fi
81ecdfbb
RW
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13024$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13025ac_save_IFS=$IFS; IFS=','
13026set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13027IFS=$ac_save_IFS
13028shift
bec39cab 13029
a3828db0
MK
13030cat >>confdefs.h <<_ACEOF
13031#define PTRACE_TYPE_ARG3 $3
13032_ACEOF
13033
13034if test -n "$5"; then
13035
13036cat >>confdefs.h <<_ACEOF
13037#define PTRACE_TYPE_ARG5 $5
bec39cab 13038_ACEOF
78434e59
MK
13039
13040fi
13041
a3828db0 13042if test "$cross_compiling" = no; then
81ecdfbb
RW
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13044$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13045if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13046 $as_echo_n "(cached) " >&6
a3828db0 13047else
81ecdfbb
RW
13048 if test "$cross_compiling" = yes; then :
13049 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13050else
81ecdfbb 13051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13052/* end confdefs.h. */
81ecdfbb 13053$ac_includes_default
bec39cab
AC
13054int
13055main ()
13056{
a3828db0
MK
13057/* If this system has a BSD-style setpgrp which takes arguments,
13058 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13059 exit successfully. */
81ecdfbb 13060 return setpgrp (1,1) != -1;
bec39cab
AC
13061 ;
13062 return 0;
13063}
13064_ACEOF
81ecdfbb 13065if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13066 ac_cv_func_setpgrp_void=no
c906108c 13067else
81ecdfbb 13068 ac_cv_func_setpgrp_void=yes
c906108c 13069fi
81ecdfbb
RW
13070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13071 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13072fi
81ecdfbb 13073
a3828db0 13074fi
81ecdfbb
RW
13075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13076$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13077if test $ac_cv_func_setpgrp_void = yes; then
13078
81ecdfbb 13079$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13080
13081fi
a3828db0
MK
13082
13083else
81ecdfbb
RW
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13085$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13086if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13087 $as_echo_n "(cached) " >&6
97bf5e38 13088else
81ecdfbb 13089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13090/* end confdefs.h. */
a3828db0
MK
13091
13092#include <unistd.h>
13093
bec39cab
AC
13094int
13095main ()
13096{
a3828db0
MK
13097
13098 if (setpgrp(1,1) == -1)
13099 exit (0);
13100 else
13101 exit (1);
13102
bec39cab
AC
13103 ;
13104 return 0;
13105}
13106_ACEOF
81ecdfbb 13107if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13108 ac_cv_func_setpgrp_void=no
c906108c 13109else
81ecdfbb 13110 ac_cv_func_setpgrp_void=yes
c906108c 13111fi
81ecdfbb 13112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13113fi
81ecdfbb
RW
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13115$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13116if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13117 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13118
a3828db0 13119fi
c906108c
SS
13120fi
13121
a3828db0
MK
13122# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13123# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13125$as_echo_n "checking for sigsetjmp... " >&6; }
13126if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13127 $as_echo_n "(cached) " >&6
bec39cab 13128else
81ecdfbb 13129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13130/* end confdefs.h. */
a3828db0
MK
13131
13132#include <setjmp.h>
13133
bec39cab
AC
13134int
13135main ()
13136{
a3828db0 13137sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13138 ;
13139 return 0;
13140}
13141_ACEOF
81ecdfbb 13142if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13143 gdb_cv_func_sigsetjmp=yes
c906108c 13144else
81ecdfbb 13145 gdb_cv_func_sigsetjmp=no
c906108c 13146fi
81ecdfbb 13147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13148fi
81ecdfbb
RW
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13150$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13151if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13152
81ecdfbb 13153$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13154
97bf5e38 13155fi
c906108c 13156
a3828db0
MK
13157# Assume we'll default to using the included libiberty regex.
13158gdb_use_included_regex=yes
13159
13160# However, if the system regex is GNU regex, then default to *not*
13161# using the included regex.
81ecdfbb
RW
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13163$as_echo_n "checking for GNU regex... " >&6; }
13164if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13165 $as_echo_n "(cached) " >&6
bec39cab 13166else
81ecdfbb 13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13168/* end confdefs.h. */
a3828db0 13169#include <gnu-versions.h>
bec39cab
AC
13170int
13171main ()
13172{
81ecdfbb
RW
13173#define REGEX_INTERFACE_VERSION 1
13174#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13175# error "Version mismatch"
13176#endif
5c45e068
MK
13177 ;
13178 return 0;
13179}
13180_ACEOF
81ecdfbb
RW
13181if ac_fn_c_try_compile "$LINENO"; then :
13182 gdb_cv_have_gnu_regex=yes
5c45e068 13183else
81ecdfbb
RW
13184 gdb_cv_have_gnu_regex=no
13185fi
13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187fi
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13189$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13190if test $gdb_cv_have_gnu_regex = yes; then
13191 gdb_use_included_regex=no
5c45e068 13192fi
81ecdfbb
RW
13193
13194
13195# Check whether --with-included-regex was given.
13196if test "${with_included_regex+set}" = set; then :
13197 withval=$with_included_regex; gdb_with_regex=$withval
13198else
13199 gdb_with_regex=$gdb_use_included_regex
c906108c 13200fi
81ecdfbb
RW
13201
13202if test "$gdb_with_regex" = yes; then
13203
13204$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13205
c906108c 13206fi
81ecdfbb
RW
13207
13208# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13209ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13210#include <sys/proc.h>
13211
13212"
13213if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13214
5c45e068 13215cat >>confdefs.h <<_ACEOF
a3828db0 13216#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13217_ACEOF
c906108c 13218
5c45e068 13219
97bf5e38 13220fi
c906108c 13221
5c45e068 13222
a3828db0 13223# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13225$as_echo_n "checking for struct lwp... " >&6; }
13226if test "${gdb_cv_struct_lwp+set}" = set; then :
13227 $as_echo_n "(cached) " >&6
bec39cab 13228else
81ecdfbb 13229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13230/* end confdefs.h. */
a3828db0
MK
13231#include <sys/param.h>
13232#include <sys/lwp.h>
bec39cab
AC
13233int
13234main ()
13235{
a3828db0 13236struct lwp l;
bec39cab
AC
13237 ;
13238 return 0;
13239}
13240_ACEOF
81ecdfbb 13241if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13242 gdb_cv_struct_lwp=yes
c906108c 13243else
81ecdfbb 13244 gdb_cv_struct_lwp=no
c906108c 13245fi
81ecdfbb 13246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13247fi
81ecdfbb
RW
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13249$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13250if test $gdb_cv_struct_lwp = yes; then
c906108c 13251
81ecdfbb 13252$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13253
97bf5e38 13254fi
c906108c 13255
a3828db0 13256# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13258$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13259if test "${gdb_cv_struct_reg+set}" = set; then :
13260 $as_echo_n "(cached) " >&6
bec39cab 13261else
81ecdfbb 13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13263/* end confdefs.h. */
a3828db0
MK
13264#include <sys/types.h>
13265#include <machine/reg.h>
bec39cab
AC
13266int
13267main ()
13268{
a3828db0 13269struct reg r;
bec39cab
AC
13270 ;
13271 return 0;
13272}
13273_ACEOF
81ecdfbb 13274if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13275 gdb_cv_struct_reg=yes
27ca5dad 13276else
81ecdfbb 13277 gdb_cv_struct_reg=no
27ca5dad 13278fi
81ecdfbb 13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13280fi
81ecdfbb
RW
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13282$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13283if test $gdb_cv_struct_reg = yes; then
bec39cab 13284
81ecdfbb 13285$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13286
13287fi
97bf5e38 13288
a3828db0
MK
13289# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13290# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13291ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13292"
13293if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13294
13295cat >>confdefs.h <<_ACEOF
a3828db0 13296#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13297_ACEOF
3862412b 13298
5c45e068 13299
97bf5e38 13300fi
81ecdfbb
RW
13301ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13302"
13303if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13304
13305cat >>confdefs.h <<_ACEOF
a3828db0 13306#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13307_ACEOF
3862412b 13308
5c45e068 13309
97bf5e38 13310fi
3862412b 13311
5c45e068 13312
a3828db0 13313# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13315$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13316if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13317 $as_echo_n "(cached) " >&6
451928c5 13318else
81ecdfbb 13319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13320/* end confdefs.h. */
a3828db0 13321#include <sys/ptrace.h>
bec39cab
AC
13322int
13323main ()
13324{
a3828db0 13325PTRACE_GETREGS;
bec39cab
AC
13326 ;
13327 return 0;
13328}
13329_ACEOF
81ecdfbb 13330if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13331 gdb_cv_have_ptrace_getregs=yes
451928c5 13332else
81ecdfbb 13333 gdb_cv_have_ptrace_getregs=no
451928c5 13334fi
81ecdfbb 13335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13336fi
13337
81ecdfbb
RW
13338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13339$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13340if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13341
81ecdfbb 13342$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13343
97bf5e38 13344fi
451928c5 13345
a3828db0 13346# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13348$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13349if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13350 $as_echo_n "(cached) " >&6
451928c5 13351else
81ecdfbb 13352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13353/* end confdefs.h. */
a3828db0 13354#include <sys/ptrace.h>
bec39cab
AC
13355int
13356main ()
13357{
a3828db0 13358PTRACE_GETFPXREGS;
bec39cab
AC
13359 ;
13360 return 0;
13361}
13362_ACEOF
81ecdfbb 13363if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13364 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13365else
81ecdfbb 13366 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13367fi
81ecdfbb 13368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13369fi
13370
81ecdfbb
RW
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13372$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13373if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13374
81ecdfbb 13375$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13376
97bf5e38 13377fi
451928c5 13378
a3828db0 13379# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13381$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13382if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13383 $as_echo_n "(cached) " >&6
3862412b 13384else
81ecdfbb 13385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13386/* end confdefs.h. */
a3828db0
MK
13387#include <sys/types.h>
13388#include <sys/ptrace.h>
bec39cab
AC
13389int
13390main ()
13391{
a3828db0 13392PT_GETDBREGS;
bec39cab
AC
13393 ;
13394 return 0;
13395}
13396_ACEOF
81ecdfbb 13397if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13398 gdb_cv_have_pt_getdbregs=yes
3862412b 13399else
81ecdfbb 13400 gdb_cv_have_pt_getdbregs=no
3862412b 13401fi
81ecdfbb 13402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13403fi
13404
81ecdfbb
RW
13405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13406$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13407if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13408
81ecdfbb 13409$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13410
97bf5e38 13411fi
3862412b 13412
a3828db0 13413# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13415$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13416if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13417 $as_echo_n "(cached) " >&6
3862412b 13418else
81ecdfbb 13419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13420/* end confdefs.h. */
a3828db0
MK
13421#include <sys/types.h>
13422#include <sys/ptrace.h>
bec39cab
AC
13423int
13424main ()
13425{
a3828db0 13426PT_GETXMMREGS;
bec39cab
AC
13427 ;
13428 return 0;
13429}
13430_ACEOF
81ecdfbb 13431if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13432 gdb_cv_have_pt_getxmmregs=yes
3862412b 13433else
81ecdfbb 13434 gdb_cv_have_pt_getxmmregs=no
3862412b 13435fi
81ecdfbb 13436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13437fi
13438
81ecdfbb
RW
13439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13440$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13441if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13442
81ecdfbb 13443$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13444
97bf5e38 13445fi
3862412b 13446
eb368090 13447# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13448
13449if test "${target}" = "${host}"; then
13450 case "${host}" in
97bf5e38 13451 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13452
81ecdfbb 13453$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13454
13455 ;;
c162e8c9 13456 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13457
81ecdfbb 13458$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13459
13460 ;;
13461 mips-sgi-irix5*)
13462 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13463
81ecdfbb 13464$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13465
13466 ;;
13467 esac
13468fi
13469
13470if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13472$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13473 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13474 $as_echo_n "(cached) " >&6
bec39cab 13475else
81ecdfbb 13476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13477/* end confdefs.h. */
596c9d4b
KB
13478
13479#define _SYSCALL32
d30c5336
JK
13480/* Needed for new procfs interface on sparc-solaris. */
13481#define _STRUCTURED_PROC 1
596c9d4b 13482#include <sys/procfs.h>
bec39cab
AC
13483int
13484main ()
13485{
97bf5e38 13486pstatus_t avar
bec39cab
AC
13487 ;
13488 return 0;
13489}
13490_ACEOF
81ecdfbb 13491if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13492 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13493else
81ecdfbb 13494 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13495
596c9d4b 13496fi
81ecdfbb 13497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13498fi
13499
97bf5e38 13500 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13501
81ecdfbb 13502$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13503
13504 fi
81ecdfbb
RW
13505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13506$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13507
81ecdfbb
RW
13508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13509$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13510 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13511 $as_echo_n "(cached) " >&6
596c9d4b 13512else
81ecdfbb 13513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13514/* end confdefs.h. */
596c9d4b
KB
13515
13516#define _SYSCALL32
d30c5336
JK
13517/* Needed for new procfs interface on sparc-solaris. */
13518#define _STRUCTURED_PROC 1
596c9d4b 13519#include <sys/procfs.h>
bec39cab
AC
13520int
13521main ()
13522{
97bf5e38 13523prrun_t avar
bec39cab
AC
13524 ;
13525 return 0;
13526}
13527_ACEOF
81ecdfbb 13528if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13529 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13530else
81ecdfbb 13531 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13532
596c9d4b 13533fi
81ecdfbb 13534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13535fi
13536
97bf5e38 13537 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13538
81ecdfbb 13539$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13540
13541 fi
81ecdfbb
RW
13542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13543$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13544
81ecdfbb
RW
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13546$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13547 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13548 $as_echo_n "(cached) " >&6
596c9d4b 13549else
81ecdfbb 13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13551/* end confdefs.h. */
596c9d4b
KB
13552
13553#define _SYSCALL32
d30c5336
JK
13554/* Needed for new procfs interface on sparc-solaris. */
13555#define _STRUCTURED_PROC 1
596c9d4b 13556#include <sys/procfs.h>
bec39cab
AC
13557int
13558main ()
13559{
97bf5e38 13560gregset_t avar
bec39cab
AC
13561 ;
13562 return 0;
13563}
13564_ACEOF
81ecdfbb 13565if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13566 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13567else
81ecdfbb 13568 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13569
596c9d4b 13570fi
81ecdfbb 13571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13572fi
13573
97bf5e38 13574 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13575
81ecdfbb 13576$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13577
13578 fi
81ecdfbb
RW
13579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13580$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13581
81ecdfbb
RW
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13583$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13584 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13585 $as_echo_n "(cached) " >&6
d84dd0c5 13586else
81ecdfbb 13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13588/* end confdefs.h. */
97bf5e38
MK
13589
13590#define _SYSCALL32
d30c5336
JK
13591/* Needed for new procfs interface on sparc-solaris. */
13592#define _STRUCTURED_PROC 1
d84dd0c5 13593#include <sys/procfs.h>
bec39cab
AC
13594int
13595main ()
13596{
97bf5e38 13597fpregset_t avar
bec39cab
AC
13598 ;
13599 return 0;
13600}
13601_ACEOF
81ecdfbb 13602if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13603 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13604else
81ecdfbb 13605 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13606
d84dd0c5 13607fi
81ecdfbb 13608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13609fi
13610
97bf5e38 13611 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13612
81ecdfbb 13613$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13614
97bf5e38 13615 fi
81ecdfbb
RW
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13617$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13618
81ecdfbb
RW
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13620$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13621 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13622 $as_echo_n "(cached) " >&6
c906108c 13623else
81ecdfbb 13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13625/* end confdefs.h. */
c906108c 13626
97bf5e38 13627#define _SYSCALL32
d30c5336
JK
13628/* Needed for new procfs interface on sparc-solaris. */
13629#define _STRUCTURED_PROC 1
97bf5e38 13630#include <sys/procfs.h>
bec39cab
AC
13631int
13632main ()
13633{
97bf5e38 13634prgregset_t avar
bec39cab
AC
13635 ;
13636 return 0;
13637}
13638_ACEOF
81ecdfbb 13639if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13640 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13641else
81ecdfbb 13642 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13643
c906108c 13644fi
81ecdfbb 13645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13646fi
13647
97bf5e38 13648 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13649
81ecdfbb 13650$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13651
97bf5e38 13652 fi
81ecdfbb
RW
13653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13654$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13655
81ecdfbb
RW
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13657$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13658 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13659 $as_echo_n "(cached) " >&6
d45fe813 13660else
81ecdfbb 13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13662/* end confdefs.h. */
97bf5e38
MK
13663
13664#define _SYSCALL32
d30c5336
JK
13665/* Needed for new procfs interface on sparc-solaris. */
13666#define _STRUCTURED_PROC 1
97bf5e38 13667#include <sys/procfs.h>
bec39cab
AC
13668int
13669main ()
13670{
97bf5e38 13671prfpregset_t avar
bec39cab
AC
13672 ;
13673 return 0;
13674}
13675_ACEOF
81ecdfbb 13676if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13677 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13678else
81ecdfbb 13679 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13680
d45fe813 13681fi
81ecdfbb 13682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13683fi
13684
97bf5e38 13685 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13686
81ecdfbb 13687$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13688
97bf5e38 13689 fi
81ecdfbb
RW
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13691$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13692
81ecdfbb
RW
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13694$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13695 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13696 $as_echo_n "(cached) " >&6
d45fe813 13697else
81ecdfbb 13698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13699/* end confdefs.h. */
97bf5e38
MK
13700
13701#define _SYSCALL32
d30c5336
JK
13702/* Needed for new procfs interface on sparc-solaris. */
13703#define _STRUCTURED_PROC 1
97bf5e38 13704#include <sys/procfs.h>
bec39cab
AC
13705int
13706main ()
13707{
97bf5e38 13708prgregset32_t avar
bec39cab
AC
13709 ;
13710 return 0;
13711}
13712_ACEOF
81ecdfbb 13713if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13714 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13715else
81ecdfbb 13716 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13717
d45fe813 13718fi
81ecdfbb 13719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13720fi
13721
97bf5e38 13722 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13723
81ecdfbb 13724$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13725
97bf5e38 13726 fi
81ecdfbb
RW
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13728$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13729
81ecdfbb
RW
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13731$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13732 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13733 $as_echo_n "(cached) " >&6
d45fe813 13734else
81ecdfbb 13735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13736/* end confdefs.h. */
97bf5e38
MK
13737
13738#define _SYSCALL32
d30c5336
JK
13739/* Needed for new procfs interface on sparc-solaris. */
13740#define _STRUCTURED_PROC 1
97bf5e38 13741#include <sys/procfs.h>
bec39cab
AC
13742int
13743main ()
13744{
97bf5e38 13745prfpregset32_t avar
bec39cab
AC
13746 ;
13747 return 0;
13748}
13749_ACEOF
81ecdfbb 13750if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13751 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13752else
81ecdfbb 13753 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13754
d45fe813 13755fi
81ecdfbb 13756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13757fi
13758
97bf5e38 13759 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13760
81ecdfbb 13761$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13762
97bf5e38 13763 fi
81ecdfbb
RW
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13765$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13766
81ecdfbb
RW
13767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13768$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13769 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13770 $as_echo_n "(cached) " >&6
d45fe813 13771else
81ecdfbb 13772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13773/* end confdefs.h. */
97bf5e38 13774
d45fe813 13775#define _SYSCALL32
d30c5336
JK
13776/* Needed for new procfs interface on sparc-solaris. */
13777#define _STRUCTURED_PROC 1
97bf5e38 13778#include <sys/procfs.h>
bec39cab
AC
13779int
13780main ()
13781{
97bf5e38 13782lwpid_t avar
bec39cab
AC
13783 ;
13784 return 0;
13785}
13786_ACEOF
81ecdfbb 13787if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13788 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13789else
81ecdfbb 13790 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13791
d45fe813 13792fi
81ecdfbb 13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13794fi
13795
97bf5e38 13796 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13797
81ecdfbb 13798$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13799
97bf5e38 13800 fi
81ecdfbb
RW
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13802$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13803
81ecdfbb
RW
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13805$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13806 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13807 $as_echo_n "(cached) " >&6
c906108c 13808else
81ecdfbb 13809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13810/* end confdefs.h. */
c906108c 13811
97bf5e38 13812#define _SYSCALL32
d30c5336
JK
13813/* Needed for new procfs interface on sparc-solaris. */
13814#define _STRUCTURED_PROC 1
97bf5e38 13815#include <sys/procfs.h>
bec39cab
AC
13816int
13817main ()
13818{
97bf5e38 13819psaddr_t avar
bec39cab
AC
13820 ;
13821 return 0;
13822}
13823_ACEOF
81ecdfbb 13824if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13825 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13826else
81ecdfbb 13827 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13828
c906108c 13829fi
81ecdfbb 13830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13831fi
13832
97bf5e38 13833 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13834
81ecdfbb 13835$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13836
97bf5e38 13837 fi
81ecdfbb
RW
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13839$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13840
81ecdfbb
RW
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13842$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13843 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13844 $as_echo_n "(cached) " >&6
c906108c 13845else
81ecdfbb 13846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13847/* end confdefs.h. */
c906108c 13848
97bf5e38 13849#define _SYSCALL32
d30c5336
JK
13850/* Needed for new procfs interface on sparc-solaris. */
13851#define _STRUCTURED_PROC 1
97bf5e38 13852#include <sys/procfs.h>
bec39cab
AC
13853int
13854main ()
13855{
97bf5e38 13856prsysent_t avar
bec39cab
AC
13857 ;
13858 return 0;
13859}
13860_ACEOF
81ecdfbb 13861if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13862 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13863else
81ecdfbb 13864 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13865
c906108c 13866fi
81ecdfbb 13867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13868fi
13869
97bf5e38 13870 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13871
81ecdfbb 13872$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13873
97bf5e38 13874 fi
81ecdfbb
RW
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13876$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13877
81ecdfbb
RW
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13879$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13880 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13881 $as_echo_n "(cached) " >&6
c906108c 13882else
81ecdfbb 13883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13884/* end confdefs.h. */
c906108c 13885
97bf5e38 13886#define _SYSCALL32
d30c5336
JK
13887/* Needed for new procfs interface on sparc-solaris. */
13888#define _STRUCTURED_PROC 1
97bf5e38 13889#include <sys/procfs.h>
bec39cab
AC
13890int
13891main ()
13892{
97bf5e38 13893pr_sigset_t avar
bec39cab
AC
13894 ;
13895 return 0;
13896}
13897_ACEOF
81ecdfbb 13898if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13899 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13900else
81ecdfbb 13901 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13902
c906108c 13903fi
81ecdfbb 13904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13905fi
13906
97bf5e38 13907 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13908
81ecdfbb 13909$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13910
97bf5e38 13911 fi
81ecdfbb
RW
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13913$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13914
81ecdfbb
RW
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13916$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13917 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13918 $as_echo_n "(cached) " >&6
c906108c 13919else
81ecdfbb 13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13921/* end confdefs.h. */
c906108c 13922
97bf5e38 13923#define _SYSCALL32
d30c5336
JK
13924/* Needed for new procfs interface on sparc-solaris. */
13925#define _STRUCTURED_PROC 1
97bf5e38 13926#include <sys/procfs.h>
bec39cab
AC
13927int
13928main ()
13929{
97bf5e38 13930pr_sigaction64_t avar
bec39cab
AC
13931 ;
13932 return 0;
13933}
13934_ACEOF
81ecdfbb 13935if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13936 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13937else
81ecdfbb 13938 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13939
c906108c 13940fi
81ecdfbb 13941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13942fi
13943
97bf5e38 13944 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13945
81ecdfbb 13946$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13947
97bf5e38 13948 fi
81ecdfbb
RW
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13950$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13951
81ecdfbb
RW
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13953$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13954 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13955 $as_echo_n "(cached) " >&6
97bf5e38 13956else
81ecdfbb 13957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13958/* end confdefs.h. */
97bf5e38
MK
13959
13960#define _SYSCALL32
d30c5336
JK
13961/* Needed for new procfs interface on sparc-solaris. */
13962#define _STRUCTURED_PROC 1
97bf5e38 13963#include <sys/procfs.h>
bec39cab
AC
13964int
13965main ()
13966{
97bf5e38 13967pr_siginfo64_t avar
bec39cab
AC
13968 ;
13969 return 0;
13970}
13971_ACEOF
81ecdfbb 13972if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13973 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13974else
81ecdfbb 13975 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13976
97bf5e38 13977fi
81ecdfbb 13978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13979fi
c906108c 13980
97bf5e38 13981 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13982
81ecdfbb 13983$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13984
97bf5e38 13985 fi
81ecdfbb
RW
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13987$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13988
13989
97bf5e38
MK
13990
13991
13992
97bf5e38 13993 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13995$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13996 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13997 $as_echo_n "(cached) " >&6
c906108c 13998else
81ecdfbb 13999 if test "$cross_compiling" = yes; then :
97bf5e38 14000 gdb_cv_prfpregset_t_broken=yes
c906108c 14001else
81ecdfbb 14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14003/* end confdefs.h. */
97bf5e38
MK
14004#include <sys/procfs.h>
14005 int main ()
14006 {
14007 if (sizeof (prfpregset_t) == sizeof (void *))
14008 return 1;
14009 return 0;
14010 }
bec39cab 14011_ACEOF
81ecdfbb 14012if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14013 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14014else
14015 gdb_cv_prfpregset_t_broken=yes
c906108c 14016fi
81ecdfbb
RW
14017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14018 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14019fi
81ecdfbb 14020
c906108c
SS
14021fi
14022
81ecdfbb
RW
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14024$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14025 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14026
81ecdfbb 14027$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14028
97bf5e38
MK
14029 fi
14030 fi
c906108c 14031
bec39cab 14032
81ecdfbb
RW
14033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
14034$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
14035 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
14036 $as_echo_n "(cached) " >&6
c906108c 14037else
81ecdfbb 14038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14039/* end confdefs.h. */
97bf5e38
MK
14040#include <unistd.h>
14041#include <sys/types.h>
14042#include <sys/procfs.h>
14043
bec39cab
AC
14044int
14045main ()
14046{
97bf5e38
MK
14047
14048 int dummy;;
14049 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
14050
14051 ;
14052 return 0;
14053}
14054_ACEOF
81ecdfbb 14055if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14056 gdb_cv_have_procfs_piocset=yes
c906108c 14057else
81ecdfbb 14058 gdb_cv_have_procfs_piocset=no
c906108c 14059fi
81ecdfbb 14060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14061fi
97bf5e38 14062
81ecdfbb
RW
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
14064$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 14065 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 14066
81ecdfbb 14067$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
14068
14069 fi
c906108c 14070fi
c906108c 14071
97bf5e38 14072if test ${host} = ${target} ; then
bec39cab 14073
81ecdfbb
RW
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
14075$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
14076 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
14077 $as_echo_n "(cached) " >&6
bec39cab 14078else
81ecdfbb 14079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14080/* end confdefs.h. */
97bf5e38 14081#include <link.h>
bec39cab
AC
14082int
14083main ()
14084{
97bf5e38 14085struct link_map lm; (void) lm.l_addr;
bec39cab
AC
14086 ;
14087 return 0;
14088}
14089_ACEOF
81ecdfbb 14090if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14091 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 14092else
81ecdfbb 14093 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 14094fi
81ecdfbb 14095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14096fi
14097
81ecdfbb
RW
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
14099$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 14100 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 14101
81ecdfbb 14102$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14103
14104 fi
14105
bec39cab 14106
81ecdfbb
RW
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
14108$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
14109 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
14110 $as_echo_n "(cached) " >&6
c906108c 14111else
81ecdfbb 14112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14113/* end confdefs.h. */
97bf5e38
MK
14114#include <sys/types.h>
14115#include <link.h>
bec39cab
AC
14116int
14117main ()
14118{
97bf5e38 14119struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
14120 ;
14121 return 0;
14122}
14123_ACEOF
81ecdfbb 14124if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14125 gdb_cv_have_struct_link_map_with_lm_members=yes
14126else
81ecdfbb 14127 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14128fi
81ecdfbb 14129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14130fi
c906108c 14131
81ecdfbb
RW
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14133$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14134 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14135
81ecdfbb 14136$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14137
14138 fi
14139
bec39cab 14140
81ecdfbb
RW
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14142$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14143 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14144 $as_echo_n "(cached) " >&6
c906108c 14145else
81ecdfbb 14146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14147/* end confdefs.h. */
97bf5e38
MK
14148#include <sys/types.h>
14149#ifdef HAVE_NLIST_H
14150#include <nlist.h>
14151#endif
14152#include <link.h>
bec39cab
AC
14153int
14154main ()
14155{
97bf5e38 14156struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14157 ;
14158 return 0;
14159}
14160_ACEOF
81ecdfbb 14161if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14162 gdb_cv_have_struct_so_map_with_som_members=yes
14163else
81ecdfbb 14164 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14165fi
81ecdfbb 14166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14167fi
c906108c 14168
81ecdfbb
RW
14169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14170$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14171 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14172
81ecdfbb 14173$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14174
97bf5e38 14175 fi
c906108c 14176
bec39cab 14177
81ecdfbb
RW
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14179$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14180 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14181 $as_echo_n "(cached) " >&6
97bf5e38 14182else
81ecdfbb 14183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14184/* end confdefs.h. */
97bf5e38
MK
14185#define _SYSCALL32
14186#include <sys/link.h>
bec39cab
AC
14187int
14188main ()
14189{
97bf5e38 14190struct link_map32 l;
bec39cab
AC
14191 ;
14192 return 0;
14193}
14194_ACEOF
81ecdfbb 14195if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14196 gdb_cv_have_struct_link_map32=yes
14197else
81ecdfbb 14198 gdb_cv_have_struct_link_map32=no
97bf5e38 14199fi
81ecdfbb 14200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14201fi
c906108c 14202
81ecdfbb
RW
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14204$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14205 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14206
81ecdfbb 14207$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14208
60ca704f 14209
81ecdfbb 14210$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14211
97bf5e38
MK
14212 fi
14213fi
c906108c 14214
bc8bcb4b 14215# Check if the compiler supports the `long long' type.
c906108c 14216
81ecdfbb
RW
14217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14218$as_echo_n "checking for long long support in compiler... " >&6; }
14219if test "${gdb_cv_c_long_long+set}" = set; then :
14220 $as_echo_n "(cached) " >&6
97bf5e38 14221else
81ecdfbb 14222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14223/* end confdefs.h. */
bc8bcb4b 14224extern long long foo;
bec39cab
AC
14225int
14226main ()
14227{
bc8bcb4b 14228switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14229 ;
14230 return 0;
14231}
14232_ACEOF
81ecdfbb 14233if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14234 gdb_cv_c_long_long=yes
14235else
81ecdfbb 14236 gdb_cv_c_long_long=no
97bf5e38 14237fi
81ecdfbb 14238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14239fi
81ecdfbb
RW
14240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14241$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14242if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14243
81ecdfbb 14244$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14245
14246fi
14247
bc8bcb4b 14248# Check if the compiler and runtime support printing long longs.
97bf5e38 14249
81ecdfbb
RW
14250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14251$as_echo_n "checking for long long support in printf... " >&6; }
14252if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14253 $as_echo_n "(cached) " >&6
97bf5e38 14254else
81ecdfbb 14255 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14256 gdb_cv_printf_has_long_long=no
14257else
81ecdfbb 14258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14259/* end confdefs.h. */
bc8bcb4b
MK
14260$ac_includes_default
14261int
14262main ()
14263{
14264char buf[32];
97bf5e38
MK
14265 long long l = 0;
14266 l = (l << 16) + 0x0123;
14267 l = (l << 16) + 0x4567;
14268 l = (l << 16) + 0x89ab;
14269 l = (l << 16) + 0xcdef;
14270 sprintf (buf, "0x%016llx", l);
14271 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14272 ;
14273 return 0;
c906108c 14274}
bec39cab 14275_ACEOF
81ecdfbb 14276if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14277 gdb_cv_printf_has_long_long=yes
14278else
81ecdfbb 14279 gdb_cv_printf_has_long_long=no
97bf5e38 14280fi
81ecdfbb
RW
14281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14282 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14283fi
81ecdfbb 14284
97bf5e38 14285fi
81ecdfbb
RW
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14287$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14288if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14289
81ecdfbb 14290$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14291
14292fi
97bf5e38 14293
1a619819
LM
14294# Check if the compiler and runtime support printing decfloats.
14295
81ecdfbb
RW
14296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14297$as_echo_n "checking for decfloat support in printf... " >&6; }
14298if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14299 $as_echo_n "(cached) " >&6
1a619819 14300else
81ecdfbb 14301 if test "$cross_compiling" = yes; then :
1a619819
LM
14302 gdb_cv_printf_has_decfloat=no
14303else
81ecdfbb 14304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14305/* end confdefs.h. */
14306$ac_includes_default
14307int
14308main ()
14309{
14310char buf[64];
14311 _Decimal32 d32 = 1.2345df;
14312 _Decimal64 d64 = 1.2345dd;
14313 _Decimal128 d128 = 1.2345dl;
14314 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14315 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14316 ;
14317 return 0;
14318}
14319_ACEOF
81ecdfbb 14320if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14321 gdb_cv_printf_has_decfloat=yes
14322else
81ecdfbb 14323 gdb_cv_printf_has_decfloat=no
1a619819 14324fi
81ecdfbb
RW
14325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14327fi
81ecdfbb 14328
1a619819 14329fi
81ecdfbb
RW
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14331$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14332if test $gdb_cv_printf_has_decfloat = yes; then
14333
81ecdfbb 14334$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14335
14336fi
14337
bc8bcb4b
MK
14338# Check if the compiler supports the `long double' type. We can't use
14339# AC_C_LONG_DOUBLE because that one does additional checks on the
14340# constants defined in <float.h> that fail on some systems,
14341# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14342
81ecdfbb
RW
14343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14344$as_echo_n "checking for long double support in compiler... " >&6; }
14345if test "${gdb_cv_c_long_double+set}" = set; then :
14346 $as_echo_n "(cached) " >&6
97bf5e38 14347else
81ecdfbb 14348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14349/* end confdefs.h. */
97bf5e38 14350long double foo;
bec39cab 14351_ACEOF
81ecdfbb 14352if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14353 gdb_cv_c_long_double=yes
97bf5e38 14354else
81ecdfbb 14355 gdb_cv_c_long_double=no
97bf5e38 14356fi
81ecdfbb 14357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14358fi
81ecdfbb
RW
14359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14360$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14361if test $gdb_cv_c_long_double = yes; then
c906108c 14362
81ecdfbb 14363$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14364
14365fi
14366
bc8bcb4b 14367# Check if the compiler and runtime support printing long doubles.
97bf5e38 14368
81ecdfbb
RW
14369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14370$as_echo_n "checking for long double support in printf... " >&6; }
14371if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14372 $as_echo_n "(cached) " >&6
97bf5e38 14373else
81ecdfbb 14374 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14375 gdb_cv_printf_has_long_double=no
14376else
81ecdfbb 14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14378/* end confdefs.h. */
bc8bcb4b
MK
14379$ac_includes_default
14380int
14381main ()
14382{
14383char buf[16];
97bf5e38
MK
14384 long double f = 3.141592653;
14385 sprintf (buf, "%Lg", f);
14386 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14387 ;
14388 return 0;
97bf5e38 14389}
bec39cab 14390_ACEOF
81ecdfbb 14391if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14392 gdb_cv_printf_has_long_double=yes
c906108c 14393else
81ecdfbb 14394 gdb_cv_printf_has_long_double=no
c906108c 14395fi
81ecdfbb
RW
14396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14397 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14398fi
81ecdfbb 14399
c906108c 14400fi
81ecdfbb
RW
14401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14402$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14403if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14404
81ecdfbb 14405$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14406
14407fi
97bf5e38 14408
bc8bcb4b 14409# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14410
81ecdfbb
RW
14411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14412$as_echo_n "checking for long double support in scanf... " >&6; }
14413if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14414 $as_echo_n "(cached) " >&6
97bf5e38 14415else
81ecdfbb 14416 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14417 gdb_cv_scanf_has_long_double=no
14418else
81ecdfbb 14419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14420/* end confdefs.h. */
bc8bcb4b
MK
14421#include <stdio.h>
14422int
14423main ()
14424{
14425char *buf = "3.141592653";
97bf5e38
MK
14426 long double f = 0;
14427 sscanf (buf, "%Lg", &f);
14428 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14429 ;
14430 return 0;
97bf5e38 14431}
bec39cab 14432_ACEOF
81ecdfbb 14433if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14434 gdb_cv_scanf_has_long_double=yes
14435else
81ecdfbb 14436 gdb_cv_scanf_has_long_double=no
97bf5e38 14437fi
81ecdfbb
RW
14438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14439 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14440fi
81ecdfbb 14441
c906108c 14442fi
81ecdfbb
RW
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14444$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14445if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14446
81ecdfbb 14447$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14448
14449fi
c906108c 14450
438013df
AO
14451case ${host_os} in
14452aix*)
81ecdfbb
RW
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14454$as_echo_n "checking for -bbigtoc option... " >&6; }
14455if test "${gdb_cv_bigtoc+set}" = set; then :
14456 $as_echo_n "(cached) " >&6
438013df 14457else
bec39cab 14458
438013df
AO
14459 SAVE_LDFLAGS=$LDFLAGS
14460
14461 case $GCC in
14462 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14463 *) gdb_cv_bigtoc=-bbigtoc ;;
14464 esac
14465
14466 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14468/* end confdefs.h. */
438013df 14469
bec39cab
AC
14470int
14471main ()
14472{
438013df 14473int i;
bec39cab
AC
14474 ;
14475 return 0;
14476}
14477_ACEOF
81ecdfbb 14478if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14479
81ecdfbb
RW
14480else
14481 gdb_cv_bigtoc=
438013df 14482fi
81ecdfbb
RW
14483rm -f core conftest.err conftest.$ac_objext \
14484 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14485 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14486
bec39cab 14487fi
81ecdfbb
RW
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14489$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14490 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14491 ;;
14492esac
14493
38f6b338 14494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14495$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14496dynamic_list=false
14497if test "${gdb_native}" = yes; then
14498 # The dynamically loaded libthread_db needs access to symbols in the gdb
14499 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14500 # may not be supported there.
14501 old_LDFLAGS="$LDFLAGS"
14502 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14503 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14504 LDFLAGS="$LDFLAGS $RDYNAMIC"
14505 if test "${have_libpython}" = no; then
14506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14507/* end confdefs.h. */
14508
14509int
14510main ()
14511{
14512
14513 ;
14514 return 0;
14515}
14516_ACEOF
14517if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14518 dynamic_list=true
14519fi
14520rm -f core conftest.err conftest.$ac_objext \
14521 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14522 else
14523 # Workaround http://bugs.python.org/issue4434 where static
14524 # libpythonX.Y.a would get its symbols required for
14525 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14526 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14527 old_CFLAGS="$CFLAGS"
14528 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14529 if test "$cross_compiling" = yes; then :
3bebe2f2 14530 true
f6528abd 14531else
3bebe2f2
JK
14532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14533/* end confdefs.h. */
14534#include "${have_libpython}/Python.h"
14535int
14536main ()
14537{
14538int err;
38f6b338
JK
14539 Py_Initialize ();
14540 err = PyRun_SimpleString ("import itertools\n");
14541 Py_Finalize ();
14542 return err == 0 ? 0 : 1;
3bebe2f2
JK
14543 ;
14544 return 0;
14545}
14546_ACEOF
14547if ac_fn_c_try_run "$LINENO"; then :
14548 dynamic_list=true
14549fi
14550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14551 conftest.$ac_objext conftest.beam conftest.$ac_ext
14552fi
14553
38f6b338
JK
14554 CFLAGS="$old_CFLAGS"
14555 fi
14556 LDFLAGS="$old_LDFLAGS"
14557fi
14558if $dynamic_list; then
14559 found="-Wl,--dynamic-list"
14560 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14561else
38f6b338
JK
14562 found="-rdynamic"
14563 RDYNAMIC="-rdynamic"
f6528abd 14564fi
f6528abd 14565
38f6b338 14566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14567$as_echo "$found" >&6; }
0407b3f1 14568
f6528abd 14569
0407b3f1 14570if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14571 case ${host_os} in
c906108c 14572 solaris*)
d92419e5
JB
14573 # See if thread_db library is around for Solaris thread debugging.
14574 # Note that we must explicitly test for version 1 of the library
14575 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14576 # the same API.
81ecdfbb
RW
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14578$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14579 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14581$as_echo "yes" >&6; }
60ca704f 14582
81ecdfbb 14583$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14584
3483b318 14585 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14586 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14588$as_echo_n "checking for dlopen in -ldl... " >&6; }
14589if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14590 $as_echo_n "(cached) " >&6
c906108c 14591else
bec39cab 14592 ac_check_lib_save_LIBS=$LIBS
c906108c 14593LIBS="-ldl $LIBS"
81ecdfbb 14594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14595/* end confdefs.h. */
14596
81ecdfbb
RW
14597/* Override any GCC internal prototype to avoid an error.
14598 Use char because int might match the return type of a GCC
14599 builtin and then its argument prototype would still apply. */
bec39cab
AC
14600#ifdef __cplusplus
14601extern "C"
14602#endif
bec39cab
AC
14603char dlopen ();
14604int
14605main ()
14606{
81ecdfbb 14607return dlopen ();
bec39cab
AC
14608 ;
14609 return 0;
14610}
14611_ACEOF
81ecdfbb 14612if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14613 ac_cv_lib_dl_dlopen=yes
14614else
81ecdfbb 14615 ac_cv_lib_dl_dlopen=no
bec39cab 14616fi
81ecdfbb
RW
14617rm -f core conftest.err conftest.$ac_objext \
14618 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14619LIBS=$ac_check_lib_save_LIBS
14620fi
81ecdfbb
RW
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14622$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14623if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14624 cat >>confdefs.h <<_ACEOF
14625#define HAVE_LIBDL 1
14626_ACEOF
c906108c
SS
14627
14628 LIBS="-ldl $LIBS"
14629
c906108c
SS
14630fi
14631
f6528abd 14632 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14633 # Sun randomly tweaked the prototypes in <proc_service.h>
14634 # at one point.
81ecdfbb
RW
14635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14636$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14637 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14638 $as_echo_n "(cached) " >&6
c906108c 14639else
bec39cab 14640
81ecdfbb 14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14642/* end confdefs.h. */
c906108c
SS
14643
14644 #include <proc_service.h>
14645 ps_err_e ps_pdwrite
14646 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14647
bec39cab
AC
14648int
14649main ()
14650{
14651
14652 ;
14653 return 0;
14654}
14655_ACEOF
81ecdfbb 14656if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14657 gdb_cv_proc_service_is_old=no
14658else
81ecdfbb 14659 gdb_cv_proc_service_is_old=yes
c906108c 14660fi
81ecdfbb 14661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14662
c906108c
SS
14663fi
14664
81ecdfbb
RW
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14666$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14667 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14668
81ecdfbb 14669$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14670
14671 fi
14672 else
81ecdfbb
RW
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
c906108c
SS
14675 fi
14676 ;;
d92419e5 14677 aix*)
81ecdfbb
RW
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14679$as_echo_n "checking for AiX thread debugging library... " >&6; }
14680 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14681 $as_echo_n "(cached) " >&6
bec39cab 14682else
81ecdfbb 14683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14684/* end confdefs.h. */
d92419e5 14685#include <sys/pthdebug.h>
bec39cab
AC
14686int
14687main ()
14688{
d92419e5
JB
14689#ifndef PTHDB_VERSION_3
14690 #error
14691 #endif
bec39cab
AC
14692 ;
14693 return 0;
14694}
14695_ACEOF
81ecdfbb 14696if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14697 gdb_cv_have_aix_thread_debug=yes
14698else
81ecdfbb 14699 gdb_cv_have_aix_thread_debug=no
d92419e5 14700fi
81ecdfbb 14701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14702fi
14703
81ecdfbb
RW
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14705$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14706 if test $gdb_cv_have_aix_thread_debug = yes; then
14707 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14708 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14709 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14710
14711 # Older versions of AIX do not provide the declaration for
14712 # the getthrds function (it appears that it was introduced
14713 # with AIX 6.x).
14714 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14715"
14716if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14717 ac_have_decl=1
14718else
14719 ac_have_decl=0
14720fi
14721
14722cat >>confdefs.h <<_ACEOF
14723#define HAVE_DECL_GETTHRDS $ac_have_decl
14724_ACEOF
14725
d92419e5
JB
14726 fi
14727 ;;
c906108c 14728 esac
bec39cab 14729
c906108c
SS
14730fi
14731
3f47be5c 14732if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14734$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14735if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14736 $as_echo_n "(cached) " >&6
bec39cab 14737else
81ecdfbb 14738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14739/* end confdefs.h. */
3f47be5c 14740#include <thread_db.h>
bec39cab
AC
14741int
14742main ()
14743{
3f47be5c 14744int i = TD_NOTALLOC;
bec39cab
AC
14745 ;
14746 return 0;
14747}
14748_ACEOF
81ecdfbb 14749if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14750 gdb_cv_thread_db_h_has_td_notalloc=yes
14751else
81ecdfbb 14752 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14753
3f47be5c 14754fi
81ecdfbb 14755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14756
bec39cab 14757fi
81ecdfbb
RW
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14759$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14761$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14762if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14763 $as_echo_n "(cached) " >&6
59f80f10 14764else
81ecdfbb 14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14766/* end confdefs.h. */
14767#include <thread_db.h>
14768int
14769main ()
14770{
14771int i = TD_VERSION;
14772 ;
14773 return 0;
14774}
14775_ACEOF
81ecdfbb 14776if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14777 gdb_cv_thread_db_h_has_td_version=yes
14778else
81ecdfbb 14779 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14780
14781fi
81ecdfbb 14782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14783
14784fi
81ecdfbb
RW
14785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14786$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14788$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14789if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14790 $as_echo_n "(cached) " >&6
59f80f10 14791else
81ecdfbb 14792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14793/* end confdefs.h. */
14794#include <thread_db.h>
14795int
14796main ()
14797{
14798int i = TD_NOTLS;
14799 ;
14800 return 0;
14801}
14802_ACEOF
81ecdfbb 14803if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14804 gdb_cv_thread_db_h_has_td_notls=yes
14805else
81ecdfbb 14806 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14807
14808fi
81ecdfbb 14809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14810
14811fi
81ecdfbb
RW
14812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14813$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14814fi
14815if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14816
81ecdfbb 14817$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14818
59f80f10
DJ
14819fi
14820if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14821
81ecdfbb 14822$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14823
14824fi
14825if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14826
81ecdfbb 14827$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14828
3f47be5c
EZ
14829fi
14830
b757528f 14831if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14833$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14834if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14835 $as_echo_n "(cached) " >&6
bec39cab 14836else
81ecdfbb 14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14838/* end confdefs.h. */
b757528f 14839#include <sys/syscall.h>
bec39cab
AC
14840int
14841main ()
14842{
b757528f 14843int i = __NR_tkill;
bec39cab
AC
14844 ;
14845 return 0;
14846}
14847_ACEOF
81ecdfbb 14848if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14849 gdb_cv_sys_syscall_h_has_tkill=yes
14850else
81ecdfbb 14851 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14852
b757528f 14853fi
81ecdfbb 14854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14855
bec39cab 14856fi
81ecdfbb
RW
14857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14858$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14859fi
14860if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14861
81ecdfbb 14862$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14863
14864fi
14865
81ecdfbb
RW
14866ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14867"
14868if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14869 ac_have_decl=1
10568435 14870else
81ecdfbb 14871 ac_have_decl=0
10568435 14872fi
10568435
JK
14873
14874cat >>confdefs.h <<_ACEOF
81ecdfbb 14875#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14876_ACEOF
14877
14878
81ecdfbb
RW
14879if test "$cross_compiling" = yes; then :
14880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14881/* end confdefs.h. */
14882#include <sys/personality.h>
14883int
14884main ()
14885{
14886
14887# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14888# define ADDR_NO_RANDOMIZE 0x0040000
14889# endif
14890 /* Test the flag could be set and stays set. */
14891 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14892 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14893 return 1
14894 ;
14895 return 0;
14896}
14897_ACEOF
81ecdfbb 14898if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14899 have_personality=true
14900else
81ecdfbb 14901 have_personality=false
10568435 14902fi
81ecdfbb
RW
14903rm -f core conftest.err conftest.$ac_objext \
14904 conftest$ac_exeext conftest.$ac_ext
10568435 14905else
81ecdfbb 14906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14907/* end confdefs.h. */
14908#include <sys/personality.h>
14909int
14910main ()
14911{
14912
14913# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14914# define ADDR_NO_RANDOMIZE 0x0040000
14915# endif
14916 /* Test the flag could be set and stays set. */
14917 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14918 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14919 return 1
14920 ;
14921 return 0;
14922}
14923_ACEOF
81ecdfbb 14924if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14925 have_personality=true
14926else
81ecdfbb 14927 have_personality=false
10568435 14928fi
81ecdfbb
RW
14929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14930 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14931fi
81ecdfbb 14932
10568435
JK
14933if $have_personality
14934then
14935
81ecdfbb 14936$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14937
14938fi
14939
fb40c209 14940
b14b1491 14941target_sysroot_reloc=0
bec39cab 14942
81ecdfbb
RW
14943# Check whether --with-sysroot was given.
14944if test "${with_sysroot+set}" = set; then :
14945 withval=$with_sysroot;
030292b7 14946 case ${with_sysroot} in
715d1656 14947 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14948 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14949 esac
14950
14951 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14952
07abfebf
RS
14953 if test "x$prefix" = xNONE; then
14954 test_prefix=/usr/local
14955 else
14956 test_prefix=$prefix
14957 fi
aa28a74e 14958 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14959 test_exec_prefix=$test_prefix
030292b7 14960 else
07abfebf 14961 test_exec_prefix=$exec_prefix
030292b7
DJ
14962 fi
14963 case ${TARGET_SYSTEM_ROOT} in
715d1656 14964 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14965 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14966 '${prefix}'|'${prefix}/'*|\
715d1656 14967 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14968 target_sysroot_reloc=1
030292b7
DJ
14969 ;;
14970 esac
14971
14972else
bec39cab 14973
030292b7
DJ
14974 TARGET_SYSTEM_ROOT=
14975 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14976
81ecdfbb 14977fi
b14b1491 14978
81ecdfbb 14979TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14980
14981
14982
16e7150e 14983
16e7150e 14984
81ecdfbb
RW
14985# Check whether --with-system-gdbinit was given.
14986if test "${with_system_gdbinit+set}" = set; then :
14987 withval=$with_system_gdbinit;
b14b1491
TT
14988 SYSTEM_GDBINIT=$withval
14989else
14990 SYSTEM_GDBINIT=
81ecdfbb
RW
14991fi
14992
16e7150e
JG
14993
14994 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14995 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14996 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14997 ac_define_dir=`eval echo $ac_define_dir`
14998
14999cat >>confdefs.h <<_ACEOF
15000#define SYSTEM_GDBINIT "$ac_define_dir"
15001_ACEOF
15002
15003
15004
0c4a4063 15005
b14b1491
TT
15006 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15007 if test "x$prefix" = xNONE; then
15008 test_prefix=/usr/local
15009 else
15010 test_prefix=$prefix
15011 fi
15012 else
15013 test_prefix=$exec_prefix
15014 fi
15015 value=0
15016 case ${ac_define_dir} in
15017 "${test_prefix}"|"${test_prefix}/"*|\
15018 '${exec_prefix}'|'${exec_prefix}/'*)
15019 value=1
15020 ;;
15021 esac
16e7150e 15022
b14b1491
TT
15023cat >>confdefs.h <<_ACEOF
15024#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15025_ACEOF
15026
b14b1491 15027
16e7150e 15028
0c4a4063 15029
81ecdfbb
RW
15030# Check whether --enable-werror was given.
15031if test "${enable_werror+set}" = set; then :
15032 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15033 yes | y) ERROR_ON_WARNING="yes" ;;
15034 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15035 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15036 esac
81ecdfbb
RW
15037fi
15038
094a342e
MK
15039
15040# Enable -Werror by default when using gcc
15041if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
15042 ERROR_ON_WARNING=yes
15043fi
15044
15045WERROR_CFLAGS=""
15046if test "${ERROR_ON_WARNING}" = yes ; then
15047 WERROR_CFLAGS="-Werror"
15048fi
15049
aa79a185
DJ
15050# The entries after -Wno-pointer-sign are disabled warnings which may
15051# be enabled in the future, which can not currently be used to build
15052# GDB.
15053# NOTE: If you change this list, remember to update
3b851bce 15054# gdb/doc/gdbint.texinfo.
aa79a185
DJ
15055build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
15056-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
15057-Wno-unused -Wunused-value -Wunused-function \
15058-Wno-switch -Wno-char-subscripts"
a3b362c4 15059
3526781e
DJ
15060# Enable -Wno-format by default when using gcc on mingw since many
15061# GCC versions complain about %I64.
15062case "${host}" in
15063 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15064esac
15065
81ecdfbb
RW
15066# Check whether --enable-build-warnings was given.
15067if test "${enable_build_warnings+set}" = set; then :
15068 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15069 yes) ;;
15070 no) build_warnings="-w";;
15071 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15072 build_warnings="${build_warnings} ${t}";;
15073 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15074 build_warnings="${t} ${build_warnings}";;
15075 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15076esac
d4f3574e 15077if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15078 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15079fi
81ecdfbb
RW
15080fi
15081# Check whether --enable-gdb-build-warnings was given.
15082if test "${enable_gdb_build_warnings+set}" = set; then :
15083 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15084 yes) ;;
15085 no) build_warnings="-w";;
15086 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15087 build_warnings="${build_warnings} ${t}";;
15088 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15089 build_warnings="${t} ${build_warnings}";;
15090 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15091esac
15092if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15093 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15094fi
81ecdfbb
RW
15095fi
15096WARN_CFLAGS=""
c906108c
SS
15097if test "x${build_warnings}" != x -a "x$GCC" = xyes
15098then
81ecdfbb
RW
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15100$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15101 # Separate out the -Werror flag as some files just cannot be
15102 # compiled with it enabled.
15103 for w in ${build_warnings}; do
15104 case $w in
15105 -Werr*) WERROR_CFLAGS=-Werror ;;
15106 *) # Check that GCC accepts it
4536bbc6
AC
15107 saved_CFLAGS="$CFLAGS"
15108 CFLAGS="$CFLAGS $w"
81ecdfbb 15109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15110/* end confdefs.h. */
4536bbc6 15111
bec39cab
AC
15112int
15113main ()
15114{
4536bbc6 15115
bec39cab
AC
15116 ;
15117 return 0;
15118}
15119_ACEOF
81ecdfbb 15120if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 15121 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15122fi
81ecdfbb 15123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15124 CFLAGS="$saved_CFLAGS"
746a987d
AC
15125 esac
15126 done
81ecdfbb
RW
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15128$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15129fi
15130
15131
104c1213 15132
7a292a7a 15133# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15135$as_echo_n "checking for cygwin... " >&6; }
15136if test "${gdb_cv_os_cygwin+set}" = set; then :
15137 $as_echo_n "(cached) " >&6
bec39cab 15138else
81ecdfbb 15139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15140/* end confdefs.h. */
7a292a7a
SS
15141
15142#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15143lose
15144#endif
bec39cab 15145_ACEOF
7a292a7a 15146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15147 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15148 gdb_cv_os_cygwin=yes
15149else
7a292a7a
SS
15150 gdb_cv_os_cygwin=no
15151fi
15152rm -f conftest*
15153
15154fi
81ecdfbb
RW
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15156$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15157
aff38e61 15158
3eb25fda 15159SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15160case ${host} in
95cbc983
AC
15161 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15162 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15163 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15164esac
15165
15166
cd0fc7c3
SS
15167# libreadline needs libuser32.a in a cygwin environment
15168WIN32LIBS=
15169if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15170 WIN32LIBS="-luser32"
15171 case "${target}" in
15172 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15173 ;;
15174 esac
cd0fc7c3 15175fi
c906108c 15176
b4505029
MM
15177# The ser-tcp.c module requires sockets.
15178case ${host} in
15179 *mingw32*)
15180
81ecdfbb 15181$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15182
15183 WIN32LIBS="$WIN32LIBS -lws2_32"
15184 ;;
15185esac
15186
7a292a7a 15187
31d99776
DJ
15188# Add ELF support to GDB, but only if BFD includes ELF support.
15189OLD_CFLAGS=$CFLAGS
15190OLD_LDFLAGS=$LDFLAGS
15191OLD_LIBS=$LIBS
cab58a69 15192CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 15193LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 15194intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15195# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15196if test "$plugins" = "yes"; then
15197 LIBS="-ldl $LIBS"
15198fi
0f72fb1c 15199LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15201$as_echo_n "checking for ELF support in BFD... " >&6; }
15202if test "${gdb_cv_var_elf+set}" = set; then :
15203 $as_echo_n "(cached) " >&6
31d99776 15204else
81ecdfbb 15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15206/* end confdefs.h. */
15207#include <stdlib.h>
15208#include "bfd.h"
15209#include "elf-bfd.h"
15210
15211int
15212main ()
15213{
15214bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15215 ;
15216 return 0;
15217}
15218_ACEOF
81ecdfbb 15219if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15220 gdb_cv_var_elf=yes
15221else
81ecdfbb 15222 gdb_cv_var_elf=no
31d99776 15223fi
81ecdfbb
RW
15224rm -f core conftest.err conftest.$ac_objext \
15225 conftest$ac_exeext conftest.$ac_ext
31d99776 15226fi
81ecdfbb
RW
15227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15228$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15229if test $gdb_cv_var_elf = yes; then
15230 CONFIG_OBS="$CONFIG_OBS elfread.o"
15231
81ecdfbb 15232$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15233
075ff26d
JK
15234 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15235 if test "$plugins" = "yes"; then
15236 OLD_LIBS="-ldl $OLD_LIBS"
15237 fi
31d99776
DJ
15238fi
15239CFLAGS=$OLD_CFLAGS
15240LDFLAGS=$OLD_LDFLAGS
15241LIBS=$OLD_LIBS
15242
121ce6e5
DJ
15243# Add any host-specific objects to GDB.
15244CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15245
3fc11d3e
JM
15246LIBGUI="../libgui/src/libgui.a"
15247GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15248
15249
7a292a7a 15250
3fc11d3e
JM
15251WIN32LDAPP=
15252
15253
15254
d91670b9 15255case "${host}" in
686a5eed 15256*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15257 configdir="win"
15258 ;;
15259*)
15260 configdir="unix"
15261 ;;
15262esac
3fc11d3e
JM
15263
15264GDBTKLIBS=
15265if test "${enable_gdbtk}" = "yes"; then
15266
d1c3b63a
KS
15267 # Gdbtk must have an absolute path to srcdir in order to run
15268 # properly when not installed.
15269 here=`pwd`
15270 cd ${srcdir}
15271 GDBTK_SRC_DIR=`pwd`
15272 cd $here
15273
bec39cab 15274
5062cc19
KS
15275 #
15276 # Ok, lets find the tcl configuration
15277 # First, look for one uninstalled.
15278 # the alternative search directory is invoked by --with-tcl
15279 #
3fc11d3e 15280
5062cc19
KS
15281 if test x"${no_tcl}" = x ; then
15282 # we reset no_tcl in case something fails here
15283 no_tcl=true
bec39cab 15284
81ecdfbb
RW
15285# Check whether --with-tcl was given.
15286if test "${with_tcl+set}" = set; then :
15287 withval=$with_tcl; with_tclconfig=${withval}
15288fi
15289
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15291$as_echo_n "checking for Tcl configuration... " >&6; }
15292 if test "${ac_cv_c_tclconfig+set}" = set; then :
15293 $as_echo_n "(cached) " >&6
3fc11d3e 15294else
bec39cab 15295
3fc11d3e 15296
5062cc19
KS
15297 # First check to see if --with-tcl was specified.
15298 case "${host}" in
15299 *-*-cygwin*) platDir="win" ;;
15300 *) platDir="unix" ;;
15301 esac
15302 if test x"${with_tclconfig}" != x ; then
15303 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15304 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15305 else
81ecdfbb 15306 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15307 fi
15308 fi
15309
15310 # then check for a private Tcl installation
15311 if test x"${ac_cv_c_tclconfig}" = x ; then
15312 for i in \
15313 ../tcl \
15314 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15315 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15316 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15317 ../../tcl \
15318 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15319 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15320 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15321 ../../../tcl \
15322 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15323 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15324 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15325 if test -f "$i/$platDir/tclConfig.sh" ; then
15326 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15327 break
15328 fi
15329 done
15330 fi
15331
15332 # on Darwin, check in Framework installation locations
15333 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15334 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15335 `ls -d /Library/Frameworks 2>/dev/null` \
15336 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15337 `ls -d /System/Library/Frameworks 2>/dev/null` \
15338 ; do
15339 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15340 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15341 break
15342 fi
15343 done
15344 fi
15345
15346 # check in a few common install locations
15347 if test x"${ac_cv_c_tclconfig}" = x ; then
15348 for i in `ls -d ${libdir} 2>/dev/null` \
15349 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15350 `ls -d ${prefix}/lib 2>/dev/null` \
15351 `ls -d /usr/local/lib 2>/dev/null` \
15352 `ls -d /usr/contrib/lib 2>/dev/null` \
15353 `ls -d /usr/lib 2>/dev/null` \
15354 ; do
15355 if test -f "$i/tclConfig.sh" ; then
15356 ac_cv_c_tclconfig=`(cd $i; pwd)`
15357 break
15358 fi
15359 done
15360 fi
3fc11d3e 15361
5062cc19
KS
15362 # check in a few other private locations
15363 if test x"${ac_cv_c_tclconfig}" = x ; then
15364 for i in \
15365 ${srcdir}/../tcl \
15366 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15367 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15368 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15369 if test -f "$i/$platDir/tclConfig.sh" ; then
15370 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15371 break
15372 fi
15373 done
15374 fi
bec39cab 15375
3fc11d3e
JM
15376fi
15377
5062cc19
KS
15378
15379 if test x"${ac_cv_c_tclconfig}" = x ; then
15380 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15382$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15383 else
15384 no_tcl=
15385 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15387$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15388 fi
15389 fi
3fc11d3e 15390
bec39cab 15391
85541719
DE
15392 # If $no_tk is nonempty, then we can't do Tk, and there is no
15393 # point to doing Tcl.
bec39cab 15394
5062cc19
KS
15395 #
15396 # Ok, lets find the tk configuration
15397 # First, look for one uninstalled.
15398 # the alternative search directory is invoked by --with-tk
15399 #
3fc11d3e 15400
5062cc19
KS
15401 if test x"${no_tk}" = x ; then
15402 # we reset no_tk in case something fails here
15403 no_tk=true
bec39cab 15404
81ecdfbb
RW
15405# Check whether --with-tk was given.
15406if test "${with_tk+set}" = set; then :
15407 withval=$with_tk; with_tkconfig=${withval}
15408fi
15409
15410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15411$as_echo_n "checking for Tk configuration... " >&6; }
15412 if test "${ac_cv_c_tkconfig+set}" = set; then :
15413 $as_echo_n "(cached) " >&6
bec39cab 15414else
3fc11d3e
JM
15415
15416
5062cc19
KS
15417 # First check to see if --with-tkconfig was specified.
15418 if test x"${with_tkconfig}" != x ; then
15419 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15420 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15421 else
81ecdfbb 15422 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15423 fi
15424 fi
3fc11d3e 15425
5062cc19
KS
15426 # then check for a private Tk library
15427 case "${host}" in
15428 *-*-cygwin*) platDir="win" ;;
15429 *) platDir="unix" ;;
15430 esac
15431 if test x"${ac_cv_c_tkconfig}" = x ; then
15432 for i in \
15433 ../tk \
15434 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15435 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15436 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15437 ../../tk \
15438 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15439 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15440 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15441 ../../../tk \
15442 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15443 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15444 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15445 if test -f "$i/$platDir/tkConfig.sh" ; then
15446 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15447 break
15448 fi
15449 done
15450 fi
15451
15452 # on Darwin, check in Framework installation locations
15453 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15454 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15455 `ls -d /Library/Frameworks 2>/dev/null` \
15456 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15457 `ls -d /System/Library/Frameworks 2>/dev/null` \
15458 ; do
15459 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15460 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15461 break
15462 fi
15463 done
15464 fi
15465
15466 # check in a few common install locations
15467 if test x"${ac_cv_c_tkconfig}" = x ; then
15468 for i in `ls -d ${libdir} 2>/dev/null` \
15469 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15470 `ls -d ${prefix}/lib 2>/dev/null` \
15471 `ls -d /usr/local/lib 2>/dev/null` \
15472 `ls -d /usr/contrib/lib 2>/dev/null` \
15473 `ls -d /usr/lib 2>/dev/null` \
15474 ; do
15475 if test -f "$i/tkConfig.sh" ; then
15476 ac_cv_c_tkconfig=`(cd $i; pwd)`
15477 break
15478 fi
15479 done
15480 fi
15481 # check in a few other private locations
15482 if test x"${ac_cv_c_tkconfig}" = x ; then
15483 for i in \
15484 ${srcdir}/../tk \
15485 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15486 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15487 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15488 if test -f "$i/$platDir/tkConfig.sh" ; then
15489 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15490 break
15491 fi
15492 done
15493 fi
3fc11d3e 15494
3fc11d3e
JM
15495fi
15496
15497
5062cc19
KS
15498 if test x"${ac_cv_c_tkconfig}" = x ; then
15499 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15501$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15502 else
15503 no_tk=
15504 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15506$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15507 fi
3fc11d3e 15508 fi
dd2504ab 15509
dd2504ab 15510
85541719
DE
15511 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15512
81ecdfbb
RW
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15514$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15515
15516 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15518$as_echo "loading" >&6; }
85541719
DE
15519 . ${TCL_BIN_DIR}/tclConfig.sh
15520 else
81ecdfbb
RW
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15522$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15523 fi
15524
15525 # eval is required to do the TCL_DBGX substitution
15526 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15527 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15528
15529 # If the TCL_BIN_DIR is the build directory (not the install directory),
15530 # then set the common variable name to the value of the build variables.
15531 # For example, the variable TCL_LIB_SPEC will be set to the value
15532 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15533 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15534 # installed and uninstalled version of Tcl.
15535 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15536 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15537 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15538 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15539 elif test "`uname -s`" = "Darwin"; then
15540 # If Tcl was built as a framework, attempt to use the libraries
15541 # from the framework at the given location so that linking works
15542 # against Tcl.framework installed in an arbitary location.
15543 case ${TCL_DEFS} in
15544 *TCL_FRAMEWORK*)
15545 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15546 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15547 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15548 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15549 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15550 break
15551 fi
15552 done
15553 fi
15554 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15555 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15556 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15557 fi
15558 ;;
15559 esac
15560 fi
15561
15562 # eval is required to do the TCL_DBGX substitution
15563 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15564 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15565 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15566 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582 # Check for in-tree tcl
15583 here=`pwd`
15584 cd ${srcdir}/..
15585 topdir=`pwd`
15586 cd ${here}
15587
15588 intree="no"
15589 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15590 intree="yes"
15591 fi
15592
15593 # Find Tcl private headers
15594 if test x"${intree}" = xno; then
15595
81ecdfbb
RW
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15597$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15598 private_dir=""
15599 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15600 if test -f ${dir}/tclInt.h ; then
15601 private_dir=${dir}
15602 fi
15603
15604 if test x"${private_dir}" = x; then
81ecdfbb 15605 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15606 else
15607 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15609$as_echo "${private_dir}" >&6; }
85541719
DE
15610 fi
15611
15612 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15613 TCL_LIBRARY="${TCL_LIB_SPEC}"
15614 TCL_DEPS=""
15615 else
15616 # If building tcl in the same src tree, private headers
15617 # are not needed, but we need to be sure to use the right
15618 # headers library
15619 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15620 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15621 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15622 fi
15623
15624
15625
15626
15627
81ecdfbb
RW
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15629$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15630
5062cc19 15631 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15633$as_echo "loading" >&6; }
5062cc19 15634 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15635 else
81ecdfbb
RW
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15637$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15638 fi
bec39cab 15639
5062cc19
KS
15640 # eval is required to do the TK_DBGX substitution
15641 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15642 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15643
15644 # If the TK_BIN_DIR is the build directory (not the install directory),
15645 # then set the common variable name to the value of the build variables.
15646 # For example, the variable TK_LIB_SPEC will be set to the value
15647 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15648 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15649 # installed and uninstalled version of Tcl.
85541719 15650 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15651 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15652 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15653 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15654 elif test "`uname -s`" = "Darwin"; then
15655 # If Tk was built as a framework, attempt to use the libraries
15656 # from the framework at the given location so that linking works
15657 # against Tk.framework installed in an arbitary location.
15658 case ${TK_DEFS} in
15659 *TK_FRAMEWORK*)
85541719 15660 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15661 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15662 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15663 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15664 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15665 break
15666 fi
15667 done
15668 fi
85541719 15669 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15670 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15671 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15672 fi
15673 ;;
15674 esac
3fc11d3e
JM
15675 fi
15676
5062cc19
KS
15677 # eval is required to do the TK_DBGX substitution
15678 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15679 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15680 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15681 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15682
3fc11d3e
JM
15683
15684
bec39cab
AC
15685
15686
15687
15688
15689
15690
15691
3fc11d3e 15692
3fc11d3e 15693
bec39cab 15694
bec39cab 15695
85541719
DE
15696 # Check for in-tree Tk
15697 intree="no"
15698 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15699 intree="yes"
15700 fi
3fc11d3e 15701
85541719
DE
15702 # Find Tk private headers
15703 if test x"${intree}" = xno; then
3fc11d3e 15704
81ecdfbb
RW
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15706$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15707 private_dir=""
15708 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15709 if test -f ${dir}/tkInt.h; then
15710 private_dir=${dir}
3fc11d3e 15711 fi
bec39cab 15712
5062cc19 15713 if test x"${private_dir}" = x; then
81ecdfbb 15714 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15715 else
5062cc19 15716 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15718$as_echo "${private_dir}" >&6; }
3fc11d3e 15719 fi
3fc11d3e 15720
85541719
DE
15721 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15722 TK_LIBRARY=${TK_LIB_SPEC}
15723 TK_DEPS=""
15724 else
15725 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15726 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15727 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15728 fi
3fc11d3e
JM
15729
15730
3fc11d3e
JM
15731
15732
3fc11d3e 15733
85541719 15734 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15735
85541719
DE
15736 # Include some libraries that Tcl and Tk want.
15737 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15738 # Yes, the ordering seems wrong here. But it isn't.
15739 # TK_LIBS is the list of libraries that need to be linked
15740 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15741 # were in LIBS then any link tests after this point would
15742 # try to include things like `$(LIBGUI)', which wouldn't work.
15743 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15744
85541719
DE
15745 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15746 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15747 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15748 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15749 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15750 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15751 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15752
85541719
DE
15753 if test x$gdb_cv_os_cygwin = xyes; then
15754 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15755 WIN32LDAPP="-Wl,--subsystem,console"
15756 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15757 fi
ffc6a242 15758
81ecdfbb 15759 subdirs="$subdirs gdbtk"
3ace7edb 15760
85541719 15761 fi
3fc11d3e
JM
15762fi
15763
15764
15765
15766
15767
15768
15769
15770
81ecdfbb
RW
15771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15772$as_echo_n "checking for X... " >&6; }
bec39cab 15773
c906108c 15774
81ecdfbb
RW
15775# Check whether --with-x was given.
15776if test "${with_x+set}" = set; then :
15777 withval=$with_x;
15778fi
c906108c
SS
15779
15780# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15781if test "x$with_x" = xno; then
15782 # The user explicitly disabled X.
15783 have_x=disabled
15784else
81ecdfbb
RW
15785 case $x_includes,$x_libraries in #(
15786 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15787 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15788 $as_echo_n "(cached) " >&6
c906108c
SS
15789else
15790 # One or both of the vars are not set, and there is no cached value.
bec39cab 15791ac_x_includes=no ac_x_libraries=no
81ecdfbb 15792rm -f -r conftest.dir
bec39cab
AC
15793if mkdir conftest.dir; then
15794 cd conftest.dir
bec39cab 15795 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15796incroot:
15797 @echo incroot='${INCROOT}'
15798usrlibdir:
15799 @echo usrlibdir='${USRLIBDIR}'
15800libdir:
15801 @echo libdir='${LIBDIR}'
15802_ACEOF
15803 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15804 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15805 for ac_var in incroot usrlibdir libdir; do
15806 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15807 done
c906108c 15808 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15809 for ac_extension in a so sl dylib la dll; do
15810 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15811 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15812 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15813 fi
15814 done
15815 # Screen out bogus values from the imake configuration. They are
15816 # bogus both because they are the default anyway, and because
15817 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15818 case $ac_im_incroot in
81ecdfbb 15819 /usr/include) ac_x_includes= ;;
bec39cab 15820 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15821 esac
bec39cab 15822 case $ac_im_usrlibdir in
81ecdfbb 15823 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15824 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15825 esac
15826 fi
15827 cd ..
81ecdfbb 15828 rm -f -r conftest.dir
c906108c
SS
15829fi
15830
bec39cab
AC
15831# Standard set of common directories for X headers.
15832# Check X11 before X11Rn because it is often a symlink to the current release.
15833ac_x_header_dirs='
15834/usr/X11/include
81ecdfbb 15835/usr/X11R7/include
bec39cab
AC
15836/usr/X11R6/include
15837/usr/X11R5/include
15838/usr/X11R4/include
15839
15840/usr/include/X11
81ecdfbb 15841/usr/include/X11R7
bec39cab
AC
15842/usr/include/X11R6
15843/usr/include/X11R5
15844/usr/include/X11R4
15845
15846/usr/local/X11/include
81ecdfbb 15847/usr/local/X11R7/include
bec39cab
AC
15848/usr/local/X11R6/include
15849/usr/local/X11R5/include
15850/usr/local/X11R4/include
15851
15852/usr/local/include/X11
81ecdfbb 15853/usr/local/include/X11R7
bec39cab
AC
15854/usr/local/include/X11R6
15855/usr/local/include/X11R5
15856/usr/local/include/X11R4
15857
15858/usr/X386/include
15859/usr/x386/include
15860/usr/XFree86/include/X11
15861
15862/usr/include
15863/usr/local/include
15864/usr/unsupported/include
15865/usr/athena/include
15866/usr/local/x11r5/include
15867/usr/lpp/Xamples/include
15868
15869/usr/openwin/include
15870/usr/openwin/share/include'
15871
15872if test "$ac_x_includes" = no; then
81ecdfbb 15873 # Guess where to find include files, by looking for Xlib.h.
c906108c 15874 # First, try using that file with no special directory specified.
81ecdfbb 15875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15876/* end confdefs.h. */
81ecdfbb 15877#include <X11/Xlib.h>
bec39cab 15878_ACEOF
81ecdfbb 15879if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15880 # We can compile using X headers with no special include directory.
15881ac_x_includes=
15882else
bec39cab 15883 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15884 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15885 ac_x_includes=$ac_dir
15886 break
15887 fi
15888done
c906108c 15889fi
bec39cab
AC
15890rm -f conftest.err conftest.$ac_ext
15891fi # $ac_x_includes = no
c906108c 15892
bec39cab 15893if test "$ac_x_libraries" = no; then
c906108c 15894 # Check for the libraries.
c906108c
SS
15895 # See if we find them without any special options.
15896 # Don't add to $LIBS permanently.
bec39cab 15897 ac_save_LIBS=$LIBS
81ecdfbb
RW
15898 LIBS="-lX11 $LIBS"
15899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15900/* end confdefs.h. */
81ecdfbb 15901#include <X11/Xlib.h>
bec39cab
AC
15902int
15903main ()
15904{
81ecdfbb 15905XrmInitialize ()
bec39cab
AC
15906 ;
15907 return 0;
15908}
15909_ACEOF
81ecdfbb 15910if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15911 LIBS=$ac_save_LIBS
c906108c
SS
15912# We can link X programs with no special library path.
15913ac_x_libraries=
15914else
81ecdfbb
RW
15915 LIBS=$ac_save_LIBS
15916for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15917do
bec39cab 15918 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15919 for ac_extension in a so sl dylib la dll; do
15920 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15921 ac_x_libraries=$ac_dir
15922 break 2
15923 fi
15924 done
15925done
15926fi
81ecdfbb
RW
15927rm -f core conftest.err conftest.$ac_objext \
15928 conftest$ac_exeext conftest.$ac_ext
bec39cab 15929fi # $ac_x_libraries = no
c906108c 15930
81ecdfbb
RW
15931case $ac_x_includes,$ac_x_libraries in #(
15932 no,* | *,no | *\'*)
15933 # Didn't find X, or a directory has "'" in its name.
15934 ac_cv_have_x="have_x=no";; #(
15935 *)
15936 # Record where we found X for the cache.
15937 ac_cv_have_x="have_x=yes\
15938 ac_x_includes='$ac_x_includes'\
15939 ac_x_libraries='$ac_x_libraries'"
15940esac
c906108c 15941fi
81ecdfbb
RW
15942;; #(
15943 *) have_x=yes;;
15944 esac
c906108c
SS
15945 eval "$ac_cv_have_x"
15946fi # $with_x != no
15947
15948if test "$have_x" != yes; then
81ecdfbb
RW
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15950$as_echo "$have_x" >&6; }
c906108c
SS
15951 no_x=yes
15952else
15953 # If each of the values was on the command line, it overrides each guess.
15954 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15955 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15956 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15957 ac_cv_have_x="have_x=yes\
15958 ac_x_includes='$x_includes'\
15959 ac_x_libraries='$x_libraries'"
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15961$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15962fi
15963
15964
bec39cab 15965# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15966# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15967# This code just checks for a few cases where we'd like to ignore those
15968# definitions, even when they're present in the '.mt' file. These cases
15969# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15970# not part of the source tree.
7a292a7a 15971#
81ecdfbb
RW
15972# Check whether --enable-sim was given.
15973if test "${enable_sim+set}" = set; then :
15974 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15975 echo "enableval = ${enableval}";
15976 case "${enableval}" in
15977 yes) ignore_sim=false ;;
15978 no) ignore_sim=true ;;
15979 *) ignore_sim=false ;;
15980 esac
15981else
15982 ignore_sim=false
81ecdfbb
RW
15983fi
15984
7a292a7a
SS
15985
15986if test ! -d "${srcdir}/../sim"; then
15987 ignore_sim=true
15988fi
15989
9b624dbe
UW
15990SIM=
15991SIM_OBS=
15992if test "${ignore_sim}" = "false"; then
15993 if test x"${gdb_sim}" != x ; then
15994 SIM="${gdb_sim}"
15995 SIM_OBS="remote-sim.o"
60ca704f 15996
81ecdfbb 15997$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15998
9b624dbe 15999 fi
7a292a7a
SS
16000fi
16001
16002
16003
c906108c
SS
16004
16005
16006
16007
16008
16009
dfcd3bfb 16010
e56ac5c3
AC
16011
16012
b3a90332
AC
16013
16014
c35f4ffc 16015# List of host floatformats.
bec39cab
AC
16016
16017cat >>confdefs.h <<_ACEOF
c35f4ffc 16018#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16019_ACEOF
c35f4ffc 16020
bec39cab
AC
16021
16022cat >>confdefs.h <<_ACEOF
c35f4ffc 16023#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16024_ACEOF
16025
c35f4ffc 16026
bec39cab 16027cat >>confdefs.h <<_ACEOF
c35f4ffc 16028#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16029_ACEOF
c35f4ffc
AC
16030
16031
c906108c
SS
16032# target_subdir is used by the testsuite to find the target libraries.
16033target_subdir=
16034if test "${host}" != "${target}"; then
16035 target_subdir="${target_alias}/"
16036fi
16037
16038
16039frags=
771b4502 16040if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16041 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16042 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16043 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16044 fi
16045 frags="$frags $host_makefile_frag"
16046else
16047 host_makefile_frag=/dev/null
c906108c 16048fi
c906108c 16049
c906108c
SS
16050
16051
16052
771b4502 16053if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16054# We pick this up from the host configuration file (.mh) because we
16055# do not have a native configuration Makefile fragment.
c906108c
SS
16056nativefile=`sed -n '
16057s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16058' ${host_makefile_frag}`
c906108c
SS
16059fi
16060
16061
b00a8037 16062if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16063
16064cat >>confdefs.h <<_ACEOF
b00a8037 16065#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16066_ACEOF
b00a8037
DJ
16067
16068fi
16069
8dcde887 16070# Enable multi-ice-gdb-server.
81ecdfbb
RW
16071# Check whether --enable-multi-ice was given.
16072if test "${enable_multi_ice+set}" = set; then :
16073 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16074 yes | no)
16075 ;;
81ecdfbb 16076 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16077 esac
81ecdfbb 16078fi
b4e70030 16079
81ecdfbb
RW
16080if test "x$enable_multi_ice" = xyes; then
16081 subdirs="$subdirs multi-ice"
3ace7edb 16082
a85f51e7
DJ
16083fi
16084
496c0e1b
JB
16085# Check whether --enable-gdbserver was given.
16086if test "${enable_gdbserver+set}" = set; then :
16087 enableval=$enable_gdbserver; case "${enableval}" in
16088 yes| no|auto) ;;
16089 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16090esac
16091else
16092 enable_gdbserver=auto
16093fi
16094
16095
16096# We only build gdbserver automatically in a native configuration, and
16097# only if the user did not explicitly disable its build.
16098if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16100$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16101 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16103$as_echo "yes" >&6; }
16104 subdirs="$subdirs gdbserver"
3ace7edb 16105
496c0e1b 16106 gdbserver_build_enabled=yes
8dcde887 16107 else
81ecdfbb
RW
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16109$as_echo "no" >&6; }
8dcde887
MK
16110 fi
16111fi
16112
496c0e1b
JB
16113# If the user explicitly request the gdbserver to be built, verify that
16114# we were in fact able to enable it.
16115if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16116 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16117fi
16118
db985757 16119# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16120# to an empty version.
c906108c
SS
16121
16122files=
16123links=
5a2402b8 16124
c906108c
SS
16125rm -f nm.h
16126if test "${nativefile}" != ""; then
0f475e27
AC
16127 case "${nativefile}" in
16128 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16129 * ) GDB_NM_FILE="${nativefile}"
16130 esac
5a2402b8
AC
16131 files="${files} ${GDB_NM_FILE}"
16132 links="${links} nm.h"
60ca704f
SE
16133
16134cat >>confdefs.h <<_ACEOF
b78960be 16135#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16136_ACEOF
5a2402b8 16137
c906108c 16138fi
5a2402b8
AC
16139
16140
bec39cab
AC
16141ac_sources="$files"
16142ac_dests="$links"
16143while test -n "$ac_sources"; do
16144 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16145 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16146 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16147done
81ecdfbb 16148ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16149
16150
c906108c
SS
16151
16152
c906108c 16153
81ecdfbb 16154$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16155
bec39cab 16156
5ae98d25 16157ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16158
16159ac_config_commands="$ac_config_commands default"
89a34d1b 16160
bec39cab
AC
16161cat >confcache <<\_ACEOF
16162# This file is a shell script that caches the results of configure
16163# tests run on this system so they can be shared between configure
16164# scripts and configure runs, see configure's option --config-cache.
16165# It is not useful on other systems. If it contains results you don't
16166# want to keep, you may remove or edit it.
16167#
16168# config.status only pays attention to the cache file if you give it
16169# the --recheck option to rerun configure.
16170#
16171# `ac_cv_env_foo' variables (set or unset) will be overridden when
16172# loading this file, other *unset* `ac_cv_foo' will be assigned the
16173# following values.
16174
16175_ACEOF
16176
16177# The following way of writing the cache mishandles newlines in values,
16178# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16179# So, we kill variables containing newlines.
bec39cab
AC
16180# Ultrix sh set writes to stderr and can't be redirected directly,
16181# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16182(
16183 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16184 eval ac_val=\$$ac_var
16185 case $ac_val in #(
16186 *${as_nl}*)
16187 case $ac_var in #(
16188 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16189$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16190 esac
16191 case $ac_var in #(
16192 _ | IFS | as_nl) ;; #(
16193 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16194 *) { eval $ac_var=; unset $ac_var;} ;;
16195 esac ;;
16196 esac
16197 done
16198
bec39cab 16199 (set) 2>&1 |
81ecdfbb
RW
16200 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16201 *${as_nl}ac_space=\ *)
16202 # `set' does not quote correctly, so add quotes: double-quote
16203 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16204 sed -n \
16205 "s/'/'\\\\''/g;
16206 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16207 ;; #(
bec39cab
AC
16208 *)
16209 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16210 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16211 ;;
81ecdfbb
RW
16212 esac |
16213 sort
16214) |
bec39cab 16215 sed '
81ecdfbb 16216 /^ac_cv_env_/b end
bec39cab 16217 t clear
81ecdfbb 16218 :clear
bec39cab
AC
16219 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16220 t end
81ecdfbb
RW
16221 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16222 :end' >>confcache
16223if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16224 if test -w "$cache_file"; then
16225 test "x$cache_file" != "x/dev/null" &&
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16227$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16228 cat confcache >$cache_file
16229 else
81ecdfbb
RW
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16231$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16232 fi
16233fi
16234rm -f confcache
16235
16236test "x$prefix" = xNONE && prefix=$ac_default_prefix
16237# Let make expand exec_prefix.
16238test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16239
bec39cab
AC
16240DEFS=-DHAVE_CONFIG_H
16241
16242ac_libobjs=
16243ac_ltlibobjs=
16244for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16245 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16246 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16247 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16248 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16249 # will be set to the directory where LIBOBJS objects are built.
16250 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16251 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16252done
16253LIBOBJS=$ac_libobjs
16254
16255LTLIBOBJS=$ac_ltlibobjs
16256
16257
85981d60 16258if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16259 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16260Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16261fi
a417dc56 16262if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16263 as_fn_error "conditional \"GMAKE\" was never defined.
16264Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16265fi
783e057b 16266if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16267 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16268Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16269fi
16270
16271 gl_libobjs=
16272 gl_ltlibobjs=
16273 if test -n "$gl_LIBOBJS"; then
16274 # Remove the extension.
16275 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16276 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16277 gl_libobjs="$gl_libobjs $i.$ac_objext"
16278 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16279 done
16280 fi
16281 gl_LIBOBJS=$gl_libobjs
16282
16283 gl_LTLIBOBJS=$gl_ltlibobjs
16284
16285
16286
16287 gltests_libobjs=
16288 gltests_ltlibobjs=
16289 if test -n "$gltests_LIBOBJS"; then
16290 # Remove the extension.
16291 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16292 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16293 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16294 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16295 done
16296 fi
16297 gltests_LIBOBJS=$gltests_libobjs
16298
16299 gltests_LTLIBOBJS=$gltests_ltlibobjs
16300
16301
e28b3332 16302if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16303 as_fn_error "conditional \"AMDEP\" was never defined.
16304Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16305fi
16306if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16307 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16308Usually this means the macro was only invoked conditionally." "$LINENO" 5
16309fi
16310 if test -n "$EXEEXT"; then
16311 am__EXEEXT_TRUE=
16312 am__EXEEXT_FALSE='#'
16313else
16314 am__EXEEXT_TRUE='#'
16315 am__EXEEXT_FALSE=
e28b3332 16316fi
bec39cab 16317
81ecdfbb
RW
16318
16319
bec39cab 16320: ${CONFIG_STATUS=./config.status}
81ecdfbb 16321ac_write_fail=0
bec39cab
AC
16322ac_clean_files_save=$ac_clean_files
16323ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16324{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16325$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16326as_write_fail=0
16327cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16328#! $SHELL
16329# Generated by $as_me.
16330# Run this file to recreate the current configuration.
16331# Compiler output produced by configure, useful for debugging
16332# configure, is in config.log if it exists.
16333
16334debug=false
16335ac_cs_recheck=false
16336ac_cs_silent=false
bec39cab 16337
81ecdfbb
RW
16338SHELL=\${CONFIG_SHELL-$SHELL}
16339export SHELL
16340_ASEOF
16341cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16342## -------------------- ##
16343## M4sh Initialization. ##
16344## -------------------- ##
16345
16346# Be more Bourne compatible
16347DUALCASE=1; export DUALCASE # for MKS sh
16348if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16349 emulate sh
16350 NULLCMD=:
81ecdfbb 16351 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16352 # is contrary to our usage. Disable this feature.
16353 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16354 setopt NO_GLOB_SUBST
16355else
16356 case `(set -o) 2>/dev/null` in #(
16357 *posix*) :
16358 set -o posix ;; #(
16359 *) :
16360 ;;
16361esac
bec39cab 16362fi
bec39cab 16363
81ecdfbb
RW
16364
16365as_nl='
16366'
16367export as_nl
16368# Printing a long string crashes Solaris 7 /usr/bin/printf.
16369as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16370as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16371as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16372# Prefer a ksh shell builtin over an external printf program on Solaris,
16373# but without wasting forks for bash or zsh.
16374if test -z "$BASH_VERSION$ZSH_VERSION" \
16375 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16376 as_echo='print -r --'
16377 as_echo_n='print -rn --'
16378elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16379 as_echo='printf %s\n'
16380 as_echo_n='printf %s'
16381else
16382 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16383 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16384 as_echo_n='/usr/ucb/echo -n'
16385 else
16386 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16387 as_echo_n_body='eval
16388 arg=$1;
16389 case $arg in #(
16390 *"$as_nl"*)
16391 expr "X$arg" : "X\\(.*\\)$as_nl";
16392 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16393 esac;
16394 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16395 '
16396 export as_echo_n_body
16397 as_echo_n='sh -c $as_echo_n_body as_echo'
16398 fi
16399 export as_echo_body
16400 as_echo='sh -c $as_echo_body as_echo'
16401fi
16402
16403# The user is always right.
16404if test "${PATH_SEPARATOR+set}" != set; then
16405 PATH_SEPARATOR=:
16406 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16407 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16408 PATH_SEPARATOR=';'
16409 }
bec39cab
AC
16410fi
16411
16412
81ecdfbb
RW
16413# IFS
16414# We need space, tab and new line, in precisely that order. Quoting is
16415# there to prevent editors from complaining about space-tab.
16416# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16417# splitting by setting IFS to empty value.)
16418IFS=" "" $as_nl"
16419
16420# Find who we are. Look in the path if we contain no directory separator.
16421case $0 in #((
16422 *[\\/]* ) as_myself=$0 ;;
16423 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16424for as_dir in $PATH
16425do
16426 IFS=$as_save_IFS
16427 test -z "$as_dir" && as_dir=.
16428 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16429 done
16430IFS=$as_save_IFS
16431
16432 ;;
16433esac
16434# We did not find ourselves, most probably we were run as `sh COMMAND'
16435# in which case we are not to be found in the path.
16436if test "x$as_myself" = x; then
16437 as_myself=$0
16438fi
16439if test ! -f "$as_myself"; then
16440 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16441 exit 1
16442fi
16443
16444# Unset variables that we do not need and which cause bugs (e.g. in
16445# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16446# suppresses any "Segmentation fault" message there. '((' could
16447# trigger a bug in pdksh 5.2.14.
16448for as_var in BASH_ENV ENV MAIL MAILPATH
16449do eval test x\${$as_var+set} = xset \
16450 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16451done
bec39cab
AC
16452PS1='$ '
16453PS2='> '
16454PS4='+ '
16455
16456# NLS nuisances.
81ecdfbb
RW
16457LC_ALL=C
16458export LC_ALL
16459LANGUAGE=C
16460export LANGUAGE
16461
16462# CDPATH.
16463(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16464
16465
16466# as_fn_error ERROR [LINENO LOG_FD]
16467# ---------------------------------
16468# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16469# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16470# script with status $?, using 1 if that was 0.
16471as_fn_error ()
16472{
16473 as_status=$?; test $as_status -eq 0 && as_status=1
16474 if test "$3"; then
16475 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16476 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16477 fi
16478 $as_echo "$as_me: error: $1" >&2
16479 as_fn_exit $as_status
16480} # as_fn_error
16481
16482
16483# as_fn_set_status STATUS
16484# -----------------------
16485# Set $? to STATUS, without forking.
16486as_fn_set_status ()
16487{
16488 return $1
16489} # as_fn_set_status
16490
16491# as_fn_exit STATUS
16492# -----------------
16493# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16494as_fn_exit ()
16495{
16496 set +e
16497 as_fn_set_status $1
16498 exit $1
16499} # as_fn_exit
16500
16501# as_fn_unset VAR
16502# ---------------
16503# Portably unset VAR.
16504as_fn_unset ()
16505{
16506 { eval $1=; unset $1;}
16507}
16508as_unset=as_fn_unset
16509# as_fn_append VAR VALUE
16510# ----------------------
16511# Append the text in VALUE to the end of the definition contained in VAR. Take
16512# advantage of any shell optimizations that allow amortized linear growth over
16513# repeated appends, instead of the typical quadratic growth present in naive
16514# implementations.
16515if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16516 eval 'as_fn_append ()
16517 {
16518 eval $1+=\$2
16519 }'
16520else
16521 as_fn_append ()
16522 {
16523 eval $1=\$$1\$2
16524 }
16525fi # as_fn_append
16526
16527# as_fn_arith ARG...
16528# ------------------
16529# Perform arithmetic evaluation on the ARGs, and store the result in the
16530# global $as_val. Take advantage of shells that can avoid forks. The arguments
16531# must be portable across $(()) and expr.
16532if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16533 eval 'as_fn_arith ()
16534 {
16535 as_val=$(( $* ))
16536 }'
16537else
16538 as_fn_arith ()
16539 {
16540 as_val=`expr "$@" || test $? -eq 1`
16541 }
16542fi # as_fn_arith
bec39cab 16543
81ecdfbb
RW
16544
16545if expr a : '\(a\)' >/dev/null 2>&1 &&
16546 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16547 as_expr=expr
16548else
16549 as_expr=false
16550fi
16551
81ecdfbb 16552if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16553 as_basename=basename
16554else
16555 as_basename=false
16556fi
16557
81ecdfbb
RW
16558if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16559 as_dirname=dirname
16560else
16561 as_dirname=false
16562fi
bec39cab 16563
81ecdfbb 16564as_me=`$as_basename -- "$0" ||
bec39cab
AC
16565$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16566 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16567 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16568$as_echo X/"$0" |
16569 sed '/^.*\/\([^/][^/]*\)\/*$/{
16570 s//\1/
16571 q
16572 }
16573 /^X\/\(\/\/\)$/{
16574 s//\1/
16575 q
16576 }
16577 /^X\/\(\/\).*/{
16578 s//\1/
16579 q
16580 }
16581 s/.*/./; q'`
b4e70030 16582
b4e70030
JB
16583# Avoid depending upon Character Ranges.
16584as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16585as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16586as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16587as_cr_digits='0123456789'
16588as_cr_alnum=$as_cr_Letters$as_cr_digits
16589
81ecdfbb
RW
16590ECHO_C= ECHO_N= ECHO_T=
16591case `echo -n x` in #(((((
16592-n*)
16593 case `echo 'xy\c'` in
16594 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16595 xy) ECHO_C='\c';;
16596 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16597 ECHO_T=' ';;
16598 esac;;
16599*)
16600 ECHO_N='-n';;
bec39cab
AC
16601esac
16602
81ecdfbb
RW
16603rm -f conf$$ conf$$.exe conf$$.file
16604if test -d conf$$.dir; then
16605 rm -f conf$$.dir/conf$$.file
bec39cab 16606else
81ecdfbb
RW
16607 rm -f conf$$.dir
16608 mkdir conf$$.dir 2>/dev/null
bec39cab 16609fi
81ecdfbb
RW
16610if (echo >conf$$.file) 2>/dev/null; then
16611 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16612 as_ln_s='ln -s'
81ecdfbb
RW
16613 # ... but there are two gotchas:
16614 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16615 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16616 # In both cases, we have to default to `cp -p'.
16617 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16618 as_ln_s='cp -p'
16619 elif ln conf$$.file conf$$ 2>/dev/null; then
16620 as_ln_s=ln
16621 else
16622 as_ln_s='cp -p'
b4e70030 16623 fi
bec39cab
AC
16624else
16625 as_ln_s='cp -p'
16626fi
81ecdfbb
RW
16627rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16628rmdir conf$$.dir 2>/dev/null
16629
16630
16631# as_fn_mkdir_p
16632# -------------
16633# Create "$as_dir" as a directory, including parents if necessary.
16634as_fn_mkdir_p ()
16635{
16636
16637 case $as_dir in #(
16638 -*) as_dir=./$as_dir;;
16639 esac
16640 test -d "$as_dir" || eval $as_mkdir_p || {
16641 as_dirs=
16642 while :; do
16643 case $as_dir in #(
16644 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16645 *) as_qdir=$as_dir;;
16646 esac
16647 as_dirs="'$as_qdir' $as_dirs"
16648 as_dir=`$as_dirname -- "$as_dir" ||
16649$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16650 X"$as_dir" : 'X\(//\)[^/]' \| \
16651 X"$as_dir" : 'X\(//\)$' \| \
16652 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16653$as_echo X"$as_dir" |
16654 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16655 s//\1/
16656 q
16657 }
16658 /^X\(\/\/\)[^/].*/{
16659 s//\1/
16660 q
16661 }
16662 /^X\(\/\/\)$/{
16663 s//\1/
16664 q
16665 }
16666 /^X\(\/\).*/{
16667 s//\1/
16668 q
16669 }
16670 s/.*/./; q'`
16671 test -d "$as_dir" && break
16672 done
16673 test -z "$as_dirs" || eval "mkdir $as_dirs"
16674 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16675
bec39cab 16676
81ecdfbb 16677} # as_fn_mkdir_p
bec39cab 16678if mkdir -p . 2>/dev/null; then
81ecdfbb 16679 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16680else
16681 test -d ./-p && rmdir ./-p
16682 as_mkdir_p=false
16683fi
16684
81ecdfbb
RW
16685if test -x / >/dev/null 2>&1; then
16686 as_test_x='test -x'
16687else
16688 if ls -dL / >/dev/null 2>&1; then
16689 as_ls_L_option=L
16690 else
16691 as_ls_L_option=
16692 fi
16693 as_test_x='
16694 eval sh -c '\''
16695 if test -d "$1"; then
16696 test -d "$1/.";
16697 else
16698 case $1 in #(
16699 -*)set "./$1";;
16700 esac;
16701 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16702 ???[sx]*):;;*)false;;esac;fi
16703 '\'' sh
16704 '
16705fi
16706as_executable_p=$as_test_x
bec39cab
AC
16707
16708# Sed expression to map a string onto a valid CPP name.
16709as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16710
16711# Sed expression to map a string onto a valid variable name.
16712as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16713
16714
bec39cab 16715exec 6>&1
81ecdfbb
RW
16716## ----------------------------------- ##
16717## Main body of $CONFIG_STATUS script. ##
16718## ----------------------------------- ##
16719_ASEOF
16720test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16721
16722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16723# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16724# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16725# values after options handling.
16726ac_log="
bec39cab 16727This file was extended by $as_me, which was
81ecdfbb 16728generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16729
16730 CONFIG_FILES = $CONFIG_FILES
16731 CONFIG_HEADERS = $CONFIG_HEADERS
16732 CONFIG_LINKS = $CONFIG_LINKS
16733 CONFIG_COMMANDS = $CONFIG_COMMANDS
16734 $ $0 $@
16735
81ecdfbb
RW
16736on `(hostname || uname -n) 2>/dev/null | sed 1q`
16737"
16738
bec39cab
AC
16739_ACEOF
16740
81ecdfbb
RW
16741case $ac_config_files in *"
16742"*) set x $ac_config_files; shift; ac_config_files=$*;;
16743esac
234b45d4 16744
81ecdfbb
RW
16745case $ac_config_headers in *"
16746"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16747esac
b4e70030 16748
b4e70030 16749
81ecdfbb
RW
16750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16751# Files that config.status was made for.
16752config_files="$ac_config_files"
16753config_headers="$ac_config_headers"
16754config_links="$ac_config_links"
16755config_commands="$ac_config_commands"
234b45d4 16756
81ecdfbb 16757_ACEOF
b4e70030 16758
81ecdfbb 16759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16760ac_cs_usage="\
81ecdfbb
RW
16761\`$as_me' instantiates files and other configuration actions
16762from templates according to the current configuration. Unless the files
16763and actions are specified as TAGs, all are instantiated by default.
234b45d4 16764
81ecdfbb 16765Usage: $0 [OPTION]... [TAG]...
234b45d4 16766
bec39cab 16767 -h, --help print this help, then exit
81ecdfbb
RW
16768 -V, --version print version number and configuration settings, then exit
16769 -q, --quiet, --silent
16770 do not print progress messages
bec39cab
AC
16771 -d, --debug don't remove temporary files
16772 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16773 --file=FILE[:TEMPLATE]
16774 instantiate the configuration file FILE
16775 --header=FILE[:TEMPLATE]
16776 instantiate the configuration header FILE
234b45d4 16777
bec39cab
AC
16778Configuration files:
16779$config_files
234b45d4 16780
bec39cab
AC
16781Configuration headers:
16782$config_headers
234b45d4 16783
bec39cab
AC
16784Configuration links:
16785$config_links
234b45d4 16786
bec39cab
AC
16787Configuration commands:
16788$config_commands
16789
81ecdfbb 16790Report bugs to the package provider."
b4e70030 16791
81ecdfbb
RW
16792_ACEOF
16793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16794ac_cs_version="\\
16795config.status
81ecdfbb
RW
16796configured by $0, generated by GNU Autoconf 2.64,
16797 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16798
81ecdfbb 16799Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16800This config.status script is free software; the Free Software Foundation
16801gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16802
16803ac_pwd='$ac_pwd'
16804srcdir='$srcdir'
16805INSTALL='$INSTALL'
16806MKDIR_P='$MKDIR_P'
16807AWK='$AWK'
16808test -n "\$AWK" || AWK=awk
bec39cab
AC
16809_ACEOF
16810
81ecdfbb
RW
16811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16812# The default lists apply if the user does not specify any file.
bec39cab
AC
16813ac_need_defaults=:
16814while test $# != 0
16815do
16816 case $1 in
16817 --*=*)
81ecdfbb
RW
16818 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16819 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16820 ac_shift=:
c906108c 16821 ;;
81ecdfbb 16822 *)
bec39cab
AC
16823 ac_option=$1
16824 ac_optarg=$2
16825 ac_shift=shift
c906108c 16826 ;;
bec39cab 16827 esac
c906108c 16828
bec39cab
AC
16829 case $ac_option in
16830 # Handling of the options.
bec39cab
AC
16831 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16832 ac_cs_recheck=: ;;
81ecdfbb
RW
16833 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16834 $as_echo "$ac_cs_version"; exit ;;
16835 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16836 debug=: ;;
16837 --file | --fil | --fi | --f )
16838 $ac_shift
81ecdfbb
RW
16839 case $ac_optarg in
16840 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16841 esac
16842 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16843 ac_need_defaults=false;;
16844 --header | --heade | --head | --hea )
16845 $ac_shift
81ecdfbb
RW
16846 case $ac_optarg in
16847 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16848 esac
16849 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16850 ac_need_defaults=false;;
81ecdfbb
RW
16851 --he | --h)
16852 # Conflict between --help and --header
16853 as_fn_error "ambiguous option: \`$1'
16854Try \`$0 --help' for more information.";;
16855 --help | --hel | -h )
16856 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16857 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16858 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16859 ac_cs_silent=: ;;
c906108c 16860
bec39cab 16861 # This is an error.
81ecdfbb
RW
16862 -*) as_fn_error "unrecognized option: \`$1'
16863Try \`$0 --help' for more information." ;;
c906108c 16864
81ecdfbb
RW
16865 *) as_fn_append ac_config_targets " $1"
16866 ac_need_defaults=false ;;
c906108c 16867
bec39cab
AC
16868 esac
16869 shift
16870done
c906108c 16871
bec39cab 16872ac_configure_extra_args=
c906108c 16873
bec39cab
AC
16874if $ac_cs_silent; then
16875 exec 6>/dev/null
16876 ac_configure_extra_args="$ac_configure_extra_args --silent"
16877fi
c906108c 16878
bec39cab 16879_ACEOF
81ecdfbb 16880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16881if \$ac_cs_recheck; then
81ecdfbb
RW
16882 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16883 shift
16884 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16885 CONFIG_SHELL='$SHELL'
16886 export CONFIG_SHELL
16887 exec "\$@"
bec39cab
AC
16888fi
16889
16890_ACEOF
81ecdfbb
RW
16891cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16892exec 5>>config.log
16893{
16894 echo
16895 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16896## Running $as_me. ##
16897_ASBOX
16898 $as_echo "$ac_log"
16899} >&5
bec39cab 16900
81ecdfbb
RW
16901_ACEOF
16902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16903#
81ecdfbb 16904# INIT-COMMANDS
c906108c 16905#
a417dc56 16906ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16907AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16908
bec39cab
AC
16909_ACEOF
16910
81ecdfbb 16911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16912
81ecdfbb 16913# Handling of arguments.
bec39cab 16914for ac_config_target in $ac_config_targets
c906108c 16915do
81ecdfbb
RW
16916 case $ac_config_target in
16917 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16918 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16919 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 16920 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
16921 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16922 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16923 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16924 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16925 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16926 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16927 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16928
16929 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16930 esac
16931done
16932
81ecdfbb 16933
bec39cab
AC
16934# If the user did not use the arguments to specify the items to instantiate,
16935# then the envvar interface is used. Set only those that are not.
16936# We use the long form for the default assignment because of an extremely
16937# bizarre bug on SunOS 4.1.3.
16938if $ac_need_defaults; then
16939 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16940 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16941 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16942 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16943fi
16944
b4e70030 16945# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16946# simply because there is no reason against having it here, and in addition,
b4e70030 16947# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16948# Hook for its removal unless debugging.
16949# Note that there is a small window in which the directory will not be cleaned:
16950# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16951$debug ||
16952{
81ecdfbb
RW
16953 tmp=
16954 trap 'exit_status=$?
16955 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16956' 0
16957 trap 'as_fn_exit 1' 1 2 13 15
16958}
16959# Create a (secure) tmp directory for tmp files.
16960
16961{
16962 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16963 test -n "$tmp" && test -d "$tmp"
16964} ||
16965{
16966 tmp=./conf$$-$RANDOM
16967 (umask 077 && mkdir "$tmp")
16968} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16969
16970# Set up the scripts for CONFIG_FILES section.
16971# No need to generate them if there are no CONFIG_FILES.
16972# This happens for instance with `./config.status config.h'.
16973if test -n "$CONFIG_FILES"; then
16974
16975if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16976 ac_cs_awk_getline=:
16977 ac_cs_awk_pipe_init=
16978 ac_cs_awk_read_file='
16979 while ((getline aline < (F[key])) > 0)
16980 print(aline)
16981 close(F[key])'
16982 ac_cs_awk_pipe_fini=
16983else
16984 ac_cs_awk_getline=false
16985 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16986 ac_cs_awk_read_file='
16987 print "|#_!!_#|"
16988 print "cat " F[key] " &&"
16989 '$ac_cs_awk_pipe_init
16990 # The final `:' finishes the AND list.
16991 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16992fi
16993ac_cr=`echo X | tr X '\015'`
16994# On cygwin, bash can eat \r inside `` if the user requested igncr.
16995# But we know of no other shell where ac_cr would be empty at this
16996# point, so we can use a bashism as a fallback.
16997if test "x$ac_cr" = x; then
16998 eval ac_cr=\$\'\\r\'
16999fi
17000ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17001if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17002 ac_cs_awk_cr='\r'
17003else
17004 ac_cs_awk_cr=$ac_cr
17005fi
17006
17007echo 'BEGIN {' >"$tmp/subs1.awk" &&
17008_ACEOF
17009
17010# Create commands to substitute file output variables.
17011{
17012 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17013 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17014 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17015 echo "_ACAWK" &&
17016 echo "_ACEOF"
17017} >conf$$files.sh &&
17018. ./conf$$files.sh ||
17019 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17020rm -f conf$$files.sh
17021
17022{
17023 echo "cat >conf$$subs.awk <<_ACEOF" &&
17024 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17025 echo "_ACEOF"
17026} >conf$$subs.sh ||
17027 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17028ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17029ac_delim='%!_!# '
17030for ac_last_try in false false false false false :; do
17031 . ./conf$$subs.sh ||
17032 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17033
17034 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17035 if test $ac_delim_n = $ac_delim_num; then
17036 break
17037 elif $ac_last_try; then
17038 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17039 else
17040 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17041 fi
17042done
17043rm -f conf$$subs.sh
17044
17045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17046cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17047_ACEOF
17048sed -n '
17049h
17050s/^/S["/; s/!.*/"]=/
17051p
17052g
17053s/^[^!]*!//
17054:repl
17055t repl
17056s/'"$ac_delim"'$//
17057t delim
17058:nl
17059h
17060s/\(.\{148\}\).*/\1/
17061t more1
17062s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17063p
17064n
17065b repl
17066:more1
17067s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17068p
17069g
17070s/.\{148\}//
17071t nl
17072:delim
17073h
17074s/\(.\{148\}\).*/\1/
17075t more2
17076s/["\\]/\\&/g; s/^/"/; s/$/"/
17077p
17078b
17079:more2
17080s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17081p
17082g
17083s/.\{148\}//
17084t delim
17085' <conf$$subs.awk | sed '
17086/^[^""]/{
17087 N
17088 s/\n//
17089}
17090' >>$CONFIG_STATUS || ac_write_fail=1
17091rm -f conf$$subs.awk
17092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17093_ACAWK
17094cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17095 for (key in S) S_is_set[key] = 1
17096 FS = "\a"
17097 \$ac_cs_awk_pipe_init
17098}
17099{
17100 line = $ 0
17101 nfields = split(line, field, "@")
17102 substed = 0
17103 len = length(field[1])
17104 for (i = 2; i < nfields; i++) {
17105 key = field[i]
17106 keylen = length(key)
17107 if (S_is_set[key]) {
17108 value = S[key]
17109 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17110 len += length(value) + length(field[++i])
17111 substed = 1
17112 } else
17113 len += 1 + keylen
17114 }
17115 if (nfields == 3 && !substed) {
17116 key = field[2]
17117 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17118 \$ac_cs_awk_read_file
17119 next
17120 }
17121 }
17122 print line
b4e70030 17123}
81ecdfbb
RW
17124\$ac_cs_awk_pipe_fini
17125_ACAWK
17126_ACEOF
17127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17128if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17129 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17130else
17131 cat
17132fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17133 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17134_ACEOF
17135
17136# VPATH may cause trouble with some makes, so we remove $(srcdir),
17137# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17138# trailing colons and then remove the whole line if VPATH becomes empty
17139# (actually we leave an empty line to preserve line numbers).
17140if test "x$srcdir" = x.; then
17141 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17142s/:*\$(srcdir):*/:/
17143s/:*\${srcdir}:*/:/
17144s/:*@srcdir@:*/:/
17145s/^\([^=]*=[ ]*\):*/\1/
17146s/:*$//
17147s/^[^=]*=[ ]*$//
17148}'
17149fi
17150
17151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17152fi # test -n "$CONFIG_FILES"
17153
17154# Set up the scripts for CONFIG_HEADERS section.
17155# No need to generate them if there are no CONFIG_HEADERS.
17156# This happens for instance with `./config.status Makefile'.
17157if test -n "$CONFIG_HEADERS"; then
17158cat >"$tmp/defines.awk" <<\_ACAWK ||
17159BEGIN {
17160_ACEOF
17161
17162# Transform confdefs.h into an awk script `defines.awk', embedded as
17163# here-document in config.status, that substitutes the proper values into
17164# config.h.in to produce config.h.
4e8d927d 17165
81ecdfbb
RW
17166# Create a delimiter string that does not exist in confdefs.h, to ease
17167# handling of long lines.
17168ac_delim='%!_!# '
17169for ac_last_try in false false :; do
17170 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17171 if test -z "$ac_t"; then
17172 break
17173 elif $ac_last_try; then
17174 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17175 else
17176 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17177 fi
17178done
4e8d927d 17179
81ecdfbb
RW
17180# For the awk script, D is an array of macro values keyed by name,
17181# likewise P contains macro parameters if any. Preserve backslash
17182# newline sequences.
17183
17184ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17185sed -n '
17186s/.\{148\}/&'"$ac_delim"'/g
17187t rset
17188:rset
17189s/^[ ]*#[ ]*define[ ][ ]*/ /
17190t def
17191d
17192:def
17193s/\\$//
17194t bsnl
17195s/["\\]/\\&/g
17196s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17197D["\1"]=" \3"/p
17198s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17199d
17200:bsnl
17201s/["\\]/\\&/g
17202s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17203D["\1"]=" \3\\\\\\n"\\/p
17204t cont
17205s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17206t cont
17207d
17208:cont
17209n
17210s/.\{148\}/&'"$ac_delim"'/g
17211t clear
17212:clear
17213s/\\$//
17214t bsnlc
17215s/["\\]/\\&/g; s/^/"/; s/$/"/p
17216d
17217:bsnlc
17218s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17219b cont
17220' <confdefs.h | sed '
17221s/'"$ac_delim"'/"\\\
17222"/g' >>$CONFIG_STATUS || ac_write_fail=1
17223
17224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17225 for (key in D) D_is_set[key] = 1
17226 FS = "\a"
17227}
17228/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17229 line = \$ 0
17230 split(line, arg, " ")
17231 if (arg[1] == "#") {
17232 defundef = arg[2]
17233 mac1 = arg[3]
17234 } else {
17235 defundef = substr(arg[1], 2)
17236 mac1 = arg[2]
17237 }
17238 split(mac1, mac2, "(") #)
17239 macro = mac2[1]
17240 prefix = substr(line, 1, index(line, defundef) - 1)
17241 if (D_is_set[macro]) {
17242 # Preserve the white space surrounding the "#".
17243 print prefix "define", macro P[macro] D[macro]
17244 next
17245 } else {
17246 # Replace #undef with comments. This is necessary, for example,
17247 # in the case of _POSIX_SOURCE, which is predefined and required
17248 # on some systems where configure will not decide to define it.
17249 if (defundef == "undef") {
17250 print "/*", prefix defundef, macro, "*/"
17251 next
17252 }
17253 }
b4e70030 17254}
81ecdfbb
RW
17255{ print }
17256_ACAWK
b4e70030 17257_ACEOF
81ecdfbb
RW
17258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17259 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17260fi # test -n "$CONFIG_HEADERS"
4e8d927d 17261
4e8d927d 17262
81ecdfbb
RW
17263eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17264shift
17265for ac_tag
17266do
17267 case $ac_tag in
17268 :[FHLC]) ac_mode=$ac_tag; continue;;
17269 esac
17270 case $ac_mode$ac_tag in
17271 :[FHL]*:*);;
17272 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17273 :[FH]-) ac_tag=-:-;;
17274 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17275 esac
17276 ac_save_IFS=$IFS
17277 IFS=:
17278 set x $ac_tag
17279 IFS=$ac_save_IFS
17280 shift
17281 ac_file=$1
17282 shift
4e8d927d 17283
81ecdfbb
RW
17284 case $ac_mode in
17285 :L) ac_source=$1;;
17286 :[FH])
17287 ac_file_inputs=
17288 for ac_f
17289 do
17290 case $ac_f in
17291 -) ac_f="$tmp/stdin";;
17292 *) # Look for the file first in the build tree, then in the source tree
17293 # (if the path is not absolute). The absolute path cannot be DOS-style,
17294 # because $ac_f cannot contain `:'.
17295 test -f "$ac_f" ||
17296 case $ac_f in
17297 [\\/$]*) false;;
17298 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17299 esac ||
17300 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17301 esac
17302 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17303 as_fn_append ac_file_inputs " '$ac_f'"
17304 done
17305
17306 # Let's still pretend it is `configure' which instantiates (i.e., don't
17307 # use $as_me), people would be surprised to read:
17308 # /* config.h. Generated by config.status. */
17309 configure_input='Generated from '`
17310 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17311 `' by configure.'
17312 if test x"$ac_file" != x-; then
17313 configure_input="$ac_file. $configure_input"
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17315$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17316 fi
81ecdfbb
RW
17317 # Neutralize special characters interpreted by sed in replacement strings.
17318 case $configure_input in #(
17319 *\&* | *\|* | *\\* )
17320 ac_sed_conf_input=`$as_echo "$configure_input" |
17321 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17322 *) ac_sed_conf_input=$configure_input;;
17323 esac
4e8d927d 17324
81ecdfbb
RW
17325 case $ac_tag in
17326 *:-:* | *:-) cat >"$tmp/stdin" \
17327 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17328 esac
17329 ;;
c906108c
SS
17330 esac
17331
81ecdfbb 17332 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17333$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17334 X"$ac_file" : 'X\(//\)[^/]' \| \
17335 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17336 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17337$as_echo X"$ac_file" |
17338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17339 s//\1/
17340 q
17341 }
17342 /^X\(\/\/\)[^/].*/{
17343 s//\1/
17344 q
17345 }
17346 /^X\(\/\/\)$/{
17347 s//\1/
17348 q
17349 }
17350 /^X\(\/\).*/{
17351 s//\1/
17352 q
17353 }
17354 s/.*/./; q'`
17355 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17356 ac_builddir=.
17357
81ecdfbb
RW
17358case "$ac_dir" in
17359.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17360*)
17361 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17362 # A ".." for each directory in $ac_dir_suffix.
17363 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17364 case $ac_top_builddir_sub in
17365 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17366 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17367 esac ;;
17368esac
17369ac_abs_top_builddir=$ac_pwd
17370ac_abs_builddir=$ac_pwd$ac_dir_suffix
17371# for backward compatibility:
17372ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17373
17374case $srcdir in
81ecdfbb 17375 .) # We are building in place.
bec39cab 17376 ac_srcdir=.
81ecdfbb
RW
17377 ac_top_srcdir=$ac_top_builddir_sub
17378 ac_abs_top_srcdir=$ac_pwd ;;
17379 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17380 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17381 ac_top_srcdir=$srcdir
17382 ac_abs_top_srcdir=$srcdir ;;
17383 *) # Relative name.
17384 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17385 ac_top_srcdir=$ac_top_build_prefix$srcdir
17386 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17387esac
81ecdfbb 17388ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17389
c906108c 17390
81ecdfbb
RW
17391 case $ac_mode in
17392 :F)
17393 #
17394 # CONFIG_FILE
17395 #
c906108c 17396
bec39cab
AC
17397 case $INSTALL in
17398 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17399 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17400 esac
81ecdfbb
RW
17401 ac_MKDIR_P=$MKDIR_P
17402 case $MKDIR_P in
17403 [\\/$]* | ?:[\\/]* ) ;;
17404 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17405 esac
17406_ACEOF
121ce6e5 17407
81ecdfbb
RW
17408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17409# If the template does not know about datarootdir, expand it.
17410# FIXME: This hack should be removed a few years after 2.60.
17411ac_datarootdir_hack=; ac_datarootdir_seen=
17412ac_sed_dataroot='
17413/datarootdir/ {
17414 p
17415 q
17416}
17417/@datadir@/p
17418/@docdir@/p
17419/@infodir@/p
17420/@localedir@/p
17421/@mandir@/p'
17422case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17423*datarootdir*) ac_datarootdir_seen=yes;;
17424*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17426$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17427_ACEOF
17428cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17429 ac_datarootdir_hack='
17430 s&@datadir@&$datadir&g
17431 s&@docdir@&$docdir&g
17432 s&@infodir@&$infodir&g
17433 s&@localedir@&$localedir&g
17434 s&@mandir@&$mandir&g
17435 s&\\\${datarootdir}&$datarootdir&g' ;;
17436esac
4e8d927d 17437_ACEOF
81ecdfbb
RW
17438
17439# Neutralize VPATH when `$srcdir' = `.'.
17440# Shell code in configure.ac might set extrasub.
17441# FIXME: do we really want to maintain this feature?
17442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17443ac_sed_extra="$ac_vpsub
bec39cab
AC
17444$extrasub
17445_ACEOF
81ecdfbb 17446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17447:t
17448/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17449s|@configure_input@|$ac_sed_conf_input|;t t
17450s&@top_builddir@&$ac_top_builddir_sub&;t t
17451s&@top_build_prefix@&$ac_top_build_prefix&;t t
17452s&@srcdir@&$ac_srcdir&;t t
17453s&@abs_srcdir@&$ac_abs_srcdir&;t t
17454s&@top_srcdir@&$ac_top_srcdir&;t t
17455s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17456s&@builddir@&$ac_builddir&;t t
17457s&@abs_builddir@&$ac_abs_builddir&;t t
17458s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17459s&@INSTALL@&$ac_INSTALL&;t t
17460s&@MKDIR_P@&$ac_MKDIR_P&;t t
17461$ac_datarootdir_hack
17462"
17463eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17464if $ac_cs_awk_getline; then
17465 $AWK -f "$tmp/subs.awk"
17466else
17467 $AWK -f "$tmp/subs.awk" | $SHELL
17468fi >$tmp/out \
17469 || as_fn_error "could not create $ac_file" "$LINENO" 5
17470
17471test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17472 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17473 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17475which seems to be undefined. Please make sure it is defined." >&5
17476$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17477which seems to be undefined. Please make sure it is defined." >&2;}
17478
17479 rm -f "$tmp/stdin"
bec39cab 17480 case $ac_file in
81ecdfbb
RW
17481 -) cat "$tmp/out" && rm -f "$tmp/out";;
17482 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17483 esac \
17484 || as_fn_error "could not create $ac_file" "$LINENO" 5
17485 ;;
17486 :H)
17487 #
17488 # CONFIG_HEADER
17489 #
bec39cab 17490 if test x"$ac_file" != x-; then
81ecdfbb
RW
17491 {
17492 $as_echo "/* $configure_input */" \
17493 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17494 } >"$tmp/config.h" \
17495 || as_fn_error "could not create $ac_file" "$LINENO" 5
17496 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17498$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17499 else
81ecdfbb
RW
17500 rm -f "$ac_file"
17501 mv "$tmp/config.h" "$ac_file" \
17502 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17503 fi
17504 else
81ecdfbb
RW
17505 $as_echo "/* $configure_input */" \
17506 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17507 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17508 fi
81ecdfbb
RW
17509# Compute "$ac_file"'s index in $config_headers.
17510_am_arg="$ac_file"
e28b3332
DJ
17511_am_stamp_count=1
17512for _am_header in $config_headers :; do
17513 case $_am_header in
81ecdfbb 17514 $_am_arg | $_am_arg:* )
e28b3332
DJ
17515 break ;;
17516 * )
17517 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17518 esac
17519done
81ecdfbb
RW
17520echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17521$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17522 X"$_am_arg" : 'X\(//\)[^/]' \| \
17523 X"$_am_arg" : 'X\(//\)$' \| \
17524 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17525$as_echo X"$_am_arg" |
17526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17527 s//\1/
17528 q
17529 }
17530 /^X\(\/\/\)[^/].*/{
17531 s//\1/
17532 q
17533 }
17534 /^X\(\/\/\)$/{
17535 s//\1/
17536 q
17537 }
17538 /^X\(\/\).*/{
17539 s//\1/
17540 q
17541 }
17542 s/.*/./; q'`/stamp-h$_am_stamp_count
17543 ;;
17544 :L)
17545 #
17546 # CONFIG_LINK
17547 #
c906108c 17548
81ecdfbb
RW
17549 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17550 :
b4e70030 17551 else
81ecdfbb
RW
17552 # Prefer the file from the source tree if names are identical.
17553 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17554 ac_source=$srcdir/$ac_source
17555 fi
b4e70030 17556
81ecdfbb
RW
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17558$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17559
81ecdfbb
RW
17560 if test ! -r "$ac_source"; then
17561 as_fn_error "$ac_source: file not found" "$LINENO" 5
17562 fi
17563 rm -f "$ac_file"
bec39cab 17564
81ecdfbb
RW
17565 # Try a relative symlink, then a hard link, then a copy.
17566 case $srcdir in
17567 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17568 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17569 esac
17570 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17571 ln "$ac_source" "$ac_file" 2>/dev/null ||
17572 cp -p "$ac_source" "$ac_file" ||
17573 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17574 fi
17575 ;;
17576 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17577$as_echo "$as_me: executing $ac_file commands" >&6;}
17578 ;;
c906108c 17579 esac
b4e70030 17580
bec39cab 17581
81ecdfbb
RW
17582 case $ac_file$ac_mode in
17583 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17584 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17585 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17586 # are listed without --file. Let's play safe and only enable the eval
17587 # if we detect the quoting.
17588 case $CONFIG_FILES in
17589 *\'*) eval set x "$CONFIG_FILES" ;;
17590 *) set x $CONFIG_FILES ;;
17591 esac
17592 shift
17593 for mf
17594 do
17595 # Strip MF so we end up with the name of the file.
17596 mf=`echo "$mf" | sed -e 's/:.*$//'`
17597 # Check whether this is an Automake generated Makefile or not.
17598 # We used to match only the files named `Makefile.in', but
17599 # some people rename them; so instead we look at the file content.
17600 # Grep'ing the first line is not enough: some people post-process
17601 # each Makefile.in and add a new line on top of each file to say so.
17602 # Grep'ing the whole file is not good either: AIX grep has a line
17603 # limit of 2048, but all sed's we know have understand at least 4000.
17604 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17605 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17606$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17607 X"$mf" : 'X\(//\)[^/]' \| \
17608 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17609 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17610$as_echo X"$mf" |
17611 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17612 s//\1/
17613 q
17614 }
17615 /^X\(\/\/\)[^/].*/{
17616 s//\1/
17617 q
17618 }
17619 /^X\(\/\/\)$/{
17620 s//\1/
17621 q
17622 }
17623 /^X\(\/\).*/{
17624 s//\1/
17625 q
17626 }
17627 s/.*/./; q'`
17628 else
17629 continue
17630 fi
17631 # Extract the definition of DEPDIR, am__include, and am__quote
17632 # from the Makefile without running `make'.
17633 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17634 test -z "$DEPDIR" && continue
17635 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17636 test -z "am__include" && continue
17637 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17638 # When using ansi2knr, U may be empty or an underscore; expand it
17639 U=`sed -n 's/^U = //p' < "$mf"`
17640 # Find all dependency output files, they are included files with
17641 # $(DEPDIR) in their names. We invoke sed twice because it is the
17642 # simplest approach to changing $(DEPDIR) to its actual value in the
17643 # expansion.
17644 for file in `sed -n "
17645 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17646 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17647 # Make sure the directory exists.
17648 test -f "$dirpart/$file" && continue
17649 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17650$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17651 X"$file" : 'X\(//\)[^/]' \| \
17652 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17653 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17654$as_echo X"$file" |
17655 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17656 s//\1/
17657 q
17658 }
17659 /^X\(\/\/\)[^/].*/{
17660 s//\1/
17661 q
17662 }
17663 /^X\(\/\/\)$/{
17664 s//\1/
17665 q
17666 }
17667 /^X\(\/\).*/{
17668 s//\1/
17669 q
17670 }
17671 s/.*/./; q'`
17672 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17673 # echo "creating $dirpart/$file"
17674 echo '# dummy' > "$dirpart/$file"
e28b3332 17675 done
e28b3332 17676 done
81ecdfbb 17677}
4e8d927d 17678 ;;
81ecdfbb 17679 "default":C)
c906108c
SS
17680case x$CONFIG_HEADERS in
17681xconfig.h:config.in)
17682echo > stamp-h ;;
17683esac
bec39cab 17684 ;;
81ecdfbb 17685
bec39cab 17686 esac
81ecdfbb 17687done # for ac_tag
c906108c 17688
bec39cab 17689
81ecdfbb 17690as_fn_exit 0
bec39cab 17691_ACEOF
bec39cab
AC
17692ac_clean_files=$ac_clean_files_save
17693
81ecdfbb
RW
17694test $ac_write_fail = 0 ||
17695 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17696
bec39cab
AC
17697
17698# configure is writing to config.log, and then calls config.status.
17699# config.status does its own redirection, appending to config.log.
17700# Unfortunately, on DOS this fails, as config.log is still kept open
17701# by configure, so config.status won't be able to write to it; its
17702# output is simply discarded. So we exec the FD to /dev/null,
17703# effectively closing config.log, so it can be properly (re)opened and
17704# appended to by config.status. When coming back to configure, we
17705# need to make the FD available again.
17706if test "$no_create" != yes; then
17707 ac_cs_success=:
17708 ac_config_status_args=
17709 test "$silent" = yes &&
17710 ac_config_status_args="$ac_config_status_args --quiet"
17711 exec 5>/dev/null
17712 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17713 exec 5>>config.log
17714 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17715 # would make configure fail if this is the last instruction.
81ecdfbb 17716 $ac_cs_success || as_fn_exit $?
bec39cab 17717fi
c906108c 17718
bec39cab 17719#
81ecdfbb 17720# CONFIG_SUBDIRS section.
bec39cab 17721#
c906108c
SS
17722if test "$no_recursion" != yes; then
17723
81ecdfbb
RW
17724 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17725 # so they do not pile up.
c906108c
SS
17726 ac_sub_configure_args=
17727 ac_prev=
fdc59709
PB
17728 eval "set x $ac_configure_args"
17729 shift
17730 for ac_arg
17731 do
c906108c
SS
17732 if test -n "$ac_prev"; then
17733 ac_prev=
17734 continue
17735 fi
bec39cab 17736 case $ac_arg in
c906108c
SS
17737 -cache-file | --cache-file | --cache-fil | --cache-fi \
17738 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17739 ac_prev=cache_file ;;
17740 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17741 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17742 | --c=*)
17743 ;;
17744 --config-cache | -C)
c906108c
SS
17745 ;;
17746 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17747 ac_prev=srcdir ;;
17748 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17749 ;;
bec39cab
AC
17750 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17751 ac_prev=prefix ;;
17752 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17753 ;;
81ecdfbb
RW
17754 --disable-option-checking)
17755 ;;
fdc59709
PB
17756 *)
17757 case $ac_arg in
81ecdfbb 17758 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17759 esac
81ecdfbb 17760 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17761 esac
17762 done
17763
bec39cab
AC
17764 # Always prepend --prefix to ensure using the same prefix
17765 # in subdir configurations.
fdc59709
PB
17766 ac_arg="--prefix=$prefix"
17767 case $ac_arg in
81ecdfbb 17768 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17769 esac
81ecdfbb
RW
17770 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17771
17772 # Pass --silent
17773 if test "$silent" = yes; then
17774 ac_sub_configure_args="--silent $ac_sub_configure_args"
17775 fi
17776
17777 # Always prepend --disable-option-checking to silence warnings, since
17778 # different subdirs can have different --enable and --with options.
17779 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17780
b4e70030 17781 ac_popdir=`pwd`
bec39cab 17782 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17783
17784 # Do not complain, so a configure script can configure whichever
17785 # parts of a large source tree are present.
fdc59709 17786 test -d "$srcdir/$ac_dir" || continue
c906108c 17787
81ecdfbb
RW
17788 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17789 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17790 $as_echo "$ac_msg" >&6
17791 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17792 ac_builddir=.
17793
81ecdfbb
RW
17794case "$ac_dir" in
17795.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17796*)
17797 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17798 # A ".." for each directory in $ac_dir_suffix.
17799 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17800 case $ac_top_builddir_sub in
17801 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17802 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17803 esac ;;
17804esac
17805ac_abs_top_builddir=$ac_pwd
17806ac_abs_builddir=$ac_pwd$ac_dir_suffix
17807# for backward compatibility:
17808ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17809
17810case $srcdir in
81ecdfbb 17811 .) # We are building in place.
bec39cab 17812 ac_srcdir=.
81ecdfbb
RW
17813 ac_top_srcdir=$ac_top_builddir_sub
17814 ac_abs_top_srcdir=$ac_pwd ;;
17815 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17816 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17817 ac_top_srcdir=$srcdir
17818 ac_abs_top_srcdir=$srcdir ;;
17819 *) # Relative name.
17820 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17821 ac_top_srcdir=$ac_top_build_prefix$srcdir
17822 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17823esac
81ecdfbb 17824ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17825
c906108c 17826
fdc59709 17827 cd "$ac_dir"
c906108c
SS
17828
17829 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17830 if test -f "$ac_srcdir/configure.gnu"; then
17831 ac_sub_configure=$ac_srcdir/configure.gnu
17832 elif test -f "$ac_srcdir/configure"; then
17833 ac_sub_configure=$ac_srcdir/configure
17834 elif test -f "$ac_srcdir/configure.in"; then
17835 # This should be Cygnus configure.
17836 ac_sub_configure=$ac_aux_dir/configure
c906108c 17837 else
81ecdfbb
RW
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17839$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17840 ac_sub_configure=
17841 fi
17842
17843 # The recursion is here.
17844 if test -n "$ac_sub_configure"; then
c906108c 17845 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17846 case $cache_file in
17847 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17848 *) # Relative name.
17849 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17850 esac
c906108c 17851
81ecdfbb
RW
17852 { $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
17853$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17854 # The eval makes quoting arguments work.
fdc59709
PB
17855 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17856 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17857 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17858 fi
17859
fdc59709 17860 cd "$ac_popdir"
c906108c
SS
17861 done
17862fi
81ecdfbb
RW
17863if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17865$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17866fi
c906108c
SS
17867
17868
17869exit 0
This page took 2.237748 seconds and 4 git commands to generate.