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
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
ac534cba
JB
661PYTHON_LIBS
662PYTHON_CPPFLAGS
81ecdfbb 663PYTHON_CFLAGS
ec685c5e 664python_prog_path
81ecdfbb
RW
665LTLIBEXPAT
666LIBEXPAT
667HAVE_LIBEXPAT
b8e0a31c 668JIT_READER_DIR
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 761NEXT_STRING_H
f434ba03
PA
762NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
763NEXT_STDDEF_H
f434ba03
PA
764STDDEF_H
765HAVE_WCHAR_T
766REPLACE_NULL
f434ba03
PA
767UNDEFINE_STRTOK_R
768REPLACE_STRTOK_R
81ecdfbb 769REPLACE_STRSIGNAL
f434ba03
PA
770REPLACE_STRNLEN
771REPLACE_STRNDUP
772REPLACE_STRNCAT
81ecdfbb 773REPLACE_STRERROR
f434ba03
PA
774REPLACE_STRCASESTR
775REPLACE_STRSTR
776REPLACE_STRDUP
777REPLACE_STPNCPY
778REPLACE_MEMMEM
779REPLACE_MEMCHR
780HAVE_STRVERSCMP
81ecdfbb 781HAVE_DECL_STRSIGNAL
81ecdfbb
RW
782HAVE_DECL_STRTOK_R
783HAVE_STRCASESTR
784HAVE_STRSEP
785HAVE_STRPBRK
786HAVE_DECL_STRNLEN
787HAVE_DECL_STRNDUP
81ecdfbb
RW
788HAVE_DECL_STRDUP
789HAVE_STRCHRNUL
790HAVE_STPNCPY
791HAVE_STPCPY
f434ba03 792HAVE_RAWMEMCHR
81ecdfbb
RW
793HAVE_DECL_MEMRCHR
794HAVE_MEMPCPY
795HAVE_DECL_MEMMEM
f434ba03
PA
796HAVE_MEMCHR
797HAVE_MBSLEN
798GNULIB_STRVERSCMP
81ecdfbb
RW
799GNULIB_STRSIGNAL
800GNULIB_STRERROR
801GNULIB_MBSTOK_R
802GNULIB_MBSSEP
803GNULIB_MBSSPN
804GNULIB_MBSPBRK
805GNULIB_MBSCSPN
806GNULIB_MBSCASESTR
807GNULIB_MBSPCASECMP
808GNULIB_MBSNCASECMP
809GNULIB_MBSCASECMP
810GNULIB_MBSSTR
811GNULIB_MBSRCHR
812GNULIB_MBSCHR
813GNULIB_MBSNLEN
814GNULIB_MBSLEN
815GNULIB_STRTOK_R
816GNULIB_STRCASESTR
817GNULIB_STRSTR
818GNULIB_STRSEP
819GNULIB_STRPBRK
820GNULIB_STRNLEN
821GNULIB_STRNDUP
f434ba03 822GNULIB_STRNCAT
81ecdfbb
RW
823GNULIB_STRDUP
824GNULIB_STRCHRNUL
825GNULIB_STPNCPY
826GNULIB_STPCPY
f434ba03 827GNULIB_RAWMEMCHR
81ecdfbb
RW
828GNULIB_MEMRCHR
829GNULIB_MEMPCPY
830GNULIB_MEMMEM
f434ba03 831GNULIB_MEMCHR
55a8c076
YQ
832UINT64_MAX_EQ_ULONG_MAX
833UINT32_MAX_LT_UINTMAX_MAX
834INT64_MAX_EQ_LONG_MAX
835INT32_MAX_LT_INTMAX_MAX
836PRIPTR_PREFIX
837NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
838NEXT_INTTYPES_H
839HAVE_DECL_STRTOUMAX
840HAVE_DECL_STRTOIMAX
841HAVE_DECL_IMAXDIV
842HAVE_DECL_IMAXABS
843GNULIB_STRTOUMAX
844GNULIB_STRTOIMAX
845GNULIB_IMAXDIV
846GNULIB_IMAXABS
847PRI_MACROS_BROKEN
848STDINT_H
849WINT_T_SUFFIX
850WCHAR_T_SUFFIX
851SIG_ATOMIC_T_SUFFIX
852SIZE_T_SUFFIX
853PTRDIFF_T_SUFFIX
854HAVE_SIGNED_WINT_T
855HAVE_SIGNED_WCHAR_T
856HAVE_SIGNED_SIG_ATOMIC_T
857BITSIZEOF_WINT_T
858BITSIZEOF_WCHAR_T
859BITSIZEOF_SIG_ATOMIC_T
860BITSIZEOF_SIZE_T
861BITSIZEOF_PTRDIFF_T
862APPLE_UNIVERSAL_BUILD
863HAVE_SYS_BITYPES_H
864HAVE_SYS_INTTYPES_H
865HAVE_STDINT_H
866NEXT_AS_FIRST_DIRECTIVE_STDINT_H
867NEXT_STDINT_H
868PRAGMA_SYSTEM_HEADER
869INCLUDE_NEXT_AS_FIRST_DIRECTIVE
870INCLUDE_NEXT
871HAVE_SYS_TYPES_H
872HAVE_INTTYPES_H
873HAVE_UNSIGNED_LONG_LONG_INT
874HAVE_LONG_LONG_INT
81ecdfbb
RW
875GL_COND_LIBTOOL_FALSE
876GL_COND_LIBTOOL_TRUE
877CATOBJEXT
878GENCAT
879INSTOBJEXT
880DATADIRNAME
881CATALOGS
882POSUB
883GMSGFMT
884XGETTEXT
885INCINTL
886LIBINTL_DEP
887LIBINTL
888USE_NLS
889SET_MAKE
890GMAKE_FALSE
891GMAKE_TRUE
892MAKE
893CCDEPMODE
894DEPDIR
895am__leading_dot
896target_os
897target_vendor
898target_cpu
899target
f434ba03
PA
900RANLIB
901EGREP
902GREP
903CPP
81ecdfbb
RW
904host_os
905host_vendor
906host_cpu
907host
908build_os
909build_vendor
910build_cpu
911build
81ecdfbb
RW
912OBJEXT
913EXEEXT
914ac_ct_CC
915CPPFLAGS
916LDFLAGS
917CFLAGS
918CC
919MAINT
920MAINTAINER_MODE_FALSE
921MAINTAINER_MODE_TRUE
922target_alias
923host_alias
924build_alias
925LIBS
926ECHO_T
927ECHO_N
928ECHO_C
929DEFS
930mandir
931localedir
932libdir
933psdir
934pdfdir
935dvidir
936htmldir
937infodir
938docdir
939oldincludedir
940includedir
941localstatedir
942sharedstatedir
943sysconfdir
944datadir
945datarootdir
946libexecdir
947sbindir
948bindir
949program_transform_name
950prefix
951exec_prefix
952PACKAGE_URL
953PACKAGE_BUGREPORT
954PACKAGE_STRING
955PACKAGE_VERSION
956PACKAGE_TARNAME
957PACKAGE_NAME
958PATH_SEPARATOR
959SHELL'
a4ce5b0d 960ac_subst_files='host_makefile_frag'
81ecdfbb
RW
961ac_user_opts='
962enable_option_checking
963enable_maintainer_mode
da2f07f1
JK
964enable_plugins
965enable_largefile
81ecdfbb
RW
966enable_dependency_tracking
967with_separate_debug_dir
968with_gdb_datadir
969with_relocated_sources
970enable_targets
971enable_64_bit_bfd
972enable_gdbcli
973enable_gdbmi
974enable_tui
975enable_gdbtk
05e7c244 976with_libunwind_ia64
81ecdfbb
RW
977with_curses
978enable_profiling
979with_pkgversion
980with_bugurl
b040ad30 981with_zlib
81ecdfbb 982with_libiconv_prefix
478aac75 983with_iconv_bin
81ecdfbb 984with_system_readline
b8e0a31c 985with_jit_reader_dir
81ecdfbb
RW
986with_expat
987with_gnu_ld
988enable_rpath
989with_libexpat_prefix
990with_python
991with_included_regex
992with_sysroot
993with_system_gdbinit
994enable_werror
995enable_build_warnings
996enable_gdb_build_warnings
997with_tcl
998with_tk
999with_x
1000enable_sim
1001enable_multi_ice
496c0e1b 1002enable_gdbserver
81ecdfbb
RW
1003'
1004 ac_precious_vars='build_alias
1005host_alias
1006target_alias
1007CC
1008CFLAGS
1009LDFLAGS
1010LIBS
1011CPPFLAGS
1012CPP
f06e05e0
JK
1013MAKEINFO
1014MAKEINFOFLAGS
81ecdfbb
RW
1015YACC
1016YFLAGS
1017XMKMF'
5ae98d25 1018ac_subdirs_all='testsuite
81ecdfbb
RW
1019gdbtk
1020multi-ice
1021gdbserver'
c906108c
SS
1022
1023# Initialize some variables set by options.
bec39cab
AC
1024ac_init_help=
1025ac_init_version=false
81ecdfbb
RW
1026ac_unrecognized_opts=
1027ac_unrecognized_sep=
c906108c
SS
1028# The variables have the same names as the options, with
1029# dashes changed to underlines.
bec39cab 1030cache_file=/dev/null
c906108c 1031exec_prefix=NONE
c906108c 1032no_create=
c906108c
SS
1033no_recursion=
1034prefix=NONE
1035program_prefix=NONE
1036program_suffix=NONE
1037program_transform_name=s,x,x,
1038silent=
1039site=
1040srcdir=
c906108c
SS
1041verbose=
1042x_includes=NONE
1043x_libraries=NONE
bec39cab
AC
1044
1045# Installation directory options.
1046# These are left unexpanded so users can "make install exec_prefix=/foo"
1047# and all the variables that are supposed to be based on exec_prefix
1048# by default will actually change.
1049# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1050# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1051bindir='${exec_prefix}/bin'
1052sbindir='${exec_prefix}/sbin'
1053libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1054datarootdir='${prefix}/share'
1055datadir='${datarootdir}'
c906108c
SS
1056sysconfdir='${prefix}/etc'
1057sharedstatedir='${prefix}/com'
1058localstatedir='${prefix}/var'
c906108c
SS
1059includedir='${prefix}/include'
1060oldincludedir='/usr/include'
81ecdfbb
RW
1061docdir='${datarootdir}/doc/${PACKAGE}'
1062infodir='${datarootdir}/info'
1063htmldir='${docdir}'
1064dvidir='${docdir}'
1065pdfdir='${docdir}'
1066psdir='${docdir}'
1067libdir='${exec_prefix}/lib'
1068localedir='${datarootdir}/locale'
1069mandir='${datarootdir}/man'
c906108c 1070
c906108c 1071ac_prev=
81ecdfbb 1072ac_dashdash=
c906108c
SS
1073for ac_option
1074do
c906108c
SS
1075 # If the previous option needs an argument, assign it.
1076 if test -n "$ac_prev"; then
81ecdfbb 1077 eval $ac_prev=\$ac_option
c906108c
SS
1078 ac_prev=
1079 continue
1080 fi
1081
81ecdfbb
RW
1082 case $ac_option in
1083 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1084 *) ac_optarg=yes ;;
1085 esac
c906108c
SS
1086
1087 # Accept the important Cygnus configure options, so we can diagnose typos.
1088
81ecdfbb
RW
1089 case $ac_dashdash$ac_option in
1090 --)
1091 ac_dashdash=yes ;;
c906108c
SS
1092
1093 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1094 ac_prev=bindir ;;
1095 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1096 bindir=$ac_optarg ;;
c906108c
SS
1097
1098 -build | --build | --buil | --bui | --bu)
bec39cab 1099 ac_prev=build_alias ;;
c906108c 1100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1101 build_alias=$ac_optarg ;;
c906108c
SS
1102
1103 -cache-file | --cache-file | --cache-fil | --cache-fi \
1104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1105 ac_prev=cache_file ;;
1106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1108 cache_file=$ac_optarg ;;
1109
1110 --config-cache | -C)
1111 cache_file=config.cache ;;
c906108c 1112
81ecdfbb 1113 -datadir | --datadir | --datadi | --datad)
c906108c 1114 ac_prev=datadir ;;
81ecdfbb 1115 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1116 datadir=$ac_optarg ;;
c906108c 1117
81ecdfbb
RW
1118 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1119 | --dataroo | --dataro | --datar)
1120 ac_prev=datarootdir ;;
1121 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1122 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1123 datarootdir=$ac_optarg ;;
1124
c906108c 1125 -disable-* | --disable-*)
81ecdfbb 1126 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1127 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1129 as_fn_error "invalid feature name: $ac_useropt"
1130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"enable_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval enable_$ac_useropt=no ;;
1140
1141 -docdir | --docdir | --docdi | --doc | --do)
1142 ac_prev=docdir ;;
1143 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1144 docdir=$ac_optarg ;;
1145
1146 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1147 ac_prev=dvidir ;;
1148 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1149 dvidir=$ac_optarg ;;
c906108c
SS
1150
1151 -enable-* | --enable-*)
81ecdfbb 1152 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1153 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1154 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1155 as_fn_error "invalid feature name: $ac_useropt"
1156 ac_useropt_orig=$ac_useropt
1157 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1158 case $ac_user_opts in
1159 *"
1160"enable_$ac_useropt"
1161"*) ;;
1162 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1163 ac_unrecognized_sep=', ';;
b4e70030 1164 esac
81ecdfbb 1165 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1166
1167 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1168 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1169 | --exec | --exe | --ex)
1170 ac_prev=exec_prefix ;;
1171 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1172 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1173 | --exec=* | --exe=* | --ex=*)
bec39cab 1174 exec_prefix=$ac_optarg ;;
c906108c
SS
1175
1176 -gas | --gas | --ga | --g)
1177 # Obsolete; use --with-gas.
1178 with_gas=yes ;;
1179
bec39cab
AC
1180 -help | --help | --hel | --he | -h)
1181 ac_init_help=long ;;
1182 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1183 ac_init_help=recursive ;;
1184 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1185 ac_init_help=short ;;
c906108c
SS
1186
1187 -host | --host | --hos | --ho)
bec39cab 1188 ac_prev=host_alias ;;
c906108c 1189 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1190 host_alias=$ac_optarg ;;
c906108c 1191
81ecdfbb
RW
1192 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1193 ac_prev=htmldir ;;
1194 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1195 | --ht=*)
1196 htmldir=$ac_optarg ;;
1197
c906108c
SS
1198 -includedir | --includedir | --includedi | --included | --include \
1199 | --includ | --inclu | --incl | --inc)
1200 ac_prev=includedir ;;
1201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1202 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1203 includedir=$ac_optarg ;;
c906108c
SS
1204
1205 -infodir | --infodir | --infodi | --infod | --info | --inf)
1206 ac_prev=infodir ;;
1207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1208 infodir=$ac_optarg ;;
c906108c
SS
1209
1210 -libdir | --libdir | --libdi | --libd)
1211 ac_prev=libdir ;;
1212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1213 libdir=$ac_optarg ;;
c906108c
SS
1214
1215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1216 | --libexe | --libex | --libe)
1217 ac_prev=libexecdir ;;
1218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1219 | --libexe=* | --libex=* | --libe=*)
bec39cab 1220 libexecdir=$ac_optarg ;;
c906108c 1221
81ecdfbb
RW
1222 -localedir | --localedir | --localedi | --localed | --locale)
1223 ac_prev=localedir ;;
1224 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1225 localedir=$ac_optarg ;;
1226
c906108c 1227 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1228 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1229 ac_prev=localstatedir ;;
1230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1231 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1232 localstatedir=$ac_optarg ;;
c906108c
SS
1233
1234 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1235 ac_prev=mandir ;;
1236 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1237 mandir=$ac_optarg ;;
c906108c
SS
1238
1239 -nfp | --nfp | --nf)
1240 # Obsolete; use --without-fp.
1241 with_fp=no ;;
1242
1243 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1244 | --no-cr | --no-c | -n)
c906108c
SS
1245 no_create=yes ;;
1246
1247 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1248 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1249 no_recursion=yes ;;
1250
1251 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1252 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1253 | --oldin | --oldi | --old | --ol | --o)
1254 ac_prev=oldincludedir ;;
1255 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1256 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1257 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1258 oldincludedir=$ac_optarg ;;
c906108c
SS
1259
1260 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1261 ac_prev=prefix ;;
1262 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1263 prefix=$ac_optarg ;;
c906108c
SS
1264
1265 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1266 | --program-pre | --program-pr | --program-p)
1267 ac_prev=program_prefix ;;
1268 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1269 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1270 program_prefix=$ac_optarg ;;
c906108c
SS
1271
1272 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1273 | --program-suf | --program-su | --program-s)
1274 ac_prev=program_suffix ;;
1275 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1276 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1277 program_suffix=$ac_optarg ;;
c906108c
SS
1278
1279 -program-transform-name | --program-transform-name \
1280 | --program-transform-nam | --program-transform-na \
1281 | --program-transform-n | --program-transform- \
1282 | --program-transform | --program-transfor \
1283 | --program-transfo | --program-transf \
1284 | --program-trans | --program-tran \
1285 | --progr-tra | --program-tr | --program-t)
1286 ac_prev=program_transform_name ;;
1287 -program-transform-name=* | --program-transform-name=* \
1288 | --program-transform-nam=* | --program-transform-na=* \
1289 | --program-transform-n=* | --program-transform-=* \
1290 | --program-transform=* | --program-transfor=* \
1291 | --program-transfo=* | --program-transf=* \
1292 | --program-trans=* | --program-tran=* \
1293 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1294 program_transform_name=$ac_optarg ;;
c906108c 1295
81ecdfbb
RW
1296 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1297 ac_prev=pdfdir ;;
1298 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1299 pdfdir=$ac_optarg ;;
1300
1301 -psdir | --psdir | --psdi | --psd | --ps)
1302 ac_prev=psdir ;;
1303 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1304 psdir=$ac_optarg ;;
1305
c906108c
SS
1306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1307 | -silent | --silent | --silen | --sile | --sil)
1308 silent=yes ;;
1309
1310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1311 ac_prev=sbindir ;;
1312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1313 | --sbi=* | --sb=*)
bec39cab 1314 sbindir=$ac_optarg ;;
c906108c
SS
1315
1316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1318 | --sharedst | --shareds | --shared | --share | --shar \
1319 | --sha | --sh)
1320 ac_prev=sharedstatedir ;;
1321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1324 | --sha=* | --sh=*)
bec39cab 1325 sharedstatedir=$ac_optarg ;;
c906108c
SS
1326
1327 -site | --site | --sit)
1328 ac_prev=site ;;
1329 -site=* | --site=* | --sit=*)
bec39cab 1330 site=$ac_optarg ;;
3ace7edb 1331
c906108c
SS
1332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1333 ac_prev=srcdir ;;
1334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1335 srcdir=$ac_optarg ;;
c906108c
SS
1336
1337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1338 | --syscon | --sysco | --sysc | --sys | --sy)
1339 ac_prev=sysconfdir ;;
1340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1342 sysconfdir=$ac_optarg ;;
c906108c
SS
1343
1344 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1345 ac_prev=target_alias ;;
c906108c 1346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1347 target_alias=$ac_optarg ;;
c906108c
SS
1348
1349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1350 verbose=yes ;;
1351
bec39cab
AC
1352 -version | --version | --versio | --versi | --vers | -V)
1353 ac_init_version=: ;;
c906108c
SS
1354
1355 -with-* | --with-*)
81ecdfbb 1356 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1357 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1358 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1359 as_fn_error "invalid package name: $ac_useropt"
1360 ac_useropt_orig=$ac_useropt
1361 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1362 case $ac_user_opts in
1363 *"
1364"with_$ac_useropt"
1365"*) ;;
1366 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1367 ac_unrecognized_sep=', ';;
b4e70030 1368 esac
81ecdfbb 1369 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1370
1371 -without-* | --without-*)
81ecdfbb 1372 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1373 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1374 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375 as_fn_error "invalid package name: $ac_useropt"
1376 ac_useropt_orig=$ac_useropt
1377 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378 case $ac_user_opts in
1379 *"
1380"with_$ac_useropt"
1381"*) ;;
1382 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1383 ac_unrecognized_sep=', ';;
1384 esac
1385 eval with_$ac_useropt=no ;;
c906108c
SS
1386
1387 --x)
1388 # Obsolete; use --with-x.
1389 with_x=yes ;;
1390
1391 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1392 | --x-incl | --x-inc | --x-in | --x-i)
1393 ac_prev=x_includes ;;
1394 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1395 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1396 x_includes=$ac_optarg ;;
c906108c
SS
1397
1398 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1399 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1400 ac_prev=x_libraries ;;
1401 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1402 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1403 x_libraries=$ac_optarg ;;
c906108c 1404
81ecdfbb
RW
1405 -*) as_fn_error "unrecognized option: \`$ac_option'
1406Try \`$0 --help' for more information."
c906108c
SS
1407 ;;
1408
bec39cab
AC
1409 *=*)
1410 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1411 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1412 case $ac_envvar in #(
1413 '' | [0-9]* | *[!_$as_cr_alnum]* )
1414 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1415 esac
1416 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1417 export $ac_envvar ;;
1418
c906108c 1419 *)
bec39cab 1420 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1421 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1422 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1423 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1424 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1425 ;;
1426
1427 esac
1428done
1429
1430if test -n "$ac_prev"; then
bec39cab 1431 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1432 as_fn_error "missing argument to $ac_option"
c906108c 1433fi
c906108c 1434
81ecdfbb
RW
1435if test -n "$ac_unrecognized_opts"; then
1436 case $enable_option_checking in
1437 no) ;;
1438 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1439 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1440 esac
81ecdfbb 1441fi
b4e70030 1442
81ecdfbb
RW
1443# Check all directory arguments for consistency.
1444for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1445 datadir sysconfdir sharedstatedir localstatedir includedir \
1446 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1447 libdir localedir mandir
b4e70030 1448do
81ecdfbb
RW
1449 eval ac_val=\$$ac_var
1450 # Remove trailing slashes.
1451 case $ac_val in
1452 */ )
1453 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1454 eval $ac_var=\$ac_val;;
1455 esac
1456 # Be sure to have absolute directory names.
b4e70030 1457 case $ac_val in
81ecdfbb
RW
1458 [\\/$]* | ?:[\\/]* ) continue;;
1459 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1460 esac
81ecdfbb 1461 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1462done
1463
bec39cab
AC
1464# There might be people who depend on the old broken behavior: `$host'
1465# used to hold the argument of --host etc.
1466# FIXME: To remove some day.
1467build=$build_alias
1468host=$host_alias
1469target=$target_alias
1470
1471# FIXME: To remove some day.
1472if test "x$host_alias" != x; then
1473 if test "x$build_alias" = x; then
1474 cross_compiling=maybe
81ecdfbb 1475 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1476 If a cross compiler is detected then cross compile mode will be used." >&2
1477 elif test "x$build_alias" != "x$host_alias"; then
1478 cross_compiling=yes
1479 fi
1480fi
c906108c 1481
bec39cab
AC
1482ac_tool_prefix=
1483test -n "$host_alias" && ac_tool_prefix=$host_alias-
1484
1485test "$silent" = yes && exec 6>/dev/null
c906108c 1486
c906108c 1487
81ecdfbb
RW
1488ac_pwd=`pwd` && test -n "$ac_pwd" &&
1489ac_ls_di=`ls -di .` &&
1490ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1491 as_fn_error "working directory cannot be determined"
1492test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1493 as_fn_error "pwd does not report name of working directory"
1494
1495
c906108c
SS
1496# Find the source files, if location was not specified.
1497if test -z "$srcdir"; then
1498 ac_srcdir_defaulted=yes
81ecdfbb
RW
1499 # Try the directory containing this script, then the parent directory.
1500 ac_confdir=`$as_dirname -- "$as_myself" ||
1501$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1502 X"$as_myself" : 'X\(//\)[^/]' \| \
1503 X"$as_myself" : 'X\(//\)$' \| \
1504 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1505$as_echo X"$as_myself" |
1506 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1507 s//\1/
1508 q
1509 }
1510 /^X\(\/\/\)[^/].*/{
1511 s//\1/
1512 q
1513 }
1514 /^X\(\/\/\)$/{
1515 s//\1/
1516 q
1517 }
1518 /^X\(\/\).*/{
1519 s//\1/
1520 q
1521 }
1522 s/.*/./; q'`
c906108c 1523 srcdir=$ac_confdir
81ecdfbb 1524 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1525 srcdir=..
1526 fi
1527else
1528 ac_srcdir_defaulted=no
1529fi
81ecdfbb
RW
1530if test ! -r "$srcdir/$ac_unique_file"; then
1531 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1532 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1533fi
1534ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1535ac_abs_confdir=`(
1536 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1537 pwd)`
1538# When building in place, set srcdir=.
1539if test "$ac_abs_confdir" = "$ac_pwd"; then
1540 srcdir=.
1541fi
1542# Remove unnecessary trailing slashes from srcdir.
1543# Double slashes in file names in object file debugging info
1544# mess up M-x gdb in Emacs.
1545case $srcdir in
1546*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1547esac
1548for ac_var in $ac_precious_vars; do
1549 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1550 eval ac_env_${ac_var}_value=\$${ac_var}
1551 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1552 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1553done
c906108c 1554
bec39cab
AC
1555#
1556# Report the --help message.
1557#
1558if test "$ac_init_help" = "long"; then
1559 # Omit some internal or obsolete options to make the list less imposing.
1560 # This message is too long to be a string in the A/UX 3.1 sh.
1561 cat <<_ACEOF
1562\`configure' configures this package to adapt to many kinds of systems.
1563
1564Usage: $0 [OPTION]... [VAR=VALUE]...
1565
1566To assign environment variables (e.g., CC, CFLAGS...), specify them as
1567VAR=VALUE. See below for descriptions of some of the useful variables.
1568
1569Defaults for the options are specified in brackets.
1570
1571Configuration:
1572 -h, --help display this help and exit
1573 --help=short display options specific to this package
1574 --help=recursive display the short help of all the included packages
1575 -V, --version display version information and exit
1576 -q, --quiet, --silent do not print \`checking...' messages
1577 --cache-file=FILE cache test results in FILE [disabled]
1578 -C, --config-cache alias for \`--cache-file=config.cache'
1579 -n, --no-create do not create output files
1580 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1581
bec39cab
AC
1582Installation directories:
1583 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1584 [$ac_default_prefix]
bec39cab 1585 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1586 [PREFIX]
bec39cab
AC
1587
1588By default, \`make install' will install all the files in
1589\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1590an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1591for instance \`--prefix=\$HOME'.
1592
1593For better control, use the options below.
1594
1595Fine tuning of the installation directories:
81ecdfbb
RW
1596 --bindir=DIR user executables [EPREFIX/bin]
1597 --sbindir=DIR system admin executables [EPREFIX/sbin]
1598 --libexecdir=DIR program executables [EPREFIX/libexec]
1599 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1600 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1601 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1602 --libdir=DIR object code libraries [EPREFIX/lib]
1603 --includedir=DIR C header files [PREFIX/include]
1604 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1605 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1606 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1607 --infodir=DIR info documentation [DATAROOTDIR/info]
1608 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1609 --mandir=DIR man documentation [DATAROOTDIR/man]
1610 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1611 --htmldir=DIR html documentation [DOCDIR]
1612 --dvidir=DIR dvi documentation [DOCDIR]
1613 --pdfdir=DIR pdf documentation [DOCDIR]
1614 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1615_ACEOF
1616
1617 cat <<\_ACEOF
1618
1619Program names:
1620 --program-prefix=PREFIX prepend PREFIX to installed program names
1621 --program-suffix=SUFFIX append SUFFIX to installed program names
1622 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1623
1624X features:
1625 --x-includes=DIR X include files are in DIR
1626 --x-libraries=DIR X library files are in DIR
1627
1628System types:
1629 --build=BUILD configure for building on BUILD [guessed]
1630 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1631 --target=TARGET configure for building compilers for TARGET [HOST]
1632_ACEOF
1633fi
1634
1635if test -n "$ac_init_help"; then
1636
1637 cat <<\_ACEOF
1638
1639Optional Features:
81ecdfbb 1640 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1641 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1642 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1643 --enable-maintainer-mode enable make rules and dependencies not useful
1644 (and sometimes confusing) to the casual installer
da2f07f1
JK
1645 --enable-plugins Enable support for plugins (defaults no)
1646 --disable-largefile omit support for large files
e28b3332
DJ
1647 --disable-dependency-tracking speeds up one-time build
1648 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1649 --enable-targets=TARGETS
1650 alternative target configurations
c0993dbe 1651 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1652 --disable-gdbcli disable command-line interface (CLI)
1653 --disable-gdbmi disable machine-interface (MI)
1654 --enable-tui enable full-screen terminal user interface (TUI)
1655 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1656 --enable-profiling enable profiling of GDB
3841debe 1657 --disable-rpath do not hardcode runtime library paths
a1220294 1658 --enable-werror treat compile warnings as errors
32c1c914 1659 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1660 --enable-gdb-build-warnings
32c1c914 1661 enable GDB specific build-time compiler warnings if
a1220294 1662 gcc is used
32c1c914 1663 --enable-sim link gdb with simulator
bec39cab 1664 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1665 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1666 is auto)
bec39cab
AC
1667
1668Optional Packages:
1669 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1670 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1671 --with-separate-debug-dir=PATH
32c1c914 1672 look for global separate debug info in this path
62e4f60c 1673 [LIBDIR/debug]
b14b1491
TT
1674 --with-gdb-datadir=PATH look for global separate data files in this path
1675 [DATADIR/gdb]
29b0e8a2 1676 --with-relocated-sources=PATH
32c1c914 1677 automatically relocate this path for source files
05e7c244 1678 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1679 --with-curses use the curses library instead of the termcap
1680 library
c16158bc
JM
1681 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1682 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1683 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1684 --with-libiconv-prefix=DIR
1685 search for libiconv in DIR/include and DIR/lib
478aac75 1686 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1687 --with-system-readline use installed readline library
b8e0a31c
SD
1688 --with-jit-reader-dir=PATH
1689 directory to load the JIT readers from
5c39566f 1690 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1691 --with-gnu-ld assume the C compiler uses GNU ld default=no
1692 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1693 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1694 --with-python[=PYTHON] include python support
1695 (auto/yes/no/<python-program>)
a1220294
TT
1696 --without-included-regex
1697 don't use included regex; this is the default on
1698 systems with version 2 of the GNU C library (use
1699 with caution on other system)
81ecdfbb 1700 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1701 --with-system-gdbinit=PATH
32c1c914 1702 automatically load a system-wide gdbinit file
5062cc19
KS
1703 --with-tcl directory containing tcl configuration (tclConfig.sh)
1704 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1705 --with-x use the X Window System
bec39cab
AC
1706
1707Some influential environment variables:
1708 CC C compiler command
1709 CFLAGS C compiler flags
1710 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1711 nonstandard directory <lib dir>
81ecdfbb
RW
1712 LIBS libraries to pass to the linker, e.g. -l<library>
1713 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1714 you have headers in a nonstandard directory <include dir>
bec39cab 1715 CPP C preprocessor
f06e05e0
JK
1716 MAKEINFO Parent configure detects if it is of sufficient version.
1717 MAKEINFOFLAGS
1718 Parameters for MAKEINFO.
81ecdfbb
RW
1719 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1720 the first program found out of: `bison -y', `byacc', `yacc'.
1721 YFLAGS The list of arguments that will be passed by default to $YACC.
1722 This script will default YFLAGS to the empty string to avoid a
1723 default value of `-d' given by some make applications.
1724 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1725
1726Use these variables to override the choices made by `configure' or to help
1727it to find libraries and programs with nonstandard names/locations.
1728
81ecdfbb 1729Report bugs to the package provider.
bec39cab 1730_ACEOF
81ecdfbb 1731ac_status=$?
bec39cab
AC
1732fi
1733
1734if test "$ac_init_help" = "recursive"; then
1735 # If there are subdirs, report their specific --help.
bec39cab 1736 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1737 test -d "$ac_dir" ||
1738 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1739 continue
bec39cab
AC
1740 ac_builddir=.
1741
81ecdfbb
RW
1742case "$ac_dir" in
1743.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1744*)
1745 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1746 # A ".." for each directory in $ac_dir_suffix.
1747 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1748 case $ac_top_builddir_sub in
1749 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1750 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1751 esac ;;
1752esac
1753ac_abs_top_builddir=$ac_pwd
1754ac_abs_builddir=$ac_pwd$ac_dir_suffix
1755# for backward compatibility:
1756ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1757
1758case $srcdir in
81ecdfbb 1759 .) # We are building in place.
bec39cab 1760 ac_srcdir=.
81ecdfbb
RW
1761 ac_top_srcdir=$ac_top_builddir_sub
1762 ac_abs_top_srcdir=$ac_pwd ;;
1763 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1764 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1765 ac_top_srcdir=$srcdir
1766 ac_abs_top_srcdir=$srcdir ;;
1767 *) # Relative name.
1768 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1769 ac_top_srcdir=$ac_top_build_prefix$srcdir
1770 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1771esac
81ecdfbb 1772ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1773
81ecdfbb
RW
1774 cd "$ac_dir" || { ac_status=$?; continue; }
1775 # Check for guested configure.
1776 if test -f "$ac_srcdir/configure.gnu"; then
1777 echo &&
1778 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1779 elif test -f "$ac_srcdir/configure"; then
1780 echo &&
1781 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1782 else
81ecdfbb
RW
1783 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1784 fi || ac_status=$?
1785 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1786 done
1787fi
1788
81ecdfbb 1789test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1790if $ac_init_version; then
1791 cat <<\_ACEOF
81ecdfbb
RW
1792configure
1793generated by GNU Autoconf 2.64
bec39cab 1794
81ecdfbb 1795Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1796This configure script is free software; the Free Software Foundation
1797gives unlimited permission to copy, distribute and modify it.
1798_ACEOF
81ecdfbb 1799 exit
bec39cab 1800fi
bec39cab 1801
81ecdfbb
RW
1802## ------------------------ ##
1803## Autoconf initialization. ##
1804## ------------------------ ##
bec39cab 1805
81ecdfbb
RW
1806# ac_fn_c_try_compile LINENO
1807# --------------------------
1808# Try to compile conftest.$ac_ext, and return whether this succeeded.
1809ac_fn_c_try_compile ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 rm -f conftest.$ac_objext
1813 if { { ac_try="$ac_compile"
1814case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_compile") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1826 fi
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } && {
1829 test -z "$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 } && test -s conftest.$ac_objext; then :
1832 ac_retval=0
1833else
1834 $as_echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1836
81ecdfbb
RW
1837 ac_retval=1
1838fi
1839 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1840 return $ac_retval
1841
1842} # ac_fn_c_try_compile
1843
1844# ac_fn_c_try_cpp LINENO
1845# ----------------------
1846# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1847ac_fn_c_try_cpp ()
bec39cab 1848{
81ecdfbb
RW
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 if { { ac_try="$ac_cpp conftest.$ac_ext"
1851case "(($ac_try" in
1852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853 *) ac_try_echo=$ac_try;;
1854esac
1855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856$as_echo "$ac_try_echo"; } >&5
1857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1858 ac_status=$?
1859 if test -s conftest.err; then
1860 grep -v '^ *+' conftest.err >conftest.er1
1861 cat conftest.er1 >&5
1862 mv -f conftest.er1 conftest.err
1863 fi
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; } >/dev/null && {
1866 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1867 test ! -s conftest.err
1868 }; then :
1869 ac_retval=0
1870else
1871 $as_echo "$as_me: failed program was:" >&5
1872sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1873
81ecdfbb
RW
1874 ac_retval=1
1875fi
1876 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1877 return $ac_retval
bec39cab 1878
81ecdfbb 1879} # ac_fn_c_try_cpp
bec39cab 1880
81ecdfbb
RW
1881# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1882# -------------------------------------------------------
1883# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1884# the include files in INCLUDES and setting the cache variable VAR
1885# accordingly.
1886ac_fn_c_check_header_mongrel ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
1892if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1893 $as_echo_n "(cached) " >&6
1894fi
1895eval ac_res=\$$3
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1897$as_echo "$ac_res" >&6; }
1898else
1899 # Is the header compilable?
1900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1901$as_echo_n "checking $2 usability... " >&6; }
1902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903/* end confdefs.h. */
1904$4
1905#include <$2>
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 ac_header_compiler=yes
1909else
1910 ac_header_compiler=no
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1914$as_echo "$ac_header_compiler" >&6; }
bec39cab 1915
81ecdfbb
RW
1916# Is the header present?
1917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1918$as_echo_n "checking $2 presence... " >&6; }
1919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921#include <$2>
1922_ACEOF
1923if ac_fn_c_try_cpp "$LINENO"; then :
1924 ac_header_preproc=yes
1925else
1926 ac_header_preproc=no
1927fi
1928rm -f conftest.err conftest.$ac_ext
1929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1930$as_echo "$ac_header_preproc" >&6; }
bec39cab 1931
81ecdfbb
RW
1932# So? What about this header?
1933case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1934 yes:no: )
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1936$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1938$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1939 ;;
1940 no:yes:* )
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1942$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1944$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1946$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1948$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1950$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1951 ;;
1952esac
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954$as_echo_n "checking for $2... " >&6; }
1955if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1956 $as_echo_n "(cached) " >&6
1957else
1958 eval "$3=\$ac_header_compiler"
1959fi
1960eval ac_res=\$$3
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1962$as_echo "$ac_res" >&6; }
1963fi
1964 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1965
81ecdfbb 1966} # ac_fn_c_check_header_mongrel
bec39cab 1967
81ecdfbb
RW
1968# ac_fn_c_try_run LINENO
1969# ----------------------
1970# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1971# that executables *can* be run.
1972ac_fn_c_try_run ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 if { { ac_try="$ac_link"
1976case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979esac
1980eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981$as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_link") 2>&5
1983 ac_status=$?
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1986 { { case "(($ac_try" in
1987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988 *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992 (eval "$ac_try") 2>&5
1993 ac_status=$?
1994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995 test $ac_status = 0; }; }; then :
1996 ac_retval=0
1997else
1998 $as_echo "$as_me: program exited with status $ac_status" >&5
1999 $as_echo "$as_me: failed program was:" >&5
2000sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2001
81ecdfbb
RW
2002 ac_retval=$ac_status
2003fi
2004 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2005 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2006 return $ac_retval
bec39cab 2007
81ecdfbb 2008} # ac_fn_c_try_run
bec39cab 2009
81ecdfbb
RW
2010# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2011# -------------------------------------------------------
2012# Tests whether HEADER exists and can be compiled using the include files in
2013# INCLUDES, setting the cache variable VAR accordingly.
2014ac_fn_c_check_header_compile ()
2015{
2016 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2018$as_echo_n "checking for $2... " >&6; }
2019if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2020 $as_echo_n "(cached) " >&6
2021else
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025#include <$2>
bec39cab 2026_ACEOF
81ecdfbb
RW
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 eval "$3=yes"
2029else
2030 eval "$3=no"
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034eval ac_res=\$$3
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
2037 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2038
81ecdfbb 2039} # ac_fn_c_check_header_compile
bec39cab 2040
81ecdfbb
RW
2041# ac_fn_c_try_link LINENO
2042# -----------------------
2043# Try to link conftest.$ac_ext, and return whether this succeeded.
2044ac_fn_c_try_link ()
b4e70030 2045{
81ecdfbb
RW
2046 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2047 rm -f conftest.$ac_objext conftest$ac_exeext
2048 if { { ac_try="$ac_link"
2049case "(($ac_try" in
2050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2051 *) ac_try_echo=$ac_try;;
2052esac
2053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2054$as_echo "$ac_try_echo"; } >&5
2055 (eval "$ac_link") 2>conftest.err
2056 ac_status=$?
2057 if test -s conftest.err; then
2058 grep -v '^ *+' conftest.err >conftest.er1
2059 cat conftest.er1 >&5
2060 mv -f conftest.er1 conftest.err
2061 fi
2062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2063 test $ac_status = 0; } && {
2064 test -z "$ac_c_werror_flag" ||
2065 test ! -s conftest.err
2066 } && test -s conftest$ac_exeext && {
2067 test "$cross_compiling" = yes ||
2068 $as_test_x conftest$ac_exeext
2069 }; then :
2070 ac_retval=0
2071else
2072 $as_echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2074
81ecdfbb
RW
2075 ac_retval=1
2076fi
2077 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2078 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2079 # interfere with the next link command; also delete a directory that is
2080 # left behind by Apple's compiler. We do this before executing the actions.
2081 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2082 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2083 return $ac_retval
bec39cab 2084
81ecdfbb 2085} # ac_fn_c_try_link
bec39cab 2086
81ecdfbb
RW
2087# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2088# --------------------------------------------
2089# Tries to find the compile-time value of EXPR in a program that includes
2090# INCLUDES, setting VAR accordingly. Returns whether the value could be
2091# computed
2092ac_fn_c_compute_int ()
2093{
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 if test "$cross_compiling" = yes; then
2096 # Depending upon the size, compute the lo and hi bounds.
2097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) >= 0)];
2104test_array [0] = 0
bec39cab 2105
81ecdfbb
RW
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111 ac_lo=0 ac_mid=0
2112 while :; do
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h. */
2115$4
2116int
2117main ()
2118{
2119static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2120test_array [0] = 0
bec39cab 2121
81ecdfbb
RW
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_hi=$ac_mid; break
2128else
2129 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2130 if test $ac_lo -le $ac_mid; then
2131 ac_lo= ac_hi=
2132 break
2133 fi
2134 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2135fi
81ecdfbb
RW
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137 done
c906108c 2138else
81ecdfbb
RW
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h. */
2141$4
2142int
2143main ()
2144{
2145static int test_array [1 - 2 * !(($2) < 0)];
2146test_array [0] = 0
bec39cab 2147
81ecdfbb
RW
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=-1 ac_mid=-1
2154 while :; do
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2162test_array [0] = 0
bec39cab 2163
81ecdfbb
RW
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_lo=$ac_mid; break
2170else
2171 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2172 if test $ac_mid -le $ac_hi; then
2173 ac_lo= ac_hi=
2174 break
2175 fi
2176 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 done
2180else
2181 ac_lo= ac_hi=
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186# Binary search between lo and hi bounds.
2187while test "x$ac_lo" != "x$ac_hi"; do
2188 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2196test_array [0] = 0
bec39cab 2197
81ecdfbb
RW
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid
2204else
2205 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208done
2209case $ac_lo in #((
2210?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2211'') ac_retval=1 ;;
2212esac
2213 else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$4
2217static long int longval () { return $2; }
2218static unsigned long int ulongval () { return $2; }
2219#include <stdio.h>
2220#include <stdlib.h>
2221int
2222main ()
2223{
bec39cab 2224
81ecdfbb
RW
2225 FILE *f = fopen ("conftest.val", "w");
2226 if (! f)
2227 return 1;
2228 if (($2) < 0)
2229 {
2230 long int i = longval ();
2231 if (i != ($2))
2232 return 1;
2233 fprintf (f, "%ld", i);
2234 }
2235 else
2236 {
2237 unsigned long int i = ulongval ();
2238 if (i != ($2))
2239 return 1;
2240 fprintf (f, "%lu", i);
2241 }
2242 /* Do not output a trailing newline, as this causes \r\n confusion
2243 on some platforms. */
2244 return ferror (f) || fclose (f) != 0;
bec39cab 2245
81ecdfbb
RW
2246 ;
2247 return 0;
2248}
2249_ACEOF
2250if ac_fn_c_try_run "$LINENO"; then :
2251 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2252else
2253 ac_retval=1
2254fi
2255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2256 conftest.$ac_objext conftest.beam conftest.$ac_ext
2257rm -f conftest.val
bec39cab 2258
81ecdfbb
RW
2259 fi
2260 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261 return $ac_retval
bec39cab 2262
81ecdfbb 2263} # ac_fn_c_compute_int
bec39cab 2264
55a8c076
YQ
2265# ac_fn_c_check_decl LINENO SYMBOL VAR
2266# ------------------------------------
2267# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2268ac_fn_c_check_decl ()
81ecdfbb
RW
2269{
2270 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55a8c076
YQ
2271 as_decl_name=`echo $2|sed 's/ *(.*//'`
2272 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2274$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2275if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb
RW
2276 $as_echo_n "(cached) " >&6
2277else
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h. */
55a8c076 2280$4
81ecdfbb
RW
2281int
2282main ()
2283{
55a8c076
YQ
2284#ifndef $as_decl_name
2285#ifdef __cplusplus
2286 (void) $as_decl_use;
2287#else
2288 (void) $as_decl_name;
2289#endif
2290#endif
2291
81ecdfbb
RW
2292 ;
2293 return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 2297 eval "$3=yes"
81ecdfbb 2298else
55a8c076 2299 eval "$3=no"
81ecdfbb
RW
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302fi
55a8c076 2303eval ac_res=\$$3
81ecdfbb
RW
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2305$as_echo "$ac_res" >&6; }
2306 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2307
55a8c076 2308} # ac_fn_c_check_decl
bec39cab 2309
55a8c076
YQ
2310# ac_fn_c_check_func LINENO FUNC VAR
2311# ----------------------------------
2312# Tests whether FUNC exists, setting the cache variable VAR accordingly
2313ac_fn_c_check_func ()
81ecdfbb
RW
2314{
2315 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2317$as_echo_n "checking for $2... " >&6; }
2318if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2319 $as_echo_n "(cached) " >&6
2320else
81ecdfbb
RW
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
55a8c076
YQ
2323/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2324 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2325#define $2 innocuous_$2
2326
2327/* System header to define __stub macros and hopefully few prototypes,
2328 which can conflict with char $2 (); below.
2329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2330 <limits.h> exists even on freestanding compilers. */
2331
2332#ifdef __STDC__
2333# include <limits.h>
2334#else
2335# include <assert.h>
2336#endif
2337
2338#undef $2
2339
2340/* Override any GCC internal prototype to avoid an error.
2341 Use char because int might match the return type of a GCC
2342 builtin and then its argument prototype would still apply. */
2343#ifdef __cplusplus
2344extern "C"
2345#endif
2346char $2 ();
2347/* The GNU C library defines this for functions which it implements
2348 to always fail with ENOSYS. Some functions are actually named
2349 something starting with __ and the normal name is an alias. */
2350#if defined __stub_$2 || defined __stub___$2
2351choke me
2352#endif
2353
2354int
2355main ()
2356{
2357return $2 ();
2358 ;
2359 return 0;
2360}
2361_ACEOF
2362if ac_fn_c_try_link "$LINENO"; then :
2363 eval "$3=yes"
2364else
2365 eval "$3=no"
2366fi
2367rm -f core conftest.err conftest.$ac_objext \
2368 conftest$ac_exeext conftest.$ac_ext
2369fi
2370eval ac_res=\$$3
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
2373 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2374
2375} # ac_fn_c_check_func
2376
2377# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2378# ----------------------------------------------------
2379# Tries to find if the field MEMBER exists in type AGGR, after including
2380# INCLUDES, setting cache variable VAR accordingly.
2381ac_fn_c_check_member ()
2382{
2383 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2385$as_echo_n "checking for $2.$3... " >&6; }
2386if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2387 $as_echo_n "(cached) " >&6
2388else
2389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h. */
2391$5
2392int
2393main ()
2394{
2395static $2 ac_aggr;
2396if (ac_aggr.$3)
2397return 0;
2398 ;
2399 return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"; then :
2403 eval "$4=yes"
2404else
2405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h. */
2407$5
2408int
2409main ()
2410{
2411static $2 ac_aggr;
2412if (sizeof ac_aggr.$3)
2413return 0;
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418if ac_fn_c_try_compile "$LINENO"; then :
2419 eval "$4=yes"
2420else
2421 eval "$4=no"
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427eval ac_res=\$$4
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2429$as_echo "$ac_res" >&6; }
2430 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2431
2432} # ac_fn_c_check_member
2433
2434# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2435# -------------------------------------------
2436# Tests whether TYPE exists after having included INCLUDES, setting cache
2437# variable VAR accordingly.
2438ac_fn_c_check_type ()
2439{
2440 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2442$as_echo_n "checking for $2... " >&6; }
2443if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2444 $as_echo_n "(cached) " >&6
2445else
2446 eval "$3=no"
2447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2448/* end confdefs.h. */
2449$4
2450int
2451main ()
2452{
2453if (sizeof ($2))
2454 return 0;
2455 ;
2456 return 0;
2457}
2458_ACEOF
2459if ac_fn_c_try_compile "$LINENO"; then :
2460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461/* end confdefs.h. */
2462$4
2463int
2464main ()
2465{
2466if (sizeof (($2)))
2467 return 0;
2468 ;
2469 return 0;
2470}
2471_ACEOF
2472if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2473
81ecdfbb
RW
2474else
2475 eval "$3=yes"
2476fi
2477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478fi
2479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480fi
2481eval ac_res=\$$3
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483$as_echo "$ac_res" >&6; }
2484 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2485
81ecdfbb
RW
2486} # ac_fn_c_check_type
2487cat >config.log <<_ACEOF
2488This file contains any messages produced by compilers while
2489running configure, to aid debugging if configure makes a mistake.
d5af19ba 2490
81ecdfbb
RW
2491It was created by $as_me, which was
2492generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2493
81ecdfbb 2494 $ $0 $@
413ccac7 2495
81ecdfbb
RW
2496_ACEOF
2497exec 5>>config.log
2498{
2499cat <<_ASUNAME
2500## --------- ##
2501## Platform. ##
2502## --------- ##
413ccac7 2503
81ecdfbb
RW
2504hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2505uname -m = `(uname -m) 2>/dev/null || echo unknown`
2506uname -r = `(uname -r) 2>/dev/null || echo unknown`
2507uname -s = `(uname -s) 2>/dev/null || echo unknown`
2508uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2509
81ecdfbb
RW
2510/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2511/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2512
81ecdfbb
RW
2513/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2514/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2515/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2516/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2517/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2518/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2519/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2520
81ecdfbb 2521_ASUNAME
bec39cab 2522
bec39cab
AC
2523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2524for as_dir in $PATH
2525do
2526 IFS=$as_save_IFS
2527 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2528 $as_echo "PATH: $as_dir"
2529 done
2530IFS=$as_save_IFS
bec39cab 2531
81ecdfbb 2532} >&5
bec39cab 2533
81ecdfbb 2534cat >&5 <<_ACEOF
bec39cab 2535
bec39cab 2536
81ecdfbb
RW
2537## ----------- ##
2538## Core tests. ##
2539## ----------- ##
2540
2541_ACEOF
2542
2543
2544# Keep a trace of the command line.
2545# Strip out --no-create and --no-recursion so they do not pile up.
2546# Strip out --silent because we don't want to record it for future runs.
2547# Also quote any args containing shell meta-characters.
2548# Make two passes to allow for proper duplicate-argument suppression.
2549ac_configure_args=
2550ac_configure_args0=
2551ac_configure_args1=
2552ac_must_keep_next=false
2553for ac_pass in 1 2
2554do
2555 for ac_arg
2556 do
2557 case $ac_arg in
2558 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2559 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2560 | -silent | --silent | --silen | --sile | --sil)
2561 continue ;;
2562 *\'*)
2563 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2564 esac
2565 case $ac_pass in
2566 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2567 2)
2568 as_fn_append ac_configure_args1 " '$ac_arg'"
2569 if test $ac_must_keep_next = true; then
2570 ac_must_keep_next=false # Got value, back to normal.
2571 else
2572 case $ac_arg in
2573 *=* | --config-cache | -C | -disable-* | --disable-* \
2574 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2575 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2576 | -with-* | --with-* | -without-* | --without-* | --x)
2577 case "$ac_configure_args0 " in
2578 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2579 esac
2580 ;;
2581 -* ) ac_must_keep_next=true ;;
2582 esac
2583 fi
2584 as_fn_append ac_configure_args " '$ac_arg'"
2585 ;;
2586 esac
2587 done
2588done
2589{ ac_configure_args0=; unset ac_configure_args0;}
2590{ ac_configure_args1=; unset ac_configure_args1;}
2591
2592# When interrupted or exit'd, cleanup temporary files, and complete
2593# config.log. We remove comments because anyway the quotes in there
2594# would cause problems or look ugly.
2595# WARNING: Use '\'' to represent an apostrophe within the trap.
2596# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2597trap 'exit_status=$?
2598 # Save into config.log some information that might help in debugging.
2599 {
2600 echo
2601
2602 cat <<\_ASBOX
2603## ---------------- ##
2604## Cache variables. ##
2605## ---------------- ##
2606_ASBOX
2607 echo
2608 # The following way of writing the cache mishandles newlines in values,
2609(
2610 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2611 eval ac_val=\$$ac_var
2612 case $ac_val in #(
2613 *${as_nl}*)
2614 case $ac_var in #(
2615 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2616$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2617 esac
2618 case $ac_var in #(
2619 _ | IFS | as_nl) ;; #(
2620 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2621 *) { eval $ac_var=; unset $ac_var;} ;;
2622 esac ;;
2623 esac
2624 done
2625 (set) 2>&1 |
2626 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2627 *${as_nl}ac_space=\ *)
2628 sed -n \
2629 "s/'\''/'\''\\\\'\'''\''/g;
2630 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2631 ;; #(
2632 *)
2633 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2634 ;;
2635 esac |
2636 sort
2637)
2638 echo
2639
2640 cat <<\_ASBOX
2641## ----------------- ##
2642## Output variables. ##
2643## ----------------- ##
2644_ASBOX
2645 echo
2646 for ac_var in $ac_subst_vars
2647 do
2648 eval ac_val=\$$ac_var
2649 case $ac_val in
2650 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2651 esac
2652 $as_echo "$ac_var='\''$ac_val'\''"
2653 done | sort
2654 echo
2655
2656 if test -n "$ac_subst_files"; then
2657 cat <<\_ASBOX
2658## ------------------- ##
2659## File substitutions. ##
2660## ------------------- ##
2661_ASBOX
2662 echo
2663 for ac_var in $ac_subst_files
2664 do
2665 eval ac_val=\$$ac_var
2666 case $ac_val in
2667 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2668 esac
2669 $as_echo "$ac_var='\''$ac_val'\''"
2670 done | sort
2671 echo
2672 fi
2673
2674 if test -s confdefs.h; then
2675 cat <<\_ASBOX
2676## ----------- ##
2677## confdefs.h. ##
2678## ----------- ##
2679_ASBOX
2680 echo
2681 cat confdefs.h
2682 echo
2683 fi
2684 test "$ac_signal" != 0 &&
2685 $as_echo "$as_me: caught signal $ac_signal"
2686 $as_echo "$as_me: exit $exit_status"
2687 } >&5
2688 rm -f core *.core core.conftest.* &&
2689 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2690 exit $exit_status
2691' 0
2692for ac_signal in 1 2 13 15; do
2693 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2694done
2695ac_signal=0
2696
2697# confdefs.h avoids OS command line length limits that DEFS can exceed.
2698rm -f -r conftest* confdefs.h
2699
2700$as_echo "/* confdefs.h */" > confdefs.h
2701
2702# Predefined preprocessor variables.
2703
2704cat >>confdefs.h <<_ACEOF
2705#define PACKAGE_NAME "$PACKAGE_NAME"
2706_ACEOF
2707
2708cat >>confdefs.h <<_ACEOF
2709#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2710_ACEOF
2711
2712cat >>confdefs.h <<_ACEOF
2713#define PACKAGE_VERSION "$PACKAGE_VERSION"
2714_ACEOF
2715
2716cat >>confdefs.h <<_ACEOF
2717#define PACKAGE_STRING "$PACKAGE_STRING"
2718_ACEOF
2719
2720cat >>confdefs.h <<_ACEOF
2721#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2722_ACEOF
2723
2724cat >>confdefs.h <<_ACEOF
2725#define PACKAGE_URL "$PACKAGE_URL"
2726_ACEOF
2727
2728
2729# Let the site file select an alternate cache file if it wants to.
2730# Prefer an explicitly selected file to automatically selected ones.
2731ac_site_file1=NONE
2732ac_site_file2=NONE
2733if test -n "$CONFIG_SITE"; then
2734 ac_site_file1=$CONFIG_SITE
2735elif test "x$prefix" != xNONE; then
2736 ac_site_file1=$prefix/share/config.site
2737 ac_site_file2=$prefix/etc/config.site
2738else
2739 ac_site_file1=$ac_default_prefix/share/config.site
2740 ac_site_file2=$ac_default_prefix/etc/config.site
2741fi
2742for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2743do
2744 test "x$ac_site_file" = xNONE && continue
2745 if test -r "$ac_site_file"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2747$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2748 sed 's/^/| /' "$ac_site_file" >&5
2749 . "$ac_site_file"
2750 fi
2751done
2752
2753if test -r "$cache_file"; then
2754 # Some versions of bash will fail to source /dev/null (special
2755 # files actually), so we avoid doing that.
2756 if test -f "$cache_file"; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2758$as_echo "$as_me: loading cache $cache_file" >&6;}
2759 case $cache_file in
2760 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2761 *) . "./$cache_file";;
2762 esac
2763 fi
2764else
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2766$as_echo "$as_me: creating cache $cache_file" >&6;}
2767 >$cache_file
bec39cab
AC
2768fi
2769
55a8c076
YQ
2770gl_header_list="$gl_header_list stdint.h"
2771gl_header_list="$gl_header_list wchar.h"
2772gl_header_list="$gl_header_list inttypes.h"
f434ba03
PA
2773gl_header_list="$gl_header_list sys/mman.h"
2774gl_func_list="$gl_func_list mprotect"
2775gl_func_list="$gl_func_list memchr"
2776gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2777gl_header_list="$gl_header_list string.h"
2778# Check that the precious variables saved in the cache have kept the same
2779# value.
2780ac_cache_corrupted=false
2781for ac_var in $ac_precious_vars; do
2782 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2783 eval ac_new_set=\$ac_env_${ac_var}_set
2784 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2785 eval ac_new_val=\$ac_env_${ac_var}_value
2786 case $ac_old_set,$ac_new_set in
2787 set,)
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2789$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2790 ac_cache_corrupted=: ;;
2791 ,set)
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2793$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2794 ac_cache_corrupted=: ;;
2795 ,);;
2796 *)
2797 if test "x$ac_old_val" != "x$ac_new_val"; then
2798 # differences in whitespace do not lead to failure.
2799 ac_old_val_w=`echo x $ac_old_val`
2800 ac_new_val_w=`echo x $ac_new_val`
2801 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2803$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2804 ac_cache_corrupted=:
2805 else
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2807$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2808 eval $ac_var=\$ac_old_val
2809 fi
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2811$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2813$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2814 fi;;
2815 esac
2816 # Pass precious variables to config.status.
2817 if test "$ac_new_set" = set; then
2818 case $ac_new_val in
2819 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2820 *) ac_arg=$ac_var=$ac_new_val ;;
2821 esac
2822 case " $ac_configure_args " in
2823 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2824 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2825 esac
2826 fi
2827done
2828if $ac_cache_corrupted; then
2829 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2832$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2833 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2834fi
2835## -------------------- ##
2836## Main body of script. ##
2837## -------------------- ##
2838
2839ac_ext=c
2840ac_cpp='$CPP $CPPFLAGS'
2841ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2842ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2843ac_compiler_gnu=$ac_cv_c_compiler_gnu
2844
2845
2846
2847
2848
2849ac_config_headers="$ac_config_headers config.h:config.in"
2850
2851
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2853$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2854 # Check whether --enable-maintainer-mode was given.
2855if test "${enable_maintainer_mode+set}" = set; then :
2856 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2857else
2858 USE_MAINTAINER_MODE=no
2859fi
2860
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2862$as_echo "$USE_MAINTAINER_MODE" >&6; }
2863 if test $USE_MAINTAINER_MODE = yes; then
2864 MAINTAINER_MODE_TRUE=
2865 MAINTAINER_MODE_FALSE='#'
2866else
2867 MAINTAINER_MODE_TRUE='#'
2868 MAINTAINER_MODE_FALSE=
2869fi
2870
2871 MAINT=$MAINTAINER_MODE_TRUE
2872
2873
2874
2875ac_ext=c
2876ac_cpp='$CPP $CPPFLAGS'
2877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2879ac_compiler_gnu=$ac_cv_c_compiler_gnu
2880if test -n "$ac_tool_prefix"; then
2881 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2882set dummy ${ac_tool_prefix}gcc; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
2885if test "${ac_cv_prog_CC+set}" = set; then :
2886 $as_echo_n "(cached) " >&6
c906108c
SS
2887else
2888 if test -n "$CC"; then
2889 ac_cv_prog_CC="$CC" # Let the user override the test.
2890else
bec39cab
AC
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2898 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2900 break 2
2901 fi
2902done
81ecdfbb
RW
2903 done
2904IFS=$as_save_IFS
bec39cab 2905
c906108c
SS
2906fi
2907fi
bec39cab 2908CC=$ac_cv_prog_CC
c906108c 2909if test -n "$CC"; then
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
c906108c 2912else
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
c906108c
SS
2915fi
2916
81ecdfbb 2917
b4e70030
JB
2918fi
2919if test -z "$ac_cv_prog_CC"; then
2920 ac_ct_CC=$CC
81ecdfbb
RW
2921 # Extract the first word of "gcc", so it can be a program name with args.
2922set dummy gcc; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
2925if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2926 $as_echo_n "(cached) " >&6
b4e70030
JB
2927else
2928 if test -n "$ac_ct_CC"; then
2929 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2930else
2931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2932for as_dir in $PATH
2933do
2934 IFS=$as_save_IFS
2935 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2936 for ac_exec_ext in '' $ac_executable_extensions; do
2937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2938 ac_cv_prog_ac_ct_CC="gcc"
2939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2940 break 2
4e8d927d 2941 fi
b4e70030 2942done
81ecdfbb
RW
2943 done
2944IFS=$as_save_IFS
b4e70030
JB
2945
2946fi
2947fi
2948ac_ct_CC=$ac_cv_prog_ac_ct_CC
2949if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2951$as_echo "$ac_ct_CC" >&6; }
b4e70030 2952else
81ecdfbb
RW
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2954$as_echo "no" >&6; }
b4e70030
JB
2955fi
2956
81ecdfbb
RW
2957 if test "x$ac_ct_CC" = x; then
2958 CC=""
2959 else
2960 case $cross_compiling:$ac_tool_warned in
2961yes:)
2962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2964ac_tool_warned=yes ;;
2965esac
2966 CC=$ac_ct_CC
2967 fi
b4e70030
JB
2968else
2969 CC="$ac_cv_prog_CC"
2970fi
2971
c906108c 2972if test -z "$CC"; then
81ecdfbb
RW
2973 if test -n "$ac_tool_prefix"; then
2974 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2975set dummy ${ac_tool_prefix}cc; ac_word=$2
2976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2977$as_echo_n "checking for $ac_word... " >&6; }
2978if test "${ac_cv_prog_CC+set}" = set; then :
2979 $as_echo_n "(cached) " >&6
c906108c
SS
2980else
2981 if test -n "$CC"; then
2982 ac_cv_prog_CC="$CC" # Let the user override the test.
2983else
bec39cab
AC
2984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2985for as_dir in $PATH
2986do
2987 IFS=$as_save_IFS
2988 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2989 for ac_exec_ext in '' $ac_executable_extensions; do
2990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2991 ac_cv_prog_CC="${ac_tool_prefix}cc"
2992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2993 break 2
2994 fi
2995done
81ecdfbb
RW
2996 done
2997IFS=$as_save_IFS
2998
2999fi
3000fi
3001CC=$ac_cv_prog_CC
3002if test -n "$CC"; then
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3004$as_echo "$CC" >&6; }
3005else
3006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3007$as_echo "no" >&6; }
3008fi
3009
3010
3011 fi
3012fi
3013if test -z "$CC"; then
3014 # Extract the first word of "cc", so it can be a program name with args.
3015set dummy cc; ac_word=$2
3016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3017$as_echo_n "checking for $ac_word... " >&6; }
3018if test "${ac_cv_prog_CC+set}" = set; then :
3019 $as_echo_n "(cached) " >&6
3020else
3021 if test -n "$CC"; then
3022 ac_cv_prog_CC="$CC" # Let the user override the test.
3023else
3024 ac_prog_rejected=no
3025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3026for as_dir in $PATH
3027do
3028 IFS=$as_save_IFS
3029 test -z "$as_dir" && as_dir=.
3030 for ac_exec_ext in '' $ac_executable_extensions; do
3031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3032 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3033 ac_prog_rejected=yes
3034 continue
3035 fi
3036 ac_cv_prog_CC="cc"
3037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3038 break 2
3039 fi
3040done
3041 done
3042IFS=$as_save_IFS
bec39cab 3043
c906108c
SS
3044if test $ac_prog_rejected = yes; then
3045 # We found a bogon in the path, so make sure we never use it.
3046 set dummy $ac_cv_prog_CC
3047 shift
bec39cab 3048 if test $# != 0; then
c906108c
SS
3049 # We chose a different compiler from the bogus one.
3050 # However, it has the same basename, so the bogon will be chosen
3051 # first if we set CC to just the basename; use the full file name.
3052 shift
bec39cab 3053 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3054 fi
3055fi
3056fi
3057fi
bec39cab 3058CC=$ac_cv_prog_CC
c906108c 3059if test -n "$CC"; then
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3061$as_echo "$CC" >&6; }
c906108c 3062else
81ecdfbb
RW
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
c906108c
SS
3065fi
3066
81ecdfbb 3067
bec39cab
AC
3068fi
3069if test -z "$CC"; then
3070 if test -n "$ac_tool_prefix"; then
81ecdfbb 3071 for ac_prog in cl.exe
bec39cab
AC
3072 do
3073 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3074set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3076$as_echo_n "checking for $ac_word... " >&6; }
3077if test "${ac_cv_prog_CC+set}" = set; then :
3078 $as_echo_n "(cached) " >&6
c906108c
SS
3079else
3080 if test -n "$CC"; then
3081 ac_cv_prog_CC="$CC" # Let the user override the test.
3082else
bec39cab
AC
3083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084for as_dir in $PATH
3085do
3086 IFS=$as_save_IFS
3087 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3088 for ac_exec_ext in '' $ac_executable_extensions; do
3089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3090 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3092 break 2
3093 fi
3094done
81ecdfbb
RW
3095 done
3096IFS=$as_save_IFS
bec39cab 3097
c906108c
SS
3098fi
3099fi
bec39cab 3100CC=$ac_cv_prog_CC
c906108c 3101if test -n "$CC"; then
81ecdfbb
RW
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3103$as_echo "$CC" >&6; }
c906108c 3104else
81ecdfbb
RW
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
c906108c 3107fi
bec39cab 3108
81ecdfbb 3109
bec39cab
AC
3110 test -n "$CC" && break
3111 done
3112fi
3113if test -z "$CC"; then
3114 ac_ct_CC=$CC
81ecdfbb 3115 for ac_prog in cl.exe
bec39cab
AC
3116do
3117 # Extract the first word of "$ac_prog", so it can be a program name with args.
3118set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3120$as_echo_n "checking for $ac_word... " >&6; }
3121if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3122 $as_echo_n "(cached) " >&6
bec39cab
AC
3123else
3124 if test -n "$ac_ct_CC"; then
3125 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3126else
3127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128for as_dir in $PATH
3129do
3130 IFS=$as_save_IFS
3131 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3132 for ac_exec_ext in '' $ac_executable_extensions; do
3133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3134 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3136 break 2
c906108c 3137 fi
bec39cab 3138done
81ecdfbb
RW
3139 done
3140IFS=$as_save_IFS
bec39cab
AC
3141
3142fi
3143fi
3144ac_ct_CC=$ac_cv_prog_ac_ct_CC
3145if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3147$as_echo "$ac_ct_CC" >&6; }
bec39cab 3148else
81ecdfbb
RW
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3150$as_echo "no" >&6; }
c906108c
SS
3151fi
3152
81ecdfbb 3153
bec39cab
AC
3154 test -n "$ac_ct_CC" && break
3155done
c906108c 3156
81ecdfbb
RW
3157 if test "x$ac_ct_CC" = x; then
3158 CC=""
3159 else
3160 case $cross_compiling:$ac_tool_warned in
3161yes:)
3162{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3163$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3164ac_tool_warned=yes ;;
3165esac
3166 CC=$ac_ct_CC
3167 fi
bec39cab
AC
3168fi
3169
3170fi
3171
3172
81ecdfbb
RW
3173test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3175as_fn_error "no acceptable C compiler found in \$PATH
3176See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3177
3178# Provide some information about the compiler.
81ecdfbb
RW
3179$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3180set X $ac_compile
3181ac_compiler=$2
3182for ac_option in --version -v -V -qversion; do
3183 { { ac_try="$ac_compiler $ac_option >&5"
3184case "(($ac_try" in
3185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186 *) ac_try_echo=$ac_try;;
3187esac
3188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3189$as_echo "$ac_try_echo"; } >&5
3190 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3191 ac_status=$?
81ecdfbb
RW
3192 if test -s conftest.err; then
3193 sed '10a\
3194... rest of stderr output deleted ...
3195 10q' conftest.err >conftest.er1
3196 cat conftest.er1 >&5
3197 rm -f conftest.er1 conftest.err
3198 fi
3199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200 test $ac_status = 0; }
3201done
bec39cab 3202
81ecdfbb 3203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3204/* end confdefs.h. */
3205
3206int
3207main ()
3208{
3209
3210 ;
3211 return 0;
3212}
3213_ACEOF
3214ac_clean_files_save=$ac_clean_files
81ecdfbb 3215ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3216# Try to create an executable without -o first, disregard a.out.
3217# It will help us diagnose broken compilers, and finding out an intuition
3218# of exeext.
81ecdfbb
RW
3219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3220$as_echo_n "checking for C compiler default output file name... " >&6; }
3221ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3222
3223# The possible output files:
3224ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3225
3226ac_rmfiles=
3227for ac_file in $ac_files
3228do
3229 case $ac_file in
3230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3231 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3232 esac
3233done
3234rm -f $ac_rmfiles
3235
3236if { { ac_try="$ac_link_default"
3237case "(($ac_try" in
3238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3239 *) ac_try_echo=$ac_try;;
3240esac
3241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3242$as_echo "$ac_try_echo"; } >&5
3243 (eval "$ac_link_default") 2>&5
3244 ac_status=$?
3245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3246 test $ac_status = 0; }; then :
3247 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3248# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3249# in a Makefile. We should not override ac_cv_exeext if it was cached,
3250# so that the user can short-circuit this test for compilers unknown to
3251# Autoconf.
3252for ac_file in $ac_files ''
bec39cab
AC
3253do
3254 test -f "$ac_file" || continue
3255 case $ac_file in
81ecdfbb 3256 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3257 ;;
3258 [ab].out )
3259 # We found the default executable, but exeext='' is most
3260 # certainly right.
3261 break;;
3262 *.* )
81ecdfbb
RW
3263 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3264 then :; else
3265 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3266 fi
3267 # We set ac_cv_exeext here because the later test for it is not
3268 # safe: cross compilers may not add the suffix if given an `-o'
3269 # argument, so we may need to know it at that point already.
3270 # Even if this section looks crufty: it has the advantage of
3271 # actually working.
b4e70030
JB
3272 break;;
3273 * )
3274 break;;
bec39cab
AC
3275 esac
3276done
81ecdfbb
RW
3277test "$ac_cv_exeext" = no && ac_cv_exeext=
3278
bec39cab 3279else
81ecdfbb
RW
3280 ac_file=''
3281fi
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3283$as_echo "$ac_file" >&6; }
3284if test -z "$ac_file"; then :
3285 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3286sed 's/^/| /' conftest.$ac_ext >&5
3287
81ecdfbb
RW
3288{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290{ as_fn_set_status 77
3291as_fn_error "C compiler cannot create executables
3292See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3293fi
b4e70030 3294ac_exeext=$ac_cv_exeext
b4e70030 3295
81ecdfbb 3296# Check that the compiler produces executables we can run. If not, either
bec39cab 3297# the compiler is broken, or we cross compile.
81ecdfbb
RW
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3299$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3300# If not cross compiling, check that we can run a simple program.
3301if test "$cross_compiling" != yes; then
3302 if { ac_try='./$ac_file'
81ecdfbb
RW
3303 { { case "(($ac_try" in
3304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3305 *) ac_try_echo=$ac_try;;
3306esac
3307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3308$as_echo "$ac_try_echo"; } >&5
3309 (eval "$ac_try") 2>&5
bec39cab 3310 ac_status=$?
81ecdfbb
RW
3311 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3312 test $ac_status = 0; }; }; then
bec39cab 3313 cross_compiling=no
c906108c 3314 else
bec39cab
AC
3315 if test "$cross_compiling" = maybe; then
3316 cross_compiling=yes
3317 else
81ecdfbb
RW
3318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3320as_fn_error "cannot run C compiled programs.
bec39cab 3321If you meant to cross compile, use \`--host'.
81ecdfbb 3322See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3323 fi
c906108c 3324 fi
bec39cab 3325fi
81ecdfbb
RW
3326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3327$as_echo "yes" >&6; }
bec39cab 3328
81ecdfbb 3329rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3330ac_clean_files=$ac_clean_files_save
81ecdfbb 3331# Check that the compiler produces executables we can run. If not, either
b4e70030 3332# the compiler is broken, or we cross compile.
81ecdfbb
RW
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3334$as_echo_n "checking whether we are cross compiling... " >&6; }
3335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3336$as_echo "$cross_compiling" >&6; }
3337
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3339$as_echo_n "checking for suffix of executables... " >&6; }
3340if { { ac_try="$ac_link"
3341case "(($ac_try" in
3342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3343 *) ac_try_echo=$ac_try;;
3344esac
3345eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3346$as_echo "$ac_try_echo"; } >&5
3347 (eval "$ac_link") 2>&5
bec39cab 3348 ac_status=$?
81ecdfbb
RW
3349 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3350 test $ac_status = 0; }; then :
b4e70030
JB
3351 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3352# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3353# work properly (i.e., refer to `conftest.exe'), while it won't with
3354# `rm'.
3355for ac_file in conftest.exe conftest conftest.*; do
3356 test -f "$ac_file" || continue
3357 case $ac_file in
81ecdfbb 3358 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3359 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3360 break;;
3361 * ) break;;
3362 esac
3363done
c906108c 3364else
81ecdfbb
RW
3365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3367as_fn_error "cannot compute suffix of executables: cannot compile and link
3368See \`config.log' for more details." "$LINENO" 5; }
c906108c 3369fi
b4e70030 3370rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3372$as_echo "$ac_cv_exeext" >&6; }
c906108c 3373
b4e70030 3374rm -f conftest.$ac_ext
bec39cab
AC
3375EXEEXT=$ac_cv_exeext
3376ac_exeext=$EXEEXT
81ecdfbb
RW
3377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3378$as_echo_n "checking for suffix of object files... " >&6; }
3379if test "${ac_cv_objext+set}" = set; then :
3380 $as_echo_n "(cached) " >&6
bec39cab 3381else
81ecdfbb 3382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3383/* end confdefs.h. */
3384
3385int
3386main ()
3387{
3388
3389 ;
3390 return 0;
3391}
3392_ACEOF
3393rm -f conftest.o conftest.obj
81ecdfbb
RW
3394if { { ac_try="$ac_compile"
3395case "(($ac_try" in
3396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3397 *) ac_try_echo=$ac_try;;
3398esac
3399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3400$as_echo "$ac_try_echo"; } >&5
3401 (eval "$ac_compile") 2>&5
3402 ac_status=$?
3403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3404 test $ac_status = 0; }; then :
3405 for ac_file in conftest.o conftest.obj conftest.*; do
3406 test -f "$ac_file" || continue;
bec39cab 3407 case $ac_file in
81ecdfbb 3408 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3409 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3410 break;;
3411 esac
3412done
c906108c 3413else
81ecdfbb 3414 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3415sed 's/^/| /' conftest.$ac_ext >&5
3416
81ecdfbb
RW
3417{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3419as_fn_error "cannot compute suffix of object files: cannot compile
3420See \`config.log' for more details." "$LINENO" 5; }
c906108c 3421fi
b4e70030 3422rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3423fi
81ecdfbb
RW
3424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3425$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3426OBJEXT=$ac_cv_objext
3427ac_objext=$OBJEXT
81ecdfbb
RW
3428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3429$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3430if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3431 $as_echo_n "(cached) " >&6
c906108c 3432else
81ecdfbb 3433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3434/* end confdefs.h. */
3435
3436int
3437main ()
3438{
3439#ifndef __GNUC__
3440 choke me
3441#endif
3442
3443 ;
3444 return 0;
3445}
3446_ACEOF
81ecdfbb 3447if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3448 ac_compiler_gnu=yes
3449else
81ecdfbb 3450 ac_compiler_gnu=no
bec39cab 3451fi
81ecdfbb 3452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3453ac_cv_c_compiler_gnu=$ac_compiler_gnu
3454
3455fi
81ecdfbb
RW
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3457$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3458if test $ac_compiler_gnu = yes; then
3459 GCC=yes
3460else
3461 GCC=
3462fi
bec39cab
AC
3463ac_test_CFLAGS=${CFLAGS+set}
3464ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3466$as_echo_n "checking whether $CC accepts -g... " >&6; }
3467if test "${ac_cv_prog_cc_g+set}" = set; then :
3468 $as_echo_n "(cached) " >&6
bec39cab 3469else
81ecdfbb
RW
3470 ac_save_c_werror_flag=$ac_c_werror_flag
3471 ac_c_werror_flag=yes
3472 ac_cv_prog_cc_g=no
3473 CFLAGS="-g"
3474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3475/* end confdefs.h. */
3476
3477int
3478main ()
3479{
3480
3481 ;
3482 return 0;
3483}
3484_ACEOF
81ecdfbb 3485if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3486 ac_cv_prog_cc_g=yes
3487else
81ecdfbb
RW
3488 CFLAGS=""
3489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3490/* end confdefs.h. */
3491
3492int
3493main ()
3494{
3495
3496 ;
3497 return 0;
3498}
3499_ACEOF
3500if ac_fn_c_try_compile "$LINENO"; then :
3501
3502else
3503 ac_c_werror_flag=$ac_save_c_werror_flag
3504 CFLAGS="-g"
3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506/* end confdefs.h. */
3507
3508int
3509main ()
3510{
c906108c 3511
81ecdfbb
RW
3512 ;
3513 return 0;
3514}
3515_ACEOF
3516if ac_fn_c_try_compile "$LINENO"; then :
3517 ac_cv_prog_cc_g=yes
3518fi
3519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3520fi
3521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3522fi
81ecdfbb
RW
3523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3524 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3525fi
81ecdfbb
RW
3526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3527$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3528if test "$ac_test_CFLAGS" = set; then
bec39cab 3529 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3530elif test $ac_cv_prog_cc_g = yes; then
3531 if test "$GCC" = yes; then
3532 CFLAGS="-g -O2"
3533 else
3534 CFLAGS="-g"
3535 fi
3536else
3537 if test "$GCC" = yes; then
3538 CFLAGS="-O2"
3539 else
3540 CFLAGS=
3541 fi
3542fi
81ecdfbb
RW
3543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3544$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3545if test "${ac_cv_prog_cc_c89+set}" = set; then :
3546 $as_echo_n "(cached) " >&6
bec39cab 3547else
81ecdfbb 3548 ac_cv_prog_cc_c89=no
bec39cab 3549ac_save_CC=$CC
81ecdfbb 3550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3551/* end confdefs.h. */
c906108c
SS
3552#include <stdarg.h>
3553#include <stdio.h>
3554#include <sys/types.h>
3555#include <sys/stat.h>
3556/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3557struct buf { int x; };
3558FILE * (*rcsopen) (struct buf *, struct stat *, int);
3559static char *e (p, i)
3560 char **p;
3561 int i;
3562{
3563 return p[i];
3564}
3565static char *f (char * (*g) (char **, int), char **p, ...)
3566{
3567 char *s;
3568 va_list v;
3569 va_start (v,p);
3570 s = g (p, va_arg (v,int));
3571 va_end (v);
3572 return s;
3573}
bec39cab
AC
3574
3575/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3576 function prototypes and stuff, but not '\xHH' hex character constants.
3577 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3578 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3579 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3580 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3581 that's true only with -std. */
bec39cab
AC
3582int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3583
81ecdfbb
RW
3584/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3585 inside strings and character constants. */
3586#define FOO(x) 'x'
3587int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3588
c906108c
SS
3589int test (int i, double x);
3590struct s1 {int (*f) (int a);};
3591struct s2 {int (*f) (double a);};
3592int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3593int argc;
3594char **argv;
bec39cab
AC
3595int
3596main ()
3597{
c906108c 3598return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3599 ;
3600 return 0;
3601}
3602_ACEOF
81ecdfbb
RW
3603for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3604 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3605do
3606 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3607 if ac_fn_c_try_compile "$LINENO"; then :
3608 ac_cv_prog_cc_c89=$ac_arg
c906108c 3609fi
81ecdfbb
RW
3610rm -f core conftest.err conftest.$ac_objext
3611 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3612done
81ecdfbb 3613rm -f conftest.$ac_ext
bec39cab 3614CC=$ac_save_CC
c906108c
SS
3615
3616fi
81ecdfbb
RW
3617# AC_CACHE_VAL
3618case "x$ac_cv_prog_cc_c89" in
3619 x)
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3621$as_echo "none needed" >&6; } ;;
3622 xno)
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3624$as_echo "unsupported" >&6; } ;;
bec39cab 3625 *)
81ecdfbb
RW
3626 CC="$CC $ac_cv_prog_cc_c89"
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3628$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3629esac
81ecdfbb 3630if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3631
b4e70030
JB
3632fi
3633
bec39cab
AC
3634ac_ext=c
3635ac_cpp='$CPP $CPPFLAGS'
3636ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3637ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3638ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3639
f434ba03
PA
3640ac_aux_dir=
3641for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3642 for ac_t in install-sh install.sh shtool; do
3643 if test -f "$ac_dir/$ac_t"; then
3644 ac_aux_dir=$ac_dir
3645 ac_install_sh="$ac_aux_dir/$ac_t -c"
3646 break 2
3647 fi
3648 done
3649done
3650if test -z "$ac_aux_dir"; then
3651 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3652fi
3653
3654# These three variables are undocumented and unsupported,
3655# and are intended to be withdrawn in a future Autoconf release.
3656# They can cause serious problems if a builder's source tree is in a directory
3657# whose full name contains unusual characters.
3658ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3659ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3660ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3661
3662
3663# Make sure we can run config.sub.
3664$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3665 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3666
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3668$as_echo_n "checking build system type... " >&6; }
3669if test "${ac_cv_build+set}" = set; then :
3670 $as_echo_n "(cached) " >&6
3671else
3672 ac_build_alias=$build_alias
3673test "x$ac_build_alias" = x &&
3674 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3675test "x$ac_build_alias" = x &&
3676 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3677ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3678 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3679
3680fi
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3682$as_echo "$ac_cv_build" >&6; }
3683case $ac_cv_build in
3684*-*-*) ;;
3685*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3686esac
3687build=$ac_cv_build
3688ac_save_IFS=$IFS; IFS='-'
3689set x $ac_cv_build
3690shift
3691build_cpu=$1
3692build_vendor=$2
3693shift; shift
3694# Remember, the first character of IFS is used to create $*,
3695# except with old shells:
3696build_os=$*
3697IFS=$ac_save_IFS
3698case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3699
3700
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3702$as_echo_n "checking host system type... " >&6; }
3703if test "${ac_cv_host+set}" = set; then :
3704 $as_echo_n "(cached) " >&6
3705else
3706 if test "x$host_alias" = x; then
3707 ac_cv_host=$ac_cv_build
3708else
3709 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3710 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3711fi
3712
3713fi
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3715$as_echo "$ac_cv_host" >&6; }
3716case $ac_cv_host in
3717*-*-*) ;;
3718*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3719esac
3720host=$ac_cv_host
3721ac_save_IFS=$IFS; IFS='-'
3722set x $ac_cv_host
3723shift
3724host_cpu=$1
3725host_vendor=$2
3726shift; shift
3727# Remember, the first character of IFS is used to create $*,
3728# except with old shells:
3729host_os=$*
3730IFS=$ac_save_IFS
3731case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3732
3733
60ca704f 3734
bec39cab
AC
3735ac_ext=c
3736ac_cpp='$CPP $CPPFLAGS'
3737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3739ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3741$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3742# On Suns, sometimes $CPP names a directory.
3743if test -n "$CPP" && test -d "$CPP"; then
3744 CPP=
8bb2c122 3745fi
bec39cab 3746if test -z "$CPP"; then
81ecdfbb
RW
3747 if test "${ac_cv_prog_CPP+set}" = set; then :
3748 $as_echo_n "(cached) " >&6
bec39cab
AC
3749else
3750 # Double quotes because CPP needs to be expanded
3751 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3752 do
3753 ac_preproc_ok=false
3754for ac_c_preproc_warn_flag in '' yes
3755do
3756 # Use a header file that comes with gcc, so configuring glibc
3757 # with a fresh cross-compiler works.
3758 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3759 # <limits.h> exists even on freestanding compilers.
3760 # On the NeXT, cc -E runs the code through the compiler's parser,
3761 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3763/* end confdefs.h. */
3764#ifdef __STDC__
3765# include <limits.h>
3766#else
3767# include <assert.h>
3768#endif
3769 Syntax error
3770_ACEOF
81ecdfbb 3771if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3772
81ecdfbb 3773else
bec39cab
AC
3774 # Broken: fails on valid input.
3775continue
3776fi
3777rm -f conftest.err conftest.$ac_ext
3778
81ecdfbb 3779 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3780 # can be detected and how.
81ecdfbb 3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3782/* end confdefs.h. */
3783#include <ac_nonexistent.h>
3784_ACEOF
81ecdfbb 3785if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3786 # Broken: success on invalid input.
3787continue
8bb2c122 3788else
bec39cab
AC
3789 # Passes both tests.
3790ac_preproc_ok=:
3791break
8bb2c122 3792fi
bec39cab 3793rm -f conftest.err conftest.$ac_ext
8bb2c122 3794
bec39cab
AC
3795done
3796# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3797rm -f conftest.err conftest.$ac_ext
81ecdfbb 3798if $ac_preproc_ok; then :
bec39cab
AC
3799 break
3800fi
8bb2c122 3801
bec39cab
AC
3802 done
3803 ac_cv_prog_CPP=$CPP
ddc9cd0f 3804
c906108c 3805fi
bec39cab
AC
3806 CPP=$ac_cv_prog_CPP
3807else
3808 ac_cv_prog_CPP=$CPP
c906108c 3809fi
81ecdfbb
RW
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3811$as_echo "$CPP" >&6; }
bec39cab
AC
3812ac_preproc_ok=false
3813for ac_c_preproc_warn_flag in '' yes
3814do
3815 # Use a header file that comes with gcc, so configuring glibc
3816 # with a fresh cross-compiler works.
3817 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3818 # <limits.h> exists even on freestanding compilers.
3819 # On the NeXT, cc -E runs the code through the compiler's parser,
3820 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3822/* end confdefs.h. */
3823#ifdef __STDC__
3824# include <limits.h>
3825#else
3826# include <assert.h>
3827#endif
3828 Syntax error
3829_ACEOF
81ecdfbb 3830if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3831
81ecdfbb 3832else
bec39cab
AC
3833 # Broken: fails on valid input.
3834continue
3835fi
3836rm -f conftest.err conftest.$ac_ext
3837
81ecdfbb 3838 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3839 # can be detected and how.
81ecdfbb 3840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3841/* end confdefs.h. */
3842#include <ac_nonexistent.h>
3843_ACEOF
81ecdfbb 3844if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3845 # Broken: success on invalid input.
3846continue
c906108c 3847else
bec39cab
AC
3848 # Passes both tests.
3849ac_preproc_ok=:
3850break
c906108c 3851fi
bec39cab 3852rm -f conftest.err conftest.$ac_ext
c906108c 3853
bec39cab
AC
3854done
3855# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3856rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3857if $ac_preproc_ok; then :
3858
c906108c 3859else
81ecdfbb
RW
3860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3862as_fn_error "C preprocessor \"$CPP\" fails sanity check
3863See \`config.log' for more details." "$LINENO" 5; }
c906108c 3864fi
c906108c 3865
bec39cab
AC
3866ac_ext=c
3867ac_cpp='$CPP $CPPFLAGS'
3868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3870ac_compiler_gnu=$ac_cv_c_compiler_gnu
3871
3872
81ecdfbb
RW
3873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3874$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3875if test "${ac_cv_path_GREP+set}" = set; then :
3876 $as_echo_n "(cached) " >&6
4e8d927d 3877else
81ecdfbb
RW
3878 if test -z "$GREP"; then
3879 ac_path_GREP_found=false
3880 # Loop through the user's path and test for each of PROGNAME-LIST
3881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3883do
3884 IFS=$as_save_IFS
3885 test -z "$as_dir" && as_dir=.
3886 for ac_prog in grep ggrep; do
3887 for ac_exec_ext in '' $ac_executable_extensions; do
3888 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3889 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3890# Check for GNU ac_path_GREP and select it if it is found.
3891 # Check for GNU $ac_path_GREP
3892case `"$ac_path_GREP" --version 2>&1` in
3893*GNU*)
3894 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3895*)
3896 ac_count=0
3897 $as_echo_n 0123456789 >"conftest.in"
3898 while :
3899 do
3900 cat "conftest.in" "conftest.in" >"conftest.tmp"
3901 mv "conftest.tmp" "conftest.in"
3902 cp "conftest.in" "conftest.nl"
3903 $as_echo 'GREP' >> "conftest.nl"
3904 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3905 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3906 as_fn_arith $ac_count + 1 && ac_count=$as_val
3907 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3908 # Best one so far, save it but keep looking for a better one
3909 ac_cv_path_GREP="$ac_path_GREP"
3910 ac_path_GREP_max=$ac_count
bec39cab 3911 fi
81ecdfbb
RW
3912 # 10*(2^10) chars as input seems more than enough
3913 test $ac_count -gt 10 && break
3914 done
3915 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3916esac
bec39cab 3917
81ecdfbb
RW
3918 $ac_path_GREP_found && break 3
3919 done
3920 done
3921 done
3922IFS=$as_save_IFS
3923 if test -z "$ac_cv_path_GREP"; then
3924 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3925 fi
c906108c 3926else
81ecdfbb 3927 ac_cv_path_GREP=$GREP
c906108c 3928fi
c906108c 3929
81ecdfbb
RW
3930fi
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3932$as_echo "$ac_cv_path_GREP" >&6; }
3933 GREP="$ac_cv_path_GREP"
c906108c 3934
c906108c 3935
81ecdfbb
RW
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3937$as_echo_n "checking for egrep... " >&6; }
3938if test "${ac_cv_path_EGREP+set}" = set; then :
3939 $as_echo_n "(cached) " >&6
783e057b 3940else
81ecdfbb
RW
3941 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3942 then ac_cv_path_EGREP="$GREP -E"
3943 else
3944 if test -z "$EGREP"; then
3945 ac_path_EGREP_found=false
3946 # Loop through the user's path and test for each of PROGNAME-LIST
3947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3948for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3949do
3950 IFS=$as_save_IFS
3951 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3952 for ac_prog in egrep; do
3953 for ac_exec_ext in '' $ac_executable_extensions; do
3954 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3955 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3956# Check for GNU ac_path_EGREP and select it if it is found.
3957 # Check for GNU $ac_path_EGREP
3958case `"$ac_path_EGREP" --version 2>&1` in
3959*GNU*)
3960 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3961*)
3962 ac_count=0
3963 $as_echo_n 0123456789 >"conftest.in"
3964 while :
3965 do
3966 cat "conftest.in" "conftest.in" >"conftest.tmp"
3967 mv "conftest.tmp" "conftest.in"
3968 cp "conftest.in" "conftest.nl"
3969 $as_echo 'EGREP' >> "conftest.nl"
3970 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3971 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3972 as_fn_arith $ac_count + 1 && ac_count=$as_val
3973 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3974 # Best one so far, save it but keep looking for a better one
3975 ac_cv_path_EGREP="$ac_path_EGREP"
3976 ac_path_EGREP_max=$ac_count
3977 fi
3978 # 10*(2^10) chars as input seems more than enough
3979 test $ac_count -gt 10 && break
3980 done
3981 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3982esac
bec39cab 3983
81ecdfbb
RW
3984 $ac_path_EGREP_found && break 3
3985 done
3986 done
3987 done
3988IFS=$as_save_IFS
3989 if test -z "$ac_cv_path_EGREP"; then
3990 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3991 fi
783e057b 3992else
81ecdfbb 3993 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3994fi
3995
81ecdfbb 3996 fi
783e057b 3997fi
81ecdfbb
RW
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3999$as_echo "$ac_cv_path_EGREP" >&6; }
4000 EGREP="$ac_cv_path_EGREP"
4001
783e057b 4002
81ecdfbb
RW
4003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4004$as_echo_n "checking for ANSI C header files... " >&6; }
4005if test "${ac_cv_header_stdc+set}" = set; then :
4006 $as_echo_n "(cached) " >&6
783e057b 4007else
81ecdfbb 4008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4009/* end confdefs.h. */
783e057b 4010#include <stdlib.h>
bec39cab 4011#include <stdarg.h>
783e057b
DJ
4012#include <string.h>
4013#include <float.h>
c906108c 4014
bec39cab
AC
4015int
4016main ()
4017{
c906108c 4018
bec39cab
AC
4019 ;
4020 return 0;
4021}
4022_ACEOF
81ecdfbb 4023if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4024 ac_cv_header_stdc=yes
c906108c 4025else
81ecdfbb 4026 ac_cv_header_stdc=no
c906108c 4027fi
81ecdfbb 4028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4029
783e057b
DJ
4030if test $ac_cv_header_stdc = yes; then
4031 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4033/* end confdefs.h. */
4034#include <string.h>
c906108c 4035
783e057b
DJ
4036_ACEOF
4037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4038 $EGREP "memchr" >/dev/null 2>&1; then :
4039
c906108c 4040else
783e057b 4041 ac_cv_header_stdc=no
c906108c 4042fi
783e057b 4043rm -f conftest*
c906108c
SS
4044
4045fi
4046
783e057b
DJ
4047if test $ac_cv_header_stdc = yes; then
4048 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4050/* end confdefs.h. */
4051#include <stdlib.h>
bec39cab 4052
783e057b
DJ
4053_ACEOF
4054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4055 $EGREP "free" >/dev/null 2>&1; then :
4056
bec39cab 4057else
783e057b 4058 ac_cv_header_stdc=no
bec39cab 4059fi
783e057b 4060rm -f conftest*
bec39cab
AC
4061
4062fi
bec39cab 4063
783e057b
DJ
4064if test $ac_cv_header_stdc = yes; then
4065 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4066 if test "$cross_compiling" = yes; then :
783e057b 4067 :
bec39cab 4068else
81ecdfbb 4069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4070/* end confdefs.h. */
4071#include <ctype.h>
81ecdfbb 4072#include <stdlib.h>
783e057b
DJ
4073#if ((' ' & 0x0FF) == 0x020)
4074# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4075# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4076#else
4077# define ISLOWER(c) \
4078 (('a' <= (c) && (c) <= 'i') \
4079 || ('j' <= (c) && (c) <= 'r') \
4080 || ('s' <= (c) && (c) <= 'z'))
4081# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4082#endif
4083
4084#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4085int
4086main ()
4087{
4088 int i;
4089 for (i = 0; i < 256; i++)
4090 if (XOR (islower (i), ISLOWER (i))
4091 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4092 return 2;
4093 return 0;
783e057b
DJ
4094}
4095_ACEOF
81ecdfbb 4096if ac_fn_c_try_run "$LINENO"; then :
783e057b 4097
81ecdfbb
RW
4098else
4099 ac_cv_header_stdc=no
783e057b 4100fi
81ecdfbb
RW
4101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4102 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4103fi
81ecdfbb 4104
783e057b
DJ
4105fi
4106fi
81ecdfbb
RW
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4108$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4109if test $ac_cv_header_stdc = yes; then
4110
81ecdfbb 4111$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4112
4113fi
4114
4115# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4116for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4117 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4118do :
4119 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4120ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4121"
4122eval as_val=\$$as_ac_Header
4123 if test "x$as_val" = x""yes; then :
783e057b 4124 cat >>confdefs.h <<_ACEOF
81ecdfbb 4125#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4126_ACEOF
4127
4128fi
4129
4130done
4131
4132
4133
f434ba03
PA
4134
4135
81ecdfbb
RW
4136 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4137if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4138 MINIX=yes
4139else
4140 MINIX=
4141fi
4142
4143
4144 if test "$MINIX" = yes; then
4145
81ecdfbb 4146$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4147
4148
81ecdfbb 4149$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4150
4151
81ecdfbb 4152$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4153
4154 fi
4155
f434ba03
PA
4156 case "$host_os" in
4157 hpux*)
4158
4159$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4160
4161 ;;
4162 esac
4163
783e057b 4164
81ecdfbb
RW
4165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4166$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4167if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4168 $as_echo_n "(cached) " >&6
783e057b 4169else
81ecdfbb 4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4171/* end confdefs.h. */
4172
f434ba03
PA
4173# define __EXTENSIONS__ 1
4174 $ac_includes_default
783e057b
DJ
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
81ecdfbb 4183if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4184 ac_cv_safe_to_define___extensions__=yes
4185else
81ecdfbb 4186 ac_cv_safe_to_define___extensions__=no
783e057b 4187fi
81ecdfbb 4188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4189fi
81ecdfbb
RW
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4191$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4192 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4193 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4194
81ecdfbb 4195 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4196
81ecdfbb 4197 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4198
81ecdfbb 4199 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4200
81ecdfbb 4201 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4202
4203
81ecdfbb
RW
4204if test -n "$ac_tool_prefix"; then
4205 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4206set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4208$as_echo_n "checking for $ac_word... " >&6; }
4209if test "${ac_cv_prog_RANLIB+set}" = set; then :
4210 $as_echo_n "(cached) " >&6
4211else
4212 if test -n "$RANLIB"; then
4213 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4214else
4215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216for as_dir in $PATH
4217do
4218 IFS=$as_save_IFS
4219 test -z "$as_dir" && as_dir=.
4220 for ac_exec_ext in '' $ac_executable_extensions; do
4221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4222 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4224 break 2
4225 fi
4226done
4227 done
4228IFS=$as_save_IFS
783e057b 4229
81ecdfbb
RW
4230fi
4231fi
4232RANLIB=$ac_cv_prog_RANLIB
4233if test -n "$RANLIB"; then
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4235$as_echo "$RANLIB" >&6; }
4236else
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4238$as_echo "no" >&6; }
4239fi
783e057b
DJ
4240
4241
81ecdfbb
RW
4242fi
4243if test -z "$ac_cv_prog_RANLIB"; then
4244 ac_ct_RANLIB=$RANLIB
4245 # Extract the first word of "ranlib", so it can be a program name with args.
4246set dummy ranlib; ac_word=$2
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4248$as_echo_n "checking for $ac_word... " >&6; }
4249if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4250 $as_echo_n "(cached) " >&6
783e057b 4251else
81ecdfbb
RW
4252 if test -n "$ac_ct_RANLIB"; then
4253 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4254else
4255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4256for as_dir in $PATH
4257do
4258 IFS=$as_save_IFS
4259 test -z "$as_dir" && as_dir=.
4260 for ac_exec_ext in '' $ac_executable_extensions; do
4261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4262 ac_cv_prog_ac_ct_RANLIB="ranlib"
4263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4264 break 2
4265 fi
4266done
4267 done
4268IFS=$as_save_IFS
4269
4270fi
4271fi
4272ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4273if test -n "$ac_ct_RANLIB"; then
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4275$as_echo "$ac_ct_RANLIB" >&6; }
4276else
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278$as_echo "no" >&6; }
4279fi
4280
4281 if test "x$ac_ct_RANLIB" = x; then
4282 RANLIB=":"
4283 else
4284 case $cross_compiling:$ac_tool_warned in
4285yes:)
4286{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4287$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4288ac_tool_warned=yes ;;
4289esac
4290 RANLIB=$ac_ct_RANLIB
4291 fi
4292else
4293 RANLIB="$ac_cv_prog_RANLIB"
4294fi
4295
4296
4297
4298
4299
4300
3388710e
JM
4301
4302
3388710e 4303
f434ba03
PA
4304 # Code from module arg-nonnull:
4305 # Code from module c++defs:
4306 # Code from module extensions:
3388710e 4307
f434ba03 4308 # Code from module include_next:
55a8c076 4309 # Code from module inttypes:
f434ba03
PA
4310 # Code from module memchr:
4311 # Code from module memmem:
4312 # Code from module memmem-simple:
4313 # Code from module multiarch:
4314 # Code from module stddef:
4315 # Code from module stdint:
4316 # Code from module string:
4317 # Code from module warn-on-use:
4318 # Code from module wchar:
3388710e
JM
4319
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4321$as_echo_n "checking target system type... " >&6; }
4322if test "${ac_cv_target+set}" = set; then :
4323 $as_echo_n "(cached) " >&6
4324else
4325 if test "x$target_alias" = x; then
4326 ac_cv_target=$ac_cv_host
4327else
4328 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4329 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4330fi
4331
4332fi
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4334$as_echo "$ac_cv_target" >&6; }
4335case $ac_cv_target in
4336*-*-*) ;;
4337*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4338esac
4339target=$ac_cv_target
4340ac_save_IFS=$IFS; IFS='-'
4341set x $ac_cv_target
4342shift
4343target_cpu=$1
4344target_vendor=$2
4345shift; shift
4346# Remember, the first character of IFS is used to create $*,
4347# except with old shells:
4348target_os=$*
4349IFS=$ac_save_IFS
4350case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4351
4352
4353# The aliases save the names the user supplied, while $host etc.
4354# will get canonicalized.
4355test -n "$target_alias" &&
4356 test "$program_prefix$program_suffix$program_transform_name" = \
4357 NONENONEs,x,x, &&
4358 program_prefix=${target_alias}-
4359
4360# The tests for host and target for $enable_largefile require
4361# canonical names.
4362
4363
81ecdfbb 4364
da2f07f1
JK
4365# As the $enable_largefile decision depends on --enable-plugins we must set it
4366# even in directories otherwise not depending on the $plugins option.
4367
4368
4369# Check whether --enable-plugins was given.
4370if test "${enable_plugins+set}" = set; then :
4371 enableval=$enable_plugins; case "${enableval}" in
4372 yes | "") plugins=yes ;;
4373 no) plugins=no ;;
4374 *) plugins=yes ;;
4375 esac
4376else
4377 plugins=no
4378fi
4379
4380
4381
4382case "${host}" in
4383 sparc-*-solaris*|i[3-7]86-*-solaris*)
4384 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4385 # are mutually exclusive; and without procfs support, the bfd/ elf module
4386 # cannot provide certain routines such as elfcore_write_prpsinfo
4387 # or elfcore_write_prstatus. So unless the user explicitly requested
4388 # large-file support through the --enable-largefile switch, disable
4389 # large-file support in favor of procfs support.
4390 test "${target}" = "${host}" -a "x$plugins" = xno \
4391 && : ${enable_largefile="no"}
4392 ;;
4393esac
4394
4395# Check whether --enable-largefile was given.
4396if test "${enable_largefile+set}" = set; then :
4397 enableval=$enable_largefile;
4398fi
4399
4400if test "$enable_largefile" != no; then
4401
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4403$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4404if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 ac_cv_sys_largefile_CC=no
4408 if test "$GCC" != yes; then
4409 ac_save_CC=$CC
4410 while :; do
4411 # IRIX 6.2 and later do not support large files by default,
4412 # so use the C compiler's -n32 option if that helps.
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h. */
4415#include <sys/types.h>
4416 /* Check that off_t can represent 2**63 - 1 correctly.
4417 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4418 since some C++ compilers masquerading as C compilers
4419 incorrectly reject 9223372036854775807. */
4420#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4421 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4422 && LARGE_OFF_T % 2147483647 == 1)
4423 ? 1 : -1];
4424int
4425main ()
4426{
4427
4428 ;
4429 return 0;
4430}
4431_ACEOF
4432 if ac_fn_c_try_compile "$LINENO"; then :
4433 break
4434fi
4435rm -f core conftest.err conftest.$ac_objext
4436 CC="$CC -n32"
4437 if ac_fn_c_try_compile "$LINENO"; then :
4438 ac_cv_sys_largefile_CC=' -n32'; break
4439fi
4440rm -f core conftest.err conftest.$ac_objext
4441 break
4442 done
4443 CC=$ac_save_CC
4444 rm -f conftest.$ac_ext
4445 fi
4446fi
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4448$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4449 if test "$ac_cv_sys_largefile_CC" != no; then
4450 CC=$CC$ac_cv_sys_largefile_CC
4451 fi
4452
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4454$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4455if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4456 $as_echo_n "(cached) " >&6
4457else
4458 while :; do
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#include <sys/types.h>
4462 /* Check that off_t can represent 2**63 - 1 correctly.
4463 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4464 since some C++ compilers masquerading as C compilers
4465 incorrectly reject 9223372036854775807. */
4466#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4467 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4468 && LARGE_OFF_T % 2147483647 == 1)
4469 ? 1 : -1];
4470int
4471main ()
4472{
4473
4474 ;
4475 return 0;
4476}
4477_ACEOF
4478if ac_fn_c_try_compile "$LINENO"; then :
4479 ac_cv_sys_file_offset_bits=no; break
4480fi
4481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4483/* end confdefs.h. */
4484#define _FILE_OFFSET_BITS 64
4485#include <sys/types.h>
4486 /* Check that off_t can represent 2**63 - 1 correctly.
4487 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4488 since some C++ compilers masquerading as C compilers
4489 incorrectly reject 9223372036854775807. */
4490#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4491 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4492 && LARGE_OFF_T % 2147483647 == 1)
4493 ? 1 : -1];
4494int
4495main ()
4496{
4497
4498 ;
4499 return 0;
4500}
4501_ACEOF
4502if ac_fn_c_try_compile "$LINENO"; then :
4503 ac_cv_sys_file_offset_bits=64; break
4504fi
4505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4506 ac_cv_sys_file_offset_bits=unknown
4507 break
4508done
4509fi
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4511$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4512case $ac_cv_sys_file_offset_bits in #(
4513 no | unknown) ;;
4514 *)
4515cat >>confdefs.h <<_ACEOF
4516#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4517_ACEOF
4518;;
4519esac
4520rm -rf conftest*
4521 if test $ac_cv_sys_file_offset_bits = unknown; then
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4523$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4524if test "${ac_cv_sys_large_files+set}" = set; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 while :; do
4528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529/* end confdefs.h. */
4530#include <sys/types.h>
4531 /* Check that off_t can represent 2**63 - 1 correctly.
4532 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4533 since some C++ compilers masquerading as C compilers
4534 incorrectly reject 9223372036854775807. */
4535#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4536 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4537 && LARGE_OFF_T % 2147483647 == 1)
4538 ? 1 : -1];
4539int
4540main ()
4541{
4542
4543 ;
4544 return 0;
4545}
4546_ACEOF
4547if ac_fn_c_try_compile "$LINENO"; then :
4548 ac_cv_sys_large_files=no; break
4549fi
4550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4552/* end confdefs.h. */
4553#define _LARGE_FILES 1
4554#include <sys/types.h>
4555 /* Check that off_t can represent 2**63 - 1 correctly.
4556 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4557 since some C++ compilers masquerading as C compilers
4558 incorrectly reject 9223372036854775807. */
4559#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4560 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4561 && LARGE_OFF_T % 2147483647 == 1)
4562 ? 1 : -1];
4563int
4564main ()
4565{
4566
4567 ;
4568 return 0;
4569}
4570_ACEOF
4571if ac_fn_c_try_compile "$LINENO"; then :
4572 ac_cv_sys_large_files=1; break
4573fi
4574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575 ac_cv_sys_large_files=unknown
4576 break
4577done
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4580$as_echo "$ac_cv_sys_large_files" >&6; }
4581case $ac_cv_sys_large_files in #(
4582 no | unknown) ;;
4583 *)
4584cat >>confdefs.h <<_ACEOF
4585#define _LARGE_FILES $ac_cv_sys_large_files
4586_ACEOF
4587;;
4588esac
4589rm -rf conftest*
4590 fi
4591fi
4592
4593
4594
81ecdfbb
RW
4595
4596
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4598$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4599if test "${am_cv_prog_cc_stdc+set}" = set; then :
4600 $as_echo_n "(cached) " >&6
4601else
4602 am_cv_prog_cc_stdc=no
4603ac_save_CC="$CC"
4604# Don't try gcc -ansi; that turns off useful extensions and
4605# breaks some systems' header files.
4606# AIX -qlanglvl=ansi
4607# Ultrix and OSF/1 -std1
4608# HP-UX 10.20 and later -Ae
4609# HP-UX older versions -Aa -D_HPUX_SOURCE
4610# SVR4 -Xc -D__EXTENSIONS__
4611for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4612do
783e057b 4613 CC="$ac_save_CC $ac_arg"
81ecdfbb 4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4615/* end confdefs.h. */
4616#include <stdarg.h>
4617#include <stdio.h>
4618#include <sys/types.h>
4619#include <sys/stat.h>
4620/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4621struct buf { int x; };
4622FILE * (*rcsopen) (struct buf *, struct stat *, int);
4623static char *e (p, i)
4624 char **p;
4625 int i;
4626{
4627 return p[i];
4628}
4629static char *f (char * (*g) (char **, int), char **p, ...)
4630{
4631 char *s;
4632 va_list v;
4633 va_start (v,p);
4634 s = g (p, va_arg (v,int));
4635 va_end (v);
4636 return s;
4637}
4638int test (int i, double x);
4639struct s1 {int (*f) (int a);};
4640struct s2 {int (*f) (double a);};
4641int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4642int argc;
4643char **argv;
4644
4645int
4646main ()
4647{
4648
4649return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4650
4651 ;
4652 return 0;
4653}
4654_ACEOF
81ecdfbb 4655if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4656 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4657fi
81ecdfbb 4658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4659done
4660CC="$ac_save_CC"
4661
4662fi
4663
4664if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4666$as_echo "none needed" >&6; }
783e057b 4667else
81ecdfbb
RW
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4669$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4670fi
4671case "x$am_cv_prog_cc_stdc" in
4672 x|xno) ;;
4673 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4674esac
4675
4676
4677ac_aux_dir=
81ecdfbb
RW
4678for ac_dir in .. "$srcdir"/..; do
4679 for ac_t in install-sh install.sh shtool; do
4680 if test -f "$ac_dir/$ac_t"; then
4681 ac_aux_dir=$ac_dir
4682 ac_install_sh="$ac_aux_dir/$ac_t -c"
4683 break 2
4684 fi
4685 done
783e057b
DJ
4686done
4687if test -z "$ac_aux_dir"; then
81ecdfbb 4688 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4689fi
81ecdfbb
RW
4690
4691# These three variables are undocumented and unsupported,
4692# and are intended to be withdrawn in a future Autoconf release.
4693# They can cause serious problems if a builder's source tree is in a directory
4694# whose full name contains unusual characters.
4695ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4696ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4697ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4698
783e057b 4699
783e057b 4700
81ecdfbb 4701
a417dc56
RW
4702# Dependency checking.
4703rm -rf .tst 2>/dev/null
4704mkdir .tst 2>/dev/null
4705if test -d .tst; then
4706 am__leading_dot=.
4707else
4708 am__leading_dot=_
4709fi
4710rmdir .tst 2>/dev/null
4711
4712DEPDIR="${am__leading_dot}deps"
4713
81ecdfbb 4714ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4715
4716
4717depcc="$CC" am_compiler_list=
4718
4719am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4721$as_echo_n "checking dependency style of $depcc... " >&6; }
4722if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4723 $as_echo_n "(cached) " >&6
a417dc56
RW
4724else
4725 if test -f "$am_depcomp"; then
4726 # We make a subdir and do the tests there. Otherwise we can end up
4727 # making bogus files that we don't know about and never remove. For
4728 # instance it was reported that on HP-UX the gcc test will end up
4729 # making a dummy file named `D' -- because `-MD' means `put the output
4730 # in D'.
4731 mkdir conftest.dir
4732 # Copy depcomp to subdir because otherwise we won't find it if we're
4733 # using a relative directory.
4734 cp "$am_depcomp" conftest.dir
4735 cd conftest.dir
4736 # We will build objects and dependencies in a subdirectory because
4737 # it helps to detect inapplicable dependency modes. For instance
4738 # both Tru64's cc and ICC support -MD to output dependencies as a
4739 # side effect of compilation, but ICC will put the dependencies in
4740 # the current directory while Tru64 will put them in the object
4741 # directory.
4742 mkdir sub
4743
4744 am_cv_CC_dependencies_compiler_type=none
4745 if test "$am_compiler_list" = ""; then
4746 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4747 fi
4748 for depmode in $am_compiler_list; do
4749 if test $depmode = none; then break; fi
4750
81ecdfbb 4751 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4752 # Setup a source with many dependencies, because some compilers
4753 # like to wrap large dependency lists on column 80 (with \), and
4754 # we should not choose a depcomp mode which is confused by this.
4755 #
4756 # We need to recreate these files for each test, as the compiler may
4757 # overwrite some of them when testing with obscure command lines.
4758 # This happens at least with the AIX C compiler.
4759 : > sub/conftest.c
4760 for i in 1 2 3 4 5 6; do
4761 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4762 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4763 # Solaris 8's {/usr,}/bin/sh.
4764 touch sub/conftst$i.h
4765 done
4766 echo "include sub/conftest.Po" > confmf
4767
4768 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4769 # mode. It turns out that the SunPro C++ compiler does not properly
4770 # handle `-M -o', and we need to detect this.
4771 depcmd="depmode=$depmode \
4772 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4773 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4774 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4775 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4776 if env $depcmd > conftest.err 2>&1 &&
4777 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4778 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4779 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4780 # icc doesn't choke on unknown options, it will just issue warnings
4781 # or remarks (even with -Werror). So we grep stderr for any message
4782 # that says an option was ignored or not supported.
4783 # When given -MP, icc 7.0 and 7.1 complain thusly:
4784 # icc: Command line warning: ignoring option '-M'; no argument required
4785 # The diagnosis changed in icc 8.0:
4786 # icc: Command line remark: option '-MP' not supported
4787 if (grep 'ignoring option' conftest.err ||
4788 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4789 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4790 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4791 break
4792 fi
4793 fi
81ecdfbb 4794 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4795 sed -e 's/^/| /' < conftest.err >&5
4796 done
4797
4798 cd ..
4799 rm -rf conftest.dir
4800else
4801 am_cv_CC_dependencies_compiler_type=none
4802fi
4803
4804fi
81ecdfbb
RW
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4806$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4807if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4808then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4809else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4810
4811fi
4812
4813
4814# Check for the 'make' the user wants to use.
4815for ac_prog in make
4816do
4817 # Extract the first word of "$ac_prog", so it can be a program name with args.
4818set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
4821if test "${ac_cv_prog_MAKE+set}" = set; then :
4822 $as_echo_n "(cached) " >&6
a417dc56
RW
4823else
4824 if test -n "$MAKE"; then
4825 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4826else
4827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828for as_dir in $PATH
4829do
4830 IFS=$as_save_IFS
4831 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4832 for ac_exec_ext in '' $ac_executable_extensions; do
4833 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4834 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4835 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4836 break 2
4837 fi
4838done
81ecdfbb
RW
4839 done
4840IFS=$as_save_IFS
a417dc56
RW
4841
4842fi
4843fi
4844MAKE=$ac_cv_prog_MAKE
4845if test -n "$MAKE"; then
81ecdfbb
RW
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4847$as_echo "$MAKE" >&6; }
a417dc56 4848else
81ecdfbb
RW
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
a417dc56
RW
4851fi
4852
81ecdfbb 4853
a417dc56
RW
4854 test -n "$MAKE" && break
4855done
4856
4857MAKE_IS_GNU=
4858case "`$MAKE --version 2>&1 | sed 1q`" in
4859 *GNU*)
4860 MAKE_IS_GNU=yes
4861 ;;
4862esac
81ecdfbb 4863 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4864 GMAKE_TRUE=
4865 GMAKE_FALSE='#'
4866else
4867 GMAKE_TRUE='#'
4868 GMAKE_FALSE=
4869fi
4870
81ecdfbb
RW
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4872$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4873set x ${MAKE-make}
4874ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4875if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4876 $as_echo_n "(cached) " >&6
a417dc56
RW
4877else
4878 cat >conftest.make <<\_ACEOF
81ecdfbb 4879SHELL = /bin/sh
a417dc56 4880all:
81ecdfbb 4881 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4882_ACEOF
4883# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4884case `${MAKE-make} -f conftest.make 2>/dev/null` in
4885 *@@@%%%=?*=@@@%%%*)
4886 eval ac_cv_prog_make_${ac_make}_set=yes;;
4887 *)
4888 eval ac_cv_prog_make_${ac_make}_set=no;;
4889esac
a417dc56
RW
4890rm -f conftest.make
4891fi
81ecdfbb
RW
4892if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4894$as_echo "yes" >&6; }
a417dc56
RW
4895 SET_MAKE=
4896else
81ecdfbb
RW
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
a417dc56
RW
4899 SET_MAKE="MAKE=${MAKE-make}"
4900fi
4901
4902
783e057b
DJ
4903
4904CONFIG_OBS=
4905CONFIG_DEPS=
4906CONFIG_SRCS=
4907ENABLE_CFLAGS=
4908
4909CONFIG_ALL=
4910CONFIG_CLEAN=
4911CONFIG_INSTALL=
4912CONFIG_UNINSTALL=
4913
4914# If we haven't got the data from the intl directory,
4915# assume NLS is disabled.
4916USE_NLS=no
4917LIBINTL=
4918LIBINTL_DEP=
4919INCINTL=
4920XGETTEXT=
4921GMSGFMT=
4922POSUB=
4923
4924if test -f ../intl/config.intl; then
4925 . ../intl/config.intl
4926fi
81ecdfbb
RW
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4928$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4929if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
783e057b 4932else
81ecdfbb
RW
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4934$as_echo "yes" >&6; }
783e057b 4935
81ecdfbb 4936$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4937
4938
81ecdfbb
RW
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4940$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4941 # Look for .po and .gmo files in the source directory.
4942 CATALOGS=
4943 XLINGUAS=
4944 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4945 # If there aren't any .gmo files the shell will give us the
4946 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4947 # weeded out.
4948 case "$cat" in *\**)
4949 continue;;
4950 esac
4951 # The quadruple backslash is collapsed to a double backslash
4952 # by the backticks, then collapsed again by the double quotes,
4953 # leaving us with one backslash in the sed expression (right
4954 # before the dot that mustn't act as a wildcard).
4955 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4956 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4957 # The user is allowed to set LINGUAS to a list of languages to
4958 # install catalogs for. If it's empty that means "all of them."
4959 if test "x$LINGUAS" = x; then
4960 CATALOGS="$CATALOGS $cat"
4961 XLINGUAS="$XLINGUAS $lang"
4962 else
4963 case "$LINGUAS" in *$lang*)
4964 CATALOGS="$CATALOGS $cat"
4965 XLINGUAS="$XLINGUAS $lang"
4966 ;;
4967 esac
4968 fi
4969 done
4970 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4972$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4973
4974
4975 DATADIRNAME=share
4976
4977 INSTOBJEXT=.mo
4978
4979 GENCAT=gencat
4980
4981 CATOBJEXT=.gmo
4982
4983fi
4984
4985localedir='${datadir}/locale'
4986
4987
4988if test x"$USE_NLS" = xyes; then
4989 CONFIG_ALL="$CONFIG_ALL all-po"
4990 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4991 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4992 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4993fi
4994
4995
f434ba03
PA
4996
4997
4998
4999 LIBC_FATAL_STDERR_=1
5000 export LIBC_FATAL_STDERR_
5001
5002
55a8c076
YQ
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5004$as_echo_n "checking for long long int... " >&6; }
5005if test "${ac_cv_type_long_long_int+set}" = set; then :
5006 $as_echo_n "(cached) " >&6
5007else
5008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5009/* end confdefs.h. */
f434ba03 5010
55a8c076
YQ
5011 /* For now, do not test the preprocessor; as of 2007 there are too many
5012 implementations with broken preprocessors. Perhaps this can
5013 be revisited in 2012. In the meantime, code should not expect
5014 #if to work with literals wider than 32 bits. */
5015 /* Test literals. */
5016 long long int ll = 9223372036854775807ll;
5017 long long int nll = -9223372036854775807LL;
5018 unsigned long long int ull = 18446744073709551615ULL;
5019 /* Test constant expressions. */
5020 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5021 ? 1 : -1)];
5022 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5023 ? 1 : -1)];
5024 int i = 63;
5025int
5026main ()
5027{
5028/* Test availability of runtime routines for shift and division. */
5029 long long int llmax = 9223372036854775807ll;
5030 unsigned long long int ullmax = 18446744073709551615ull;
5031 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5032 | (llmax / ll) | (llmax % ll)
5033 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5034 | (ullmax / ull) | (ullmax % ull));
5035 ;
5036 return 0;
5037}
f434ba03 5038
f434ba03 5039_ACEOF
55a8c076
YQ
5040if ac_fn_c_try_link "$LINENO"; then :
5041 if test "$cross_compiling" = yes; then :
5042 ac_cv_type_long_long_int=yes
5043else
5044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5045/* end confdefs.h. */
5046#include <limits.h>
5047 #ifndef LLONG_MAX
5048 # define HALF \
5049 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5050 # define LLONG_MAX (HALF - 1 + HALF)
5051 #endif
5052int
5053main ()
5054{
5055long long int n = 1;
5056 int i;
5057 for (i = 0; ; i++)
5058 {
5059 long long int m = n << i;
5060 if (m >> i != n)
5061 return 1;
5062 if (LLONG_MAX / 2 < m)
5063 break;
5064 }
5065 return 0;
5066 ;
5067 return 0;
5068}
5069_ACEOF
5070if ac_fn_c_try_run "$LINENO"; then :
5071 ac_cv_type_long_long_int=yes
5072else
5073 ac_cv_type_long_long_int=no
5074fi
5075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5076 conftest.$ac_objext conftest.beam conftest.$ac_ext
f434ba03
PA
5077fi
5078
55a8c076
YQ
5079else
5080 ac_cv_type_long_long_int=no
5081fi
5082rm -f core conftest.err conftest.$ac_objext \
5083 conftest$ac_exeext conftest.$ac_ext
5084fi
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5086$as_echo "$ac_cv_type_long_long_int" >&6; }
5087 if test $ac_cv_type_long_long_int = yes; then
5088
5089$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
5090
5091 fi
5092
5093
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5095$as_echo_n "checking for unsigned long long int... " >&6; }
5096if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5097 $as_echo_n "(cached) " >&6
5098else
5099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5100/* end confdefs.h. */
5101
5102 /* For now, do not test the preprocessor; as of 2007 there are too many
5103 implementations with broken preprocessors. Perhaps this can
5104 be revisited in 2012. In the meantime, code should not expect
5105 #if to work with literals wider than 32 bits. */
5106 /* Test literals. */
5107 long long int ll = 9223372036854775807ll;
5108 long long int nll = -9223372036854775807LL;
5109 unsigned long long int ull = 18446744073709551615ULL;
5110 /* Test constant expressions. */
5111 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5112 ? 1 : -1)];
5113 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5114 ? 1 : -1)];
5115 int i = 63;
5116int
5117main ()
5118{
5119/* Test availability of runtime routines for shift and division. */
5120 long long int llmax = 9223372036854775807ll;
5121 unsigned long long int ullmax = 18446744073709551615ull;
5122 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5123 | (llmax / ll) | (llmax % ll)
5124 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5125 | (ullmax / ull) | (ullmax % ull));
5126 ;
5127 return 0;
5128}
5129
5130_ACEOF
5131if ac_fn_c_try_link "$LINENO"; then :
5132 ac_cv_type_unsigned_long_long_int=yes
5133else
5134 ac_cv_type_unsigned_long_long_int=no
5135fi
5136rm -f core conftest.err conftest.$ac_objext \
5137 conftest$ac_exeext conftest.$ac_ext
5138fi
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5140$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
5141 if test $ac_cv_type_unsigned_long_long_int = yes; then
5142
5143$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
5144
5145 fi
5146
5147
5148
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5150$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5151if test "${gl_cv_have_include_next+set}" = set; then :
5152 $as_echo_n "(cached) " >&6
5153else
5154 rm -rf conftestd1a conftestd1b conftestd2
5155 mkdir conftestd1a conftestd1b conftestd2
5156 cat <<EOF > conftestd1a/conftest.h
5157#define DEFINED_IN_CONFTESTD1
5158#include_next <conftest.h>
5159#ifdef DEFINED_IN_CONFTESTD2
5160int foo;
5161#else
5162#error "include_next doesn't work"
5163#endif
5164EOF
5165 cat <<EOF > conftestd1b/conftest.h
5166#define DEFINED_IN_CONFTESTD1
5167#include <stdio.h>
5168#include_next <conftest.h>
5169#ifdef DEFINED_IN_CONFTESTD2
5170int foo;
5171#else
5172#error "include_next doesn't work"
5173#endif
5174EOF
5175 cat <<EOF > conftestd2/conftest.h
5176#ifndef DEFINED_IN_CONFTESTD1
5177#error "include_next test doesn't work"
5178#endif
5179#define DEFINED_IN_CONFTESTD2
5180EOF
5181 gl_save_CPPFLAGS="$CPPFLAGS"
5182 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#include <conftest.h>
5186_ACEOF
5187if ac_fn_c_try_compile "$LINENO"; then :
5188 gl_cv_have_include_next=yes
5189else
5190 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5192/* end confdefs.h. */
5193#include <conftest.h>
5194_ACEOF
5195if ac_fn_c_try_compile "$LINENO"; then :
5196 gl_cv_have_include_next=buggy
5197else
5198 gl_cv_have_include_next=no
5199fi
5200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5201
5202fi
5203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5204 CPPFLAGS="$gl_save_CPPFLAGS"
5205 rm -rf conftestd1a conftestd1b conftestd2
5206
5207fi
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5209$as_echo "$gl_cv_have_include_next" >&6; }
5210 PRAGMA_SYSTEM_HEADER=
5211 if test $gl_cv_have_include_next = yes; then
5212 INCLUDE_NEXT=include_next
5213 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5214 if test -n "$GCC"; then
5215 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5216 fi
5217 else
5218 if test $gl_cv_have_include_next = buggy; then
5219 INCLUDE_NEXT=include
5220 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5221 else
5222 INCLUDE_NEXT=include
5223 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5224 fi
5225 fi
5226
5227
5228
5229
5230
5231
5232
5233
5234 for ac_header in $gl_header_list
5235do :
5236 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5237ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5238eval as_val=\$$as_ac_Header
5239 if test "x$as_val" = x""yes; then :
5240 cat >>confdefs.h <<_ACEOF
5241#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5242_ACEOF
5243
5244fi
5245
5246done
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258 gl_cv_c_multiarch=no
5259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5260/* end confdefs.h. */
5261#ifndef __APPLE_CC__
5262 not a universal capable compiler
5263 #endif
5264 typedef int dummy;
5265
5266_ACEOF
5267if ac_fn_c_try_compile "$LINENO"; then :
5268
5269 arch=
5270 prev=
5271 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5272 if test -n "$prev"; then
5273 case $word in
5274 i?86 | x86_64 | ppc | ppc64)
5275 if test -z "$arch" || test "$arch" = "$word"; then
5276 arch="$word"
5277 else
5278 gl_cv_c_multiarch=yes
5279 fi
5280 ;;
5281 esac
5282 prev=
5283 else
5284 if test "x$word" = "x-arch"; then
5285 prev=arch
5286 fi
5287 fi
5288 done
5289
5290fi
5291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5292 if test $gl_cv_c_multiarch = yes; then
5293
5294$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5295
5296 APPLE_UNIVERSAL_BUILD=1
5297 else
5298 APPLE_UNIVERSAL_BUILD=0
5299 fi
5300
5301
5302
5303
5304
5305 if test $ac_cv_type_long_long_int = yes; then
5306 HAVE_LONG_LONG_INT=1
5307 else
5308 HAVE_LONG_LONG_INT=0
5309 fi
5310
5311
5312 if test $ac_cv_type_unsigned_long_long_int = yes; then
5313 HAVE_UNSIGNED_LONG_LONG_INT=1
5314 else
5315 HAVE_UNSIGNED_LONG_LONG_INT=0
5316 fi
5317
5318
5319 if test $ac_cv_header_inttypes_h = yes; then
5320 HAVE_INTTYPES_H=1
5321 else
5322 HAVE_INTTYPES_H=0
5323 fi
5324
5325
5326 if test $ac_cv_header_sys_types_h = yes; then
5327 HAVE_SYS_TYPES_H=1
5328 else
5329 HAVE_SYS_TYPES_H=0
5330 fi
5331
5332
5333
5334
5335
5336
5337 :
5338
5339
5340
5341
5342
5343
5344
5345 if test $gl_cv_have_include_next = yes; then
5346 gl_cv_next_stdint_h='<'stdint.h'>'
5347 else
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
5349$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
5350if test "${gl_cv_next_stdint_h+set}" = set; then :
5351 $as_echo_n "(cached) " >&6
5352else
5353
5354 if test $ac_cv_header_stdint_h = yes; then
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357#include <stdint.h>
5358
5359_ACEOF
5360 case "$host_os" in
5361 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5362 *) gl_absname_cpp="$ac_cpp" ;;
5363 esac
5364 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5365 sed -n '\#/stdint.h#{
5366 s#.*"\(.*/stdint.h\)".*#\1#
5367 s#^/[^/]#//&#
5368 p
5369 q
5370 }'`'"'
5371 else
5372 gl_cv_next_stdint_h='<'stdint.h'>'
5373 fi
5374
5375fi
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
5377$as_echo "$gl_cv_next_stdint_h" >&6; }
5378 fi
5379 NEXT_STDINT_H=$gl_cv_next_stdint_h
5380
5381 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5383 gl_next_as_first_directive='<'stdint.h'>'
5384 else
5385 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5386 gl_next_as_first_directive=$gl_cv_next_stdint_h
5387 fi
5388 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
5389
5390
5391
5392 if test $ac_cv_header_stdint_h = yes; then
5393 HAVE_STDINT_H=1
5394 else
5395 HAVE_STDINT_H=0
5396 fi
5397
5398
5399 if test $ac_cv_header_stdint_h = yes; then
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
5401$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
5402if test "${gl_cv_header_working_stdint_h+set}" = set; then :
5403 $as_echo_n "(cached) " >&6
5404else
5405 gl_cv_header_working_stdint_h=no
5406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407/* end confdefs.h. */
5408
5409
5410#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5411#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5412#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5413#include <stdint.h>
5414/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5415#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5416#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5417#endif
5418
5419
5420 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5421 included before <wchar.h>. */
5422 #include <stddef.h>
5423 #include <signal.h>
5424 #if HAVE_WCHAR_H
5425 # include <stdio.h>
5426 # include <time.h>
5427 # include <wchar.h>
5428 #endif
5429
5430
5431#ifdef INT8_MAX
5432int8_t a1 = INT8_MAX;
5433int8_t a1min = INT8_MIN;
5434#endif
5435#ifdef INT16_MAX
5436int16_t a2 = INT16_MAX;
5437int16_t a2min = INT16_MIN;
5438#endif
5439#ifdef INT32_MAX
5440int32_t a3 = INT32_MAX;
5441int32_t a3min = INT32_MIN;
5442#endif
5443#ifdef INT64_MAX
5444int64_t a4 = INT64_MAX;
5445int64_t a4min = INT64_MIN;
5446#endif
5447#ifdef UINT8_MAX
5448uint8_t b1 = UINT8_MAX;
5449#else
5450typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5451#endif
5452#ifdef UINT16_MAX
5453uint16_t b2 = UINT16_MAX;
5454#endif
5455#ifdef UINT32_MAX
5456uint32_t b3 = UINT32_MAX;
5457#endif
5458#ifdef UINT64_MAX
5459uint64_t b4 = UINT64_MAX;
5460#endif
5461int_least8_t c1 = INT8_C (0x7f);
5462int_least8_t c1max = INT_LEAST8_MAX;
5463int_least8_t c1min = INT_LEAST8_MIN;
5464int_least16_t c2 = INT16_C (0x7fff);
5465int_least16_t c2max = INT_LEAST16_MAX;
5466int_least16_t c2min = INT_LEAST16_MIN;
5467int_least32_t c3 = INT32_C (0x7fffffff);
5468int_least32_t c3max = INT_LEAST32_MAX;
5469int_least32_t c3min = INT_LEAST32_MIN;
5470int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5471int_least64_t c4max = INT_LEAST64_MAX;
5472int_least64_t c4min = INT_LEAST64_MIN;
5473uint_least8_t d1 = UINT8_C (0xff);
5474uint_least8_t d1max = UINT_LEAST8_MAX;
5475uint_least16_t d2 = UINT16_C (0xffff);
5476uint_least16_t d2max = UINT_LEAST16_MAX;
5477uint_least32_t d3 = UINT32_C (0xffffffff);
5478uint_least32_t d3max = UINT_LEAST32_MAX;
5479uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5480uint_least64_t d4max = UINT_LEAST64_MAX;
5481int_fast8_t e1 = INT_FAST8_MAX;
5482int_fast8_t e1min = INT_FAST8_MIN;
5483int_fast16_t e2 = INT_FAST16_MAX;
5484int_fast16_t e2min = INT_FAST16_MIN;
5485int_fast32_t e3 = INT_FAST32_MAX;
5486int_fast32_t e3min = INT_FAST32_MIN;
5487int_fast64_t e4 = INT_FAST64_MAX;
5488int_fast64_t e4min = INT_FAST64_MIN;
5489uint_fast8_t f1 = UINT_FAST8_MAX;
5490uint_fast16_t f2 = UINT_FAST16_MAX;
5491uint_fast32_t f3 = UINT_FAST32_MAX;
5492uint_fast64_t f4 = UINT_FAST64_MAX;
5493#ifdef INTPTR_MAX
5494intptr_t g = INTPTR_MAX;
5495intptr_t gmin = INTPTR_MIN;
5496#endif
5497#ifdef UINTPTR_MAX
5498uintptr_t h = UINTPTR_MAX;
5499#endif
5500intmax_t i = INTMAX_MAX;
5501uintmax_t j = UINTMAX_MAX;
5502
5503#include <limits.h> /* for CHAR_BIT */
5504#define TYPE_MINIMUM(t) \
5505 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5506#define TYPE_MAXIMUM(t) \
5507 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5508struct s {
5509 int check_PTRDIFF:
5510 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5511 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5512 ? 1 : -1;
5513 /* Detect bug in FreeBSD 6.0 / ia64. */
5514 int check_SIG_ATOMIC:
5515 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5516 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5517 ? 1 : -1;
5518 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5519 int check_WCHAR:
5520 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5521 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5522 ? 1 : -1;
5523 /* Detect bug in mingw. */
5524 int check_WINT:
5525 WINT_MIN == TYPE_MINIMUM (wint_t)
5526 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5527 ? 1 : -1;
5528
5529 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5530 int check_UINT8_C:
5531 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5532 int check_UINT16_C:
5533 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5534
5535 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5536#ifdef UINT8_MAX
5537 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5538#endif
5539#ifdef UINT16_MAX
5540 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5541#endif
5542#ifdef UINT32_MAX
5543 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5544#endif
5545#ifdef UINT64_MAX
5546 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5547#endif
5548 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5549 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5550 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5551 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5552 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5553 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5554 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5555 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5556 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5557 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5558 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5559};
5560
5561int
5562main ()
5563{
5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"; then :
5570 if test "$cross_compiling" = yes; then :
5571 gl_cv_header_working_stdint_h=yes
5572
5573else
5574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5575/* end confdefs.h. */
5576
5577
5578#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5579#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5580#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5581#include <stdint.h>
5582
5583
5584 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5585 included before <wchar.h>. */
5586 #include <stddef.h>
5587 #include <signal.h>
5588 #if HAVE_WCHAR_H
5589 # include <stdio.h>
5590 # include <time.h>
5591 # include <wchar.h>
5592 #endif
5593
5594
5595#include <stdio.h>
5596#include <string.h>
5597#define MVAL(macro) MVAL1(macro)
5598#define MVAL1(expression) #expression
5599static const char *macro_values[] =
5600 {
5601#ifdef INT8_MAX
5602 MVAL (INT8_MAX),
5603#endif
5604#ifdef INT16_MAX
5605 MVAL (INT16_MAX),
5606#endif
5607#ifdef INT32_MAX
5608 MVAL (INT32_MAX),
5609#endif
5610#ifdef INT64_MAX
5611 MVAL (INT64_MAX),
5612#endif
5613#ifdef UINT8_MAX
5614 MVAL (UINT8_MAX),
5615#endif
5616#ifdef UINT16_MAX
5617 MVAL (UINT16_MAX),
5618#endif
5619#ifdef UINT32_MAX
5620 MVAL (UINT32_MAX),
5621#endif
5622#ifdef UINT64_MAX
5623 MVAL (UINT64_MAX),
5624#endif
5625 NULL
5626 };
5627
5628int
5629main ()
5630{
5631
5632 const char **mv;
5633 for (mv = macro_values; *mv != NULL; mv++)
5634 {
5635 const char *value = *mv;
5636 /* Test whether it looks like a cast expression. */
5637 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
5638 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
5639 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
5640 || strncmp (value, "((int)"/*)*/, 6) == 0
5641 || strncmp (value, "((signed short)"/*)*/, 15) == 0
5642 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
5643 return 1;
5644 }
5645 return 0;
5646
5647 ;
5648 return 0;
5649}
5650_ACEOF
5651if ac_fn_c_try_run "$LINENO"; then :
5652 gl_cv_header_working_stdint_h=yes
5653fi
5654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5655 conftest.$ac_objext conftest.beam conftest.$ac_ext
5656fi
5657
5658
5659fi
5660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5661
5662fi
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
5664$as_echo "$gl_cv_header_working_stdint_h" >&6; }
5665 fi
5666 if test "$gl_cv_header_working_stdint_h" = yes; then
5667 STDINT_H=
5668 else
5669 for ac_header in sys/inttypes.h sys/bitypes.h
5670do :
5671 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5672ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5673eval as_val=\$$as_ac_Header
5674 if test "x$as_val" = x""yes; then :
5675 cat >>confdefs.h <<_ACEOF
5676#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5677_ACEOF
5678
5679fi
5680
5681done
5682
5683 if test $ac_cv_header_sys_inttypes_h = yes; then
5684 HAVE_SYS_INTTYPES_H=1
5685 else
5686 HAVE_SYS_INTTYPES_H=0
5687 fi
5688
5689 if test $ac_cv_header_sys_bitypes_h = yes; then
5690 HAVE_SYS_BITYPES_H=1
5691 else
5692 HAVE_SYS_BITYPES_H=0
5693 fi
5694
5695
5696
5697 :
5698
5699
5700
5701
5702
5703
5704
5705
5706 if test $APPLE_UNIVERSAL_BUILD = 0; then
5707
5708
5709 for gltype in ptrdiff_t size_t ; do
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5711$as_echo_n "checking for bit size of $gltype... " >&6; }
5712if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5713 $as_echo_n "(cached) " >&6
5714else
5715 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5716 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5717 included before <wchar.h>. */
5718 #include <stddef.h>
5719 #include <signal.h>
5720 #if HAVE_WCHAR_H
5721 # include <stdio.h>
5722 # include <time.h>
5723 # include <wchar.h>
5724 #endif
5725
5726#include <limits.h>"; then :
5727
5728else
5729 result=unknown
5730fi
5731
5732 eval gl_cv_bitsizeof_${gltype}=\$result
5733
5734fi
5735eval ac_res=\$gl_cv_bitsizeof_${gltype}
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5737$as_echo "$ac_res" >&6; }
5738 eval result=\$gl_cv_bitsizeof_${gltype}
5739 if test $result = unknown; then
5740 result=0
5741 fi
5742 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5743 cat >>confdefs.h <<_ACEOF
5744#define BITSIZEOF_${GLTYPE} $result
5745_ACEOF
5746
5747 eval BITSIZEOF_${GLTYPE}=\$result
5748 done
5749
5750
5751 fi
5752
5753
5754 for gltype in sig_atomic_t wchar_t wint_t ; do
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5756$as_echo_n "checking for bit size of $gltype... " >&6; }
5757if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5758 $as_echo_n "(cached) " >&6
5759else
5760 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5761 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5762 included before <wchar.h>. */
5763 #include <stddef.h>
5764 #include <signal.h>
5765 #if HAVE_WCHAR_H
5766 # include <stdio.h>
5767 # include <time.h>
5768 # include <wchar.h>
5769 #endif
5770
5771#include <limits.h>"; then :
5772
5773else
5774 result=unknown
5775fi
5776
5777 eval gl_cv_bitsizeof_${gltype}=\$result
5778
5779fi
5780eval ac_res=\$gl_cv_bitsizeof_${gltype}
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5782$as_echo "$ac_res" >&6; }
5783 eval result=\$gl_cv_bitsizeof_${gltype}
5784 if test $result = unknown; then
5785 result=0
5786 fi
5787 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5788 cat >>confdefs.h <<_ACEOF
5789#define BITSIZEOF_${GLTYPE} $result
5790_ACEOF
5791
5792 eval BITSIZEOF_${GLTYPE}=\$result
5793 done
5794
5795
5796
5797
5798 for gltype in sig_atomic_t wchar_t wint_t ; do
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
5800$as_echo_n "checking whether $gltype is signed... " >&6; }
5801if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
5802 $as_echo_n "(cached) " >&6
5803else
5804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5805/* end confdefs.h. */
5806
5807 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5808 included before <wchar.h>. */
5809 #include <stddef.h>
5810 #include <signal.h>
5811 #if HAVE_WCHAR_H
5812 # include <stdio.h>
5813 # include <time.h>
5814 # include <wchar.h>
5815 #endif
5816
5817 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
5818int
5819main ()
5820{
5821
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826if ac_fn_c_try_compile "$LINENO"; then :
5827 result=yes
5828else
5829 result=no
5830fi
5831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5832 eval gl_cv_type_${gltype}_signed=\$result
5833
5834fi
5835eval ac_res=\$gl_cv_type_${gltype}_signed
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5837$as_echo "$ac_res" >&6; }
5838 eval result=\$gl_cv_type_${gltype}_signed
5839 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5840 if test "$result" = yes; then
5841 cat >>confdefs.h <<_ACEOF
5842#define HAVE_SIGNED_${GLTYPE} 1
5843_ACEOF
5844
5845 eval HAVE_SIGNED_${GLTYPE}=1
5846 else
5847 eval HAVE_SIGNED_${GLTYPE}=0
5848 fi
5849 done
5850
5851
5852 gl_cv_type_ptrdiff_t_signed=yes
5853 gl_cv_type_size_t_signed=no
5854 if test $APPLE_UNIVERSAL_BUILD = 0; then
5855
5856
5857 for gltype in ptrdiff_t size_t ; do
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
5859$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
5860if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
5861 $as_echo_n "(cached) " >&6
5862else
5863 eval gl_cv_type_${gltype}_suffix=no
5864 eval result=\$gl_cv_type_${gltype}_signed
5865 if test "$result" = yes; then
5866 glsufu=
5867 else
5868 glsufu=u
5869 fi
5870 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
5871 case $glsuf in
5872 '') gltype1='int';;
5873 l) gltype1='long int';;
5874 ll) gltype1='long long int';;
5875 i64) gltype1='__int64';;
5876 u) gltype1='unsigned int';;
5877 ul) gltype1='unsigned long int';;
5878 ull) gltype1='unsigned long long int';;
5879 ui64)gltype1='unsigned __int64';;
5880 esac
5881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5882/* end confdefs.h. */
5883
5884 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5885 included before <wchar.h>. */
5886 #include <stddef.h>
5887 #include <signal.h>
5888 #if HAVE_WCHAR_H
5889 # include <stdio.h>
5890 # include <time.h>
5891 # include <wchar.h>
5892 #endif
5893
5894 extern $gltype foo;
5895 extern $gltype1 foo;
5896int
5897main ()
5898{
5899
5900 ;
5901 return 0;
5902}
5903_ACEOF
5904if ac_fn_c_try_compile "$LINENO"; then :
5905 eval gl_cv_type_${gltype}_suffix=\$glsuf
5906fi
5907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5908 eval result=\$gl_cv_type_${gltype}_suffix
5909 test "$result" != no && break
5910 done
5911fi
5912eval ac_res=\$gl_cv_type_${gltype}_suffix
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5914$as_echo "$ac_res" >&6; }
5915 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5916 eval result=\$gl_cv_type_${gltype}_suffix
5917 test "$result" = no && result=
5918 eval ${GLTYPE}_SUFFIX=\$result
5919 cat >>confdefs.h <<_ACEOF
5920#define ${GLTYPE}_SUFFIX $result
5921_ACEOF
5922
5923 done
5924
5925
5926 fi
5927
5928
5929 for gltype in sig_atomic_t wchar_t wint_t ; do
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
5931$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
5932if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
5933 $as_echo_n "(cached) " >&6
5934else
5935 eval gl_cv_type_${gltype}_suffix=no
5936 eval result=\$gl_cv_type_${gltype}_signed
5937 if test "$result" = yes; then
5938 glsufu=
5939 else
5940 glsufu=u
5941 fi
5942 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
5943 case $glsuf in
5944 '') gltype1='int';;
5945 l) gltype1='long int';;
5946 ll) gltype1='long long int';;
5947 i64) gltype1='__int64';;
5948 u) gltype1='unsigned int';;
5949 ul) gltype1='unsigned long int';;
5950 ull) gltype1='unsigned long long int';;
5951 ui64)gltype1='unsigned __int64';;
5952 esac
5953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5954/* end confdefs.h. */
5955
5956 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5957 included before <wchar.h>. */
5958 #include <stddef.h>
5959 #include <signal.h>
5960 #if HAVE_WCHAR_H
5961 # include <stdio.h>
5962 # include <time.h>
5963 # include <wchar.h>
5964 #endif
5965
5966 extern $gltype foo;
5967 extern $gltype1 foo;
5968int
5969main ()
5970{
5971
5972 ;
5973 return 0;
5974}
5975_ACEOF
5976if ac_fn_c_try_compile "$LINENO"; then :
5977 eval gl_cv_type_${gltype}_suffix=\$glsuf
5978fi
5979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980 eval result=\$gl_cv_type_${gltype}_suffix
5981 test "$result" != no && break
5982 done
5983fi
5984eval ac_res=\$gl_cv_type_${gltype}_suffix
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5986$as_echo "$ac_res" >&6; }
5987 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5988 eval result=\$gl_cv_type_${gltype}_suffix
5989 test "$result" = no && result=
5990 eval ${GLTYPE}_SUFFIX=\$result
5991 cat >>confdefs.h <<_ACEOF
5992#define ${GLTYPE}_SUFFIX $result
5993_ACEOF
5994
5995 done
5996
5997
5998
5999 STDINT_H=stdint.h
6000 fi
6001
6002
6003
6004 for ac_header in inttypes.h
6005do :
6006 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
6007if test "x$ac_cv_header_inttypes_h" = x""yes; then :
6008 cat >>confdefs.h <<_ACEOF
6009#define HAVE_INTTYPES_H 1
6010_ACEOF
6011
6012fi
6013
6014done
6015
6016 if test $ac_cv_header_inttypes_h = yes; then
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
6018$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
6019if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
6020 $as_echo_n "(cached) " >&6
6021else
6022
6023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6024/* end confdefs.h. */
6025#include <inttypes.h>
6026#ifdef PRId32
6027char *p = PRId32;
6028#endif
6029
6030int
6031main ()
6032{
6033
6034 ;
6035 return 0;
6036}
6037_ACEOF
6038if ac_fn_c_try_compile "$LINENO"; then :
6039 gt_cv_inttypes_pri_broken=no
6040else
6041 gt_cv_inttypes_pri_broken=yes
6042fi
6043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6044
6045fi
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
6047$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
6048 fi
6049 if test "$gt_cv_inttypes_pri_broken" = yes; then
6050
6051cat >>confdefs.h <<_ACEOF
6052#define PRI_MACROS_BROKEN 1
6053_ACEOF
6054
6055 PRI_MACROS_BROKEN=1
6056 else
6057 PRI_MACROS_BROKEN=0
6058 fi
6059
6060
6061
6062
6063
6064
6065
6066
6067 ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
6068if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
6069 ac_have_decl=1
6070else
6071 ac_have_decl=0
6072fi
6073
6074cat >>confdefs.h <<_ACEOF
6075#define HAVE_DECL_IMAXABS $ac_have_decl
6076_ACEOF
6077
6078
6079
6080 ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
6081if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
6082 ac_have_decl=1
6083else
6084 ac_have_decl=0
6085fi
6086
6087cat >>confdefs.h <<_ACEOF
6088#define HAVE_DECL_IMAXDIV $ac_have_decl
6089_ACEOF
6090
6091
6092
6093 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
6094if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
6095 ac_have_decl=1
6096else
6097 ac_have_decl=0
6098fi
6099
6100cat >>confdefs.h <<_ACEOF
6101#define HAVE_DECL_STRTOIMAX $ac_have_decl
6102_ACEOF
6103
6104
6105
6106 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
6107if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
6108 ac_have_decl=1
6109else
6110 ac_have_decl=0
6111fi
6112
6113cat >>confdefs.h <<_ACEOF
6114#define HAVE_DECL_STRTOUMAX $ac_have_decl
6115_ACEOF
6116
6117
6118
6119 GNULIB_IMAXABS=0;
6120 GNULIB_IMAXDIV=0;
6121 GNULIB_STRTOIMAX=0;
6122 GNULIB_STRTOUMAX=0;
6123 HAVE_DECL_IMAXABS=1;
6124 HAVE_DECL_IMAXDIV=1;
6125 HAVE_DECL_STRTOIMAX=1;
6126 HAVE_DECL_STRTOUMAX=1;
6127
6128
6129
f434ba03
PA
6130
6131
6132
6133
6134
6135
6136
6137 for ac_func in $gl_func_list
6138do :
6139 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6140ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6141eval as_val=\$$as_ac_var
6142 if test "x$as_val" = x""yes; then :
6143 cat >>confdefs.h <<_ACEOF
6144#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6145_ACEOF
6146
6147fi
6148done
6149
6150
6151
6152
6153
6154
6155 GNULIB_MEMCHR=0;
6156 GNULIB_MEMMEM=0;
6157 GNULIB_MEMPCPY=0;
6158 GNULIB_MEMRCHR=0;
6159 GNULIB_RAWMEMCHR=0;
6160 GNULIB_STPCPY=0;
6161 GNULIB_STPNCPY=0;
6162 GNULIB_STRCHRNUL=0;
6163 GNULIB_STRDUP=0;
6164 GNULIB_STRNCAT=0;
6165 GNULIB_STRNDUP=0;
6166 GNULIB_STRNLEN=0;
6167 GNULIB_STRPBRK=0;
6168 GNULIB_STRSEP=0;
6169 GNULIB_STRSTR=0;
6170 GNULIB_STRCASESTR=0;
6171 GNULIB_STRTOK_R=0;
6172 GNULIB_MBSLEN=0;
6173 GNULIB_MBSNLEN=0;
6174 GNULIB_MBSCHR=0;
6175 GNULIB_MBSRCHR=0;
6176 GNULIB_MBSSTR=0;
6177 GNULIB_MBSCASECMP=0;
6178 GNULIB_MBSNCASECMP=0;
6179 GNULIB_MBSPCASECMP=0;
6180 GNULIB_MBSCASESTR=0;
6181 GNULIB_MBSCSPN=0;
6182 GNULIB_MBSPBRK=0;
6183 GNULIB_MBSSPN=0;
6184 GNULIB_MBSSEP=0;
6185 GNULIB_MBSTOK_R=0;
6186 GNULIB_STRERROR=0;
6187 GNULIB_STRSIGNAL=0;
6188 GNULIB_STRVERSCMP=0;
6189 HAVE_MBSLEN=0;
6190 HAVE_MEMCHR=1;
6191 HAVE_DECL_MEMMEM=1;
6192 HAVE_MEMPCPY=1;
6193 HAVE_DECL_MEMRCHR=1;
6194 HAVE_RAWMEMCHR=1;
6195 HAVE_STPCPY=1;
6196 HAVE_STPNCPY=1;
6197 HAVE_STRCHRNUL=1;
6198 HAVE_DECL_STRDUP=1;
6199 HAVE_DECL_STRNDUP=1;
6200 HAVE_DECL_STRNLEN=1;
6201 HAVE_STRPBRK=1;
6202 HAVE_STRSEP=1;
6203 HAVE_STRCASESTR=1;
6204 HAVE_DECL_STRTOK_R=1;
6205 HAVE_DECL_STRSIGNAL=1;
6206 HAVE_STRVERSCMP=1;
6207 REPLACE_MEMCHR=0;
783e057b 6208 REPLACE_MEMMEM=0;
f434ba03
PA
6209 REPLACE_STPNCPY=0;
6210 REPLACE_STRDUP=0;
783e057b 6211 REPLACE_STRSTR=0;
f434ba03
PA
6212 REPLACE_STRCASESTR=0;
6213 REPLACE_STRERROR=0;
6214 REPLACE_STRNCAT=0;
6215 REPLACE_STRNDUP=0;
6216 REPLACE_STRNLEN=0;
6217 REPLACE_STRSIGNAL=0;
6218 REPLACE_STRTOK_R=0;
6219 UNDEFINE_STRTOK_R=0;
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
6234 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
6235 # irrelevant for anonymous mappings.
6236 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
6237if test "x$ac_cv_func_mmap" = x""yes; then :
6238 gl_have_mmap=yes
6239else
6240 gl_have_mmap=no
6241fi
6242
6243
6244 # Try to allow MAP_ANONYMOUS.
6245 gl_have_mmap_anonymous=no
6246 if test $gl_have_mmap = yes; then
6247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
6248$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250/* end confdefs.h. */
6251
6252#include <sys/mman.h>
6253#ifdef MAP_ANONYMOUS
6254 I cant identify this map.
6255#endif
6256
6257_ACEOF
6258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6259 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
6260 gl_have_mmap_anonymous=yes
6261fi
6262rm -f conftest*
6263
6264 if test $gl_have_mmap_anonymous != yes; then
6265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266/* end confdefs.h. */
6267
6268#include <sys/mman.h>
6269#ifdef MAP_ANON
6270 I cant identify this map.
6271#endif
6272
6273_ACEOF
6274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6275 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
6276
6277$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
6278
6279 gl_have_mmap_anonymous=yes
6280fi
6281rm -f conftest*
6282
6283 fi
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
6285$as_echo "$gl_have_mmap_anonymous" >&6; }
6286 if test $gl_have_mmap_anonymous = yes; then
6287
6288$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
6289
6290 fi
6291 fi
6292
6293
6294 :
6295
6296
6297
6298
6299
6300
6301 :
6302
6303
6304
6305
6306
6307
6308
6309
6310 :
6311
6312
6313
6314
6315
6316 if test $ac_cv_func_memchr = yes; then
6317 # Detect platform-specific bugs in some versions of glibc:
6318 # memchr should not dereference anything with length 0
6319 # http://bugzilla.redhat.com/499689
6320 # memchr should not dereference overestimated length after a match
6321 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
6322 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6323 # Assume that memchr works on platforms that lack mprotect.
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
6325$as_echo_n "checking whether memchr works... " >&6; }
6326if test "${gl_cv_func_memchr_works+set}" = set; then :
6327 $as_echo_n "(cached) " >&6
6328else
6329 if test "$cross_compiling" = yes; then :
6330 gl_cv_func_memchr_works="guessing no"
6331else
6332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6333/* end confdefs.h. */
6334
6335#include <string.h>
6336#if HAVE_SYS_MMAN_H
6337# include <fcntl.h>
6338# include <unistd.h>
6339# include <sys/types.h>
6340# include <sys/mman.h>
6341# ifndef MAP_FILE
6342# define MAP_FILE 0
6343# endif
6344#endif
6345
6346int
6347main ()
6348{
6349
6350 char *fence = NULL;
6351#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
6352# if HAVE_MAP_ANONYMOUS
6353 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
6354 const int fd = -1;
6355# else /* !HAVE_MAP_ANONYMOUS */
6356 const int flags = MAP_FILE | MAP_PRIVATE;
6357 int fd = open ("/dev/zero", O_RDONLY, 0666);
6358 if (fd >= 0)
6359# endif
6360 {
6361 int pagesize = getpagesize ();
6362 char *two_pages =
6363 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
6364 flags, fd, 0);
6365 if (two_pages != (char *)(-1)
6366 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
6367 fence = two_pages + pagesize;
6368 }
6369#endif
6370 if (fence)
6371 {
6372 if (memchr (fence, 0, 0))
6373 return 1;
6374 strcpy (fence - 9, "12345678");
6375 if (memchr (fence - 9, 0, 79) != fence - 1)
6376 return 2;
6377 }
6378 return 0;
6379
6380 ;
6381 return 0;
6382}
6383_ACEOF
6384if ac_fn_c_try_run "$LINENO"; then :
6385 gl_cv_func_memchr_works=yes
6386else
6387 gl_cv_func_memchr_works=no
6388fi
6389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6390 conftest.$ac_objext conftest.beam conftest.$ac_ext
6391fi
6392
6393fi
6394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
6395$as_echo "$gl_cv_func_memchr_works" >&6; }
6396 if test "$gl_cv_func_memchr_works" != yes; then
6397 REPLACE_MEMCHR=1
6398 fi
6399 else
6400 HAVE_MEMCHR=0
6401 fi
6402 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
6403
6404
6405
6406
6407
6408
6409
6410
6411 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
6412
6413
6414 for ac_header in bp-sym.h
6415do :
6416 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
6417if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
6418 cat >>confdefs.h <<_ACEOF
6419#define HAVE_BP_SYM_H 1
6420_ACEOF
6421
6422fi
6423
6424done
6425
6426
6427 fi
783e057b
DJ
6428
6429
81ecdfbb
RW
6430 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
6431if test "x$ac_cv_have_decl_memmem" = x""yes; then :
6432 ac_have_decl=1
783e057b 6433else
81ecdfbb 6434 ac_have_decl=0
783e057b 6435fi
783e057b
DJ
6436
6437cat >>confdefs.h <<_ACEOF
81ecdfbb 6438#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
6439_ACEOF
6440
6441
783e057b
DJ
6442
6443
6444
6445
6446
6447
6448
6449
783e057b 6450
783e057b 6451
783e057b 6452
f434ba03 6453
81ecdfbb
RW
6454 for ac_func in memmem
6455do :
6456 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6457if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6458 cat >>confdefs.h <<_ACEOF
81ecdfbb 6459#define HAVE_MEMMEM 1
783e057b
DJ
6460_ACEOF
6461
6462else
6463
6464 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6465
6466fi
6467done
6468
6469
6470
6471 :
6472
6473
6474
6475
6476
6477 if test $ac_cv_have_decl_memmem = no; then
6478 HAVE_DECL_MEMMEM=0
6479 fi
6480 :
6481
6482
55a8c076
YQ
6483 REPLACE_NULL=0;
6484 HAVE_WCHAR_T=1;
6485 STDDEF_H='';
6486
6487
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
6489$as_echo_n "checking for wchar_t... " >&6; }
6490if test "${gt_cv_c_wchar_t+set}" = set; then :
6491 $as_echo_n "(cached) " >&6
6492else
f434ba03
PA
6493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6494/* end confdefs.h. */
55a8c076
YQ
6495#include <stddef.h>
6496 wchar_t foo = (wchar_t)'\0';
6497int
6498main ()
6499{
f434ba03 6500
55a8c076
YQ
6501 ;
6502 return 0;
6503}
f434ba03
PA
6504_ACEOF
6505if ac_fn_c_try_compile "$LINENO"; then :
55a8c076
YQ
6506 gt_cv_c_wchar_t=yes
6507else
6508 gt_cv_c_wchar_t=no
6509fi
6510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6511fi
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
6513$as_echo "$gt_cv_c_wchar_t" >&6; }
6514 if test $gt_cv_c_wchar_t = yes; then
f434ba03 6515
55a8c076
YQ
6516$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
6517
6518 fi
6519
6520
6521
6522
6523
6524
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
6526$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
6527if test "${ac_cv_c_restrict+set}" = set; then :
6528 $as_echo_n "(cached) " >&6
6529else
6530 ac_cv_c_restrict=no
6531 # The order here caters to the fact that C++ does not require restrict.
6532 for ac_kw in __restrict __restrict__ _Restrict restrict; do
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534/* end confdefs.h. */
6535typedef int * int_ptr;
6536 int foo (int_ptr $ac_kw ip) {
6537 return ip[0];
6538 }
6539int
6540main ()
6541{
6542int s[1];
6543 int * $ac_kw t = s;
6544 t[0] = 0;
6545 return foo(t)
6546 ;
6547 return 0;
6548}
6549_ACEOF
6550if ac_fn_c_try_compile "$LINENO"; then :
6551 ac_cv_c_restrict=$ac_kw
6552fi
6553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6554 test "$ac_cv_c_restrict" != no && break
6555 done
6556
6557fi
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
6559$as_echo "$ac_cv_c_restrict" >&6; }
6560
6561 case $ac_cv_c_restrict in
6562 restrict) ;;
6563 no) $as_echo "#define restrict /**/" >>confdefs.h
6564 ;;
6565 *) cat >>confdefs.h <<_ACEOF
6566#define restrict $ac_cv_c_restrict
6567_ACEOF
6568 ;;
6569 esac
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583 :
6584
6585
6586
6587
6588
6589
6590
6591 if test $gl_cv_have_include_next = yes; then
6592 gl_cv_next_string_h='<'string.h'>'
6593 else
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
6595$as_echo_n "checking absolute name of <string.h>... " >&6; }
6596if test "${gl_cv_next_string_h+set}" = set; then :
6597 $as_echo_n "(cached) " >&6
6598else
6599
6600 if test $ac_cv_header_string_h = yes; then
6601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6602/* end confdefs.h. */
6603#include <string.h>
6604
6605_ACEOF
6606 case "$host_os" in
6607 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6608 *) gl_absname_cpp="$ac_cpp" ;;
6609 esac
6610 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6611 sed -n '\#/string.h#{
6612 s#.*"\(.*/string.h\)".*#\1#
6613 s#^/[^/]#//&#
6614 p
6615 q
6616 }'`'"'
6617 else
6618 gl_cv_next_string_h='<'string.h'>'
6619 fi
f434ba03
PA
6620
6621fi
55a8c076
YQ
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
6623$as_echo "$gl_cv_next_string_h" >&6; }
6624 fi
6625 NEXT_STRING_H=$gl_cv_next_string_h
f434ba03 6626
55a8c076
YQ
6627 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6628 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6629 gl_next_as_first_directive='<'string.h'>'
6630 else
6631 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6632 gl_next_as_first_directive=$gl_cv_next_string_h
6633 fi
6634 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
f434ba03
PA
6635
6636
6637
f434ba03
PA
6638
6639
55a8c076
YQ
6640 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
6641 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
6643$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
6644if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
f434ba03
PA
6645 $as_echo_n "(cached) " >&6
6646else
6647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6648/* end confdefs.h. */
55a8c076
YQ
6649#include <string.h>
6650
f434ba03
PA
6651int
6652main ()
6653{
55a8c076
YQ
6654#undef $gl_func
6655 (void) $gl_func;
f434ba03
PA
6656 ;
6657 return 0;
6658}
6659_ACEOF
6660if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 6661 eval "$as_gl_Symbol=yes"
f434ba03 6662else
55a8c076 6663 eval "$as_gl_Symbol=no"
f434ba03
PA
6664fi
6665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6666fi
55a8c076
YQ
6667eval ac_res=\$$as_gl_Symbol
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6669$as_echo "$ac_res" >&6; }
6670 eval as_val=\$$as_gl_Symbol
6671 if test "x$as_val" = x""yes; then :
6672 cat >>confdefs.h <<_ACEOF
6673#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
f434ba03 6674_ACEOF
f434ba03 6675
55a8c076 6676 eval ac_cv_have_decl_$gl_func=yes
f434ba03 6677fi
55a8c076 6678 done
f434ba03
PA
6679
6680
6681
55a8c076
YQ
6682 GNULIB_BTOWC=0;
6683 GNULIB_WCTOB=0;
6684 GNULIB_MBSINIT=0;
6685 GNULIB_MBRTOWC=0;
6686 GNULIB_MBRLEN=0;
6687 GNULIB_MBSRTOWCS=0;
6688 GNULIB_MBSNRTOWCS=0;
6689 GNULIB_WCRTOMB=0;
6690 GNULIB_WCSRTOMBS=0;
6691 GNULIB_WCSNRTOMBS=0;
6692 GNULIB_WCWIDTH=0;
6693 HAVE_BTOWC=1;
6694 HAVE_MBSINIT=1;
6695 HAVE_MBRTOWC=1;
6696 HAVE_MBRLEN=1;
6697 HAVE_MBSRTOWCS=1;
6698 HAVE_MBSNRTOWCS=1;
6699 HAVE_WCRTOMB=1;
6700 HAVE_WCSRTOMBS=1;
6701 HAVE_WCSNRTOMBS=1;
6702 HAVE_DECL_WCTOB=1;
6703 HAVE_DECL_WCWIDTH=1;
6704 REPLACE_MBSTATE_T=0;
6705 REPLACE_BTOWC=0;
6706 REPLACE_WCTOB=0;
6707 REPLACE_MBSINIT=0;
6708 REPLACE_MBRTOWC=0;
6709 REPLACE_MBRLEN=0;
6710 REPLACE_MBSRTOWCS=0;
6711 REPLACE_MBSNRTOWCS=0;
6712 REPLACE_WCRTOMB=0;
6713 REPLACE_WCSRTOMBS=0;
6714 REPLACE_WCSNRTOMBS=0;
6715 REPLACE_WCWIDTH=0;
f434ba03
PA
6716
6717
55a8c076
YQ
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
6719$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
6720if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 6721 $as_echo_n "(cached) " >&6
783e057b 6722else
55a8c076
YQ
6723 gl_cv_header_wchar_h_correct_inline=yes
6724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6725/* end confdefs.h. */
81ecdfbb 6726
55a8c076
YQ
6727 #define wcstod renamed_wcstod
6728#include <wchar.h>
6729extern int zero (void);
6730int main () { return zero(); }
6731
783e057b 6732_ACEOF
55a8c076
YQ
6733 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6734 (eval $ac_compile) 2>&5
6735 ac_status=$?
6736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6737 test $ac_status = 0; }; then
6738 mv conftest.$ac_objext conftest1.$ac_objext
6739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6740/* end confdefs.h. */
783e057b 6741
55a8c076
YQ
6742 #define wcstod renamed_wcstod
6743#include <wchar.h>
6744int zero (void) { return 0; }
783e057b 6745
55a8c076
YQ
6746_ACEOF
6747 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6748 (eval $ac_compile) 2>&5
6749 ac_status=$?
6750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6751 test $ac_status = 0; }; then
6752 mv conftest.$ac_objext conftest2.$ac_objext
6753 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
6754 :
6755 else
6756 gl_cv_header_wchar_h_correct_inline=no
6757 fi
6758 fi
6759 fi
6760 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b 6761
55a8c076
YQ
6762fi
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
6764$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
6765 if test $gl_cv_header_wchar_h_correct_inline = no; then
6766 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6767This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
6768C99 mode. You have four options:
6769 - Add the flag -fgnu89-inline to CC and reconfigure, or
6770 - Fix your include files, using parts of
6771 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6772 - Use a gcc version older than 4.3, or
6773 - Don't use the flags -std=c99 or -std=gnu99.
6774Configuration aborted." "$LINENO" 5
783e057b
DJ
6775 fi
6776
6777
55a8c076
YQ
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
6779$as_echo_n "checking for wint_t... " >&6; }
6780if test "${gt_cv_c_wint_t+set}" = set; then :
81ecdfbb 6781 $as_echo_n "(cached) " >&6
783e057b 6782else
81ecdfbb 6783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6784/* end confdefs.h. */
81ecdfbb 6785
55a8c076
YQ
6786/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
6787 <wchar.h>.
6788 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
6789 before <wchar.h>. */
6790#include <stddef.h>
6791#include <stdio.h>
6792#include <time.h>
6793#include <wchar.h>
6794 wint_t foo = (wchar_t)'\0';
783e057b
DJ
6795int
6796main ()
6797{
55a8c076 6798
783e057b
DJ
6799 ;
6800 return 0;
6801}
783e057b 6802_ACEOF
55a8c076
YQ
6803if ac_fn_c_try_compile "$LINENO"; then :
6804 gt_cv_c_wint_t=yes
783e057b 6805else
55a8c076 6806 gt_cv_c_wint_t=no
783e057b 6807fi
55a8c076 6808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 6809fi
55a8c076
YQ
6810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
6811$as_echo "$gt_cv_c_wint_t" >&6; }
6812 if test $gt_cv_c_wint_t = yes; then
783e057b 6813
55a8c076 6814$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b
DJ
6815
6816 fi
6817
6818
55a8c076
YQ
6819 if false; then
6820 GL_COND_LIBTOOL_TRUE=
6821 GL_COND_LIBTOOL_FALSE='#'
6822else
6823 GL_COND_LIBTOOL_TRUE='#'
6824 GL_COND_LIBTOOL_FALSE=
6825fi
783e057b 6826
55a8c076
YQ
6827 gl_cond_libtool=false
6828 gl_libdeps=
6829 gl_ltlibdeps=
6830 gl_m4_base='gnulib/m4'
783e057b
DJ
6831
6832
6833
6834
6835
6836
6837
6838
55a8c076
YQ
6839
6840 gl_source_base='gnulib'
6841 # Code from module arg-nonnull:
6842 # Code from module c++defs:
6843 # Code from module extensions:
6844 # Code from module include_next:
6845 # Code from module inttypes:
6846
6847
6848
6849
6850 :
6851
6852
6853
6854
6855
6856
6857 :
6858
6859
6860
6861
6862
6863
6864 :
6865
6866
6867
6868
6869
6870
6871 :
6872
6873
6874
6875
6876
6877
6878 :
6879
6880
6881
6882
6883
6884
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
6886$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
6887if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
81ecdfbb 6888 $as_echo_n "(cached) " >&6
783e057b 6889else
55a8c076
YQ
6890 gl_cv_header_working_inttypes_h=no
6891 if test "$gl_cv_header_working_stdint_h" = yes \
6892 && test $ac_cv_header_inttypes_h = yes \
6893 && test "$ac_cv_have_decl_imaxabs" = yes \
6894 && test "$ac_cv_have_decl_imaxdiv" = yes \
6895 && test "$ac_cv_have_decl_strtoimax" = yes \
6896 && test "$ac_cv_have_decl_strtoumax" = yes; then
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6898/* end confdefs.h. */
55a8c076
YQ
6899
6900
6901#include <stddef.h>
6902#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6903#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6904#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
6905#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
6906#include <inttypes.h>
6907
6908/* No need to duplicate the tests of stdint.m4; they are subsumed by
6909 $gl_cv_header_working_stdint_h = yes. */
6910
6911/* Tests for macros supposed to be defined in inttypes.h. */
6912
6913const char *k = /* implicit string concatenation */
6914#ifdef INT8_MAX
6915 PRId8 PRIi8
6916#endif
6917#ifdef UINT8_MAX
6918 PRIo8 PRIu8 PRIx8 PRIX8
6919#endif
6920#ifdef INT16_MAX
6921 PRId16 PRIi16
6922#endif
6923#ifdef UINT16_MAX
6924 PRIo16 PRIu16 PRIx16 PRIX16
6925#endif
6926#ifdef INT32_MAX
6927 PRId32 PRIi32
6928#endif
6929#ifdef UINT32_MAX
6930 PRIo32 PRIu32 PRIx32 PRIX32
6931#endif
6932#ifdef INT64_MAX
6933 PRId64 PRIi64
6934#endif
6935#ifdef UINT64_MAX
6936 PRIo64 PRIu64 PRIx64 PRIX64
6937#endif
6938 PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
6939 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
6940 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
6941 PRIdLEAST64 PRIiLEAST64
6942 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
6943 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
6944 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
6945 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
6946 PRIdFAST64 PRIiFAST64
6947 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
6948 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
6949#ifdef INTPTR_MAX
6950 PRIdPTR PRIiPTR
6951#endif
6952#ifdef UINTPTR_MAX
6953 PRIoPTR PRIuPTR PRIxPTR PRIXPTR
6954#endif
6955 ;
6956const char *l = /* implicit string concatenation */
6957#ifdef INT8_MAX
6958 SCNd8 SCNi8
6959#endif
6960#ifdef UINT8_MAX
6961 SCNo8 SCNu8 SCNx8
6962#endif
6963#ifdef INT16_MAX
6964 SCNd16 SCNi16
6965#endif
6966#ifdef UINT16_MAX
6967 SCNo16 SCNu16 SCNx16
6968#endif
6969#ifdef INT32_MAX
6970 SCNd32 SCNi32
6971#endif
6972#ifdef UINT32_MAX
6973 SCNo32 SCNu32 SCNx32
6974#endif
6975#ifdef INT64_MAX
6976 SCNd64 SCNi64
6977#endif
6978#ifdef UINT64_MAX
6979 SCNo64 SCNu64 SCNx64
6980#endif
6981 SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
6982 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
6983 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
6984 SCNdLEAST64 SCNiLEAST64
6985 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
6986 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
6987 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
6988 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
6989 SCNdFAST64 SCNiFAST64
6990 SCNoFAST64 SCNuFAST64 SCNxFAST64
6991 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
6992#ifdef INTPTR_MAX
6993 SCNdPTR SCNiPTR
6994#endif
6995#ifdef UINTPTR_MAX
6996 SCNoPTR SCNuPTR SCNxPTR
6997#endif
6998 ;
6999
783e057b
DJ
7000int
7001main ()
7002{
55a8c076 7003
783e057b
DJ
7004 ;
7005 return 0;
7006}
7007_ACEOF
81ecdfbb 7008if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 7009 gl_cv_header_working_inttypes_h=yes
783e057b 7010fi
81ecdfbb 7011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55a8c076 7012 fi
783e057b 7013fi
55a8c076
YQ
7014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
7015$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
783e057b
DJ
7016
7017
7018
7019
7020
f434ba03 7021
783e057b
DJ
7022 :
7023
7024
7025
7026
7027
7028
7029
f434ba03 7030 if test $gl_cv_have_include_next = yes; then
55a8c076 7031 gl_cv_next_inttypes_h='<'inttypes.h'>'
f434ba03 7032 else
55a8c076
YQ
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
7034$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
7035if test "${gl_cv_next_inttypes_h+set}" = set; then :
f434ba03
PA
7036 $as_echo_n "(cached) " >&6
7037else
7038
55a8c076 7039 if test $ac_cv_header_inttypes_h = yes; then
f434ba03
PA
7040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7041/* end confdefs.h. */
55a8c076 7042#include <inttypes.h>
f434ba03
PA
7043
7044_ACEOF
7045 case "$host_os" in
7046 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7047 *) gl_absname_cpp="$ac_cpp" ;;
7048 esac
55a8c076
YQ
7049 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7050 sed -n '\#/inttypes.h#{
7051 s#.*"\(.*/inttypes.h\)".*#\1#
f434ba03
PA
7052 s#^/[^/]#//&#
7053 p
7054 q
7055 }'`'"'
7056 else
55a8c076 7057 gl_cv_next_inttypes_h='<'inttypes.h'>'
f434ba03
PA
7058 fi
7059
7060fi
55a8c076
YQ
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
7062$as_echo "$gl_cv_next_inttypes_h" >&6; }
f434ba03 7063 fi
55a8c076 7064 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
f434ba03
PA
7065
7066 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7067 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55a8c076 7068 gl_next_as_first_directive='<'inttypes.h'>'
f434ba03
PA
7069 else
7070 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55a8c076 7071 gl_next_as_first_directive=$gl_cv_next_inttypes_h
f434ba03 7072 fi
55a8c076 7073 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
f434ba03
PA
7074
7075
7076
7077
7078
f434ba03 7079
55a8c076
YQ
7080
7081$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
7082
7083
7084
7085 PRIPTR_PREFIX=
7086 if test -n "$STDINT_H"; then
7087 PRIPTR_PREFIX='"l"'
7088 else
7089 for glpfx in '' l ll I64; do
7090 case $glpfx in
7091 '') gltype1='int';;
7092 l) gltype1='long int';;
7093 ll) gltype1='long long int';;
7094 I64) gltype1='__int64';;
7095 esac
7096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7097/* end confdefs.h. */
7098#include <stdint.h>
7099 extern intptr_t foo;
7100 extern $gltype1 foo;
f434ba03
PA
7101int
7102main ()
7103{
55a8c076 7104
f434ba03
PA
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 7110 PRIPTR_PREFIX='"'$glpfx'"'
f434ba03
PA
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55a8c076
YQ
7113 test -n "$PRIPTR_PREFIX" && break
7114 done
7115 fi
f434ba03 7116
f434ba03 7117
55a8c076
YQ
7118 if test "$ac_cv_have_decl_imaxabs" = yes; then
7119 HAVE_DECL_IMAXABS=1
7120 else
7121 HAVE_DECL_IMAXABS=0
7122 fi
f434ba03 7123
55a8c076
YQ
7124 if test "$ac_cv_have_decl_imaxdiv" = yes; then
7125 HAVE_DECL_IMAXDIV=1
7126 else
7127 HAVE_DECL_IMAXDIV=0
7128 fi
f434ba03 7129
55a8c076
YQ
7130 if test "$ac_cv_have_decl_strtoimax" = yes; then
7131 HAVE_DECL_STRTOIMAX=1
7132 else
7133 HAVE_DECL_STRTOIMAX=0
7134 fi
f434ba03 7135
55a8c076
YQ
7136 if test "$ac_cv_have_decl_strtoumax" = yes; then
7137 HAVE_DECL_STRTOUMAX=1
7138 else
7139 HAVE_DECL_STRTOUMAX=0
7140 fi
f434ba03 7141
55a8c076
YQ
7142
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
7144$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
7145if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
81ecdfbb 7146 $as_echo_n "(cached) " >&6
783e057b 7147else
55a8c076 7148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 7149/* end confdefs.h. */
55a8c076
YQ
7150/* Work also in C++ mode. */
7151 #define __STDC_LIMIT_MACROS 1
7152
7153 /* Work if build is not clean. */
7154 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7155
7156 #include <limits.h>
7157 #if HAVE_STDINT_H
7158 #include <stdint.h>
7159 #endif
7160
7161 #if defined INT32_MAX && defined INTMAX_MAX
7162 #define CONDITION (INT32_MAX < INTMAX_MAX)
7163 #elif HAVE_LONG_LONG_INT
7164 #define CONDITION (sizeof (int) < sizeof (long long int))
7165 #else
7166 #define CONDITION 0
7167 #endif
7168 int test[CONDITION ? 1 : -1];
7169int
7170main ()
7171{
f434ba03 7172
55a8c076
YQ
7173 ;
7174 return 0;
7175}
783e057b 7176_ACEOF
55a8c076
YQ
7177if ac_fn_c_try_compile "$LINENO"; then :
7178 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
7179else
7180 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
783e057b 7181fi
55a8c076
YQ
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183fi
7184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
7185$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
7186 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
7187 INT32_MAX_LT_INTMAX_MAX=1;
7188 else
7189 INT32_MAX_LT_INTMAX_MAX=0;
f434ba03 7190 fi
783e057b
DJ
7191
7192
55a8c076
YQ
7193 if test $APPLE_UNIVERSAL_BUILD = 0; then
7194
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
7196$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
7197if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
f434ba03
PA
7198 $as_echo_n "(cached) " >&6
7199else
7200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7201/* end confdefs.h. */
55a8c076
YQ
7202/* Work also in C++ mode. */
7203 #define __STDC_LIMIT_MACROS 1
7204
7205 /* Work if build is not clean. */
7206 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7207
7208 #include <limits.h>
7209 #if HAVE_STDINT_H
7210 #include <stdint.h>
7211 #endif
7212
7213 #if defined INT64_MAX
7214 #define CONDITION (INT64_MAX == LONG_MAX)
7215 #elif HAVE_LONG_LONG_INT
7216 #define CONDITION (sizeof (long long int) == sizeof (long int))
7217 #else
7218 #define CONDITION 0
7219 #endif
7220 int test[CONDITION ? 1 : -1];
f434ba03
PA
7221int
7222main ()
7223{
783e057b 7224
f434ba03
PA
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 7230 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
f434ba03 7231else
55a8c076 7232 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
f434ba03
PA
7233fi
7234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7235fi
55a8c076
YQ
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
7237$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
7238 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
7239 INT64_MAX_EQ_LONG_MAX=1;
7240 else
7241 INT64_MAX_EQ_LONG_MAX=0;
7242 fi
783e057b 7243
783e057b 7244
55a8c076
YQ
7245 else
7246 INT64_MAX_EQ_LONG_MAX=-1
f434ba03 7247 fi
783e057b 7248
55a8c076
YQ
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
7250$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
7251if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
7252 $as_echo_n "(cached) " >&6
7253else
7254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7255/* end confdefs.h. */
7256/* Work also in C++ mode. */
7257 #define __STDC_LIMIT_MACROS 1
7258
7259 /* Work if build is not clean. */
7260 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7261
7262 #include <limits.h>
7263 #if HAVE_STDINT_H
7264 #include <stdint.h>
7265 #endif
7266
7267 #if defined UINT32_MAX && defined UINTMAX_MAX
7268 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
7269 #elif HAVE_LONG_LONG_INT
7270 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
7271 #else
7272 #define CONDITION 0
7273 #endif
7274 int test[CONDITION ? 1 : -1];
7275int
7276main ()
7277{
783e057b 7278
55a8c076
YQ
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283if ac_fn_c_try_compile "$LINENO"; then :
7284 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
783e057b 7285else
55a8c076
YQ
7286 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
7287fi
7288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 7289fi
55a8c076
YQ
7290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
7291$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
7292 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
7293 UINT32_MAX_LT_UINTMAX_MAX=1;
7294 else
7295 UINT32_MAX_LT_UINTMAX_MAX=0;
7296 fi
783e057b 7297
783e057b 7298
55a8c076
YQ
7299 if test $APPLE_UNIVERSAL_BUILD = 0; then
7300
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
7302$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
7303if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
7304 $as_echo_n "(cached) " >&6
7305else
7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7307/* end confdefs.h. */
7308/* Work also in C++ mode. */
7309 #define __STDC_LIMIT_MACROS 1
7310
7311 /* Work if build is not clean. */
7312 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7313
7314 #include <limits.h>
7315 #if HAVE_STDINT_H
7316 #include <stdint.h>
7317 #endif
7318
7319 #if defined UINT64_MAX
7320 #define CONDITION (UINT64_MAX == ULONG_MAX)
7321 #elif HAVE_LONG_LONG_INT
7322 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
7323 #else
7324 #define CONDITION 0
7325 #endif
7326 int test[CONDITION ? 1 : -1];
7327int
7328main ()
7329{
7330
7331 ;
7332 return 0;
7333}
7334_ACEOF
7335if ac_fn_c_try_compile "$LINENO"; then :
7336 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
7337else
7338 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
7339fi
7340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7341fi
7342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
7343$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
7344 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
7345 UINT64_MAX_EQ_ULONG_MAX=1;
7346 else
7347 UINT64_MAX_EQ_ULONG_MAX=0;
7348 fi
783e057b
DJ
7349
7350
55a8c076
YQ
7351 else
7352 UINT64_MAX_EQ_ULONG_MAX=-1
7353 fi
783e057b
DJ
7354
7355
55a8c076
YQ
7356 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
7357 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7359$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7360if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7361 $as_echo_n "(cached) " >&6
7362else
7363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7364/* end confdefs.h. */
7365#include <inttypes.h>
783e057b 7366
55a8c076
YQ
7367int
7368main ()
7369{
7370#undef $gl_func
7371 (void) $gl_func;
7372 ;
7373 return 0;
7374}
7375_ACEOF
7376if ac_fn_c_try_compile "$LINENO"; then :
7377 eval "$as_gl_Symbol=yes"
7378else
7379 eval "$as_gl_Symbol=no"
7380fi
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382fi
7383eval ac_res=\$$as_gl_Symbol
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7385$as_echo "$ac_res" >&6; }
7386 eval as_val=\$$as_gl_Symbol
7387 if test "x$as_val" = x""yes; then :
7388 cat >>confdefs.h <<_ACEOF
7389#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7390_ACEOF
783e057b 7391
55a8c076
YQ
7392 eval ac_cv_have_decl_$gl_func=yes
7393fi
7394 done
783e057b
DJ
7395
7396
f434ba03 7397 # Code from module memchr:
783e057b 7398
783e057b 7399
783e057b 7400
783e057b 7401
f434ba03 7402 GNULIB_MEMCHR=1
783e057b 7403
783e057b 7404
783e057b 7405
f434ba03 7406$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 7407
783e057b
DJ
7408
7409
f434ba03 7410 # Code from module memmem:
783e057b
DJ
7411
7412
f434ba03
PA
7413 if test $ac_cv_have_decl_memmem = yes; then
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
7415$as_echo_n "checking whether memmem works in linear time... " >&6; }
7416if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 7417 $as_echo_n "(cached) " >&6
783e057b 7418else
81ecdfbb 7419 if test "$cross_compiling" = yes; then :
f434ba03 7420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 7421/* end confdefs.h. */
783e057b 7422
f434ba03
PA
7423#include <features.h>
7424#ifdef __GNU_LIBRARY__
7425 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
7426 Lucky user
7427 #endif
7428#endif
7429#ifdef __CYGWIN__
7430 #include <cygwin/version.h>
7431 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
7432 Lucky user
7433 #endif
7434#endif
783e057b 7435
783e057b 7436_ACEOF
f434ba03
PA
7437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7438 $EGREP "Lucky user" >/dev/null 2>&1; then :
7439 gl_cv_func_memmem_works=yes
783e057b 7440else
f434ba03 7441 gl_cv_func_memmem_works="guessing no"
783e057b 7442fi
f434ba03 7443rm -f conftest*
783e057b
DJ
7444
7445
783e057b 7446else
81ecdfbb 7447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7448/* end confdefs.h. */
7449
f434ba03 7450#include <signal.h> /* for signal */
783e057b
DJ
7451#include <string.h> /* for memmem */
7452#include <stdlib.h> /* for malloc */
7453#include <unistd.h> /* for alarm */
7454
7455int
7456main ()
7457{
7458size_t m = 1000000;
7459 char *haystack = (char *) malloc (2 * m + 1);
7460 char *needle = (char *) malloc (m + 1);
7461 void *result = 0;
7462 /* Failure to compile this test due to missing alarm is okay,
7463 since all such platforms (mingw) also lack memmem. */
f434ba03 7464 signal (SIGALRM, SIG_DFL);
783e057b
DJ
7465 alarm (5);
7466 /* Check for quadratic performance. */
7467 if (haystack && needle)
7468 {
f434ba03
PA
7469 memset (haystack, 'A', 2 * m);
7470 haystack[2 * m] = 'B';
7471 memset (needle, 'A', m);
7472 needle[m] = 'B';
7473 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
7474 }
7475 /* Check for empty needle behavior. */
7476 return !result || !memmem ("a", 1, 0, 0);
7477 ;
7478 return 0;
7479}
7480_ACEOF
81ecdfbb 7481if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
7482 gl_cv_func_memmem_works=yes
7483else
81ecdfbb 7484 gl_cv_func_memmem_works=no
783e057b 7485fi
81ecdfbb
RW
7486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7487 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 7488fi
81ecdfbb 7489
f434ba03 7490
783e057b 7491fi
81ecdfbb
RW
7492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
7493$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
7494 if test "$gl_cv_func_memmem_works" != yes; then
7495 REPLACE_MEMMEM=1
7496
7497
7498
7499
7500
7501
7502
f434ba03 7503
783e057b
DJ
7504 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
7505
7506 fi
7507 fi
7508
f434ba03
PA
7509 # Code from module memmem-simple:
7510
783e057b
DJ
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
81ecdfbb
RW
7522 for ac_func in memmem
7523do :
7524 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
7525if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 7526 cat >>confdefs.h <<_ACEOF
81ecdfbb 7527#define HAVE_MEMMEM 1
783e057b
DJ
7528_ACEOF
7529
7530else
7531
7532 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
7533
7534fi
7535done
7536
7537
7538
7539 :
7540
7541
7542
7543
7544
7545 if test $ac_cv_have_decl_memmem = no; then
7546 HAVE_DECL_MEMMEM=0
7547 fi
7548 :
7549
7550
7551
f434ba03 7552
783e057b
DJ
7553 GNULIB_MEMMEM=1
7554
7555
7556
f434ba03
PA
7557$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
7558
7559
7560
7561 # Code from module multiarch:
7562
7563 # Code from module stddef:
7564
7565
7566
7567 if test $gt_cv_c_wchar_t = no; then
7568 HAVE_WCHAR_T=0
7569 STDDEF_H=stddef.h
7570 fi
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
7572$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
7573if test "${gl_cv_decl_null_works+set}" = set; then :
7574 $as_echo_n "(cached) " >&6
7575else
7576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7577/* end confdefs.h. */
7578#include <stddef.h>
7579 int test[2 * (sizeof NULL == sizeof (void *)) -1];
7580
7581int
7582main ()
7583{
7584
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589if ac_fn_c_try_compile "$LINENO"; then :
7590 gl_cv_decl_null_works=yes
7591else
7592 gl_cv_decl_null_works=no
7593fi
7594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7595fi
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
7597$as_echo "$gl_cv_decl_null_works" >&6; }
7598 if test $gl_cv_decl_null_works = no; then
7599 REPLACE_NULL=1
7600 STDDEF_H=stddef.h
7601 fi
7602 if test -n "$STDDEF_H"; then
7603
7604
7605
7606
7607 :
7608
7609
7610
7611
7612
7613
7614
7615 if test $gl_cv_have_include_next = yes; then
7616 gl_cv_next_stddef_h='<'stddef.h'>'
7617 else
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
7619$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
7620if test "${gl_cv_next_stddef_h+set}" = set; then :
7621 $as_echo_n "(cached) " >&6
7622else
7623
7624 if test $ac_cv_header_stddef_h = yes; then
7625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7626/* end confdefs.h. */
7627#include <stddef.h>
7628
7629_ACEOF
7630 case "$host_os" in
7631 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7632 *) gl_absname_cpp="$ac_cpp" ;;
7633 esac
7634 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7635 sed -n '\#/stddef.h#{
7636 s#.*"\(.*/stddef.h\)".*#\1#
7637 s#^/[^/]#//&#
7638 p
7639 q
7640 }'`'"'
7641 else
7642 gl_cv_next_stddef_h='<'stddef.h'>'
7643 fi
7644
7645fi
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
7647$as_echo "$gl_cv_next_stddef_h" >&6; }
7648 fi
7649 NEXT_STDDEF_H=$gl_cv_next_stddef_h
7650
7651 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7652 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7653 gl_next_as_first_directive='<'stddef.h'>'
7654 else
7655 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7656 gl_next_as_first_directive=$gl_cv_next_stddef_h
7657 fi
7658 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
7659
7660
7661
7662 fi
7663
7664 # Code from module stdint:
7665
7666
783e057b
DJ
7667
7668 if test $ac_cv_type_long_long_int = yes; then
7669 HAVE_LONG_LONG_INT=1
7670 else
7671 HAVE_LONG_LONG_INT=0
7672 fi
7673
7674
7675 if test $ac_cv_type_unsigned_long_long_int = yes; then
7676 HAVE_UNSIGNED_LONG_LONG_INT=1
7677 else
7678 HAVE_UNSIGNED_LONG_LONG_INT=0
7679 fi
7680
7681
7682 if test $ac_cv_header_inttypes_h = yes; then
7683 HAVE_INTTYPES_H=1
7684 else
7685 HAVE_INTTYPES_H=0
7686 fi
7687
7688
7689 if test $ac_cv_header_sys_types_h = yes; then
7690 HAVE_SYS_TYPES_H=1
7691 else
7692 HAVE_SYS_TYPES_H=0
7693 fi
7694
7695
7696
7697
7698
f434ba03 7699
783e057b
DJ
7700 :
7701
7702
7703
7704
7705
7706
7707
7708 if test $gl_cv_have_include_next = yes; then
7709 gl_cv_next_stdint_h='<'stdint.h'>'
7710 else
81ecdfbb
RW
7711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
7712$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
7713if test "${gl_cv_next_stdint_h+set}" = set; then :
7714 $as_echo_n "(cached) " >&6
783e057b
DJ
7715else
7716
f434ba03
PA
7717 if test $ac_cv_header_stdint_h = yes; then
7718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7719/* end confdefs.h. */
7720#include <stdint.h>
7721
7722_ACEOF
f434ba03
PA
7723 case "$host_os" in
7724 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7725 *) gl_absname_cpp="$ac_cpp" ;;
7726 esac
7727 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7728 sed -n '\#/stdint.h#{
7729 s#.*"\(.*/stdint.h\)".*#\1#
7730 s#^/[^/]#//&#
7731 p
7732 q
7733 }'`'"'
7734 else
7735 gl_cv_next_stdint_h='<'stdint.h'>'
7736 fi
783e057b
DJ
7737
7738fi
81ecdfbb
RW
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
7740$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
7741 fi
7742 NEXT_STDINT_H=$gl_cv_next_stdint_h
7743
f434ba03
PA
7744 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7745 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7746 gl_next_as_first_directive='<'stdint.h'>'
7747 else
7748 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7749 gl_next_as_first_directive=$gl_cv_next_stdint_h
7750 fi
7751 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
7752
783e057b
DJ
7753
7754
7755 if test $ac_cv_header_stdint_h = yes; then
7756 HAVE_STDINT_H=1
7757 else
7758 HAVE_STDINT_H=0
7759 fi
7760
7761
7762 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
7764$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
7765if test "${gl_cv_header_working_stdint_h+set}" = set; then :
7766 $as_echo_n "(cached) " >&6
783e057b
DJ
7767else
7768 gl_cv_header_working_stdint_h=no
81ecdfbb 7769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7770/* end confdefs.h. */
7771
81ecdfbb 7772
783e057b
DJ
7773#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
7774#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
7775#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
7776#include <stdint.h>
7777/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
7778#if !(defined WCHAR_MIN && defined WCHAR_MAX)
7779#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
7780#endif
7781
7782
7783 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7784 included before <wchar.h>. */
7785 #include <stddef.h>
7786 #include <signal.h>
7787 #if HAVE_WCHAR_H
7788 # include <stdio.h>
7789 # include <time.h>
7790 # include <wchar.h>
7791 #endif
7792
7793
7794#ifdef INT8_MAX
7795int8_t a1 = INT8_MAX;
7796int8_t a1min = INT8_MIN;
7797#endif
7798#ifdef INT16_MAX
7799int16_t a2 = INT16_MAX;
7800int16_t a2min = INT16_MIN;
7801#endif
7802#ifdef INT32_MAX
7803int32_t a3 = INT32_MAX;
7804int32_t a3min = INT32_MIN;
7805#endif
7806#ifdef INT64_MAX
7807int64_t a4 = INT64_MAX;
7808int64_t a4min = INT64_MIN;
7809#endif
7810#ifdef UINT8_MAX
7811uint8_t b1 = UINT8_MAX;
7812#else
7813typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
7814#endif
7815#ifdef UINT16_MAX
7816uint16_t b2 = UINT16_MAX;
7817#endif
7818#ifdef UINT32_MAX
7819uint32_t b3 = UINT32_MAX;
7820#endif
7821#ifdef UINT64_MAX
7822uint64_t b4 = UINT64_MAX;
7823#endif
7824int_least8_t c1 = INT8_C (0x7f);
7825int_least8_t c1max = INT_LEAST8_MAX;
7826int_least8_t c1min = INT_LEAST8_MIN;
7827int_least16_t c2 = INT16_C (0x7fff);
7828int_least16_t c2max = INT_LEAST16_MAX;
7829int_least16_t c2min = INT_LEAST16_MIN;
7830int_least32_t c3 = INT32_C (0x7fffffff);
7831int_least32_t c3max = INT_LEAST32_MAX;
7832int_least32_t c3min = INT_LEAST32_MIN;
7833int_least64_t c4 = INT64_C (0x7fffffffffffffff);
7834int_least64_t c4max = INT_LEAST64_MAX;
7835int_least64_t c4min = INT_LEAST64_MIN;
7836uint_least8_t d1 = UINT8_C (0xff);
7837uint_least8_t d1max = UINT_LEAST8_MAX;
7838uint_least16_t d2 = UINT16_C (0xffff);
7839uint_least16_t d2max = UINT_LEAST16_MAX;
7840uint_least32_t d3 = UINT32_C (0xffffffff);
7841uint_least32_t d3max = UINT_LEAST32_MAX;
7842uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
7843uint_least64_t d4max = UINT_LEAST64_MAX;
7844int_fast8_t e1 = INT_FAST8_MAX;
7845int_fast8_t e1min = INT_FAST8_MIN;
7846int_fast16_t e2 = INT_FAST16_MAX;
7847int_fast16_t e2min = INT_FAST16_MIN;
7848int_fast32_t e3 = INT_FAST32_MAX;
7849int_fast32_t e3min = INT_FAST32_MIN;
7850int_fast64_t e4 = INT_FAST64_MAX;
7851int_fast64_t e4min = INT_FAST64_MIN;
7852uint_fast8_t f1 = UINT_FAST8_MAX;
7853uint_fast16_t f2 = UINT_FAST16_MAX;
7854uint_fast32_t f3 = UINT_FAST32_MAX;
7855uint_fast64_t f4 = UINT_FAST64_MAX;
7856#ifdef INTPTR_MAX
7857intptr_t g = INTPTR_MAX;
7858intptr_t gmin = INTPTR_MIN;
7859#endif
7860#ifdef UINTPTR_MAX
7861uintptr_t h = UINTPTR_MAX;
7862#endif
7863intmax_t i = INTMAX_MAX;
7864uintmax_t j = UINTMAX_MAX;
7865
7866#include <limits.h> /* for CHAR_BIT */
7867#define TYPE_MINIMUM(t) \
7868 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
7869#define TYPE_MAXIMUM(t) \
7870 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
7871struct s {
7872 int check_PTRDIFF:
7873 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
7874 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
7875 ? 1 : -1;
7876 /* Detect bug in FreeBSD 6.0 / ia64. */
7877 int check_SIG_ATOMIC:
7878 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
7879 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
7880 ? 1 : -1;
7881 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
7882 int check_WCHAR:
7883 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
7884 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
7885 ? 1 : -1;
7886 /* Detect bug in mingw. */
7887 int check_WINT:
7888 WINT_MIN == TYPE_MINIMUM (wint_t)
7889 && WINT_MAX == TYPE_MAXIMUM (wint_t)
7890 ? 1 : -1;
7891
f434ba03
PA
7892 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
7893 int check_UINT8_C:
7894 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
7895 int check_UINT16_C:
7896 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
7897
7898 /* Detect bugs in OpenBSD 3.9 stdint.h. */
7899#ifdef UINT8_MAX
7900 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
7901#endif
7902#ifdef UINT16_MAX
7903 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
7904#endif
7905#ifdef UINT32_MAX
7906 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
7907#endif
7908#ifdef UINT64_MAX
7909 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
7910#endif
7911 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
7912 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
7913 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
7914 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
7915 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
7916 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
7917 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
7918 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
7919 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
7920 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
7921 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
7922};
7923
7924int
7925main ()
7926{
7927
7928 ;
7929 return 0;
7930}
7931_ACEOF
7932if ac_fn_c_try_compile "$LINENO"; then :
7933 if test "$cross_compiling" = yes; then :
7934 gl_cv_header_working_stdint_h=yes
7935
7936else
7937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7938/* end confdefs.h. */
7939
7940
7941#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
7942#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
7943#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
7944#include <stdint.h>
7945
783e057b 7946
f434ba03
PA
7947 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7948 included before <wchar.h>. */
7949 #include <stddef.h>
7950 #include <signal.h>
7951 #if HAVE_WCHAR_H
7952 # include <stdio.h>
7953 # include <time.h>
7954 # include <wchar.h>
7955 #endif
7956
7957
7958#include <stdio.h>
7959#include <string.h>
7960#define MVAL(macro) MVAL1(macro)
7961#define MVAL1(expression) #expression
7962static const char *macro_values[] =
7963 {
7964#ifdef INT8_MAX
7965 MVAL (INT8_MAX),
7966#endif
7967#ifdef INT16_MAX
7968 MVAL (INT16_MAX),
7969#endif
7970#ifdef INT32_MAX
7971 MVAL (INT32_MAX),
7972#endif
7973#ifdef INT64_MAX
7974 MVAL (INT64_MAX),
7975#endif
783e057b 7976#ifdef UINT8_MAX
f434ba03 7977 MVAL (UINT8_MAX),
783e057b
DJ
7978#endif
7979#ifdef UINT16_MAX
f434ba03 7980 MVAL (UINT16_MAX),
783e057b
DJ
7981#endif
7982#ifdef UINT32_MAX
f434ba03 7983 MVAL (UINT32_MAX),
783e057b
DJ
7984#endif
7985#ifdef UINT64_MAX
f434ba03 7986 MVAL (UINT64_MAX),
783e057b 7987#endif
f434ba03
PA
7988 NULL
7989 };
783e057b
DJ
7990
7991int
7992main ()
7993{
7994
f434ba03
PA
7995 const char **mv;
7996 for (mv = macro_values; *mv != NULL; mv++)
7997 {
7998 const char *value = *mv;
7999 /* Test whether it looks like a cast expression. */
8000 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
8001 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
8002 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
8003 || strncmp (value, "((int)"/*)*/, 6) == 0
8004 || strncmp (value, "((signed short)"/*)*/, 15) == 0
8005 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
8006 return 1;
8007 }
8008 return 0;
8009
783e057b
DJ
8010 ;
8011 return 0;
8012}
8013_ACEOF
f434ba03 8014if ac_fn_c_try_run "$LINENO"; then :
783e057b 8015 gl_cv_header_working_stdint_h=yes
f434ba03
PA
8016fi
8017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8018 conftest.$ac_objext conftest.beam conftest.$ac_ext
8019fi
8020
8021
783e057b 8022fi
81ecdfbb 8023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 8024
783e057b 8025fi
81ecdfbb
RW
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
8027$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
8028 fi
8029 if test "$gl_cv_header_working_stdint_h" = yes; then
8030 STDINT_H=
8031 else
81ecdfbb
RW
8032 for ac_header in sys/inttypes.h sys/bitypes.h
8033do :
8034 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8035ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8036eval as_val=\$$as_ac_Header
8037 if test "x$as_val" = x""yes; then :
783e057b 8038 cat >>confdefs.h <<_ACEOF
81ecdfbb 8039#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
8040_ACEOF
8041
8042fi
8043
8044done
8045
8046 if test $ac_cv_header_sys_inttypes_h = yes; then
8047 HAVE_SYS_INTTYPES_H=1
8048 else
8049 HAVE_SYS_INTTYPES_H=0
8050 fi
8051
8052 if test $ac_cv_header_sys_bitypes_h = yes; then
8053 HAVE_SYS_BITYPES_H=1
8054 else
8055 HAVE_SYS_BITYPES_H=0
8056 fi
8057
8058
8059
8060 :
8061
8062
8063
8064
8065
8066
8067
8068
f434ba03
PA
8069 if test $APPLE_UNIVERSAL_BUILD = 0; then
8070
8071
8072 for gltype in ptrdiff_t size_t ; do
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8074$as_echo_n "checking for bit size of $gltype... " >&6; }
8075if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8076 $as_echo_n "(cached) " >&6
8077else
8078 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8079 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8080 included before <wchar.h>. */
8081 #include <stddef.h>
8082 #include <signal.h>
8083 #if HAVE_WCHAR_H
8084 # include <stdio.h>
8085 # include <time.h>
8086 # include <wchar.h>
8087 #endif
8088
8089#include <limits.h>"; then :
8090
8091else
8092 result=unknown
8093fi
8094
8095 eval gl_cv_bitsizeof_${gltype}=\$result
8096
8097fi
8098eval ac_res=\$gl_cv_bitsizeof_${gltype}
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8100$as_echo "$ac_res" >&6; }
8101 eval result=\$gl_cv_bitsizeof_${gltype}
8102 if test $result = unknown; then
8103 result=0
8104 fi
8105 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8106 cat >>confdefs.h <<_ACEOF
8107#define BITSIZEOF_${GLTYPE} $result
8108_ACEOF
8109
8110 eval BITSIZEOF_${GLTYPE}=\$result
8111 done
8112
8113
8114 fi
8115
783e057b 8116
f434ba03 8117 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8119$as_echo_n "checking for bit size of $gltype... " >&6; }
8120if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8121 $as_echo_n "(cached) " >&6
8122else
8123 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8124 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8125 included before <wchar.h>. */
8126 #include <stddef.h>
8127 #include <signal.h>
8128 #if HAVE_WCHAR_H
8129 # include <stdio.h>
8130 # include <time.h>
8131 # include <wchar.h>
8132 #endif
8133
8134#include <limits.h>"; then :
8135
8136else
8137 result=unknown
8138fi
8139
8140 eval gl_cv_bitsizeof_${gltype}=\$result
8141
8142fi
8143eval ac_res=\$gl_cv_bitsizeof_${gltype}
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8145$as_echo "$ac_res" >&6; }
8146 eval result=\$gl_cv_bitsizeof_${gltype}
8147 if test $result = unknown; then
8148 result=0
8149 fi
8150 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8151 cat >>confdefs.h <<_ACEOF
8152#define BITSIZEOF_${GLTYPE} $result
8153_ACEOF
783e057b 8154
81ecdfbb
RW
8155 eval BITSIZEOF_${GLTYPE}=\$result
8156 done
783e057b
DJ
8157
8158
8159
8160
81ecdfbb
RW
8161 for gltype in sig_atomic_t wchar_t wint_t ; do
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
8163$as_echo_n "checking whether $gltype is signed... " >&6; }
8164if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8165 $as_echo_n "(cached) " >&6
783e057b 8166else
81ecdfbb 8167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
8168/* end confdefs.h. */
8169
8170 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8171 included before <wchar.h>. */
8172 #include <stddef.h>
8173 #include <signal.h>
8174 #if HAVE_WCHAR_H
8175 # include <stdio.h>
8176 # include <time.h>
8177 # include <wchar.h>
8178 #endif
8179
8180 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8181int
8182main ()
8183{
8184
8185 ;
8186 return 0;
8187}
8188_ACEOF
81ecdfbb 8189if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
8190 result=yes
8191else
81ecdfbb 8192 result=no
20e95c23 8193fi
81ecdfbb 8194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
8195 eval gl_cv_type_${gltype}_signed=\$result
8196
8197fi
81ecdfbb
RW
8198eval ac_res=\$gl_cv_type_${gltype}_signed
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8200$as_echo "$ac_res" >&6; }
783e057b
DJ
8201 eval result=\$gl_cv_type_${gltype}_signed
8202 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8203 if test "$result" = yes; then
8204 cat >>confdefs.h <<_ACEOF
8205#define HAVE_SIGNED_${GLTYPE} 1
8206_ACEOF
8207
8208 eval HAVE_SIGNED_${GLTYPE}=1
8209 else
8210 eval HAVE_SIGNED_${GLTYPE}=0
8211 fi
8212 done
8213
8214
8215 gl_cv_type_ptrdiff_t_signed=yes
8216 gl_cv_type_size_t_signed=no
f434ba03 8217 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
8218
8219
f434ba03 8220 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8222$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8223if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8224 $as_echo_n "(cached) " >&6
c906108c 8225else
783e057b
DJ
8226 eval gl_cv_type_${gltype}_suffix=no
8227 eval result=\$gl_cv_type_${gltype}_signed
8228 if test "$result" = yes; then
8229 glsufu=
8230 else
8231 glsufu=u
8232 fi
8233 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8234 case $glsuf in
8235 '') gltype1='int';;
f434ba03
PA
8236 l) gltype1='long int';;
8237 ll) gltype1='long long int';;
8238 i64) gltype1='__int64';;
8239 u) gltype1='unsigned int';;
8240 ul) gltype1='unsigned long int';;
8241 ull) gltype1='unsigned long long int';;
783e057b
DJ
8242 ui64)gltype1='unsigned __int64';;
8243 esac
81ecdfbb 8244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
8245/* end confdefs.h. */
8246
8247 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8248 included before <wchar.h>. */
8249 #include <stddef.h>
8250 #include <signal.h>
8251 #if HAVE_WCHAR_H
8252 # include <stdio.h>
8253 # include <time.h>
8254 # include <wchar.h>
8255 #endif
8256
8257 extern $gltype foo;
8258 extern $gltype1 foo;
8259int
8260main ()
8261{
8262
8263 ;
8264 return 0;
8265}
8266_ACEOF
81ecdfbb 8267if ac_fn_c_try_compile "$LINENO"; then :
783e057b 8268 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 8269fi
81ecdfbb 8270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
8271 eval result=\$gl_cv_type_${gltype}_suffix
8272 test "$result" != no && break
8273 done
8274fi
81ecdfbb
RW
8275eval ac_res=\$gl_cv_type_${gltype}_suffix
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8277$as_echo "$ac_res" >&6; }
783e057b
DJ
8278 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8279 eval result=\$gl_cv_type_${gltype}_suffix
8280 test "$result" = no && result=
8281 eval ${GLTYPE}_SUFFIX=\$result
8282 cat >>confdefs.h <<_ACEOF
8283#define ${GLTYPE}_SUFFIX $result
8284_ACEOF
8285
8286 done
8287
8288
783e057b
DJ
8289 fi
8290
8291
f434ba03
PA
8292 for gltype in sig_atomic_t wchar_t wint_t ; do
8293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8294$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8295if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 8296 $as_echo_n "(cached) " >&6
783e057b 8297else
f434ba03
PA
8298 eval gl_cv_type_${gltype}_suffix=no
8299 eval result=\$gl_cv_type_${gltype}_signed
8300 if test "$result" = yes; then
8301 glsufu=
8302 else
8303 glsufu=u
8304 fi
8305 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8306 case $glsuf in
8307 '') gltype1='int';;
8308 l) gltype1='long int';;
8309 ll) gltype1='long long int';;
8310 i64) gltype1='__int64';;
8311 u) gltype1='unsigned int';;
8312 ul) gltype1='unsigned long int';;
8313 ull) gltype1='unsigned long long int';;
8314 ui64)gltype1='unsigned __int64';;
8315 esac
8316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 8317/* end confdefs.h. */
f434ba03
PA
8318
8319 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8320 included before <wchar.h>. */
8321 #include <stddef.h>
8322 #include <signal.h>
8323 #if HAVE_WCHAR_H
8324 # include <stdio.h>
8325 # include <time.h>
8326 # include <wchar.h>
8327 #endif
8328
8329 extern $gltype foo;
8330 extern $gltype1 foo;
8331int
8332main ()
8333{
8334
8335 ;
8336 return 0;
8337}
783e057b 8338_ACEOF
81ecdfbb 8339if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 8340 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 8341fi
81ecdfbb 8342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
8343 eval result=\$gl_cv_type_${gltype}_suffix
8344 test "$result" != no && break
8345 done
783e057b 8346fi
f434ba03
PA
8347eval ac_res=\$gl_cv_type_${gltype}_suffix
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8349$as_echo "$ac_res" >&6; }
8350 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8351 eval result=\$gl_cv_type_${gltype}_suffix
8352 test "$result" = no && result=
8353 eval ${GLTYPE}_SUFFIX=\$result
8354 cat >>confdefs.h <<_ACEOF
8355#define ${GLTYPE}_SUFFIX $result
8356_ACEOF
8357
8358 done
8359
8360
8361
8362 STDINT_H=stdint.h
783e057b
DJ
8363 fi
8364
8365
f434ba03
PA
8366 # Code from module string:
8367
8368
8369
8370 # Code from module warn-on-use:
8371 # Code from module wchar:
8372
8373
8374
8375
783e057b
DJ
8376 :
8377
8378
8379
8380
8381
783e057b
DJ
8382
8383
8384
8385
8386 :
8387
8388
8389
8390
8391
8392
8393
8394 if test $gl_cv_have_include_next = yes; then
8395 gl_cv_next_wchar_h='<'wchar.h'>'
8396 else
81ecdfbb
RW
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
8398$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
8399if test "${gl_cv_next_wchar_h+set}" = set; then :
8400 $as_echo_n "(cached) " >&6
783e057b
DJ
8401else
8402
f434ba03
PA
8403 if test $ac_cv_header_wchar_h = yes; then
8404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
8405/* end confdefs.h. */
8406#include <wchar.h>
8407
8408_ACEOF
f434ba03
PA
8409 case "$host_os" in
8410 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8411 *) gl_absname_cpp="$ac_cpp" ;;
8412 esac
8413 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8414 sed -n '\#/wchar.h#{
8415 s#.*"\(.*/wchar.h\)".*#\1#
8416 s#^/[^/]#//&#
8417 p
8418 q
8419 }'`'"'
8420 else
8421 gl_cv_next_wchar_h='<'wchar.h'>'
8422 fi
783e057b
DJ
8423
8424fi
81ecdfbb
RW
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
8426$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
8427 fi
8428 NEXT_WCHAR_H=$gl_cv_next_wchar_h
8429
f434ba03
PA
8430 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8431 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8432 gl_next_as_first_directive='<'wchar.h'>'
8433 else
8434 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8435 gl_next_as_first_directive=$gl_cv_next_wchar_h
8436 fi
8437 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
8438
8439
8440
8441 if test $ac_cv_header_wchar_h = yes; then
8442 HAVE_WCHAR_H=1
8443 else
8444 HAVE_WCHAR_H=0
8445 fi
8446
8447
8448
8449 if test $gt_cv_c_wint_t = yes; then
8450 HAVE_WINT_T=1
8451 else
8452 HAVE_WINT_T=0
8453 fi
8454
8455
8456
8457 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
8458 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8460$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8461if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8462 $as_echo_n "(cached) " >&6
8463else
8464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8465/* end confdefs.h. */
8466
8467/* Some systems require additional headers. */
8468#ifndef __GLIBC__
8469# include <stddef.h>
8470# include <stdio.h>
8471# include <time.h>
8472#endif
8473#include <wchar.h>
8474
8475int
8476main ()
8477{
8478#undef $gl_func
8479 (void) $gl_func;
8480 ;
8481 return 0;
8482}
8483_ACEOF
8484if ac_fn_c_try_compile "$LINENO"; then :
8485 eval "$as_gl_Symbol=yes"
8486else
8487 eval "$as_gl_Symbol=no"
8488fi
8489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8490fi
8491eval ac_res=\$$as_gl_Symbol
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8493$as_echo "$ac_res" >&6; }
8494 eval as_val=\$$as_gl_Symbol
8495 if test "x$as_val" = x""yes; then :
8496 cat >>confdefs.h <<_ACEOF
8497#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8498_ACEOF
8499
8500 eval ac_cv_have_decl_$gl_func=yes
8501fi
8502 done
8503
8504
8505 # Code from module dummy:
8506 # End of code from modules
8507
8508
c906108c 8509
c906108c 8510
c906108c 8511
c906108c 8512
c906108c 8513
c906108c 8514
c906108c 8515
783e057b
DJ
8516 gltests_libdeps=
8517 gltests_ltlibdeps=
20e95c23 8518
20e95c23 8519
20e95c23 8520
f434ba03
PA
8521
8522
8523
8524
8525
8526
783e057b 8527 gl_source_base='tests'
f434ba03
PA
8528 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
8529
8530 gl_module_indicator_condition=$gltests_WITNESS
8531
8532
8533
8534
8535
c906108c 8536
bec39cab 8537
bec39cab 8538
783e057b
DJ
8539
8540 LIBGNU_LIBDEPS="$gl_libdeps"
8541
8542 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
8543
8544
e28b3332 8545
d5af19ba
DJ
8546# For Makefile dependencies.
8547GNULIB_STDINT_H=
8548if test x"$STDINT_H" != x; then
8549 GNULIB_STDINT_H=gnulib/$STDINT_H
8550fi
8551
8552
bec39cab
AC
8553PACKAGE=gdb
8554
8555cat >>confdefs.h <<_ACEOF
8556#define PACKAGE "$PACKAGE"
8557_ACEOF
8558
8559
8560
f06e05e0
JK
8561# We never need to detect it in this sub-configure.
8562# But preserve it for config.status --recheck.
5048e516 8563
5048e516
JK
8564
8565
8566MAKEINFO_EXTRA_FLAGS=""
8567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
8568$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
8569if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
8570 $as_echo_n "(cached) " >&6
8571else
8572 echo '@clicksequence{a @click{} b}' >conftest.texinfo
8573 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
8574 gdb_cv_have_makeinfo_click=yes
8575 else
8576 gdb_cv_have_makeinfo_click=no
8577 fi
8578fi
8579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
8580$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
8581if test x"$gdb_cv_have_makeinfo_click" = xyes; then
8582 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
8583fi
8584
8585
e28b3332
DJ
8586# GDB does not use automake, but gnulib does. This line lets us
8587# generate its Makefile.in.
81ecdfbb
RW
8588am__api_version='1.11'
8589
e28b3332
DJ
8590# Find a good install program. We prefer a C program (faster),
8591# so one script is as good as another. But avoid the broken or
8592# incompatible versions:
8593# SysV /etc/install, /usr/sbin/install
8594# SunOS /usr/etc/install
8595# IRIX /sbin/install
8596# AIX /bin/install
8597# AmigaOS /C/install, which installs bootblocks on floppy discs
8598# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8599# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8600# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8601# OS/2's system install, which has a completely different semantic
8602# ./install, which can be erroneously created by make from ./install.sh.
85541719 8603# Reject install programs that cannot install multiple files.
81ecdfbb
RW
8604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8605$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 8606if test -z "$INSTALL"; then
81ecdfbb
RW
8607if test "${ac_cv_path_install+set}" = set; then :
8608 $as_echo_n "(cached) " >&6
e28b3332
DJ
8609else
8610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613 IFS=$as_save_IFS
8614 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8615 # Account for people who put trailing slashes in PATH elements.
8616case $as_dir/ in #((
8617 ./ | .// | /[cC]/* | \
e28b3332 8618 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 8619 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
8620 /usr/ucb/* ) ;;
8621 *)
8622 # OSF1 and SCO ODT 3.0 have their own names for install.
8623 # Don't use installbsd from OSF since it installs stuff as root
8624 # by default.
8625 for ac_prog in ginstall scoinst install; do
8626 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 8627 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
8628 if test $ac_prog = install &&
8629 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8630 # AIX install. It has an incompatible calling convention.
8631 :
8632 elif test $ac_prog = install &&
8633 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8634 # program-specific install script used by HP pwplus--don't use.
8635 :
8636 else
85541719
DE
8637 rm -rf conftest.one conftest.two conftest.dir
8638 echo one > conftest.one
8639 echo two > conftest.two
8640 mkdir conftest.dir
8641 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8642 test -s conftest.one && test -s conftest.two &&
8643 test -s conftest.dir/conftest.one &&
8644 test -s conftest.dir/conftest.two
8645 then
8646 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8647 break 3
8648 fi
e28b3332
DJ
8649 fi
8650 fi
8651 done
8652 done
8653 ;;
8654esac
81ecdfbb
RW
8655
8656 done
8657IFS=$as_save_IFS
e28b3332 8658
85541719 8659rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
8660
8661fi
8662 if test "${ac_cv_path_install+set}" = set; then
8663 INSTALL=$ac_cv_path_install
8664 else
85541719
DE
8665 # As a last resort, use the slow shell script. Don't cache a
8666 # value for INSTALL within a source directory, because that will
e28b3332 8667 # break other packages using the cache if that directory is
85541719 8668 # removed, or if the value is a relative name.
e28b3332
DJ
8669 INSTALL=$ac_install_sh
8670 fi
8671fi
81ecdfbb
RW
8672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
8673$as_echo "$INSTALL" >&6; }
e28b3332
DJ
8674
8675# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8676# It thinks the first close brace ends the variable substitution.
8677test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8678
8679test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8680
8681test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8682
81ecdfbb
RW
8683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
8684$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
8685# Just in case
8686sleep 1
8687echo timestamp > conftest.file
81ecdfbb
RW
8688# Reject unsafe characters in $srcdir or the absolute working directory
8689# name. Accept space and tab only in the latter.
8690am_lf='
8691'
8692case `pwd` in
8693 *[\\\"\#\$\&\'\`$am_lf]*)
8694 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
8695esac
8696case $srcdir in
8697 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
8698 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
8699esac
8700
e28b3332
DJ
8701# Do `set' in a subshell so we don't clobber the current shell's
8702# arguments. Must try -L first in case configure is actually a
8703# symlink; some systems play weird games with the mod time of symlinks
8704# (eg FreeBSD returns the mod time of the symlink's containing
8705# directory).
8706if (
81ecdfbb 8707 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
8708 if test "$*" = "X"; then
8709 # -L didn't work.
81ecdfbb 8710 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
8711 fi
8712 rm -f conftest.file
8713 if test "$*" != "X $srcdir/configure conftest.file" \
8714 && test "$*" != "X conftest.file $srcdir/configure"; then
8715
8716 # If neither matched, then we have a broken ls. This can happen
8717 # if, for instance, CONFIG_SHELL is bash and it inherits a
8718 # broken ls alias from the environment. This has actually
8719 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
8720 as_fn_error "ls -t appears to fail. Make sure there is not a broken
8721alias in your environment" "$LINENO" 5
e28b3332
DJ
8722 fi
8723
8724 test "$2" = conftest.file
8725 )
8726then
8727 # Ok.
8728 :
8729else
81ecdfbb
RW
8730 as_fn_error "newly created file is older than distributed files!
8731Check your system clock" "$LINENO" 5
e28b3332 8732fi
81ecdfbb
RW
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8734$as_echo "yes" >&6; }
e28b3332 8735test "$program_prefix" != NONE &&
81ecdfbb 8736 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
8737# Use a double $ so make ignores it.
8738test "$program_suffix" != NONE &&
81ecdfbb
RW
8739 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
8740# Double any \ or $.
e28b3332 8741# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
8742ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
8743program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
8744
8745# expand $ac_aux_dir to an absolute path
8746am_aux_dir=`cd $ac_aux_dir && pwd`
8747
81ecdfbb
RW
8748if test x"${MISSING+set}" != xset; then
8749 case $am_aux_dir in
8750 *\ * | *\ *)
8751 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8752 *)
8753 MISSING="\${SHELL} $am_aux_dir/missing" ;;
8754 esac
8755fi
e28b3332
DJ
8756# Use eval to expand $SHELL
8757if eval "$MISSING --run true"; then
8758 am_missing_run="$MISSING --run "
8759else
8760 am_missing_run=
81ecdfbb
RW
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
8762$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
8763fi
8764
8765if test x"${install_sh}" != xset; then
8766 case $am_aux_dir in
8767 *\ * | *\ *)
8768 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8769 *)
8770 install_sh="\${SHELL} $am_aux_dir/install-sh"
8771 esac
8772fi
8773
8774# Installed binaries are usually stripped using `strip' when the user
8775# run `make install-strip'. However `strip' might not be the right
8776# tool to use in cross-compilation environments, therefore Automake
8777# will honor the `STRIP' environment variable to overrule this program.
8778if test "$cross_compiling" != no; then
8779 if test -n "$ac_tool_prefix"; then
8780 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8781set dummy ${ac_tool_prefix}strip; ac_word=$2
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if test "${ac_cv_prog_STRIP+set}" = set; then :
8785 $as_echo_n "(cached) " >&6
8786else
8787 if test -n "$STRIP"; then
8788 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8789else
8790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791for as_dir in $PATH
8792do
8793 IFS=$as_save_IFS
8794 test -z "$as_dir" && as_dir=.
8795 for ac_exec_ext in '' $ac_executable_extensions; do
8796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8797 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8799 break 2
8800 fi
8801done
8802 done
8803IFS=$as_save_IFS
8804
8805fi
8806fi
8807STRIP=$ac_cv_prog_STRIP
8808if test -n "$STRIP"; then
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8810$as_echo "$STRIP" >&6; }
8811else
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817fi
8818if test -z "$ac_cv_prog_STRIP"; then
8819 ac_ct_STRIP=$STRIP
8820 # Extract the first word of "strip", so it can be a program name with args.
8821set dummy strip; ac_word=$2
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8823$as_echo_n "checking for $ac_word... " >&6; }
8824if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8825 $as_echo_n "(cached) " >&6
8826else
8827 if test -n "$ac_ct_STRIP"; then
8828 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8829else
8830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8831for as_dir in $PATH
8832do
8833 IFS=$as_save_IFS
8834 test -z "$as_dir" && as_dir=.
8835 for ac_exec_ext in '' $ac_executable_extensions; do
8836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8837 ac_cv_prog_ac_ct_STRIP="strip"
8838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8839 break 2
8840 fi
8841done
8842 done
8843IFS=$as_save_IFS
8844
8845fi
8846fi
8847ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8848if test -n "$ac_ct_STRIP"; then
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8850$as_echo "$ac_ct_STRIP" >&6; }
8851else
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8853$as_echo "no" >&6; }
8854fi
8855
8856 if test "x$ac_ct_STRIP" = x; then
8857 STRIP=":"
8858 else
8859 case $cross_compiling:$ac_tool_warned in
8860yes:)
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8863ac_tool_warned=yes ;;
8864esac
8865 STRIP=$ac_ct_STRIP
8866 fi
8867else
8868 STRIP="$ac_cv_prog_STRIP"
8869fi
8870
8871fi
8872INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8873
8874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
8875$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
8876if test -z "$MKDIR_P"; then
8877 if test "${ac_cv_path_mkdir+set}" = set; then :
8878 $as_echo_n "(cached) " >&6
8879else
8880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8881for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
8882do
8883 IFS=$as_save_IFS
8884 test -z "$as_dir" && as_dir=.
8885 for ac_prog in mkdir gmkdir; do
8886 for ac_exec_ext in '' $ac_executable_extensions; do
8887 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
8888 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
8889 'mkdir (GNU coreutils) '* | \
8890 'mkdir (coreutils) '* | \
8891 'mkdir (fileutils) '4.1*)
8892 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
8893 break 3;;
8894 esac
8895 done
8896 done
e28b3332 8897 done
81ecdfbb
RW
8898IFS=$as_save_IFS
8899
8900fi
8901
8902 if test "${ac_cv_path_mkdir+set}" = set; then
8903 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 8904 else
81ecdfbb
RW
8905 # As a last resort, use the slow shell script. Don't cache a
8906 # value for MKDIR_P within a source directory, because that will
8907 # break other packages using the cache if that directory is
8908 # removed, or if the value is a relative name.
8909 test -d ./--version && rmdir ./--version
8910 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
8911 fi
8912fi
81ecdfbb
RW
8913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
8914$as_echo "$MKDIR_P" >&6; }
8915
f434ba03 8916
81ecdfbb
RW
8917mkdir_p="$MKDIR_P"
8918case $mkdir_p in
8919 [\\/$]* | ?:[\\/]*) ;;
8920 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8921esac
e28b3332
DJ
8922
8923for ac_prog in gawk mawk nawk awk
8924do
8925 # Extract the first word of "$ac_prog", so it can be a program name with args.
8926set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if test "${ac_cv_prog_AWK+set}" = set; then :
8930 $as_echo_n "(cached) " >&6
e28b3332
DJ
8931else
8932 if test -n "$AWK"; then
8933 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8934else
8935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938 IFS=$as_save_IFS
8939 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8940 for ac_exec_ext in '' $ac_executable_extensions; do
8941 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 8942 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
8944 break 2
8945 fi
8946done
81ecdfbb
RW
8947 done
8948IFS=$as_save_IFS
e28b3332
DJ
8949
8950fi
8951fi
8952AWK=$ac_cv_prog_AWK
8953if test -n "$AWK"; then
81ecdfbb
RW
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8955$as_echo "$AWK" >&6; }
e28b3332 8956else
81ecdfbb
RW
8957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8958$as_echo "no" >&6; }
e28b3332
DJ
8959fi
8960
81ecdfbb 8961
e28b3332
DJ
8962 test -n "$AWK" && break
8963done
8964
81ecdfbb 8965ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
8966
8967
8968am_make=${MAKE-make}
8969cat > confinc << 'END'
8970am__doit:
81ecdfbb 8971 @echo this is the am__doit target
e28b3332
DJ
8972.PHONY: am__doit
8973END
8974# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
8975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
8976$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
8977am__include="#"
8978am__quote=
8979_am_result=none
8980# First try GNU make style include.
8981echo "include confinc" > confmf
81ecdfbb
RW
8982# Ignore all kinds of additional output from `make'.
8983case `$am_make -s -f confmf 2> /dev/null` in #(
8984*the\ am__doit\ target*)
8985 am__include=include
8986 am__quote=
8987 _am_result=GNU
8988 ;;
8989esac
e28b3332
DJ
8990# Now try BSD make style include.
8991if test "$am__include" = "#"; then
8992 echo '.include "confinc"' > confmf
81ecdfbb
RW
8993 case `$am_make -s -f confmf 2> /dev/null` in #(
8994 *the\ am__doit\ target*)
8995 am__include=.include
8996 am__quote="\""
8997 _am_result=BSD
8998 ;;
8999 esac
e28b3332
DJ
9000fi
9001
9002
81ecdfbb
RW
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
9004$as_echo "$_am_result" >&6; }
e28b3332
DJ
9005rm -f confinc confmf
9006
81ecdfbb
RW
9007# Check whether --enable-dependency-tracking was given.
9008if test "${enable_dependency_tracking+set}" = set; then :
9009 enableval=$enable_dependency_tracking;
9010fi
e28b3332 9011
e28b3332
DJ
9012if test "x$enable_dependency_tracking" != xno; then
9013 am_depcomp="$ac_aux_dir/depcomp"
9014 AMDEPBACKSLASH='\'
9015fi
81ecdfbb 9016 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
9017 AMDEP_TRUE=
9018 AMDEP_FALSE='#'
9019else
9020 AMDEP_TRUE='#'
9021 AMDEP_FALSE=
9022fi
9023
9024
81ecdfbb
RW
9025if test "`cd $srcdir && pwd`" != "`pwd`"; then
9026 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9027 # is not polluted with repeated "-I."
9028 am__isrc=' -I$(srcdir)'
9029 # test to see if srcdir already configured
9030 if test -f $srcdir/config.status; then
9031 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
9032 fi
e28b3332
DJ
9033fi
9034
9035# test whether we have cygpath
9036if test -z "$CYGPATH_W"; then
9037 if (cygpath --version) >/dev/null 2>/dev/null; then
9038 CYGPATH_W='cygpath -w'
9039 else
9040 CYGPATH_W=echo
9041 fi
9042fi
9043
9044
9045# Define the identity of the package.
9046 PACKAGE=gdb
9047 VERSION=UNUSED-VERSION
9048
9049
9050# Some tools Automake needs.
9051
9052ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
9053
9054
9055AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
9056
9057
9058AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
9059
9060
9061AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
9062
9063
9064MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
9065
e28b3332
DJ
9066# We need awk for the "check" target. The system "awk" is bad on
9067# some platforms.
9068# Always define AMTAR for backward compatibility.
9069
9070AMTAR=${AMTAR-"${am_missing_run}tar"}
9071
9072am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
9073
9074
9075
9076
9077depcc="$CC" am_compiler_list=
9078
81ecdfbb
RW
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
9080$as_echo_n "checking dependency style of $depcc... " >&6; }
9081if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
9082 $as_echo_n "(cached) " >&6
e28b3332
DJ
9083else
9084 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9085 # We make a subdir and do the tests there. Otherwise we can end up
9086 # making bogus files that we don't know about and never remove. For
9087 # instance it was reported that on HP-UX the gcc test will end up
9088 # making a dummy file named `D' -- because `-MD' means `put the output
9089 # in D'.
9090 mkdir conftest.dir
9091 # Copy depcomp to subdir because otherwise we won't find it if we're
9092 # using a relative directory.
9093 cp "$am_depcomp" conftest.dir
9094 cd conftest.dir
9095 # We will build objects and dependencies in a subdirectory because
9096 # it helps to detect inapplicable dependency modes. For instance
9097 # both Tru64's cc and ICC support -MD to output dependencies as a
9098 # side effect of compilation, but ICC will put the dependencies in
9099 # the current directory while Tru64 will put them in the object
9100 # directory.
9101 mkdir sub
9102
9103 am_cv_CC_dependencies_compiler_type=none
9104 if test "$am_compiler_list" = ""; then
9105 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9106 fi
81ecdfbb
RW
9107 am__universal=false
9108 case " $depcc " in #(
9109 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9110 esac
9111
e28b3332
DJ
9112 for depmode in $am_compiler_list; do
9113 # Setup a source with many dependencies, because some compilers
9114 # like to wrap large dependency lists on column 80 (with \), and
9115 # we should not choose a depcomp mode which is confused by this.
9116 #
9117 # We need to recreate these files for each test, as the compiler may
9118 # overwrite some of them when testing with obscure command lines.
9119 # This happens at least with the AIX C compiler.
9120 : > sub/conftest.c
9121 for i in 1 2 3 4 5 6; do
9122 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9123 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9124 # Solaris 8's {/usr,}/bin/sh.
9125 touch sub/conftst$i.h
9126 done
9127 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9128
81ecdfbb
RW
9129 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9130 # mode. It turns out that the SunPro C++ compiler does not properly
9131 # handle `-M -o', and we need to detect this. Also, some Intel
9132 # versions had trouble with output in subdirs
9133 am__obj=sub/conftest.${OBJEXT-o}
9134 am__minus_obj="-o $am__obj"
e28b3332 9135 case $depmode in
81ecdfbb
RW
9136 gcc)
9137 # This depmode causes a compiler race in universal mode.
9138 test "$am__universal" = false || continue
9139 ;;
e28b3332
DJ
9140 nosideeffect)
9141 # after this tag, mechanisms are not by side-effect, so they'll
9142 # only be used when explicitly requested
9143 if test "x$enable_dependency_tracking" = xyes; then
9144 continue
9145 else
9146 break
9147 fi
9148 ;;
81ecdfbb
RW
9149 msvisualcpp | msvcmsys)
9150 # This compiler won't grok `-c -o', but also, the minuso test has
9151 # not run yet. These depmodes are late enough in the game, and
9152 # so weak that their functioning should not be impacted.
9153 am__obj=conftest.${OBJEXT-o}
9154 am__minus_obj=
9155 ;;
e28b3332
DJ
9156 none) break ;;
9157 esac
e28b3332 9158 if depmode=$depmode \
81ecdfbb 9159 source=sub/conftest.c object=$am__obj \
e28b3332 9160 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 9161 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 9162 >/dev/null 2>conftest.err &&
81ecdfbb 9163 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 9164 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 9165 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
9166 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9167 # icc doesn't choke on unknown options, it will just issue warnings
9168 # or remarks (even with -Werror). So we grep stderr for any message
9169 # that says an option was ignored or not supported.
9170 # When given -MP, icc 7.0 and 7.1 complain thusly:
9171 # icc: Command line warning: ignoring option '-M'; no argument required
9172 # The diagnosis changed in icc 8.0:
9173 # icc: Command line remark: option '-MP' not supported
9174 if (grep 'ignoring option' conftest.err ||
9175 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9176 am_cv_CC_dependencies_compiler_type=$depmode
9177 break
9178 fi
9179 fi
9180 done
9181
9182 cd ..
9183 rm -rf conftest.dir
9184else
9185 am_cv_CC_dependencies_compiler_type=none
9186fi
9187
9188fi
81ecdfbb
RW
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
9190$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
9191CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9192
81ecdfbb 9193 if
e28b3332
DJ
9194 test "x$enable_dependency_tracking" != xno \
9195 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
9196 am__fastdepCC_TRUE=
9197 am__fastdepCC_FALSE='#'
9198else
9199 am__fastdepCC_TRUE='#'
9200 am__fastdepCC_FALSE=
9201fi
9202
9203
9204
9205
bec39cab
AC
9206
9207
81ecdfbb
RW
9208# Check whether --with-separate-debug-dir was given.
9209if test "${with_separate_debug_dir+set}" = set; then :
9210 withval=$with_separate_debug_dir;
b14b1491
TT
9211 DEBUGDIR=$withval
9212else
9213 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
9214fi
9215
20e95c23 9216
783e057b
DJ
9217 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9218 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 9219 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 9220 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 9221
783e057b
DJ
9222cat >>confdefs.h <<_ACEOF
9223#define DEBUGDIR "$ac_define_dir"
20e95c23 9224_ACEOF
20e95c23 9225
20e95c23 9226
20e95c23 9227
0c4a4063 9228
b14b1491
TT
9229 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9230 if test "x$prefix" = xNONE; then
9231 test_prefix=/usr/local
9232 else
9233 test_prefix=$prefix
9234 fi
783e057b 9235 else
b14b1491 9236 test_prefix=$exec_prefix
783e057b 9237 fi
b14b1491
TT
9238 value=0
9239 case ${ac_define_dir} in
9240 "${test_prefix}"|"${test_prefix}/"*|\
9241 '${exec_prefix}'|'${exec_prefix}/'*)
9242 value=1
9243 ;;
9244 esac
9245
9246cat >>confdefs.h <<_ACEOF
9247#define DEBUGDIR_RELOCATABLE $value
9248_ACEOF
9249
9250
9251
0c4a4063 9252
f83d8a90
DE
9253# We can't pass paths as command line arguments.
9254# Mingw32 tries to be clever and will convert the paths for us.
9255# For example -DBINDIR="/usr/local/bin" passed on the command line may get
9256# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
9257# This breaks GDB's relocatable path conversions since paths passed in
9258# config.h would not get so translated, the path prefixes no longer match.
9259
9260 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9262 ac_define_dir=`eval echo $bindir`
9263 ac_define_dir=`eval echo $ac_define_dir`
9264
9265cat >>confdefs.h <<_ACEOF
9266#define BINDIR "$ac_define_dir"
9267_ACEOF
9268
9269
9270
b14b1491
TT
9271# GDB's datadir relocation
9272
9273
9274
81ecdfbb
RW
9275# Check whether --with-gdb-datadir was given.
9276if test "${with_gdb_datadir+set}" = set; then :
9277 withval=$with_gdb_datadir;
b14b1491 9278 GDB_DATADIR=$withval
20e95c23 9279else
b14b1491 9280 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
9281fi
9282
20e95c23 9283
b14b1491
TT
9284 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9285 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9286 ac_define_dir=`eval echo $GDB_DATADIR`
9287 ac_define_dir=`eval echo $ac_define_dir`
9288
9289cat >>confdefs.h <<_ACEOF
9290#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
9291_ACEOF
9292
b14b1491
TT
9293
9294
0c4a4063 9295
b14b1491
TT
9296 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9297 if test "x$prefix" = xNONE; then
9298 test_prefix=/usr/local
9299 else
9300 test_prefix=$prefix
9301 fi
9302 else
9303 test_prefix=$exec_prefix
9304 fi
9305 value=0
9306 case ${ac_define_dir} in
9307 "${test_prefix}"|"${test_prefix}/"*|\
9308 '${exec_prefix}'|'${exec_prefix}/'*)
9309 value=1
9310 ;;
9311 esac
9312
9313cat >>confdefs.h <<_ACEOF
9314#define GDB_DATADIR_RELOCATABLE $value
9315_ACEOF
9316
9317
783e057b 9318
20e95c23 9319
0c4a4063 9320
81ecdfbb
RW
9321# Check whether --with-relocated-sources was given.
9322if test "${with_relocated_sources+set}" = set; then :
9323 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
9324
9325 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9326 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9327 ac_define_dir=`eval echo $reloc_srcdir`
9328 ac_define_dir=`eval echo $ac_define_dir`
9329
9330cat >>confdefs.h <<_ACEOF
9331#define RELOC_SRCDIR "$ac_define_dir"
9332_ACEOF
9333
9334
9335
81ecdfbb
RW
9336fi
9337
29b0e8a2
JM
9338
9339
20e95c23 9340
5ae98d25 9341subdirs="$subdirs testsuite"
20e95c23
DJ
9342
9343
783e057b 9344# Check whether to support alternative target configurations
81ecdfbb
RW
9345# Check whether --enable-targets was given.
9346if test "${enable_targets+set}" = set; then :
9347 enableval=$enable_targets; case "${enableval}" in
9348 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
9349 ;;
9350 no) enable_targets= ;;
9351 *) enable_targets=$enableval ;;
9352esac
81ecdfbb
RW
9353fi
9354
20e95c23 9355
783e057b 9356# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
9357# Check whether --enable-64-bit-bfd was given.
9358if test "${enable_64_bit_bfd+set}" = set; then :
9359 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
9360 yes) want64=true ;;
9361 no) want64=false ;;
81ecdfbb 9362 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
9363esac
9364else
9365 want64=false
81ecdfbb
RW
9366fi
9367
783e057b
DJ
9368# Provide defaults for some variables set by the per-host and per-target
9369# configuration.
9370gdb_host_obs=posix-hdep.o
20e95c23 9371
783e057b
DJ
9372if test "${target}" = "${host}"; then
9373 gdb_native=yes
9374else
9375 gdb_native=no
9376fi
20e95c23 9377
783e057b 9378. $srcdir/configure.host
20e95c23 9379
783e057b 9380# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 9381
783e057b
DJ
9382TARGET_OBS=
9383all_targets=
20e95c23 9384
783e057b 9385for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 9386do
783e057b
DJ
9387 if test "$targ_alias" = "all"; then
9388 all_targets=true
9389 else
9390 # Canonicalize the secondary target names.
9391 result=`$ac_config_sub $targ_alias 2>/dev/null`
9392 if test -n "$result"; then
9393 targ=$result
9394 else
9395 targ=$targ_alias
9396 fi
20e95c23 9397
783e057b 9398 . ${srcdir}/configure.tgt
20e95c23 9399
bf307134
JB
9400 if test -z "${gdb_target_obs}"; then :
9401 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
9402fi
9403
783e057b
DJ
9404 # Target-specific object files
9405 for i in ${gdb_target_obs}; do
9406 case " $TARGET_OBS " in
9407 *" ${i} "*) ;;
9408 *)
9409 TARGET_OBS="$TARGET_OBS ${i}"
9410 ;;
9411 esac
9412 done
20e95c23 9413
783e057b
DJ
9414 # Check whether this target needs 64-bit CORE_ADDR
9415 if test x${want64} = xfalse; then
9416 . ${srcdir}/../bfd/config.bfd
9417 fi
9418 fi
20e95c23
DJ
9419done
9420
783e057b
DJ
9421if test x${all_targets} = xtrue; then
9422
9423 # We want all 64-bit targets if we either:
9424 # - run on a 64-bit host or
9425 # - already require 64-bit support for some other target or
9426 # - the --enable-64-bit-bfd option was supplied
9427 # Otherwise we only support all 32-bit targets.
9428 #
9429 # NOTE: This test must be in sync with the corresponding
9430 # tests in BFD!
20e95c23 9431
783e057b 9432 if test x${want64} = xfalse; then
81ecdfbb
RW
9433 # The cast to long int works around a bug in the HP C Compiler
9434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9436# This bug is HP SR number 8606223364.
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9438$as_echo_n "checking size of long... " >&6; }
9439if test "${ac_cv_sizeof_long+set}" = set; then :
9440 $as_echo_n "(cached) " >&6
c0993dbe 9441else
81ecdfbb 9442 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 9443
81ecdfbb
RW
9444else
9445 if test "$ac_cv_type_long" = yes; then
9446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9448{ as_fn_set_status 77
9449as_fn_error "cannot compute sizeof (long)
9450See \`config.log' for more details." "$LINENO" 5; }; }
9451 else
9452 ac_cv_sizeof_long=0
9453 fi
c0993dbe 9454fi
81ecdfbb 9455
c0993dbe 9456fi
81ecdfbb
RW
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9458$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 9459
c0993dbe 9460
c0993dbe 9461
c0993dbe
UW
9462cat >>confdefs.h <<_ACEOF
9463#define SIZEOF_LONG $ac_cv_sizeof_long
9464_ACEOF
9465
9466
9467 if test "x${ac_cv_sizeof_long}" = "x8"; then
9468 want64=true
9469 fi
9470 fi
9471 if test x${want64} = xtrue; then
9472 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
9473 else
9474 TARGET_OBS='$(ALL_TARGET_OBS)'
9475 fi
9476fi
9477
9478
9479
9480# For other settings, only the main target counts.
9481gdb_sim=
9482gdb_osabi=
9483build_gdbserver=
9484targ=$target; . ${srcdir}/configure.tgt
9485
9486# Fetch the default architecture and default target vector from BFD.
9487targ=$target; . $srcdir/../bfd/config.bfd
9488
9489# We only want the first architecture, so strip off the others if
9490# there is more than one.
9491targ_archs=`echo $targ_archs | sed 's/ .*//'`
9492
9493if test "x$targ_archs" != x; then
9494
9495cat >>confdefs.h <<_ACEOF
9496#define DEFAULT_BFD_ARCH $targ_archs
9497_ACEOF
9498
9499fi
9500if test "x$targ_defvec" != x; then
9501
9502cat >>confdefs.h <<_ACEOF
9503#define DEFAULT_BFD_VEC $targ_defvec
9504_ACEOF
9505
9506fi
9507
c0993dbe
UW
9508# The CLI cannot be disabled yet, but may be in the future.
9509
9510# Enable CLI.
81ecdfbb
RW
9511# Check whether --enable-gdbcli was given.
9512if test "${enable_gdbcli+set}" = set; then :
9513 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
9514 yes)
9515 ;;
9516 no)
81ecdfbb 9517 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 9518 *)
81ecdfbb 9519 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
9520 esac
9521else
9522 enable_gdbcli=yes
81ecdfbb
RW
9523fi
9524
c0993dbe
UW
9525if test x"$enable_gdbcli" = xyes; then
9526 if test -d $srcdir/cli; then
9527 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
9528 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
9529 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
9530 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
9531 fi
9532fi
9533
9534# Enable MI.
81ecdfbb
RW
9535# Check whether --enable-gdbmi was given.
9536if test "${enable_gdbmi+set}" = set; then :
9537 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
9538 yes | no)
9539 ;;
9540 *)
81ecdfbb 9541 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
9542 esac
9543else
9544 enable_gdbmi=yes
81ecdfbb
RW
9545fi
9546
c0993dbe
UW
9547if test x"$enable_gdbmi" = xyes; then
9548 if test -d $srcdir/mi; then
9549 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
9550 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
9551 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
9552 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
9553 fi
9554fi
9555
9556# Enable TUI.
81ecdfbb
RW
9557# Check whether --enable-tui was given.
9558if test "${enable_tui+set}" = set; then :
9559 enableval=$enable_tui; case $enableval in
3ca64bd3 9560 yes | no | auto)
c0993dbe
UW
9561 ;;
9562 *)
81ecdfbb 9563 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
9564 esac
9565else
3ca64bd3 9566 enable_tui=auto
81ecdfbb
RW
9567fi
9568
c0993dbe
UW
9569
9570# Enable gdbtk.
81ecdfbb
RW
9571# Check whether --enable-gdbtk was given.
9572if test "${enable_gdbtk+set}" = set; then :
9573 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
9574 yes | no)
9575 ;;
9576 *)
81ecdfbb 9577 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
9578 esac
9579else
5062cc19 9580 if test -d $srcdir/gdbtk; then
c0993dbe
UW
9581 enable_gdbtk=yes
9582 else
9583 enable_gdbtk=no
9584 fi
81ecdfbb
RW
9585fi
9586
c0993dbe
UW
9587# We unconditionally disable gdbtk tests on selected platforms.
9588case $host_os in
9589 go32* | windows*)
81ecdfbb
RW
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
9591$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
9592 enable_gdbtk=no ;;
9593esac
9594
05e7c244 9595# Libunwind support for ia64.
bec39cab 9596
05e7c244
JK
9597
9598# Check whether --with-libunwind-ia64 was given.
9599if test "${with_libunwind_ia64+set}" = set; then :
9600 withval=$with_libunwind_ia64;
bec39cab 9601else
05e7c244
JK
9602 with_libunwind_ia64=auto
9603fi
bec39cab 9604
05e7c244
JK
9605
9606# Backward compatibility option.
9607if test "${with_libunwind+set}" = set; then
9608 if test x"$with_libunwind_ia64" != xauto; then
9609 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
9610 fi
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
9612$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
9613 with_libunwind_ia64="$with_libunwind"
9614fi
9615
9616case "$with_libunwind_ia64" in
9617 yes | no)
9618 ;;
9619 auto)
9620 for ac_header in libunwind-ia64.h
81ecdfbb 9621do :
b54a8fd7
PA
9622 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
9623if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 9624 cat >>confdefs.h <<_ACEOF
b54a8fd7 9625#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
9626_ACEOF
9627
9628fi
9629
9630done
9631
05e7c244
JK
9632 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
9633 ;;
9634 *)
9635 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
9636 ;;
9637esac
bec39cab 9638
05e7c244 9639if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 9640 for ac_header in libunwind-ia64.h
81ecdfbb 9641do :
b54a8fd7
PA
9642 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
9643if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 9644 cat >>confdefs.h <<_ACEOF
b54a8fd7 9645#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
9646_ACEOF
9647
9648fi
9649
9650done
9651
05e7c244
JK
9652 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
9653 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
9654 fi
9655 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
9656 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
9657 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
9658fi
9659
cb01cfba
JB
9660opt_curses=no
9661
81ecdfbb
RW
9662# Check whether --with-curses was given.
9663if test "${with_curses+set}" = set; then :
9664 withval=$with_curses; opt_curses=$withval
9665fi
9666
cb01cfba 9667
76a39ba7 9668prefer_curses=no
cb01cfba 9669if test "$opt_curses" = "yes"; then
76a39ba7 9670 prefer_curses=yes
cb01cfba
JB
9671fi
9672
a9322a30 9673# Profiling support.
81ecdfbb
RW
9674# Check whether --enable-profiling was given.
9675if test "${enable_profiling+set}" = set; then :
9676 enableval=$enable_profiling; case $enableval in
a9322a30
TT
9677 yes | no)
9678 ;;
9679 *)
81ecdfbb 9680 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
9681 esac
9682else
9683 enable_profiling=no
81ecdfbb 9684fi
bec39cab 9685
a9322a30
TT
9686
9687for ac_func in monstartup _mcleanup
81ecdfbb
RW
9688do :
9689 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9690ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9691eval as_val=\$$as_ac_var
9692 if test "x$as_val" = x""yes; then :
9693 cat >>confdefs.h <<_ACEOF
9694#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9695_ACEOF
a9322a30 9696
81ecdfbb
RW
9697fi
9698done
a9322a30 9699
81ecdfbb
RW
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
9701$as_echo_n "checking for _etext... " >&6; }
9702if test "${ac_cv_var__etext+set}" = set; then :
9703 $as_echo_n "(cached) " >&6
9704else
9705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706/* end confdefs.h. */
9707#include <stdlib.h>
9708extern char _etext;
a9322a30
TT
9709
9710int
9711main ()
9712{
9713free (&_etext);
9714 ;
9715 return 0;
9716}
bec39cab 9717_ACEOF
81ecdfbb 9718if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9719 ac_cv_var__etext=yes
bec39cab 9720else
81ecdfbb 9721 ac_cv_var__etext=no
bec39cab 9722fi
81ecdfbb
RW
9723rm -f core conftest.err conftest.$ac_objext \
9724 conftest$ac_exeext conftest.$ac_ext
bec39cab 9725fi
81ecdfbb
RW
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
9727$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 9728if test $ac_cv_var__etext = yes; then
60ca704f 9729
81ecdfbb 9730$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 9731
bec39cab 9732fi
81ecdfbb
RW
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
9734$as_echo_n "checking for etext... " >&6; }
9735if test "${ac_cv_var_etext+set}" = set; then :
9736 $as_echo_n "(cached) " >&6
bec39cab 9737else
81ecdfbb 9738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9739/* end confdefs.h. */
a9322a30
TT
9740#include <stdlib.h>
9741extern char etext;
bec39cab
AC
9742
9743int
9744main ()
9745{
a9322a30 9746free (&etext);
bec39cab
AC
9747 ;
9748 return 0;
9749}
9750_ACEOF
81ecdfbb 9751if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9752 ac_cv_var_etext=yes
bec39cab 9753else
81ecdfbb 9754 ac_cv_var_etext=no
bec39cab 9755fi
81ecdfbb
RW
9756rm -f core conftest.err conftest.$ac_objext \
9757 conftest$ac_exeext conftest.$ac_ext
bec39cab 9758fi
81ecdfbb
RW
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
9760$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
9761if test $ac_cv_var_etext = yes; then
9762
81ecdfbb 9763$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
9764
9765fi
a9322a30
TT
9766if test "$enable_profiling" = yes ; then
9767 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 9768 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
9769 fi
9770 PROFILE_CFLAGS=-pg
9771 OLD_CFLAGS="$CFLAGS"
9772 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 9773
81ecdfbb
RW
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
9775$as_echo_n "checking whether $CC supports -pg... " >&6; }
9776if test "${ac_cv_cc_supports_pg+set}" = set; then :
9777 $as_echo_n "(cached) " >&6
bec39cab 9778else
81ecdfbb 9779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9780/* end confdefs.h. */
bec39cab
AC
9781
9782int
9783main ()
9784{
a9322a30 9785int x;
bec39cab
AC
9786 ;
9787 return 0;
9788}
9789_ACEOF
81ecdfbb 9790if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9791 ac_cv_cc_supports_pg=yes
bec39cab 9792else
81ecdfbb 9793 ac_cv_cc_supports_pg=no
bec39cab 9794fi
81ecdfbb 9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9796fi
81ecdfbb
RW
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
9798$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 9799
a9322a30 9800 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 9801 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 9802 fi
bec39cab 9803
a9322a30 9804 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
9805fi
9806
c16158bc
JM
9807
9808
81ecdfbb
RW
9809# Check whether --with-pkgversion was given.
9810if test "${with_pkgversion+set}" = set; then :
9811 withval=$with_pkgversion; case "$withval" in
9812 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
9813 no) PKGVERSION= ;;
9814 *) PKGVERSION="($withval) " ;;
9815 esac
9816else
9817 PKGVERSION="(GDB) "
9818
81ecdfbb 9819fi
c16158bc
JM
9820
9821
9822
9823
81ecdfbb
RW
9824
9825# Check whether --with-bugurl was given.
9826if test "${with_bugurl+set}" = set; then :
9827 withval=$with_bugurl; case "$withval" in
9828 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
9829 no) BUGURL=
9830 ;;
9831 *) BUGURL="$withval"
9832 ;;
9833 esac
9834else
9835 BUGURL="http://www.gnu.org/software/gdb/bugs/"
9836
81ecdfbb
RW
9837fi
9838
c16158bc
JM
9839 case ${BUGURL} in
9840 "")
9841 REPORT_BUGS_TO=
9842 REPORT_BUGS_TEXI=
9843 ;;
9844 *)
9845 REPORT_BUGS_TO="<$BUGURL>"
9846 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
9847 ;;
9848 esac;
9849
9850
9851
9852
9853cat >>confdefs.h <<_ACEOF
9854#define PKGVERSION "$PKGVERSION"
9855_ACEOF
9856
9857
9858cat >>confdefs.h <<_ACEOF
9859#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
9860_ACEOF
9861
9862
bec39cab
AC
9863# --------------------- #
9864# Checks for programs. #
9865# --------------------- #
9866
9867for ac_prog in gawk mawk nawk awk
9868do
9869 # Extract the first word of "$ac_prog", so it can be a program name with args.
9870set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9872$as_echo_n "checking for $ac_word... " >&6; }
9873if test "${ac_cv_prog_AWK+set}" = set; then :
9874 $as_echo_n "(cached) " >&6
bec39cab
AC
9875else
9876 if test -n "$AWK"; then
9877 ac_cv_prog_AWK="$AWK" # Let the user override the test.
9878else
9879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880for as_dir in $PATH
9881do
9882 IFS=$as_save_IFS
9883 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9884 for ac_exec_ext in '' $ac_executable_extensions; do
9885 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9886 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 9887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9888 break 2
9889 fi
9890done
81ecdfbb
RW
9891 done
9892IFS=$as_save_IFS
bec39cab
AC
9893
9894fi
9895fi
9896AWK=$ac_cv_prog_AWK
9897if test -n "$AWK"; then
81ecdfbb
RW
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9899$as_echo "$AWK" >&6; }
bec39cab 9900else
81ecdfbb
RW
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
bec39cab
AC
9903fi
9904
bec39cab 9905
81ecdfbb 9906 test -n "$AWK" && break
bec39cab
AC
9907done
9908
bec39cab 9909
81ecdfbb
RW
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9911$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
9912LN_S=$as_ln_s
9913if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9915$as_echo "yes" >&6; }
bec39cab 9916else
81ecdfbb
RW
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9918$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
9919fi
9920
9921if test -n "$ac_tool_prefix"; then
9922 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9923set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
9926if test "${ac_cv_prog_RANLIB+set}" = set; then :
9927 $as_echo_n "(cached) " >&6
bec39cab
AC
9928else
9929 if test -n "$RANLIB"; then
9930 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9931else
9932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935 IFS=$as_save_IFS
9936 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9937 for ac_exec_ext in '' $ac_executable_extensions; do
9938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9939 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 9940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9941 break 2
9942 fi
9943done
81ecdfbb
RW
9944 done
9945IFS=$as_save_IFS
bec39cab
AC
9946
9947fi
9948fi
9949RANLIB=$ac_cv_prog_RANLIB
9950if test -n "$RANLIB"; then
81ecdfbb
RW
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9952$as_echo "$RANLIB" >&6; }
bec39cab 9953else
81ecdfbb
RW
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
bec39cab
AC
9956fi
9957
81ecdfbb 9958
bec39cab
AC
9959fi
9960if test -z "$ac_cv_prog_RANLIB"; then
9961 ac_ct_RANLIB=$RANLIB
9962 # Extract the first word of "ranlib", so it can be a program name with args.
9963set dummy ranlib; ac_word=$2
81ecdfbb
RW
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9965$as_echo_n "checking for $ac_word... " >&6; }
9966if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
9967 $as_echo_n "(cached) " >&6
bec39cab
AC
9968else
9969 if test -n "$ac_ct_RANLIB"; then
9970 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9971else
9972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975 IFS=$as_save_IFS
9976 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9977 for ac_exec_ext in '' $ac_executable_extensions; do
9978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9979 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 9980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9981 break 2
9982 fi
9983done
81ecdfbb
RW
9984 done
9985IFS=$as_save_IFS
bec39cab 9986
bec39cab
AC
9987fi
9988fi
9989ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9990if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9992$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 9993else
81ecdfbb
RW
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
bec39cab
AC
9996fi
9997
81ecdfbb
RW
9998 if test "x$ac_ct_RANLIB" = x; then
9999 RANLIB=":"
10000 else
10001 case $cross_compiling:$ac_tool_warned in
10002yes:)
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10005ac_tool_warned=yes ;;
10006esac
10007 RANLIB=$ac_ct_RANLIB
10008 fi
bec39cab
AC
10009else
10010 RANLIB="$ac_cv_prog_RANLIB"
10011fi
10012
10013for ac_prog in 'bison -y' byacc
10014do
10015 # Extract the first word of "$ac_prog", so it can be a program name with args.
10016set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10018$as_echo_n "checking for $ac_word... " >&6; }
10019if test "${ac_cv_prog_YACC+set}" = set; then :
10020 $as_echo_n "(cached) " >&6
bec39cab
AC
10021else
10022 if test -n "$YACC"; then
10023 ac_cv_prog_YACC="$YACC" # Let the user override the test.
10024else
10025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026for as_dir in $PATH
10027do
10028 IFS=$as_save_IFS
10029 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10030 for ac_exec_ext in '' $ac_executable_extensions; do
10031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10032 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 10033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10034 break 2
10035 fi
10036done
81ecdfbb
RW
10037 done
10038IFS=$as_save_IFS
bec39cab
AC
10039
10040fi
10041fi
10042YACC=$ac_cv_prog_YACC
10043if test -n "$YACC"; then
81ecdfbb
RW
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
10045$as_echo "$YACC" >&6; }
bec39cab 10046else
81ecdfbb
RW
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048$as_echo "no" >&6; }
bec39cab
AC
10049fi
10050
81ecdfbb 10051
bec39cab
AC
10052 test -n "$YACC" && break
10053done
10054test -n "$YACC" || YACC="yacc"
10055
10056
10057if test -n "$ac_tool_prefix"; then
10058 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
10059set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if test "${ac_cv_prog_AR+set}" = set; then :
10063 $as_echo_n "(cached) " >&6
bec39cab
AC
10064else
10065 if test -n "$AR"; then
10066 ac_cv_prog_AR="$AR" # Let the user override the test.
10067else
10068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071 IFS=$as_save_IFS
10072 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10073 for ac_exec_ext in '' $ac_executable_extensions; do
10074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10075 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 10076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10077 break 2
10078 fi
10079done
81ecdfbb
RW
10080 done
10081IFS=$as_save_IFS
bec39cab
AC
10082
10083fi
10084fi
10085AR=$ac_cv_prog_AR
10086if test -n "$AR"; then
81ecdfbb
RW
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10088$as_echo "$AR" >&6; }
bec39cab 10089else
81ecdfbb
RW
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
bec39cab
AC
10092fi
10093
81ecdfbb 10094
bec39cab
AC
10095fi
10096if test -z "$ac_cv_prog_AR"; then
10097 ac_ct_AR=$AR
10098 # Extract the first word of "ar", so it can be a program name with args.
10099set dummy ar; ac_word=$2
81ecdfbb
RW
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101$as_echo_n "checking for $ac_word... " >&6; }
10102if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
10103 $as_echo_n "(cached) " >&6
bec39cab
AC
10104else
10105 if test -n "$ac_ct_AR"; then
10106 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10107else
10108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10109for as_dir in $PATH
10110do
10111 IFS=$as_save_IFS
10112 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10113 for ac_exec_ext in '' $ac_executable_extensions; do
10114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10115 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 10116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10117 break 2
10118 fi
10119done
81ecdfbb
RW
10120 done
10121IFS=$as_save_IFS
bec39cab
AC
10122
10123fi
10124fi
10125ac_ct_AR=$ac_cv_prog_ac_ct_AR
10126if test -n "$ac_ct_AR"; then
81ecdfbb
RW
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10128$as_echo "$ac_ct_AR" >&6; }
bec39cab 10129else
81ecdfbb
RW
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
bec39cab
AC
10132fi
10133
81ecdfbb
RW
10134 if test "x$ac_ct_AR" = x; then
10135 AR=""
10136 else
10137 case $cross_compiling:$ac_tool_warned in
10138yes:)
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10141ac_tool_warned=yes ;;
10142esac
10143 AR=$ac_ct_AR
10144 fi
bec39cab
AC
10145else
10146 AR="$ac_cv_prog_AR"
10147fi
10148
10149if test -n "$ac_tool_prefix"; then
10150 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
10151set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
10155 $as_echo_n "(cached) " >&6
bec39cab
AC
10156else
10157 if test -n "$DLLTOOL"; then
10158 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
10159else
10160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161for as_dir in $PATH
10162do
10163 IFS=$as_save_IFS
10164 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10165 for ac_exec_ext in '' $ac_executable_extensions; do
10166 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10167 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 10168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10169 break 2
10170 fi
10171done
81ecdfbb
RW
10172 done
10173IFS=$as_save_IFS
bec39cab
AC
10174
10175fi
10176fi
10177DLLTOOL=$ac_cv_prog_DLLTOOL
10178if test -n "$DLLTOOL"; then
81ecdfbb
RW
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
10180$as_echo "$DLLTOOL" >&6; }
bec39cab 10181else
81ecdfbb
RW
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
bec39cab
AC
10184fi
10185
81ecdfbb 10186
bec39cab
AC
10187fi
10188if test -z "$ac_cv_prog_DLLTOOL"; then
10189 ac_ct_DLLTOOL=$DLLTOOL
10190 # Extract the first word of "dlltool", so it can be a program name with args.
10191set dummy dlltool; ac_word=$2
81ecdfbb
RW
10192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10193$as_echo_n "checking for $ac_word... " >&6; }
10194if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
10195 $as_echo_n "(cached) " >&6
bec39cab
AC
10196else
10197 if test -n "$ac_ct_DLLTOOL"; then
10198 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
10199else
10200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201for as_dir in $PATH
10202do
10203 IFS=$as_save_IFS
10204 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10205 for ac_exec_ext in '' $ac_executable_extensions; do
10206 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10207 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 10208 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10209 break 2
10210 fi
10211done
81ecdfbb
RW
10212 done
10213IFS=$as_save_IFS
bec39cab
AC
10214
10215fi
10216fi
10217ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
10218if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
10220$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 10221else
81ecdfbb
RW
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
bec39cab
AC
10224fi
10225
81ecdfbb
RW
10226 if test "x$ac_ct_DLLTOOL" = x; then
10227 DLLTOOL=""
10228 else
10229 case $cross_compiling:$ac_tool_warned in
10230yes:)
10231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10233ac_tool_warned=yes ;;
10234esac
10235 DLLTOOL=$ac_ct_DLLTOOL
10236 fi
bec39cab
AC
10237else
10238 DLLTOOL="$ac_cv_prog_DLLTOOL"
10239fi
10240
10241if test -n "$ac_tool_prefix"; then
10242 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10243set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if test "${ac_cv_prog_WINDRES+set}" = set; then :
10247 $as_echo_n "(cached) " >&6
bec39cab
AC
10248else
10249 if test -n "$WINDRES"; then
10250 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10251else
10252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255 IFS=$as_save_IFS
10256 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10257 for ac_exec_ext in '' $ac_executable_extensions; do
10258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10259 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 10260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10261 break 2
10262 fi
10263done
81ecdfbb
RW
10264 done
10265IFS=$as_save_IFS
bec39cab
AC
10266
10267fi
10268fi
10269WINDRES=$ac_cv_prog_WINDRES
10270if test -n "$WINDRES"; then
81ecdfbb
RW
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10272$as_echo "$WINDRES" >&6; }
bec39cab 10273else
81ecdfbb
RW
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275$as_echo "no" >&6; }
bec39cab
AC
10276fi
10277
81ecdfbb 10278
bec39cab
AC
10279fi
10280if test -z "$ac_cv_prog_WINDRES"; then
10281 ac_ct_WINDRES=$WINDRES
10282 # Extract the first word of "windres", so it can be a program name with args.
10283set dummy windres; ac_word=$2
81ecdfbb
RW
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10285$as_echo_n "checking for $ac_word... " >&6; }
10286if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10287 $as_echo_n "(cached) " >&6
bec39cab
AC
10288else
10289 if test -n "$ac_ct_WINDRES"; then
10290 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10291else
10292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10293for as_dir in $PATH
10294do
10295 IFS=$as_save_IFS
10296 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10297 for ac_exec_ext in '' $ac_executable_extensions; do
10298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10299 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 10300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10301 break 2
10302 fi
10303done
81ecdfbb
RW
10304 done
10305IFS=$as_save_IFS
bec39cab
AC
10306
10307fi
10308fi
10309ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10310if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10312$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 10313else
81ecdfbb
RW
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
c906108c 10316fi
bec39cab 10317
81ecdfbb
RW
10318 if test "x$ac_ct_WINDRES" = x; then
10319 WINDRES=""
10320 else
10321 case $cross_compiling:$ac_tool_warned in
10322yes:)
10323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10325ac_tool_warned=yes ;;
10326esac
10327 WINDRES=$ac_ct_WINDRES
10328 fi
c906108c 10329else
bec39cab 10330 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
10331fi
10332
bec39cab
AC
10333
10334# Needed for GNU/Hurd.
10335if test -n "$ac_tool_prefix"; then
10336 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
10337set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10339$as_echo_n "checking for $ac_word... " >&6; }
10340if test "${ac_cv_prog_MIG+set}" = set; then :
10341 $as_echo_n "(cached) " >&6
c906108c 10342else
bec39cab
AC
10343 if test -n "$MIG"; then
10344 ac_cv_prog_MIG="$MIG" # Let the user override the test.
10345else
10346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349 IFS=$as_save_IFS
10350 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10351 for ac_exec_ext in '' $ac_executable_extensions; do
10352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10353 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 10354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10355 break 2
10356 fi
10357done
81ecdfbb
RW
10358 done
10359IFS=$as_save_IFS
bec39cab 10360
c906108c 10361fi
bec39cab
AC
10362fi
10363MIG=$ac_cv_prog_MIG
10364if test -n "$MIG"; then
81ecdfbb
RW
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
10366$as_echo "$MIG" >&6; }
c906108c 10367else
81ecdfbb
RW
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
c906108c
SS
10370fi
10371
81ecdfbb 10372
bec39cab
AC
10373fi
10374if test -z "$ac_cv_prog_MIG"; then
10375 ac_ct_MIG=$MIG
10376 # Extract the first word of "mig", so it can be a program name with args.
10377set dummy mig; ac_word=$2
81ecdfbb
RW
10378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10379$as_echo_n "checking for $ac_word... " >&6; }
10380if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
10381 $as_echo_n "(cached) " >&6
bec39cab
AC
10382else
10383 if test -n "$ac_ct_MIG"; then
10384 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
10385else
10386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387for as_dir in $PATH
10388do
10389 IFS=$as_save_IFS
10390 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
10391 for ac_exec_ext in '' $ac_executable_extensions; do
10392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 10393 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 10394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
10395 break 2
10396 fi
10397done
81ecdfbb
RW
10398 done
10399IFS=$as_save_IFS
c906108c 10400
bec39cab
AC
10401fi
10402fi
10403ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
10404if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
10406$as_echo "$ac_ct_MIG" >&6; }
bec39cab 10407else
81ecdfbb
RW
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
bec39cab 10410fi
c906108c 10411
81ecdfbb
RW
10412 if test "x$ac_ct_MIG" = x; then
10413 MIG=""
10414 else
10415 case $cross_compiling:$ac_tool_warned in
10416yes:)
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10419ac_tool_warned=yes ;;
10420esac
10421 MIG=$ac_ct_MIG
10422 fi
bec39cab
AC
10423else
10424 MIG="$ac_cv_prog_MIG"
10425fi
c906108c 10426
c906108c 10427
bec39cab
AC
10428# ---------------------- #
10429# Checks for libraries. #
10430# ---------------------- #
c906108c 10431
bec39cab 10432# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10434$as_echo_n "checking for main in -lm... " >&6; }
10435if test "${ac_cv_lib_m_main+set}" = set; then :
10436 $as_echo_n "(cached) " >&6
bec39cab
AC
10437else
10438 ac_check_lib_save_LIBS=$LIBS
10439LIBS="-lm $LIBS"
81ecdfbb 10440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10441/* end confdefs.h. */
c906108c 10442
c906108c 10443
bec39cab
AC
10444int
10445main ()
10446{
81ecdfbb 10447return main ();
bec39cab
AC
10448 ;
10449 return 0;
10450}
10451_ACEOF
81ecdfbb 10452if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
10453 ac_cv_lib_m_main=yes
10454else
81ecdfbb 10455 ac_cv_lib_m_main=no
bec39cab 10456fi
81ecdfbb
RW
10457rm -f core conftest.err conftest.$ac_objext \
10458 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
10459LIBS=$ac_check_lib_save_LIBS
10460fi
81ecdfbb
RW
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10462$as_echo "$ac_cv_lib_m_main" >&6; }
10463if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
10464 cat >>confdefs.h <<_ACEOF
10465#define HAVE_LIBM 1
10466_ACEOF
10467
10468 LIBS="-lm $LIBS"
c906108c 10469
c906108c 10470fi
bec39cab
AC
10471
10472
10473# We need to link with -lw to get `wctype' on Solaris before Solaris
10474# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
10475# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
10476# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
10477ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
10478if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 10479
c906108c 10480else
81ecdfbb
RW
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
10482$as_echo_n "checking for wctype in -lw... " >&6; }
10483if test "${ac_cv_lib_w_wctype+set}" = set; then :
10484 $as_echo_n "(cached) " >&6
bec39cab
AC
10485else
10486 ac_check_lib_save_LIBS=$LIBS
10487LIBS="-lw $LIBS"
81ecdfbb 10488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10489/* end confdefs.h. */
c906108c 10490
81ecdfbb
RW
10491/* Override any GCC internal prototype to avoid an error.
10492 Use char because int might match the return type of a GCC
10493 builtin and then its argument prototype would still apply. */
bec39cab
AC
10494#ifdef __cplusplus
10495extern "C"
10496#endif
bec39cab
AC
10497char wctype ();
10498int
10499main ()
10500{
81ecdfbb 10501return wctype ();
bec39cab
AC
10502 ;
10503 return 0;
10504}
10505_ACEOF
81ecdfbb 10506if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
10507 ac_cv_lib_w_wctype=yes
10508else
81ecdfbb 10509 ac_cv_lib_w_wctype=no
bec39cab 10510fi
81ecdfbb
RW
10511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
10513LIBS=$ac_check_lib_save_LIBS
10514fi
81ecdfbb
RW
10515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
10516$as_echo "$ac_cv_lib_w_wctype" >&6; }
10517if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
10518 cat >>confdefs.h <<_ACEOF
10519#define HAVE_LIBW 1
10520_ACEOF
c906108c 10521
bec39cab 10522 LIBS="-lw $LIBS"
c906108c 10523
bec39cab 10524fi
c906108c 10525
bec39cab 10526fi
c906108c 10527
ddc9cd0f 10528
bec39cab 10529# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
10531$as_echo_n "checking for library containing gethostbyname... " >&6; }
10532if test "${ac_cv_search_gethostbyname+set}" = set; then :
10533 $as_echo_n "(cached) " >&6
bec39cab
AC
10534else
10535 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10537/* end confdefs.h. */
ddc9cd0f 10538
81ecdfbb
RW
10539/* Override any GCC internal prototype to avoid an error.
10540 Use char because int might match the return type of a GCC
10541 builtin and then its argument prototype would still apply. */
bec39cab
AC
10542#ifdef __cplusplus
10543extern "C"
10544#endif
bec39cab
AC
10545char gethostbyname ();
10546int
10547main ()
10548{
81ecdfbb 10549return gethostbyname ();
bec39cab
AC
10550 ;
10551 return 0;
10552}
10553_ACEOF
81ecdfbb
RW
10554for ac_lib in '' nsl; do
10555 if test -z "$ac_lib"; then
10556 ac_res="none required"
10557 else
10558 ac_res=-l$ac_lib
b4e70030 10559 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
10560 fi
10561 if ac_fn_c_try_link "$LINENO"; then :
10562 ac_cv_search_gethostbyname=$ac_res
10563fi
10564rm -f core conftest.err conftest.$ac_objext \
10565 conftest$ac_exeext
10566 if test "${ac_cv_search_gethostbyname+set}" = set; then :
10567 break
10568fi
10569done
10570if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 10571
bec39cab 10572else
81ecdfbb 10573 ac_cv_search_gethostbyname=no
bec39cab 10574fi
81ecdfbb 10575rm conftest.$ac_ext
bec39cab
AC
10576LIBS=$ac_func_search_save_LIBS
10577fi
81ecdfbb
RW
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
10579$as_echo "$ac_cv_search_gethostbyname" >&6; }
10580ac_res=$ac_cv_search_gethostbyname
10581if test "$ac_res" != no; then :
10582 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 10583
bec39cab 10584fi
96baa820 10585
c906108c 10586
b4e70030 10587# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
10589$as_echo_n "checking for library containing socketpair... " >&6; }
10590if test "${ac_cv_search_socketpair+set}" = set; then :
10591 $as_echo_n "(cached) " >&6
b4e70030
JB
10592else
10593 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
10595/* end confdefs.h. */
10596
81ecdfbb
RW
10597/* Override any GCC internal prototype to avoid an error.
10598 Use char because int might match the return type of a GCC
10599 builtin and then its argument prototype would still apply. */
b4e70030
JB
10600#ifdef __cplusplus
10601extern "C"
10602#endif
b4e70030
JB
10603char socketpair ();
10604int
10605main ()
10606{
81ecdfbb 10607return socketpair ();
b4e70030
JB
10608 ;
10609 return 0;
10610}
10611_ACEOF
81ecdfbb
RW
10612for ac_lib in '' socket; do
10613 if test -z "$ac_lib"; then
10614 ac_res="none required"
10615 else
10616 ac_res=-l$ac_lib
b4e70030 10617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
10618 fi
10619 if ac_fn_c_try_link "$LINENO"; then :
10620 ac_cv_search_socketpair=$ac_res
10621fi
10622rm -f core conftest.err conftest.$ac_objext \
10623 conftest$ac_exeext
10624 if test "${ac_cv_search_socketpair+set}" = set; then :
10625 break
10626fi
10627done
10628if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 10629
b4e70030 10630else
81ecdfbb 10631 ac_cv_search_socketpair=no
b4e70030 10632fi
81ecdfbb 10633rm conftest.$ac_ext
b4e70030
JB
10634LIBS=$ac_func_search_save_LIBS
10635fi
81ecdfbb
RW
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
10637$as_echo "$ac_cv_search_socketpair" >&6; }
10638ac_res=$ac_cv_search_socketpair
10639if test "$ac_res" != no; then :
10640 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
10641
10642fi
10643
10644
233a11ab 10645# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
10646
10647 # See if the user specified whether he wants zlib support or not.
10648
10649# Check whether --with-zlib was given.
10650if test "${with_zlib+set}" = set; then :
10651 withval=$with_zlib;
10652else
10653 with_zlib=auto
10654fi
10655
10656
10657 if test "$with_zlib" != "no"; then
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
10659$as_echo_n "checking for library containing zlibVersion... " >&6; }
10660if test "${ac_cv_search_zlibVersion+set}" = set; then :
10661 $as_echo_n "(cached) " >&6
233a11ab
CS
10662else
10663 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
10665/* end confdefs.h. */
10666
81ecdfbb
RW
10667/* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
233a11ab 10669 builtin and then its argument prototype would still apply. */
233a11ab
CS
10670#ifdef __cplusplus
10671extern "C"
10672#endif
233a11ab
CS
10673char zlibVersion ();
10674int
10675main ()
10676{
81ecdfbb 10677return zlibVersion ();
233a11ab
CS
10678 ;
10679 return 0;
10680}
10681_ACEOF
81ecdfbb
RW
10682for ac_lib in '' z; do
10683 if test -z "$ac_lib"; then
10684 ac_res="none required"
233a11ab 10685 else
81ecdfbb
RW
10686 ac_res=-l$ac_lib
10687 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 10688 fi
81ecdfbb
RW
10689 if ac_fn_c_try_link "$LINENO"; then :
10690 ac_cv_search_zlibVersion=$ac_res
233a11ab 10691fi
81ecdfbb
RW
10692rm -f core conftest.err conftest.$ac_objext \
10693 conftest$ac_exeext
10694 if test "${ac_cv_search_zlibVersion+set}" = set; then :
10695 break
233a11ab 10696fi
81ecdfbb
RW
10697done
10698if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 10699
233a11ab 10700else
81ecdfbb 10701 ac_cv_search_zlibVersion=no
233a11ab 10702fi
81ecdfbb
RW
10703rm conftest.$ac_ext
10704LIBS=$ac_func_search_save_LIBS
233a11ab 10705fi
81ecdfbb
RW
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
10707$as_echo "$ac_cv_search_zlibVersion" >&6; }
10708ac_res=$ac_cv_search_zlibVersion
10709if test "$ac_res" != no; then :
10710 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10711 for ac_header in zlib.h
10712do :
10713 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10714if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 10715 cat >>confdefs.h <<_ACEOF
81ecdfbb 10716#define HAVE_ZLIB_H 1
233a11ab
CS
10717_ACEOF
10718
10719fi
10720
10721done
10722
10723fi
10724
b040ad30
JB
10725 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
10726 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
10727 fi
10728 fi
10729
233a11ab 10730
77f120bf 10731# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
10733$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
10734if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
10735 $as_echo_n "(cached) " >&6
bec39cab
AC
10736else
10737 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10739/* end confdefs.h. */
c906108c 10740
81ecdfbb
RW
10741/* Override any GCC internal prototype to avoid an error.
10742 Use char because int might match the return type of a GCC
10743 builtin and then its argument prototype would still apply. */
bec39cab
AC
10744#ifdef __cplusplus
10745extern "C"
10746#endif
77f120bf 10747char dlgetmodinfo ();
bec39cab
AC
10748int
10749main ()
10750{
81ecdfbb 10751return dlgetmodinfo ();
bec39cab
AC
10752 ;
10753 return 0;
10754}
10755_ACEOF
81ecdfbb
RW
10756for ac_lib in '' dl xpdl; do
10757 if test -z "$ac_lib"; then
10758 ac_res="none required"
10759 else
10760 ac_res=-l$ac_lib
b4e70030 10761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
10762 fi
10763 if ac_fn_c_try_link "$LINENO"; then :
10764 ac_cv_search_dlgetmodinfo=$ac_res
10765fi
10766rm -f core conftest.err conftest.$ac_objext \
10767 conftest$ac_exeext
10768 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
10769 break
10770fi
10771done
10772if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 10773
4e8d927d 10774else
81ecdfbb 10775 ac_cv_search_dlgetmodinfo=no
1ba607ad 10776fi
81ecdfbb 10777rm conftest.$ac_ext
bec39cab
AC
10778LIBS=$ac_func_search_save_LIBS
10779fi
81ecdfbb
RW
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
10781$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
10782ac_res=$ac_cv_search_dlgetmodinfo
10783if test "$ac_res" != no; then :
10784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 10785
8bb2c122 10786fi
8bb2c122 10787
8bb2c122 10788
77f120bf 10789
77f120bf 10790
6c7a06a3 10791
81ecdfbb
RW
10792# Check whether --with-libiconv-prefix was given.
10793if test "${with_libiconv_prefix+set}" = set; then :
10794 withval=$with_libiconv_prefix;
6c7a06a3 10795 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
10796 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10797 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
10798 done
10799
81ecdfbb
RW
10800fi
10801
6c7a06a3 10802
f18c4681 10803 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
10804 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10805
81ecdfbb
RW
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
10807$as_echo_n "checking for iconv... " >&6; }
10808if test "${am_cv_func_iconv+set}" = set; then :
10809 $as_echo_n "(cached) " >&6
d542061a 10810else
6c7a06a3
TT
10811
10812 am_cv_func_iconv="no, consider installing GNU libiconv"
10813 am_cv_lib_iconv=no
10814 am_cv_use_build_libiconv=no
f0f20949 10815 am_cv_build_libiconv_path=
4edb1e84
JB
10816
10817 # If libiconv is part of the build tree, then try using it over
10818 # any system iconv.
10819 if test -d ../libiconv; then
f18c4681
JB
10820 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
10821 am_save_LIBS="$LIBS"
10822 am_save_CPPFLAGS="$CPPFLAGS"
10823 LIBS="$LIBS $lib_dir/libiconv.a"
10824 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 10826/* end confdefs.h. */
6c7a06a3
TT
10827#include <stdlib.h>
10828#include <iconv.h>
d542061a
UW
10829int
10830main ()
10831{
6c7a06a3 10832iconv_t cd = iconv_open("","");
f18c4681
JB
10833 iconv(cd,NULL,NULL,NULL,NULL);
10834 iconv_close(cd);
d542061a
UW
10835 ;
10836 return 0;
10837}
10838_ACEOF
81ecdfbb 10839if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10840 am_cv_use_build_libiconv=yes
f0f20949 10841 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
10842 am_cv_lib_iconv=yes
10843 am_cv_func_iconv=yes
d542061a 10844fi
81ecdfbb
RW
10845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
10847 LIBS="$am_save_LIBS"
10848 CPPFLAGS="$am_save_CPPFLAGS"
10849 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
10850 break
10851 fi
10852 done
4edb1e84 10853 fi
94ae1714 10854
4edb1e84 10855 # Next, try to find iconv in libc.
6c7a06a3 10856 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 10857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 10858/* end confdefs.h. */
6c7a06a3
TT
10859#include <stdlib.h>
10860#include <iconv.h>
d542061a
UW
10861int
10862main ()
10863{
6c7a06a3
TT
10864iconv_t cd = iconv_open("","");
10865 iconv(cd,NULL,NULL,NULL,NULL);
10866 iconv_close(cd);
d542061a
UW
10867 ;
10868 return 0;
10869}
10870_ACEOF
81ecdfbb 10871if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10872 am_cv_func_iconv=yes
d542061a 10873fi
81ecdfbb
RW
10874rm -f core conftest.err conftest.$ac_objext \
10875 conftest$ac_exeext conftest.$ac_ext
77f120bf 10876 fi
94ae1714 10877
4edb1e84
JB
10878 # If iconv was not in libc, try -liconv. In this case, arrange to
10879 # look in the libiconv prefix, if it was specified by the user.
10880 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 10881 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
10882 am_save_LIBS="$LIBS"
10883 if test -n "$LIBICONV_INCLUDE"; then
10884 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10885 LIBS="$LIBS $LIBICONV_LIBDIR"
10886 fi
10887 LIBS="$LIBS -liconv"
81ecdfbb 10888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10889/* end confdefs.h. */
6c7a06a3
TT
10890#include <stdlib.h>
10891#include <iconv.h>
bec39cab
AC
10892int
10893main ()
10894{
6c7a06a3
TT
10895iconv_t cd = iconv_open("","");
10896 iconv(cd,NULL,NULL,NULL,NULL);
10897 iconv_close(cd);
bec39cab
AC
10898 ;
10899 return 0;
10900}
10901_ACEOF
81ecdfbb 10902if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10903 am_cv_lib_iconv=yes
6c7a06a3 10904 am_cv_func_iconv=yes
627af7ea 10905fi
81ecdfbb
RW
10906rm -f core conftest.err conftest.$ac_objext \
10907 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10908 LIBS="$am_save_LIBS"
fc3b640d 10909 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10910 fi
10911
10912fi
81ecdfbb
RW
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
10914$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
10915
10916 # Set the various flags based on the cache variables. We can't rely
10917 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10918 LIBICONV=
10919 if test "$am_cv_lib_iconv" = yes; then
10920 LIBICONV="-liconv"
94ae1714
TT
10921 else
10922 LIBICONV_LIBDIR=
10923 LIBICONV_INCLUDE=
fc3b640d
TT
10924 fi
10925 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 10926 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 10927 LIBICONV_LIBDIR=""
fc3b640d
TT
10928 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10929 fi
10930 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10931 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10932
6c7a06a3
TT
10933 if test "$am_cv_func_iconv" = yes; then
10934
81ecdfbb 10935$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 10936
81ecdfbb
RW
10937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
10938$as_echo_n "checking for iconv declaration... " >&6; }
10939 if test "${am_cv_proto_iconv+set}" = set; then :
10940 $as_echo_n "(cached) " >&6
6c7a06a3
TT
10941else
10942
81ecdfbb 10943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
10944/* end confdefs.h. */
10945
6c7a06a3
TT
10946#include <stdlib.h>
10947#include <iconv.h>
10948extern
b4e70030 10949#ifdef __cplusplus
6c7a06a3 10950"C"
b4e70030 10951#endif
6c7a06a3
TT
10952#if defined(__STDC__) || defined(__cplusplus)
10953size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10954#else
10955size_t iconv();
10956#endif
10957
b4e70030
JB
10958int
10959main ()
10960{
6c7a06a3 10961
b4e70030
JB
10962 ;
10963 return 0;
10964}
10965_ACEOF
81ecdfbb 10966if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 10967 am_cv_proto_iconv_arg1=""
4e8d927d 10968else
81ecdfbb 10969 am_cv_proto_iconv_arg1="const"
b4e70030 10970fi
81ecdfbb 10971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
10972 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);"
10973fi
10974
10975 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 10977 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
10978$as_echo "${ac_t:-
10979 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
10980
10981cat >>confdefs.h <<_ACEOF
10982#define ICONV_CONST $am_cv_proto_iconv_arg1
10983_ACEOF
10984
10985 fi
6c7a06a3
TT
10986
10987
478aac75
DE
10988# GDB may fork/exec the iconv program to get the list of supported character
10989# sets. Allow the user to specify where to find it.
10990# There are several factors affecting the choice of option name:
10991# - There is already --with-libiconv-prefix but we can't use it, it specifies
10992# the build-time location of libiconv files.
10993# - The program we need to find is iconv, which comes with glibc. The user
10994# doesn't necessarily have libiconv installed. Therefore naming this
10995# --with-libiconv-foo feels wrong.
10996# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
10997# defined to work on directories not files (though it really doesn't know
10998# the difference).
10999# - Calling this --with-iconv-prefix is perceived to cause too much confusion
11000# with --with-libiconv-prefix.
11001# Putting these together is why the option name is --with-iconv-bin.
11002
11003
11004# Check whether --with-iconv-bin was given.
11005if test "${with_iconv_bin+set}" = set; then :
11006 withval=$with_iconv_bin; iconv_bin="${withval}"
11007
11008cat >>confdefs.h <<_ACEOF
11009#define ICONV_BIN "${iconv_bin}"
11010_ACEOF
11011
11012
11013 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11014 if test "x$prefix" = xNONE; then
11015 test_prefix=/usr/local
11016 else
11017 test_prefix=$prefix
11018 fi
11019 else
11020 test_prefix=$exec_prefix
11021 fi
11022 value=0
11023 case ${iconv_bin} in
11024 "${test_prefix}"|"${test_prefix}/"*|\
11025 '${exec_prefix}'|'${exec_prefix}/'*)
11026 value=1
11027 ;;
11028 esac
11029
11030cat >>confdefs.h <<_ACEOF
11031#define ICONV_BIN_RELOCATABLE $value
11032_ACEOF
11033
11034
11035
11036fi
11037
11038
6c7a06a3
TT
11039# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
11040# There is a very specific comment in /usr/include/curses.h explaining that
11041# termcap routines built into libcurses must not be used.
11042#
11043# The symptoms we observed so far is GDB unexpectedly changing
11044# the terminal settings when tgetent is called - this is particularly
11045# visible as the output is missing carriage returns, and so rapidly
11046# becomes very hard to read.
11047#
11048# The readline configure script has already decided that libtermcap
11049# was enough for its purposes, and so decided to build readline using
11050# libtermcap. Since the TUI mode requires curses, building GDB with
11051# TUI enabled results in both libraries to be used at the same time,
11052# which is not allowed. This basically means that GDB with TUI is
11053# broken on alpha-osf.
11054
11055case $host_os in
6bcc772d
RO
11056 osf* )
11057 if test x"$enable_tui" = xyes; then
81ecdfbb 11058 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 11059 fi
6bcc772d 11060 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
11061 enable_tui=no
11062 fi
11063 ;;
11064esac
11065
cb01cfba 11066# For the TUI, we need enhanced curses functionality.
bd8a8e1b 11067if test x"$enable_tui" != xno; then
cb01cfba
JB
11068 prefer_curses=yes
11069fi
11070
11071curses_found=no
11072if test x"$prefer_curses" = xyes; then
11073 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
11074 # curses library because the latter might not provide all the
11075 # functionality we need. However, this leads to problems on systems
11076 # where the linker searches /usr/local/lib, but the compiler doesn't
11077 # search /usr/local/include, if ncurses is installed in /usr/local. A
11078 # default installation of ncurses on alpha*-dec-osf* will lead to such
11079 # a situation.
81ecdfbb
RW
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
11081$as_echo_n "checking for library containing waddstr... " >&6; }
11082if test "${ac_cv_search_waddstr+set}" = set; then :
11083 $as_echo_n "(cached) " >&6
6c7a06a3
TT
11084else
11085 ac_func_search_save_LIBS=$LIBS
81ecdfbb 11086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11087/* end confdefs.h. */
11088
81ecdfbb
RW
11089/* Override any GCC internal prototype to avoid an error.
11090 Use char because int might match the return type of a GCC
11091 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
11092#ifdef __cplusplus
11093extern "C"
11094#endif
6c7a06a3
TT
11095char waddstr ();
11096int
11097main ()
11098{
81ecdfbb 11099return waddstr ();
6c7a06a3
TT
11100 ;
11101 return 0;
11102}
11103_ACEOF
81ecdfbb
RW
11104for ac_lib in '' ncurses cursesX curses; do
11105 if test -z "$ac_lib"; then
11106 ac_res="none required"
11107 else
11108 ac_res=-l$ac_lib
11109 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11110 fi
11111 if ac_fn_c_try_link "$LINENO"; then :
11112 ac_cv_search_waddstr=$ac_res
11113fi
11114rm -f core conftest.err conftest.$ac_objext \
11115 conftest$ac_exeext
11116 if test "${ac_cv_search_waddstr+set}" = set; then :
11117 break
11118fi
11119done
11120if test "${ac_cv_search_waddstr+set}" = set; then :
11121
6c7a06a3 11122else
81ecdfbb
RW
11123 ac_cv_search_waddstr=no
11124fi
11125rm conftest.$ac_ext
11126LIBS=$ac_func_search_save_LIBS
11127fi
11128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
11129$as_echo "$ac_cv_search_waddstr" >&6; }
11130ac_res=$ac_cv_search_waddstr
11131if test "$ac_res" != no; then :
11132 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
11133
11134fi
11135
11136
cb01cfba
JB
11137 if test "$ac_cv_search_waddstr" != no; then
11138 curses_found=yes
11139 fi
11140fi
11141
11142# Check whether we should enable the TUI, but only do so if we really
11143# can.
11144if test x"$enable_tui" != xno; then
11145 if test -d $srcdir/tui; then
11146 if test "$curses_found" != no; then
6c7a06a3
TT
11147 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
11148 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
11149 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
11150 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
11151 else
11152 if test x"$enable_tui" = xyes; then
81ecdfbb 11153 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 11154 else
81ecdfbb
RW
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
11156$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
11157 fi
11158 fi
11159 fi
11160fi
11161
11162# Since GDB uses Readline, we need termcap functionality. In many
11163# cases this will be provided by the curses library, but some systems
11164# have a seperate termcap library, or no curses library at all.
11165
11166case $host_os in
11167 cygwin*)
11168 if test -d $srcdir/libtermcap; then
11169 LIBS="../libtermcap/libtermcap.a $LIBS"
11170 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
11171 fi ;;
11172 go32* | *djgpp*)
11173 ac_cv_search_tgetent="none required"
11174 ;;
11175 *mingw32*)
11176 ac_cv_search_tgetent="none required"
11177 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
11178 ;;
11179esac
11180
11181# These are the libraries checked by Readline.
81ecdfbb
RW
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
11183$as_echo_n "checking for library containing tgetent... " >&6; }
11184if test "${ac_cv_search_tgetent+set}" = set; then :
11185 $as_echo_n "(cached) " >&6
6c7a06a3
TT
11186else
11187 ac_func_search_save_LIBS=$LIBS
81ecdfbb 11188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11189/* end confdefs.h. */
11190
81ecdfbb
RW
11191/* Override any GCC internal prototype to avoid an error.
11192 Use char because int might match the return type of a GCC
11193 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
11194#ifdef __cplusplus
11195extern "C"
11196#endif
6c7a06a3
TT
11197char tgetent ();
11198int
11199main ()
11200{
81ecdfbb 11201return tgetent ();
6c7a06a3
TT
11202 ;
11203 return 0;
11204}
11205_ACEOF
81ecdfbb
RW
11206for ac_lib in '' termcap tinfo curses ncurses; do
11207 if test -z "$ac_lib"; then
11208 ac_res="none required"
11209 else
11210 ac_res=-l$ac_lib
6c7a06a3 11211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
11212 fi
11213 if ac_fn_c_try_link "$LINENO"; then :
11214 ac_cv_search_tgetent=$ac_res
11215fi
11216rm -f core conftest.err conftest.$ac_objext \
11217 conftest$ac_exeext
11218 if test "${ac_cv_search_tgetent+set}" = set; then :
11219 break
11220fi
11221done
11222if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 11223
6c7a06a3 11224else
81ecdfbb 11225 ac_cv_search_tgetent=no
6c7a06a3 11226fi
81ecdfbb 11227rm conftest.$ac_ext
6c7a06a3
TT
11228LIBS=$ac_func_search_save_LIBS
11229fi
81ecdfbb
RW
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
11231$as_echo "$ac_cv_search_tgetent" >&6; }
11232ac_res=$ac_cv_search_tgetent
11233if test "$ac_res" != no; then :
11234 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 11235
06825bd1
MK
11236fi
11237
06825bd1 11238
bec39cab 11239if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 11240 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
11241fi
11242
3841debe 11243
81ecdfbb
RW
11244# Check whether --with-system-readline was given.
11245if test "${with_system_readline+set}" = set; then :
11246 withval=$with_system_readline;
11247fi
6a30b0a5 11248
6a30b0a5
AS
11249
11250if test "$with_system_readline" = yes; then
11251 READLINE=-lreadline
11252 READLINE_DEPS=
11253 READLINE_CFLAGS=
39037522 11254 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
11255else
11256 READLINE='$(READLINE_DIR)/libreadline.a'
11257 READLINE_DEPS='$(READLINE)'
11258 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 11259 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
11260fi
11261
11262
11263
11264
11265
f997c383
SD
11266# Generate jit-reader.h
11267
11268# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
11269TARGET_PTR=
11270
11271# The cast to long int works around a bug in the HP C Compiler
11272# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11273# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11274# This bug is HP SR number 8606223364.
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
11276$as_echo_n "checking size of unsigned long long... " >&6; }
11277if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
11278 $as_echo_n "(cached) " >&6
11279else
11280 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
11281
11282else
11283 if test "$ac_cv_type_unsigned_long_long" = yes; then
11284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11286{ as_fn_set_status 77
11287as_fn_error "cannot compute sizeof (unsigned long long)
11288See \`config.log' for more details." "$LINENO" 5; }; }
11289 else
11290 ac_cv_sizeof_unsigned_long_long=0
11291 fi
11292fi
11293
11294fi
11295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
11296$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
11297
11298
11299
11300cat >>confdefs.h <<_ACEOF
11301#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
11302_ACEOF
11303
11304
11305# The cast to long int works around a bug in the HP C Compiler
11306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11308# This bug is HP SR number 8606223364.
11309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
11310$as_echo_n "checking size of unsigned long... " >&6; }
11311if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
11312 $as_echo_n "(cached) " >&6
11313else
11314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
11315
11316else
11317 if test "$ac_cv_type_unsigned_long" = yes; then
11318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11320{ as_fn_set_status 77
11321as_fn_error "cannot compute sizeof (unsigned long)
11322See \`config.log' for more details." "$LINENO" 5; }; }
11323 else
11324 ac_cv_sizeof_unsigned_long=0
11325 fi
11326fi
11327
11328fi
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
11330$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
11331
11332
11333
11334cat >>confdefs.h <<_ACEOF
11335#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
11336_ACEOF
11337
11338
11339# The cast to long int works around a bug in the HP C Compiler
11340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11342# This bug is HP SR number 8606223364.
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
11344$as_echo_n "checking size of unsigned __int128... " >&6; }
11345if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
11346 $as_echo_n "(cached) " >&6
11347else
11348 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
11349
11350else
11351 if test "$ac_cv_type_unsigned___int128" = yes; then
11352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11354{ as_fn_set_status 77
11355as_fn_error "cannot compute sizeof (unsigned __int128)
11356See \`config.log' for more details." "$LINENO" 5; }; }
11357 else
11358 ac_cv_sizeof_unsigned___int128=0
11359 fi
11360fi
11361
11362fi
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
11364$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
11365
11366
11367
11368cat >>confdefs.h <<_ACEOF
11369#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
11370_ACEOF
11371
11372
11373
11374if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
11375 TARGET_PTR="unsigned long"
11376elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
11377 TARGET_PTR="unsigned long long"
11378elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
11379 TARGET_PTR="unsigned __int128"
11380else
11381 TARGET_PTR="unsigned long"
11382fi
11383
11384
11385ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
11386
11387
a2d08b9e
SD
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11389$as_echo_n "checking for library containing dlopen... " >&6; }
11390if test "${ac_cv_search_dlopen+set}" = set; then :
11391 $as_echo_n "(cached) " >&6
11392else
11393 ac_func_search_save_LIBS=$LIBS
11394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11395/* end confdefs.h. */
11396
11397/* Override any GCC internal prototype to avoid an error.
11398 Use char because int might match the return type of a GCC
11399 builtin and then its argument prototype would still apply. */
11400#ifdef __cplusplus
11401extern "C"
11402#endif
11403char dlopen ();
11404int
11405main ()
11406{
11407return dlopen ();
11408 ;
11409 return 0;
11410}
11411_ACEOF
11412for ac_lib in '' dl; do
11413 if test -z "$ac_lib"; then
11414 ac_res="none required"
11415 else
11416 ac_res=-l$ac_lib
11417 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11418 fi
11419 if ac_fn_c_try_link "$LINENO"; then :
11420 ac_cv_search_dlopen=$ac_res
11421fi
11422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext
11424 if test "${ac_cv_search_dlopen+set}" = set; then :
11425 break
11426fi
11427done
11428if test "${ac_cv_search_dlopen+set}" = set; then :
11429
11430else
11431 ac_cv_search_dlopen=no
11432fi
11433rm conftest.$ac_ext
11434LIBS=$ac_func_search_save_LIBS
11435fi
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11437$as_echo "$ac_cv_search_dlopen" >&6; }
11438ac_res=$ac_cv_search_dlopen
11439if test "$ac_res" != no; then :
11440 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11441
11442fi
11443
11444
39037522 11445
b8e0a31c
SD
11446
11447# Check whether --with-jit-reader-dir was given.
11448if test "${with_jit_reader_dir+set}" = set; then :
11449 withval=$with_jit_reader_dir;
11450 JIT_READER_DIR=$withval
11451else
11452 JIT_READER_DIR=${libdir}/gdb
11453fi
11454
11455
11456 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
11457 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11458 ac_define_dir=`eval echo $JIT_READER_DIR`
11459 ac_define_dir=`eval echo $ac_define_dir`
11460
11461cat >>confdefs.h <<_ACEOF
11462#define JIT_READER_DIR "$ac_define_dir"
11463_ACEOF
11464
11465
11466
11467
11468 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11469 if test "x$prefix" = xNONE; then
11470 test_prefix=/usr/local
11471 else
11472 test_prefix=$prefix
11473 fi
11474 else
11475 test_prefix=$exec_prefix
11476 fi
11477 value=0
11478 case ${ac_define_dir} in
11479 "${test_prefix}"|"${test_prefix}/"*|\
11480 '${exec_prefix}'|'${exec_prefix}/'*)
11481 value=1
11482 ;;
11483 esac
11484
11485cat >>confdefs.h <<_ACEOF
11486#define JIT_READER_DIR_RELOCATABLE $value
11487_ACEOF
11488
11489
11490
11491
11492
81ecdfbb
RW
11493# Check whether --with-expat was given.
11494if test "${with_expat+set}" = set; then :
11495 withval=$with_expat;
5c39566f
DJ
11496else
11497 with_expat=auto
81ecdfbb
RW
11498fi
11499
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
11501$as_echo_n "checking whether to use expat... " >&6; }
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
11503$as_echo "$with_expat" >&6; }
5c39566f
DJ
11504
11505if test "${with_expat}" = no; then
81ecdfbb
RW
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
11507$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
11508 HAVE_LIBEXPAT=no
11509else
11510
3841debe
DJ
11511 if test "X$prefix" = "XNONE"; then
11512 acl_final_prefix="$ac_default_prefix"
11513 else
11514 acl_final_prefix="$prefix"
11515 fi
11516 if test "X$exec_prefix" = "XNONE"; then
11517 acl_final_exec_prefix='${prefix}'
11518 else
11519 acl_final_exec_prefix="$exec_prefix"
11520 fi
11521 acl_save_prefix="$prefix"
11522 prefix="$acl_final_prefix"
11523 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11524 prefix="$acl_save_prefix"
11525
11526
81ecdfbb
RW
11527# Check whether --with-gnu-ld was given.
11528if test "${with_gnu_ld+set}" = set; then :
11529 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
11530else
11531 with_gnu_ld=no
81ecdfbb
RW
11532fi
11533
3841debe
DJ
11534# Prepare PATH_SEPARATOR.
11535# The user is always right.
11536if test "${PATH_SEPARATOR+set}" != set; then
11537 echo "#! /bin/sh" >conf$$.sh
11538 echo "exit 0" >>conf$$.sh
11539 chmod +x conf$$.sh
11540 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11541 PATH_SEPARATOR=';'
11542 else
11543 PATH_SEPARATOR=:
11544 fi
11545 rm -f conf$$.sh
11546fi
11547ac_prog=ld
11548if test "$GCC" = yes; then
11549 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
11551$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
11552 case $host in
11553 *-*-mingw*)
11554 # gcc leaves a trailing carriage return which upsets mingw
11555 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11556 *)
11557 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11558 esac
11559 case $ac_prog in
11560 # Accept absolute paths.
11561 [\\/]* | [A-Za-z]:[\\/]*)
11562 re_direlt='/[^/][^/]*/\.\./'
11563 # Canonicalize the path of ld
11564 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11565 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11566 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11567 done
11568 test -z "$LD" && LD="$ac_prog"
11569 ;;
11570 "")
11571 # If it fails, then pretend we aren't using GCC.
11572 ac_prog=ld
11573 ;;
11574 *)
11575 # If it is relative, then search for the first ld in PATH.
11576 with_gnu_ld=unknown
11577 ;;
11578 esac
11579elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11581$as_echo_n "checking for GNU ld... " >&6; }
3841debe 11582else
81ecdfbb
RW
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11584$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 11585fi
81ecdfbb
RW
11586if test "${acl_cv_path_LD+set}" = set; then :
11587 $as_echo_n "(cached) " >&6
3841debe
DJ
11588else
11589 if test -z "$LD"; then
11590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11591 for ac_dir in $PATH; do
11592 test -z "$ac_dir" && ac_dir=.
11593 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11594 acl_cv_path_LD="$ac_dir/$ac_prog"
11595 # Check to see if the program is GNU ld. I'd rather use --version,
11596 # but apparently some GNU ld's only accept -v.
11597 # Break only if it was the GNU/non-GNU ld that we prefer.
11598 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11599 test "$with_gnu_ld" != no && break
11600 else
11601 test "$with_gnu_ld" != yes && break
11602 fi
11603 fi
11604 done
11605 IFS="$ac_save_ifs"
11606else
11607 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11608fi
11609fi
11610
11611LD="$acl_cv_path_LD"
11612if test -n "$LD"; then
81ecdfbb
RW
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11614$as_echo "$LD" >&6; }
3841debe 11615else
81ecdfbb
RW
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
3841debe 11618fi
81ecdfbb
RW
11619test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11621$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11622if test "${acl_cv_prog_gnu_ld+set}" = set; then :
11623 $as_echo_n "(cached) " >&6
3841debe
DJ
11624else
11625 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
11626if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11627 acl_cv_prog_gnu_ld=yes
11628else
11629 acl_cv_prog_gnu_ld=no
11630fi
11631fi
81ecdfbb
RW
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
11633$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
11634with_gnu_ld=$acl_cv_prog_gnu_ld
11635
11636
11637
81ecdfbb
RW
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
11639$as_echo_n "checking for shared library run path origin... " >&6; }
11640if test "${acl_cv_rpath+set}" = set; then :
11641 $as_echo_n "(cached) " >&6
3841debe
DJ
11642else
11643
11644 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11645 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11646 . ./conftest.sh
11647 rm -f ./conftest.sh
11648 acl_cv_rpath=done
11649
11650fi
81ecdfbb
RW
11651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
11652$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
11653 wl="$acl_cv_wl"
11654 libext="$acl_cv_libext"
11655 shlibext="$acl_cv_shlibext"
11656 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11657 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11658 hardcode_direct="$acl_cv_hardcode_direct"
11659 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
11660 # Check whether --enable-rpath was given.
11661if test "${enable_rpath+set}" = set; then :
11662 enableval=$enable_rpath; :
3841debe
DJ
11663else
11664 enable_rpath=yes
81ecdfbb
RW
11665fi
11666
3841debe
DJ
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676 use_additional=yes
11677
11678 acl_save_prefix="$prefix"
11679 prefix="$acl_final_prefix"
11680 acl_save_exec_prefix="$exec_prefix"
11681 exec_prefix="$acl_final_exec_prefix"
11682
11683 eval additional_includedir=\"$includedir\"
11684 eval additional_libdir=\"$libdir\"
11685
11686 exec_prefix="$acl_save_exec_prefix"
11687 prefix="$acl_save_prefix"
11688
11689
81ecdfbb
RW
11690# Check whether --with-libexpat-prefix was given.
11691if test "${with_libexpat_prefix+set}" = set; then :
11692 withval=$with_libexpat_prefix;
3841debe
DJ
11693 if test "X$withval" = "Xno"; then
11694 use_additional=no
11695 else
11696 if test "X$withval" = "X"; then
11697
11698 acl_save_prefix="$prefix"
11699 prefix="$acl_final_prefix"
11700 acl_save_exec_prefix="$exec_prefix"
11701 exec_prefix="$acl_final_exec_prefix"
11702
11703 eval additional_includedir=\"$includedir\"
11704 eval additional_libdir=\"$libdir\"
11705
11706 exec_prefix="$acl_save_exec_prefix"
11707 prefix="$acl_save_prefix"
11708
11709 else
11710 additional_includedir="$withval/include"
11711 additional_libdir="$withval/lib"
11712 fi
11713 fi
11714
81ecdfbb
RW
11715fi
11716
3841debe
DJ
11717 LIBEXPAT=
11718 LTLIBEXPAT=
11719 INCEXPAT=
11720 rpathdirs=
11721 ltrpathdirs=
11722 names_already_handled=
11723 names_next_round='expat '
11724 while test -n "$names_next_round"; do
11725 names_this_round="$names_next_round"
11726 names_next_round=
11727 for name in $names_this_round; do
11728 already_handled=
11729 for n in $names_already_handled; do
11730 if test "$n" = "$name"; then
11731 already_handled=yes
11732 break
11733 fi
11734 done
11735 if test -z "$already_handled"; then
11736 names_already_handled="$names_already_handled $name"
11737 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11738 eval value=\"\$HAVE_LIB$uppername\"
11739 if test -n "$value"; then
11740 if test "$value" = yes; then
11741 eval value=\"\$LIB$uppername\"
11742 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
11743 eval value=\"\$LTLIB$uppername\"
11744 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
11745 else
11746 :
11747 fi
11748 else
11749 found_dir=
11750 found_la=
11751 found_so=
11752 found_a=
11753 if test $use_additional = yes; then
11754 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11755 found_dir="$additional_libdir"
11756 found_so="$additional_libdir/lib$name.$shlibext"
11757 if test -f "$additional_libdir/lib$name.la"; then
11758 found_la="$additional_libdir/lib$name.la"
11759 fi
11760 else
11761 if test -f "$additional_libdir/lib$name.$libext"; then
11762 found_dir="$additional_libdir"
11763 found_a="$additional_libdir/lib$name.$libext"
11764 if test -f "$additional_libdir/lib$name.la"; then
11765 found_la="$additional_libdir/lib$name.la"
11766 fi
11767 fi
11768 fi
11769 fi
11770 if test "X$found_dir" = "X"; then
11771 for x in $LDFLAGS $LTLIBEXPAT; do
11772
11773 acl_save_prefix="$prefix"
11774 prefix="$acl_final_prefix"
11775 acl_save_exec_prefix="$exec_prefix"
11776 exec_prefix="$acl_final_exec_prefix"
11777 eval x=\"$x\"
11778 exec_prefix="$acl_save_exec_prefix"
11779 prefix="$acl_save_prefix"
11780
11781 case "$x" in
11782 -L*)
11783 dir=`echo "X$x" | sed -e 's/^X-L//'`
11784 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11785 found_dir="$dir"
11786 found_so="$dir/lib$name.$shlibext"
11787 if test -f "$dir/lib$name.la"; then
11788 found_la="$dir/lib$name.la"
11789 fi
11790 else
11791 if test -f "$dir/lib$name.$libext"; then
11792 found_dir="$dir"
11793 found_a="$dir/lib$name.$libext"
11794 if test -f "$dir/lib$name.la"; then
11795 found_la="$dir/lib$name.la"
11796 fi
11797 fi
11798 fi
11799 ;;
11800 esac
11801 if test "X$found_dir" != "X"; then
11802 break
11803 fi
11804 done
11805 fi
11806 if test "X$found_dir" != "X"; then
11807 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11808 if test "X$found_so" != "X"; then
11809 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11810 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11811 else
11812 haveit=
11813 for x in $ltrpathdirs; do
11814 if test "X$x" = "X$found_dir"; then
11815 haveit=yes
11816 break
11817 fi
11818 done
11819 if test -z "$haveit"; then
11820 ltrpathdirs="$ltrpathdirs $found_dir"
11821 fi
11822 if test "$hardcode_direct" = yes; then
11823 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11824 else
11825 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11826 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11827 haveit=
11828 for x in $rpathdirs; do
11829 if test "X$x" = "X$found_dir"; then
11830 haveit=yes
11831 break
11832 fi
11833 done
11834 if test -z "$haveit"; then
11835 rpathdirs="$rpathdirs $found_dir"
11836 fi
11837 else
11838 haveit=
11839 for x in $LDFLAGS $LIBEXPAT; do
11840
11841 acl_save_prefix="$prefix"
11842 prefix="$acl_final_prefix"
11843 acl_save_exec_prefix="$exec_prefix"
11844 exec_prefix="$acl_final_exec_prefix"
11845 eval x=\"$x\"
11846 exec_prefix="$acl_save_exec_prefix"
11847 prefix="$acl_save_prefix"
11848
11849 if test "X$x" = "X-L$found_dir"; then
11850 haveit=yes
11851 break
11852 fi
11853 done
11854 if test -z "$haveit"; then
11855 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11856 fi
11857 if test "$hardcode_minus_L" != no; then
11858 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11859 else
11860 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11861 fi
11862 fi
11863 fi
11864 fi
11865 else
11866 if test "X$found_a" != "X"; then
11867 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11868 else
11869 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11870 fi
11871 fi
11872 additional_includedir=
11873 case "$found_dir" in
11874 */lib | */lib/)
11875 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11876 additional_includedir="$basedir/include"
11877 ;;
11878 esac
11879 if test "X$additional_includedir" != "X"; then
11880 if test "X$additional_includedir" != "X/usr/include"; then
11881 haveit=
11882 if test "X$additional_includedir" = "X/usr/local/include"; then
11883 if test -n "$GCC"; then
11884 case $host_os in
11885 linux*) haveit=yes;;
11886 esac
11887 fi
11888 fi
11889 if test -z "$haveit"; then
11890 for x in $CPPFLAGS $INCEXPAT; do
11891
11892 acl_save_prefix="$prefix"
11893 prefix="$acl_final_prefix"
11894 acl_save_exec_prefix="$exec_prefix"
11895 exec_prefix="$acl_final_exec_prefix"
11896 eval x=\"$x\"
11897 exec_prefix="$acl_save_exec_prefix"
11898 prefix="$acl_save_prefix"
11899
11900 if test "X$x" = "X-I$additional_includedir"; then
11901 haveit=yes
11902 break
11903 fi
11904 done
11905 if test -z "$haveit"; then
11906 if test -d "$additional_includedir"; then
11907 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11908 fi
11909 fi
11910 fi
11911 fi
11912 fi
11913 if test -n "$found_la"; then
11914 save_libdir="$libdir"
11915 case "$found_la" in
11916 */* | *\\*) . "$found_la" ;;
11917 *) . "./$found_la" ;;
11918 esac
11919 libdir="$save_libdir"
11920 for dep in $dependency_libs; do
11921 case "$dep" in
11922 -L*)
11923 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11924 if test "X$additional_libdir" != "X/usr/lib"; then
11925 haveit=
11926 if test "X$additional_libdir" = "X/usr/local/lib"; then
11927 if test -n "$GCC"; then
11928 case $host_os in
11929 linux*) haveit=yes;;
11930 esac
11931 fi
11932 fi
11933 if test -z "$haveit"; then
11934 haveit=
11935 for x in $LDFLAGS $LIBEXPAT; do
11936
11937 acl_save_prefix="$prefix"
11938 prefix="$acl_final_prefix"
11939 acl_save_exec_prefix="$exec_prefix"
11940 exec_prefix="$acl_final_exec_prefix"
11941 eval x=\"$x\"
11942 exec_prefix="$acl_save_exec_prefix"
11943 prefix="$acl_save_prefix"
11944
11945 if test "X$x" = "X-L$additional_libdir"; then
11946 haveit=yes
11947 break
11948 fi
11949 done
11950 if test -z "$haveit"; then
11951 if test -d "$additional_libdir"; then
11952 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11953 fi
11954 fi
11955 haveit=
11956 for x in $LDFLAGS $LTLIBEXPAT; do
11957
11958 acl_save_prefix="$prefix"
11959 prefix="$acl_final_prefix"
11960 acl_save_exec_prefix="$exec_prefix"
11961 exec_prefix="$acl_final_exec_prefix"
11962 eval x=\"$x\"
11963 exec_prefix="$acl_save_exec_prefix"
11964 prefix="$acl_save_prefix"
11965
11966 if test "X$x" = "X-L$additional_libdir"; then
11967 haveit=yes
11968 break
11969 fi
11970 done
11971 if test -z "$haveit"; then
11972 if test -d "$additional_libdir"; then
11973 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11974 fi
11975 fi
11976 fi
11977 fi
11978 ;;
11979 -R*)
11980 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11981 if test "$enable_rpath" != no; then
11982 haveit=
11983 for x in $rpathdirs; do
11984 if test "X$x" = "X$dir"; then
11985 haveit=yes
11986 break
11987 fi
11988 done
11989 if test -z "$haveit"; then
11990 rpathdirs="$rpathdirs $dir"
11991 fi
11992 haveit=
11993 for x in $ltrpathdirs; do
11994 if test "X$x" = "X$dir"; then
11995 haveit=yes
11996 break
11997 fi
11998 done
11999 if test -z "$haveit"; then
12000 ltrpathdirs="$ltrpathdirs $dir"
12001 fi
12002 fi
12003 ;;
12004 -l*)
12005 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12006 ;;
12007 *.la)
12008 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12009 ;;
12010 *)
12011 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
12012 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
12013 ;;
81ecdfbb
RW
12014 esac
12015 done
12016 fi
12017 else
12018 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
12019 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
12020 fi
12021 fi
12022 fi
12023 done
12024 done
12025 if test "X$rpathdirs" != "X"; then
12026 if test -n "$hardcode_libdir_separator"; then
12027 alldirs=
12028 for found_dir in $rpathdirs; do
12029 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12030 done
12031 acl_save_libdir="$libdir"
12032 libdir="$alldirs"
12033 eval flag=\"$hardcode_libdir_flag_spec\"
12034 libdir="$acl_save_libdir"
12035 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
12036 else
12037 for found_dir in $rpathdirs; do
12038 acl_save_libdir="$libdir"
12039 libdir="$found_dir"
12040 eval flag=\"$hardcode_libdir_flag_spec\"
12041 libdir="$acl_save_libdir"
12042 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
12043 done
12044 fi
12045 fi
12046 if test "X$ltrpathdirs" != "X"; then
12047 for found_dir in $ltrpathdirs; do
12048 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
12049 done
12050 fi
a9322a30
TT
12051
12052
81ecdfbb 12053 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 12054
81ecdfbb
RW
12055 for element in $INCEXPAT; do
12056 haveit=
12057 for x in $CPPFLAGS; do
a9322a30 12058
81ecdfbb
RW
12059 acl_save_prefix="$prefix"
12060 prefix="$acl_final_prefix"
12061 acl_save_exec_prefix="$exec_prefix"
12062 exec_prefix="$acl_final_exec_prefix"
12063 eval x=\"$x\"
12064 exec_prefix="$acl_save_exec_prefix"
12065 prefix="$acl_save_prefix"
a8111142 12066
81ecdfbb
RW
12067 if test "X$x" = "X$element"; then
12068 haveit=yes
12069 break
12070 fi
12071 done
12072 if test -z "$haveit"; then
12073 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12074 fi
12075 done
a9322a30
TT
12076
12077
81ecdfbb
RW
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
12079$as_echo_n "checking for libexpat... " >&6; }
12080if test "${ac_cv_libexpat+set}" = set; then :
12081 $as_echo_n "(cached) " >&6
bec39cab 12082else
bec39cab 12083
81ecdfbb
RW
12084 ac_save_LIBS="$LIBS"
12085 LIBS="$LIBS $LIBEXPAT"
12086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12087/* end confdefs.h. */
81ecdfbb
RW
12088#include "expat.h"
12089int
12090main ()
12091{
12092XML_Parser p = XML_ParserCreate (0);
12093 ;
12094 return 0;
12095}
bec39cab 12096_ACEOF
81ecdfbb
RW
12097if ac_fn_c_try_link "$LINENO"; then :
12098 ac_cv_libexpat=yes
c906108c 12099else
81ecdfbb 12100 ac_cv_libexpat=no
bec39cab 12101fi
81ecdfbb
RW
12102rm -f core conftest.err conftest.$ac_objext \
12103 conftest$ac_exeext conftest.$ac_ext
12104 LIBS="$ac_save_LIBS"
c906108c 12105
95ca63c4 12106fi
81ecdfbb
RW
12107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
12108$as_echo "$ac_cv_libexpat" >&6; }
12109 if test "$ac_cv_libexpat" = yes; then
12110 HAVE_LIBEXPAT=yes
bec39cab 12111
81ecdfbb 12112$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 12113
81ecdfbb
RW
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
12115$as_echo_n "checking how to link with libexpat... " >&6; }
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
12117$as_echo "$LIBEXPAT" >&6; }
12118 else
12119 HAVE_LIBEXPAT=no
12120 CPPFLAGS="$ac_save_CPPFLAGS"
12121 LIBEXPAT=
12122 LTLIBEXPAT=
12123 fi
95ca63c4
CF
12124
12125
12126
7cb9022a
MK
12127
12128
bec39cab 12129
81ecdfbb
RW
12130 if test "$HAVE_LIBEXPAT" != yes; then
12131 if test "$with_expat" = yes; then
12132 as_fn_error "expat is missing or unusable" "$LINENO" 5
12133 else
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
12135$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
12136 fi
12137 else
12138 save_LIBS=$LIBS
12139 LIBS="$LIBS $LIBEXPAT"
12140 for ac_func in XML_StopParser
12141do :
12142 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
12143if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 12144 cat >>confdefs.h <<_ACEOF
81ecdfbb 12145#define HAVE_XML_STOPPARSER 1
bec39cab 12146_ACEOF
95ca63c4 12147
bec39cab 12148fi
bec39cab 12149done
95ca63c4 12150
81ecdfbb
RW
12151 LIBS=$save_LIBS
12152 fi
a9322a30
TT
12153fi
12154
a9322a30 12155
a9322a30
TT
12156
12157
ec685c5e 12158
0c4a4063 12159
81ecdfbb
RW
12160# Check whether --with-python was given.
12161if test "${with_python+set}" = set; then :
12162 withval=$with_python;
bec39cab 12163else
81ecdfbb 12164 with_python=auto
bec39cab 12165fi
bec39cab 12166
81ecdfbb
RW
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
12168$as_echo_n "checking whether to use python... " >&6; }
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
12170$as_echo "$with_python" >&6; }
9a156167 12171
81ecdfbb
RW
12172if test "${with_python}" = no; then
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
12174$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
12175 have_libpython=no
bec39cab 12176else
81ecdfbb 12177 case "${with_python}" in
8c85a4e2 12178 [\\/]* | ?:[\\/]*)
ec685c5e
DE
12179 if test -d ${with_python}; then
12180 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 12181 python_prog="${with_python}/bin/python"
0c4a4063 12182 python_prefix=
9c4ea6c5
JB
12183 # If python does not exit ${with_python}/bin, then try in
12184 # ${with_python}. On Windows/MinGW, this is where the Python
12185 # executable is.
12186 if test ! -x "${python_prog}"; then
12187 python_prog="${with_python}/python"
12188 python_prefix=
12189 fi
e7a30f46 12190 if test ! -x "${python_prog}"; then
ec685c5e
DE
12191 # Fall back to gdb 7.0/7.1 behaviour.
12192 python_prog=missing
0c4a4063 12193 python_prefix=${with_python}
ec685c5e 12194 fi
e7a30f46 12195 elif test -x "${with_python}"; then
ec685c5e
DE
12196 # While we can't run python compiled for $host (unless host == build),
12197 # the user could write a script that provides the needed information,
12198 # so we support that.
ec685c5e 12199 python_prog=${with_python}
0c4a4063 12200 python_prefix=
ec685c5e
DE
12201 else
12202 as_fn_error "invalid value for --with-python" "$LINENO" 5
12203 fi
81ecdfbb 12204 ;;
ec685c5e
DE
12205 */*)
12206 # Disallow --with-python=foo/bar.
81ecdfbb
RW
12207 as_fn_error "invalid value for --with-python" "$LINENO" 5
12208 ;;
ec685c5e
DE
12209 *)
12210 # The user has either specified auto, yes, or the name of the python
12211 # program assumed to be in $PATH.
12212 python_prefix=
12213 case "${with_python}" in
12214 yes | auto)
12215 if test ${build} = ${host}; then
12216 # Extract the first word of "python", so it can be a program name with args.
12217set dummy python; ac_word=$2
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12219$as_echo_n "checking for $ac_word... " >&6; }
12220if test "${ac_cv_path_python_prog_path+set}" = set; then :
12221 $as_echo_n "(cached) " >&6
12222else
12223 case $python_prog_path in
12224 [\\/]* | ?:[\\/]*)
12225 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
12226 ;;
12227 *)
12228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229for as_dir in $PATH
12230do
12231 IFS=$as_save_IFS
12232 test -z "$as_dir" && as_dir=.
12233 for ac_exec_ext in '' $ac_executable_extensions; do
12234 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12235 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
12236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12237 break 2
12238 fi
12239done
12240 done
12241IFS=$as_save_IFS
12242
12243 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
12244 ;;
12245esac
12246fi
12247python_prog_path=$ac_cv_path_python_prog_path
12248if test -n "$python_prog_path"; then
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
12250$as_echo "$python_prog_path" >&6; }
12251else
12252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12253$as_echo "no" >&6; }
12254fi
12255
12256
12257 if test "${python_prog_path}" = missing; then
12258 python_prog=missing
12259 else
12260 python_prog=${python_prog_path}
12261 fi
12262 else
12263 # Not much we can do except assume the cross-compiler will find the
12264 # right files.
12265 python_prog=missing
12266 fi
12267 ;;
12268 *)
12269 # While we can't run python compiled for $host (unless host == build),
12270 # the user could write a script that provides the needed information,
12271 # so we support that.
12272 python_prog="${with_python}"
12273 # Extract the first word of "${python_prog}", so it can be a program name with args.
12274set dummy ${python_prog}; ac_word=$2
12275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12276$as_echo_n "checking for $ac_word... " >&6; }
12277if test "${ac_cv_path_python_prog_path+set}" = set; then :
12278 $as_echo_n "(cached) " >&6
12279else
12280 case $python_prog_path in
12281 [\\/]* | ?:[\\/]*)
12282 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
12283 ;;
12284 *)
12285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12286for as_dir in $PATH
12287do
12288 IFS=$as_save_IFS
12289 test -z "$as_dir" && as_dir=.
12290 for ac_exec_ext in '' $ac_executable_extensions; do
12291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12292 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
12293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12294 break 2
12295 fi
12296done
12297 done
12298IFS=$as_save_IFS
12299
12300 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
12301 ;;
12302esac
12303fi
12304python_prog_path=$ac_cv_path_python_prog_path
12305if test -n "$python_prog_path"; then
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
12307$as_echo "$python_prog_path" >&6; }
12308else
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310$as_echo "no" >&6; }
12311fi
12312
12313
12314 if test "${python_prog_path}" = missing; then
12315 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
12316 fi
12317 ;;
12318 esac
81ecdfbb
RW
12319 esac
12320
ec685c5e 12321 if test "${python_prog}" != missing; then
e7a30f46
DE
12322 # We have a python program to use, but it may be too old.
12323 # Don't flag an error for --with-python=auto (the default).
12324 have_python_config=yes
ec685c5e
DE
12325 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
12326 if test $? != 0; then
e7a30f46
DE
12327 have_python_config=failed
12328 if test "${with_python}" != auto; then
12329 as_fn_error "failure running python-config --includes" "$LINENO" 5
12330 fi
ec685c5e
DE
12331 fi
12332 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
12333 if test $? != 0; then
e7a30f46
DE
12334 have_python_config=failed
12335 if test "${with_python}" != auto; then
12336 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
12337 fi
ec685c5e 12338 fi
0c4a4063
DE
12339 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
12340 if test $? != 0; then
e7a30f46
DE
12341 have_python_config=failed
12342 if test "${with_python}" != auto; then
12343 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
12344 fi
0c4a4063 12345 fi
ec685c5e 12346 else
ac534cba
JB
12347 # We do not have a python executable we can use to determine where
12348 # to find the Python headers and libs. We cannot guess the include
12349 # path from the python_prefix either, because that include path
12350 # depends on the Python version. So, there is nothing much we can
12351 # do except assume that the compiler will be able to find those files.
12352 python_includes=
12353 python_libs=
0c4a4063 12354 have_python_config=no
ec685c5e 12355 fi
bec39cab 12356
ec685c5e
DE
12357 # If we have python-config, only try the configuration it provides.
12358 # Otherwise fallback on the old way of trying different versions of
12359 # python in turn.
81ecdfbb 12360
ec685c5e
DE
12361 have_libpython=no
12362 if test "${have_python_config}" = yes; then
c1039e3c
JB
12363 # Determine the Python version by extracting "-lpython<version>"
12364 # part of the python_libs. <version> is usually X.Y with X and Y
12365 # being decimal numbers, but can also be XY (seen on Windows).
12366 #
12367 # The extraction is performed using sed with a regular expression.
12368 # Initially, the regexp used was using the '?' quantifier to make
12369 # the dot in the version number optional. Unfortunately, this
12370 # does not work with non-GNU versions of sed because, because of
12371 # what looks like a limitation (the '?' quantifier does not work
12372 # with back-references). We work around this limitation by using
12373 # the '*' quantifier instead. It means that, in theory, we might
12374 # match unexpected version strings such as "-lpython2..7", but
12375 # this seems unlikely in practice. And even if that happens,
12376 # an error will be triggered later on, when checking that version
12377 # number.
ec685c5e 12378 python_version=`echo " ${python_libs} " \
c1039e3c 12379 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
12380 case "${python_version}" in
12381 python*)
ec685c5e
DE
12382
12383 version=${python_version}
12384
12385 new_CPPFLAGS=${python_includes}
12386 new_LIBS=${python_libs}
81ecdfbb
RW
12387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
12388$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 12389 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 12390 save_LIBS=$LIBS
ec685c5e
DE
12391 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
12392 LIBS="$LIBS $new_LIBS"
12393 found_usable_python=no
81ecdfbb 12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12395/* end confdefs.h. */
ac534cba 12396#include "Python.h"
81ecdfbb
RW
12397int
12398main ()
12399{
12400Py_Initialize ();
12401 ;
12402 return 0;
12403}
bec39cab 12404_ACEOF
81ecdfbb 12405if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
12406 have_libpython=${version}
12407 found_usable_python=yes
ac534cba
JB
12408 PYTHON_CPPFLAGS=$new_CPPFLAGS
12409 PYTHON_LIBS=$new_LIBS
9a156167 12410fi
81ecdfbb
RW
12411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
12413 CPPFLAGS=$save_CPPFLAGS
12414 LIBS=$save_LIBS
ec685c5e
DE
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
12416$as_echo "${found_usable_python}" >&6; }
9a156167 12417
0c4a4063
DE
12418 ;;
12419 *)
ec685c5e 12420 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
12421 ;;
12422 esac
e7a30f46 12423 elif test "${have_python_config}" != failed; then
ec685c5e 12424 if test "${have_libpython}" = no; then
9a156167 12425
420697bb
TT
12426 version=python2.7
12427
12428 new_CPPFLAGS=${python_includes}
12429 new_LIBS="${python_libs} -lpython2.7"
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
12431$as_echo_n "checking for ${version}... " >&6; }
12432 save_CPPFLAGS=$CPPFLAGS
12433 save_LIBS=$LIBS
12434 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
12435 LIBS="$LIBS $new_LIBS"
12436 found_usable_python=no
12437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438/* end confdefs.h. */
ac534cba 12439#include "Python.h"
420697bb
TT
12440int
12441main ()
12442{
12443Py_Initialize ();
12444 ;
12445 return 0;
12446}
12447_ACEOF
12448if ac_fn_c_try_link "$LINENO"; then :
12449 have_libpython=${version}
12450 found_usable_python=yes
ac534cba
JB
12451 PYTHON_CPPFLAGS=$new_CPPFLAGS
12452 PYTHON_LIBS=$new_LIBS
420697bb
TT
12453fi
12454rm -f core conftest.err conftest.$ac_objext \
12455 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
12456 CPPFLAGS=$save_CPPFLAGS
12457 LIBS=$save_LIBS
420697bb
TT
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
12459$as_echo "${found_usable_python}" >&6; }
12460
12461 fi
12462 if test "${have_libpython}" = no; then
12463
ec685c5e
DE
12464 version=python2.6
12465
12466 new_CPPFLAGS=${python_includes}
12467 new_LIBS="${python_libs} -lpython2.6"
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
12469$as_echo_n "checking for ${version}... " >&6; }
12470 save_CPPFLAGS=$CPPFLAGS
12471 save_LIBS=$LIBS
12472 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
12473 LIBS="$LIBS $new_LIBS"
12474 found_usable_python=no
12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476/* end confdefs.h. */
ac534cba 12477#include "Python.h"
ec685c5e
DE
12478int
12479main ()
12480{
12481Py_Initialize ();
12482 ;
12483 return 0;
12484}
12485_ACEOF
12486if ac_fn_c_try_link "$LINENO"; then :
12487 have_libpython=${version}
12488 found_usable_python=yes
ac534cba
JB
12489 PYTHON_CPPFLAGS=$new_CPPFLAGS
12490 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
12491fi
12492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
12494 CPPFLAGS=$save_CPPFLAGS
12495 LIBS=$save_LIBS
ec685c5e
DE
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
12497$as_echo "${found_usable_python}" >&6; }
9a156167 12498
81ecdfbb 12499 fi
ec685c5e 12500 if test ${have_libpython} = no; then
9a156167 12501
81ecdfbb 12502 version=python2.5
9a156167 12503
ec685c5e
DE
12504 new_CPPFLAGS=${python_includes}
12505 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
12507$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 12508 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 12509 save_LIBS=$LIBS
ec685c5e
DE
12510 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
12511 LIBS="$LIBS $new_LIBS"
12512 found_usable_python=no
81ecdfbb 12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 12514/* end confdefs.h. */
ac534cba 12515#include "Python.h"
81ecdfbb
RW
12516int
12517main ()
12518{
12519Py_Initialize ();
12520 ;
12521 return 0;
12522}
436868fb 12523_ACEOF
81ecdfbb 12524if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
12525 have_libpython=${version}
12526 found_usable_python=yes
ac534cba
JB
12527 PYTHON_CPPFLAGS=$new_CPPFLAGS
12528 PYTHON_LIBS=$new_LIBS
436868fb 12529fi
81ecdfbb
RW
12530rm -f core conftest.err conftest.$ac_objext \
12531 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
12532 CPPFLAGS=$save_CPPFLAGS
12533 LIBS=$save_LIBS
ec685c5e
DE
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
12535$as_echo "${found_usable_python}" >&6; }
a9322a30 12536
81ecdfbb 12537 fi
ec685c5e 12538 if test ${have_libpython} = no; then
a9322a30 12539
81ecdfbb 12540 version=python2.4
a9322a30 12541
ec685c5e
DE
12542 new_CPPFLAGS=${python_includes}
12543 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
12544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
12545$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 12546 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 12547 save_LIBS=$LIBS
ec685c5e
DE
12548 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
12549 LIBS="$LIBS $new_LIBS"
12550 found_usable_python=no
81ecdfbb 12551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 12552/* end confdefs.h. */
ac534cba 12553#include "Python.h"
a9322a30
TT
12554int
12555main ()
12556{
81ecdfbb 12557Py_Initialize ();
a9322a30
TT
12558 ;
12559 return 0;
12560}
436868fb 12561_ACEOF
81ecdfbb 12562if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
12563 have_libpython=${version}
12564 found_usable_python=yes
ac534cba
JB
12565 PYTHON_CPPFLAGS=$new_CPPFLAGS
12566 PYTHON_LIBS=$new_LIBS
436868fb 12567fi
81ecdfbb
RW
12568rm -f core conftest.err conftest.$ac_objext \
12569 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
12570 CPPFLAGS=$save_CPPFLAGS
12571 LIBS=$save_LIBS
ec685c5e
DE
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
12573$as_echo "${found_usable_python}" >&6; }
81ecdfbb 12574
ec685c5e
DE
12575 fi
12576 fi
9c4ea6c5 12577 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
12578
12579$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
12580
9c4ea6c5 12581 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
12582
12583$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
12584
9c4ea6c5 12585 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
12586
12587$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
12588
9c4ea6c5 12589 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
12590
12591$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
12592
81ecdfbb 12593 fi
ec685c5e
DE
12594
12595 if test "${have_libpython}" = no; then
81ecdfbb
RW
12596 case "${with_python}" in
12597 yes)
12598 as_fn_error "python is missing or unusable" "$LINENO" 5
12599 ;;
12600 auto)
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
12602$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
12603 ;;
12604 *)
12605 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
12606 ;;
12607 esac
0c4a4063
DE
12608 else
12609 if test -n "${python_prefix}"; then
12610
12611cat >>confdefs.h <<_ACEOF
12612#define WITH_PYTHON_PATH "${python_prefix}"
12613_ACEOF
12614
12615
12616 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12617 if test "x$prefix" = xNONE; then
12618 test_prefix=/usr/local
12619 else
12620 test_prefix=$prefix
12621 fi
12622 else
12623 test_prefix=$exec_prefix
12624 fi
12625 value=0
12626 case ${python_prefix} in
12627 "${test_prefix}"|"${test_prefix}/"*|\
12628 '${exec_prefix}'|'${exec_prefix}/'*)
12629 value=1
12630 ;;
12631 esac
12632
12633cat >>confdefs.h <<_ACEOF
12634#define PYTHON_PATH_RELOCATABLE $value
12635_ACEOF
12636
12637
12638 fi
81ecdfbb 12639 fi
436868fb 12640fi
436868fb 12641
ec685c5e 12642if test "${have_libpython}" != no; then
436868fb 12643
81ecdfbb 12644$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 12645
81ecdfbb
RW
12646 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
12647 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
12648 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 12649 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 12650 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 12651
81ecdfbb
RW
12652 # Flags needed to compile Python code (taken from python-config --cflags).
12653 # We cannot call python-config directly because it will output whatever was
12654 # used when compiling the Python interpreter itself, including flags which
12655 # would make the python-related objects be compiled differently from the
12656 # rest of GDB (e.g., -O2 and -fPIC).
12657 if test "${GCC}" = yes; then
12658 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
12659 fi
436868fb 12660
81ecdfbb
RW
12661 if test "x${tentative_python_cflags}" != x; then
12662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
12663$as_echo_n "checking compiler flags for python code... " >&6; }
12664 for flag in ${tentative_python_cflags}; do
12665 # Check that the compiler accepts it
12666 saved_CFLAGS="$CFLAGS"
12667 CFLAGS="$CFLAGS $flag"
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12669/* end confdefs.h. */
81ecdfbb 12670
a9322a30
TT
12671int
12672main ()
12673{
a9322a30
TT
12674
12675 ;
12676 return 0;
12677}
bec39cab 12678_ACEOF
81ecdfbb
RW
12679if ac_fn_c_try_compile "$LINENO"; then :
12680 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 12681fi
81ecdfbb
RW
12682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12683 CFLAGS="$saved_CFLAGS"
12684 done
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
12686$as_echo "${PYTHON_CFLAGS}" >&6; }
12687 fi
043b6510
JB
12688
12689 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
12690 # #if _SGIAPI
12691 # #define siginfo __siginfo
12692 # #endif
12693 # The problem is that including Python causes some XOPEN macros to be
12694 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
12695 # to false. So, we work around this issue by defining siginfo ourself
12696 # though the command-line.
12697 case "$gdb_host" in
12698 irix*) if test "${GCC}" = yes; then
12699 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
12700 fi
12701 ;;
12702 esac
81ecdfbb
RW
12703else
12704 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
12705 # included.
12706 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
12707 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
12708 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 12709fi
9a156167 12710
9a156167 12711
ac534cba
JB
12712
12713
81ecdfbb
RW
12714# ------------------------- #
12715# Checks for header files. #
12716# ------------------------- #
c890192f 12717
81ecdfbb
RW
12718ac_header_dirent=no
12719for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12720 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
12722$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
12723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
12724 $as_echo_n "(cached) " >&6
bec39cab 12725else
81ecdfbb 12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12727/* end confdefs.h. */
81ecdfbb
RW
12728#include <sys/types.h>
12729#include <$ac_hdr>
12730
a9322a30
TT
12731int
12732main ()
12733{
81ecdfbb
RW
12734if ((DIR *) 0)
12735return 0;
a9322a30
TT
12736 ;
12737 return 0;
12738}
bec39cab 12739_ACEOF
81ecdfbb
RW
12740if ac_fn_c_try_compile "$LINENO"; then :
12741 eval "$as_ac_Header=yes"
bec39cab 12742else
81ecdfbb 12743 eval "$as_ac_Header=no"
bec39cab 12744fi
81ecdfbb 12745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12746fi
81ecdfbb
RW
12747eval ac_res=\$$as_ac_Header
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12749$as_echo "$ac_res" >&6; }
12750eval as_val=\$$as_ac_Header
12751 if test "x$as_val" = x""yes; then :
12752 cat >>confdefs.h <<_ACEOF
12753#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 12754_ACEOF
bec39cab 12755
81ecdfbb
RW
12756ac_header_dirent=$ac_hdr; break
12757fi
bec39cab 12758
81ecdfbb
RW
12759done
12760# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12761if test $ac_header_dirent = dirent.h; then
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12763$as_echo_n "checking for library containing opendir... " >&6; }
12764if test "${ac_cv_search_opendir+set}" = set; then :
12765 $as_echo_n "(cached) " >&6
c890192f 12766else
81ecdfbb
RW
12767 ac_func_search_save_LIBS=$LIBS
12768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769/* end confdefs.h. */
12770
12771/* Override any GCC internal prototype to avoid an error.
12772 Use char because int might match the return type of a GCC
12773 builtin and then its argument prototype would still apply. */
12774#ifdef __cplusplus
12775extern "C"
12776#endif
12777char opendir ();
12778int
12779main ()
12780{
12781return opendir ();
12782 ;
12783 return 0;
12784}
bec39cab 12785_ACEOF
81ecdfbb
RW
12786for ac_lib in '' dir; do
12787 if test -z "$ac_lib"; then
12788 ac_res="none required"
12789 else
12790 ac_res=-l$ac_lib
12791 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12792 fi
12793 if ac_fn_c_try_link "$LINENO"; then :
12794 ac_cv_search_opendir=$ac_res
12795fi
12796rm -f core conftest.err conftest.$ac_objext \
12797 conftest$ac_exeext
12798 if test "${ac_cv_search_opendir+set}" = set; then :
12799 break
12800fi
12801done
12802if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 12803
81ecdfbb
RW
12804else
12805 ac_cv_search_opendir=no
12806fi
12807rm conftest.$ac_ext
12808LIBS=$ac_func_search_save_LIBS
12809fi
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12811$as_echo "$ac_cv_search_opendir" >&6; }
12812ac_res=$ac_cv_search_opendir
12813if test "$ac_res" != no; then :
12814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 12815
bec39cab 12816fi
81ecdfbb 12817
bec39cab 12818else
81ecdfbb
RW
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12820$as_echo_n "checking for library containing opendir... " >&6; }
12821if test "${ac_cv_search_opendir+set}" = set; then :
12822 $as_echo_n "(cached) " >&6
12823else
12824 ac_func_search_save_LIBS=$LIBS
12825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12826/* end confdefs.h. */
81ecdfbb
RW
12827
12828/* Override any GCC internal prototype to avoid an error.
12829 Use char because int might match the return type of a GCC
12830 builtin and then its argument prototype would still apply. */
12831#ifdef __cplusplus
12832extern "C"
12833#endif
12834char opendir ();
a9322a30
TT
12835int
12836main ()
12837{
81ecdfbb 12838return opendir ();
a9322a30
TT
12839 ;
12840 return 0;
12841}
bec39cab 12842_ACEOF
81ecdfbb
RW
12843for ac_lib in '' x; do
12844 if test -z "$ac_lib"; then
12845 ac_res="none required"
12846 else
12847 ac_res=-l$ac_lib
12848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12849 fi
12850 if ac_fn_c_try_link "$LINENO"; then :
12851 ac_cv_search_opendir=$ac_res
12852fi
12853rm -f core conftest.err conftest.$ac_objext \
12854 conftest$ac_exeext
12855 if test "${ac_cv_search_opendir+set}" = set; then :
12856 break
12857fi
12858done
12859if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 12860
81ecdfbb
RW
12861else
12862 ac_cv_search_opendir=no
bec39cab 12863fi
81ecdfbb
RW
12864rm conftest.$ac_ext
12865LIBS=$ac_func_search_save_LIBS
a9322a30 12866fi
81ecdfbb
RW
12867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12868$as_echo "$ac_cv_search_opendir" >&6; }
12869ac_res=$ac_cv_search_opendir
12870if test "$ac_res" != no; then :
12871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 12872
81ecdfbb 12873fi
bec39cab 12874
81ecdfbb 12875fi
bec39cab 12876
81ecdfbb
RW
12877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12878$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12879if test "${ac_cv_header_stat_broken+set}" = set; then :
12880 $as_echo_n "(cached) " >&6
9a156167 12881else
81ecdfbb
RW
12882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12883/* end confdefs.h. */
12884#include <sys/types.h>
12885#include <sys/stat.h>
12886
12887#if defined S_ISBLK && defined S_IFDIR
12888extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12889#endif
12890
12891#if defined S_ISBLK && defined S_IFCHR
12892extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12893#endif
12894
12895#if defined S_ISLNK && defined S_IFREG
12896extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12897#endif
12898
12899#if defined S_ISSOCK && defined S_IFREG
12900extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12901#endif
12902
bec39cab 12903_ACEOF
81ecdfbb
RW
12904if ac_fn_c_try_compile "$LINENO"; then :
12905 ac_cv_header_stat_broken=no
12906else
12907 ac_cv_header_stat_broken=yes
12908fi
12909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12910fi
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12912$as_echo "$ac_cv_header_stat_broken" >&6; }
12913if test $ac_cv_header_stat_broken = yes; then
9a156167 12914
81ecdfbb 12915$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 12916
bec39cab 12917fi
81ecdfbb
RW
12918
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12920$as_echo_n "checking for ANSI C header files... " >&6; }
12921if test "${ac_cv_header_stdc+set}" = set; then :
12922 $as_echo_n "(cached) " >&6
bec39cab 12923else
81ecdfbb 12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12925/* end confdefs.h. */
81ecdfbb
RW
12926#include <stdlib.h>
12927#include <stdarg.h>
12928#include <string.h>
12929#include <float.h>
12930
a9322a30
TT
12931int
12932main ()
12933{
a9322a30
TT
12934
12935 ;
12936 return 0;
12937}
bec39cab 12938_ACEOF
81ecdfbb
RW
12939if ac_fn_c_try_compile "$LINENO"; then :
12940 ac_cv_header_stdc=yes
bec39cab 12941else
81ecdfbb 12942 ac_cv_header_stdc=no
a9322a30 12943fi
81ecdfbb 12944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12945
81ecdfbb
RW
12946if test $ac_cv_header_stdc = yes; then
12947 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12949/* end confdefs.h. */
12950#include <string.h>
bec39cab 12951
81ecdfbb
RW
12952_ACEOF
12953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12954 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12955
bec39cab 12956else
81ecdfbb
RW
12957 ac_cv_header_stdc=no
12958fi
12959rm -f conftest*
12960
12961fi
12962
12963if test $ac_cv_header_stdc = yes; then
12964 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967#include <stdlib.h>
12968
bec39cab 12969_ACEOF
81ecdfbb
RW
12970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12971 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12972
81ecdfbb
RW
12973else
12974 ac_cv_header_stdc=no
12975fi
12976rm -f conftest*
bec39cab 12977
bec39cab 12978fi
81ecdfbb
RW
12979
12980if test $ac_cv_header_stdc = yes; then
12981 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12982 if test "$cross_compiling" = yes; then :
12983 :
bec39cab 12984else
81ecdfbb 12985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12986/* end confdefs.h. */
81ecdfbb
RW
12987#include <ctype.h>
12988#include <stdlib.h>
12989#if ((' ' & 0x0FF) == 0x020)
12990# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12991# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12992#else
12993# define ISLOWER(c) \
12994 (('a' <= (c) && (c) <= 'i') \
12995 || ('j' <= (c) && (c) <= 'r') \
12996 || ('s' <= (c) && (c) <= 'z'))
12997# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12998#endif
12999
13000#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
13001int
13002main ()
13003{
81ecdfbb
RW
13004 int i;
13005 for (i = 0; i < 256; i++)
13006 if (XOR (islower (i), ISLOWER (i))
13007 || toupper (i) != TOUPPER (i))
13008 return 2;
a9322a30
TT
13009 return 0;
13010}
bec39cab 13011_ACEOF
81ecdfbb
RW
13012if ac_fn_c_try_run "$LINENO"; then :
13013
bec39cab 13014else
81ecdfbb
RW
13015 ac_cv_header_stdc=no
13016fi
13017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13018 conftest.$ac_objext conftest.beam conftest.$ac_ext
13019fi
bec39cab 13020
bec39cab 13021fi
a9322a30 13022fi
81ecdfbb
RW
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13024$as_echo "$ac_cv_header_stdc" >&6; }
13025if test $ac_cv_header_stdc = yes; then
bec39cab 13026
81ecdfbb 13027$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 13028
81ecdfbb 13029fi
bec39cab 13030
81ecdfbb
RW
13031# elf_hp.h is for HP/UX 64-bit shared library support.
13032# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
13033# unconditionally, so what's the point in checking these?
13034for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
13035 thread_db.h gnu/libc-version.h signal.h stddef.h \
13036 stdlib.h string.h memory.h strings.h sys/fault.h \
13037 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
13038 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
13039 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
13040 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 13041 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 13042 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
13043do :
13044 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13045ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13046eval as_val=\$$as_ac_Header
13047 if test "x$as_val" = x""yes; then :
bec39cab 13048 cat >>confdefs.h <<_ACEOF
81ecdfbb 13049#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13050_ACEOF
c906108c 13051
bec39cab 13052fi
81ecdfbb
RW
13053
13054done
13055
13056for ac_header in link.h
13057do :
13058 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
13059# include <sys/types.h>
13060#endif
13061#if HAVE_NLIST_H
13062# include <nlist.h>
a9322a30
TT
13063#endif
13064
81ecdfbb
RW
13065"
13066if test "x$ac_cv_header_link_h" = x""yes; then :
13067 cat >>confdefs.h <<_ACEOF
13068#define HAVE_LINK_H 1
bec39cab 13069_ACEOF
bec39cab 13070
a9322a30 13071fi
bec39cab 13072
81ecdfbb 13073done
c906108c 13074
81ecdfbb
RW
13075for ac_header in sys/proc.h
13076do :
13077 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
13078# include <sys/param.h>
13079#endif
c906108c 13080
81ecdfbb
RW
13081"
13082if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 13083 cat >>confdefs.h <<_ACEOF
81ecdfbb 13084#define HAVE_SYS_PROC_H 1
bec39cab 13085_ACEOF
5ee754fc 13086
bec39cab 13087fi
81ecdfbb
RW
13088
13089done
13090
13091for ac_header in sys/user.h
13092do :
13093 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
13094# include <sys/param.h>
a9322a30
TT
13095#endif
13096
81ecdfbb
RW
13097"
13098if test "x$ac_cv_header_sys_user_h" = x""yes; then :
13099 cat >>confdefs.h <<_ACEOF
13100#define HAVE_SYS_USER_H 1
bec39cab 13101_ACEOF
bec39cab 13102
a9322a30 13103fi
bec39cab 13104
81ecdfbb 13105done
5ee754fc 13106
5ee754fc 13107
81ecdfbb
RW
13108# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
13109# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
13110# think that we don't have <curses.h> if we're using GCC.
13111case $host_os in
13112 solaris2.[789])
13113 if test "$GCC" = yes; then
13114
13115$as_echo "#define _MSE_INT_H 1" >>confdefs.h
13116
13117 fi ;;
13118esac
13119for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
13120do :
13121 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13122ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13123eval as_val=\$$as_ac_Header
13124 if test "x$as_val" = x""yes; then :
bec39cab 13125 cat >>confdefs.h <<_ACEOF
81ecdfbb 13126#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13127_ACEOF
5ee754fc
MK
13128
13129fi
13130
81ecdfbb 13131done
bec39cab 13132
81ecdfbb
RW
13133for ac_header in term.h
13134do :
13135 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
13136# include <curses.h>
13137#endif
bec39cab 13138
81ecdfbb
RW
13139"
13140if test "x$ac_cv_header_term_h" = x""yes; then :
13141 cat >>confdefs.h <<_ACEOF
13142#define HAVE_TERM_H 1
a8111142 13143_ACEOF
a8111142 13144
a8111142 13145fi
a8111142 13146
81ecdfbb 13147done
a8111142
TT
13148
13149
81ecdfbb
RW
13150# ------------------------- #
13151# Checks for declarations. #
13152# ------------------------- #
a9322a30 13153
81ecdfbb
RW
13154ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
13155if test "x$ac_cv_have_decl_free" = x""yes; then :
13156 ac_have_decl=1
bec39cab 13157else
81ecdfbb
RW
13158 ac_have_decl=0
13159fi
13160
13161cat >>confdefs.h <<_ACEOF
13162#define HAVE_DECL_FREE $ac_have_decl
bec39cab 13163_ACEOF
81ecdfbb
RW
13164ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
13165if test "x$ac_cv_have_decl_malloc" = x""yes; then :
13166 ac_have_decl=1
13167else
13168 ac_have_decl=0
13169fi
13170
13171cat >>confdefs.h <<_ACEOF
13172#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 13173_ACEOF
81ecdfbb
RW
13174ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
13175if test "x$ac_cv_have_decl_realloc" = x""yes; then :
13176 ac_have_decl=1
bec39cab 13177else
81ecdfbb
RW
13178 ac_have_decl=0
13179fi
bec39cab 13180
81ecdfbb
RW
13181cat >>confdefs.h <<_ACEOF
13182#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 13183_ACEOF
81ecdfbb
RW
13184ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13185if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13186 ac_have_decl=1
13187else
13188 ac_have_decl=0
13189fi
13190
13191cat >>confdefs.h <<_ACEOF
13192#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 13193_ACEOF
81ecdfbb
RW
13194ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13195if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13196 ac_have_decl=1
bec39cab 13197else
81ecdfbb
RW
13198 ac_have_decl=0
13199fi
5ee754fc 13200
81ecdfbb
RW
13201cat >>confdefs.h <<_ACEOF
13202#define HAVE_DECL_STRSTR $ac_have_decl
13203_ACEOF
13204ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
13205if test "x$ac_cv_have_decl_getopt" = x""yes; then :
13206 ac_have_decl=1
13207else
13208 ac_have_decl=0
5ee754fc 13209fi
81ecdfbb
RW
13210
13211cat >>confdefs.h <<_ACEOF
13212#define HAVE_DECL_GETOPT $ac_have_decl
13213_ACEOF
13214ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13215if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
13216 ac_have_decl=1
13217else
13218 ac_have_decl=0
5ee754fc 13219fi
81ecdfbb
RW
13220
13221cat >>confdefs.h <<_ACEOF
13222#define HAVE_DECL_SNPRINTF $ac_have_decl
13223_ACEOF
13224ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13225if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
13226 ac_have_decl=1
13227else
13228 ac_have_decl=0
5ee754fc
MK
13229fi
13230
a9322a30 13231cat >>confdefs.h <<_ACEOF
81ecdfbb 13232#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 13233_ACEOF
5ee754fc 13234
5ee754fc 13235
81ecdfbb
RW
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
13237$as_echo_n "checking for LC_MESSAGES... " >&6; }
13238if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
13239 $as_echo_n "(cached) " >&6
bec39cab 13240else
81ecdfbb 13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13242/* end confdefs.h. */
81ecdfbb 13243#include <locale.h>
a9322a30
TT
13244int
13245main ()
13246{
81ecdfbb 13247return LC_MESSAGES
a9322a30
TT
13248 ;
13249 return 0;
13250}
bec39cab 13251_ACEOF
81ecdfbb
RW
13252if ac_fn_c_try_link "$LINENO"; then :
13253 am_cv_val_LC_MESSAGES=yes
bec39cab 13254else
81ecdfbb
RW
13255 am_cv_val_LC_MESSAGES=no
13256fi
13257rm -f core conftest.err conftest.$ac_objext \
13258 conftest$ac_exeext conftest.$ac_ext
13259fi
13260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
13261$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
13262 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 13263
81ecdfbb
RW
13264$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
13265
13266 fi
13267
13268
13269# ----------------------- #
13270# Checks for structures. #
13271# ----------------------- #
13272
13273ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13274if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
13275
13276cat >>confdefs.h <<_ACEOF
13277#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 13278_ACEOF
7eb368b3 13279
81ecdfbb 13280
7eb368b3 13281fi
81ecdfbb
RW
13282ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13283if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 13284
a9322a30
TT
13285cat >>confdefs.h <<_ACEOF
13286#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13287_ACEOF
13288
a9322a30 13289
7eb368b3
NR
13290fi
13291
7eb368b3 13292
a9322a30
TT
13293# ------------------ #
13294# Checks for types. #
13295# ------------------ #
7eb368b3 13296
81ecdfbb
RW
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
13298$as_echo_n "checking return type of signal handlers... " >&6; }
13299if test "${ac_cv_type_signal+set}" = set; then :
13300 $as_echo_n "(cached) " >&6
bec39cab 13301else
81ecdfbb 13302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13303/* end confdefs.h. */
a9322a30
TT
13304#include <sys/types.h>
13305#include <signal.h>
7cb9022a 13306
a9322a30
TT
13307int
13308main ()
13309{
81ecdfbb 13310return *(signal (0, 0)) (0) == 1;
a9322a30
TT
13311 ;
13312 return 0;
13313}
bec39cab 13314_ACEOF
81ecdfbb
RW
13315if ac_fn_c_try_compile "$LINENO"; then :
13316 ac_cv_type_signal=int
bec39cab 13317else
81ecdfbb 13318 ac_cv_type_signal=void
bec39cab 13319fi
81ecdfbb 13320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13321fi
81ecdfbb
RW
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
13323$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 13324
a9322a30
TT
13325cat >>confdefs.h <<_ACEOF
13326#define RETSIGTYPE $ac_cv_type_signal
13327_ACEOF
5ee754fc 13328
bec39cab 13329
81ecdfbb 13330ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
13331#include <sys/socket.h>
13332
81ecdfbb
RW
13333"
13334if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 13335
a9322a30
TT
13336cat >>confdefs.h <<_ACEOF
13337#define HAVE_SOCKLEN_T 1
13338_ACEOF
13339
13340
13341fi
13342
13343
13344# ------------------------------------- #
13345# Checks for compiler characteristics. #
13346# ------------------------------------- #
13347
81ecdfbb
RW
13348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13349$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
13350if test "${ac_cv_c_const+set}" = set; then :
13351 $as_echo_n "(cached) " >&6
a9322a30 13352else
81ecdfbb 13353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13354/* end confdefs.h. */
a9322a30
TT
13355
13356int
13357main ()
13358{
13359/* FIXME: Include the comments suggested by Paul. */
13360#ifndef __cplusplus
13361 /* Ultrix mips cc rejects this. */
13362 typedef int charset[2];
81ecdfbb 13363 const charset cs;
a9322a30 13364 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
13365 char const *const *pcpcc;
13366 char **ppc;
a9322a30
TT
13367 /* NEC SVR4.0.2 mips cc rejects this. */
13368 struct point {int x, y;};
13369 static struct point const zero = {0,0};
13370 /* AIX XL C 1.02.0.0 rejects this.
13371 It does not let you subtract one const X* pointer from another in
13372 an arm of an if-expression whose if-part is not a constant
13373 expression */
13374 const char *g = "string";
81ecdfbb 13375 pcpcc = &g + (g ? g-g : 0);
a9322a30 13376 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
13377 ++pcpcc;
13378 ppc = (char**) pcpcc;
13379 pcpcc = (char const *const *) ppc;
a9322a30
TT
13380 { /* SCO 3.2v4 cc rejects this. */
13381 char *t;
13382 char const *s = 0 ? (char *) 0 : (char const *) 0;
13383
13384 *t++ = 0;
81ecdfbb 13385 if (s) return 0;
a9322a30
TT
13386 }
13387 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13388 int x[] = {25, 17};
13389 const int *foo = &x[0];
13390 ++foo;
13391 }
13392 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13393 typedef const int *iptr;
13394 iptr p = 0;
13395 ++p;
13396 }
13397 { /* AIX XL C 1.02.0.0 rejects this saying
13398 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13399 struct s { int j; const int *ap[3]; };
13400 struct s *b; b->j = 5;
13401 }
13402 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13403 const int foo = 10;
81ecdfbb 13404 if (!foo) return 0;
a9322a30 13405 }
81ecdfbb 13406 return !cs[0] && !zero.x;
a9322a30
TT
13407#endif
13408
13409 ;
13410 return 0;
13411}
bec39cab 13412_ACEOF
81ecdfbb 13413if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 13414 ac_cv_c_const=yes
5ee754fc 13415else
81ecdfbb 13416 ac_cv_c_const=no
5ee754fc 13417fi
81ecdfbb 13418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13419fi
81ecdfbb
RW
13420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13421$as_echo "$ac_cv_c_const" >&6; }
a9322a30 13422if test $ac_cv_c_const = no; then
bec39cab 13423
81ecdfbb 13424$as_echo "#define const /**/" >>confdefs.h
bec39cab 13425
5ee754fc 13426fi
bec39cab 13427
81ecdfbb
RW
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13429$as_echo_n "checking for inline... " >&6; }
13430if test "${ac_cv_c_inline+set}" = set; then :
13431 $as_echo_n "(cached) " >&6
bec39cab 13432else
a9322a30
TT
13433 ac_cv_c_inline=no
13434for ac_kw in inline __inline__ __inline; do
81ecdfbb 13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13436/* end confdefs.h. */
a9322a30
TT
13437#ifndef __cplusplus
13438typedef int foo_t;
13439static $ac_kw foo_t static_foo () {return 0; }
13440$ac_kw foo_t foo () {return 0; }
13441#endif
13442
bec39cab 13443_ACEOF
81ecdfbb
RW
13444if ac_fn_c_try_compile "$LINENO"; then :
13445 ac_cv_c_inline=$ac_kw
bec39cab 13446fi
81ecdfbb
RW
13447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13448 test "$ac_cv_c_inline" != no && break
a9322a30 13449done
bec39cab 13450
5ee754fc 13451fi
81ecdfbb
RW
13452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13453$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 13454
a9322a30
TT
13455case $ac_cv_c_inline in
13456 inline | yes) ;;
13457 *)
13458 case $ac_cv_c_inline in
13459 no) ac_val=;;
13460 *) ac_val=$ac_cv_c_inline;;
13461 esac
13462 cat >>confdefs.h <<_ACEOF
13463#ifndef __cplusplus
13464#define inline $ac_val
13465#endif
13466_ACEOF
bec39cab
AC
13467 ;;
13468esac
bec39cab 13469
81ecdfbb
RW
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13471$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13472if test "${ac_cv_c_bigendian+set}" = set; then :
13473 $as_echo_n "(cached) " >&6
bec39cab 13474else
81ecdfbb
RW
13475 ac_cv_c_bigendian=unknown
13476 # See if we're dealing with a universal compiler.
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478/* end confdefs.h. */
13479#ifndef __APPLE_CC__
13480 not a universal capable compiler
13481 #endif
13482 typedef int dummy;
13483
13484_ACEOF
13485if ac_fn_c_try_compile "$LINENO"; then :
13486
13487 # Check for potential -arch flags. It is not universal unless
13488 # there are at least two -arch flags with different values.
13489 ac_arch=
13490 ac_prev=
13491 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13492 if test -n "$ac_prev"; then
13493 case $ac_word in
13494 i?86 | x86_64 | ppc | ppc64)
13495 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13496 ac_arch=$ac_word
13497 else
13498 ac_cv_c_bigendian=universal
13499 break
13500 fi
13501 ;;
13502 esac
13503 ac_prev=
13504 elif test "x$ac_word" = "x-arch"; then
13505 ac_prev=arch
13506 fi
13507 done
13508fi
13509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13510 if test $ac_cv_c_bigendian = unknown; then
13511 # See if sys/param.h defines the BYTE_ORDER macro.
13512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13513/* end confdefs.h. */
a9322a30 13514#include <sys/types.h>
81ecdfbb 13515 #include <sys/param.h>
a9322a30
TT
13516
13517int
13518main ()
13519{
81ecdfbb
RW
13520#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13521 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13522 && LITTLE_ENDIAN)
13523 bogus endian macros
13524 #endif
a9322a30
TT
13525
13526 ;
13527 return 0;
13528}
bec39cab 13529_ACEOF
81ecdfbb 13530if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 13531 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 13532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13533/* end confdefs.h. */
a9322a30 13534#include <sys/types.h>
81ecdfbb 13535 #include <sys/param.h>
a9322a30
TT
13536
13537int
13538main ()
13539{
13540#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
13541 not big endian
13542 #endif
a9322a30
TT
13543
13544 ;
13545 return 0;
13546}
bec39cab 13547_ACEOF
81ecdfbb 13548if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 13549 ac_cv_c_bigendian=yes
5ee754fc 13550else
81ecdfbb 13551 ac_cv_c_bigendian=no
5ee754fc 13552fi
81ecdfbb
RW
13553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13554fi
13555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13556 fi
13557 if test $ac_cv_c_bigendian = unknown; then
13558 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560/* end confdefs.h. */
13561#include <limits.h>
bec39cab 13562
81ecdfbb
RW
13563int
13564main ()
13565{
13566#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13567 bogus endian macros
13568 #endif
13569
13570 ;
13571 return 0;
13572}
7eb368b3 13573_ACEOF
81ecdfbb
RW
13574if ac_fn_c_try_compile "$LINENO"; then :
13575 # It does; now see whether it defined to _BIG_ENDIAN or not.
13576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 13577/* end confdefs.h. */
81ecdfbb
RW
13578#include <limits.h>
13579
7eb368b3
NR
13580int
13581main ()
13582{
81ecdfbb
RW
13583#ifndef _BIG_ENDIAN
13584 not big endian
13585 #endif
13586
7eb368b3
NR
13587 ;
13588 return 0;
13589}
13590_ACEOF
81ecdfbb 13591if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 13592 ac_cv_c_bigendian=yes
81ecdfbb
RW
13593else
13594 ac_cv_c_bigendian=no
a9322a30 13595fi
81ecdfbb 13596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 13597fi
81ecdfbb
RW
13598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13599 fi
13600 if test $ac_cv_c_bigendian = unknown; then
13601 # Compile a test program.
13602 if test "$cross_compiling" = yes; then :
13603 # Try to guess by grepping values from an object file.
13604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605/* end confdefs.h. */
13606short int ascii_mm[] =
13607 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13608 short int ascii_ii[] =
13609 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13610 int use_ascii (int i) {
13611 return ascii_mm[i] + ascii_ii[i];
13612 }
13613 short int ebcdic_ii[] =
13614 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13615 short int ebcdic_mm[] =
13616 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13617 int use_ebcdic (int i) {
13618 return ebcdic_mm[i] + ebcdic_ii[i];
13619 }
13620 extern int foo;
7eb368b3 13621
81ecdfbb
RW
13622int
13623main ()
13624{
13625return use_ascii (foo) == use_ebcdic (foo);
13626 ;
13627 return 0;
13628}
13629_ACEOF
13630if ac_fn_c_try_compile "$LINENO"; then :
13631 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13632 ac_cv_c_bigendian=yes
13633 fi
13634 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13635 if test "$ac_cv_c_bigendian" = unknown; then
13636 ac_cv_c_bigendian=no
13637 else
13638 # finding both strings is unlikely to happen, but who knows?
13639 ac_cv_c_bigendian=unknown
13640 fi
13641 fi
7eb368b3 13642fi
81ecdfbb 13643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13644else
81ecdfbb 13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13646/* end confdefs.h. */
81ecdfbb 13647$ac_includes_default
d3ea6809
MM
13648int
13649main ()
13650{
81ecdfbb
RW
13651
13652 /* Are we little or big endian? From Harbison&Steele. */
13653 union
13654 {
13655 long int l;
13656 char c[sizeof (long int)];
13657 } u;
13658 u.l = 1;
13659 return u.c[sizeof (long int) - 1] == 1;
13660
13661 ;
13662 return 0;
d3ea6809
MM
13663}
13664_ACEOF
81ecdfbb 13665if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13666 ac_cv_c_bigendian=no
d3ea6809 13667else
81ecdfbb 13668 ac_cv_c_bigendian=yes
d3ea6809 13669fi
81ecdfbb
RW
13670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13671 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13672fi
a9322a30 13673
81ecdfbb
RW
13674 fi
13675fi
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13677$as_echo "$ac_cv_c_bigendian" >&6; }
13678 case $ac_cv_c_bigendian in #(
13679 yes)
13680 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13681;; #(
13682 no)
13683 ;; #(
13684 universal)
13685
13686$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13687
13688 ;; #(
13689 *)
13690 as_fn_error "unknown endianness
13691 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13692 esac
d3ea6809
MM
13693
13694
a9322a30
TT
13695# ------------------------------ #
13696# Checks for library functions. #
13697# ------------------------------ #
d3ea6809 13698
a9322a30
TT
13699# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13700# for constant arguments. Useless!
81ecdfbb
RW
13701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13702$as_echo_n "checking for working alloca.h... " >&6; }
13703if test "${ac_cv_working_alloca_h+set}" = set; then :
13704 $as_echo_n "(cached) " >&6
d3ea6809 13705else
81ecdfbb 13706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 13707/* end confdefs.h. */
a9322a30 13708#include <alloca.h>
bec39cab
AC
13709int
13710main ()
13711{
a9322a30 13712char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 13713 if (p) return 0;
bec39cab
AC
13714 ;
13715 return 0;
13716}
13717_ACEOF
81ecdfbb 13718if ac_fn_c_try_link "$LINENO"; then :
a9322a30 13719 ac_cv_working_alloca_h=yes
bec39cab 13720else
81ecdfbb 13721 ac_cv_working_alloca_h=no
bec39cab 13722fi
81ecdfbb
RW
13723rm -f core conftest.err conftest.$ac_objext \
13724 conftest$ac_exeext conftest.$ac_ext
bec39cab 13725fi
81ecdfbb
RW
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13727$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
13728if test $ac_cv_working_alloca_h = yes; then
13729
81ecdfbb 13730$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 13731
c906108c 13732fi
bec39cab 13733
81ecdfbb
RW
13734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13735$as_echo_n "checking for alloca... " >&6; }
13736if test "${ac_cv_func_alloca_works+set}" = set; then :
13737 $as_echo_n "(cached) " >&6
bec39cab 13738else
81ecdfbb 13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13740/* end confdefs.h. */
a9322a30
TT
13741#ifdef __GNUC__
13742# define alloca __builtin_alloca
b4e70030 13743#else
a9322a30
TT
13744# ifdef _MSC_VER
13745# include <malloc.h>
13746# define alloca _alloca
13747# else
81ecdfbb 13748# ifdef HAVE_ALLOCA_H
a9322a30
TT
13749# include <alloca.h>
13750# else
13751# ifdef _AIX
13752 #pragma alloca
13753# else
13754# ifndef alloca /* predefined by HP cc +Olibcalls */
13755char *alloca ();
13756# endif
13757# endif
13758# endif
13759# endif
c906108c 13760#endif
97bf5e38 13761
bec39cab
AC
13762int
13763main ()
13764{
a9322a30 13765char *p = (char *) alloca (1);
81ecdfbb 13766 if (p) return 0;
bec39cab
AC
13767 ;
13768 return 0;
13769}
13770_ACEOF
81ecdfbb 13771if ac_fn_c_try_link "$LINENO"; then :
a9322a30 13772 ac_cv_func_alloca_works=yes
bec39cab 13773else
81ecdfbb 13774 ac_cv_func_alloca_works=no
bec39cab 13775fi
81ecdfbb
RW
13776rm -f core conftest.err conftest.$ac_objext \
13777 conftest$ac_exeext conftest.$ac_ext
bec39cab 13778fi
81ecdfbb
RW
13779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13780$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
13781
13782if test $ac_cv_func_alloca_works = yes; then
13783
81ecdfbb 13784$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 13785
a9322a30
TT
13786else
13787 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13788# that cause trouble. Some versions do not even contain alloca or
13789# contain a buggy version. If you still want to use their alloca,
13790# use ar to extract alloca.o from them instead of compiling alloca.c.
13791
81ecdfbb 13792ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 13793
81ecdfbb 13794$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 13795
bec39cab 13796
81ecdfbb
RW
13797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13798$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13799if test "${ac_cv_os_cray+set}" = set; then :
13800 $as_echo_n "(cached) " >&6
a9322a30 13801else
81ecdfbb 13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 13803/* end confdefs.h. */
81ecdfbb 13804#if defined CRAY && ! defined CRAY2
a9322a30
TT
13805webecray
13806#else
13807wenotbecray
13808#endif
13809
13810_ACEOF
13811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 13812 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
13813 ac_cv_os_cray=yes
13814else
81ecdfbb 13815 ac_cv_os_cray=no
bec39cab 13816fi
81ecdfbb
RW
13817rm -f conftest*
13818
bec39cab 13819fi
81ecdfbb
RW
13820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13821$as_echo "$ac_cv_os_cray" >&6; }
13822if test $ac_cv_os_cray = yes; then
13823 for ac_func in _getb67 GETB67 getb67; do
13824 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13825ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13826eval as_val=\$$as_ac_var
13827 if test "x$as_val" = x""yes; then :
a9322a30
TT
13828
13829cat >>confdefs.h <<_ACEOF
13830#define CRAY_STACKSEG_END $ac_func
bec39cab 13831_ACEOF
c906108c 13832
a9322a30 13833 break
c906108c
SS
13834fi
13835
a9322a30
TT
13836 done
13837fi
bec39cab 13838
81ecdfbb
RW
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13840$as_echo_n "checking stack direction for C alloca... " >&6; }
13841if test "${ac_cv_c_stack_direction+set}" = set; then :
13842 $as_echo_n "(cached) " >&6
a9322a30 13843else
81ecdfbb 13844 if test "$cross_compiling" = yes; then :
a9322a30 13845 ac_cv_c_stack_direction=0
bec39cab 13846else
81ecdfbb 13847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13848/* end confdefs.h. */
81ecdfbb 13849$ac_includes_default
a9322a30
TT
13850int
13851find_stack_direction ()
b4e70030 13852{
a9322a30
TT
13853 static char *addr = 0;
13854 auto char dummy;
13855 if (addr == 0)
13856 {
13857 addr = &dummy;
13858 return find_stack_direction ();
13859 }
13860 else
13861 return (&dummy > addr) ? 1 : -1;
b4e70030 13862}
b757528f 13863
bec39cab
AC
13864int
13865main ()
13866{
81ecdfbb 13867 return find_stack_direction () < 0;
bec39cab
AC
13868}
13869_ACEOF
81ecdfbb 13870if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13871 ac_cv_c_stack_direction=1
13872else
81ecdfbb 13873 ac_cv_c_stack_direction=-1
a9322a30 13874fi
81ecdfbb
RW
13875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13876 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13877fi
a9322a30 13878
81ecdfbb
RW
13879fi
13880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13881$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
13882cat >>confdefs.h <<_ACEOF
13883#define STACK_DIRECTION $ac_cv_c_stack_direction
13884_ACEOF
13885
13886
13887fi
13888
a9322a30 13889for ac_header in stdlib.h unistd.h
81ecdfbb
RW
13890do :
13891 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13892ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13893eval as_val=\$$as_ac_Header
13894 if test "x$as_val" = x""yes; then :
bec39cab 13895 cat >>confdefs.h <<_ACEOF
81ecdfbb 13896#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13897_ACEOF
b757528f 13898
b757528f 13899fi
bec39cab 13900
a9322a30 13901done
a3828db0 13902
a9322a30 13903for ac_func in getpagesize
81ecdfbb
RW
13904do :
13905 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13906if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 13907 cat >>confdefs.h <<_ACEOF
81ecdfbb 13908#define HAVE_GETPAGESIZE 1
bec39cab 13909_ACEOF
bcb3dc3d 13910
bcb3dc3d
MK
13911fi
13912done
13913
81ecdfbb
RW
13914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13915$as_echo_n "checking for working mmap... " >&6; }
13916if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
13917 $as_echo_n "(cached) " >&6
a9322a30 13918else
81ecdfbb 13919 if test "$cross_compiling" = yes; then :
a9322a30 13920 ac_cv_func_mmap_fixed_mapped=no
bec39cab 13921else
81ecdfbb 13922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13923/* end confdefs.h. */
a9322a30
TT
13924$ac_includes_default
13925/* malloc might have been renamed as rpl_malloc. */
13926#undef malloc
bec39cab 13927
a9322a30
TT
13928/* Thanks to Mike Haertel and Jim Avera for this test.
13929 Here is a matrix of mmap possibilities:
13930 mmap private not fixed
13931 mmap private fixed at somewhere currently unmapped
13932 mmap private fixed at somewhere already mapped
13933 mmap shared not fixed
13934 mmap shared fixed at somewhere currently unmapped
13935 mmap shared fixed at somewhere already mapped
13936 For private mappings, we should verify that changes cannot be read()
13937 back from the file, nor mmap's back from the file at a different
13938 address. (There have been systems where private was not correctly
13939 implemented like the infamous i386 svr4.0, and systems where the
13940 VM page cache was not coherent with the file system buffer cache
13941 like early versions of FreeBSD and possibly contemporary NetBSD.)
13942 For shared mappings, we should conversely verify that changes get
13943 propagated back to all the places they're supposed to be.
bec39cab 13944
a9322a30
TT
13945 Grep wants private fixed already mapped.
13946 The main things grep needs to know about mmap are:
13947 * does it exist and is it safe to write into the mmap'd area
13948 * how to use it (BSD variants) */
8b9cf735 13949
a9322a30
TT
13950#include <fcntl.h>
13951#include <sys/mman.h>
8b9cf735 13952
81ecdfbb 13953#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13954char *malloc ();
a3828db0
MK
13955#endif
13956
a9322a30 13957/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13958#ifndef HAVE_GETPAGESIZE
a9322a30 13959/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 13960# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
13961# define HAVE_SYS_PARAM_H 1
13962# endif
13963
13964# ifdef _SC_PAGESIZE
13965# define getpagesize() sysconf(_SC_PAGESIZE)
13966# else /* no _SC_PAGESIZE */
81ecdfbb 13967# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13968# include <sys/param.h>
13969# ifdef EXEC_PAGESIZE
13970# define getpagesize() EXEC_PAGESIZE
13971# else /* no EXEC_PAGESIZE */
13972# ifdef NBPG
13973# define getpagesize() NBPG * CLSIZE
13974# ifndef CLSIZE
13975# define CLSIZE 1
13976# endif /* no CLSIZE */
13977# else /* no NBPG */
13978# ifdef NBPC
13979# define getpagesize() NBPC
13980# else /* no NBPC */
13981# ifdef PAGESIZE
13982# define getpagesize() PAGESIZE
13983# endif /* PAGESIZE */
13984# endif /* no NBPC */
13985# endif /* no NBPG */
13986# endif /* no EXEC_PAGESIZE */
13987# else /* no HAVE_SYS_PARAM_H */
13988# define getpagesize() 8192 /* punt totally */
13989# endif /* no HAVE_SYS_PARAM_H */
13990# endif /* no _SC_PAGESIZE */
13991
13992#endif /* no HAVE_GETPAGESIZE */
13993
bec39cab
AC
13994int
13995main ()
13996{
a9322a30
TT
13997 char *data, *data2, *data3;
13998 int i, pagesize;
13999 int fd;
14000
14001 pagesize = getpagesize ();
14002
14003 /* First, make a file with some known garbage in it. */
14004 data = (char *) malloc (pagesize);
14005 if (!data)
81ecdfbb 14006 return 1;
a9322a30
TT
14007 for (i = 0; i < pagesize; ++i)
14008 *(data + i) = rand ();
14009 umask (0);
14010 fd = creat ("conftest.mmap", 0600);
14011 if (fd < 0)
81ecdfbb 14012 return 1;
a9322a30 14013 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 14014 return 1;
a9322a30
TT
14015 close (fd);
14016
14017 /* Next, try to mmap the file at a fixed address which already has
14018 something else allocated at it. If we can, also make sure that
14019 we see the same garbage. */
14020 fd = open ("conftest.mmap", O_RDWR);
14021 if (fd < 0)
81ecdfbb 14022 return 1;
a9322a30
TT
14023 data2 = (char *) malloc (2 * pagesize);
14024 if (!data2)
81ecdfbb
RW
14025 return 1;
14026 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
14027 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
14028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 14029 return 1;
a9322a30
TT
14030 for (i = 0; i < pagesize; ++i)
14031 if (*(data + i) != *(data2 + i))
81ecdfbb 14032 return 1;
a9322a30
TT
14033
14034 /* Finally, make sure that changes to the mapped area do not
14035 percolate back to the file as seen by read(). (This is a bug on
14036 some variants of i386 svr4.0.) */
14037 for (i = 0; i < pagesize; ++i)
14038 *(data2 + i) = *(data2 + i) + 1;
14039 data3 = (char *) malloc (pagesize);
14040 if (!data3)
81ecdfbb 14041 return 1;
a9322a30 14042 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 14043 return 1;
a9322a30
TT
14044 for (i = 0; i < pagesize; ++i)
14045 if (*(data + i) != *(data3 + i))
81ecdfbb 14046 return 1;
a9322a30 14047 close (fd);
81ecdfbb 14048 return 0;
bec39cab
AC
14049}
14050_ACEOF
81ecdfbb 14051if ac_fn_c_try_run "$LINENO"; then :
a9322a30 14052 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 14053else
81ecdfbb 14054 ac_cv_func_mmap_fixed_mapped=no
a3828db0 14055fi
81ecdfbb
RW
14056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14057 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 14058fi
81ecdfbb 14059
a9322a30 14060fi
81ecdfbb
RW
14061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
14062$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
14063if test $ac_cv_func_mmap_fixed_mapped = yes; then
14064
81ecdfbb 14065$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 14066
086ec9eb 14067fi
a9322a30 14068rm -f conftest.mmap
a3828db0 14069
81ecdfbb
RW
14070ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14071if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 14072
a9322a30
TT
14073else
14074
14075cat >>confdefs.h <<_ACEOF
14076#define pid_t int
bec39cab 14077_ACEOF
086ec9eb
MK
14078
14079fi
14080
81ecdfbb
RW
14081for ac_header in vfork.h
14082do :
14083 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14084if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 14085 cat >>confdefs.h <<_ACEOF
81ecdfbb 14086#define HAVE_VFORK_H 1
bec39cab 14087_ACEOF
c906108c
SS
14088
14089fi
a9322a30 14090
a3828db0 14091done
c906108c 14092
a9322a30 14093for ac_func in fork vfork
81ecdfbb
RW
14094do :
14095 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14096ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14097eval as_val=\$$as_ac_var
14098 if test "x$as_val" = x""yes; then :
a3828db0 14099 cat >>confdefs.h <<_ACEOF
81ecdfbb 14100#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 14101_ACEOF
b83266a0 14102
97bf5e38 14103fi
a3828db0 14104done
b83266a0 14105
a9322a30 14106if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14108$as_echo_n "checking for working fork... " >&6; }
14109if test "${ac_cv_func_fork_works+set}" = set; then :
14110 $as_echo_n "(cached) " >&6
a9322a30 14111else
81ecdfbb 14112 if test "$cross_compiling" = yes; then :
a9322a30
TT
14113 ac_cv_func_fork_works=cross
14114else
81ecdfbb
RW
14115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14116/* end confdefs.h. */
14117$ac_includes_default
14118int
14119main ()
14120{
14121
14122 /* By Ruediger Kuhlmann. */
14123 return fork () < 0;
14124
14125 ;
14126 return 0;
14127}
a9322a30 14128_ACEOF
81ecdfbb 14129if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
14130 ac_cv_func_fork_works=yes
14131else
81ecdfbb 14132 ac_cv_func_fork_works=no
a9322a30 14133fi
81ecdfbb
RW
14134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14135 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 14136fi
81ecdfbb 14137
a9322a30 14138fi
81ecdfbb
RW
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14140$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
14141
14142else
14143 ac_cv_func_fork_works=$ac_cv_func_fork
14144fi
14145if test "x$ac_cv_func_fork_works" = xcross; then
14146 case $host in
14147 *-*-amigaos* | *-*-msdosdjgpp*)
14148 # Override, as these systems have only a dummy fork() stub
14149 ac_cv_func_fork_works=no
14150 ;;
14151 *)
14152 ac_cv_func_fork_works=yes
14153 ;;
14154 esac
81ecdfbb
RW
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14156$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
14157fi
14158ac_cv_func_vfork_works=$ac_cv_func_vfork
14159if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
14160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14161$as_echo_n "checking for working vfork... " >&6; }
14162if test "${ac_cv_func_vfork_works+set}" = set; then :
14163 $as_echo_n "(cached) " >&6
a9322a30 14164else
81ecdfbb 14165 if test "$cross_compiling" = yes; then :
a9322a30
TT
14166 ac_cv_func_vfork_works=cross
14167else
81ecdfbb 14168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
14169/* end confdefs.h. */
14170/* Thanks to Paul Eggert for this test. */
81ecdfbb 14171$ac_includes_default
a9322a30 14172#include <sys/wait.h>
81ecdfbb 14173#ifdef HAVE_VFORK_H
a9322a30
TT
14174# include <vfork.h>
14175#endif
14176/* On some sparc systems, changes by the child to local and incoming
14177 argument registers are propagated back to the parent. The compiler
14178 is told about this with #include <vfork.h>, but some compilers
14179 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14180 static variable whose address is put into a register that is
14181 clobbered by the vfork. */
14182static void
14183#ifdef __cplusplus
14184sparc_address_test (int arg)
14185# else
14186sparc_address_test (arg) int arg;
14187#endif
14188{
14189 static pid_t child;
14190 if (!child) {
14191 child = vfork ();
14192 if (child < 0) {
14193 perror ("vfork");
14194 _exit(2);
14195 }
14196 if (!child) {
14197 arg = getpid();
14198 write(-1, "", 0);
14199 _exit (arg);
14200 }
14201 }
14202}
14203
14204int
14205main ()
14206{
14207 pid_t parent = getpid ();
14208 pid_t child;
14209
14210 sparc_address_test (0);
14211
14212 child = vfork ();
14213
14214 if (child == 0) {
14215 /* Here is another test for sparc vfork register problems. This
14216 test uses lots of local variables, at least as many local
14217 variables as main has allocated so far including compiler
14218 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14219 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14220 reuse the register of parent for one of the local variables,
14221 since it will think that parent can't possibly be used any more
14222 in this routine. Assigning to the local variable will thus
14223 munge parent in the parent process. */
14224 pid_t
14225 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14226 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14227 /* Convince the compiler that p..p7 are live; otherwise, it might
14228 use the same hardware register for all 8 local variables. */
14229 if (p != p1 || p != p2 || p != p3 || p != p4
14230 || p != p5 || p != p6 || p != p7)
14231 _exit(1);
14232
14233 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14234 from child file descriptors. If the child closes a descriptor
14235 before it execs or exits, this munges the parent's descriptor
14236 as well. Test for this by closing stdout in the child. */
14237 _exit(close(fileno(stdout)) != 0);
14238 } else {
14239 int status;
14240 struct stat st;
14241
14242 while (wait(&status) != child)
14243 ;
81ecdfbb 14244 return (
a9322a30
TT
14245 /* Was there some problem with vforking? */
14246 child < 0
14247
14248 /* Did the child fail? (This shouldn't happen.) */
14249 || status
14250
14251 /* Did the vfork/compiler bug occur? */
14252 || parent != getpid()
14253
14254 /* Did the file descriptor bug occur? */
14255 || fstat(fileno(stdout), &st) != 0
14256 );
14257 }
14258}
14259_ACEOF
81ecdfbb 14260if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
14261 ac_cv_func_vfork_works=yes
14262else
81ecdfbb 14263 ac_cv_func_vfork_works=no
a9322a30 14264fi
81ecdfbb
RW
14265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14266 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 14267fi
81ecdfbb 14268
a9322a30 14269fi
81ecdfbb
RW
14270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14271$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
14272
14273fi;
14274if test "x$ac_cv_func_fork_works" = xcross; then
14275 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
14276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14277$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
14278fi
14279
14280if test "x$ac_cv_func_vfork_works" = xyes; then
14281
81ecdfbb 14282$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
14283
14284else
14285
81ecdfbb 14286$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
14287
14288fi
14289if test "x$ac_cv_func_fork_works" = xyes; then
14290
81ecdfbb 14291$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
14292
14293fi
14294
7313baad 14295for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 14296 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 14297 sbrk setpgid setpgrp setsid \
a9322a30 14298 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 14299 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 14300 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
14301do :
14302 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14303ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14304eval as_val=\$$as_ac_var
14305 if test "x$as_val" = x""yes; then :
6c7a06a3 14306 cat >>confdefs.h <<_ACEOF
81ecdfbb 14307#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
14308_ACEOF
14309
14310fi
14311done
14312
14313
81ecdfbb
RW
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14315$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14316if test "${am_cv_langinfo_codeset+set}" = set; then :
14317 $as_echo_n "(cached) " >&6
6c7a06a3 14318else
81ecdfbb 14319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
14320/* end confdefs.h. */
14321#include <langinfo.h>
14322int
14323main ()
14324{
14325char* cs = nl_langinfo(CODESET);
bec39cab
AC
14326 ;
14327 return 0;
14328}
14329_ACEOF
81ecdfbb 14330if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 14331 am_cv_langinfo_codeset=yes
a4db0f07 14332else
81ecdfbb 14333 am_cv_langinfo_codeset=no
a4db0f07 14334fi
81ecdfbb
RW
14335rm -f core conftest.err conftest.$ac_objext \
14336 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 14337
a4db0f07 14338fi
81ecdfbb
RW
14339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
14340$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
14341 if test $am_cv_langinfo_codeset = yes; then
14342
81ecdfbb 14343$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 14344
6c7a06a3 14345 fi
c906108c 14346
06825bd1 14347
a3828db0
MK
14348# Check the return and argument types of ptrace. No canned test for
14349# this, so roll our own.
14350gdb_ptrace_headers='
14351#if HAVE_SYS_TYPES_H
14352# include <sys/types.h>
14353#endif
14354#if HAVE_SYS_PTRACE_H
14355# include <sys/ptrace.h>
14356#endif
14357#if HAVE_UNISTD_H
14358# include <unistd.h>
14359#endif
14360'
14361# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
14362ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
14363"
14364if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
14365 ac_have_decl=1
06825bd1 14366else
81ecdfbb 14367 ac_have_decl=0
06825bd1 14368fi
06825bd1 14369
a3828db0 14370cat >>confdefs.h <<_ACEOF
81ecdfbb 14371#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 14372_ACEOF
81ecdfbb 14373if test $ac_have_decl = 1; then :
bec39cab 14374
a3828db0 14375else
a3828db0
MK
14376
14377 : ${gdb_cv_func_ptrace_ret='int'}
14378 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14379
06825bd1
MK
14380fi
14381
064ef605
DJ
14382# Check return type. Varargs (used on GNU/Linux) conflict with the
14383# empty argument list, so check for that explicitly.
81ecdfbb
RW
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14385$as_echo_n "checking return type of ptrace... " >&6; }
14386if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
14387 $as_echo_n "(cached) " >&6
bec39cab 14388else
81ecdfbb 14389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14390/* end confdefs.h. */
a3828db0 14391$gdb_ptrace_headers
bec39cab
AC
14392int
14393main ()
14394{
064ef605
DJ
14395extern long ptrace (enum __ptrace_request, ...);
14396 ;
14397 return 0;
14398}
14399_ACEOF
81ecdfbb 14400if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
14401 gdb_cv_func_ptrace_ret='long'
14402else
81ecdfbb 14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14404/* end confdefs.h. */
14405$gdb_ptrace_headers
14406int
14407main ()
14408{
a3828db0 14409extern int ptrace ();
bec39cab
AC
14410 ;
14411 return 0;
14412}
14413_ACEOF
81ecdfbb 14414if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14415 gdb_cv_func_ptrace_ret='int'
70f9f479 14416else
81ecdfbb 14417 gdb_cv_func_ptrace_ret='long'
70f9f479 14418fi
81ecdfbb 14419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 14420fi
81ecdfbb 14421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14422fi
81ecdfbb
RW
14423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14424$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 14425
a3828db0
MK
14426cat >>confdefs.h <<_ACEOF
14427#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 14428_ACEOF
70f9f479 14429
a3828db0 14430# Check argument types.
81ecdfbb
RW
14431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14432$as_echo_n "checking types of arguments for ptrace... " >&6; }
14433if test "${gdb_cv_func_ptrace_args+set}" = set; then :
14434 $as_echo_n "(cached) " >&6
bec39cab 14435else
a3828db0 14436
81ecdfbb 14437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14438/* end confdefs.h. */
14439$gdb_ptrace_headers
14440int
14441main ()
14442{
14443extern long ptrace (enum __ptrace_request, ...);
14444 ;
14445 return 0;
14446}
14447_ACEOF
81ecdfbb 14448if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
14449 gdb_cv_func_ptrace_args='int,int,long,long'
14450else
064ef605 14451
a3828db0
MK
14452for gdb_arg1 in 'int' 'long'; do
14453 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 14454 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 14455 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14457/* end confdefs.h. */
a3828db0 14458$gdb_ptrace_headers
bec39cab
AC
14459int
14460main ()
14461{
a3828db0
MK
14462
14463extern $gdb_cv_func_ptrace_ret
14464 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14465
bec39cab
AC
14466 ;
14467 return 0;
14468}
14469_ACEOF
81ecdfbb 14470if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14471 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14472 break 4;
5c7f2947 14473fi
81ecdfbb 14474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 14475 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14477/* end confdefs.h. */
a3828db0 14478$gdb_ptrace_headers
bec39cab
AC
14479int
14480main ()
14481{
a3828db0
MK
14482
14483extern $gdb_cv_func_ptrace_ret
14484 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14485
bec39cab
AC
14486 ;
14487 return 0;
14488}
14489_ACEOF
81ecdfbb 14490if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14491
14492gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14493 break 5;
78434e59 14494fi
81ecdfbb 14495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
14496 done
14497 done
14498 done
14499 done
14500done
14501# Provide a safe default value.
14502: ${gdb_cv_func_ptrace_args='int,int,long,long'}
14503
064ef605 14504fi
81ecdfbb 14505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14506fi
81ecdfbb
RW
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14508$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
14509ac_save_IFS=$IFS; IFS=','
14510set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14511IFS=$ac_save_IFS
14512shift
bec39cab 14513
a3828db0
MK
14514cat >>confdefs.h <<_ACEOF
14515#define PTRACE_TYPE_ARG3 $3
14516_ACEOF
14517
14518if test -n "$5"; then
14519
14520cat >>confdefs.h <<_ACEOF
14521#define PTRACE_TYPE_ARG5 $5
bec39cab 14522_ACEOF
78434e59
MK
14523
14524fi
14525
a3828db0 14526if test "$cross_compiling" = no; then
81ecdfbb
RW
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14528$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14529if test "${ac_cv_func_setpgrp_void+set}" = set; then :
14530 $as_echo_n "(cached) " >&6
a3828db0 14531else
81ecdfbb
RW
14532 if test "$cross_compiling" = yes; then :
14533 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14534else
81ecdfbb 14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14536/* end confdefs.h. */
81ecdfbb 14537$ac_includes_default
bec39cab
AC
14538int
14539main ()
14540{
a3828db0
MK
14541/* If this system has a BSD-style setpgrp which takes arguments,
14542 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14543 exit successfully. */
81ecdfbb 14544 return setpgrp (1,1) != -1;
bec39cab
AC
14545 ;
14546 return 0;
14547}
14548_ACEOF
81ecdfbb 14549if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14550 ac_cv_func_setpgrp_void=no
c906108c 14551else
81ecdfbb 14552 ac_cv_func_setpgrp_void=yes
c906108c 14553fi
81ecdfbb
RW
14554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14555 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14556fi
81ecdfbb 14557
a3828db0 14558fi
81ecdfbb
RW
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14560$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14561if test $ac_cv_func_setpgrp_void = yes; then
14562
81ecdfbb 14563$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14564
14565fi
a3828db0
MK
14566
14567else
81ecdfbb
RW
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14569$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14570if test "${ac_cv_func_setpgrp_void+set}" = set; then :
14571 $as_echo_n "(cached) " >&6
97bf5e38 14572else
81ecdfbb 14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14574/* end confdefs.h. */
a3828db0
MK
14575
14576#include <unistd.h>
14577
bec39cab
AC
14578int
14579main ()
14580{
a3828db0
MK
14581
14582 if (setpgrp(1,1) == -1)
14583 exit (0);
14584 else
14585 exit (1);
14586
bec39cab
AC
14587 ;
14588 return 0;
14589}
14590_ACEOF
81ecdfbb 14591if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14592 ac_cv_func_setpgrp_void=no
c906108c 14593else
81ecdfbb 14594 ac_cv_func_setpgrp_void=yes
c906108c 14595fi
81ecdfbb 14596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14597fi
81ecdfbb
RW
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14599$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14600if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14601 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14602
a3828db0 14603fi
c906108c
SS
14604fi
14605
a3828db0
MK
14606# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
14607# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
14608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14609$as_echo_n "checking for sigsetjmp... " >&6; }
14610if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
14611 $as_echo_n "(cached) " >&6
bec39cab 14612else
81ecdfbb 14613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14614/* end confdefs.h. */
a3828db0
MK
14615
14616#include <setjmp.h>
14617
bec39cab
AC
14618int
14619main ()
14620{
a3828db0 14621sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
14622 ;
14623 return 0;
14624}
14625_ACEOF
81ecdfbb 14626if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14627 gdb_cv_func_sigsetjmp=yes
c906108c 14628else
81ecdfbb 14629 gdb_cv_func_sigsetjmp=no
c906108c 14630fi
81ecdfbb 14631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14632fi
81ecdfbb
RW
14633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14634$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 14635if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 14636
81ecdfbb 14637$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 14638
97bf5e38 14639fi
c906108c 14640
a3828db0
MK
14641# Assume we'll default to using the included libiberty regex.
14642gdb_use_included_regex=yes
14643
14644# However, if the system regex is GNU regex, then default to *not*
14645# using the included regex.
81ecdfbb
RW
14646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14647$as_echo_n "checking for GNU regex... " >&6; }
14648if test "${gdb_cv_have_gnu_regex+set}" = set; then :
14649 $as_echo_n "(cached) " >&6
bec39cab 14650else
81ecdfbb 14651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14652/* end confdefs.h. */
a3828db0 14653#include <gnu-versions.h>
bec39cab
AC
14654int
14655main ()
14656{
81ecdfbb
RW
14657#define REGEX_INTERFACE_VERSION 1
14658#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14659# error "Version mismatch"
14660#endif
5c45e068
MK
14661 ;
14662 return 0;
14663}
14664_ACEOF
81ecdfbb
RW
14665if ac_fn_c_try_compile "$LINENO"; then :
14666 gdb_cv_have_gnu_regex=yes
5c45e068 14667else
81ecdfbb
RW
14668 gdb_cv_have_gnu_regex=no
14669fi
14670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14671fi
14672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14673$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14674if test $gdb_cv_have_gnu_regex = yes; then
14675 gdb_use_included_regex=no
5c45e068 14676fi
81ecdfbb
RW
14677
14678
14679# Check whether --with-included-regex was given.
14680if test "${with_included_regex+set}" = set; then :
14681 withval=$with_included_regex; gdb_with_regex=$withval
14682else
14683 gdb_with_regex=$gdb_use_included_regex
c906108c 14684fi
81ecdfbb
RW
14685
14686if test "$gdb_with_regex" = yes; then
14687
14688$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14689
c906108c 14690fi
81ecdfbb
RW
14691
14692# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14693ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14694#include <sys/proc.h>
14695
14696"
14697if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 14698
5c45e068 14699cat >>confdefs.h <<_ACEOF
a3828db0 14700#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14701_ACEOF
c906108c 14702
5c45e068 14703
97bf5e38 14704fi
c906108c 14705
5c45e068 14706
a3828db0 14707# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14709$as_echo_n "checking for struct lwp... " >&6; }
14710if test "${gdb_cv_struct_lwp+set}" = set; then :
14711 $as_echo_n "(cached) " >&6
bec39cab 14712else
81ecdfbb 14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14714/* end confdefs.h. */
a3828db0
MK
14715#include <sys/param.h>
14716#include <sys/lwp.h>
bec39cab
AC
14717int
14718main ()
14719{
a3828db0 14720struct lwp l;
bec39cab
AC
14721 ;
14722 return 0;
14723}
14724_ACEOF
81ecdfbb 14725if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14726 gdb_cv_struct_lwp=yes
c906108c 14727else
81ecdfbb 14728 gdb_cv_struct_lwp=no
c906108c 14729fi
81ecdfbb 14730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14731fi
81ecdfbb
RW
14732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14733$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14734if test $gdb_cv_struct_lwp = yes; then
c906108c 14735
81ecdfbb 14736$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14737
97bf5e38 14738fi
c906108c 14739
a3828db0 14740# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14742$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14743if test "${gdb_cv_struct_reg+set}" = set; then :
14744 $as_echo_n "(cached) " >&6
bec39cab 14745else
81ecdfbb 14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14747/* end confdefs.h. */
a3828db0
MK
14748#include <sys/types.h>
14749#include <machine/reg.h>
bec39cab
AC
14750int
14751main ()
14752{
a3828db0 14753struct reg r;
bec39cab
AC
14754 ;
14755 return 0;
14756}
14757_ACEOF
81ecdfbb 14758if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14759 gdb_cv_struct_reg=yes
27ca5dad 14760else
81ecdfbb 14761 gdb_cv_struct_reg=no
27ca5dad 14762fi
81ecdfbb 14763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14764fi
81ecdfbb
RW
14765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14766$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14767if test $gdb_cv_struct_reg = yes; then
bec39cab 14768
81ecdfbb 14769$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14770
14771fi
97bf5e38 14772
a3828db0
MK
14773# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14774# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
14775ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
14776"
14777if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
14778
14779cat >>confdefs.h <<_ACEOF
a3828db0 14780#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14781_ACEOF
3862412b 14782
5c45e068 14783
97bf5e38 14784fi
81ecdfbb
RW
14785ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
14786"
14787if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
14788
14789cat >>confdefs.h <<_ACEOF
a3828db0 14790#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14791_ACEOF
3862412b 14792
5c45e068 14793
97bf5e38 14794fi
3862412b 14795
5c45e068 14796
a3828db0 14797# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14799$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14800if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
14801 $as_echo_n "(cached) " >&6
451928c5 14802else
81ecdfbb 14803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14804/* end confdefs.h. */
a3828db0 14805#include <sys/ptrace.h>
bec39cab
AC
14806int
14807main ()
14808{
a3828db0 14809PTRACE_GETREGS;
bec39cab
AC
14810 ;
14811 return 0;
14812}
14813_ACEOF
81ecdfbb 14814if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14815 gdb_cv_have_ptrace_getregs=yes
451928c5 14816else
81ecdfbb 14817 gdb_cv_have_ptrace_getregs=no
451928c5 14818fi
81ecdfbb 14819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14820fi
14821
81ecdfbb
RW
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14823$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14824if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14825
81ecdfbb 14826$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14827
97bf5e38 14828fi
451928c5 14829
a3828db0 14830# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14832$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14833if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
14834 $as_echo_n "(cached) " >&6
451928c5 14835else
81ecdfbb 14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14837/* end confdefs.h. */
a3828db0 14838#include <sys/ptrace.h>
bec39cab
AC
14839int
14840main ()
14841{
a3828db0 14842PTRACE_GETFPXREGS;
bec39cab
AC
14843 ;
14844 return 0;
14845}
14846_ACEOF
81ecdfbb 14847if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14848 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14849else
81ecdfbb 14850 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14851fi
81ecdfbb 14852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14853fi
14854
81ecdfbb
RW
14855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14856$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14857if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14858
81ecdfbb 14859$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14860
97bf5e38 14861fi
451928c5 14862
a3828db0 14863# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14865$as_echo_n "checking for PT_GETDBREGS... " >&6; }
14866if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
14867 $as_echo_n "(cached) " >&6
3862412b 14868else
81ecdfbb 14869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14870/* end confdefs.h. */
a3828db0
MK
14871#include <sys/types.h>
14872#include <sys/ptrace.h>
bec39cab
AC
14873int
14874main ()
14875{
a3828db0 14876PT_GETDBREGS;
bec39cab
AC
14877 ;
14878 return 0;
14879}
14880_ACEOF
81ecdfbb 14881if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14882 gdb_cv_have_pt_getdbregs=yes
3862412b 14883else
81ecdfbb 14884 gdb_cv_have_pt_getdbregs=no
3862412b 14885fi
81ecdfbb 14886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14887fi
14888
81ecdfbb
RW
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14890$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14891if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14892
81ecdfbb 14893$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14894
97bf5e38 14895fi
3862412b 14896
a3828db0 14897# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14899$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14900if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
14901 $as_echo_n "(cached) " >&6
3862412b 14902else
81ecdfbb 14903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14904/* end confdefs.h. */
a3828db0
MK
14905#include <sys/types.h>
14906#include <sys/ptrace.h>
bec39cab
AC
14907int
14908main ()
14909{
a3828db0 14910PT_GETXMMREGS;
bec39cab
AC
14911 ;
14912 return 0;
14913}
14914_ACEOF
81ecdfbb 14915if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14916 gdb_cv_have_pt_getxmmregs=yes
3862412b 14917else
81ecdfbb 14918 gdb_cv_have_pt_getxmmregs=no
3862412b 14919fi
81ecdfbb 14920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14921fi
14922
81ecdfbb
RW
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14924$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14925if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14926
81ecdfbb 14927$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14928
97bf5e38 14929fi
3862412b 14930
eb368090 14931# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
14932
14933if test "${target}" = "${host}"; then
14934 case "${host}" in
97bf5e38 14935 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 14936
81ecdfbb 14937$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
14938
14939 ;;
c162e8c9 14940 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 14941
81ecdfbb 14942$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
14943
14944 ;;
14945 mips-sgi-irix5*)
14946 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 14947
81ecdfbb 14948$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
14949
14950 ;;
14951 esac
14952fi
14953
14954if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
14956$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
14957 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
14958 $as_echo_n "(cached) " >&6
bec39cab 14959else
81ecdfbb 14960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14961/* end confdefs.h. */
596c9d4b
KB
14962
14963#define _SYSCALL32
d30c5336
JK
14964/* Needed for new procfs interface on sparc-solaris. */
14965#define _STRUCTURED_PROC 1
596c9d4b 14966#include <sys/procfs.h>
bec39cab
AC
14967int
14968main ()
14969{
97bf5e38 14970pstatus_t avar
bec39cab
AC
14971 ;
14972 return 0;
14973}
14974_ACEOF
81ecdfbb 14975if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14976 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 14977else
81ecdfbb 14978 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 14979
596c9d4b 14980fi
81ecdfbb 14981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14982fi
14983
97bf5e38 14984 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 14985
81ecdfbb 14986$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
14987
14988 fi
81ecdfbb
RW
14989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
14990$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 14991
81ecdfbb
RW
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
14993$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
14994 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
14995 $as_echo_n "(cached) " >&6
596c9d4b 14996else
81ecdfbb 14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14998/* end confdefs.h. */
596c9d4b
KB
14999
15000#define _SYSCALL32
d30c5336
JK
15001/* Needed for new procfs interface on sparc-solaris. */
15002#define _STRUCTURED_PROC 1
596c9d4b 15003#include <sys/procfs.h>
bec39cab
AC
15004int
15005main ()
15006{
97bf5e38 15007prrun_t avar
bec39cab
AC
15008 ;
15009 return 0;
15010}
15011_ACEOF
81ecdfbb 15012if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15013 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 15014else
81ecdfbb 15015 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 15016
596c9d4b 15017fi
81ecdfbb 15018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
15019fi
15020
97bf5e38 15021 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 15022
81ecdfbb 15023$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
15024
15025 fi
81ecdfbb
RW
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
15027$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 15028
81ecdfbb
RW
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15030$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15031 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
15032 $as_echo_n "(cached) " >&6
596c9d4b 15033else
81ecdfbb 15034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15035/* end confdefs.h. */
596c9d4b
KB
15036
15037#define _SYSCALL32
d30c5336
JK
15038/* Needed for new procfs interface on sparc-solaris. */
15039#define _STRUCTURED_PROC 1
596c9d4b 15040#include <sys/procfs.h>
bec39cab
AC
15041int
15042main ()
15043{
97bf5e38 15044gregset_t avar
bec39cab
AC
15045 ;
15046 return 0;
15047}
15048_ACEOF
81ecdfbb 15049if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15050 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 15051else
81ecdfbb 15052 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 15053
596c9d4b 15054fi
81ecdfbb 15055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
15056fi
15057
97bf5e38 15058 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 15059
81ecdfbb 15060$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
15061
15062 fi
81ecdfbb
RW
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15064$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 15065
81ecdfbb
RW
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15067$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15068 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
15069 $as_echo_n "(cached) " >&6
d84dd0c5 15070else
81ecdfbb 15071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15072/* end confdefs.h. */
97bf5e38
MK
15073
15074#define _SYSCALL32
d30c5336
JK
15075/* Needed for new procfs interface on sparc-solaris. */
15076#define _STRUCTURED_PROC 1
d84dd0c5 15077#include <sys/procfs.h>
bec39cab
AC
15078int
15079main ()
15080{
97bf5e38 15081fpregset_t avar
bec39cab
AC
15082 ;
15083 return 0;
15084}
15085_ACEOF
81ecdfbb 15086if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15087 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 15088else
81ecdfbb 15089 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 15090
d84dd0c5 15091fi
81ecdfbb 15092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
15093fi
15094
97bf5e38 15095 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 15096
81ecdfbb 15097$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 15098
97bf5e38 15099 fi
81ecdfbb
RW
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15101$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 15102
81ecdfbb
RW
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15104$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15105 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
15106 $as_echo_n "(cached) " >&6
c906108c 15107else
81ecdfbb 15108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15109/* end confdefs.h. */
c906108c 15110
97bf5e38 15111#define _SYSCALL32
d30c5336
JK
15112/* Needed for new procfs interface on sparc-solaris. */
15113#define _STRUCTURED_PROC 1
97bf5e38 15114#include <sys/procfs.h>
bec39cab
AC
15115int
15116main ()
15117{
97bf5e38 15118prgregset_t avar
bec39cab
AC
15119 ;
15120 return 0;
15121}
15122_ACEOF
81ecdfbb 15123if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15124 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 15125else
81ecdfbb 15126 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 15127
c906108c 15128fi
81ecdfbb 15129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15130fi
15131
97bf5e38 15132 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 15133
81ecdfbb 15134$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 15135
97bf5e38 15136 fi
81ecdfbb
RW
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15138$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 15139
81ecdfbb
RW
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15141$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15142 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
15143 $as_echo_n "(cached) " >&6
d45fe813 15144else
81ecdfbb 15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15146/* end confdefs.h. */
97bf5e38
MK
15147
15148#define _SYSCALL32
d30c5336
JK
15149/* Needed for new procfs interface on sparc-solaris. */
15150#define _STRUCTURED_PROC 1
97bf5e38 15151#include <sys/procfs.h>
bec39cab
AC
15152int
15153main ()
15154{
97bf5e38 15155prfpregset_t avar
bec39cab
AC
15156 ;
15157 return 0;
15158}
15159_ACEOF
81ecdfbb 15160if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15161 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 15162else
81ecdfbb 15163 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 15164
d45fe813 15165fi
81ecdfbb 15166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15167fi
15168
97bf5e38 15169 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 15170
81ecdfbb 15171$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 15172
97bf5e38 15173 fi
81ecdfbb
RW
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15175$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 15176
81ecdfbb
RW
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15178$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15179 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
15180 $as_echo_n "(cached) " >&6
d45fe813 15181else
81ecdfbb 15182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15183/* end confdefs.h. */
97bf5e38
MK
15184
15185#define _SYSCALL32
d30c5336
JK
15186/* Needed for new procfs interface on sparc-solaris. */
15187#define _STRUCTURED_PROC 1
97bf5e38 15188#include <sys/procfs.h>
bec39cab
AC
15189int
15190main ()
15191{
97bf5e38 15192prgregset32_t avar
bec39cab
AC
15193 ;
15194 return 0;
15195}
15196_ACEOF
81ecdfbb 15197if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15198 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 15199else
81ecdfbb 15200 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 15201
d45fe813 15202fi
81ecdfbb 15203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15204fi
15205
97bf5e38 15206 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 15207
81ecdfbb 15208$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 15209
97bf5e38 15210 fi
81ecdfbb
RW
15211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15212$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 15213
81ecdfbb
RW
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
15215$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
15216 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
15217 $as_echo_n "(cached) " >&6
d45fe813 15218else
81ecdfbb 15219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15220/* end confdefs.h. */
97bf5e38
MK
15221
15222#define _SYSCALL32
d30c5336
JK
15223/* Needed for new procfs interface on sparc-solaris. */
15224#define _STRUCTURED_PROC 1
97bf5e38 15225#include <sys/procfs.h>
bec39cab
AC
15226int
15227main ()
15228{
97bf5e38 15229prfpregset32_t avar
bec39cab
AC
15230 ;
15231 return 0;
15232}
15233_ACEOF
81ecdfbb 15234if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15235 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 15236else
81ecdfbb 15237 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 15238
d45fe813 15239fi
81ecdfbb 15240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15241fi
15242
97bf5e38 15243 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 15244
81ecdfbb 15245$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 15246
97bf5e38 15247 fi
81ecdfbb
RW
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
15249$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 15250
81ecdfbb
RW
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15252$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15253 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
15254 $as_echo_n "(cached) " >&6
d45fe813 15255else
81ecdfbb 15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15257/* end confdefs.h. */
97bf5e38 15258
d45fe813 15259#define _SYSCALL32
d30c5336
JK
15260/* Needed for new procfs interface on sparc-solaris. */
15261#define _STRUCTURED_PROC 1
97bf5e38 15262#include <sys/procfs.h>
bec39cab
AC
15263int
15264main ()
15265{
97bf5e38 15266lwpid_t avar
bec39cab
AC
15267 ;
15268 return 0;
15269}
15270_ACEOF
81ecdfbb 15271if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15272 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 15273else
81ecdfbb 15274 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 15275
d45fe813 15276fi
81ecdfbb 15277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15278fi
15279
97bf5e38 15280 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 15281
81ecdfbb 15282$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 15283
97bf5e38 15284 fi
81ecdfbb
RW
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15286$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 15287
81ecdfbb
RW
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15289$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15290 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
15291 $as_echo_n "(cached) " >&6
c906108c 15292else
81ecdfbb 15293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15294/* end confdefs.h. */
c906108c 15295
97bf5e38 15296#define _SYSCALL32
d30c5336
JK
15297/* Needed for new procfs interface on sparc-solaris. */
15298#define _STRUCTURED_PROC 1
97bf5e38 15299#include <sys/procfs.h>
bec39cab
AC
15300int
15301main ()
15302{
97bf5e38 15303psaddr_t avar
bec39cab
AC
15304 ;
15305 return 0;
15306}
15307_ACEOF
81ecdfbb 15308if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15309 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15310else
81ecdfbb 15311 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 15312
c906108c 15313fi
81ecdfbb 15314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15315fi
15316
97bf5e38 15317 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 15318
81ecdfbb 15319$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 15320
97bf5e38 15321 fi
81ecdfbb
RW
15322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15323$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 15324
81ecdfbb
RW
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
15326$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
15327 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
15328 $as_echo_n "(cached) " >&6
c906108c 15329else
81ecdfbb 15330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15331/* end confdefs.h. */
c906108c 15332
97bf5e38 15333#define _SYSCALL32
d30c5336
JK
15334/* Needed for new procfs interface on sparc-solaris. */
15335#define _STRUCTURED_PROC 1
97bf5e38 15336#include <sys/procfs.h>
bec39cab
AC
15337int
15338main ()
15339{
97bf5e38 15340prsysent_t avar
bec39cab
AC
15341 ;
15342 return 0;
15343}
15344_ACEOF
81ecdfbb 15345if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15346 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 15347else
81ecdfbb 15348 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 15349
c906108c 15350fi
81ecdfbb 15351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15352fi
15353
97bf5e38 15354 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 15355
81ecdfbb 15356$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 15357
97bf5e38 15358 fi
81ecdfbb
RW
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
15360$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 15361
81ecdfbb
RW
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
15363$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
15364 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
15365 $as_echo_n "(cached) " >&6
c906108c 15366else
81ecdfbb 15367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15368/* end confdefs.h. */
c906108c 15369
97bf5e38 15370#define _SYSCALL32
d30c5336
JK
15371/* Needed for new procfs interface on sparc-solaris. */
15372#define _STRUCTURED_PROC 1
97bf5e38 15373#include <sys/procfs.h>
bec39cab
AC
15374int
15375main ()
15376{
97bf5e38 15377pr_sigset_t avar
bec39cab
AC
15378 ;
15379 return 0;
15380}
15381_ACEOF
81ecdfbb 15382if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15383 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 15384else
81ecdfbb 15385 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 15386
c906108c 15387fi
81ecdfbb 15388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15389fi
15390
97bf5e38 15391 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 15392
81ecdfbb 15393$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 15394
97bf5e38 15395 fi
81ecdfbb
RW
15396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
15397$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 15398
81ecdfbb
RW
15399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
15400$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
15401 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
15402 $as_echo_n "(cached) " >&6
c906108c 15403else
81ecdfbb 15404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15405/* end confdefs.h. */
c906108c 15406
97bf5e38 15407#define _SYSCALL32
d30c5336
JK
15408/* Needed for new procfs interface on sparc-solaris. */
15409#define _STRUCTURED_PROC 1
97bf5e38 15410#include <sys/procfs.h>
bec39cab
AC
15411int
15412main ()
15413{
97bf5e38 15414pr_sigaction64_t avar
bec39cab
AC
15415 ;
15416 return 0;
15417}
15418_ACEOF
81ecdfbb 15419if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15420 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 15421else
81ecdfbb 15422 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 15423
c906108c 15424fi
81ecdfbb 15425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15426fi
15427
97bf5e38 15428 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 15429
81ecdfbb 15430$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 15431
97bf5e38 15432 fi
81ecdfbb
RW
15433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
15434$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 15435
81ecdfbb
RW
15436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
15437$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
15438 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
15439 $as_echo_n "(cached) " >&6
97bf5e38 15440else
81ecdfbb 15441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15442/* end confdefs.h. */
97bf5e38
MK
15443
15444#define _SYSCALL32
d30c5336
JK
15445/* Needed for new procfs interface on sparc-solaris. */
15446#define _STRUCTURED_PROC 1
97bf5e38 15447#include <sys/procfs.h>
bec39cab
AC
15448int
15449main ()
15450{
97bf5e38 15451pr_siginfo64_t avar
bec39cab
AC
15452 ;
15453 return 0;
15454}
15455_ACEOF
81ecdfbb 15456if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15457 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
15458else
81ecdfbb 15459 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 15460
97bf5e38 15461fi
81ecdfbb 15462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15463fi
c906108c 15464
97bf5e38 15465 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 15466
81ecdfbb 15467$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 15468
97bf5e38 15469 fi
81ecdfbb
RW
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
15471$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
15472
15473
97bf5e38
MK
15474
15475
15476
97bf5e38 15477 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
15479$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
15480 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
15481 $as_echo_n "(cached) " >&6
c906108c 15482else
81ecdfbb 15483 if test "$cross_compiling" = yes; then :
97bf5e38 15484 gdb_cv_prfpregset_t_broken=yes
c906108c 15485else
81ecdfbb 15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15487/* end confdefs.h. */
97bf5e38
MK
15488#include <sys/procfs.h>
15489 int main ()
15490 {
15491 if (sizeof (prfpregset_t) == sizeof (void *))
15492 return 1;
15493 return 0;
15494 }
bec39cab 15495_ACEOF
81ecdfbb 15496if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15497 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
15498else
15499 gdb_cv_prfpregset_t_broken=yes
c906108c 15500fi
81ecdfbb
RW
15501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15502 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15503fi
81ecdfbb 15504
c906108c
SS
15505fi
15506
81ecdfbb
RW
15507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
15508$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 15509 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 15510
81ecdfbb 15511$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 15512
97bf5e38
MK
15513 fi
15514 fi
c906108c 15515
bec39cab 15516
81ecdfbb
RW
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
15518$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
15519 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
15520 $as_echo_n "(cached) " >&6
c906108c 15521else
81ecdfbb 15522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15523/* end confdefs.h. */
97bf5e38
MK
15524#include <unistd.h>
15525#include <sys/types.h>
15526#include <sys/procfs.h>
15527
bec39cab
AC
15528int
15529main ()
15530{
97bf5e38
MK
15531
15532 int dummy;;
15533 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
15534
15535 ;
15536 return 0;
15537}
15538_ACEOF
81ecdfbb 15539if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15540 gdb_cv_have_procfs_piocset=yes
c906108c 15541else
81ecdfbb 15542 gdb_cv_have_procfs_piocset=no
c906108c 15543fi
81ecdfbb 15544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15545fi
97bf5e38 15546
81ecdfbb
RW
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
15548$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 15549 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 15550
81ecdfbb 15551$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
15552
15553 fi
c906108c 15554fi
c906108c 15555
97bf5e38 15556if test ${host} = ${target} ; then
bec39cab 15557
81ecdfbb
RW
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
15559$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
15560 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
15561 $as_echo_n "(cached) " >&6
bec39cab 15562else
81ecdfbb 15563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15564/* end confdefs.h. */
97bf5e38 15565#include <link.h>
bec39cab
AC
15566int
15567main ()
15568{
97bf5e38 15569struct link_map lm; (void) lm.l_addr;
bec39cab
AC
15570 ;
15571 return 0;
15572}
15573_ACEOF
81ecdfbb 15574if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15575 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 15576else
81ecdfbb 15577 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 15578fi
81ecdfbb 15579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15580fi
15581
81ecdfbb
RW
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
15583$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 15584 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 15585
81ecdfbb 15586$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
15587
15588 fi
15589
bec39cab 15590
81ecdfbb
RW
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
15592$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
15593 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
15594 $as_echo_n "(cached) " >&6
c906108c 15595else
81ecdfbb 15596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15597/* end confdefs.h. */
97bf5e38
MK
15598#include <sys/types.h>
15599#include <link.h>
bec39cab
AC
15600int
15601main ()
15602{
97bf5e38 15603struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
15604 ;
15605 return 0;
15606}
15607_ACEOF
81ecdfbb 15608if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15609 gdb_cv_have_struct_link_map_with_lm_members=yes
15610else
81ecdfbb 15611 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 15612fi
81ecdfbb 15613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15614fi
c906108c 15615
81ecdfbb
RW
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
15617$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 15618 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 15619
81ecdfbb 15620$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
15621
15622 fi
15623
bec39cab 15624
81ecdfbb
RW
15625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
15626$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
15627 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
15628 $as_echo_n "(cached) " >&6
c906108c 15629else
81ecdfbb 15630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15631/* end confdefs.h. */
97bf5e38
MK
15632#include <sys/types.h>
15633#ifdef HAVE_NLIST_H
15634#include <nlist.h>
15635#endif
15636#include <link.h>
bec39cab
AC
15637int
15638main ()
15639{
97bf5e38 15640struct so_map lm; (void) lm.som_addr;
bec39cab
AC
15641 ;
15642 return 0;
15643}
15644_ACEOF
81ecdfbb 15645if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15646 gdb_cv_have_struct_so_map_with_som_members=yes
15647else
81ecdfbb 15648 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 15649fi
81ecdfbb 15650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15651fi
c906108c 15652
81ecdfbb
RW
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
15654$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 15655 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 15656
81ecdfbb 15657$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 15658
97bf5e38 15659 fi
c906108c 15660
bec39cab 15661
81ecdfbb
RW
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
15663$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
15664 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
15665 $as_echo_n "(cached) " >&6
97bf5e38 15666else
81ecdfbb 15667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15668/* end confdefs.h. */
97bf5e38
MK
15669#define _SYSCALL32
15670#include <sys/link.h>
bec39cab
AC
15671int
15672main ()
15673{
97bf5e38 15674struct link_map32 l;
bec39cab
AC
15675 ;
15676 return 0;
15677}
15678_ACEOF
81ecdfbb 15679if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15680 gdb_cv_have_struct_link_map32=yes
15681else
81ecdfbb 15682 gdb_cv_have_struct_link_map32=no
97bf5e38 15683fi
81ecdfbb 15684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15685fi
c906108c 15686
81ecdfbb
RW
15687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
15688$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 15689 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 15690
81ecdfbb 15691$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 15692
60ca704f 15693
81ecdfbb 15694$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 15695
97bf5e38
MK
15696 fi
15697fi
c906108c 15698
bc8bcb4b 15699# Check if the compiler supports the `long long' type.
c906108c 15700
81ecdfbb
RW
15701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15702$as_echo_n "checking for long long support in compiler... " >&6; }
15703if test "${gdb_cv_c_long_long+set}" = set; then :
15704 $as_echo_n "(cached) " >&6
97bf5e38 15705else
81ecdfbb 15706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15707/* end confdefs.h. */
bc8bcb4b 15708extern long long foo;
bec39cab
AC
15709int
15710main ()
15711{
bc8bcb4b 15712switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15713 ;
15714 return 0;
15715}
15716_ACEOF
81ecdfbb 15717if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15718 gdb_cv_c_long_long=yes
15719else
81ecdfbb 15720 gdb_cv_c_long_long=no
97bf5e38 15721fi
81ecdfbb 15722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15723fi
81ecdfbb
RW
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15725$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 15726if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 15727
81ecdfbb 15728$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15729
15730fi
15731
bc8bcb4b 15732# Check if the compiler and runtime support printing long longs.
97bf5e38 15733
81ecdfbb
RW
15734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15735$as_echo_n "checking for long long support in printf... " >&6; }
15736if test "${gdb_cv_printf_has_long_long+set}" = set; then :
15737 $as_echo_n "(cached) " >&6
97bf5e38 15738else
81ecdfbb 15739 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15740 gdb_cv_printf_has_long_long=no
15741else
81ecdfbb 15742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15743/* end confdefs.h. */
bc8bcb4b
MK
15744$ac_includes_default
15745int
15746main ()
15747{
15748char buf[32];
97bf5e38
MK
15749 long long l = 0;
15750 l = (l << 16) + 0x0123;
15751 l = (l << 16) + 0x4567;
15752 l = (l << 16) + 0x89ab;
15753 l = (l << 16) + 0xcdef;
15754 sprintf (buf, "0x%016llx", l);
15755 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15756 ;
15757 return 0;
c906108c 15758}
bec39cab 15759_ACEOF
81ecdfbb 15760if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15761 gdb_cv_printf_has_long_long=yes
15762else
81ecdfbb 15763 gdb_cv_printf_has_long_long=no
97bf5e38 15764fi
81ecdfbb
RW
15765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15766 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15767fi
81ecdfbb 15768
97bf5e38 15769fi
81ecdfbb
RW
15770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15771$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 15772if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 15773
81ecdfbb 15774$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15775
15776fi
97bf5e38 15777
1a619819
LM
15778# Check if the compiler and runtime support printing decfloats.
15779
81ecdfbb
RW
15780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15781$as_echo_n "checking for decfloat support in printf... " >&6; }
15782if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
15783 $as_echo_n "(cached) " >&6
1a619819 15784else
81ecdfbb 15785 if test "$cross_compiling" = yes; then :
1a619819
LM
15786 gdb_cv_printf_has_decfloat=no
15787else
81ecdfbb 15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15789/* end confdefs.h. */
15790$ac_includes_default
15791int
15792main ()
15793{
15794char buf[64];
15795 _Decimal32 d32 = 1.2345df;
15796 _Decimal64 d64 = 1.2345dd;
15797 _Decimal128 d128 = 1.2345dl;
15798 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15799 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15800 ;
15801 return 0;
15802}
15803_ACEOF
81ecdfbb 15804if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15805 gdb_cv_printf_has_decfloat=yes
15806else
81ecdfbb 15807 gdb_cv_printf_has_decfloat=no
1a619819 15808fi
81ecdfbb
RW
15809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15810 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15811fi
81ecdfbb 15812
1a619819 15813fi
81ecdfbb
RW
15814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15815$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
15816if test $gdb_cv_printf_has_decfloat = yes; then
15817
81ecdfbb 15818$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15819
15820fi
15821
bc8bcb4b
MK
15822# Check if the compiler supports the `long double' type. We can't use
15823# AC_C_LONG_DOUBLE because that one does additional checks on the
15824# constants defined in <float.h> that fail on some systems,
15825# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15826
81ecdfbb
RW
15827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15828$as_echo_n "checking for long double support in compiler... " >&6; }
15829if test "${gdb_cv_c_long_double+set}" = set; then :
15830 $as_echo_n "(cached) " >&6
97bf5e38 15831else
81ecdfbb 15832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15833/* end confdefs.h. */
97bf5e38 15834long double foo;
bec39cab 15835_ACEOF
81ecdfbb 15836if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15837 gdb_cv_c_long_double=yes
97bf5e38 15838else
81ecdfbb 15839 gdb_cv_c_long_double=no
97bf5e38 15840fi
81ecdfbb 15841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15842fi
81ecdfbb
RW
15843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15844$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 15845if test $gdb_cv_c_long_double = yes; then
c906108c 15846
81ecdfbb 15847$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15848
15849fi
15850
bc8bcb4b 15851# Check if the compiler and runtime support printing long doubles.
97bf5e38 15852
81ecdfbb
RW
15853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15854$as_echo_n "checking for long double support in printf... " >&6; }
15855if test "${gdb_cv_printf_has_long_double+set}" = set; then :
15856 $as_echo_n "(cached) " >&6
97bf5e38 15857else
81ecdfbb 15858 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15859 gdb_cv_printf_has_long_double=no
15860else
81ecdfbb 15861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15862/* end confdefs.h. */
bc8bcb4b
MK
15863$ac_includes_default
15864int
15865main ()
15866{
15867char buf[16];
97bf5e38
MK
15868 long double f = 3.141592653;
15869 sprintf (buf, "%Lg", f);
15870 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15871 ;
15872 return 0;
97bf5e38 15873}
bec39cab 15874_ACEOF
81ecdfbb 15875if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15876 gdb_cv_printf_has_long_double=yes
c906108c 15877else
81ecdfbb 15878 gdb_cv_printf_has_long_double=no
c906108c 15879fi
81ecdfbb
RW
15880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15881 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15882fi
81ecdfbb 15883
c906108c 15884fi
81ecdfbb
RW
15885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15886$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 15887if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 15888
81ecdfbb 15889$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15890
15891fi
97bf5e38 15892
bc8bcb4b 15893# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15894
81ecdfbb
RW
15895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15896$as_echo_n "checking for long double support in scanf... " >&6; }
15897if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
15898 $as_echo_n "(cached) " >&6
97bf5e38 15899else
81ecdfbb 15900 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15901 gdb_cv_scanf_has_long_double=no
15902else
81ecdfbb 15903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15904/* end confdefs.h. */
bc8bcb4b
MK
15905#include <stdio.h>
15906int
15907main ()
15908{
15909char *buf = "3.141592653";
97bf5e38
MK
15910 long double f = 0;
15911 sscanf (buf, "%Lg", &f);
15912 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15913 ;
15914 return 0;
97bf5e38 15915}
bec39cab 15916_ACEOF
81ecdfbb 15917if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15918 gdb_cv_scanf_has_long_double=yes
15919else
81ecdfbb 15920 gdb_cv_scanf_has_long_double=no
97bf5e38 15921fi
81ecdfbb
RW
15922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15923 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15924fi
81ecdfbb 15925
c906108c 15926fi
81ecdfbb
RW
15927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15928$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 15929if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 15930
81ecdfbb 15931$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15932
15933fi
c906108c 15934
438013df
AO
15935case ${host_os} in
15936aix*)
81ecdfbb
RW
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15938$as_echo_n "checking for -bbigtoc option... " >&6; }
15939if test "${gdb_cv_bigtoc+set}" = set; then :
15940 $as_echo_n "(cached) " >&6
438013df 15941else
bec39cab 15942
438013df
AO
15943 SAVE_LDFLAGS=$LDFLAGS
15944
15945 case $GCC in
15946 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15947 *) gdb_cv_bigtoc=-bbigtoc ;;
15948 esac
15949
15950 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15952/* end confdefs.h. */
438013df 15953
bec39cab
AC
15954int
15955main ()
15956{
438013df 15957int i;
bec39cab
AC
15958 ;
15959 return 0;
15960}
15961_ACEOF
81ecdfbb 15962if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15963
81ecdfbb
RW
15964else
15965 gdb_cv_bigtoc=
438013df 15966fi
81ecdfbb
RW
15967rm -f core conftest.err conftest.$ac_objext \
15968 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15969 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15970
bec39cab 15971fi
81ecdfbb
RW
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15973$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15974 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15975 ;;
15976esac
15977
38f6b338 15978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15979$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15980dynamic_list=false
15981if test "${gdb_native}" = yes; then
15982 # The dynamically loaded libthread_db needs access to symbols in the gdb
15983 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15984 # may not be supported there.
15985 old_LDFLAGS="$LDFLAGS"
15986 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15987 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15988 LDFLAGS="$LDFLAGS $RDYNAMIC"
15989 if test "${have_libpython}" = no; then
15990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15991/* end confdefs.h. */
15992
15993int
15994main ()
15995{
15996
15997 ;
15998 return 0;
15999}
16000_ACEOF
16001if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16002 dynamic_list=true
16003fi
16004rm -f core conftest.err conftest.$ac_objext \
16005 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16006 else
16007 # Workaround http://bugs.python.org/issue4434 where static
16008 # libpythonX.Y.a would get its symbols required for
16009 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16010 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16011 old_CFLAGS="$CFLAGS"
16012 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16013 if test "$cross_compiling" = yes; then :
3bebe2f2 16014 true
f6528abd 16015else
3bebe2f2
JK
16016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16017/* end confdefs.h. */
16018#include "${have_libpython}/Python.h"
16019int
16020main ()
16021{
16022int err;
38f6b338
JK
16023 Py_Initialize ();
16024 err = PyRun_SimpleString ("import itertools\n");
16025 Py_Finalize ();
16026 return err == 0 ? 0 : 1;
3bebe2f2
JK
16027 ;
16028 return 0;
16029}
16030_ACEOF
16031if ac_fn_c_try_run "$LINENO"; then :
16032 dynamic_list=true
16033fi
16034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16035 conftest.$ac_objext conftest.beam conftest.$ac_ext
16036fi
16037
38f6b338
JK
16038 CFLAGS="$old_CFLAGS"
16039 fi
16040 LDFLAGS="$old_LDFLAGS"
16041fi
16042if $dynamic_list; then
16043 found="-Wl,--dynamic-list"
16044 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16045else
38f6b338
JK
16046 found="-rdynamic"
16047 RDYNAMIC="-rdynamic"
f6528abd 16048fi
f6528abd 16049
38f6b338 16050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16051$as_echo "$found" >&6; }
0407b3f1 16052
f6528abd 16053
0407b3f1 16054if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 16055 case ${host_os} in
c906108c 16056 solaris*)
d92419e5
JB
16057 # See if thread_db library is around for Solaris thread debugging.
16058 # Note that we must explicitly test for version 1 of the library
16059 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
16060 # the same API.
81ecdfbb
RW
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
16062$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 16063 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16065$as_echo "yes" >&6; }
60ca704f 16066
81ecdfbb 16067$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 16068
3483b318 16069 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 16070 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16072$as_echo_n "checking for dlopen in -ldl... " >&6; }
16073if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16074 $as_echo_n "(cached) " >&6
c906108c 16075else
bec39cab 16076 ac_check_lib_save_LIBS=$LIBS
c906108c 16077LIBS="-ldl $LIBS"
81ecdfbb 16078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
16079/* end confdefs.h. */
16080
81ecdfbb
RW
16081/* Override any GCC internal prototype to avoid an error.
16082 Use char because int might match the return type of a GCC
16083 builtin and then its argument prototype would still apply. */
bec39cab
AC
16084#ifdef __cplusplus
16085extern "C"
16086#endif
bec39cab
AC
16087char dlopen ();
16088int
16089main ()
16090{
81ecdfbb 16091return dlopen ();
bec39cab
AC
16092 ;
16093 return 0;
16094}
16095_ACEOF
81ecdfbb 16096if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
16097 ac_cv_lib_dl_dlopen=yes
16098else
81ecdfbb 16099 ac_cv_lib_dl_dlopen=no
bec39cab 16100fi
81ecdfbb
RW
16101rm -f core conftest.err conftest.$ac_objext \
16102 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
16103LIBS=$ac_check_lib_save_LIBS
16104fi
81ecdfbb
RW
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16106$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16107if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
16108 cat >>confdefs.h <<_ACEOF
16109#define HAVE_LIBDL 1
16110_ACEOF
c906108c
SS
16111
16112 LIBS="-ldl $LIBS"
16113
c906108c
SS
16114fi
16115
f6528abd 16116 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
16117 # Sun randomly tweaked the prototypes in <proc_service.h>
16118 # at one point.
81ecdfbb
RW
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
16120$as_echo_n "checking if <proc_service.h> is old... " >&6; }
16121 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
16122 $as_echo_n "(cached) " >&6
c906108c 16123else
bec39cab 16124
81ecdfbb 16125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16126/* end confdefs.h. */
c906108c
SS
16127
16128 #include <proc_service.h>
16129 ps_err_e ps_pdwrite
16130 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 16131
bec39cab
AC
16132int
16133main ()
16134{
16135
16136 ;
16137 return 0;
16138}
16139_ACEOF
81ecdfbb 16140if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
16141 gdb_cv_proc_service_is_old=no
16142else
81ecdfbb 16143 gdb_cv_proc_service_is_old=yes
c906108c 16144fi
81ecdfbb 16145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 16146
c906108c
SS
16147fi
16148
81ecdfbb
RW
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
16150$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 16151 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 16152
81ecdfbb 16153$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
16154
16155 fi
16156 else
81ecdfbb
RW
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16158$as_echo "no" >&6; }
c906108c
SS
16159 fi
16160 ;;
d92419e5 16161 aix*)
81ecdfbb
RW
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16163$as_echo_n "checking for AiX thread debugging library... " >&6; }
16164 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
16165 $as_echo_n "(cached) " >&6
bec39cab 16166else
81ecdfbb 16167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16168/* end confdefs.h. */
d92419e5 16169#include <sys/pthdebug.h>
bec39cab
AC
16170int
16171main ()
16172{
d92419e5
JB
16173#ifndef PTHDB_VERSION_3
16174 #error
16175 #endif
bec39cab
AC
16176 ;
16177 return 0;
16178}
16179_ACEOF
81ecdfbb 16180if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16181 gdb_cv_have_aix_thread_debug=yes
16182else
81ecdfbb 16183 gdb_cv_have_aix_thread_debug=no
d92419e5 16184fi
81ecdfbb 16185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
16186fi
16187
81ecdfbb
RW
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16189$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
16190 if test $gdb_cv_have_aix_thread_debug = yes; then
16191 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16192 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 16193 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
16194
16195 # Older versions of AIX do not provide the declaration for
16196 # the getthrds function (it appears that it was introduced
16197 # with AIX 6.x).
16198 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16199"
16200if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
16201 ac_have_decl=1
16202else
16203 ac_have_decl=0
16204fi
16205
16206cat >>confdefs.h <<_ACEOF
16207#define HAVE_DECL_GETTHRDS $ac_have_decl
16208_ACEOF
16209
d92419e5
JB
16210 fi
16211 ;;
c906108c 16212 esac
bec39cab 16213
c906108c
SS
16214fi
16215
3f47be5c 16216if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16218$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16219if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
16220 $as_echo_n "(cached) " >&6
bec39cab 16221else
81ecdfbb 16222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16223/* end confdefs.h. */
3f47be5c 16224#include <thread_db.h>
bec39cab
AC
16225int
16226main ()
16227{
3f47be5c 16228int i = TD_NOTALLOC;
bec39cab
AC
16229 ;
16230 return 0;
16231}
16232_ACEOF
81ecdfbb 16233if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16234 gdb_cv_thread_db_h_has_td_notalloc=yes
16235else
81ecdfbb 16236 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16237
3f47be5c 16238fi
81ecdfbb 16239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16240
bec39cab 16241fi
81ecdfbb
RW
16242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16243$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16245$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16246if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
16247 $as_echo_n "(cached) " >&6
59f80f10 16248else
81ecdfbb 16249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16250/* end confdefs.h. */
16251#include <thread_db.h>
16252int
16253main ()
16254{
16255int i = TD_VERSION;
16256 ;
16257 return 0;
16258}
16259_ACEOF
81ecdfbb 16260if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16261 gdb_cv_thread_db_h_has_td_version=yes
16262else
81ecdfbb 16263 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16264
16265fi
81ecdfbb 16266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16267
16268fi
81ecdfbb
RW
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16270$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16272$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16273if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
16274 $as_echo_n "(cached) " >&6
59f80f10 16275else
81ecdfbb 16276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16277/* end confdefs.h. */
16278#include <thread_db.h>
16279int
16280main ()
16281{
16282int i = TD_NOTLS;
16283 ;
16284 return 0;
16285}
16286_ACEOF
81ecdfbb 16287if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16288 gdb_cv_thread_db_h_has_td_notls=yes
16289else
81ecdfbb 16290 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16291
16292fi
81ecdfbb 16293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16294
16295fi
81ecdfbb
RW
16296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16297$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16298fi
16299if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16300
81ecdfbb 16301$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16302
59f80f10
DJ
16303fi
16304if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16305
81ecdfbb 16306$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16307
16308fi
16309if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16310
81ecdfbb 16311$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16312
3f47be5c
EZ
16313fi
16314
b757528f 16315if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
16317$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
16318if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
16319 $as_echo_n "(cached) " >&6
bec39cab 16320else
81ecdfbb 16321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16322/* end confdefs.h. */
b757528f 16323#include <sys/syscall.h>
bec39cab
AC
16324int
16325main ()
16326{
b757528f 16327int i = __NR_tkill;
bec39cab
AC
16328 ;
16329 return 0;
16330}
16331_ACEOF
81ecdfbb 16332if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
16333 gdb_cv_sys_syscall_h_has_tkill=yes
16334else
81ecdfbb 16335 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 16336
b757528f 16337fi
81ecdfbb 16338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 16339
bec39cab 16340fi
81ecdfbb
RW
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
16342$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
16343fi
16344if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 16345
81ecdfbb 16346$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
16347
16348fi
16349
81ecdfbb
RW
16350ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
16351"
16352if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
16353 ac_have_decl=1
10568435 16354else
81ecdfbb 16355 ac_have_decl=0
10568435 16356fi
10568435
JK
16357
16358cat >>confdefs.h <<_ACEOF
81ecdfbb 16359#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
16360_ACEOF
16361
16362
81ecdfbb
RW
16363if test "$cross_compiling" = yes; then :
16364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
16365/* end confdefs.h. */
16366#include <sys/personality.h>
16367int
16368main ()
16369{
16370
16371# if !HAVE_DECL_ADDR_NO_RANDOMIZE
16372# define ADDR_NO_RANDOMIZE 0x0040000
16373# endif
16374 /* Test the flag could be set and stays set. */
16375 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
16376 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
16377 return 1
16378 ;
16379 return 0;
16380}
16381_ACEOF
81ecdfbb 16382if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
16383 have_personality=true
16384else
81ecdfbb 16385 have_personality=false
10568435 16386fi
81ecdfbb
RW
16387rm -f core conftest.err conftest.$ac_objext \
16388 conftest$ac_exeext conftest.$ac_ext
10568435 16389else
81ecdfbb 16390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
16391/* end confdefs.h. */
16392#include <sys/personality.h>
16393int
16394main ()
16395{
16396
16397# if !HAVE_DECL_ADDR_NO_RANDOMIZE
16398# define ADDR_NO_RANDOMIZE 0x0040000
16399# endif
16400 /* Test the flag could be set and stays set. */
16401 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
16402 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
16403 return 1
16404 ;
16405 return 0;
16406}
16407_ACEOF
81ecdfbb 16408if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
16409 have_personality=true
16410else
81ecdfbb 16411 have_personality=false
10568435 16412fi
81ecdfbb
RW
16413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16414 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 16415fi
81ecdfbb 16416
10568435
JK
16417if $have_personality
16418then
16419
81ecdfbb 16420$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
16421
16422fi
16423
fb40c209 16424
f83d8a90
DE
16425# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16426# except that the argument to --with-sysroot is optional.
16427# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16428if test "x$with_sysroot" = xyes; then
16429 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16430fi
bec39cab 16431
81ecdfbb
RW
16432# Check whether --with-sysroot was given.
16433if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16434 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16435else
16436 TARGET_SYSTEM_ROOT=
16437fi
030292b7 16438
030292b7 16439
f83d8a90
DE
16440 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16441 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16442 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16443 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16444
f83d8a90
DE
16445cat >>confdefs.h <<_ACEOF
16446#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16447_ACEOF
bec39cab 16448
030292b7 16449
b14b1491 16450
f83d8a90
DE
16451
16452 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16453 if test "x$prefix" = xNONE; then
16454 test_prefix=/usr/local
16455 else
16456 test_prefix=$prefix
16457 fi
16458 else
16459 test_prefix=$exec_prefix
16460 fi
16461 value=0
16462 case ${ac_define_dir} in
16463 "${test_prefix}"|"${test_prefix}/"*|\
16464 '${exec_prefix}'|'${exec_prefix}/'*)
16465 value=1
16466 ;;
16467 esac
16468
16469cat >>confdefs.h <<_ACEOF
16470#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16471_ACEOF
030292b7
DJ
16472
16473
16474
16e7150e 16475
16e7150e 16476
81ecdfbb
RW
16477# Check whether --with-system-gdbinit was given.
16478if test "${with_system_gdbinit+set}" = set; then :
16479 withval=$with_system_gdbinit;
b14b1491
TT
16480 SYSTEM_GDBINIT=$withval
16481else
16482 SYSTEM_GDBINIT=
81ecdfbb
RW
16483fi
16484
16e7150e
JG
16485
16486 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16487 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16488 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16489 ac_define_dir=`eval echo $ac_define_dir`
16490
16491cat >>confdefs.h <<_ACEOF
16492#define SYSTEM_GDBINIT "$ac_define_dir"
16493_ACEOF
16494
16495
16496
0c4a4063 16497
b14b1491
TT
16498 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16499 if test "x$prefix" = xNONE; then
16500 test_prefix=/usr/local
16501 else
16502 test_prefix=$prefix
16503 fi
16504 else
16505 test_prefix=$exec_prefix
16506 fi
16507 value=0
16508 case ${ac_define_dir} in
16509 "${test_prefix}"|"${test_prefix}/"*|\
16510 '${exec_prefix}'|'${exec_prefix}/'*)
16511 value=1
16512 ;;
16513 esac
16e7150e 16514
b14b1491
TT
16515cat >>confdefs.h <<_ACEOF
16516#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16517_ACEOF
16518
b14b1491 16519
16e7150e 16520
0c4a4063 16521
81ecdfbb
RW
16522# Check whether --enable-werror was given.
16523if test "${enable_werror+set}" = set; then :
16524 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16525 yes | y) ERROR_ON_WARNING="yes" ;;
16526 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 16527 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16528 esac
81ecdfbb
RW
16529fi
16530
094a342e
MK
16531
16532# Enable -Werror by default when using gcc
16533if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
16534 ERROR_ON_WARNING=yes
16535fi
16536
16537WERROR_CFLAGS=""
16538if test "${ERROR_ON_WARNING}" = yes ; then
16539 WERROR_CFLAGS="-Werror"
16540fi
16541
aa79a185
DJ
16542# The entries after -Wno-pointer-sign are disabled warnings which may
16543# be enabled in the future, which can not currently be used to build
16544# GDB.
16545# NOTE: If you change this list, remember to update
3b851bce 16546# gdb/doc/gdbint.texinfo.
aa79a185
DJ
16547build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
16548-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 16549-Wno-unused -Wunused-value -Wunused-function \
b03a2011 16550-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 16551
3526781e
DJ
16552# Enable -Wno-format by default when using gcc on mingw since many
16553# GCC versions complain about %I64.
16554case "${host}" in
16555 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
16556esac
16557
81ecdfbb
RW
16558# Check whether --enable-build-warnings was given.
16559if test "${enable_build_warnings+set}" = set; then :
16560 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16561 yes) ;;
16562 no) build_warnings="-w";;
16563 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16564 build_warnings="${build_warnings} ${t}";;
16565 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16566 build_warnings="${t} ${build_warnings}";;
16567 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16568esac
d4f3574e 16569if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16570 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16571fi
81ecdfbb
RW
16572fi
16573# Check whether --enable-gdb-build-warnings was given.
16574if test "${enable_gdb_build_warnings+set}" = set; then :
16575 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16576 yes) ;;
16577 no) build_warnings="-w";;
16578 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16579 build_warnings="${build_warnings} ${t}";;
16580 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16581 build_warnings="${t} ${build_warnings}";;
16582 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16583esac
16584if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16585 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16586fi
81ecdfbb
RW
16587fi
16588WARN_CFLAGS=""
c906108c
SS
16589if test "x${build_warnings}" != x -a "x$GCC" = xyes
16590then
81ecdfbb
RW
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16592$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16593 # Separate out the -Werror flag as some files just cannot be
16594 # compiled with it enabled.
16595 for w in ${build_warnings}; do
16596 case $w in
16597 -Werr*) WERROR_CFLAGS=-Werror ;;
16598 *) # Check that GCC accepts it
4536bbc6
AC
16599 saved_CFLAGS="$CFLAGS"
16600 CFLAGS="$CFLAGS $w"
81ecdfbb 16601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16602/* end confdefs.h. */
4536bbc6 16603
bec39cab
AC
16604int
16605main ()
16606{
4536bbc6 16607
bec39cab
AC
16608 ;
16609 return 0;
16610}
16611_ACEOF
81ecdfbb 16612if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 16613 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16614fi
81ecdfbb 16615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 16616 CFLAGS="$saved_CFLAGS"
746a987d
AC
16617 esac
16618 done
81ecdfbb
RW
16619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16620$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16621fi
16622
16623
104c1213 16624
7a292a7a 16625# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16627$as_echo_n "checking for cygwin... " >&6; }
16628if test "${gdb_cv_os_cygwin+set}" = set; then :
16629 $as_echo_n "(cached) " >&6
bec39cab 16630else
81ecdfbb 16631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16632/* end confdefs.h. */
7a292a7a
SS
16633
16634#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16635lose
16636#endif
bec39cab 16637_ACEOF
7a292a7a 16638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 16639 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
16640 gdb_cv_os_cygwin=yes
16641else
7a292a7a
SS
16642 gdb_cv_os_cygwin=no
16643fi
16644rm -f conftest*
16645
16646fi
81ecdfbb
RW
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16648$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16649
aff38e61 16650
3eb25fda 16651SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16652case ${host} in
95cbc983
AC
16653 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16654 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16655 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
16656esac
16657
16658
cd0fc7c3
SS
16659# libreadline needs libuser32.a in a cygwin environment
16660WIN32LIBS=
16661if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
16662 WIN32LIBS="-luser32"
16663 case "${target}" in
16664 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16665 ;;
16666 esac
cd0fc7c3 16667fi
c906108c 16668
b4505029
MM
16669# The ser-tcp.c module requires sockets.
16670case ${host} in
16671 *mingw32*)
16672
81ecdfbb 16673$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
16674
16675 WIN32LIBS="$WIN32LIBS -lws2_32"
16676 ;;
16677esac
16678
7a292a7a 16679
31d99776
DJ
16680# Add ELF support to GDB, but only if BFD includes ELF support.
16681OLD_CFLAGS=$CFLAGS
16682OLD_LDFLAGS=$LDFLAGS
16683OLD_LIBS=$LIBS
12cd34f3
PA
16684# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16685# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16686# always want our bfd.
16687CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 16688LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 16689intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
16690# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16691if test "$plugins" = "yes"; then
16692 LIBS="-ldl $LIBS"
16693fi
0f72fb1c 16694LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16696$as_echo_n "checking for ELF support in BFD... " >&6; }
16697if test "${gdb_cv_var_elf+set}" = set; then :
16698 $as_echo_n "(cached) " >&6
31d99776 16699else
81ecdfbb 16700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16701/* end confdefs.h. */
16702#include <stdlib.h>
16703#include "bfd.h"
16704#include "elf-bfd.h"
16705
16706int
16707main ()
16708{
16709bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
16710 ;
16711 return 0;
16712}
16713_ACEOF
81ecdfbb 16714if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16715 gdb_cv_var_elf=yes
16716else
81ecdfbb 16717 gdb_cv_var_elf=no
31d99776 16718fi
81ecdfbb
RW
16719rm -f core conftest.err conftest.$ac_objext \
16720 conftest$ac_exeext conftest.$ac_ext
31d99776 16721fi
81ecdfbb
RW
16722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16723$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
16724if test $gdb_cv_var_elf = yes; then
16725 CONFIG_OBS="$CONFIG_OBS elfread.o"
16726
81ecdfbb 16727$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16728
075ff26d
JK
16729 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16730 if test "$plugins" = "yes"; then
16731 OLD_LIBS="-ldl $OLD_LIBS"
16732 fi
31d99776
DJ
16733fi
16734CFLAGS=$OLD_CFLAGS
16735LDFLAGS=$OLD_LDFLAGS
16736LIBS=$OLD_LIBS
16737
121ce6e5
DJ
16738# Add any host-specific objects to GDB.
16739CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16740
3fc11d3e
JM
16741LIBGUI="../libgui/src/libgui.a"
16742GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16743
16744
7a292a7a 16745
3fc11d3e
JM
16746WIN32LDAPP=
16747
16748
16749
d91670b9 16750case "${host}" in
686a5eed 16751*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16752 configdir="win"
16753 ;;
16754*)
16755 configdir="unix"
16756 ;;
16757esac
3fc11d3e
JM
16758
16759GDBTKLIBS=
16760if test "${enable_gdbtk}" = "yes"; then
16761
d1c3b63a
KS
16762 # Gdbtk must have an absolute path to srcdir in order to run
16763 # properly when not installed.
16764 here=`pwd`
16765 cd ${srcdir}
16766 GDBTK_SRC_DIR=`pwd`
16767 cd $here
16768
bec39cab 16769
5062cc19
KS
16770 #
16771 # Ok, lets find the tcl configuration
16772 # First, look for one uninstalled.
16773 # the alternative search directory is invoked by --with-tcl
16774 #
3fc11d3e 16775
5062cc19
KS
16776 if test x"${no_tcl}" = x ; then
16777 # we reset no_tcl in case something fails here
16778 no_tcl=true
bec39cab 16779
81ecdfbb
RW
16780# Check whether --with-tcl was given.
16781if test "${with_tcl+set}" = set; then :
16782 withval=$with_tcl; with_tclconfig=${withval}
16783fi
16784
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16786$as_echo_n "checking for Tcl configuration... " >&6; }
16787 if test "${ac_cv_c_tclconfig+set}" = set; then :
16788 $as_echo_n "(cached) " >&6
3fc11d3e 16789else
bec39cab 16790
3fc11d3e 16791
5062cc19
KS
16792 # First check to see if --with-tcl was specified.
16793 case "${host}" in
16794 *-*-cygwin*) platDir="win" ;;
16795 *) platDir="unix" ;;
16796 esac
16797 if test x"${with_tclconfig}" != x ; then
16798 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16799 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16800 else
81ecdfbb 16801 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16802 fi
16803 fi
16804
16805 # then check for a private Tcl installation
16806 if test x"${ac_cv_c_tclconfig}" = x ; then
16807 for i in \
16808 ../tcl \
16809 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16810 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16811 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16812 ../../tcl \
16813 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16814 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16815 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16816 ../../../tcl \
16817 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16818 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16819 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16820 if test -f "$i/$platDir/tclConfig.sh" ; then
16821 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16822 break
16823 fi
16824 done
16825 fi
16826
16827 # on Darwin, check in Framework installation locations
16828 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16829 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16830 `ls -d /Library/Frameworks 2>/dev/null` \
16831 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16832 `ls -d /System/Library/Frameworks 2>/dev/null` \
16833 ; do
16834 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16835 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16836 break
16837 fi
16838 done
16839 fi
16840
16841 # check in a few common install locations
16842 if test x"${ac_cv_c_tclconfig}" = x ; then
16843 for i in `ls -d ${libdir} 2>/dev/null` \
16844 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16845 `ls -d ${prefix}/lib 2>/dev/null` \
16846 `ls -d /usr/local/lib 2>/dev/null` \
16847 `ls -d /usr/contrib/lib 2>/dev/null` \
16848 `ls -d /usr/lib 2>/dev/null` \
16849 ; do
16850 if test -f "$i/tclConfig.sh" ; then
16851 ac_cv_c_tclconfig=`(cd $i; pwd)`
16852 break
16853 fi
16854 done
16855 fi
3fc11d3e 16856
5062cc19
KS
16857 # check in a few other private locations
16858 if test x"${ac_cv_c_tclconfig}" = x ; then
16859 for i in \
16860 ${srcdir}/../tcl \
16861 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16862 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16863 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16864 if test -f "$i/$platDir/tclConfig.sh" ; then
16865 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16866 break
16867 fi
16868 done
16869 fi
bec39cab 16870
3fc11d3e
JM
16871fi
16872
5062cc19
KS
16873
16874 if test x"${ac_cv_c_tclconfig}" = x ; then
16875 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16877$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16878 else
16879 no_tcl=
16880 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16882$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16883 fi
16884 fi
3fc11d3e 16885
bec39cab 16886
85541719
DE
16887 # If $no_tk is nonempty, then we can't do Tk, and there is no
16888 # point to doing Tcl.
bec39cab 16889
5062cc19
KS
16890 #
16891 # Ok, lets find the tk configuration
16892 # First, look for one uninstalled.
16893 # the alternative search directory is invoked by --with-tk
16894 #
3fc11d3e 16895
5062cc19
KS
16896 if test x"${no_tk}" = x ; then
16897 # we reset no_tk in case something fails here
16898 no_tk=true
bec39cab 16899
81ecdfbb
RW
16900# Check whether --with-tk was given.
16901if test "${with_tk+set}" = set; then :
16902 withval=$with_tk; with_tkconfig=${withval}
16903fi
16904
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16906$as_echo_n "checking for Tk configuration... " >&6; }
16907 if test "${ac_cv_c_tkconfig+set}" = set; then :
16908 $as_echo_n "(cached) " >&6
bec39cab 16909else
3fc11d3e
JM
16910
16911
5062cc19
KS
16912 # First check to see if --with-tkconfig was specified.
16913 if test x"${with_tkconfig}" != x ; then
16914 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16915 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16916 else
81ecdfbb 16917 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16918 fi
16919 fi
3fc11d3e 16920
5062cc19
KS
16921 # then check for a private Tk library
16922 case "${host}" in
16923 *-*-cygwin*) platDir="win" ;;
16924 *) platDir="unix" ;;
16925 esac
16926 if test x"${ac_cv_c_tkconfig}" = x ; then
16927 for i in \
16928 ../tk \
16929 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16930 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16931 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16932 ../../tk \
16933 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16934 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16935 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16936 ../../../tk \
16937 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16938 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16939 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16940 if test -f "$i/$platDir/tkConfig.sh" ; then
16941 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16942 break
16943 fi
16944 done
16945 fi
16946
16947 # on Darwin, check in Framework installation locations
16948 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16949 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16950 `ls -d /Library/Frameworks 2>/dev/null` \
16951 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16952 `ls -d /System/Library/Frameworks 2>/dev/null` \
16953 ; do
16954 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16955 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16956 break
16957 fi
16958 done
16959 fi
16960
16961 # check in a few common install locations
16962 if test x"${ac_cv_c_tkconfig}" = x ; then
16963 for i in `ls -d ${libdir} 2>/dev/null` \
16964 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16965 `ls -d ${prefix}/lib 2>/dev/null` \
16966 `ls -d /usr/local/lib 2>/dev/null` \
16967 `ls -d /usr/contrib/lib 2>/dev/null` \
16968 `ls -d /usr/lib 2>/dev/null` \
16969 ; do
16970 if test -f "$i/tkConfig.sh" ; then
16971 ac_cv_c_tkconfig=`(cd $i; pwd)`
16972 break
16973 fi
16974 done
16975 fi
16976 # check in a few other private locations
16977 if test x"${ac_cv_c_tkconfig}" = x ; then
16978 for i in \
16979 ${srcdir}/../tk \
16980 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16981 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16982 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16983 if test -f "$i/$platDir/tkConfig.sh" ; then
16984 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16985 break
16986 fi
16987 done
16988 fi
3fc11d3e 16989
3fc11d3e
JM
16990fi
16991
16992
5062cc19
KS
16993 if test x"${ac_cv_c_tkconfig}" = x ; then
16994 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16996$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16997 else
16998 no_tk=
16999 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17001$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17002 fi
3fc11d3e 17003 fi
dd2504ab 17004
dd2504ab 17005
85541719
DE
17006 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17007
81ecdfbb
RW
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17009$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17010
17011 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17013$as_echo "loading" >&6; }
85541719
DE
17014 . ${TCL_BIN_DIR}/tclConfig.sh
17015 else
81ecdfbb
RW
17016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17017$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17018 fi
17019
17020 # eval is required to do the TCL_DBGX substitution
17021 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17022 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17023
17024 # If the TCL_BIN_DIR is the build directory (not the install directory),
17025 # then set the common variable name to the value of the build variables.
17026 # For example, the variable TCL_LIB_SPEC will be set to the value
17027 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17028 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17029 # installed and uninstalled version of Tcl.
17030 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17031 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17032 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17033 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17034 elif test "`uname -s`" = "Darwin"; then
17035 # If Tcl was built as a framework, attempt to use the libraries
17036 # from the framework at the given location so that linking works
17037 # against Tcl.framework installed in an arbitary location.
17038 case ${TCL_DEFS} in
17039 *TCL_FRAMEWORK*)
17040 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17041 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17042 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17043 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17044 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17045 break
17046 fi
17047 done
17048 fi
17049 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17050 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17051 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17052 fi
17053 ;;
17054 esac
17055 fi
17056
17057 # eval is required to do the TCL_DBGX substitution
17058 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17059 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17060 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17061 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077 # Check for in-tree tcl
17078 here=`pwd`
17079 cd ${srcdir}/..
17080 topdir=`pwd`
17081 cd ${here}
17082
17083 intree="no"
17084 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17085 intree="yes"
17086 fi
17087
17088 # Find Tcl private headers
17089 if test x"${intree}" = xno; then
17090
81ecdfbb
RW
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17092$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17093 private_dir=""
17094 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17095 if test -f ${dir}/tclInt.h ; then
17096 private_dir=${dir}
17097 fi
17098
17099 if test x"${private_dir}" = x; then
81ecdfbb 17100 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17101 else
17102 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17104$as_echo "${private_dir}" >&6; }
85541719
DE
17105 fi
17106
17107 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17108 TCL_LIBRARY="${TCL_LIB_SPEC}"
17109 TCL_DEPS=""
17110 else
17111 # If building tcl in the same src tree, private headers
17112 # are not needed, but we need to be sure to use the right
17113 # headers library
17114 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17115 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17116 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17117 fi
17118
17119
17120
17121
17122
81ecdfbb
RW
17123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17124$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17125
5062cc19 17126 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17128$as_echo "loading" >&6; }
5062cc19 17129 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17130 else
81ecdfbb
RW
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17132$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17133 fi
bec39cab 17134
5062cc19
KS
17135 # eval is required to do the TK_DBGX substitution
17136 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17137 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17138
17139 # If the TK_BIN_DIR is the build directory (not the install directory),
17140 # then set the common variable name to the value of the build variables.
17141 # For example, the variable TK_LIB_SPEC will be set to the value
17142 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17143 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17144 # installed and uninstalled version of Tcl.
85541719 17145 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17146 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17147 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17148 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17149 elif test "`uname -s`" = "Darwin"; then
17150 # If Tk was built as a framework, attempt to use the libraries
17151 # from the framework at the given location so that linking works
17152 # against Tk.framework installed in an arbitary location.
17153 case ${TK_DEFS} in
17154 *TK_FRAMEWORK*)
85541719 17155 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17156 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17157 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17158 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17159 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17160 break
17161 fi
17162 done
17163 fi
85541719 17164 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17165 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17166 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17167 fi
17168 ;;
17169 esac
3fc11d3e
JM
17170 fi
17171
5062cc19
KS
17172 # eval is required to do the TK_DBGX substitution
17173 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17174 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17175 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17176 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17177
3fc11d3e
JM
17178
17179
bec39cab
AC
17180
17181
17182
17183
17184
17185
17186
3fc11d3e 17187
3fc11d3e 17188
bec39cab 17189
bec39cab 17190
85541719
DE
17191 # Check for in-tree Tk
17192 intree="no"
17193 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17194 intree="yes"
17195 fi
3fc11d3e 17196
85541719
DE
17197 # Find Tk private headers
17198 if test x"${intree}" = xno; then
3fc11d3e 17199
81ecdfbb
RW
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17201$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17202 private_dir=""
17203 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17204 if test -f ${dir}/tkInt.h; then
17205 private_dir=${dir}
3fc11d3e 17206 fi
bec39cab 17207
5062cc19 17208 if test x"${private_dir}" = x; then
81ecdfbb 17209 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17210 else
5062cc19 17211 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17213$as_echo "${private_dir}" >&6; }
3fc11d3e 17214 fi
3fc11d3e 17215
85541719
DE
17216 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17217 TK_LIBRARY=${TK_LIB_SPEC}
17218 TK_DEPS=""
17219 else
17220 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17221 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17222 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17223 fi
3fc11d3e
JM
17224
17225
3fc11d3e
JM
17226
17227
3fc11d3e 17228
85541719 17229 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17230
85541719
DE
17231 # Include some libraries that Tcl and Tk want.
17232 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17233 # Yes, the ordering seems wrong here. But it isn't.
17234 # TK_LIBS is the list of libraries that need to be linked
17235 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17236 # were in LIBS then any link tests after this point would
17237 # try to include things like `$(LIBGUI)', which wouldn't work.
17238 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17239
85541719
DE
17240 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17241 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17242 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17243 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17244 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17245 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17246 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17247
85541719
DE
17248 if test x$gdb_cv_os_cygwin = xyes; then
17249 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17250 WIN32LDAPP="-Wl,--subsystem,console"
17251 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17252 fi
ffc6a242 17253
81ecdfbb 17254 subdirs="$subdirs gdbtk"
3ace7edb 17255
85541719 17256 fi
3fc11d3e
JM
17257fi
17258
17259
17260
17261
17262
17263
17264
17265
81ecdfbb
RW
17266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17267$as_echo_n "checking for X... " >&6; }
bec39cab 17268
c906108c 17269
81ecdfbb
RW
17270# Check whether --with-x was given.
17271if test "${with_x+set}" = set; then :
17272 withval=$with_x;
17273fi
c906108c
SS
17274
17275# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17276if test "x$with_x" = xno; then
17277 # The user explicitly disabled X.
17278 have_x=disabled
17279else
81ecdfbb
RW
17280 case $x_includes,$x_libraries in #(
17281 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
17282 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
17283 $as_echo_n "(cached) " >&6
c906108c
SS
17284else
17285 # One or both of the vars are not set, and there is no cached value.
bec39cab 17286ac_x_includes=no ac_x_libraries=no
81ecdfbb 17287rm -f -r conftest.dir
bec39cab
AC
17288if mkdir conftest.dir; then
17289 cd conftest.dir
bec39cab 17290 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17291incroot:
17292 @echo incroot='${INCROOT}'
17293usrlibdir:
17294 @echo usrlibdir='${USRLIBDIR}'
17295libdir:
17296 @echo libdir='${LIBDIR}'
17297_ACEOF
17298 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 17299 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
17300 for ac_var in incroot usrlibdir libdir; do
17301 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17302 done
c906108c 17303 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17304 for ac_extension in a so sl dylib la dll; do
17305 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17306 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17307 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17308 fi
17309 done
17310 # Screen out bogus values from the imake configuration. They are
17311 # bogus both because they are the default anyway, and because
17312 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17313 case $ac_im_incroot in
81ecdfbb 17314 /usr/include) ac_x_includes= ;;
bec39cab 17315 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17316 esac
bec39cab 17317 case $ac_im_usrlibdir in
81ecdfbb 17318 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17319 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17320 esac
17321 fi
17322 cd ..
81ecdfbb 17323 rm -f -r conftest.dir
c906108c
SS
17324fi
17325
bec39cab
AC
17326# Standard set of common directories for X headers.
17327# Check X11 before X11Rn because it is often a symlink to the current release.
17328ac_x_header_dirs='
17329/usr/X11/include
81ecdfbb 17330/usr/X11R7/include
bec39cab
AC
17331/usr/X11R6/include
17332/usr/X11R5/include
17333/usr/X11R4/include
17334
17335/usr/include/X11
81ecdfbb 17336/usr/include/X11R7
bec39cab
AC
17337/usr/include/X11R6
17338/usr/include/X11R5
17339/usr/include/X11R4
17340
17341/usr/local/X11/include
81ecdfbb 17342/usr/local/X11R7/include
bec39cab
AC
17343/usr/local/X11R6/include
17344/usr/local/X11R5/include
17345/usr/local/X11R4/include
17346
17347/usr/local/include/X11
81ecdfbb 17348/usr/local/include/X11R7
bec39cab
AC
17349/usr/local/include/X11R6
17350/usr/local/include/X11R5
17351/usr/local/include/X11R4
17352
17353/usr/X386/include
17354/usr/x386/include
17355/usr/XFree86/include/X11
17356
17357/usr/include
17358/usr/local/include
17359/usr/unsupported/include
17360/usr/athena/include
17361/usr/local/x11r5/include
17362/usr/lpp/Xamples/include
17363
17364/usr/openwin/include
17365/usr/openwin/share/include'
17366
17367if test "$ac_x_includes" = no; then
81ecdfbb 17368 # Guess where to find include files, by looking for Xlib.h.
c906108c 17369 # First, try using that file with no special directory specified.
81ecdfbb 17370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17371/* end confdefs.h. */
81ecdfbb 17372#include <X11/Xlib.h>
bec39cab 17373_ACEOF
81ecdfbb 17374if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17375 # We can compile using X headers with no special include directory.
17376ac_x_includes=
17377else
bec39cab 17378 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17379 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17380 ac_x_includes=$ac_dir
17381 break
17382 fi
17383done
c906108c 17384fi
bec39cab
AC
17385rm -f conftest.err conftest.$ac_ext
17386fi # $ac_x_includes = no
c906108c 17387
bec39cab 17388if test "$ac_x_libraries" = no; then
c906108c 17389 # Check for the libraries.
c906108c
SS
17390 # See if we find them without any special options.
17391 # Don't add to $LIBS permanently.
bec39cab 17392 ac_save_LIBS=$LIBS
81ecdfbb
RW
17393 LIBS="-lX11 $LIBS"
17394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17395/* end confdefs.h. */
81ecdfbb 17396#include <X11/Xlib.h>
bec39cab
AC
17397int
17398main ()
17399{
81ecdfbb 17400XrmInitialize ()
bec39cab
AC
17401 ;
17402 return 0;
17403}
17404_ACEOF
81ecdfbb 17405if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17406 LIBS=$ac_save_LIBS
c906108c
SS
17407# We can link X programs with no special library path.
17408ac_x_libraries=
17409else
81ecdfbb
RW
17410 LIBS=$ac_save_LIBS
17411for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17412do
bec39cab 17413 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17414 for ac_extension in a so sl dylib la dll; do
17415 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17416 ac_x_libraries=$ac_dir
17417 break 2
17418 fi
17419 done
17420done
17421fi
81ecdfbb
RW
17422rm -f core conftest.err conftest.$ac_objext \
17423 conftest$ac_exeext conftest.$ac_ext
bec39cab 17424fi # $ac_x_libraries = no
c906108c 17425
81ecdfbb
RW
17426case $ac_x_includes,$ac_x_libraries in #(
17427 no,* | *,no | *\'*)
17428 # Didn't find X, or a directory has "'" in its name.
17429 ac_cv_have_x="have_x=no";; #(
17430 *)
17431 # Record where we found X for the cache.
17432 ac_cv_have_x="have_x=yes\
17433 ac_x_includes='$ac_x_includes'\
17434 ac_x_libraries='$ac_x_libraries'"
17435esac
c906108c 17436fi
81ecdfbb
RW
17437;; #(
17438 *) have_x=yes;;
17439 esac
c906108c
SS
17440 eval "$ac_cv_have_x"
17441fi # $with_x != no
17442
17443if test "$have_x" != yes; then
81ecdfbb
RW
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17445$as_echo "$have_x" >&6; }
c906108c
SS
17446 no_x=yes
17447else
17448 # If each of the values was on the command line, it overrides each guess.
17449 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17450 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17451 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17452 ac_cv_have_x="have_x=yes\
17453 ac_x_includes='$x_includes'\
17454 ac_x_libraries='$x_libraries'"
17455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17456$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17457fi
17458
17459
bec39cab 17460# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17461# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17462# This code just checks for a few cases where we'd like to ignore those
17463# definitions, even when they're present in the '.mt' file. These cases
17464# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17465# not part of the source tree.
7a292a7a 17466#
81ecdfbb
RW
17467# Check whether --enable-sim was given.
17468if test "${enable_sim+set}" = set; then :
17469 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17470 echo "enableval = ${enableval}";
17471 case "${enableval}" in
17472 yes) ignore_sim=false ;;
17473 no) ignore_sim=true ;;
17474 *) ignore_sim=false ;;
17475 esac
17476else
17477 ignore_sim=false
81ecdfbb
RW
17478fi
17479
7a292a7a
SS
17480
17481if test ! -d "${srcdir}/../sim"; then
17482 ignore_sim=true
17483fi
17484
9b624dbe
UW
17485SIM=
17486SIM_OBS=
17487if test "${ignore_sim}" = "false"; then
17488 if test x"${gdb_sim}" != x ; then
17489 SIM="${gdb_sim}"
17490 SIM_OBS="remote-sim.o"
60ca704f 17491
81ecdfbb 17492$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17493
9b624dbe 17494 fi
7a292a7a
SS
17495fi
17496
17497
17498
c906108c
SS
17499
17500
17501
17502
17503
17504
dfcd3bfb 17505
e56ac5c3
AC
17506
17507
b3a90332
AC
17508
17509
c35f4ffc 17510# List of host floatformats.
bec39cab
AC
17511
17512cat >>confdefs.h <<_ACEOF
c35f4ffc 17513#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17514_ACEOF
c35f4ffc 17515
bec39cab
AC
17516
17517cat >>confdefs.h <<_ACEOF
c35f4ffc 17518#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17519_ACEOF
17520
c35f4ffc 17521
bec39cab 17522cat >>confdefs.h <<_ACEOF
c35f4ffc 17523#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17524_ACEOF
c35f4ffc
AC
17525
17526
c906108c
SS
17527# target_subdir is used by the testsuite to find the target libraries.
17528target_subdir=
17529if test "${host}" != "${target}"; then
17530 target_subdir="${target_alias}/"
17531fi
17532
17533
17534frags=
771b4502 17535if test "${gdb_native}" = "yes"; then
0dad8a66
MK
17536 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
17537 if test ! -f ${host_makefile_frag}; then
81ecdfbb 17538 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
17539 fi
17540 frags="$frags $host_makefile_frag"
17541else
17542 host_makefile_frag=/dev/null
c906108c 17543fi
c906108c 17544
c906108c
SS
17545
17546
17547
771b4502 17548if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
17549# We pick this up from the host configuration file (.mh) because we
17550# do not have a native configuration Makefile fragment.
c906108c
SS
17551nativefile=`sed -n '
17552s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
17553' ${host_makefile_frag}`
c906108c
SS
17554fi
17555
17556
b00a8037 17557if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17558
17559cat >>confdefs.h <<_ACEOF
b00a8037 17560#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17561_ACEOF
b00a8037
DJ
17562
17563fi
17564
8dcde887 17565# Enable multi-ice-gdb-server.
81ecdfbb
RW
17566# Check whether --enable-multi-ice was given.
17567if test "${enable_multi_ice+set}" = set; then :
17568 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
17569 yes | no)
17570 ;;
81ecdfbb 17571 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 17572 esac
81ecdfbb 17573fi
b4e70030 17574
81ecdfbb
RW
17575if test "x$enable_multi_ice" = xyes; then
17576 subdirs="$subdirs multi-ice"
3ace7edb 17577
a85f51e7
DJ
17578fi
17579
496c0e1b
JB
17580# Check whether --enable-gdbserver was given.
17581if test "${enable_gdbserver+set}" = set; then :
17582 enableval=$enable_gdbserver; case "${enableval}" in
17583 yes| no|auto) ;;
17584 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17585esac
17586else
17587 enable_gdbserver=auto
17588fi
17589
17590
17591# We only build gdbserver automatically in a native configuration, and
17592# only if the user did not explicitly disable its build.
17593if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17595$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17596 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17598$as_echo "yes" >&6; }
17599 subdirs="$subdirs gdbserver"
3ace7edb 17600
496c0e1b 17601 gdbserver_build_enabled=yes
8dcde887 17602 else
81ecdfbb
RW
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17604$as_echo "no" >&6; }
8dcde887
MK
17605 fi
17606fi
17607
496c0e1b
JB
17608# If the user explicitly request the gdbserver to be built, verify that
17609# we were in fact able to enable it.
17610if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17611 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17612fi
17613
db985757 17614# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 17615# to an empty version.
c906108c
SS
17616
17617files=
17618links=
5a2402b8 17619
c906108c
SS
17620rm -f nm.h
17621if test "${nativefile}" != ""; then
0f475e27
AC
17622 case "${nativefile}" in
17623 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17624 * ) GDB_NM_FILE="${nativefile}"
17625 esac
5a2402b8
AC
17626 files="${files} ${GDB_NM_FILE}"
17627 links="${links} nm.h"
60ca704f
SE
17628
17629cat >>confdefs.h <<_ACEOF
b78960be 17630#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17631_ACEOF
5a2402b8 17632
c906108c 17633fi
5a2402b8
AC
17634
17635
bec39cab
AC
17636ac_sources="$files"
17637ac_dests="$links"
17638while test -n "$ac_sources"; do
17639 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17640 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17641 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17642done
81ecdfbb 17643ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17644
17645
c906108c
SS
17646
17647
c906108c 17648
81ecdfbb 17649$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17650
bec39cab 17651
e2207b9a 17652ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
17653
17654ac_config_commands="$ac_config_commands default"
89a34d1b 17655
bec39cab
AC
17656cat >confcache <<\_ACEOF
17657# This file is a shell script that caches the results of configure
17658# tests run on this system so they can be shared between configure
17659# scripts and configure runs, see configure's option --config-cache.
17660# It is not useful on other systems. If it contains results you don't
17661# want to keep, you may remove or edit it.
17662#
17663# config.status only pays attention to the cache file if you give it
17664# the --recheck option to rerun configure.
17665#
17666# `ac_cv_env_foo' variables (set or unset) will be overridden when
17667# loading this file, other *unset* `ac_cv_foo' will be assigned the
17668# following values.
17669
17670_ACEOF
17671
17672# The following way of writing the cache mishandles newlines in values,
17673# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17674# So, we kill variables containing newlines.
bec39cab
AC
17675# Ultrix sh set writes to stderr and can't be redirected directly,
17676# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17677(
17678 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17679 eval ac_val=\$$ac_var
17680 case $ac_val in #(
17681 *${as_nl}*)
17682 case $ac_var in #(
17683 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17684$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17685 esac
17686 case $ac_var in #(
17687 _ | IFS | as_nl) ;; #(
17688 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17689 *) { eval $ac_var=; unset $ac_var;} ;;
17690 esac ;;
17691 esac
17692 done
17693
bec39cab 17694 (set) 2>&1 |
81ecdfbb
RW
17695 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17696 *${as_nl}ac_space=\ *)
17697 # `set' does not quote correctly, so add quotes: double-quote
17698 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17699 sed -n \
17700 "s/'/'\\\\''/g;
17701 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17702 ;; #(
bec39cab
AC
17703 *)
17704 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17705 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17706 ;;
81ecdfbb
RW
17707 esac |
17708 sort
17709) |
bec39cab 17710 sed '
81ecdfbb 17711 /^ac_cv_env_/b end
bec39cab 17712 t clear
81ecdfbb 17713 :clear
bec39cab
AC
17714 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17715 t end
81ecdfbb
RW
17716 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17717 :end' >>confcache
17718if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17719 if test -w "$cache_file"; then
17720 test "x$cache_file" != "x/dev/null" &&
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17722$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17723 cat confcache >$cache_file
17724 else
81ecdfbb
RW
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17726$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17727 fi
17728fi
17729rm -f confcache
17730
17731test "x$prefix" = xNONE && prefix=$ac_default_prefix
17732# Let make expand exec_prefix.
17733test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17734
bec39cab
AC
17735DEFS=-DHAVE_CONFIG_H
17736
17737ac_libobjs=
17738ac_ltlibobjs=
17739for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17740 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17741 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17742 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17743 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17744 # will be set to the directory where LIBOBJS objects are built.
17745 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17746 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17747done
17748LIBOBJS=$ac_libobjs
17749
17750LTLIBOBJS=$ac_ltlibobjs
17751
17752
85981d60 17753if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17754 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17755Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17756fi
a417dc56 17757if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
17758 as_fn_error "conditional \"GMAKE\" was never defined.
17759Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 17760fi
783e057b 17761if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
17762 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
17763Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
17764fi
17765
17766 gl_libobjs=
17767 gl_ltlibobjs=
17768 if test -n "$gl_LIBOBJS"; then
17769 # Remove the extension.
17770 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 17771 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
17772 gl_libobjs="$gl_libobjs $i.$ac_objext"
17773 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
17774 done
17775 fi
17776 gl_LIBOBJS=$gl_libobjs
17777
17778 gl_LTLIBOBJS=$gl_ltlibobjs
17779
17780
17781
17782 gltests_libobjs=
17783 gltests_ltlibobjs=
17784 if test -n "$gltests_LIBOBJS"; then
17785 # Remove the extension.
17786 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 17787 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
17788 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
17789 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
17790 done
17791 fi
17792 gltests_LIBOBJS=$gltests_libobjs
17793
17794 gltests_LTLIBOBJS=$gltests_ltlibobjs
17795
17796
e28b3332 17797if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
17798 as_fn_error "conditional \"AMDEP\" was never defined.
17799Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
17800fi
17801if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
17802 as_fn_error "conditional \"am__fastdepCC\" was never defined.
17803Usually this means the macro was only invoked conditionally." "$LINENO" 5
17804fi
17805 if test -n "$EXEEXT"; then
17806 am__EXEEXT_TRUE=
17807 am__EXEEXT_FALSE='#'
17808else
17809 am__EXEEXT_TRUE='#'
17810 am__EXEEXT_FALSE=
e28b3332 17811fi
bec39cab 17812
81ecdfbb
RW
17813
17814
bec39cab 17815: ${CONFIG_STATUS=./config.status}
81ecdfbb 17816ac_write_fail=0
bec39cab
AC
17817ac_clean_files_save=$ac_clean_files
17818ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17819{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17820$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17821as_write_fail=0
17822cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17823#! $SHELL
17824# Generated by $as_me.
17825# Run this file to recreate the current configuration.
17826# Compiler output produced by configure, useful for debugging
17827# configure, is in config.log if it exists.
17828
17829debug=false
17830ac_cs_recheck=false
17831ac_cs_silent=false
bec39cab 17832
81ecdfbb
RW
17833SHELL=\${CONFIG_SHELL-$SHELL}
17834export SHELL
17835_ASEOF
17836cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17837## -------------------- ##
17838## M4sh Initialization. ##
17839## -------------------- ##
17840
17841# Be more Bourne compatible
17842DUALCASE=1; export DUALCASE # for MKS sh
17843if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17844 emulate sh
17845 NULLCMD=:
81ecdfbb 17846 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17847 # is contrary to our usage. Disable this feature.
17848 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17849 setopt NO_GLOB_SUBST
17850else
17851 case `(set -o) 2>/dev/null` in #(
17852 *posix*) :
17853 set -o posix ;; #(
17854 *) :
17855 ;;
17856esac
bec39cab 17857fi
bec39cab 17858
81ecdfbb
RW
17859
17860as_nl='
17861'
17862export as_nl
17863# Printing a long string crashes Solaris 7 /usr/bin/printf.
17864as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17865as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17866as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17867# Prefer a ksh shell builtin over an external printf program on Solaris,
17868# but without wasting forks for bash or zsh.
17869if test -z "$BASH_VERSION$ZSH_VERSION" \
17870 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17871 as_echo='print -r --'
17872 as_echo_n='print -rn --'
17873elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17874 as_echo='printf %s\n'
17875 as_echo_n='printf %s'
17876else
17877 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17878 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17879 as_echo_n='/usr/ucb/echo -n'
17880 else
17881 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17882 as_echo_n_body='eval
17883 arg=$1;
17884 case $arg in #(
17885 *"$as_nl"*)
17886 expr "X$arg" : "X\\(.*\\)$as_nl";
17887 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17888 esac;
17889 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17890 '
17891 export as_echo_n_body
17892 as_echo_n='sh -c $as_echo_n_body as_echo'
17893 fi
17894 export as_echo_body
17895 as_echo='sh -c $as_echo_body as_echo'
17896fi
17897
17898# The user is always right.
17899if test "${PATH_SEPARATOR+set}" != set; then
17900 PATH_SEPARATOR=:
17901 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17902 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17903 PATH_SEPARATOR=';'
17904 }
bec39cab
AC
17905fi
17906
17907
81ecdfbb
RW
17908# IFS
17909# We need space, tab and new line, in precisely that order. Quoting is
17910# there to prevent editors from complaining about space-tab.
17911# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17912# splitting by setting IFS to empty value.)
17913IFS=" "" $as_nl"
17914
17915# Find who we are. Look in the path if we contain no directory separator.
17916case $0 in #((
17917 *[\\/]* ) as_myself=$0 ;;
17918 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17919for as_dir in $PATH
17920do
17921 IFS=$as_save_IFS
17922 test -z "$as_dir" && as_dir=.
17923 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17924 done
17925IFS=$as_save_IFS
17926
17927 ;;
17928esac
17929# We did not find ourselves, most probably we were run as `sh COMMAND'
17930# in which case we are not to be found in the path.
17931if test "x$as_myself" = x; then
17932 as_myself=$0
17933fi
17934if test ! -f "$as_myself"; then
17935 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17936 exit 1
17937fi
17938
17939# Unset variables that we do not need and which cause bugs (e.g. in
17940# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17941# suppresses any "Segmentation fault" message there. '((' could
17942# trigger a bug in pdksh 5.2.14.
17943for as_var in BASH_ENV ENV MAIL MAILPATH
17944do eval test x\${$as_var+set} = xset \
17945 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17946done
bec39cab
AC
17947PS1='$ '
17948PS2='> '
17949PS4='+ '
17950
17951# NLS nuisances.
81ecdfbb
RW
17952LC_ALL=C
17953export LC_ALL
17954LANGUAGE=C
17955export LANGUAGE
17956
17957# CDPATH.
17958(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17959
17960
17961# as_fn_error ERROR [LINENO LOG_FD]
17962# ---------------------------------
17963# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17964# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17965# script with status $?, using 1 if that was 0.
17966as_fn_error ()
17967{
17968 as_status=$?; test $as_status -eq 0 && as_status=1
17969 if test "$3"; then
17970 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17971 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17972 fi
17973 $as_echo "$as_me: error: $1" >&2
17974 as_fn_exit $as_status
17975} # as_fn_error
17976
17977
17978# as_fn_set_status STATUS
17979# -----------------------
17980# Set $? to STATUS, without forking.
17981as_fn_set_status ()
17982{
17983 return $1
17984} # as_fn_set_status
17985
17986# as_fn_exit STATUS
17987# -----------------
17988# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17989as_fn_exit ()
17990{
17991 set +e
17992 as_fn_set_status $1
17993 exit $1
17994} # as_fn_exit
17995
17996# as_fn_unset VAR
17997# ---------------
17998# Portably unset VAR.
17999as_fn_unset ()
18000{
18001 { eval $1=; unset $1;}
18002}
18003as_unset=as_fn_unset
18004# as_fn_append VAR VALUE
18005# ----------------------
18006# Append the text in VALUE to the end of the definition contained in VAR. Take
18007# advantage of any shell optimizations that allow amortized linear growth over
18008# repeated appends, instead of the typical quadratic growth present in naive
18009# implementations.
18010if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18011 eval 'as_fn_append ()
18012 {
18013 eval $1+=\$2
18014 }'
18015else
18016 as_fn_append ()
18017 {
18018 eval $1=\$$1\$2
18019 }
18020fi # as_fn_append
18021
18022# as_fn_arith ARG...
18023# ------------------
18024# Perform arithmetic evaluation on the ARGs, and store the result in the
18025# global $as_val. Take advantage of shells that can avoid forks. The arguments
18026# must be portable across $(()) and expr.
18027if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18028 eval 'as_fn_arith ()
18029 {
18030 as_val=$(( $* ))
18031 }'
18032else
18033 as_fn_arith ()
18034 {
18035 as_val=`expr "$@" || test $? -eq 1`
18036 }
18037fi # as_fn_arith
bec39cab 18038
81ecdfbb
RW
18039
18040if expr a : '\(a\)' >/dev/null 2>&1 &&
18041 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18042 as_expr=expr
18043else
18044 as_expr=false
18045fi
18046
81ecdfbb 18047if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18048 as_basename=basename
18049else
18050 as_basename=false
18051fi
18052
81ecdfbb
RW
18053if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18054 as_dirname=dirname
18055else
18056 as_dirname=false
18057fi
bec39cab 18058
81ecdfbb 18059as_me=`$as_basename -- "$0" ||
bec39cab
AC
18060$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18061 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18062 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18063$as_echo X/"$0" |
18064 sed '/^.*\/\([^/][^/]*\)\/*$/{
18065 s//\1/
18066 q
18067 }
18068 /^X\/\(\/\/\)$/{
18069 s//\1/
18070 q
18071 }
18072 /^X\/\(\/\).*/{
18073 s//\1/
18074 q
18075 }
18076 s/.*/./; q'`
b4e70030 18077
b4e70030
JB
18078# Avoid depending upon Character Ranges.
18079as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18080as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18081as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18082as_cr_digits='0123456789'
18083as_cr_alnum=$as_cr_Letters$as_cr_digits
18084
81ecdfbb
RW
18085ECHO_C= ECHO_N= ECHO_T=
18086case `echo -n x` in #(((((
18087-n*)
18088 case `echo 'xy\c'` in
18089 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18090 xy) ECHO_C='\c';;
18091 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18092 ECHO_T=' ';;
18093 esac;;
18094*)
18095 ECHO_N='-n';;
bec39cab
AC
18096esac
18097
81ecdfbb
RW
18098rm -f conf$$ conf$$.exe conf$$.file
18099if test -d conf$$.dir; then
18100 rm -f conf$$.dir/conf$$.file
bec39cab 18101else
81ecdfbb
RW
18102 rm -f conf$$.dir
18103 mkdir conf$$.dir 2>/dev/null
bec39cab 18104fi
81ecdfbb
RW
18105if (echo >conf$$.file) 2>/dev/null; then
18106 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18107 as_ln_s='ln -s'
81ecdfbb
RW
18108 # ... but there are two gotchas:
18109 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18110 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18111 # In both cases, we have to default to `cp -p'.
18112 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18113 as_ln_s='cp -p'
18114 elif ln conf$$.file conf$$ 2>/dev/null; then
18115 as_ln_s=ln
18116 else
18117 as_ln_s='cp -p'
b4e70030 18118 fi
bec39cab
AC
18119else
18120 as_ln_s='cp -p'
18121fi
81ecdfbb
RW
18122rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18123rmdir conf$$.dir 2>/dev/null
18124
18125
18126# as_fn_mkdir_p
18127# -------------
18128# Create "$as_dir" as a directory, including parents if necessary.
18129as_fn_mkdir_p ()
18130{
18131
18132 case $as_dir in #(
18133 -*) as_dir=./$as_dir;;
18134 esac
18135 test -d "$as_dir" || eval $as_mkdir_p || {
18136 as_dirs=
18137 while :; do
18138 case $as_dir in #(
18139 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18140 *) as_qdir=$as_dir;;
18141 esac
18142 as_dirs="'$as_qdir' $as_dirs"
18143 as_dir=`$as_dirname -- "$as_dir" ||
18144$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18145 X"$as_dir" : 'X\(//\)[^/]' \| \
18146 X"$as_dir" : 'X\(//\)$' \| \
18147 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18148$as_echo X"$as_dir" |
18149 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18150 s//\1/
18151 q
18152 }
18153 /^X\(\/\/\)[^/].*/{
18154 s//\1/
18155 q
18156 }
18157 /^X\(\/\/\)$/{
18158 s//\1/
18159 q
18160 }
18161 /^X\(\/\).*/{
18162 s//\1/
18163 q
18164 }
18165 s/.*/./; q'`
18166 test -d "$as_dir" && break
18167 done
18168 test -z "$as_dirs" || eval "mkdir $as_dirs"
18169 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
18170
bec39cab 18171
81ecdfbb 18172} # as_fn_mkdir_p
bec39cab 18173if mkdir -p . 2>/dev/null; then
81ecdfbb 18174 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18175else
18176 test -d ./-p && rmdir ./-p
18177 as_mkdir_p=false
18178fi
18179
81ecdfbb
RW
18180if test -x / >/dev/null 2>&1; then
18181 as_test_x='test -x'
18182else
18183 if ls -dL / >/dev/null 2>&1; then
18184 as_ls_L_option=L
18185 else
18186 as_ls_L_option=
18187 fi
18188 as_test_x='
18189 eval sh -c '\''
18190 if test -d "$1"; then
18191 test -d "$1/.";
18192 else
18193 case $1 in #(
18194 -*)set "./$1";;
18195 esac;
18196 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18197 ???[sx]*):;;*)false;;esac;fi
18198 '\'' sh
18199 '
18200fi
18201as_executable_p=$as_test_x
bec39cab
AC
18202
18203# Sed expression to map a string onto a valid CPP name.
18204as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18205
18206# Sed expression to map a string onto a valid variable name.
18207as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18208
18209
bec39cab 18210exec 6>&1
81ecdfbb
RW
18211## ----------------------------------- ##
18212## Main body of $CONFIG_STATUS script. ##
18213## ----------------------------------- ##
18214_ASEOF
18215test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18216
18217cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18218# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18219# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18220# values after options handling.
18221ac_log="
bec39cab 18222This file was extended by $as_me, which was
81ecdfbb 18223generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
18224
18225 CONFIG_FILES = $CONFIG_FILES
18226 CONFIG_HEADERS = $CONFIG_HEADERS
18227 CONFIG_LINKS = $CONFIG_LINKS
18228 CONFIG_COMMANDS = $CONFIG_COMMANDS
18229 $ $0 $@
18230
81ecdfbb
RW
18231on `(hostname || uname -n) 2>/dev/null | sed 1q`
18232"
18233
bec39cab
AC
18234_ACEOF
18235
81ecdfbb
RW
18236case $ac_config_files in *"
18237"*) set x $ac_config_files; shift; ac_config_files=$*;;
18238esac
234b45d4 18239
81ecdfbb
RW
18240case $ac_config_headers in *"
18241"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18242esac
b4e70030 18243
b4e70030 18244
81ecdfbb
RW
18245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18246# Files that config.status was made for.
18247config_files="$ac_config_files"
18248config_headers="$ac_config_headers"
18249config_links="$ac_config_links"
18250config_commands="$ac_config_commands"
234b45d4 18251
81ecdfbb 18252_ACEOF
b4e70030 18253
81ecdfbb 18254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18255ac_cs_usage="\
81ecdfbb
RW
18256\`$as_me' instantiates files and other configuration actions
18257from templates according to the current configuration. Unless the files
18258and actions are specified as TAGs, all are instantiated by default.
234b45d4 18259
81ecdfbb 18260Usage: $0 [OPTION]... [TAG]...
234b45d4 18261
bec39cab 18262 -h, --help print this help, then exit
81ecdfbb
RW
18263 -V, --version print version number and configuration settings, then exit
18264 -q, --quiet, --silent
18265 do not print progress messages
bec39cab
AC
18266 -d, --debug don't remove temporary files
18267 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18268 --file=FILE[:TEMPLATE]
18269 instantiate the configuration file FILE
18270 --header=FILE[:TEMPLATE]
18271 instantiate the configuration header FILE
234b45d4 18272
bec39cab
AC
18273Configuration files:
18274$config_files
234b45d4 18275
bec39cab
AC
18276Configuration headers:
18277$config_headers
234b45d4 18278
bec39cab
AC
18279Configuration links:
18280$config_links
234b45d4 18281
bec39cab
AC
18282Configuration commands:
18283$config_commands
18284
81ecdfbb 18285Report bugs to the package provider."
b4e70030 18286
81ecdfbb
RW
18287_ACEOF
18288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
18289ac_cs_version="\\
18290config.status
81ecdfbb
RW
18291configured by $0, generated by GNU Autoconf 2.64,
18292 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 18293
81ecdfbb 18294Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
18295This config.status script is free software; the Free Software Foundation
18296gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18297
18298ac_pwd='$ac_pwd'
18299srcdir='$srcdir'
18300INSTALL='$INSTALL'
18301MKDIR_P='$MKDIR_P'
18302AWK='$AWK'
18303test -n "\$AWK" || AWK=awk
bec39cab
AC
18304_ACEOF
18305
81ecdfbb
RW
18306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18307# The default lists apply if the user does not specify any file.
bec39cab
AC
18308ac_need_defaults=:
18309while test $# != 0
18310do
18311 case $1 in
18312 --*=*)
81ecdfbb
RW
18313 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18314 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18315 ac_shift=:
c906108c 18316 ;;
81ecdfbb 18317 *)
bec39cab
AC
18318 ac_option=$1
18319 ac_optarg=$2
18320 ac_shift=shift
c906108c 18321 ;;
bec39cab 18322 esac
c906108c 18323
bec39cab
AC
18324 case $ac_option in
18325 # Handling of the options.
bec39cab
AC
18326 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18327 ac_cs_recheck=: ;;
81ecdfbb
RW
18328 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18329 $as_echo "$ac_cs_version"; exit ;;
18330 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18331 debug=: ;;
18332 --file | --fil | --fi | --f )
18333 $ac_shift
81ecdfbb
RW
18334 case $ac_optarg in
18335 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18336 esac
18337 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18338 ac_need_defaults=false;;
18339 --header | --heade | --head | --hea )
18340 $ac_shift
81ecdfbb
RW
18341 case $ac_optarg in
18342 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18343 esac
18344 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18345 ac_need_defaults=false;;
81ecdfbb
RW
18346 --he | --h)
18347 # Conflict between --help and --header
18348 as_fn_error "ambiguous option: \`$1'
18349Try \`$0 --help' for more information.";;
18350 --help | --hel | -h )
18351 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18352 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18353 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18354 ac_cs_silent=: ;;
c906108c 18355
bec39cab 18356 # This is an error.
81ecdfbb
RW
18357 -*) as_fn_error "unrecognized option: \`$1'
18358Try \`$0 --help' for more information." ;;
c906108c 18359
81ecdfbb
RW
18360 *) as_fn_append ac_config_targets " $1"
18361 ac_need_defaults=false ;;
c906108c 18362
bec39cab
AC
18363 esac
18364 shift
18365done
c906108c 18366
bec39cab 18367ac_configure_extra_args=
c906108c 18368
bec39cab
AC
18369if $ac_cs_silent; then
18370 exec 6>/dev/null
18371 ac_configure_extra_args="$ac_configure_extra_args --silent"
18372fi
c906108c 18373
bec39cab 18374_ACEOF
81ecdfbb 18375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18376if \$ac_cs_recheck; then
81ecdfbb
RW
18377 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18378 shift
18379 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18380 CONFIG_SHELL='$SHELL'
18381 export CONFIG_SHELL
18382 exec "\$@"
bec39cab
AC
18383fi
18384
18385_ACEOF
81ecdfbb
RW
18386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18387exec 5>>config.log
18388{
18389 echo
18390 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18391## Running $as_me. ##
18392_ASBOX
18393 $as_echo "$ac_log"
18394} >&5
bec39cab 18395
81ecdfbb
RW
18396_ACEOF
18397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18398#
81ecdfbb 18399# INIT-COMMANDS
c906108c 18400#
a417dc56 18401ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 18402AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 18403
bec39cab
AC
18404_ACEOF
18405
81ecdfbb 18406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18407
81ecdfbb 18408# Handling of arguments.
bec39cab 18409for ac_config_target in $ac_config_targets
c906108c 18410do
81ecdfbb
RW
18411 case $ac_config_target in
18412 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18413 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18414 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 18415 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
18416 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18417 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18418 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18419 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 18420 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 18421 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18422 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18423
18424 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18425 esac
18426done
18427
81ecdfbb 18428
bec39cab
AC
18429# If the user did not use the arguments to specify the items to instantiate,
18430# then the envvar interface is used. Set only those that are not.
18431# We use the long form for the default assignment because of an extremely
18432# bizarre bug on SunOS 4.1.3.
18433if $ac_need_defaults; then
18434 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18435 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18436 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18437 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18438fi
18439
b4e70030 18440# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18441# simply because there is no reason against having it here, and in addition,
b4e70030 18442# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18443# Hook for its removal unless debugging.
18444# Note that there is a small window in which the directory will not be cleaned:
18445# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18446$debug ||
18447{
81ecdfbb
RW
18448 tmp=
18449 trap 'exit_status=$?
18450 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18451' 0
18452 trap 'as_fn_exit 1' 1 2 13 15
18453}
18454# Create a (secure) tmp directory for tmp files.
18455
18456{
18457 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18458 test -n "$tmp" && test -d "$tmp"
18459} ||
18460{
18461 tmp=./conf$$-$RANDOM
18462 (umask 077 && mkdir "$tmp")
18463} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18464
18465# Set up the scripts for CONFIG_FILES section.
18466# No need to generate them if there are no CONFIG_FILES.
18467# This happens for instance with `./config.status config.h'.
18468if test -n "$CONFIG_FILES"; then
18469
18470if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18471 ac_cs_awk_getline=:
18472 ac_cs_awk_pipe_init=
18473 ac_cs_awk_read_file='
18474 while ((getline aline < (F[key])) > 0)
18475 print(aline)
18476 close(F[key])'
18477 ac_cs_awk_pipe_fini=
18478else
18479 ac_cs_awk_getline=false
18480 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18481 ac_cs_awk_read_file='
18482 print "|#_!!_#|"
18483 print "cat " F[key] " &&"
18484 '$ac_cs_awk_pipe_init
18485 # The final `:' finishes the AND list.
18486 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18487fi
18488ac_cr=`echo X | tr X '\015'`
18489# On cygwin, bash can eat \r inside `` if the user requested igncr.
18490# But we know of no other shell where ac_cr would be empty at this
18491# point, so we can use a bashism as a fallback.
18492if test "x$ac_cr" = x; then
18493 eval ac_cr=\$\'\\r\'
18494fi
18495ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18496if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18497 ac_cs_awk_cr='\r'
18498else
18499 ac_cs_awk_cr=$ac_cr
18500fi
18501
18502echo 'BEGIN {' >"$tmp/subs1.awk" &&
18503_ACEOF
18504
18505# Create commands to substitute file output variables.
18506{
18507 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18508 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18509 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18510 echo "_ACAWK" &&
18511 echo "_ACEOF"
18512} >conf$$files.sh &&
18513. ./conf$$files.sh ||
18514 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18515rm -f conf$$files.sh
18516
18517{
18518 echo "cat >conf$$subs.awk <<_ACEOF" &&
18519 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18520 echo "_ACEOF"
18521} >conf$$subs.sh ||
18522 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18523ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18524ac_delim='%!_!# '
18525for ac_last_try in false false false false false :; do
18526 . ./conf$$subs.sh ||
18527 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18528
18529 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18530 if test $ac_delim_n = $ac_delim_num; then
18531 break
18532 elif $ac_last_try; then
18533 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18534 else
18535 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18536 fi
18537done
18538rm -f conf$$subs.sh
18539
18540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18541cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18542_ACEOF
18543sed -n '
18544h
18545s/^/S["/; s/!.*/"]=/
18546p
18547g
18548s/^[^!]*!//
18549:repl
18550t repl
18551s/'"$ac_delim"'$//
18552t delim
18553:nl
18554h
18555s/\(.\{148\}\).*/\1/
18556t more1
18557s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18558p
18559n
18560b repl
18561:more1
18562s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18563p
18564g
18565s/.\{148\}//
18566t nl
18567:delim
18568h
18569s/\(.\{148\}\).*/\1/
18570t more2
18571s/["\\]/\\&/g; s/^/"/; s/$/"/
18572p
18573b
18574:more2
18575s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18576p
18577g
18578s/.\{148\}//
18579t delim
18580' <conf$$subs.awk | sed '
18581/^[^""]/{
18582 N
18583 s/\n//
18584}
18585' >>$CONFIG_STATUS || ac_write_fail=1
18586rm -f conf$$subs.awk
18587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18588_ACAWK
18589cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18590 for (key in S) S_is_set[key] = 1
18591 FS = "\a"
18592 \$ac_cs_awk_pipe_init
18593}
18594{
18595 line = $ 0
18596 nfields = split(line, field, "@")
18597 substed = 0
18598 len = length(field[1])
18599 for (i = 2; i < nfields; i++) {
18600 key = field[i]
18601 keylen = length(key)
18602 if (S_is_set[key]) {
18603 value = S[key]
18604 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18605 len += length(value) + length(field[++i])
18606 substed = 1
18607 } else
18608 len += 1 + keylen
18609 }
18610 if (nfields == 3 && !substed) {
18611 key = field[2]
18612 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18613 \$ac_cs_awk_read_file
18614 next
18615 }
18616 }
18617 print line
b4e70030 18618}
81ecdfbb
RW
18619\$ac_cs_awk_pipe_fini
18620_ACAWK
18621_ACEOF
18622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18623if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18624 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18625else
18626 cat
18627fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18628 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18629_ACEOF
18630
18631# VPATH may cause trouble with some makes, so we remove $(srcdir),
18632# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18633# trailing colons and then remove the whole line if VPATH becomes empty
18634# (actually we leave an empty line to preserve line numbers).
18635if test "x$srcdir" = x.; then
18636 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18637s/:*\$(srcdir):*/:/
18638s/:*\${srcdir}:*/:/
18639s/:*@srcdir@:*/:/
18640s/^\([^=]*=[ ]*\):*/\1/
18641s/:*$//
18642s/^[^=]*=[ ]*$//
18643}'
18644fi
18645
18646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18647fi # test -n "$CONFIG_FILES"
18648
18649# Set up the scripts for CONFIG_HEADERS section.
18650# No need to generate them if there are no CONFIG_HEADERS.
18651# This happens for instance with `./config.status Makefile'.
18652if test -n "$CONFIG_HEADERS"; then
18653cat >"$tmp/defines.awk" <<\_ACAWK ||
18654BEGIN {
18655_ACEOF
18656
18657# Transform confdefs.h into an awk script `defines.awk', embedded as
18658# here-document in config.status, that substitutes the proper values into
18659# config.h.in to produce config.h.
4e8d927d 18660
81ecdfbb
RW
18661# Create a delimiter string that does not exist in confdefs.h, to ease
18662# handling of long lines.
18663ac_delim='%!_!# '
18664for ac_last_try in false false :; do
18665 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18666 if test -z "$ac_t"; then
18667 break
18668 elif $ac_last_try; then
18669 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18670 else
18671 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18672 fi
18673done
4e8d927d 18674
81ecdfbb
RW
18675# For the awk script, D is an array of macro values keyed by name,
18676# likewise P contains macro parameters if any. Preserve backslash
18677# newline sequences.
18678
18679ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18680sed -n '
18681s/.\{148\}/&'"$ac_delim"'/g
18682t rset
18683:rset
18684s/^[ ]*#[ ]*define[ ][ ]*/ /
18685t def
18686d
18687:def
18688s/\\$//
18689t bsnl
18690s/["\\]/\\&/g
18691s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18692D["\1"]=" \3"/p
18693s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18694d
18695:bsnl
18696s/["\\]/\\&/g
18697s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18698D["\1"]=" \3\\\\\\n"\\/p
18699t cont
18700s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18701t cont
18702d
18703:cont
18704n
18705s/.\{148\}/&'"$ac_delim"'/g
18706t clear
18707:clear
18708s/\\$//
18709t bsnlc
18710s/["\\]/\\&/g; s/^/"/; s/$/"/p
18711d
18712:bsnlc
18713s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18714b cont
18715' <confdefs.h | sed '
18716s/'"$ac_delim"'/"\\\
18717"/g' >>$CONFIG_STATUS || ac_write_fail=1
18718
18719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18720 for (key in D) D_is_set[key] = 1
18721 FS = "\a"
18722}
18723/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18724 line = \$ 0
18725 split(line, arg, " ")
18726 if (arg[1] == "#") {
18727 defundef = arg[2]
18728 mac1 = arg[3]
18729 } else {
18730 defundef = substr(arg[1], 2)
18731 mac1 = arg[2]
18732 }
18733 split(mac1, mac2, "(") #)
18734 macro = mac2[1]
18735 prefix = substr(line, 1, index(line, defundef) - 1)
18736 if (D_is_set[macro]) {
18737 # Preserve the white space surrounding the "#".
18738 print prefix "define", macro P[macro] D[macro]
18739 next
18740 } else {
18741 # Replace #undef with comments. This is necessary, for example,
18742 # in the case of _POSIX_SOURCE, which is predefined and required
18743 # on some systems where configure will not decide to define it.
18744 if (defundef == "undef") {
18745 print "/*", prefix defundef, macro, "*/"
18746 next
18747 }
18748 }
b4e70030 18749}
81ecdfbb
RW
18750{ print }
18751_ACAWK
b4e70030 18752_ACEOF
81ecdfbb
RW
18753cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18754 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18755fi # test -n "$CONFIG_HEADERS"
4e8d927d 18756
4e8d927d 18757
81ecdfbb
RW
18758eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18759shift
18760for ac_tag
18761do
18762 case $ac_tag in
18763 :[FHLC]) ac_mode=$ac_tag; continue;;
18764 esac
18765 case $ac_mode$ac_tag in
18766 :[FHL]*:*);;
18767 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18768 :[FH]-) ac_tag=-:-;;
18769 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18770 esac
18771 ac_save_IFS=$IFS
18772 IFS=:
18773 set x $ac_tag
18774 IFS=$ac_save_IFS
18775 shift
18776 ac_file=$1
18777 shift
4e8d927d 18778
81ecdfbb
RW
18779 case $ac_mode in
18780 :L) ac_source=$1;;
18781 :[FH])
18782 ac_file_inputs=
18783 for ac_f
18784 do
18785 case $ac_f in
18786 -) ac_f="$tmp/stdin";;
18787 *) # Look for the file first in the build tree, then in the source tree
18788 # (if the path is not absolute). The absolute path cannot be DOS-style,
18789 # because $ac_f cannot contain `:'.
18790 test -f "$ac_f" ||
18791 case $ac_f in
18792 [\\/$]*) false;;
18793 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18794 esac ||
18795 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18796 esac
18797 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18798 as_fn_append ac_file_inputs " '$ac_f'"
18799 done
18800
18801 # Let's still pretend it is `configure' which instantiates (i.e., don't
18802 # use $as_me), people would be surprised to read:
18803 # /* config.h. Generated by config.status. */
18804 configure_input='Generated from '`
18805 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18806 `' by configure.'
18807 if test x"$ac_file" != x-; then
18808 configure_input="$ac_file. $configure_input"
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18810$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18811 fi
81ecdfbb
RW
18812 # Neutralize special characters interpreted by sed in replacement strings.
18813 case $configure_input in #(
18814 *\&* | *\|* | *\\* )
18815 ac_sed_conf_input=`$as_echo "$configure_input" |
18816 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18817 *) ac_sed_conf_input=$configure_input;;
18818 esac
4e8d927d 18819
81ecdfbb
RW
18820 case $ac_tag in
18821 *:-:* | *:-) cat >"$tmp/stdin" \
18822 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18823 esac
18824 ;;
c906108c
SS
18825 esac
18826
81ecdfbb 18827 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18828$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18829 X"$ac_file" : 'X\(//\)[^/]' \| \
18830 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18831 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18832$as_echo X"$ac_file" |
18833 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18834 s//\1/
18835 q
18836 }
18837 /^X\(\/\/\)[^/].*/{
18838 s//\1/
18839 q
18840 }
18841 /^X\(\/\/\)$/{
18842 s//\1/
18843 q
18844 }
18845 /^X\(\/\).*/{
18846 s//\1/
18847 q
18848 }
18849 s/.*/./; q'`
18850 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18851 ac_builddir=.
18852
81ecdfbb
RW
18853case "$ac_dir" in
18854.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18855*)
18856 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18857 # A ".." for each directory in $ac_dir_suffix.
18858 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18859 case $ac_top_builddir_sub in
18860 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18861 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18862 esac ;;
18863esac
18864ac_abs_top_builddir=$ac_pwd
18865ac_abs_builddir=$ac_pwd$ac_dir_suffix
18866# for backward compatibility:
18867ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18868
18869case $srcdir in
81ecdfbb 18870 .) # We are building in place.
bec39cab 18871 ac_srcdir=.
81ecdfbb
RW
18872 ac_top_srcdir=$ac_top_builddir_sub
18873 ac_abs_top_srcdir=$ac_pwd ;;
18874 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18875 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18876 ac_top_srcdir=$srcdir
18877 ac_abs_top_srcdir=$srcdir ;;
18878 *) # Relative name.
18879 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18880 ac_top_srcdir=$ac_top_build_prefix$srcdir
18881 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18882esac
81ecdfbb 18883ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18884
c906108c 18885
81ecdfbb
RW
18886 case $ac_mode in
18887 :F)
18888 #
18889 # CONFIG_FILE
18890 #
c906108c 18891
bec39cab
AC
18892 case $INSTALL in
18893 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18894 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18895 esac
81ecdfbb
RW
18896 ac_MKDIR_P=$MKDIR_P
18897 case $MKDIR_P in
18898 [\\/$]* | ?:[\\/]* ) ;;
18899 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18900 esac
18901_ACEOF
121ce6e5 18902
81ecdfbb
RW
18903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18904# If the template does not know about datarootdir, expand it.
18905# FIXME: This hack should be removed a few years after 2.60.
18906ac_datarootdir_hack=; ac_datarootdir_seen=
18907ac_sed_dataroot='
18908/datarootdir/ {
18909 p
18910 q
18911}
18912/@datadir@/p
18913/@docdir@/p
18914/@infodir@/p
18915/@localedir@/p
18916/@mandir@/p'
18917case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18918*datarootdir*) ac_datarootdir_seen=yes;;
18919*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18921$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18922_ACEOF
18923cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18924 ac_datarootdir_hack='
18925 s&@datadir@&$datadir&g
18926 s&@docdir@&$docdir&g
18927 s&@infodir@&$infodir&g
18928 s&@localedir@&$localedir&g
18929 s&@mandir@&$mandir&g
18930 s&\\\${datarootdir}&$datarootdir&g' ;;
18931esac
4e8d927d 18932_ACEOF
81ecdfbb
RW
18933
18934# Neutralize VPATH when `$srcdir' = `.'.
18935# Shell code in configure.ac might set extrasub.
18936# FIXME: do we really want to maintain this feature?
18937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18938ac_sed_extra="$ac_vpsub
bec39cab
AC
18939$extrasub
18940_ACEOF
81ecdfbb 18941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18942:t
18943/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18944s|@configure_input@|$ac_sed_conf_input|;t t
18945s&@top_builddir@&$ac_top_builddir_sub&;t t
18946s&@top_build_prefix@&$ac_top_build_prefix&;t t
18947s&@srcdir@&$ac_srcdir&;t t
18948s&@abs_srcdir@&$ac_abs_srcdir&;t t
18949s&@top_srcdir@&$ac_top_srcdir&;t t
18950s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18951s&@builddir@&$ac_builddir&;t t
18952s&@abs_builddir@&$ac_abs_builddir&;t t
18953s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18954s&@INSTALL@&$ac_INSTALL&;t t
18955s&@MKDIR_P@&$ac_MKDIR_P&;t t
18956$ac_datarootdir_hack
18957"
18958eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18959if $ac_cs_awk_getline; then
18960 $AWK -f "$tmp/subs.awk"
18961else
18962 $AWK -f "$tmp/subs.awk" | $SHELL
18963fi >$tmp/out \
18964 || as_fn_error "could not create $ac_file" "$LINENO" 5
18965
18966test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18967 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18968 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18970which seems to be undefined. Please make sure it is defined." >&5
18971$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18972which seems to be undefined. Please make sure it is defined." >&2;}
18973
18974 rm -f "$tmp/stdin"
bec39cab 18975 case $ac_file in
81ecdfbb
RW
18976 -) cat "$tmp/out" && rm -f "$tmp/out";;
18977 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18978 esac \
18979 || as_fn_error "could not create $ac_file" "$LINENO" 5
18980 ;;
18981 :H)
18982 #
18983 # CONFIG_HEADER
18984 #
bec39cab 18985 if test x"$ac_file" != x-; then
81ecdfbb
RW
18986 {
18987 $as_echo "/* $configure_input */" \
18988 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18989 } >"$tmp/config.h" \
18990 || as_fn_error "could not create $ac_file" "$LINENO" 5
18991 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18993$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18994 else
81ecdfbb
RW
18995 rm -f "$ac_file"
18996 mv "$tmp/config.h" "$ac_file" \
18997 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18998 fi
18999 else
81ecdfbb
RW
19000 $as_echo "/* $configure_input */" \
19001 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
19002 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 19003 fi
81ecdfbb
RW
19004# Compute "$ac_file"'s index in $config_headers.
19005_am_arg="$ac_file"
e28b3332
DJ
19006_am_stamp_count=1
19007for _am_header in $config_headers :; do
19008 case $_am_header in
81ecdfbb 19009 $_am_arg | $_am_arg:* )
e28b3332
DJ
19010 break ;;
19011 * )
19012 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
19013 esac
19014done
81ecdfbb
RW
19015echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
19016$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19017 X"$_am_arg" : 'X\(//\)[^/]' \| \
19018 X"$_am_arg" : 'X\(//\)$' \| \
19019 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
19020$as_echo X"$_am_arg" |
19021 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19022 s//\1/
19023 q
19024 }
19025 /^X\(\/\/\)[^/].*/{
19026 s//\1/
19027 q
19028 }
19029 /^X\(\/\/\)$/{
19030 s//\1/
19031 q
19032 }
19033 /^X\(\/\).*/{
19034 s//\1/
19035 q
19036 }
19037 s/.*/./; q'`/stamp-h$_am_stamp_count
19038 ;;
19039 :L)
19040 #
19041 # CONFIG_LINK
19042 #
c906108c 19043
81ecdfbb
RW
19044 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19045 :
b4e70030 19046 else
81ecdfbb
RW
19047 # Prefer the file from the source tree if names are identical.
19048 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19049 ac_source=$srcdir/$ac_source
19050 fi
b4e70030 19051
81ecdfbb
RW
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19053$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19054
81ecdfbb
RW
19055 if test ! -r "$ac_source"; then
19056 as_fn_error "$ac_source: file not found" "$LINENO" 5
19057 fi
19058 rm -f "$ac_file"
bec39cab 19059
81ecdfbb
RW
19060 # Try a relative symlink, then a hard link, then a copy.
19061 case $srcdir in
19062 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19063 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19064 esac
19065 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19066 ln "$ac_source" "$ac_file" 2>/dev/null ||
19067 cp -p "$ac_source" "$ac_file" ||
19068 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19069 fi
19070 ;;
19071 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19072$as_echo "$as_me: executing $ac_file commands" >&6;}
19073 ;;
c906108c 19074 esac
b4e70030 19075
bec39cab 19076
81ecdfbb
RW
19077 case $ac_file$ac_mode in
19078 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19079 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
19080 # Autoconf 2.62 quotes --file arguments for eval, but not when files
19081 # are listed without --file. Let's play safe and only enable the eval
19082 # if we detect the quoting.
19083 case $CONFIG_FILES in
19084 *\'*) eval set x "$CONFIG_FILES" ;;
19085 *) set x $CONFIG_FILES ;;
19086 esac
19087 shift
19088 for mf
19089 do
19090 # Strip MF so we end up with the name of the file.
19091 mf=`echo "$mf" | sed -e 's/:.*$//'`
19092 # Check whether this is an Automake generated Makefile or not.
19093 # We used to match only the files named `Makefile.in', but
19094 # some people rename them; so instead we look at the file content.
19095 # Grep'ing the first line is not enough: some people post-process
19096 # each Makefile.in and add a new line on top of each file to say so.
19097 # Grep'ing the whole file is not good either: AIX grep has a line
19098 # limit of 2048, but all sed's we know have understand at least 4000.
19099 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
19100 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
19101$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19102 X"$mf" : 'X\(//\)[^/]' \| \
19103 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
19104 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
19105$as_echo X"$mf" |
19106 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19107 s//\1/
19108 q
19109 }
19110 /^X\(\/\/\)[^/].*/{
19111 s//\1/
19112 q
19113 }
19114 /^X\(\/\/\)$/{
19115 s//\1/
19116 q
19117 }
19118 /^X\(\/\).*/{
19119 s//\1/
19120 q
19121 }
19122 s/.*/./; q'`
19123 else
19124 continue
19125 fi
19126 # Extract the definition of DEPDIR, am__include, and am__quote
19127 # from the Makefile without running `make'.
19128 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
19129 test -z "$DEPDIR" && continue
19130 am__include=`sed -n 's/^am__include = //p' < "$mf"`
19131 test -z "am__include" && continue
19132 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
19133 # When using ansi2knr, U may be empty or an underscore; expand it
19134 U=`sed -n 's/^U = //p' < "$mf"`
19135 # Find all dependency output files, they are included files with
19136 # $(DEPDIR) in their names. We invoke sed twice because it is the
19137 # simplest approach to changing $(DEPDIR) to its actual value in the
19138 # expansion.
19139 for file in `sed -n "
19140 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
19141 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
19142 # Make sure the directory exists.
19143 test -f "$dirpart/$file" && continue
19144 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
19145$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19146 X"$file" : 'X\(//\)[^/]' \| \
19147 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
19148 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
19149$as_echo X"$file" |
19150 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19151 s//\1/
19152 q
19153 }
19154 /^X\(\/\/\)[^/].*/{
19155 s//\1/
19156 q
19157 }
19158 /^X\(\/\/\)$/{
19159 s//\1/
19160 q
19161 }
19162 /^X\(\/\).*/{
19163 s//\1/
19164 q
19165 }
19166 s/.*/./; q'`
19167 as_dir=$dirpart/$fdir; as_fn_mkdir_p
19168 # echo "creating $dirpart/$file"
19169 echo '# dummy' > "$dirpart/$file"
e28b3332 19170 done
e28b3332 19171 done
81ecdfbb 19172}
4e8d927d 19173 ;;
81ecdfbb 19174 "default":C)
c906108c
SS
19175case x$CONFIG_HEADERS in
19176xconfig.h:config.in)
19177echo > stamp-h ;;
19178esac
bec39cab 19179 ;;
81ecdfbb 19180
bec39cab 19181 esac
81ecdfbb 19182done # for ac_tag
c906108c 19183
bec39cab 19184
81ecdfbb 19185as_fn_exit 0
bec39cab 19186_ACEOF
bec39cab
AC
19187ac_clean_files=$ac_clean_files_save
19188
81ecdfbb
RW
19189test $ac_write_fail = 0 ||
19190 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
19191
bec39cab
AC
19192
19193# configure is writing to config.log, and then calls config.status.
19194# config.status does its own redirection, appending to config.log.
19195# Unfortunately, on DOS this fails, as config.log is still kept open
19196# by configure, so config.status won't be able to write to it; its
19197# output is simply discarded. So we exec the FD to /dev/null,
19198# effectively closing config.log, so it can be properly (re)opened and
19199# appended to by config.status. When coming back to configure, we
19200# need to make the FD available again.
19201if test "$no_create" != yes; then
19202 ac_cs_success=:
19203 ac_config_status_args=
19204 test "$silent" = yes &&
19205 ac_config_status_args="$ac_config_status_args --quiet"
19206 exec 5>/dev/null
19207 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19208 exec 5>>config.log
19209 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19210 # would make configure fail if this is the last instruction.
81ecdfbb 19211 $ac_cs_success || as_fn_exit $?
bec39cab 19212fi
c906108c 19213
bec39cab 19214#
81ecdfbb 19215# CONFIG_SUBDIRS section.
bec39cab 19216#
c906108c
SS
19217if test "$no_recursion" != yes; then
19218
81ecdfbb
RW
19219 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19220 # so they do not pile up.
c906108c
SS
19221 ac_sub_configure_args=
19222 ac_prev=
fdc59709
PB
19223 eval "set x $ac_configure_args"
19224 shift
19225 for ac_arg
19226 do
c906108c
SS
19227 if test -n "$ac_prev"; then
19228 ac_prev=
19229 continue
19230 fi
bec39cab 19231 case $ac_arg in
c906108c
SS
19232 -cache-file | --cache-file | --cache-fil | --cache-fi \
19233 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19234 ac_prev=cache_file ;;
19235 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19236 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19237 | --c=*)
19238 ;;
19239 --config-cache | -C)
c906108c
SS
19240 ;;
19241 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19242 ac_prev=srcdir ;;
19243 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19244 ;;
bec39cab
AC
19245 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19246 ac_prev=prefix ;;
19247 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19248 ;;
81ecdfbb
RW
19249 --disable-option-checking)
19250 ;;
fdc59709
PB
19251 *)
19252 case $ac_arg in
81ecdfbb 19253 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19254 esac
81ecdfbb 19255 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19256 esac
19257 done
19258
bec39cab
AC
19259 # Always prepend --prefix to ensure using the same prefix
19260 # in subdir configurations.
fdc59709
PB
19261 ac_arg="--prefix=$prefix"
19262 case $ac_arg in
81ecdfbb 19263 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19264 esac
81ecdfbb
RW
19265 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19266
19267 # Pass --silent
19268 if test "$silent" = yes; then
19269 ac_sub_configure_args="--silent $ac_sub_configure_args"
19270 fi
19271
19272 # Always prepend --disable-option-checking to silence warnings, since
19273 # different subdirs can have different --enable and --with options.
19274 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19275
b4e70030 19276 ac_popdir=`pwd`
bec39cab 19277 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19278
19279 # Do not complain, so a configure script can configure whichever
19280 # parts of a large source tree are present.
fdc59709 19281 test -d "$srcdir/$ac_dir" || continue
c906108c 19282
81ecdfbb
RW
19283 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19284 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19285 $as_echo "$ac_msg" >&6
19286 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19287 ac_builddir=.
19288
81ecdfbb
RW
19289case "$ac_dir" in
19290.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19291*)
19292 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19293 # A ".." for each directory in $ac_dir_suffix.
19294 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19295 case $ac_top_builddir_sub in
19296 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19297 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19298 esac ;;
19299esac
19300ac_abs_top_builddir=$ac_pwd
19301ac_abs_builddir=$ac_pwd$ac_dir_suffix
19302# for backward compatibility:
19303ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19304
19305case $srcdir in
81ecdfbb 19306 .) # We are building in place.
bec39cab 19307 ac_srcdir=.
81ecdfbb
RW
19308 ac_top_srcdir=$ac_top_builddir_sub
19309 ac_abs_top_srcdir=$ac_pwd ;;
19310 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19311 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19312 ac_top_srcdir=$srcdir
19313 ac_abs_top_srcdir=$srcdir ;;
19314 *) # Relative name.
19315 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19316 ac_top_srcdir=$ac_top_build_prefix$srcdir
19317 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19318esac
81ecdfbb 19319ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19320
c906108c 19321
fdc59709 19322 cd "$ac_dir"
c906108c
SS
19323
19324 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19325 if test -f "$ac_srcdir/configure.gnu"; then
19326 ac_sub_configure=$ac_srcdir/configure.gnu
19327 elif test -f "$ac_srcdir/configure"; then
19328 ac_sub_configure=$ac_srcdir/configure
19329 elif test -f "$ac_srcdir/configure.in"; then
19330 # This should be Cygnus configure.
19331 ac_sub_configure=$ac_aux_dir/configure
c906108c 19332 else
81ecdfbb
RW
19333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19334$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19335 ac_sub_configure=
19336 fi
19337
19338 # The recursion is here.
19339 if test -n "$ac_sub_configure"; then
c906108c 19340 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19341 case $cache_file in
19342 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19343 *) # Relative name.
19344 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19345 esac
c906108c 19346
81ecdfbb
RW
19347 { $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
19348$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19349 # The eval makes quoting arguments work.
fdc59709
PB
19350 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19351 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 19352 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19353 fi
19354
fdc59709 19355 cd "$ac_popdir"
c906108c
SS
19356 done
19357fi
81ecdfbb
RW
19358if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19359 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19360$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19361fi
c906108c
SS
19362
19363
19364exit 0
This page took 2.85107 seconds and 4 git commands to generate.