2012-04-18 Pedro Alves <palves@redhat.com>
[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
81ecdfbb
RW
677YFLAGS
678YACC
679LN_S
680REPORT_BUGS_TEXI
681REPORT_BUGS_TO
682PKGVERSION
683TARGET_OBS
684subdirs
685GDB_DATADIR
686DEBUGDIR
687am__fastdepCC_FALSE
688am__fastdepCC_TRUE
689AMDEPBACKSLASH
690AMDEP_FALSE
691AMDEP_TRUE
692am__quote
693am__include
694am__untar
695am__tar
696AMTAR
697AWK
698mkdir_p
699MKDIR_P
700INSTALL_STRIP_PROGRAM
701STRIP
702install_sh
81ecdfbb
RW
703AUTOHEADER
704AUTOMAKE
705AUTOCONF
706ACLOCAL
707VERSION
708CYGPATH_W
709am__isrc
710INSTALL_DATA
711INSTALL_SCRIPT
712INSTALL_PROGRAM
5048e516
JK
713MAKEINFO_EXTRA_FLAGS
714MAKEINFOFLAGS
715MAKEINFO
81ecdfbb
RW
716PACKAGE
717GNULIB_STDINT_H
718LIBGNU_LTLIBDEPS
719LIBGNU_LIBDEPS
f434ba03 720gltests_WITNESS
f434ba03 721NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb 722NEXT_STRING_H
f434ba03
PA
723NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
724NEXT_STDDEF_H
770d76d7
PA
725GL_GENERATE_STDDEF_H_FALSE
726GL_GENERATE_STDDEF_H_TRUE
f434ba03
PA
727STDDEF_H
728HAVE_WCHAR_T
729REPLACE_NULL
f434ba03
PA
730UNDEFINE_STRTOK_R
731REPLACE_STRTOK_R
81ecdfbb 732REPLACE_STRSIGNAL
f434ba03
PA
733REPLACE_STRNLEN
734REPLACE_STRNDUP
735REPLACE_STRNCAT
770d76d7 736REPLACE_STRERROR_R
81ecdfbb 737REPLACE_STRERROR
770d76d7 738REPLACE_STRCHRNUL
f434ba03
PA
739REPLACE_STRCASESTR
740REPLACE_STRSTR
741REPLACE_STRDUP
742REPLACE_STPNCPY
743REPLACE_MEMMEM
744REPLACE_MEMCHR
745HAVE_STRVERSCMP
81ecdfbb 746HAVE_DECL_STRSIGNAL
770d76d7 747HAVE_DECL_STRERROR_R
81ecdfbb
RW
748HAVE_DECL_STRTOK_R
749HAVE_STRCASESTR
750HAVE_STRSEP
751HAVE_STRPBRK
752HAVE_DECL_STRNLEN
753HAVE_DECL_STRNDUP
81ecdfbb
RW
754HAVE_DECL_STRDUP
755HAVE_STRCHRNUL
756HAVE_STPNCPY
757HAVE_STPCPY
f434ba03 758HAVE_RAWMEMCHR
81ecdfbb
RW
759HAVE_DECL_MEMRCHR
760HAVE_MEMPCPY
761HAVE_DECL_MEMMEM
f434ba03 762HAVE_MEMCHR
770d76d7
PA
763HAVE_FFSLL
764HAVE_FFSL
f434ba03
PA
765HAVE_MBSLEN
766GNULIB_STRVERSCMP
81ecdfbb 767GNULIB_STRSIGNAL
770d76d7 768GNULIB_STRERROR_R
81ecdfbb
RW
769GNULIB_STRERROR
770GNULIB_MBSTOK_R
771GNULIB_MBSSEP
772GNULIB_MBSSPN
773GNULIB_MBSPBRK
774GNULIB_MBSCSPN
775GNULIB_MBSCASESTR
776GNULIB_MBSPCASECMP
777GNULIB_MBSNCASECMP
778GNULIB_MBSCASECMP
779GNULIB_MBSSTR
780GNULIB_MBSRCHR
781GNULIB_MBSCHR
782GNULIB_MBSNLEN
783GNULIB_MBSLEN
784GNULIB_STRTOK_R
785GNULIB_STRCASESTR
786GNULIB_STRSTR
787GNULIB_STRSEP
788GNULIB_STRPBRK
789GNULIB_STRNLEN
790GNULIB_STRNDUP
f434ba03 791GNULIB_STRNCAT
81ecdfbb
RW
792GNULIB_STRDUP
793GNULIB_STRCHRNUL
794GNULIB_STPNCPY
795GNULIB_STPCPY
f434ba03 796GNULIB_RAWMEMCHR
81ecdfbb
RW
797GNULIB_MEMRCHR
798GNULIB_MEMPCPY
799GNULIB_MEMMEM
f434ba03 800GNULIB_MEMCHR
770d76d7
PA
801GNULIB_FFSLL
802GNULIB_FFSL
803NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
804NEXT_INTTYPES_H
55a8c076
YQ
805UINT64_MAX_EQ_ULONG_MAX
806UINT32_MAX_LT_UINTMAX_MAX
770d76d7
PA
807PRIPTR_PREFIX
808PRI_MACROS_BROKEN
55a8c076
YQ
809INT64_MAX_EQ_LONG_MAX
810INT32_MAX_LT_INTMAX_MAX
770d76d7 811REPLACE_STRTOIMAX
55a8c076
YQ
812HAVE_DECL_STRTOUMAX
813HAVE_DECL_STRTOIMAX
814HAVE_DECL_IMAXDIV
815HAVE_DECL_IMAXABS
816GNULIB_STRTOUMAX
817GNULIB_STRTOIMAX
818GNULIB_IMAXDIV
819GNULIB_IMAXABS
770d76d7
PA
820GL_GENERATE_STDINT_H_FALSE
821GL_GENERATE_STDINT_H_TRUE
55a8c076
YQ
822STDINT_H
823WINT_T_SUFFIX
824WCHAR_T_SUFFIX
825SIG_ATOMIC_T_SUFFIX
826SIZE_T_SUFFIX
827PTRDIFF_T_SUFFIX
828HAVE_SIGNED_WINT_T
829HAVE_SIGNED_WCHAR_T
830HAVE_SIGNED_SIG_ATOMIC_T
831BITSIZEOF_WINT_T
832BITSIZEOF_WCHAR_T
833BITSIZEOF_SIG_ATOMIC_T
834BITSIZEOF_SIZE_T
835BITSIZEOF_PTRDIFF_T
836APPLE_UNIVERSAL_BUILD
837HAVE_SYS_BITYPES_H
838HAVE_SYS_INTTYPES_H
839HAVE_STDINT_H
840NEXT_AS_FIRST_DIRECTIVE_STDINT_H
841NEXT_STDINT_H
770d76d7 842PRAGMA_COLUMNS
55a8c076
YQ
843PRAGMA_SYSTEM_HEADER
844INCLUDE_NEXT_AS_FIRST_DIRECTIVE
845INCLUDE_NEXT
846HAVE_SYS_TYPES_H
847HAVE_INTTYPES_H
770d76d7 848HAVE_WCHAR_H
55a8c076
YQ
849HAVE_UNSIGNED_LONG_LONG_INT
850HAVE_LONG_LONG_INT
81ecdfbb
RW
851GL_COND_LIBTOOL_FALSE
852GL_COND_LIBTOOL_TRUE
853CATOBJEXT
854GENCAT
855INSTOBJEXT
856DATADIRNAME
857CATALOGS
858POSUB
859GMSGFMT
860XGETTEXT
861INCINTL
862LIBINTL_DEP
863LIBINTL
864USE_NLS
865SET_MAKE
866GMAKE_FALSE
867GMAKE_TRUE
868MAKE
869CCDEPMODE
870DEPDIR
871am__leading_dot
872target_os
873target_vendor
874target_cpu
875target
f434ba03 876RANLIB
770d76d7
PA
877ARFLAGS
878AR
f434ba03
PA
879EGREP
880GREP
881CPP
81ecdfbb
RW
882host_os
883host_vendor
884host_cpu
885host
886build_os
887build_vendor
888build_cpu
889build
81ecdfbb
RW
890OBJEXT
891EXEEXT
892ac_ct_CC
893CPPFLAGS
894LDFLAGS
895CFLAGS
896CC
897MAINT
898MAINTAINER_MODE_FALSE
899MAINTAINER_MODE_TRUE
900target_alias
901host_alias
902build_alias
903LIBS
904ECHO_T
905ECHO_N
906ECHO_C
907DEFS
908mandir
909localedir
910libdir
911psdir
912pdfdir
913dvidir
914htmldir
915infodir
916docdir
917oldincludedir
918includedir
919localstatedir
920sharedstatedir
921sysconfdir
922datadir
923datarootdir
924libexecdir
925sbindir
926bindir
927program_transform_name
928prefix
929exec_prefix
930PACKAGE_URL
931PACKAGE_BUGREPORT
932PACKAGE_STRING
933PACKAGE_VERSION
934PACKAGE_TARNAME
935PACKAGE_NAME
936PATH_SEPARATOR
937SHELL'
a4ce5b0d 938ac_subst_files='host_makefile_frag'
81ecdfbb
RW
939ac_user_opts='
940enable_option_checking
941enable_maintainer_mode
da2f07f1
JK
942enable_plugins
943enable_largefile
81ecdfbb
RW
944enable_dependency_tracking
945with_separate_debug_dir
946with_gdb_datadir
947with_relocated_sources
bccbefd2 948with_auto_load_safe_path
81ecdfbb
RW
949enable_targets
950enable_64_bit_bfd
951enable_gdbcli
952enable_gdbmi
953enable_tui
954enable_gdbtk
05e7c244 955with_libunwind_ia64
81ecdfbb
RW
956with_curses
957enable_profiling
958with_pkgversion
959with_bugurl
b040ad30 960with_zlib
81ecdfbb 961with_libiconv_prefix
478aac75 962with_iconv_bin
81ecdfbb 963with_system_readline
b8e0a31c 964with_jit_reader_dir
81ecdfbb
RW
965with_expat
966with_gnu_ld
967enable_rpath
968with_libexpat_prefix
969with_python
970with_included_regex
971with_sysroot
972with_system_gdbinit
973enable_werror
974enable_build_warnings
975enable_gdb_build_warnings
976with_tcl
977with_tk
978with_x
979enable_sim
980enable_multi_ice
496c0e1b 981enable_gdbserver
81ecdfbb
RW
982'
983 ac_precious_vars='build_alias
984host_alias
985target_alias
986CC
987CFLAGS
988LDFLAGS
989LIBS
990CPPFLAGS
991CPP
f06e05e0
JK
992MAKEINFO
993MAKEINFOFLAGS
81ecdfbb
RW
994YACC
995YFLAGS
996XMKMF'
5ae98d25 997ac_subdirs_all='testsuite
81ecdfbb
RW
998gdbtk
999multi-ice
1000gdbserver'
c906108c
SS
1001
1002# Initialize some variables set by options.
bec39cab
AC
1003ac_init_help=
1004ac_init_version=false
81ecdfbb
RW
1005ac_unrecognized_opts=
1006ac_unrecognized_sep=
c906108c
SS
1007# The variables have the same names as the options, with
1008# dashes changed to underlines.
bec39cab 1009cache_file=/dev/null
c906108c 1010exec_prefix=NONE
c906108c 1011no_create=
c906108c
SS
1012no_recursion=
1013prefix=NONE
1014program_prefix=NONE
1015program_suffix=NONE
1016program_transform_name=s,x,x,
1017silent=
1018site=
1019srcdir=
c906108c
SS
1020verbose=
1021x_includes=NONE
1022x_libraries=NONE
bec39cab
AC
1023
1024# Installation directory options.
1025# These are left unexpanded so users can "make install exec_prefix=/foo"
1026# and all the variables that are supposed to be based on exec_prefix
1027# by default will actually change.
1028# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1029# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1030bindir='${exec_prefix}/bin'
1031sbindir='${exec_prefix}/sbin'
1032libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1033datarootdir='${prefix}/share'
1034datadir='${datarootdir}'
c906108c
SS
1035sysconfdir='${prefix}/etc'
1036sharedstatedir='${prefix}/com'
1037localstatedir='${prefix}/var'
c906108c
SS
1038includedir='${prefix}/include'
1039oldincludedir='/usr/include'
81ecdfbb
RW
1040docdir='${datarootdir}/doc/${PACKAGE}'
1041infodir='${datarootdir}/info'
1042htmldir='${docdir}'
1043dvidir='${docdir}'
1044pdfdir='${docdir}'
1045psdir='${docdir}'
1046libdir='${exec_prefix}/lib'
1047localedir='${datarootdir}/locale'
1048mandir='${datarootdir}/man'
c906108c 1049
c906108c 1050ac_prev=
81ecdfbb 1051ac_dashdash=
c906108c
SS
1052for ac_option
1053do
c906108c
SS
1054 # If the previous option needs an argument, assign it.
1055 if test -n "$ac_prev"; then
81ecdfbb 1056 eval $ac_prev=\$ac_option
c906108c
SS
1057 ac_prev=
1058 continue
1059 fi
1060
81ecdfbb
RW
1061 case $ac_option in
1062 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1063 *) ac_optarg=yes ;;
1064 esac
c906108c
SS
1065
1066 # Accept the important Cygnus configure options, so we can diagnose typos.
1067
81ecdfbb
RW
1068 case $ac_dashdash$ac_option in
1069 --)
1070 ac_dashdash=yes ;;
c906108c
SS
1071
1072 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1073 ac_prev=bindir ;;
1074 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1075 bindir=$ac_optarg ;;
c906108c
SS
1076
1077 -build | --build | --buil | --bui | --bu)
bec39cab 1078 ac_prev=build_alias ;;
c906108c 1079 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1080 build_alias=$ac_optarg ;;
c906108c
SS
1081
1082 -cache-file | --cache-file | --cache-fil | --cache-fi \
1083 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1084 ac_prev=cache_file ;;
1085 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1086 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1087 cache_file=$ac_optarg ;;
1088
1089 --config-cache | -C)
1090 cache_file=config.cache ;;
c906108c 1091
81ecdfbb 1092 -datadir | --datadir | --datadi | --datad)
c906108c 1093 ac_prev=datadir ;;
81ecdfbb 1094 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1095 datadir=$ac_optarg ;;
c906108c 1096
81ecdfbb
RW
1097 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1098 | --dataroo | --dataro | --datar)
1099 ac_prev=datarootdir ;;
1100 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1101 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1102 datarootdir=$ac_optarg ;;
1103
c906108c 1104 -disable-* | --disable-*)
81ecdfbb 1105 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1106 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1107 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1108 as_fn_error "invalid feature name: $ac_useropt"
1109 ac_useropt_orig=$ac_useropt
1110 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1111 case $ac_user_opts in
1112 *"
1113"enable_$ac_useropt"
1114"*) ;;
1115 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1116 ac_unrecognized_sep=', ';;
1117 esac
1118 eval enable_$ac_useropt=no ;;
1119
1120 -docdir | --docdir | --docdi | --doc | --do)
1121 ac_prev=docdir ;;
1122 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1123 docdir=$ac_optarg ;;
1124
1125 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1126 ac_prev=dvidir ;;
1127 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1128 dvidir=$ac_optarg ;;
c906108c
SS
1129
1130 -enable-* | --enable-*)
81ecdfbb 1131 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1132 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1133 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1134 as_fn_error "invalid feature name: $ac_useropt"
1135 ac_useropt_orig=$ac_useropt
1136 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1137 case $ac_user_opts in
1138 *"
1139"enable_$ac_useropt"
1140"*) ;;
1141 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1142 ac_unrecognized_sep=', ';;
b4e70030 1143 esac
81ecdfbb 1144 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1145
1146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1148 | --exec | --exe | --ex)
1149 ac_prev=exec_prefix ;;
1150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1152 | --exec=* | --exe=* | --ex=*)
bec39cab 1153 exec_prefix=$ac_optarg ;;
c906108c
SS
1154
1155 -gas | --gas | --ga | --g)
1156 # Obsolete; use --with-gas.
1157 with_gas=yes ;;
1158
bec39cab
AC
1159 -help | --help | --hel | --he | -h)
1160 ac_init_help=long ;;
1161 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1162 ac_init_help=recursive ;;
1163 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1164 ac_init_help=short ;;
c906108c
SS
1165
1166 -host | --host | --hos | --ho)
bec39cab 1167 ac_prev=host_alias ;;
c906108c 1168 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1169 host_alias=$ac_optarg ;;
c906108c 1170
81ecdfbb
RW
1171 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1172 ac_prev=htmldir ;;
1173 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1174 | --ht=*)
1175 htmldir=$ac_optarg ;;
1176
c906108c
SS
1177 -includedir | --includedir | --includedi | --included | --include \
1178 | --includ | --inclu | --incl | --inc)
1179 ac_prev=includedir ;;
1180 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1181 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1182 includedir=$ac_optarg ;;
c906108c
SS
1183
1184 -infodir | --infodir | --infodi | --infod | --info | --inf)
1185 ac_prev=infodir ;;
1186 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1187 infodir=$ac_optarg ;;
c906108c
SS
1188
1189 -libdir | --libdir | --libdi | --libd)
1190 ac_prev=libdir ;;
1191 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1192 libdir=$ac_optarg ;;
c906108c
SS
1193
1194 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1195 | --libexe | --libex | --libe)
1196 ac_prev=libexecdir ;;
1197 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1198 | --libexe=* | --libex=* | --libe=*)
bec39cab 1199 libexecdir=$ac_optarg ;;
c906108c 1200
81ecdfbb
RW
1201 -localedir | --localedir | --localedi | --localed | --locale)
1202 ac_prev=localedir ;;
1203 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1204 localedir=$ac_optarg ;;
1205
c906108c 1206 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1207 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1208 ac_prev=localstatedir ;;
1209 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1210 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1211 localstatedir=$ac_optarg ;;
c906108c
SS
1212
1213 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1214 ac_prev=mandir ;;
1215 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1216 mandir=$ac_optarg ;;
c906108c
SS
1217
1218 -nfp | --nfp | --nf)
1219 # Obsolete; use --without-fp.
1220 with_fp=no ;;
1221
1222 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1223 | --no-cr | --no-c | -n)
c906108c
SS
1224 no_create=yes ;;
1225
1226 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1227 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1228 no_recursion=yes ;;
1229
1230 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1231 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1232 | --oldin | --oldi | --old | --ol | --o)
1233 ac_prev=oldincludedir ;;
1234 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1235 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1236 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1237 oldincludedir=$ac_optarg ;;
c906108c
SS
1238
1239 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1240 ac_prev=prefix ;;
1241 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1242 prefix=$ac_optarg ;;
c906108c
SS
1243
1244 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1245 | --program-pre | --program-pr | --program-p)
1246 ac_prev=program_prefix ;;
1247 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1248 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1249 program_prefix=$ac_optarg ;;
c906108c
SS
1250
1251 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1252 | --program-suf | --program-su | --program-s)
1253 ac_prev=program_suffix ;;
1254 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1255 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1256 program_suffix=$ac_optarg ;;
c906108c
SS
1257
1258 -program-transform-name | --program-transform-name \
1259 | --program-transform-nam | --program-transform-na \
1260 | --program-transform-n | --program-transform- \
1261 | --program-transform | --program-transfor \
1262 | --program-transfo | --program-transf \
1263 | --program-trans | --program-tran \
1264 | --progr-tra | --program-tr | --program-t)
1265 ac_prev=program_transform_name ;;
1266 -program-transform-name=* | --program-transform-name=* \
1267 | --program-transform-nam=* | --program-transform-na=* \
1268 | --program-transform-n=* | --program-transform-=* \
1269 | --program-transform=* | --program-transfor=* \
1270 | --program-transfo=* | --program-transf=* \
1271 | --program-trans=* | --program-tran=* \
1272 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1273 program_transform_name=$ac_optarg ;;
c906108c 1274
81ecdfbb
RW
1275 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1276 ac_prev=pdfdir ;;
1277 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1278 pdfdir=$ac_optarg ;;
1279
1280 -psdir | --psdir | --psdi | --psd | --ps)
1281 ac_prev=psdir ;;
1282 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1283 psdir=$ac_optarg ;;
1284
c906108c
SS
1285 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1286 | -silent | --silent | --silen | --sile | --sil)
1287 silent=yes ;;
1288
1289 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1290 ac_prev=sbindir ;;
1291 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1292 | --sbi=* | --sb=*)
bec39cab 1293 sbindir=$ac_optarg ;;
c906108c
SS
1294
1295 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1296 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1297 | --sharedst | --shareds | --shared | --share | --shar \
1298 | --sha | --sh)
1299 ac_prev=sharedstatedir ;;
1300 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1301 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1302 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1303 | --sha=* | --sh=*)
bec39cab 1304 sharedstatedir=$ac_optarg ;;
c906108c
SS
1305
1306 -site | --site | --sit)
1307 ac_prev=site ;;
1308 -site=* | --site=* | --sit=*)
bec39cab 1309 site=$ac_optarg ;;
3ace7edb 1310
c906108c
SS
1311 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1312 ac_prev=srcdir ;;
1313 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1314 srcdir=$ac_optarg ;;
c906108c
SS
1315
1316 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1317 | --syscon | --sysco | --sysc | --sys | --sy)
1318 ac_prev=sysconfdir ;;
1319 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1320 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1321 sysconfdir=$ac_optarg ;;
c906108c
SS
1322
1323 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1324 ac_prev=target_alias ;;
c906108c 1325 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1326 target_alias=$ac_optarg ;;
c906108c
SS
1327
1328 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1329 verbose=yes ;;
1330
bec39cab
AC
1331 -version | --version | --versio | --versi | --vers | -V)
1332 ac_init_version=: ;;
c906108c
SS
1333
1334 -with-* | --with-*)
81ecdfbb 1335 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1336 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1337 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1338 as_fn_error "invalid package name: $ac_useropt"
1339 ac_useropt_orig=$ac_useropt
1340 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1341 case $ac_user_opts in
1342 *"
1343"with_$ac_useropt"
1344"*) ;;
1345 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1346 ac_unrecognized_sep=', ';;
b4e70030 1347 esac
81ecdfbb 1348 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1349
1350 -without-* | --without-*)
81ecdfbb 1351 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1352 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1353 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354 as_fn_error "invalid package name: $ac_useropt"
1355 ac_useropt_orig=$ac_useropt
1356 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357 case $ac_user_opts in
1358 *"
1359"with_$ac_useropt"
1360"*) ;;
1361 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1362 ac_unrecognized_sep=', ';;
1363 esac
1364 eval with_$ac_useropt=no ;;
c906108c
SS
1365
1366 --x)
1367 # Obsolete; use --with-x.
1368 with_x=yes ;;
1369
1370 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1371 | --x-incl | --x-inc | --x-in | --x-i)
1372 ac_prev=x_includes ;;
1373 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1374 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1375 x_includes=$ac_optarg ;;
c906108c
SS
1376
1377 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1378 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1379 ac_prev=x_libraries ;;
1380 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1381 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1382 x_libraries=$ac_optarg ;;
c906108c 1383
81ecdfbb
RW
1384 -*) as_fn_error "unrecognized option: \`$ac_option'
1385Try \`$0 --help' for more information."
c906108c
SS
1386 ;;
1387
bec39cab
AC
1388 *=*)
1389 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1390 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1391 case $ac_envvar in #(
1392 '' | [0-9]* | *[!_$as_cr_alnum]* )
1393 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1394 esac
1395 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1396 export $ac_envvar ;;
1397
c906108c 1398 *)
bec39cab 1399 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1400 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1401 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1402 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1403 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1404 ;;
1405
1406 esac
1407done
1408
1409if test -n "$ac_prev"; then
bec39cab 1410 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1411 as_fn_error "missing argument to $ac_option"
c906108c 1412fi
c906108c 1413
81ecdfbb
RW
1414if test -n "$ac_unrecognized_opts"; then
1415 case $enable_option_checking in
1416 no) ;;
1417 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1418 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1419 esac
81ecdfbb 1420fi
b4e70030 1421
81ecdfbb
RW
1422# Check all directory arguments for consistency.
1423for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1424 datadir sysconfdir sharedstatedir localstatedir includedir \
1425 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1426 libdir localedir mandir
b4e70030 1427do
81ecdfbb
RW
1428 eval ac_val=\$$ac_var
1429 # Remove trailing slashes.
1430 case $ac_val in
1431 */ )
1432 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1433 eval $ac_var=\$ac_val;;
1434 esac
1435 # Be sure to have absolute directory names.
b4e70030 1436 case $ac_val in
81ecdfbb
RW
1437 [\\/$]* | ?:[\\/]* ) continue;;
1438 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1439 esac
81ecdfbb 1440 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1441done
1442
bec39cab
AC
1443# There might be people who depend on the old broken behavior: `$host'
1444# used to hold the argument of --host etc.
1445# FIXME: To remove some day.
1446build=$build_alias
1447host=$host_alias
1448target=$target_alias
1449
1450# FIXME: To remove some day.
1451if test "x$host_alias" != x; then
1452 if test "x$build_alias" = x; then
1453 cross_compiling=maybe
81ecdfbb 1454 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1455 If a cross compiler is detected then cross compile mode will be used." >&2
1456 elif test "x$build_alias" != "x$host_alias"; then
1457 cross_compiling=yes
1458 fi
1459fi
c906108c 1460
bec39cab
AC
1461ac_tool_prefix=
1462test -n "$host_alias" && ac_tool_prefix=$host_alias-
1463
1464test "$silent" = yes && exec 6>/dev/null
c906108c 1465
c906108c 1466
81ecdfbb
RW
1467ac_pwd=`pwd` && test -n "$ac_pwd" &&
1468ac_ls_di=`ls -di .` &&
1469ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1470 as_fn_error "working directory cannot be determined"
1471test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1472 as_fn_error "pwd does not report name of working directory"
1473
1474
c906108c
SS
1475# Find the source files, if location was not specified.
1476if test -z "$srcdir"; then
1477 ac_srcdir_defaulted=yes
81ecdfbb
RW
1478 # Try the directory containing this script, then the parent directory.
1479 ac_confdir=`$as_dirname -- "$as_myself" ||
1480$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1481 X"$as_myself" : 'X\(//\)[^/]' \| \
1482 X"$as_myself" : 'X\(//\)$' \| \
1483 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1484$as_echo X"$as_myself" |
1485 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1486 s//\1/
1487 q
1488 }
1489 /^X\(\/\/\)[^/].*/{
1490 s//\1/
1491 q
1492 }
1493 /^X\(\/\/\)$/{
1494 s//\1/
1495 q
1496 }
1497 /^X\(\/\).*/{
1498 s//\1/
1499 q
1500 }
1501 s/.*/./; q'`
c906108c 1502 srcdir=$ac_confdir
81ecdfbb 1503 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1504 srcdir=..
1505 fi
1506else
1507 ac_srcdir_defaulted=no
1508fi
81ecdfbb
RW
1509if test ! -r "$srcdir/$ac_unique_file"; then
1510 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1511 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1512fi
1513ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1514ac_abs_confdir=`(
1515 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1516 pwd)`
1517# When building in place, set srcdir=.
1518if test "$ac_abs_confdir" = "$ac_pwd"; then
1519 srcdir=.
1520fi
1521# Remove unnecessary trailing slashes from srcdir.
1522# Double slashes in file names in object file debugging info
1523# mess up M-x gdb in Emacs.
1524case $srcdir in
1525*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1526esac
1527for ac_var in $ac_precious_vars; do
1528 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1529 eval ac_env_${ac_var}_value=\$${ac_var}
1530 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1531 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1532done
c906108c 1533
bec39cab
AC
1534#
1535# Report the --help message.
1536#
1537if test "$ac_init_help" = "long"; then
1538 # Omit some internal or obsolete options to make the list less imposing.
1539 # This message is too long to be a string in the A/UX 3.1 sh.
1540 cat <<_ACEOF
1541\`configure' configures this package to adapt to many kinds of systems.
1542
1543Usage: $0 [OPTION]... [VAR=VALUE]...
1544
1545To assign environment variables (e.g., CC, CFLAGS...), specify them as
1546VAR=VALUE. See below for descriptions of some of the useful variables.
1547
1548Defaults for the options are specified in brackets.
1549
1550Configuration:
1551 -h, --help display this help and exit
1552 --help=short display options specific to this package
1553 --help=recursive display the short help of all the included packages
1554 -V, --version display version information and exit
1555 -q, --quiet, --silent do not print \`checking...' messages
1556 --cache-file=FILE cache test results in FILE [disabled]
1557 -C, --config-cache alias for \`--cache-file=config.cache'
1558 -n, --no-create do not create output files
1559 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1560
bec39cab
AC
1561Installation directories:
1562 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1563 [$ac_default_prefix]
bec39cab 1564 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1565 [PREFIX]
bec39cab
AC
1566
1567By default, \`make install' will install all the files in
1568\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1569an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1570for instance \`--prefix=\$HOME'.
1571
1572For better control, use the options below.
1573
1574Fine tuning of the installation directories:
81ecdfbb
RW
1575 --bindir=DIR user executables [EPREFIX/bin]
1576 --sbindir=DIR system admin executables [EPREFIX/sbin]
1577 --libexecdir=DIR program executables [EPREFIX/libexec]
1578 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1579 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1580 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1581 --libdir=DIR object code libraries [EPREFIX/lib]
1582 --includedir=DIR C header files [PREFIX/include]
1583 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1584 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1585 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1586 --infodir=DIR info documentation [DATAROOTDIR/info]
1587 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1588 --mandir=DIR man documentation [DATAROOTDIR/man]
1589 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1590 --htmldir=DIR html documentation [DOCDIR]
1591 --dvidir=DIR dvi documentation [DOCDIR]
1592 --pdfdir=DIR pdf documentation [DOCDIR]
1593 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1594_ACEOF
1595
1596 cat <<\_ACEOF
1597
1598Program names:
1599 --program-prefix=PREFIX prepend PREFIX to installed program names
1600 --program-suffix=SUFFIX append SUFFIX to installed program names
1601 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1602
1603X features:
1604 --x-includes=DIR X include files are in DIR
1605 --x-libraries=DIR X library files are in DIR
1606
1607System types:
1608 --build=BUILD configure for building on BUILD [guessed]
1609 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1610 --target=TARGET configure for building compilers for TARGET [HOST]
1611_ACEOF
1612fi
1613
1614if test -n "$ac_init_help"; then
1615
1616 cat <<\_ACEOF
1617
1618Optional Features:
81ecdfbb 1619 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1620 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1621 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1622 --enable-maintainer-mode enable make rules and dependencies not useful
1623 (and sometimes confusing) to the casual installer
da2f07f1
JK
1624 --enable-plugins Enable support for plugins (defaults no)
1625 --disable-largefile omit support for large files
e28b3332
DJ
1626 --disable-dependency-tracking speeds up one-time build
1627 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1628 --enable-targets=TARGETS
1629 alternative target configurations
c0993dbe 1630 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1631 --disable-gdbcli disable command-line interface (CLI)
1632 --disable-gdbmi disable machine-interface (MI)
1633 --enable-tui enable full-screen terminal user interface (TUI)
1634 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1635 --enable-profiling enable profiling of GDB
3841debe 1636 --disable-rpath do not hardcode runtime library paths
a1220294 1637 --enable-werror treat compile warnings as errors
32c1c914 1638 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1639 --enable-gdb-build-warnings
32c1c914 1640 enable GDB specific build-time compiler warnings if
a1220294 1641 gcc is used
32c1c914 1642 --enable-sim link gdb with simulator
bec39cab 1643 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1644 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1645 is auto)
bec39cab
AC
1646
1647Optional Packages:
1648 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1649 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1650 --with-separate-debug-dir=PATH
32c1c914 1651 look for global separate debug info in this path
62e4f60c 1652 [LIBDIR/debug]
b14b1491
TT
1653 --with-gdb-datadir=PATH look for global separate data files in this path
1654 [DATADIR/gdb]
29b0e8a2 1655 --with-relocated-sources=PATH
32c1c914 1656 automatically relocate this path for source files
bccbefd2
JK
1657 --with-auto-load-safe-path=PATH
1658 directories safe to hold auto-loaded files
1659 --without-auto-load-safe-path
1660 do not restrict auto-loaded files locations
05e7c244 1661 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1662 --with-curses use the curses library instead of the termcap
1663 library
c16158bc
JM
1664 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1665 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1666 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1667 --with-libiconv-prefix=DIR
1668 search for libiconv in DIR/include and DIR/lib
478aac75 1669 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1670 --with-system-readline use installed readline library
b8e0a31c
SD
1671 --with-jit-reader-dir=PATH
1672 directory to load the JIT readers from
5c39566f 1673 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1674 --with-gnu-ld assume the C compiler uses GNU ld default=no
1675 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1676 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1677 --with-python[=PYTHON] include python support
1678 (auto/yes/no/<python-program>)
a1220294
TT
1679 --without-included-regex
1680 don't use included regex; this is the default on
1681 systems with version 2 of the GNU C library (use
1682 with caution on other system)
81ecdfbb 1683 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1684 --with-system-gdbinit=PATH
32c1c914 1685 automatically load a system-wide gdbinit file
5062cc19
KS
1686 --with-tcl directory containing tcl configuration (tclConfig.sh)
1687 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1688 --with-x use the X Window System
bec39cab
AC
1689
1690Some influential environment variables:
1691 CC C compiler command
1692 CFLAGS C compiler flags
1693 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1694 nonstandard directory <lib dir>
81ecdfbb
RW
1695 LIBS libraries to pass to the linker, e.g. -l<library>
1696 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1697 you have headers in a nonstandard directory <include dir>
bec39cab 1698 CPP C preprocessor
f06e05e0
JK
1699 MAKEINFO Parent configure detects if it is of sufficient version.
1700 MAKEINFOFLAGS
1701 Parameters for MAKEINFO.
81ecdfbb
RW
1702 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1703 the first program found out of: `bison -y', `byacc', `yacc'.
1704 YFLAGS The list of arguments that will be passed by default to $YACC.
1705 This script will default YFLAGS to the empty string to avoid a
1706 default value of `-d' given by some make applications.
1707 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1708
1709Use these variables to override the choices made by `configure' or to help
1710it to find libraries and programs with nonstandard names/locations.
1711
81ecdfbb 1712Report bugs to the package provider.
bec39cab 1713_ACEOF
81ecdfbb 1714ac_status=$?
bec39cab
AC
1715fi
1716
1717if test "$ac_init_help" = "recursive"; then
1718 # If there are subdirs, report their specific --help.
bec39cab 1719 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1720 test -d "$ac_dir" ||
1721 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1722 continue
bec39cab
AC
1723 ac_builddir=.
1724
81ecdfbb
RW
1725case "$ac_dir" in
1726.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1727*)
1728 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1729 # A ".." for each directory in $ac_dir_suffix.
1730 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1731 case $ac_top_builddir_sub in
1732 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1733 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1734 esac ;;
1735esac
1736ac_abs_top_builddir=$ac_pwd
1737ac_abs_builddir=$ac_pwd$ac_dir_suffix
1738# for backward compatibility:
1739ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1740
1741case $srcdir in
81ecdfbb 1742 .) # We are building in place.
bec39cab 1743 ac_srcdir=.
81ecdfbb
RW
1744 ac_top_srcdir=$ac_top_builddir_sub
1745 ac_abs_top_srcdir=$ac_pwd ;;
1746 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1747 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1748 ac_top_srcdir=$srcdir
1749 ac_abs_top_srcdir=$srcdir ;;
1750 *) # Relative name.
1751 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1752 ac_top_srcdir=$ac_top_build_prefix$srcdir
1753 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1754esac
81ecdfbb 1755ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1756
81ecdfbb
RW
1757 cd "$ac_dir" || { ac_status=$?; continue; }
1758 # Check for guested configure.
1759 if test -f "$ac_srcdir/configure.gnu"; then
1760 echo &&
1761 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1762 elif test -f "$ac_srcdir/configure"; then
1763 echo &&
1764 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1765 else
81ecdfbb
RW
1766 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1767 fi || ac_status=$?
1768 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1769 done
1770fi
1771
81ecdfbb 1772test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1773if $ac_init_version; then
1774 cat <<\_ACEOF
81ecdfbb
RW
1775configure
1776generated by GNU Autoconf 2.64
bec39cab 1777
81ecdfbb 1778Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1779This configure script is free software; the Free Software Foundation
1780gives unlimited permission to copy, distribute and modify it.
1781_ACEOF
81ecdfbb 1782 exit
bec39cab 1783fi
bec39cab 1784
81ecdfbb
RW
1785## ------------------------ ##
1786## Autoconf initialization. ##
1787## ------------------------ ##
bec39cab 1788
81ecdfbb
RW
1789# ac_fn_c_try_compile LINENO
1790# --------------------------
1791# Try to compile conftest.$ac_ext, and return whether this succeeded.
1792ac_fn_c_try_compile ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 rm -f conftest.$ac_objext
1796 if { { ac_try="$ac_compile"
1797case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800esac
1801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802$as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_compile") 2>conftest.err
1804 ac_status=$?
1805 if test -s conftest.err; then
1806 grep -v '^ *+' conftest.err >conftest.er1
1807 cat conftest.er1 >&5
1808 mv -f conftest.er1 conftest.err
1809 fi
1810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1811 test $ac_status = 0; } && {
1812 test -z "$ac_c_werror_flag" ||
1813 test ! -s conftest.err
1814 } && test -s conftest.$ac_objext; then :
1815 ac_retval=0
1816else
1817 $as_echo "$as_me: failed program was:" >&5
1818sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1819
81ecdfbb
RW
1820 ac_retval=1
1821fi
1822 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1823 return $ac_retval
1824
1825} # ac_fn_c_try_compile
1826
1827# ac_fn_c_try_cpp LINENO
1828# ----------------------
1829# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1830ac_fn_c_try_cpp ()
bec39cab 1831{
81ecdfbb
RW
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 if { { ac_try="$ac_cpp conftest.$ac_ext"
1834case "(($ac_try" in
1835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1836 *) ac_try_echo=$ac_try;;
1837esac
1838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1839$as_echo "$ac_try_echo"; } >&5
1840 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1841 ac_status=$?
1842 if test -s conftest.err; then
1843 grep -v '^ *+' conftest.err >conftest.er1
1844 cat conftest.er1 >&5
1845 mv -f conftest.er1 conftest.err
1846 fi
1847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1848 test $ac_status = 0; } >/dev/null && {
1849 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1850 test ! -s conftest.err
1851 }; then :
1852 ac_retval=0
1853else
1854 $as_echo "$as_me: failed program was:" >&5
1855sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1856
81ecdfbb
RW
1857 ac_retval=1
1858fi
1859 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1860 return $ac_retval
bec39cab 1861
81ecdfbb 1862} # ac_fn_c_try_cpp
bec39cab 1863
81ecdfbb
RW
1864# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1865# -------------------------------------------------------
1866# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1867# the include files in INCLUDES and setting the cache variable VAR
1868# accordingly.
1869ac_fn_c_check_header_mongrel ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874$as_echo_n "checking for $2... " >&6; }
1875if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1876 $as_echo_n "(cached) " >&6
1877fi
1878eval ac_res=\$$3
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1880$as_echo "$ac_res" >&6; }
1881else
1882 # Is the header compilable?
1883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1884$as_echo_n "checking $2 usability... " >&6; }
1885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886/* end confdefs.h. */
1887$4
1888#include <$2>
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 ac_header_compiler=yes
1892else
1893 ac_header_compiler=no
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1897$as_echo "$ac_header_compiler" >&6; }
bec39cab 1898
81ecdfbb
RW
1899# Is the header present?
1900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1901$as_echo_n "checking $2 presence... " >&6; }
1902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903/* end confdefs.h. */
1904#include <$2>
1905_ACEOF
1906if ac_fn_c_try_cpp "$LINENO"; then :
1907 ac_header_preproc=yes
1908else
1909 ac_header_preproc=no
1910fi
1911rm -f conftest.err conftest.$ac_ext
1912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1913$as_echo "$ac_header_preproc" >&6; }
bec39cab 1914
81ecdfbb
RW
1915# So? What about this header?
1916case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1917 yes:no: )
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1919$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1921$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1922 ;;
1923 no:yes:* )
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1925$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1927$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1929$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1931$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1933$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1934 ;;
1935esac
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
1938if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=\$ac_header_compiler"
1942fi
1943eval ac_res=\$$3
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1945$as_echo "$ac_res" >&6; }
1946fi
1947 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1948
81ecdfbb 1949} # ac_fn_c_check_header_mongrel
bec39cab 1950
81ecdfbb
RW
1951# ac_fn_c_try_run LINENO
1952# ----------------------
1953# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1954# that executables *can* be run.
1955ac_fn_c_try_run ()
1956{
1957 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958 if { { ac_try="$ac_link"
1959case "(($ac_try" in
1960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961 *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965 (eval "$ac_link") 2>&5
1966 ac_status=$?
1967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1969 { { case "(($ac_try" in
1970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1971 *) ac_try_echo=$ac_try;;
1972esac
1973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1974$as_echo "$ac_try_echo"; } >&5
1975 (eval "$ac_try") 2>&5
1976 ac_status=$?
1977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1978 test $ac_status = 0; }; }; then :
1979 ac_retval=0
1980else
1981 $as_echo "$as_me: program exited with status $ac_status" >&5
1982 $as_echo "$as_me: failed program was:" >&5
1983sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1984
81ecdfbb
RW
1985 ac_retval=$ac_status
1986fi
1987 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1988 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1989 return $ac_retval
bec39cab 1990
81ecdfbb 1991} # ac_fn_c_try_run
bec39cab 1992
81ecdfbb
RW
1993# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1994# -------------------------------------------------------
1995# Tests whether HEADER exists and can be compiled using the include files in
1996# INCLUDES, setting the cache variable VAR accordingly.
1997ac_fn_c_check_header_compile ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2001$as_echo_n "checking for $2... " >&6; }
2002if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2003 $as_echo_n "(cached) " >&6
2004else
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$4
2008#include <$2>
bec39cab 2009_ACEOF
81ecdfbb
RW
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 eval "$3=yes"
2012else
2013 eval "$3=no"
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
2020 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2021
81ecdfbb 2022} # ac_fn_c_check_header_compile
bec39cab 2023
81ecdfbb
RW
2024# ac_fn_c_try_link LINENO
2025# -----------------------
2026# Try to link conftest.$ac_ext, and return whether this succeeded.
2027ac_fn_c_try_link ()
b4e70030 2028{
81ecdfbb
RW
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 rm -f conftest.$ac_objext conftest$ac_exeext
2031 if { { ac_try="$ac_link"
2032case "(($ac_try" in
2033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034 *) ac_try_echo=$ac_try;;
2035esac
2036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037$as_echo "$ac_try_echo"; } >&5
2038 (eval "$ac_link") 2>conftest.err
2039 ac_status=$?
2040 if test -s conftest.err; then
2041 grep -v '^ *+' conftest.err >conftest.er1
2042 cat conftest.er1 >&5
2043 mv -f conftest.er1 conftest.err
2044 fi
2045 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046 test $ac_status = 0; } && {
2047 test -z "$ac_c_werror_flag" ||
2048 test ! -s conftest.err
2049 } && test -s conftest$ac_exeext && {
2050 test "$cross_compiling" = yes ||
2051 $as_test_x conftest$ac_exeext
2052 }; then :
2053 ac_retval=0
2054else
2055 $as_echo "$as_me: failed program was:" >&5
2056sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2057
81ecdfbb
RW
2058 ac_retval=1
2059fi
2060 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2061 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2062 # interfere with the next link command; also delete a directory that is
2063 # left behind by Apple's compiler. We do this before executing the actions.
2064 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2065 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2066 return $ac_retval
bec39cab 2067
81ecdfbb 2068} # ac_fn_c_try_link
bec39cab 2069
81ecdfbb
RW
2070# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071# --------------------------------------------
2072# Tries to find the compile-time value of EXPR in a program that includes
2073# INCLUDES, setting VAR accordingly. Returns whether the value could be
2074# computed
2075ac_fn_c_compute_int ()
2076{
2077 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078 if test "$cross_compiling" = yes; then
2079 # Depending upon the size, compute the lo and hi bounds.
2080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) >= 0)];
2087test_array [0] = 0
bec39cab 2088
81ecdfbb
RW
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_lo=0 ac_mid=0
2095 while :; do
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
bec39cab 2104
81ecdfbb
RW
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid; break
2111else
2112 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2113 if test $ac_lo -le $ac_mid; then
2114 ac_lo= ac_hi=
2115 break
2116 fi
2117 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2118fi
81ecdfbb
RW
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 done
c906108c 2121else
81ecdfbb
RW
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) < 0)];
2129test_array [0] = 0
bec39cab 2130
81ecdfbb
RW
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2145test_array [0] = 0
bec39cab 2146
81ecdfbb
RW
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_lo=$ac_mid; break
2153else
2154 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2155 if test $ac_mid -le $ac_hi; then
2156 ac_lo= ac_hi=
2157 break
2158 fi
2159 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162 done
2163else
2164 ac_lo= ac_hi=
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169# Binary search between lo and hi bounds.
2170while test "x$ac_lo" != "x$ac_hi"; do
2171 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2179test_array [0] = 0
bec39cab 2180
81ecdfbb
RW
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186 ac_hi=$ac_mid
2187else
2188 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191done
2192case $ac_lo in #((
2193?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2194'') ac_retval=1 ;;
2195esac
2196 else
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200static long int longval () { return $2; }
2201static unsigned long int ulongval () { return $2; }
2202#include <stdio.h>
2203#include <stdlib.h>
2204int
2205main ()
2206{
bec39cab 2207
81ecdfbb
RW
2208 FILE *f = fopen ("conftest.val", "w");
2209 if (! f)
2210 return 1;
2211 if (($2) < 0)
2212 {
2213 long int i = longval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%ld", i);
2217 }
2218 else
2219 {
2220 unsigned long int i = ulongval ();
2221 if (i != ($2))
2222 return 1;
2223 fprintf (f, "%lu", i);
2224 }
2225 /* Do not output a trailing newline, as this causes \r\n confusion
2226 on some platforms. */
2227 return ferror (f) || fclose (f) != 0;
bec39cab 2228
81ecdfbb
RW
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_run "$LINENO"; then :
2234 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2235else
2236 ac_retval=1
2237fi
2238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2239 conftest.$ac_objext conftest.beam conftest.$ac_ext
2240rm -f conftest.val
bec39cab 2241
81ecdfbb
RW
2242 fi
2243 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2244 return $ac_retval
bec39cab 2245
81ecdfbb 2246} # ac_fn_c_compute_int
bec39cab 2247
55a8c076
YQ
2248# ac_fn_c_check_func LINENO FUNC VAR
2249# ----------------------------------
2250# Tests whether FUNC exists, setting the cache variable VAR accordingly
2251ac_fn_c_check_func ()
81ecdfbb
RW
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2255$as_echo_n "checking for $2... " >&6; }
2256if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2257 $as_echo_n "(cached) " >&6
2258else
81ecdfbb
RW
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
55a8c076
YQ
2261/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2263#define $2 innocuous_$2
2264
2265/* System header to define __stub macros and hopefully few prototypes,
2266 which can conflict with char $2 (); below.
2267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2268 <limits.h> exists even on freestanding compilers. */
2269
2270#ifdef __STDC__
2271# include <limits.h>
2272#else
2273# include <assert.h>
2274#endif
2275
2276#undef $2
2277
2278/* Override any GCC internal prototype to avoid an error.
2279 Use char because int might match the return type of a GCC
2280 builtin and then its argument prototype would still apply. */
2281#ifdef __cplusplus
2282extern "C"
2283#endif
2284char $2 ();
2285/* The GNU C library defines this for functions which it implements
2286 to always fail with ENOSYS. Some functions are actually named
2287 something starting with __ and the normal name is an alias. */
2288#if defined __stub_$2 || defined __stub___$2
2289choke me
2290#endif
2291
2292int
2293main ()
2294{
2295return $2 ();
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_link "$LINENO"; then :
2301 eval "$3=yes"
2302else
2303 eval "$3=no"
2304fi
2305rm -f core conftest.err conftest.$ac_objext \
2306 conftest$ac_exeext conftest.$ac_ext
2307fi
2308eval ac_res=\$$3
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2310$as_echo "$ac_res" >&6; }
2311 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2312
2313} # ac_fn_c_check_func
2314
770d76d7
PA
2315# ac_fn_c_check_decl LINENO SYMBOL VAR
2316# ------------------------------------
2317# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2318ac_fn_c_check_decl ()
2319{
2320 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321 as_decl_name=`echo $2|sed 's/ *(.*//'`
2322 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2324$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2325if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2326 $as_echo_n "(cached) " >&6
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$4
2331int
2332main ()
2333{
2334#ifndef $as_decl_name
2335#ifdef __cplusplus
2336 (void) $as_decl_use;
2337#else
2338 (void) $as_decl_name;
2339#endif
2340#endif
2341
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"; then :
2347 eval "$3=yes"
2348else
2349 eval "$3=no"
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352fi
2353eval ac_res=\$$3
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
2356 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2357
2358} # ac_fn_c_check_decl
2359
55a8c076
YQ
2360# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2361# ----------------------------------------------------
2362# Tries to find if the field MEMBER exists in type AGGR, after including
2363# INCLUDES, setting cache variable VAR accordingly.
2364ac_fn_c_check_member ()
2365{
2366 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2368$as_echo_n "checking for $2.$3... " >&6; }
2369if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2370 $as_echo_n "(cached) " >&6
2371else
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$5
2375int
2376main ()
2377{
2378static $2 ac_aggr;
2379if (ac_aggr.$3)
2380return 0;
2381 ;
2382 return 0;
2383}
2384_ACEOF
2385if ac_fn_c_try_compile "$LINENO"; then :
2386 eval "$4=yes"
2387else
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389/* end confdefs.h. */
2390$5
2391int
2392main ()
2393{
2394static $2 ac_aggr;
2395if (sizeof ac_aggr.$3)
2396return 0;
2397 ;
2398 return 0;
2399}
2400_ACEOF
2401if ac_fn_c_try_compile "$LINENO"; then :
2402 eval "$4=yes"
2403else
2404 eval "$4=no"
2405fi
2406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410eval ac_res=\$$4
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
2413 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2414
2415} # ac_fn_c_check_member
2416
2417# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2418# -------------------------------------------
2419# Tests whether TYPE exists after having included INCLUDES, setting cache
2420# variable VAR accordingly.
2421ac_fn_c_check_type ()
2422{
2423 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425$as_echo_n "checking for $2... " >&6; }
2426if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2427 $as_echo_n "(cached) " >&6
2428else
2429 eval "$3=no"
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h. */
2432$4
2433int
2434main ()
2435{
2436if (sizeof ($2))
2437 return 0;
2438 ;
2439 return 0;
2440}
2441_ACEOF
2442if ac_fn_c_try_compile "$LINENO"; then :
2443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444/* end confdefs.h. */
2445$4
2446int
2447main ()
2448{
2449if (sizeof (($2)))
2450 return 0;
2451 ;
2452 return 0;
2453}
2454_ACEOF
2455if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2456
81ecdfbb
RW
2457else
2458 eval "$3=yes"
2459fi
2460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2461fi
2462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2463fi
2464eval ac_res=\$$3
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2466$as_echo "$ac_res" >&6; }
2467 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2468
81ecdfbb
RW
2469} # ac_fn_c_check_type
2470cat >config.log <<_ACEOF
2471This file contains any messages produced by compilers while
2472running configure, to aid debugging if configure makes a mistake.
d5af19ba 2473
81ecdfbb
RW
2474It was created by $as_me, which was
2475generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2476
81ecdfbb 2477 $ $0 $@
413ccac7 2478
81ecdfbb
RW
2479_ACEOF
2480exec 5>>config.log
2481{
2482cat <<_ASUNAME
2483## --------- ##
2484## Platform. ##
2485## --------- ##
413ccac7 2486
81ecdfbb
RW
2487hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2488uname -m = `(uname -m) 2>/dev/null || echo unknown`
2489uname -r = `(uname -r) 2>/dev/null || echo unknown`
2490uname -s = `(uname -s) 2>/dev/null || echo unknown`
2491uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2492
81ecdfbb
RW
2493/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2494/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2495
81ecdfbb
RW
2496/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2497/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2498/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2499/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2500/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2501/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2502/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2503
81ecdfbb 2504_ASUNAME
bec39cab 2505
bec39cab
AC
2506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2507for as_dir in $PATH
2508do
2509 IFS=$as_save_IFS
2510 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2511 $as_echo "PATH: $as_dir"
2512 done
2513IFS=$as_save_IFS
bec39cab 2514
81ecdfbb 2515} >&5
bec39cab 2516
81ecdfbb 2517cat >&5 <<_ACEOF
bec39cab 2518
bec39cab 2519
81ecdfbb
RW
2520## ----------- ##
2521## Core tests. ##
2522## ----------- ##
2523
2524_ACEOF
2525
2526
2527# Keep a trace of the command line.
2528# Strip out --no-create and --no-recursion so they do not pile up.
2529# Strip out --silent because we don't want to record it for future runs.
2530# Also quote any args containing shell meta-characters.
2531# Make two passes to allow for proper duplicate-argument suppression.
2532ac_configure_args=
2533ac_configure_args0=
2534ac_configure_args1=
2535ac_must_keep_next=false
2536for ac_pass in 1 2
2537do
2538 for ac_arg
2539 do
2540 case $ac_arg in
2541 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2542 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2543 | -silent | --silent | --silen | --sile | --sil)
2544 continue ;;
2545 *\'*)
2546 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2547 esac
2548 case $ac_pass in
2549 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2550 2)
2551 as_fn_append ac_configure_args1 " '$ac_arg'"
2552 if test $ac_must_keep_next = true; then
2553 ac_must_keep_next=false # Got value, back to normal.
2554 else
2555 case $ac_arg in
2556 *=* | --config-cache | -C | -disable-* | --disable-* \
2557 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2558 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2559 | -with-* | --with-* | -without-* | --without-* | --x)
2560 case "$ac_configure_args0 " in
2561 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2562 esac
2563 ;;
2564 -* ) ac_must_keep_next=true ;;
2565 esac
2566 fi
2567 as_fn_append ac_configure_args " '$ac_arg'"
2568 ;;
2569 esac
2570 done
2571done
2572{ ac_configure_args0=; unset ac_configure_args0;}
2573{ ac_configure_args1=; unset ac_configure_args1;}
2574
2575# When interrupted or exit'd, cleanup temporary files, and complete
2576# config.log. We remove comments because anyway the quotes in there
2577# would cause problems or look ugly.
2578# WARNING: Use '\'' to represent an apostrophe within the trap.
2579# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2580trap 'exit_status=$?
2581 # Save into config.log some information that might help in debugging.
2582 {
2583 echo
2584
2585 cat <<\_ASBOX
2586## ---------------- ##
2587## Cache variables. ##
2588## ---------------- ##
2589_ASBOX
2590 echo
2591 # The following way of writing the cache mishandles newlines in values,
2592(
2593 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2594 eval ac_val=\$$ac_var
2595 case $ac_val in #(
2596 *${as_nl}*)
2597 case $ac_var in #(
2598 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2600 esac
2601 case $ac_var in #(
2602 _ | IFS | as_nl) ;; #(
2603 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2604 *) { eval $ac_var=; unset $ac_var;} ;;
2605 esac ;;
2606 esac
2607 done
2608 (set) 2>&1 |
2609 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2610 *${as_nl}ac_space=\ *)
2611 sed -n \
2612 "s/'\''/'\''\\\\'\'''\''/g;
2613 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2614 ;; #(
2615 *)
2616 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2617 ;;
2618 esac |
2619 sort
2620)
2621 echo
2622
2623 cat <<\_ASBOX
2624## ----------------- ##
2625## Output variables. ##
2626## ----------------- ##
2627_ASBOX
2628 echo
2629 for ac_var in $ac_subst_vars
2630 do
2631 eval ac_val=\$$ac_var
2632 case $ac_val in
2633 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2634 esac
2635 $as_echo "$ac_var='\''$ac_val'\''"
2636 done | sort
2637 echo
2638
2639 if test -n "$ac_subst_files"; then
2640 cat <<\_ASBOX
2641## ------------------- ##
2642## File substitutions. ##
2643## ------------------- ##
2644_ASBOX
2645 echo
2646 for ac_var in $ac_subst_files
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 fi
2656
2657 if test -s confdefs.h; then
2658 cat <<\_ASBOX
2659## ----------- ##
2660## confdefs.h. ##
2661## ----------- ##
2662_ASBOX
2663 echo
2664 cat confdefs.h
2665 echo
2666 fi
2667 test "$ac_signal" != 0 &&
2668 $as_echo "$as_me: caught signal $ac_signal"
2669 $as_echo "$as_me: exit $exit_status"
2670 } >&5
2671 rm -f core *.core core.conftest.* &&
2672 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2673 exit $exit_status
2674' 0
2675for ac_signal in 1 2 13 15; do
2676 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2677done
2678ac_signal=0
2679
2680# confdefs.h avoids OS command line length limits that DEFS can exceed.
2681rm -f -r conftest* confdefs.h
2682
2683$as_echo "/* confdefs.h */" > confdefs.h
2684
2685# Predefined preprocessor variables.
2686
2687cat >>confdefs.h <<_ACEOF
2688#define PACKAGE_NAME "$PACKAGE_NAME"
2689_ACEOF
2690
2691cat >>confdefs.h <<_ACEOF
2692#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2693_ACEOF
2694
2695cat >>confdefs.h <<_ACEOF
2696#define PACKAGE_VERSION "$PACKAGE_VERSION"
2697_ACEOF
2698
2699cat >>confdefs.h <<_ACEOF
2700#define PACKAGE_STRING "$PACKAGE_STRING"
2701_ACEOF
2702
2703cat >>confdefs.h <<_ACEOF
2704#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2705_ACEOF
2706
2707cat >>confdefs.h <<_ACEOF
2708#define PACKAGE_URL "$PACKAGE_URL"
2709_ACEOF
2710
2711
2712# Let the site file select an alternate cache file if it wants to.
2713# Prefer an explicitly selected file to automatically selected ones.
2714ac_site_file1=NONE
2715ac_site_file2=NONE
2716if test -n "$CONFIG_SITE"; then
2717 ac_site_file1=$CONFIG_SITE
2718elif test "x$prefix" != xNONE; then
2719 ac_site_file1=$prefix/share/config.site
2720 ac_site_file2=$prefix/etc/config.site
2721else
2722 ac_site_file1=$ac_default_prefix/share/config.site
2723 ac_site_file2=$ac_default_prefix/etc/config.site
2724fi
2725for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2726do
2727 test "x$ac_site_file" = xNONE && continue
2728 if test -r "$ac_site_file"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2730$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2731 sed 's/^/| /' "$ac_site_file" >&5
2732 . "$ac_site_file"
2733 fi
2734done
2735
2736if test -r "$cache_file"; then
2737 # Some versions of bash will fail to source /dev/null (special
2738 # files actually), so we avoid doing that.
2739 if test -f "$cache_file"; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2741$as_echo "$as_me: loading cache $cache_file" >&6;}
2742 case $cache_file in
2743 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2744 *) . "./$cache_file";;
2745 esac
2746 fi
2747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2749$as_echo "$as_me: creating cache $cache_file" >&6;}
2750 >$cache_file
bec39cab
AC
2751fi
2752
55a8c076 2753gl_header_list="$gl_header_list wchar.h"
770d76d7 2754gl_header_list="$gl_header_list stdint.h"
55a8c076 2755gl_header_list="$gl_header_list inttypes.h"
f434ba03
PA
2756gl_header_list="$gl_header_list sys/mman.h"
2757gl_func_list="$gl_func_list mprotect"
81ecdfbb
RW
2758# Check that the precious variables saved in the cache have kept the same
2759# value.
2760ac_cache_corrupted=false
2761for ac_var in $ac_precious_vars; do
2762 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2763 eval ac_new_set=\$ac_env_${ac_var}_set
2764 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2765 eval ac_new_val=\$ac_env_${ac_var}_value
2766 case $ac_old_set,$ac_new_set in
2767 set,)
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2769$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2770 ac_cache_corrupted=: ;;
2771 ,set)
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2773$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2774 ac_cache_corrupted=: ;;
2775 ,);;
2776 *)
2777 if test "x$ac_old_val" != "x$ac_new_val"; then
2778 # differences in whitespace do not lead to failure.
2779 ac_old_val_w=`echo x $ac_old_val`
2780 ac_new_val_w=`echo x $ac_new_val`
2781 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2783$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2784 ac_cache_corrupted=:
2785 else
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2787$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2788 eval $ac_var=\$ac_old_val
2789 fi
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2791$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2793$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2794 fi;;
2795 esac
2796 # Pass precious variables to config.status.
2797 if test "$ac_new_set" = set; then
2798 case $ac_new_val in
2799 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2800 *) ac_arg=$ac_var=$ac_new_val ;;
2801 esac
2802 case " $ac_configure_args " in
2803 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2804 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2805 esac
2806 fi
2807done
2808if $ac_cache_corrupted; then
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2812$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2813 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2814fi
2815## -------------------- ##
2816## Main body of script. ##
2817## -------------------- ##
2818
2819ac_ext=c
2820ac_cpp='$CPP $CPPFLAGS'
2821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2823ac_compiler_gnu=$ac_cv_c_compiler_gnu
2824
2825
2826
2827
2828
2829ac_config_headers="$ac_config_headers config.h:config.in"
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2833$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2834 # Check whether --enable-maintainer-mode was given.
2835if test "${enable_maintainer_mode+set}" = set; then :
2836 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2837else
2838 USE_MAINTAINER_MODE=no
2839fi
2840
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2842$as_echo "$USE_MAINTAINER_MODE" >&6; }
2843 if test $USE_MAINTAINER_MODE = yes; then
2844 MAINTAINER_MODE_TRUE=
2845 MAINTAINER_MODE_FALSE='#'
2846else
2847 MAINTAINER_MODE_TRUE='#'
2848 MAINTAINER_MODE_FALSE=
2849fi
2850
2851 MAINT=$MAINTAINER_MODE_TRUE
2852
2853
2854
2855ac_ext=c
2856ac_cpp='$CPP $CPPFLAGS'
2857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2859ac_compiler_gnu=$ac_cv_c_compiler_gnu
2860if test -n "$ac_tool_prefix"; then
2861 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2862set dummy ${ac_tool_prefix}gcc; ac_word=$2
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2864$as_echo_n "checking for $ac_word... " >&6; }
2865if test "${ac_cv_prog_CC+set}" = set; then :
2866 $as_echo_n "(cached) " >&6
c906108c
SS
2867else
2868 if test -n "$CC"; then
2869 ac_cv_prog_CC="$CC" # Let the user override the test.
2870else
bec39cab
AC
2871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2872for as_dir in $PATH
2873do
2874 IFS=$as_save_IFS
2875 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2876 for ac_exec_ext in '' $ac_executable_extensions; do
2877 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2878 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2880 break 2
2881 fi
2882done
81ecdfbb
RW
2883 done
2884IFS=$as_save_IFS
bec39cab 2885
c906108c
SS
2886fi
2887fi
bec39cab 2888CC=$ac_cv_prog_CC
c906108c 2889if test -n "$CC"; then
81ecdfbb
RW
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2891$as_echo "$CC" >&6; }
c906108c 2892else
81ecdfbb
RW
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2894$as_echo "no" >&6; }
c906108c
SS
2895fi
2896
81ecdfbb 2897
b4e70030
JB
2898fi
2899if test -z "$ac_cv_prog_CC"; then
2900 ac_ct_CC=$CC
81ecdfbb
RW
2901 # Extract the first word of "gcc", so it can be a program name with args.
2902set dummy gcc; ac_word=$2
2903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2904$as_echo_n "checking for $ac_word... " >&6; }
2905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2906 $as_echo_n "(cached) " >&6
b4e70030
JB
2907else
2908 if test -n "$ac_ct_CC"; then
2909 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2910else
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914 IFS=$as_save_IFS
2915 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2916 for ac_exec_ext in '' $ac_executable_extensions; do
2917 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2918 ac_cv_prog_ac_ct_CC="gcc"
2919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2920 break 2
4e8d927d 2921 fi
b4e70030 2922done
81ecdfbb
RW
2923 done
2924IFS=$as_save_IFS
b4e70030
JB
2925
2926fi
2927fi
2928ac_ct_CC=$ac_cv_prog_ac_ct_CC
2929if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2931$as_echo "$ac_ct_CC" >&6; }
b4e70030 2932else
81ecdfbb
RW
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2934$as_echo "no" >&6; }
b4e70030
JB
2935fi
2936
81ecdfbb
RW
2937 if test "x$ac_ct_CC" = x; then
2938 CC=""
2939 else
2940 case $cross_compiling:$ac_tool_warned in
2941yes:)
2942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2944ac_tool_warned=yes ;;
2945esac
2946 CC=$ac_ct_CC
2947 fi
b4e70030
JB
2948else
2949 CC="$ac_cv_prog_CC"
2950fi
2951
c906108c 2952if test -z "$CC"; then
81ecdfbb
RW
2953 if test -n "$ac_tool_prefix"; then
2954 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2955set dummy ${ac_tool_prefix}cc; ac_word=$2
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2957$as_echo_n "checking for $ac_word... " >&6; }
2958if test "${ac_cv_prog_CC+set}" = set; then :
2959 $as_echo_n "(cached) " >&6
c906108c
SS
2960else
2961 if test -n "$CC"; then
2962 ac_cv_prog_CC="$CC" # Let the user override the test.
2963else
bec39cab
AC
2964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2965for as_dir in $PATH
2966do
2967 IFS=$as_save_IFS
2968 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2969 for ac_exec_ext in '' $ac_executable_extensions; do
2970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2971 ac_cv_prog_CC="${ac_tool_prefix}cc"
2972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2973 break 2
2974 fi
2975done
81ecdfbb
RW
2976 done
2977IFS=$as_save_IFS
2978
2979fi
2980fi
2981CC=$ac_cv_prog_CC
2982if test -n "$CC"; then
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2984$as_echo "$CC" >&6; }
2985else
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
2988fi
2989
2990
2991 fi
2992fi
2993if test -z "$CC"; then
2994 # Extract the first word of "cc", so it can be a program name with args.
2995set dummy cc; ac_word=$2
2996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2997$as_echo_n "checking for $ac_word... " >&6; }
2998if test "${ac_cv_prog_CC+set}" = set; then :
2999 $as_echo_n "(cached) " >&6
3000else
3001 if test -n "$CC"; then
3002 ac_cv_prog_CC="$CC" # Let the user override the test.
3003else
3004 ac_prog_rejected=no
3005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3006for as_dir in $PATH
3007do
3008 IFS=$as_save_IFS
3009 test -z "$as_dir" && as_dir=.
3010 for ac_exec_ext in '' $ac_executable_extensions; do
3011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3012 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3013 ac_prog_rejected=yes
3014 continue
3015 fi
3016 ac_cv_prog_CC="cc"
3017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3018 break 2
3019 fi
3020done
3021 done
3022IFS=$as_save_IFS
bec39cab 3023
c906108c
SS
3024if test $ac_prog_rejected = yes; then
3025 # We found a bogon in the path, so make sure we never use it.
3026 set dummy $ac_cv_prog_CC
3027 shift
bec39cab 3028 if test $# != 0; then
c906108c
SS
3029 # We chose a different compiler from the bogus one.
3030 # However, it has the same basename, so the bogon will be chosen
3031 # first if we set CC to just the basename; use the full file name.
3032 shift
bec39cab 3033 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3034 fi
3035fi
3036fi
3037fi
bec39cab 3038CC=$ac_cv_prog_CC
c906108c 3039if test -n "$CC"; then
81ecdfbb
RW
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3041$as_echo "$CC" >&6; }
c906108c 3042else
81ecdfbb
RW
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044$as_echo "no" >&6; }
c906108c
SS
3045fi
3046
81ecdfbb 3047
bec39cab
AC
3048fi
3049if test -z "$CC"; then
3050 if test -n "$ac_tool_prefix"; then
81ecdfbb 3051 for ac_prog in cl.exe
bec39cab
AC
3052 do
3053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3056$as_echo_n "checking for $ac_word... " >&6; }
3057if test "${ac_cv_prog_CC+set}" = set; then :
3058 $as_echo_n "(cached) " >&6
c906108c
SS
3059else
3060 if test -n "$CC"; then
3061 ac_cv_prog_CC="$CC" # Let the user override the test.
3062else
bec39cab
AC
3063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3064for as_dir in $PATH
3065do
3066 IFS=$as_save_IFS
3067 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3068 for ac_exec_ext in '' $ac_executable_extensions; do
3069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3070 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3072 break 2
3073 fi
3074done
81ecdfbb
RW
3075 done
3076IFS=$as_save_IFS
bec39cab 3077
c906108c
SS
3078fi
3079fi
bec39cab 3080CC=$ac_cv_prog_CC
c906108c 3081if test -n "$CC"; then
81ecdfbb
RW
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3083$as_echo "$CC" >&6; }
c906108c 3084else
81ecdfbb
RW
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
c906108c 3087fi
bec39cab 3088
81ecdfbb 3089
bec39cab
AC
3090 test -n "$CC" && break
3091 done
3092fi
3093if test -z "$CC"; then
3094 ac_ct_CC=$CC
81ecdfbb 3095 for ac_prog in cl.exe
bec39cab
AC
3096do
3097 # Extract the first word of "$ac_prog", so it can be a program name with args.
3098set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3100$as_echo_n "checking for $ac_word... " >&6; }
3101if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3102 $as_echo_n "(cached) " >&6
bec39cab
AC
3103else
3104 if test -n "$ac_ct_CC"; then
3105 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3106else
3107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3108for as_dir in $PATH
3109do
3110 IFS=$as_save_IFS
3111 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3112 for ac_exec_ext in '' $ac_executable_extensions; do
3113 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3114 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3116 break 2
c906108c 3117 fi
bec39cab 3118done
81ecdfbb
RW
3119 done
3120IFS=$as_save_IFS
bec39cab
AC
3121
3122fi
3123fi
3124ac_ct_CC=$ac_cv_prog_ac_ct_CC
3125if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3127$as_echo "$ac_ct_CC" >&6; }
bec39cab 3128else
81ecdfbb
RW
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3130$as_echo "no" >&6; }
c906108c
SS
3131fi
3132
81ecdfbb 3133
bec39cab
AC
3134 test -n "$ac_ct_CC" && break
3135done
c906108c 3136
81ecdfbb
RW
3137 if test "x$ac_ct_CC" = x; then
3138 CC=""
3139 else
3140 case $cross_compiling:$ac_tool_warned in
3141yes:)
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3144ac_tool_warned=yes ;;
3145esac
3146 CC=$ac_ct_CC
3147 fi
bec39cab
AC
3148fi
3149
3150fi
3151
3152
81ecdfbb
RW
3153test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3155as_fn_error "no acceptable C compiler found in \$PATH
3156See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3157
3158# Provide some information about the compiler.
81ecdfbb
RW
3159$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3160set X $ac_compile
3161ac_compiler=$2
3162for ac_option in --version -v -V -qversion; do
3163 { { ac_try="$ac_compiler $ac_option >&5"
3164case "(($ac_try" in
3165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3166 *) ac_try_echo=$ac_try;;
3167esac
3168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3169$as_echo "$ac_try_echo"; } >&5
3170 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3171 ac_status=$?
81ecdfbb
RW
3172 if test -s conftest.err; then
3173 sed '10a\
3174... rest of stderr output deleted ...
3175 10q' conftest.err >conftest.er1
3176 cat conftest.er1 >&5
3177 rm -f conftest.er1 conftest.err
3178 fi
3179 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3180 test $ac_status = 0; }
3181done
bec39cab 3182
81ecdfbb 3183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3184/* end confdefs.h. */
3185
3186int
3187main ()
3188{
3189
3190 ;
3191 return 0;
3192}
3193_ACEOF
3194ac_clean_files_save=$ac_clean_files
81ecdfbb 3195ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3196# Try to create an executable without -o first, disregard a.out.
3197# It will help us diagnose broken compilers, and finding out an intuition
3198# of exeext.
81ecdfbb
RW
3199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3200$as_echo_n "checking for C compiler default output file name... " >&6; }
3201ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3202
3203# The possible output files:
3204ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3205
3206ac_rmfiles=
3207for ac_file in $ac_files
3208do
3209 case $ac_file in
3210 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3211 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3212 esac
3213done
3214rm -f $ac_rmfiles
3215
3216if { { ac_try="$ac_link_default"
3217case "(($ac_try" in
3218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3219 *) ac_try_echo=$ac_try;;
3220esac
3221eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3222$as_echo "$ac_try_echo"; } >&5
3223 (eval "$ac_link_default") 2>&5
3224 ac_status=$?
3225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3226 test $ac_status = 0; }; then :
3227 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3228# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3229# in a Makefile. We should not override ac_cv_exeext if it was cached,
3230# so that the user can short-circuit this test for compilers unknown to
3231# Autoconf.
3232for ac_file in $ac_files ''
bec39cab
AC
3233do
3234 test -f "$ac_file" || continue
3235 case $ac_file in
81ecdfbb 3236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3237 ;;
3238 [ab].out )
3239 # We found the default executable, but exeext='' is most
3240 # certainly right.
3241 break;;
3242 *.* )
81ecdfbb
RW
3243 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3244 then :; else
3245 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3246 fi
3247 # We set ac_cv_exeext here because the later test for it is not
3248 # safe: cross compilers may not add the suffix if given an `-o'
3249 # argument, so we may need to know it at that point already.
3250 # Even if this section looks crufty: it has the advantage of
3251 # actually working.
b4e70030
JB
3252 break;;
3253 * )
3254 break;;
bec39cab
AC
3255 esac
3256done
81ecdfbb
RW
3257test "$ac_cv_exeext" = no && ac_cv_exeext=
3258
bec39cab 3259else
81ecdfbb
RW
3260 ac_file=''
3261fi
3262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3263$as_echo "$ac_file" >&6; }
3264if test -z "$ac_file"; then :
3265 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3266sed 's/^/| /' conftest.$ac_ext >&5
3267
81ecdfbb
RW
3268{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3270{ as_fn_set_status 77
3271as_fn_error "C compiler cannot create executables
3272See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3273fi
b4e70030 3274ac_exeext=$ac_cv_exeext
b4e70030 3275
81ecdfbb 3276# Check that the compiler produces executables we can run. If not, either
bec39cab 3277# the compiler is broken, or we cross compile.
81ecdfbb
RW
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3279$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3280# If not cross compiling, check that we can run a simple program.
3281if test "$cross_compiling" != yes; then
3282 if { ac_try='./$ac_file'
81ecdfbb
RW
3283 { { case "(($ac_try" in
3284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285 *) ac_try_echo=$ac_try;;
3286esac
3287eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3288$as_echo "$ac_try_echo"; } >&5
3289 (eval "$ac_try") 2>&5
bec39cab 3290 ac_status=$?
81ecdfbb
RW
3291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3292 test $ac_status = 0; }; }; then
bec39cab 3293 cross_compiling=no
c906108c 3294 else
bec39cab
AC
3295 if test "$cross_compiling" = maybe; then
3296 cross_compiling=yes
3297 else
81ecdfbb
RW
3298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3300as_fn_error "cannot run C compiled programs.
bec39cab 3301If you meant to cross compile, use \`--host'.
81ecdfbb 3302See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3303 fi
c906108c 3304 fi
bec39cab 3305fi
81ecdfbb
RW
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3307$as_echo "yes" >&6; }
bec39cab 3308
81ecdfbb 3309rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3310ac_clean_files=$ac_clean_files_save
81ecdfbb 3311# Check that the compiler produces executables we can run. If not, either
b4e70030 3312# the compiler is broken, or we cross compile.
81ecdfbb
RW
3313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3314$as_echo_n "checking whether we are cross compiling... " >&6; }
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3316$as_echo "$cross_compiling" >&6; }
3317
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3319$as_echo_n "checking for suffix of executables... " >&6; }
3320if { { ac_try="$ac_link"
3321case "(($ac_try" in
3322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3323 *) ac_try_echo=$ac_try;;
3324esac
3325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3326$as_echo "$ac_try_echo"; } >&5
3327 (eval "$ac_link") 2>&5
bec39cab 3328 ac_status=$?
81ecdfbb
RW
3329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3330 test $ac_status = 0; }; then :
b4e70030
JB
3331 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3332# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3333# work properly (i.e., refer to `conftest.exe'), while it won't with
3334# `rm'.
3335for ac_file in conftest.exe conftest conftest.*; do
3336 test -f "$ac_file" || continue
3337 case $ac_file in
81ecdfbb 3338 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3339 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3340 break;;
3341 * ) break;;
3342 esac
3343done
c906108c 3344else
81ecdfbb
RW
3345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347as_fn_error "cannot compute suffix of executables: cannot compile and link
3348See \`config.log' for more details." "$LINENO" 5; }
c906108c 3349fi
b4e70030 3350rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3352$as_echo "$ac_cv_exeext" >&6; }
c906108c 3353
b4e70030 3354rm -f conftest.$ac_ext
bec39cab
AC
3355EXEEXT=$ac_cv_exeext
3356ac_exeext=$EXEEXT
81ecdfbb
RW
3357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3358$as_echo_n "checking for suffix of object files... " >&6; }
3359if test "${ac_cv_objext+set}" = set; then :
3360 $as_echo_n "(cached) " >&6
bec39cab 3361else
81ecdfbb 3362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3363/* end confdefs.h. */
3364
3365int
3366main ()
3367{
3368
3369 ;
3370 return 0;
3371}
3372_ACEOF
3373rm -f conftest.o conftest.obj
81ecdfbb
RW
3374if { { ac_try="$ac_compile"
3375case "(($ac_try" in
3376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3377 *) ac_try_echo=$ac_try;;
3378esac
3379eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3380$as_echo "$ac_try_echo"; } >&5
3381 (eval "$ac_compile") 2>&5
3382 ac_status=$?
3383 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3384 test $ac_status = 0; }; then :
3385 for ac_file in conftest.o conftest.obj conftest.*; do
3386 test -f "$ac_file" || continue;
bec39cab 3387 case $ac_file in
81ecdfbb 3388 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3389 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3390 break;;
3391 esac
3392done
c906108c 3393else
81ecdfbb 3394 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3395sed 's/^/| /' conftest.$ac_ext >&5
3396
81ecdfbb
RW
3397{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3399as_fn_error "cannot compute suffix of object files: cannot compile
3400See \`config.log' for more details." "$LINENO" 5; }
c906108c 3401fi
b4e70030 3402rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3403fi
81ecdfbb
RW
3404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3405$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3406OBJEXT=$ac_cv_objext
3407ac_objext=$OBJEXT
81ecdfbb
RW
3408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3409$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3410if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3411 $as_echo_n "(cached) " >&6
c906108c 3412else
81ecdfbb 3413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3414/* end confdefs.h. */
3415
3416int
3417main ()
3418{
3419#ifndef __GNUC__
3420 choke me
3421#endif
3422
3423 ;
3424 return 0;
3425}
3426_ACEOF
81ecdfbb 3427if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3428 ac_compiler_gnu=yes
3429else
81ecdfbb 3430 ac_compiler_gnu=no
bec39cab 3431fi
81ecdfbb 3432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3433ac_cv_c_compiler_gnu=$ac_compiler_gnu
3434
3435fi
81ecdfbb
RW
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3437$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3438if test $ac_compiler_gnu = yes; then
3439 GCC=yes
3440else
3441 GCC=
3442fi
bec39cab
AC
3443ac_test_CFLAGS=${CFLAGS+set}
3444ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3446$as_echo_n "checking whether $CC accepts -g... " >&6; }
3447if test "${ac_cv_prog_cc_g+set}" = set; then :
3448 $as_echo_n "(cached) " >&6
bec39cab 3449else
81ecdfbb
RW
3450 ac_save_c_werror_flag=$ac_c_werror_flag
3451 ac_c_werror_flag=yes
3452 ac_cv_prog_cc_g=no
3453 CFLAGS="-g"
3454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3455/* end confdefs.h. */
3456
3457int
3458main ()
3459{
3460
3461 ;
3462 return 0;
3463}
3464_ACEOF
81ecdfbb 3465if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3466 ac_cv_prog_cc_g=yes
3467else
81ecdfbb
RW
3468 CFLAGS=""
3469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3470/* end confdefs.h. */
3471
3472int
3473main ()
3474{
3475
3476 ;
3477 return 0;
3478}
3479_ACEOF
3480if ac_fn_c_try_compile "$LINENO"; then :
3481
3482else
3483 ac_c_werror_flag=$ac_save_c_werror_flag
3484 CFLAGS="-g"
3485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3486/* end confdefs.h. */
3487
3488int
3489main ()
3490{
c906108c 3491
81ecdfbb
RW
3492 ;
3493 return 0;
3494}
3495_ACEOF
3496if ac_fn_c_try_compile "$LINENO"; then :
3497 ac_cv_prog_cc_g=yes
3498fi
3499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3500fi
3501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3502fi
81ecdfbb
RW
3503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3504 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3505fi
81ecdfbb
RW
3506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3507$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3508if test "$ac_test_CFLAGS" = set; then
bec39cab 3509 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3510elif test $ac_cv_prog_cc_g = yes; then
3511 if test "$GCC" = yes; then
3512 CFLAGS="-g -O2"
3513 else
3514 CFLAGS="-g"
3515 fi
3516else
3517 if test "$GCC" = yes; then
3518 CFLAGS="-O2"
3519 else
3520 CFLAGS=
3521 fi
3522fi
81ecdfbb
RW
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3524$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3525if test "${ac_cv_prog_cc_c89+set}" = set; then :
3526 $as_echo_n "(cached) " >&6
bec39cab 3527else
81ecdfbb 3528 ac_cv_prog_cc_c89=no
bec39cab 3529ac_save_CC=$CC
81ecdfbb 3530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3531/* end confdefs.h. */
c906108c
SS
3532#include <stdarg.h>
3533#include <stdio.h>
3534#include <sys/types.h>
3535#include <sys/stat.h>
3536/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3537struct buf { int x; };
3538FILE * (*rcsopen) (struct buf *, struct stat *, int);
3539static char *e (p, i)
3540 char **p;
3541 int i;
3542{
3543 return p[i];
3544}
3545static char *f (char * (*g) (char **, int), char **p, ...)
3546{
3547 char *s;
3548 va_list v;
3549 va_start (v,p);
3550 s = g (p, va_arg (v,int));
3551 va_end (v);
3552 return s;
3553}
bec39cab
AC
3554
3555/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3556 function prototypes and stuff, but not '\xHH' hex character constants.
3557 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3558 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3559 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3560 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3561 that's true only with -std. */
bec39cab
AC
3562int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3563
81ecdfbb
RW
3564/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3565 inside strings and character constants. */
3566#define FOO(x) 'x'
3567int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3568
c906108c
SS
3569int test (int i, double x);
3570struct s1 {int (*f) (int a);};
3571struct s2 {int (*f) (double a);};
3572int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3573int argc;
3574char **argv;
bec39cab
AC
3575int
3576main ()
3577{
c906108c 3578return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3579 ;
3580 return 0;
3581}
3582_ACEOF
81ecdfbb
RW
3583for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3584 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3585do
3586 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3587 if ac_fn_c_try_compile "$LINENO"; then :
3588 ac_cv_prog_cc_c89=$ac_arg
c906108c 3589fi
81ecdfbb
RW
3590rm -f core conftest.err conftest.$ac_objext
3591 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3592done
81ecdfbb 3593rm -f conftest.$ac_ext
bec39cab 3594CC=$ac_save_CC
c906108c
SS
3595
3596fi
81ecdfbb
RW
3597# AC_CACHE_VAL
3598case "x$ac_cv_prog_cc_c89" in
3599 x)
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3601$as_echo "none needed" >&6; } ;;
3602 xno)
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3604$as_echo "unsupported" >&6; } ;;
bec39cab 3605 *)
81ecdfbb
RW
3606 CC="$CC $ac_cv_prog_cc_c89"
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3608$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3609esac
81ecdfbb 3610if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3611
b4e70030
JB
3612fi
3613
bec39cab
AC
3614ac_ext=c
3615ac_cpp='$CPP $CPPFLAGS'
3616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3618ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3619
f434ba03
PA
3620ac_aux_dir=
3621for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3622 for ac_t in install-sh install.sh shtool; do
3623 if test -f "$ac_dir/$ac_t"; then
3624 ac_aux_dir=$ac_dir
3625 ac_install_sh="$ac_aux_dir/$ac_t -c"
3626 break 2
3627 fi
3628 done
3629done
3630if test -z "$ac_aux_dir"; then
3631 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3632fi
3633
3634# These three variables are undocumented and unsupported,
3635# and are intended to be withdrawn in a future Autoconf release.
3636# They can cause serious problems if a builder's source tree is in a directory
3637# whose full name contains unusual characters.
3638ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3639ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3640ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3641
3642
3643# Make sure we can run config.sub.
3644$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3645 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3646
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3648$as_echo_n "checking build system type... " >&6; }
3649if test "${ac_cv_build+set}" = set; then :
3650 $as_echo_n "(cached) " >&6
3651else
3652 ac_build_alias=$build_alias
3653test "x$ac_build_alias" = x &&
3654 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3655test "x$ac_build_alias" = x &&
3656 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3657ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3658 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3659
3660fi
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3662$as_echo "$ac_cv_build" >&6; }
3663case $ac_cv_build in
3664*-*-*) ;;
3665*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3666esac
3667build=$ac_cv_build
3668ac_save_IFS=$IFS; IFS='-'
3669set x $ac_cv_build
3670shift
3671build_cpu=$1
3672build_vendor=$2
3673shift; shift
3674# Remember, the first character of IFS is used to create $*,
3675# except with old shells:
3676build_os=$*
3677IFS=$ac_save_IFS
3678case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3679
3680
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3682$as_echo_n "checking host system type... " >&6; }
3683if test "${ac_cv_host+set}" = set; then :
3684 $as_echo_n "(cached) " >&6
3685else
3686 if test "x$host_alias" = x; then
3687 ac_cv_host=$ac_cv_build
3688else
3689 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3690 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3691fi
3692
3693fi
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3695$as_echo "$ac_cv_host" >&6; }
3696case $ac_cv_host in
3697*-*-*) ;;
3698*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3699esac
3700host=$ac_cv_host
3701ac_save_IFS=$IFS; IFS='-'
3702set x $ac_cv_host
3703shift
3704host_cpu=$1
3705host_vendor=$2
3706shift; shift
3707# Remember, the first character of IFS is used to create $*,
3708# except with old shells:
3709host_os=$*
3710IFS=$ac_save_IFS
3711case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3712
3713
60ca704f 3714
bec39cab
AC
3715ac_ext=c
3716ac_cpp='$CPP $CPPFLAGS'
3717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3719ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3721$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3722# On Suns, sometimes $CPP names a directory.
3723if test -n "$CPP" && test -d "$CPP"; then
3724 CPP=
8bb2c122 3725fi
bec39cab 3726if test -z "$CPP"; then
81ecdfbb
RW
3727 if test "${ac_cv_prog_CPP+set}" = set; then :
3728 $as_echo_n "(cached) " >&6
bec39cab
AC
3729else
3730 # Double quotes because CPP needs to be expanded
3731 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3732 do
3733 ac_preproc_ok=false
3734for ac_c_preproc_warn_flag in '' yes
3735do
3736 # Use a header file that comes with gcc, so configuring glibc
3737 # with a fresh cross-compiler works.
3738 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3739 # <limits.h> exists even on freestanding compilers.
3740 # On the NeXT, cc -E runs the code through the compiler's parser,
3741 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3743/* end confdefs.h. */
3744#ifdef __STDC__
3745# include <limits.h>
3746#else
3747# include <assert.h>
3748#endif
3749 Syntax error
3750_ACEOF
81ecdfbb 3751if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3752
81ecdfbb 3753else
bec39cab
AC
3754 # Broken: fails on valid input.
3755continue
3756fi
3757rm -f conftest.err conftest.$ac_ext
3758
81ecdfbb 3759 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3760 # can be detected and how.
81ecdfbb 3761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3762/* end confdefs.h. */
3763#include <ac_nonexistent.h>
3764_ACEOF
81ecdfbb 3765if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3766 # Broken: success on invalid input.
3767continue
8bb2c122 3768else
bec39cab
AC
3769 # Passes both tests.
3770ac_preproc_ok=:
3771break
8bb2c122 3772fi
bec39cab 3773rm -f conftest.err conftest.$ac_ext
8bb2c122 3774
bec39cab
AC
3775done
3776# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3777rm -f conftest.err conftest.$ac_ext
81ecdfbb 3778if $ac_preproc_ok; then :
bec39cab
AC
3779 break
3780fi
8bb2c122 3781
bec39cab
AC
3782 done
3783 ac_cv_prog_CPP=$CPP
ddc9cd0f 3784
c906108c 3785fi
bec39cab
AC
3786 CPP=$ac_cv_prog_CPP
3787else
3788 ac_cv_prog_CPP=$CPP
c906108c 3789fi
81ecdfbb
RW
3790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3791$as_echo "$CPP" >&6; }
bec39cab
AC
3792ac_preproc_ok=false
3793for ac_c_preproc_warn_flag in '' yes
3794do
3795 # Use a header file that comes with gcc, so configuring glibc
3796 # with a fresh cross-compiler works.
3797 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3798 # <limits.h> exists even on freestanding compilers.
3799 # On the NeXT, cc -E runs the code through the compiler's parser,
3800 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3802/* end confdefs.h. */
3803#ifdef __STDC__
3804# include <limits.h>
3805#else
3806# include <assert.h>
3807#endif
3808 Syntax error
3809_ACEOF
81ecdfbb 3810if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3811
81ecdfbb 3812else
bec39cab
AC
3813 # Broken: fails on valid input.
3814continue
3815fi
3816rm -f conftest.err conftest.$ac_ext
3817
81ecdfbb 3818 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3819 # can be detected and how.
81ecdfbb 3820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3821/* end confdefs.h. */
3822#include <ac_nonexistent.h>
3823_ACEOF
81ecdfbb 3824if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3825 # Broken: success on invalid input.
3826continue
c906108c 3827else
bec39cab
AC
3828 # Passes both tests.
3829ac_preproc_ok=:
3830break
c906108c 3831fi
bec39cab 3832rm -f conftest.err conftest.$ac_ext
c906108c 3833
bec39cab
AC
3834done
3835# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3836rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3837if $ac_preproc_ok; then :
3838
c906108c 3839else
81ecdfbb
RW
3840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3842as_fn_error "C preprocessor \"$CPP\" fails sanity check
3843See \`config.log' for more details." "$LINENO" 5; }
c906108c 3844fi
c906108c 3845
bec39cab
AC
3846ac_ext=c
3847ac_cpp='$CPP $CPPFLAGS'
3848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3850ac_compiler_gnu=$ac_cv_c_compiler_gnu
3851
3852
81ecdfbb
RW
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3854$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3855if test "${ac_cv_path_GREP+set}" = set; then :
3856 $as_echo_n "(cached) " >&6
4e8d927d 3857else
81ecdfbb
RW
3858 if test -z "$GREP"; then
3859 ac_path_GREP_found=false
3860 # Loop through the user's path and test for each of PROGNAME-LIST
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3863do
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_prog in grep ggrep; do
3867 for ac_exec_ext in '' $ac_executable_extensions; do
3868 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3869 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3870# Check for GNU ac_path_GREP and select it if it is found.
3871 # Check for GNU $ac_path_GREP
3872case `"$ac_path_GREP" --version 2>&1` in
3873*GNU*)
3874 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3875*)
3876 ac_count=0
3877 $as_echo_n 0123456789 >"conftest.in"
3878 while :
3879 do
3880 cat "conftest.in" "conftest.in" >"conftest.tmp"
3881 mv "conftest.tmp" "conftest.in"
3882 cp "conftest.in" "conftest.nl"
3883 $as_echo 'GREP' >> "conftest.nl"
3884 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3885 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3886 as_fn_arith $ac_count + 1 && ac_count=$as_val
3887 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3888 # Best one so far, save it but keep looking for a better one
3889 ac_cv_path_GREP="$ac_path_GREP"
3890 ac_path_GREP_max=$ac_count
bec39cab 3891 fi
81ecdfbb
RW
3892 # 10*(2^10) chars as input seems more than enough
3893 test $ac_count -gt 10 && break
3894 done
3895 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3896esac
bec39cab 3897
81ecdfbb
RW
3898 $ac_path_GREP_found && break 3
3899 done
3900 done
3901 done
3902IFS=$as_save_IFS
3903 if test -z "$ac_cv_path_GREP"; then
3904 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3905 fi
c906108c 3906else
81ecdfbb 3907 ac_cv_path_GREP=$GREP
c906108c 3908fi
c906108c 3909
81ecdfbb
RW
3910fi
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3912$as_echo "$ac_cv_path_GREP" >&6; }
3913 GREP="$ac_cv_path_GREP"
c906108c 3914
c906108c 3915
81ecdfbb
RW
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3917$as_echo_n "checking for egrep... " >&6; }
3918if test "${ac_cv_path_EGREP+set}" = set; then :
3919 $as_echo_n "(cached) " >&6
783e057b 3920else
81ecdfbb
RW
3921 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3922 then ac_cv_path_EGREP="$GREP -E"
3923 else
3924 if test -z "$EGREP"; then
3925 ac_path_EGREP_found=false
3926 # Loop through the user's path and test for each of PROGNAME-LIST
3927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3929do
3930 IFS=$as_save_IFS
3931 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3932 for ac_prog in egrep; do
3933 for ac_exec_ext in '' $ac_executable_extensions; do
3934 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3935 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3936# Check for GNU ac_path_EGREP and select it if it is found.
3937 # Check for GNU $ac_path_EGREP
3938case `"$ac_path_EGREP" --version 2>&1` in
3939*GNU*)
3940 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3941*)
3942 ac_count=0
3943 $as_echo_n 0123456789 >"conftest.in"
3944 while :
3945 do
3946 cat "conftest.in" "conftest.in" >"conftest.tmp"
3947 mv "conftest.tmp" "conftest.in"
3948 cp "conftest.in" "conftest.nl"
3949 $as_echo 'EGREP' >> "conftest.nl"
3950 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3951 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3952 as_fn_arith $ac_count + 1 && ac_count=$as_val
3953 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3954 # Best one so far, save it but keep looking for a better one
3955 ac_cv_path_EGREP="$ac_path_EGREP"
3956 ac_path_EGREP_max=$ac_count
3957 fi
3958 # 10*(2^10) chars as input seems more than enough
3959 test $ac_count -gt 10 && break
3960 done
3961 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3962esac
bec39cab 3963
81ecdfbb
RW
3964 $ac_path_EGREP_found && break 3
3965 done
3966 done
3967 done
3968IFS=$as_save_IFS
3969 if test -z "$ac_cv_path_EGREP"; then
3970 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3971 fi
783e057b 3972else
81ecdfbb 3973 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3974fi
3975
81ecdfbb 3976 fi
783e057b 3977fi
81ecdfbb
RW
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3979$as_echo "$ac_cv_path_EGREP" >&6; }
3980 EGREP="$ac_cv_path_EGREP"
3981
783e057b 3982
81ecdfbb
RW
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3984$as_echo_n "checking for ANSI C header files... " >&6; }
3985if test "${ac_cv_header_stdc+set}" = set; then :
3986 $as_echo_n "(cached) " >&6
783e057b 3987else
81ecdfbb 3988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3989/* end confdefs.h. */
783e057b 3990#include <stdlib.h>
bec39cab 3991#include <stdarg.h>
783e057b
DJ
3992#include <string.h>
3993#include <float.h>
c906108c 3994
bec39cab
AC
3995int
3996main ()
3997{
c906108c 3998
bec39cab
AC
3999 ;
4000 return 0;
4001}
4002_ACEOF
81ecdfbb 4003if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4004 ac_cv_header_stdc=yes
c906108c 4005else
81ecdfbb 4006 ac_cv_header_stdc=no
c906108c 4007fi
81ecdfbb 4008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4009
783e057b
DJ
4010if test $ac_cv_header_stdc = yes; then
4011 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4013/* end confdefs.h. */
4014#include <string.h>
c906108c 4015
783e057b
DJ
4016_ACEOF
4017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4018 $EGREP "memchr" >/dev/null 2>&1; then :
4019
c906108c 4020else
783e057b 4021 ac_cv_header_stdc=no
c906108c 4022fi
783e057b 4023rm -f conftest*
c906108c
SS
4024
4025fi
4026
783e057b
DJ
4027if test $ac_cv_header_stdc = yes; then
4028 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4030/* end confdefs.h. */
4031#include <stdlib.h>
bec39cab 4032
783e057b
DJ
4033_ACEOF
4034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4035 $EGREP "free" >/dev/null 2>&1; then :
4036
bec39cab 4037else
783e057b 4038 ac_cv_header_stdc=no
bec39cab 4039fi
783e057b 4040rm -f conftest*
bec39cab
AC
4041
4042fi
bec39cab 4043
783e057b
DJ
4044if test $ac_cv_header_stdc = yes; then
4045 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4046 if test "$cross_compiling" = yes; then :
783e057b 4047 :
bec39cab 4048else
81ecdfbb 4049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4050/* end confdefs.h. */
4051#include <ctype.h>
81ecdfbb 4052#include <stdlib.h>
783e057b
DJ
4053#if ((' ' & 0x0FF) == 0x020)
4054# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4055# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4056#else
4057# define ISLOWER(c) \
4058 (('a' <= (c) && (c) <= 'i') \
4059 || ('j' <= (c) && (c) <= 'r') \
4060 || ('s' <= (c) && (c) <= 'z'))
4061# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4062#endif
4063
4064#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4065int
4066main ()
4067{
4068 int i;
4069 for (i = 0; i < 256; i++)
4070 if (XOR (islower (i), ISLOWER (i))
4071 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4072 return 2;
4073 return 0;
783e057b
DJ
4074}
4075_ACEOF
81ecdfbb 4076if ac_fn_c_try_run "$LINENO"; then :
783e057b 4077
81ecdfbb
RW
4078else
4079 ac_cv_header_stdc=no
783e057b 4080fi
81ecdfbb
RW
4081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4082 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4083fi
81ecdfbb 4084
783e057b
DJ
4085fi
4086fi
81ecdfbb
RW
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4088$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4089if test $ac_cv_header_stdc = yes; then
4090
81ecdfbb 4091$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4092
4093fi
4094
4095# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4096for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4097 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4098do :
4099 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4100ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4101"
4102eval as_val=\$$as_ac_Header
4103 if test "x$as_val" = x""yes; then :
783e057b 4104 cat >>confdefs.h <<_ACEOF
81ecdfbb 4105#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4106_ACEOF
4107
4108fi
4109
4110done
4111
4112
4113
f434ba03
PA
4114
4115
81ecdfbb
RW
4116 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4117if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4118 MINIX=yes
4119else
4120 MINIX=
4121fi
4122
4123
4124 if test "$MINIX" = yes; then
4125
81ecdfbb 4126$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4127
4128
81ecdfbb 4129$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4130
4131
81ecdfbb 4132$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4133
4134 fi
4135
f434ba03
PA
4136 case "$host_os" in
4137 hpux*)
4138
4139$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4140
4141 ;;
4142 esac
4143
783e057b 4144
81ecdfbb
RW
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4146$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4147if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4148 $as_echo_n "(cached) " >&6
783e057b 4149else
81ecdfbb 4150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4151/* end confdefs.h. */
4152
f434ba03
PA
4153# define __EXTENSIONS__ 1
4154 $ac_includes_default
783e057b
DJ
4155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
81ecdfbb 4163if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4164 ac_cv_safe_to_define___extensions__=yes
4165else
81ecdfbb 4166 ac_cv_safe_to_define___extensions__=no
783e057b 4167fi
81ecdfbb 4168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4169fi
81ecdfbb
RW
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4171$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4172 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4173 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4174
81ecdfbb 4175 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4176
770d76d7
PA
4177 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4178
81ecdfbb 4179 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4180
81ecdfbb 4181 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4182
81ecdfbb 4183 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4184
4185
770d76d7
PA
4186
4187
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4189$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4190if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4191 $as_echo_n "(cached) " >&6
4192else
4193
4194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4195/* end confdefs.h. */
4196
4197#ifdef __ACK__
4198Amsterdam
4199#endif
4200
4201_ACEOF
4202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4203 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4204 gl_cv_c_amsterdam_compiler=yes
4205else
4206 gl_cv_c_amsterdam_compiler=no
4207fi
4208rm -f conftest*
4209
4210
4211fi
4212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4213$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
4214 if test -z "$AR"; then
4215 if test $gl_cv_c_amsterdam_compiler = yes; then
4216 AR='cc -c.a'
4217 if test -z "$ARFLAGS"; then
4218 ARFLAGS='-o'
4219 fi
4220 else
4221 if test -n "$ac_tool_prefix"; then
4222 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4223set dummy ${ac_tool_prefix}ar; ac_word=$2
4224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4225$as_echo_n "checking for $ac_word... " >&6; }
4226if test "${ac_cv_prog_AR+set}" = set; then :
4227 $as_echo_n "(cached) " >&6
4228else
4229 if test -n "$AR"; then
4230 ac_cv_prog_AR="$AR" # Let the user override the test.
4231else
4232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4233for as_dir in $PATH
4234do
4235 IFS=$as_save_IFS
4236 test -z "$as_dir" && as_dir=.
4237 for ac_exec_ext in '' $ac_executable_extensions; do
4238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4239 ac_cv_prog_AR="${ac_tool_prefix}ar"
4240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4241 break 2
4242 fi
4243done
4244 done
4245IFS=$as_save_IFS
4246
4247fi
4248fi
4249AR=$ac_cv_prog_AR
4250if test -n "$AR"; then
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4252$as_echo "$AR" >&6; }
4253else
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4255$as_echo "no" >&6; }
4256fi
4257
4258
4259fi
4260if test -z "$ac_cv_prog_AR"; then
4261 ac_ct_AR=$AR
4262 # Extract the first word of "ar", so it can be a program name with args.
4263set dummy ar; ac_word=$2
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4265$as_echo_n "checking for $ac_word... " >&6; }
4266if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4267 $as_echo_n "(cached) " >&6
4268else
4269 if test -n "$ac_ct_AR"; then
4270 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4271else
4272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273for as_dir in $PATH
4274do
4275 IFS=$as_save_IFS
4276 test -z "$as_dir" && as_dir=.
4277 for ac_exec_ext in '' $ac_executable_extensions; do
4278 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4279 ac_cv_prog_ac_ct_AR="ar"
4280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4281 break 2
4282 fi
4283done
4284 done
4285IFS=$as_save_IFS
4286
4287fi
4288fi
4289ac_ct_AR=$ac_cv_prog_ac_ct_AR
4290if test -n "$ac_ct_AR"; then
4291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4292$as_echo "$ac_ct_AR" >&6; }
4293else
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4295$as_echo "no" >&6; }
4296fi
4297
4298 if test "x$ac_ct_AR" = x; then
4299 AR="ar"
4300 else
4301 case $cross_compiling:$ac_tool_warned in
4302yes:)
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4304$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4305ac_tool_warned=yes ;;
4306esac
4307 AR=$ac_ct_AR
4308 fi
4309else
4310 AR="$ac_cv_prog_AR"
4311fi
4312
4313 if test -z "$ARFLAGS"; then
4314 ARFLAGS='cru'
4315 fi
4316 fi
4317 else
4318 if test -z "$ARFLAGS"; then
4319 ARFLAGS='cru'
4320 fi
4321 fi
4322
4323
4324 if test -z "$RANLIB"; then
4325 if test $gl_cv_c_amsterdam_compiler = yes; then
4326 RANLIB=':'
4327 else
4328 if test -n "$ac_tool_prefix"; then
81ecdfbb
RW
4329 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4330set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4332$as_echo_n "checking for $ac_word... " >&6; }
4333if test "${ac_cv_prog_RANLIB+set}" = set; then :
4334 $as_echo_n "(cached) " >&6
4335else
4336 if test -n "$RANLIB"; then
4337 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4338else
4339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342 IFS=$as_save_IFS
4343 test -z "$as_dir" && as_dir=.
4344 for ac_exec_ext in '' $ac_executable_extensions; do
4345 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4346 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348 break 2
4349 fi
4350done
4351 done
4352IFS=$as_save_IFS
783e057b 4353
81ecdfbb
RW
4354fi
4355fi
4356RANLIB=$ac_cv_prog_RANLIB
4357if test -n "$RANLIB"; then
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4359$as_echo "$RANLIB" >&6; }
4360else
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4362$as_echo "no" >&6; }
4363fi
783e057b
DJ
4364
4365
81ecdfbb
RW
4366fi
4367if test -z "$ac_cv_prog_RANLIB"; then
4368 ac_ct_RANLIB=$RANLIB
4369 # Extract the first word of "ranlib", so it can be a program name with args.
4370set dummy ranlib; ac_word=$2
4371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372$as_echo_n "checking for $ac_word... " >&6; }
4373if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4374 $as_echo_n "(cached) " >&6
783e057b 4375else
81ecdfbb
RW
4376 if test -n "$ac_ct_RANLIB"; then
4377 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4378else
4379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4380for as_dir in $PATH
4381do
4382 IFS=$as_save_IFS
4383 test -z "$as_dir" && as_dir=.
4384 for ac_exec_ext in '' $ac_executable_extensions; do
4385 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4386 ac_cv_prog_ac_ct_RANLIB="ranlib"
4387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4388 break 2
4389 fi
4390done
4391 done
4392IFS=$as_save_IFS
4393
4394fi
4395fi
4396ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4397if test -n "$ac_ct_RANLIB"; then
4398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4399$as_echo "$ac_ct_RANLIB" >&6; }
4400else
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4402$as_echo "no" >&6; }
4403fi
4404
4405 if test "x$ac_ct_RANLIB" = x; then
4406 RANLIB=":"
4407 else
4408 case $cross_compiling:$ac_tool_warned in
4409yes:)
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4411$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4412ac_tool_warned=yes ;;
4413esac
4414 RANLIB=$ac_ct_RANLIB
4415 fi
4416else
4417 RANLIB="$ac_cv_prog_RANLIB"
4418fi
4419
770d76d7
PA
4420 fi
4421 fi
4422
4423
81ecdfbb
RW
4424
4425
4426
4427
4428
3388710e
JM
4429
4430
3388710e 4431
f434ba03 4432 # Code from module extensions:
3388710e 4433
f434ba03 4434 # Code from module include_next:
55a8c076 4435 # Code from module inttypes:
770d76d7 4436 # Code from module inttypes-incomplete:
f434ba03
PA
4437 # Code from module memchr:
4438 # Code from module memmem:
4439 # Code from module memmem-simple:
4440 # Code from module multiarch:
770d76d7
PA
4441 # Code from module snippet/arg-nonnull:
4442 # Code from module snippet/c++defs:
4443 # Code from module snippet/warn-on-use:
f434ba03
PA
4444 # Code from module stddef:
4445 # Code from module stdint:
4446 # Code from module string:
174e088e 4447 # Code from module update-copyright:
3388710e
JM
4448
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4450$as_echo_n "checking target system type... " >&6; }
4451if test "${ac_cv_target+set}" = set; then :
4452 $as_echo_n "(cached) " >&6
4453else
4454 if test "x$target_alias" = x; then
4455 ac_cv_target=$ac_cv_host
4456else
4457 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4458 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4459fi
4460
4461fi
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4463$as_echo "$ac_cv_target" >&6; }
4464case $ac_cv_target in
4465*-*-*) ;;
4466*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4467esac
4468target=$ac_cv_target
4469ac_save_IFS=$IFS; IFS='-'
4470set x $ac_cv_target
4471shift
4472target_cpu=$1
4473target_vendor=$2
4474shift; shift
4475# Remember, the first character of IFS is used to create $*,
4476# except with old shells:
4477target_os=$*
4478IFS=$ac_save_IFS
4479case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4480
4481
4482# The aliases save the names the user supplied, while $host etc.
4483# will get canonicalized.
4484test -n "$target_alias" &&
4485 test "$program_prefix$program_suffix$program_transform_name" = \
4486 NONENONEs,x,x, &&
4487 program_prefix=${target_alias}-
4488
4489# The tests for host and target for $enable_largefile require
4490# canonical names.
4491
4492
81ecdfbb 4493
da2f07f1
JK
4494# As the $enable_largefile decision depends on --enable-plugins we must set it
4495# even in directories otherwise not depending on the $plugins option.
4496
4497
4498# Check whether --enable-plugins was given.
4499if test "${enable_plugins+set}" = set; then :
4500 enableval=$enable_plugins; case "${enableval}" in
4501 yes | "") plugins=yes ;;
4502 no) plugins=no ;;
4503 *) plugins=yes ;;
4504 esac
4505else
4506 plugins=no
4507fi
4508
4509
4510
4511case "${host}" in
4512 sparc-*-solaris*|i[3-7]86-*-solaris*)
4513 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4514 # are mutually exclusive; and without procfs support, the bfd/ elf module
4515 # cannot provide certain routines such as elfcore_write_prpsinfo
4516 # or elfcore_write_prstatus. So unless the user explicitly requested
4517 # large-file support through the --enable-largefile switch, disable
4518 # large-file support in favor of procfs support.
4519 test "${target}" = "${host}" -a "x$plugins" = xno \
4520 && : ${enable_largefile="no"}
4521 ;;
4522esac
4523
4524# Check whether --enable-largefile was given.
4525if test "${enable_largefile+set}" = set; then :
4526 enableval=$enable_largefile;
4527fi
4528
4529if test "$enable_largefile" != no; then
4530
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4532$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4533if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4534 $as_echo_n "(cached) " >&6
4535else
4536 ac_cv_sys_largefile_CC=no
4537 if test "$GCC" != yes; then
4538 ac_save_CC=$CC
4539 while :; do
4540 # IRIX 6.2 and later do not support large files by default,
4541 # so use the C compiler's -n32 option if that helps.
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <sys/types.h>
4545 /* Check that off_t can represent 2**63 - 1 correctly.
4546 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4547 since some C++ compilers masquerading as C compilers
4548 incorrectly reject 9223372036854775807. */
4549#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4550 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4551 && LARGE_OFF_T % 2147483647 == 1)
4552 ? 1 : -1];
4553int
4554main ()
4555{
4556
4557 ;
4558 return 0;
4559}
4560_ACEOF
4561 if ac_fn_c_try_compile "$LINENO"; then :
4562 break
4563fi
4564rm -f core conftest.err conftest.$ac_objext
4565 CC="$CC -n32"
4566 if ac_fn_c_try_compile "$LINENO"; then :
4567 ac_cv_sys_largefile_CC=' -n32'; break
4568fi
4569rm -f core conftest.err conftest.$ac_objext
4570 break
4571 done
4572 CC=$ac_save_CC
4573 rm -f conftest.$ac_ext
4574 fi
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4577$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4578 if test "$ac_cv_sys_largefile_CC" != no; then
4579 CC=$CC$ac_cv_sys_largefile_CC
4580 fi
4581
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4583$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4584if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4585 $as_echo_n "(cached) " >&6
4586else
4587 while :; do
4588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4589/* end confdefs.h. */
4590#include <sys/types.h>
4591 /* Check that off_t can represent 2**63 - 1 correctly.
4592 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4593 since some C++ compilers masquerading as C compilers
4594 incorrectly reject 9223372036854775807. */
4595#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4596 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4597 && LARGE_OFF_T % 2147483647 == 1)
4598 ? 1 : -1];
4599int
4600main ()
4601{
4602
4603 ;
4604 return 0;
4605}
4606_ACEOF
4607if ac_fn_c_try_compile "$LINENO"; then :
4608 ac_cv_sys_file_offset_bits=no; break
4609fi
4610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4612/* end confdefs.h. */
4613#define _FILE_OFFSET_BITS 64
4614#include <sys/types.h>
4615 /* Check that off_t can represent 2**63 - 1 correctly.
4616 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4617 since some C++ compilers masquerading as C compilers
4618 incorrectly reject 9223372036854775807. */
4619#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4620 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4621 && LARGE_OFF_T % 2147483647 == 1)
4622 ? 1 : -1];
4623int
4624main ()
4625{
4626
4627 ;
4628 return 0;
4629}
4630_ACEOF
4631if ac_fn_c_try_compile "$LINENO"; then :
4632 ac_cv_sys_file_offset_bits=64; break
4633fi
4634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4635 ac_cv_sys_file_offset_bits=unknown
4636 break
4637done
4638fi
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4640$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4641case $ac_cv_sys_file_offset_bits in #(
4642 no | unknown) ;;
4643 *)
4644cat >>confdefs.h <<_ACEOF
4645#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4646_ACEOF
4647;;
4648esac
4649rm -rf conftest*
4650 if test $ac_cv_sys_file_offset_bits = unknown; then
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4652$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4653if test "${ac_cv_sys_large_files+set}" = set; then :
4654 $as_echo_n "(cached) " >&6
4655else
4656 while :; do
4657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4658/* end confdefs.h. */
4659#include <sys/types.h>
4660 /* Check that off_t can represent 2**63 - 1 correctly.
4661 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4662 since some C++ compilers masquerading as C compilers
4663 incorrectly reject 9223372036854775807. */
4664#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4665 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4666 && LARGE_OFF_T % 2147483647 == 1)
4667 ? 1 : -1];
4668int
4669main ()
4670{
4671
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676if ac_fn_c_try_compile "$LINENO"; then :
4677 ac_cv_sys_large_files=no; break
4678fi
4679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4681/* end confdefs.h. */
4682#define _LARGE_FILES 1
4683#include <sys/types.h>
4684 /* Check that off_t can represent 2**63 - 1 correctly.
4685 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4686 since some C++ compilers masquerading as C compilers
4687 incorrectly reject 9223372036854775807. */
4688#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4689 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4690 && LARGE_OFF_T % 2147483647 == 1)
4691 ? 1 : -1];
4692int
4693main ()
4694{
4695
4696 ;
4697 return 0;
4698}
4699_ACEOF
4700if ac_fn_c_try_compile "$LINENO"; then :
4701 ac_cv_sys_large_files=1; break
4702fi
4703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704 ac_cv_sys_large_files=unknown
4705 break
4706done
4707fi
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4709$as_echo "$ac_cv_sys_large_files" >&6; }
4710case $ac_cv_sys_large_files in #(
4711 no | unknown) ;;
4712 *)
4713cat >>confdefs.h <<_ACEOF
4714#define _LARGE_FILES $ac_cv_sys_large_files
4715_ACEOF
4716;;
4717esac
4718rm -rf conftest*
4719 fi
4720fi
4721
4722
4723
81ecdfbb
RW
4724
4725
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4727$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4728if test "${am_cv_prog_cc_stdc+set}" = set; then :
4729 $as_echo_n "(cached) " >&6
4730else
4731 am_cv_prog_cc_stdc=no
4732ac_save_CC="$CC"
4733# Don't try gcc -ansi; that turns off useful extensions and
4734# breaks some systems' header files.
4735# AIX -qlanglvl=ansi
4736# Ultrix and OSF/1 -std1
4737# HP-UX 10.20 and later -Ae
4738# HP-UX older versions -Aa -D_HPUX_SOURCE
4739# SVR4 -Xc -D__EXTENSIONS__
4740for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4741do
783e057b 4742 CC="$ac_save_CC $ac_arg"
81ecdfbb 4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4744/* end confdefs.h. */
4745#include <stdarg.h>
4746#include <stdio.h>
4747#include <sys/types.h>
4748#include <sys/stat.h>
4749/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4750struct buf { int x; };
4751FILE * (*rcsopen) (struct buf *, struct stat *, int);
4752static char *e (p, i)
4753 char **p;
4754 int i;
4755{
4756 return p[i];
4757}
4758static char *f (char * (*g) (char **, int), char **p, ...)
4759{
4760 char *s;
4761 va_list v;
4762 va_start (v,p);
4763 s = g (p, va_arg (v,int));
4764 va_end (v);
4765 return s;
4766}
4767int test (int i, double x);
4768struct s1 {int (*f) (int a);};
4769struct s2 {int (*f) (double a);};
4770int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4771int argc;
4772char **argv;
4773
4774int
4775main ()
4776{
4777
4778return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4779
4780 ;
4781 return 0;
4782}
4783_ACEOF
81ecdfbb 4784if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4785 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4786fi
81ecdfbb 4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4788done
4789CC="$ac_save_CC"
4790
4791fi
4792
4793if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4795$as_echo "none needed" >&6; }
783e057b 4796else
81ecdfbb
RW
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4798$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4799fi
4800case "x$am_cv_prog_cc_stdc" in
4801 x|xno) ;;
4802 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4803esac
4804
4805
4806ac_aux_dir=
81ecdfbb
RW
4807for ac_dir in .. "$srcdir"/..; do
4808 for ac_t in install-sh install.sh shtool; do
4809 if test -f "$ac_dir/$ac_t"; then
4810 ac_aux_dir=$ac_dir
4811 ac_install_sh="$ac_aux_dir/$ac_t -c"
4812 break 2
4813 fi
4814 done
783e057b
DJ
4815done
4816if test -z "$ac_aux_dir"; then
81ecdfbb 4817 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4818fi
81ecdfbb
RW
4819
4820# These three variables are undocumented and unsupported,
4821# and are intended to be withdrawn in a future Autoconf release.
4822# They can cause serious problems if a builder's source tree is in a directory
4823# whose full name contains unusual characters.
4824ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4825ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4826ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4827
783e057b 4828
783e057b 4829
81ecdfbb 4830
a417dc56
RW
4831# Dependency checking.
4832rm -rf .tst 2>/dev/null
4833mkdir .tst 2>/dev/null
4834if test -d .tst; then
4835 am__leading_dot=.
4836else
4837 am__leading_dot=_
4838fi
4839rmdir .tst 2>/dev/null
4840
4841DEPDIR="${am__leading_dot}deps"
4842
81ecdfbb 4843ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4844
4845
4846depcc="$CC" am_compiler_list=
4847
4848am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4850$as_echo_n "checking dependency style of $depcc... " >&6; }
4851if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4852 $as_echo_n "(cached) " >&6
a417dc56
RW
4853else
4854 if test -f "$am_depcomp"; then
4855 # We make a subdir and do the tests there. Otherwise we can end up
4856 # making bogus files that we don't know about and never remove. For
4857 # instance it was reported that on HP-UX the gcc test will end up
4858 # making a dummy file named `D' -- because `-MD' means `put the output
4859 # in D'.
4860 mkdir conftest.dir
4861 # Copy depcomp to subdir because otherwise we won't find it if we're
4862 # using a relative directory.
4863 cp "$am_depcomp" conftest.dir
4864 cd conftest.dir
4865 # We will build objects and dependencies in a subdirectory because
4866 # it helps to detect inapplicable dependency modes. For instance
4867 # both Tru64's cc and ICC support -MD to output dependencies as a
4868 # side effect of compilation, but ICC will put the dependencies in
4869 # the current directory while Tru64 will put them in the object
4870 # directory.
4871 mkdir sub
4872
4873 am_cv_CC_dependencies_compiler_type=none
4874 if test "$am_compiler_list" = ""; then
4875 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4876 fi
4877 for depmode in $am_compiler_list; do
4878 if test $depmode = none; then break; fi
4879
81ecdfbb 4880 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4881 # Setup a source with many dependencies, because some compilers
4882 # like to wrap large dependency lists on column 80 (with \), and
4883 # we should not choose a depcomp mode which is confused by this.
4884 #
4885 # We need to recreate these files for each test, as the compiler may
4886 # overwrite some of them when testing with obscure command lines.
4887 # This happens at least with the AIX C compiler.
4888 : > sub/conftest.c
4889 for i in 1 2 3 4 5 6; do
4890 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4891 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4892 # Solaris 8's {/usr,}/bin/sh.
4893 touch sub/conftst$i.h
4894 done
4895 echo "include sub/conftest.Po" > confmf
4896
4897 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4898 # mode. It turns out that the SunPro C++ compiler does not properly
4899 # handle `-M -o', and we need to detect this.
4900 depcmd="depmode=$depmode \
4901 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4902 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4903 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4904 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4905 if env $depcmd > conftest.err 2>&1 &&
4906 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4907 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4908 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4909 # icc doesn't choke on unknown options, it will just issue warnings
4910 # or remarks (even with -Werror). So we grep stderr for any message
4911 # that says an option was ignored or not supported.
4912 # When given -MP, icc 7.0 and 7.1 complain thusly:
4913 # icc: Command line warning: ignoring option '-M'; no argument required
4914 # The diagnosis changed in icc 8.0:
4915 # icc: Command line remark: option '-MP' not supported
4916 if (grep 'ignoring option' conftest.err ||
4917 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4918 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4919 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4920 break
4921 fi
4922 fi
81ecdfbb 4923 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4924 sed -e 's/^/| /' < conftest.err >&5
4925 done
4926
4927 cd ..
4928 rm -rf conftest.dir
4929else
4930 am_cv_CC_dependencies_compiler_type=none
4931fi
4932
4933fi
81ecdfbb
RW
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4935$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4936if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4937then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4938else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4939
4940fi
4941
4942
4943# Check for the 'make' the user wants to use.
4944for ac_prog in make
4945do
4946 # Extract the first word of "$ac_prog", so it can be a program name with args.
4947set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if test "${ac_cv_prog_MAKE+set}" = set; then :
4951 $as_echo_n "(cached) " >&6
a417dc56
RW
4952else
4953 if test -n "$MAKE"; then
4954 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4955else
4956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in $PATH
4958do
4959 IFS=$as_save_IFS
4960 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4961 for ac_exec_ext in '' $ac_executable_extensions; do
4962 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4963 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4965 break 2
4966 fi
4967done
81ecdfbb
RW
4968 done
4969IFS=$as_save_IFS
a417dc56
RW
4970
4971fi
4972fi
4973MAKE=$ac_cv_prog_MAKE
4974if test -n "$MAKE"; then
81ecdfbb
RW
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4976$as_echo "$MAKE" >&6; }
a417dc56 4977else
81ecdfbb
RW
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979$as_echo "no" >&6; }
a417dc56
RW
4980fi
4981
81ecdfbb 4982
a417dc56
RW
4983 test -n "$MAKE" && break
4984done
4985
4986MAKE_IS_GNU=
4987case "`$MAKE --version 2>&1 | sed 1q`" in
4988 *GNU*)
4989 MAKE_IS_GNU=yes
4990 ;;
4991esac
81ecdfbb 4992 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4993 GMAKE_TRUE=
4994 GMAKE_FALSE='#'
4995else
4996 GMAKE_TRUE='#'
4997 GMAKE_FALSE=
4998fi
4999
81ecdfbb
RW
5000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5001$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5002set x ${MAKE-make}
5003ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5004if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5005 $as_echo_n "(cached) " >&6
a417dc56
RW
5006else
5007 cat >conftest.make <<\_ACEOF
81ecdfbb 5008SHELL = /bin/sh
a417dc56 5009all:
81ecdfbb 5010 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5011_ACEOF
5012# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5013case `${MAKE-make} -f conftest.make 2>/dev/null` in
5014 *@@@%%%=?*=@@@%%%*)
5015 eval ac_cv_prog_make_${ac_make}_set=yes;;
5016 *)
5017 eval ac_cv_prog_make_${ac_make}_set=no;;
5018esac
a417dc56
RW
5019rm -f conftest.make
5020fi
81ecdfbb
RW
5021if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5023$as_echo "yes" >&6; }
a417dc56
RW
5024 SET_MAKE=
5025else
81ecdfbb
RW
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027$as_echo "no" >&6; }
a417dc56
RW
5028 SET_MAKE="MAKE=${MAKE-make}"
5029fi
5030
5031
783e057b
DJ
5032
5033CONFIG_OBS=
5034CONFIG_DEPS=
5035CONFIG_SRCS=
5036ENABLE_CFLAGS=
5037
5038CONFIG_ALL=
5039CONFIG_CLEAN=
5040CONFIG_INSTALL=
5041CONFIG_UNINSTALL=
5042
5043# If we haven't got the data from the intl directory,
5044# assume NLS is disabled.
5045USE_NLS=no
5046LIBINTL=
5047LIBINTL_DEP=
5048INCINTL=
5049XGETTEXT=
5050GMSGFMT=
5051POSUB=
5052
5053if test -f ../intl/config.intl; then
5054 . ../intl/config.intl
5055fi
81ecdfbb
RW
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5057$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5058if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
783e057b 5061else
81ecdfbb
RW
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5063$as_echo "yes" >&6; }
783e057b 5064
81ecdfbb 5065$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5066
5067
81ecdfbb
RW
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5069$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5070 # Look for .po and .gmo files in the source directory.
5071 CATALOGS=
5072 XLINGUAS=
5073 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5074 # If there aren't any .gmo files the shell will give us the
5075 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5076 # weeded out.
5077 case "$cat" in *\**)
5078 continue;;
5079 esac
5080 # The quadruple backslash is collapsed to a double backslash
5081 # by the backticks, then collapsed again by the double quotes,
5082 # leaving us with one backslash in the sed expression (right
5083 # before the dot that mustn't act as a wildcard).
5084 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5085 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5086 # The user is allowed to set LINGUAS to a list of languages to
5087 # install catalogs for. If it's empty that means "all of them."
5088 if test "x$LINGUAS" = x; then
5089 CATALOGS="$CATALOGS $cat"
5090 XLINGUAS="$XLINGUAS $lang"
5091 else
5092 case "$LINGUAS" in *$lang*)
5093 CATALOGS="$CATALOGS $cat"
5094 XLINGUAS="$XLINGUAS $lang"
5095 ;;
5096 esac
5097 fi
5098 done
5099 LINGUAS="$XLINGUAS"
81ecdfbb
RW
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5101$as_echo "$LINGUAS" >&6; }
783e057b
DJ
5102
5103
5104 DATADIRNAME=share
5105
5106 INSTOBJEXT=.mo
5107
5108 GENCAT=gencat
5109
5110 CATOBJEXT=.gmo
5111
5112fi
5113
5114localedir='${datadir}/locale'
5115
5116
5117if test x"$USE_NLS" = xyes; then
5118 CONFIG_ALL="$CONFIG_ALL all-po"
5119 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5120 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5121 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
5122fi
5123
5124
f434ba03
PA
5125
5126
5127
770d76d7 5128
f434ba03
PA
5129 LIBC_FATAL_STDERR_=1
5130 export LIBC_FATAL_STDERR_
5131
5132
770d76d7
PA
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5134$as_echo_n "checking for unsigned long long int... " >&6; }
5135if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
55a8c076
YQ
5136 $as_echo_n "(cached) " >&6
5137else
770d76d7
PA
5138 ac_cv_type_unsigned_long_long_int=yes
5139 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
5140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55a8c076 5141/* end confdefs.h. */
f434ba03 5142
55a8c076
YQ
5143 /* For now, do not test the preprocessor; as of 2007 there are too many
5144 implementations with broken preprocessors. Perhaps this can
5145 be revisited in 2012. In the meantime, code should not expect
5146 #if to work with literals wider than 32 bits. */
5147 /* Test literals. */
5148 long long int ll = 9223372036854775807ll;
5149 long long int nll = -9223372036854775807LL;
5150 unsigned long long int ull = 18446744073709551615ULL;
5151 /* Test constant expressions. */
5152 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5153 ? 1 : -1)];
5154 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5155 ? 1 : -1)];
5156 int i = 63;
5157int
5158main ()
5159{
5160/* Test availability of runtime routines for shift and division. */
5161 long long int llmax = 9223372036854775807ll;
5162 unsigned long long int ullmax = 18446744073709551615ull;
5163 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5164 | (llmax / ll) | (llmax % ll)
5165 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5166 | (ullmax / ull) | (ullmax % ull));
5167 ;
5168 return 0;
5169}
f434ba03 5170
f434ba03 5171_ACEOF
55a8c076 5172if ac_fn_c_try_link "$LINENO"; then :
770d76d7 5173
55a8c076 5174else
770d76d7 5175 ac_cv_type_unsigned_long_long_int=no
55a8c076
YQ
5176fi
5177rm -f core conftest.err conftest.$ac_objext \
5178 conftest$ac_exeext conftest.$ac_ext
770d76d7 5179 fi
55a8c076 5180fi
770d76d7
PA
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5182$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
5183 if test $ac_cv_type_unsigned_long_long_int = yes; then
55a8c076 5184
770d76d7 5185$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
55a8c076
YQ
5186
5187 fi
5188
5189
770d76d7
PA
5190
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5192$as_echo_n "checking for long long int... " >&6; }
5193if test "${ac_cv_type_long_long_int+set}" = set; then :
55a8c076 5194 $as_echo_n "(cached) " >&6
770d76d7
PA
5195else
5196 ac_cv_type_long_long_int=yes
5197 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
5198 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
5199 if test $ac_cv_type_long_long_int = yes; then
5200 if test "$cross_compiling" = yes; then :
5201 :
55a8c076
YQ
5202else
5203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h. */
770d76d7
PA
5205#include <limits.h>
5206 #ifndef LLONG_MAX
5207 # define HALF \
5208 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5209 # define LLONG_MAX (HALF - 1 + HALF)
5210 #endif
55a8c076
YQ
5211int
5212main ()
5213{
770d76d7
PA
5214long long int n = 1;
5215 int i;
5216 for (i = 0; ; i++)
5217 {
5218 long long int m = n << i;
5219 if (m >> i != n)
5220 return 1;
5221 if (LLONG_MAX / 2 < m)
5222 break;
5223 }
5224 return 0;
55a8c076
YQ
5225 ;
5226 return 0;
5227}
55a8c076 5228_ACEOF
770d76d7
PA
5229if ac_fn_c_try_run "$LINENO"; then :
5230
55a8c076 5231else
770d76d7 5232 ac_cv_type_long_long_int=no
55a8c076 5233fi
770d76d7
PA
5234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5235 conftest.$ac_objext conftest.beam conftest.$ac_ext
55a8c076 5236fi
55a8c076 5237
770d76d7
PA
5238 fi
5239 fi
5240fi
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5242$as_echo "$ac_cv_type_long_long_int" >&6; }
5243 if test $ac_cv_type_long_long_int = yes; then
5244
5245$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
55a8c076
YQ
5246
5247 fi
5248
5249
5250
770d76d7
PA
5251
5252
5253 for ac_header in $gl_header_list
5254do :
5255 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5256ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5257eval as_val=\$$as_ac_Header
5258 if test "x$as_val" = x""yes; then :
5259 cat >>confdefs.h <<_ACEOF
5260#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5261_ACEOF
5262
5263fi
5264
5265done
5266
5267
5268
5269
5270
5271
5272
55a8c076
YQ
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5274$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5275if test "${gl_cv_have_include_next+set}" = set; then :
5276 $as_echo_n "(cached) " >&6
5277else
5278 rm -rf conftestd1a conftestd1b conftestd2
5279 mkdir conftestd1a conftestd1b conftestd2
5280 cat <<EOF > conftestd1a/conftest.h
5281#define DEFINED_IN_CONFTESTD1
5282#include_next <conftest.h>
5283#ifdef DEFINED_IN_CONFTESTD2
5284int foo;
5285#else
5286#error "include_next doesn't work"
5287#endif
5288EOF
5289 cat <<EOF > conftestd1b/conftest.h
5290#define DEFINED_IN_CONFTESTD1
5291#include <stdio.h>
5292#include_next <conftest.h>
5293#ifdef DEFINED_IN_CONFTESTD2
5294int foo;
5295#else
5296#error "include_next doesn't work"
5297#endif
5298EOF
5299 cat <<EOF > conftestd2/conftest.h
5300#ifndef DEFINED_IN_CONFTESTD1
5301#error "include_next test doesn't work"
5302#endif
5303#define DEFINED_IN_CONFTESTD2
5304EOF
5305 gl_save_CPPFLAGS="$CPPFLAGS"
5306 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5308/* end confdefs.h. */
5309#include <conftest.h>
5310_ACEOF
5311if ac_fn_c_try_compile "$LINENO"; then :
5312 gl_cv_have_include_next=yes
5313else
5314 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5316/* end confdefs.h. */
5317#include <conftest.h>
5318_ACEOF
5319if ac_fn_c_try_compile "$LINENO"; then :
5320 gl_cv_have_include_next=buggy
5321else
5322 gl_cv_have_include_next=no
5323fi
5324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5325
5326fi
5327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5328 CPPFLAGS="$gl_save_CPPFLAGS"
5329 rm -rf conftestd1a conftestd1b conftestd2
5330
5331fi
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5333$as_echo "$gl_cv_have_include_next" >&6; }
5334 PRAGMA_SYSTEM_HEADER=
5335 if test $gl_cv_have_include_next = yes; then
5336 INCLUDE_NEXT=include_next
5337 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5338 if test -n "$GCC"; then
5339 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5340 fi
5341 else
5342 if test $gl_cv_have_include_next = buggy; then
5343 INCLUDE_NEXT=include
5344 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5345 else
5346 INCLUDE_NEXT=include
5347 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5348 fi
5349 fi
5350
5351
5352
770d76d7
PA
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
5354$as_echo_n "checking whether system header files limit the line length... " >&6; }
5355if test "${gl_cv_pragma_columns+set}" = set; then :
5356 $as_echo_n "(cached) " >&6
5357else
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359/* end confdefs.h. */
55a8c076 5360
770d76d7
PA
5361#ifdef __TANDEM
5362choke me
5363#endif
55a8c076 5364
55a8c076 5365_ACEOF
770d76d7
PA
5366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5367 $EGREP "choke me" >/dev/null 2>&1; then :
5368 gl_cv_pragma_columns=yes
5369else
5370 gl_cv_pragma_columns=no
55a8c076 5371fi
770d76d7 5372rm -f conftest*
55a8c076
YQ
5373
5374
770d76d7
PA
5375fi
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
5377$as_echo "$gl_cv_pragma_columns" >&6; }
5378 if test $gl_cv_pragma_columns = yes; then
5379 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
5380 else
5381 PRAGMA_COLUMNS=
5382 fi
55a8c076
YQ
5383
5384
5385
5386
5387
5388
5389
5390
5391 gl_cv_c_multiarch=no
5392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393/* end confdefs.h. */
5394#ifndef __APPLE_CC__
5395 not a universal capable compiler
5396 #endif
5397 typedef int dummy;
5398
5399_ACEOF
5400if ac_fn_c_try_compile "$LINENO"; then :
5401
5402 arch=
5403 prev=
5404 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5405 if test -n "$prev"; then
5406 case $word in
5407 i?86 | x86_64 | ppc | ppc64)
5408 if test -z "$arch" || test "$arch" = "$word"; then
5409 arch="$word"
5410 else
5411 gl_cv_c_multiarch=yes
5412 fi
5413 ;;
5414 esac
5415 prev=
5416 else
5417 if test "x$word" = "x-arch"; then
5418 prev=arch
5419 fi
5420 fi
5421 done
5422
5423fi
5424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5425 if test $gl_cv_c_multiarch = yes; then
55a8c076
YQ
5426 APPLE_UNIVERSAL_BUILD=1
5427 else
5428 APPLE_UNIVERSAL_BUILD=0
5429 fi
5430
5431
5432
5433
5434
5435 if test $ac_cv_type_long_long_int = yes; then
5436 HAVE_LONG_LONG_INT=1
5437 else
5438 HAVE_LONG_LONG_INT=0
5439 fi
5440
5441
5442 if test $ac_cv_type_unsigned_long_long_int = yes; then
5443 HAVE_UNSIGNED_LONG_LONG_INT=1
5444 else
5445 HAVE_UNSIGNED_LONG_LONG_INT=0
5446 fi
5447
5448
770d76d7
PA
5449
5450 :
5451
5452
5453
5454
5455
5456 if test $ac_cv_header_wchar_h = yes; then
5457 HAVE_WCHAR_H=1
5458 else
5459 HAVE_WCHAR_H=0
5460 fi
5461
5462
55a8c076
YQ
5463 if test $ac_cv_header_inttypes_h = yes; then
5464 HAVE_INTTYPES_H=1
5465 else
5466 HAVE_INTTYPES_H=0
5467 fi
5468
5469
5470 if test $ac_cv_header_sys_types_h = yes; then
5471 HAVE_SYS_TYPES_H=1
5472 else
5473 HAVE_SYS_TYPES_H=0
5474 fi
5475
5476
5477
5478
5479
5480
770d76d7
PA
5481
5482
55a8c076
YQ
5483 :
5484
5485
5486
5487
5488
5489
5490
770d76d7 5491
55a8c076
YQ
5492 if test $gl_cv_have_include_next = yes; then
5493 gl_cv_next_stdint_h='<'stdint.h'>'
5494 else
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
5496$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
5497if test "${gl_cv_next_stdint_h+set}" = set; then :
5498 $as_echo_n "(cached) " >&6
5499else
5500
770d76d7
PA
5501 if test $ac_cv_header_stdint_h = yes; then
5502
5503
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55a8c076
YQ
5505/* end confdefs.h. */
5506#include <stdint.h>
5507
5508_ACEOF
770d76d7
PA
5509 case "$host_os" in
5510 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5511 *) gl_absname_cpp="$ac_cpp" ;;
5512 esac
5513
5514 case "$host_os" in
5515 mingw*)
5516 gl_dirsep_regex='[/\\]'
5517 ;;
5518 *)
5519 gl_dirsep_regex='\/'
5520 ;;
5521 esac
5522 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5523
5524 gl_header_literal_regex=`echo 'stdint.h' \
5525 | sed -e "$gl_make_literal_regex_sed"`
5526 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
5527 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
5528 s|^/[^/]|//&|
5529 p
5530 q
5531 }'
5532 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5533 sed -n "$gl_absolute_header_sed"`'"'
55a8c076 5534 else
770d76d7
PA
5535 gl_cv_next_stdint_h='<'stdint.h'>'
5536 fi
5537
55a8c076
YQ
5538
5539fi
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
5541$as_echo "$gl_cv_next_stdint_h" >&6; }
5542 fi
5543 NEXT_STDINT_H=$gl_cv_next_stdint_h
5544
5545 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5547 gl_next_as_first_directive='<'stdint.h'>'
5548 else
5549 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5550 gl_next_as_first_directive=$gl_cv_next_stdint_h
5551 fi
5552 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
5553
5554
5555
770d76d7 5556
55a8c076
YQ
5557 if test $ac_cv_header_stdint_h = yes; then
5558 HAVE_STDINT_H=1
5559 else
5560 HAVE_STDINT_H=0
5561 fi
5562
5563
5564 if test $ac_cv_header_stdint_h = yes; then
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
5566$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
5567if test "${gl_cv_header_working_stdint_h+set}" = set; then :
5568 $as_echo_n "(cached) " >&6
5569else
5570 gl_cv_header_working_stdint_h=no
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573
5574
55a8c076
YQ
5575#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5576#include <stdint.h>
5577/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5578#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5579#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5580#endif
5581
5582
5583 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5584 included before <wchar.h>. */
5585 #include <stddef.h>
5586 #include <signal.h>
5587 #if HAVE_WCHAR_H
5588 # include <stdio.h>
5589 # include <time.h>
5590 # include <wchar.h>
5591 #endif
5592
5593
5594#ifdef INT8_MAX
5595int8_t a1 = INT8_MAX;
5596int8_t a1min = INT8_MIN;
5597#endif
5598#ifdef INT16_MAX
5599int16_t a2 = INT16_MAX;
5600int16_t a2min = INT16_MIN;
5601#endif
5602#ifdef INT32_MAX
5603int32_t a3 = INT32_MAX;
5604int32_t a3min = INT32_MIN;
5605#endif
5606#ifdef INT64_MAX
5607int64_t a4 = INT64_MAX;
5608int64_t a4min = INT64_MIN;
5609#endif
5610#ifdef UINT8_MAX
5611uint8_t b1 = UINT8_MAX;
5612#else
5613typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5614#endif
5615#ifdef UINT16_MAX
5616uint16_t b2 = UINT16_MAX;
5617#endif
5618#ifdef UINT32_MAX
5619uint32_t b3 = UINT32_MAX;
5620#endif
5621#ifdef UINT64_MAX
5622uint64_t b4 = UINT64_MAX;
5623#endif
5624int_least8_t c1 = INT8_C (0x7f);
5625int_least8_t c1max = INT_LEAST8_MAX;
5626int_least8_t c1min = INT_LEAST8_MIN;
5627int_least16_t c2 = INT16_C (0x7fff);
5628int_least16_t c2max = INT_LEAST16_MAX;
5629int_least16_t c2min = INT_LEAST16_MIN;
5630int_least32_t c3 = INT32_C (0x7fffffff);
5631int_least32_t c3max = INT_LEAST32_MAX;
5632int_least32_t c3min = INT_LEAST32_MIN;
5633int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5634int_least64_t c4max = INT_LEAST64_MAX;
5635int_least64_t c4min = INT_LEAST64_MIN;
5636uint_least8_t d1 = UINT8_C (0xff);
5637uint_least8_t d1max = UINT_LEAST8_MAX;
5638uint_least16_t d2 = UINT16_C (0xffff);
5639uint_least16_t d2max = UINT_LEAST16_MAX;
5640uint_least32_t d3 = UINT32_C (0xffffffff);
5641uint_least32_t d3max = UINT_LEAST32_MAX;
5642uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5643uint_least64_t d4max = UINT_LEAST64_MAX;
5644int_fast8_t e1 = INT_FAST8_MAX;
5645int_fast8_t e1min = INT_FAST8_MIN;
5646int_fast16_t e2 = INT_FAST16_MAX;
5647int_fast16_t e2min = INT_FAST16_MIN;
5648int_fast32_t e3 = INT_FAST32_MAX;
5649int_fast32_t e3min = INT_FAST32_MIN;
5650int_fast64_t e4 = INT_FAST64_MAX;
5651int_fast64_t e4min = INT_FAST64_MIN;
5652uint_fast8_t f1 = UINT_FAST8_MAX;
5653uint_fast16_t f2 = UINT_FAST16_MAX;
5654uint_fast32_t f3 = UINT_FAST32_MAX;
5655uint_fast64_t f4 = UINT_FAST64_MAX;
5656#ifdef INTPTR_MAX
5657intptr_t g = INTPTR_MAX;
5658intptr_t gmin = INTPTR_MIN;
5659#endif
5660#ifdef UINTPTR_MAX
5661uintptr_t h = UINTPTR_MAX;
5662#endif
5663intmax_t i = INTMAX_MAX;
5664uintmax_t j = UINTMAX_MAX;
5665
5666#include <limits.h> /* for CHAR_BIT */
5667#define TYPE_MINIMUM(t) \
770d76d7 5668 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
55a8c076 5669#define TYPE_MAXIMUM(t) \
770d76d7
PA
5670 ((t) ((t) 0 < (t) -1 \
5671 ? (t) -1 \
5672 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
55a8c076
YQ
5673struct s {
5674 int check_PTRDIFF:
5675 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5676 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5677 ? 1 : -1;
5678 /* Detect bug in FreeBSD 6.0 / ia64. */
5679 int check_SIG_ATOMIC:
5680 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5681 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5682 ? 1 : -1;
5683 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5684 int check_WCHAR:
5685 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5686 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5687 ? 1 : -1;
5688 /* Detect bug in mingw. */
5689 int check_WINT:
5690 WINT_MIN == TYPE_MINIMUM (wint_t)
5691 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5692 ? 1 : -1;
5693
5694 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5695 int check_UINT8_C:
5696 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5697 int check_UINT16_C:
5698 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5699
5700 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5701#ifdef UINT8_MAX
5702 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5703#endif
5704#ifdef UINT16_MAX
5705 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5706#endif
5707#ifdef UINT32_MAX
5708 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5709#endif
5710#ifdef UINT64_MAX
5711 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5712#endif
5713 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5714 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5715 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5716 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5717 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5718 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5719 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5720 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5721 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5722 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5723 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5724};
5725
5726int
5727main ()
5728{
5729
5730 ;
5731 return 0;
5732}
5733_ACEOF
5734if ac_fn_c_try_compile "$LINENO"; then :
5735 if test "$cross_compiling" = yes; then :
5736 gl_cv_header_working_stdint_h=yes
5737
5738else
5739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5740/* end confdefs.h. */
5741
5742
55a8c076
YQ
5743#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5744#include <stdint.h>
5745
5746
5747 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5748 included before <wchar.h>. */
5749 #include <stddef.h>
5750 #include <signal.h>
5751 #if HAVE_WCHAR_H
5752 # include <stdio.h>
5753 # include <time.h>
5754 # include <wchar.h>
5755 #endif
5756
5757
5758#include <stdio.h>
5759#include <string.h>
5760#define MVAL(macro) MVAL1(macro)
5761#define MVAL1(expression) #expression
5762static const char *macro_values[] =
5763 {
5764#ifdef INT8_MAX
5765 MVAL (INT8_MAX),
5766#endif
5767#ifdef INT16_MAX
5768 MVAL (INT16_MAX),
5769#endif
5770#ifdef INT32_MAX
5771 MVAL (INT32_MAX),
5772#endif
5773#ifdef INT64_MAX
5774 MVAL (INT64_MAX),
5775#endif
5776#ifdef UINT8_MAX
5777 MVAL (UINT8_MAX),
5778#endif
5779#ifdef UINT16_MAX
5780 MVAL (UINT16_MAX),
5781#endif
5782#ifdef UINT32_MAX
5783 MVAL (UINT32_MAX),
5784#endif
5785#ifdef UINT64_MAX
5786 MVAL (UINT64_MAX),
5787#endif
5788 NULL
5789 };
5790
5791int
5792main ()
5793{
5794
5795 const char **mv;
5796 for (mv = macro_values; *mv != NULL; mv++)
5797 {
5798 const char *value = *mv;
5799 /* Test whether it looks like a cast expression. */
5800 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
5801 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
5802 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
5803 || strncmp (value, "((int)"/*)*/, 6) == 0
5804 || strncmp (value, "((signed short)"/*)*/, 15) == 0
5805 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
770d76d7 5806 return mv - macro_values + 1;
55a8c076
YQ
5807 }
5808 return 0;
5809
5810 ;
5811 return 0;
5812}
5813_ACEOF
5814if ac_fn_c_try_run "$LINENO"; then :
5815 gl_cv_header_working_stdint_h=yes
5816fi
5817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5818 conftest.$ac_objext conftest.beam conftest.$ac_ext
5819fi
5820
5821
5822fi
5823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5824
5825fi
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
5827$as_echo "$gl_cv_header_working_stdint_h" >&6; }
5828 fi
5829 if test "$gl_cv_header_working_stdint_h" = yes; then
5830 STDINT_H=
5831 else
5832 for ac_header in sys/inttypes.h sys/bitypes.h
5833do :
5834 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5835ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5836eval as_val=\$$as_ac_Header
5837 if test "x$as_val" = x""yes; then :
5838 cat >>confdefs.h <<_ACEOF
5839#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5840_ACEOF
5841
5842fi
5843
5844done
5845
5846 if test $ac_cv_header_sys_inttypes_h = yes; then
5847 HAVE_SYS_INTTYPES_H=1
5848 else
5849 HAVE_SYS_INTTYPES_H=0
5850 fi
5851
5852 if test $ac_cv_header_sys_bitypes_h = yes; then
5853 HAVE_SYS_BITYPES_H=1
5854 else
5855 HAVE_SYS_BITYPES_H=0
5856 fi
5857
5858
5859
55a8c076
YQ
5860
5861 if test $APPLE_UNIVERSAL_BUILD = 0; then
5862
5863
5864 for gltype in ptrdiff_t size_t ; do
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5866$as_echo_n "checking for bit size of $gltype... " >&6; }
5867if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5868 $as_echo_n "(cached) " >&6
5869else
5870 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5871 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5872 included before <wchar.h>. */
5873 #include <stddef.h>
5874 #include <signal.h>
5875 #if HAVE_WCHAR_H
5876 # include <stdio.h>
5877 # include <time.h>
5878 # include <wchar.h>
5879 #endif
5880
5881#include <limits.h>"; then :
5882
5883else
5884 result=unknown
5885fi
5886
5887 eval gl_cv_bitsizeof_${gltype}=\$result
5888
5889fi
5890eval ac_res=\$gl_cv_bitsizeof_${gltype}
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5892$as_echo "$ac_res" >&6; }
5893 eval result=\$gl_cv_bitsizeof_${gltype}
5894 if test $result = unknown; then
5895 result=0
5896 fi
5897 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5898 cat >>confdefs.h <<_ACEOF
5899#define BITSIZEOF_${GLTYPE} $result
5900_ACEOF
5901
5902 eval BITSIZEOF_${GLTYPE}=\$result
5903 done
5904
5905
5906 fi
5907
5908
5909 for gltype in sig_atomic_t wchar_t wint_t ; do
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
5911$as_echo_n "checking for bit size of $gltype... " >&6; }
5912if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
5913 $as_echo_n "(cached) " >&6
5914else
5915 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
5916 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5917 included before <wchar.h>. */
5918 #include <stddef.h>
5919 #include <signal.h>
5920 #if HAVE_WCHAR_H
5921 # include <stdio.h>
5922 # include <time.h>
5923 # include <wchar.h>
5924 #endif
5925
5926#include <limits.h>"; then :
5927
5928else
5929 result=unknown
5930fi
5931
5932 eval gl_cv_bitsizeof_${gltype}=\$result
5933
5934fi
5935eval ac_res=\$gl_cv_bitsizeof_${gltype}
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5937$as_echo "$ac_res" >&6; }
5938 eval result=\$gl_cv_bitsizeof_${gltype}
5939 if test $result = unknown; then
5940 result=0
5941 fi
5942 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5943 cat >>confdefs.h <<_ACEOF
5944#define BITSIZEOF_${GLTYPE} $result
5945_ACEOF
5946
5947 eval BITSIZEOF_${GLTYPE}=\$result
5948 done
5949
5950
5951
5952
5953 for gltype in sig_atomic_t wchar_t wint_t ; do
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
5955$as_echo_n "checking whether $gltype is signed... " >&6; }
5956if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
5957 $as_echo_n "(cached) " >&6
5958else
5959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5960/* end confdefs.h. */
5961
5962 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5963 included before <wchar.h>. */
5964 #include <stddef.h>
5965 #include <signal.h>
5966 #if HAVE_WCHAR_H
5967 # include <stdio.h>
5968 # include <time.h>
5969 # include <wchar.h>
5970 #endif
5971
5972 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
5973int
5974main ()
5975{
5976
5977 ;
5978 return 0;
5979}
5980_ACEOF
5981if ac_fn_c_try_compile "$LINENO"; then :
5982 result=yes
5983else
5984 result=no
5985fi
5986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5987 eval gl_cv_type_${gltype}_signed=\$result
5988
5989fi
5990eval ac_res=\$gl_cv_type_${gltype}_signed
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5992$as_echo "$ac_res" >&6; }
5993 eval result=\$gl_cv_type_${gltype}_signed
5994 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
5995 if test "$result" = yes; then
5996 cat >>confdefs.h <<_ACEOF
5997#define HAVE_SIGNED_${GLTYPE} 1
5998_ACEOF
5999
6000 eval HAVE_SIGNED_${GLTYPE}=1
6001 else
6002 eval HAVE_SIGNED_${GLTYPE}=0
6003 fi
6004 done
6005
6006
6007 gl_cv_type_ptrdiff_t_signed=yes
6008 gl_cv_type_size_t_signed=no
6009 if test $APPLE_UNIVERSAL_BUILD = 0; then
6010
6011
6012 for gltype in ptrdiff_t size_t ; do
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6014$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6015if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6016 $as_echo_n "(cached) " >&6
6017else
6018 eval gl_cv_type_${gltype}_suffix=no
6019 eval result=\$gl_cv_type_${gltype}_signed
6020 if test "$result" = yes; then
6021 glsufu=
6022 else
6023 glsufu=u
6024 fi
6025 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6026 case $glsuf in
6027 '') gltype1='int';;
6028 l) gltype1='long int';;
6029 ll) gltype1='long long int';;
6030 i64) gltype1='__int64';;
6031 u) gltype1='unsigned int';;
6032 ul) gltype1='unsigned long int';;
6033 ull) gltype1='unsigned long long int';;
6034 ui64)gltype1='unsigned __int64';;
6035 esac
6036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037/* end confdefs.h. */
6038
6039 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6040 included before <wchar.h>. */
6041 #include <stddef.h>
6042 #include <signal.h>
6043 #if HAVE_WCHAR_H
6044 # include <stdio.h>
6045 # include <time.h>
6046 # include <wchar.h>
6047 #endif
6048
6049 extern $gltype foo;
6050 extern $gltype1 foo;
6051int
6052main ()
6053{
6054
6055 ;
6056 return 0;
6057}
6058_ACEOF
6059if ac_fn_c_try_compile "$LINENO"; then :
6060 eval gl_cv_type_${gltype}_suffix=\$glsuf
6061fi
6062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6063 eval result=\$gl_cv_type_${gltype}_suffix
6064 test "$result" != no && break
6065 done
6066fi
6067eval ac_res=\$gl_cv_type_${gltype}_suffix
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6069$as_echo "$ac_res" >&6; }
6070 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6071 eval result=\$gl_cv_type_${gltype}_suffix
6072 test "$result" = no && result=
6073 eval ${GLTYPE}_SUFFIX=\$result
6074 cat >>confdefs.h <<_ACEOF
6075#define ${GLTYPE}_SUFFIX $result
6076_ACEOF
6077
6078 done
6079
6080
6081 fi
6082
6083
6084 for gltype in sig_atomic_t wchar_t wint_t ; do
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6086$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6087if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6088 $as_echo_n "(cached) " >&6
6089else
6090 eval gl_cv_type_${gltype}_suffix=no
6091 eval result=\$gl_cv_type_${gltype}_signed
6092 if test "$result" = yes; then
6093 glsufu=
6094 else
6095 glsufu=u
6096 fi
6097 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6098 case $glsuf in
6099 '') gltype1='int';;
6100 l) gltype1='long int';;
6101 ll) gltype1='long long int';;
6102 i64) gltype1='__int64';;
6103 u) gltype1='unsigned int';;
6104 ul) gltype1='unsigned long int';;
6105 ull) gltype1='unsigned long long int';;
6106 ui64)gltype1='unsigned __int64';;
6107 esac
6108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6109/* end confdefs.h. */
6110
6111 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6112 included before <wchar.h>. */
6113 #include <stddef.h>
6114 #include <signal.h>
6115 #if HAVE_WCHAR_H
6116 # include <stdio.h>
6117 # include <time.h>
6118 # include <wchar.h>
6119 #endif
6120
6121 extern $gltype foo;
6122 extern $gltype1 foo;
6123int
6124main ()
6125{
6126
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131if ac_fn_c_try_compile "$LINENO"; then :
6132 eval gl_cv_type_${gltype}_suffix=\$glsuf
6133fi
6134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6135 eval result=\$gl_cv_type_${gltype}_suffix
6136 test "$result" != no && break
6137 done
6138fi
6139eval ac_res=\$gl_cv_type_${gltype}_suffix
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6141$as_echo "$ac_res" >&6; }
6142 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6143 eval result=\$gl_cv_type_${gltype}_suffix
6144 test "$result" = no && result=
6145 eval ${GLTYPE}_SUFFIX=\$result
6146 cat >>confdefs.h <<_ACEOF
6147#define ${GLTYPE}_SUFFIX $result
6148_ACEOF
6149
6150 done
6151
6152
6153
770d76d7
PA
6154 if test $BITSIZEOF_WINT_T -lt 32; then
6155 BITSIZEOF_WINT_T=32
6156 fi
6157
55a8c076
YQ
6158 STDINT_H=stdint.h
6159 fi
6160
770d76d7
PA
6161 if test -n "$STDINT_H"; then
6162 GL_GENERATE_STDINT_H_TRUE=
6163 GL_GENERATE_STDINT_H_FALSE='#'
6164else
6165 GL_GENERATE_STDINT_H_TRUE='#'
6166 GL_GENERATE_STDINT_H_FALSE=
6167fi
55a8c076
YQ
6168
6169
55a8c076 6170
55a8c076 6171
55a8c076 6172
55a8c076 6173
55a8c076 6174
55a8c076 6175
770d76d7
PA
6176 GNULIB_IMAXABS=0;
6177 GNULIB_IMAXDIV=0;
6178 GNULIB_STRTOIMAX=0;
6179 GNULIB_STRTOUMAX=0;
6180 HAVE_DECL_IMAXABS=1;
6181 HAVE_DECL_IMAXDIV=1;
6182 HAVE_DECL_STRTOIMAX=1;
6183 HAVE_DECL_STRTOUMAX=1;
6184 REPLACE_STRTOIMAX=0;
6185 INT32_MAX_LT_INTMAX_MAX=1;
6186 INT64_MAX_EQ_LONG_MAX='defined _LP64';
6187 PRI_MACROS_BROKEN=0;
6188 PRIPTR_PREFIX=__PRIPTR_PREFIX;
6189 UINT32_MAX_LT_UINTMAX_MAX=1;
6190 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
55a8c076 6191
55a8c076 6192
55a8c076 6193
55a8c076 6194
770d76d7 6195 :
55a8c076
YQ
6196
6197
6198
6199
6200
6201
6202
55a8c076 6203
55a8c076
YQ
6204
6205
6206
55a8c076 6207
55a8c076 6208
770d76d7 6209 :
55a8c076
YQ
6210
6211
55a8c076 6212
55a8c076
YQ
6213
6214
6215
55a8c076 6216
55a8c076 6217
770d76d7
PA
6218 if test $gl_cv_have_include_next = yes; then
6219 gl_cv_next_inttypes_h='<'inttypes.h'>'
6220 else
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
6222$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
6223if test "${gl_cv_next_inttypes_h+set}" = set; then :
6224 $as_echo_n "(cached) " >&6
6225else
55a8c076 6226
770d76d7
PA
6227 if test $ac_cv_header_inttypes_h = yes; then
6228
6229
6230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231/* end confdefs.h. */
6232#include <inttypes.h>
6233
6234_ACEOF
6235 case "$host_os" in
6236 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6237 *) gl_absname_cpp="$ac_cpp" ;;
6238 esac
6239
6240 case "$host_os" in
6241 mingw*)
6242 gl_dirsep_regex='[/\\]'
6243 ;;
6244 *)
6245 gl_dirsep_regex='\/'
6246 ;;
6247 esac
6248 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6249
6250 gl_header_literal_regex=`echo 'inttypes.h' \
6251 | sed -e "$gl_make_literal_regex_sed"`
6252 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
6253 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
6254 s|^/[^/]|//&|
6255 p
6256 q
6257 }'
6258 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6259 sed -n "$gl_absolute_header_sed"`'"'
6260 else
6261 gl_cv_next_inttypes_h='<'inttypes.h'>'
6262 fi
6263
6264
6265fi
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
6267$as_echo "$gl_cv_next_inttypes_h" >&6; }
6268 fi
6269 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
6270
6271 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6272 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6273 gl_next_as_first_directive='<'inttypes.h'>'
6274 else
6275 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6276 gl_next_as_first_directive=$gl_cv_next_inttypes_h
6277 fi
6278 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
6279
6280
6281
6282
6283
6284
6285
6286
6287 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
6288 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
6290$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
6291if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
6292 $as_echo_n "(cached) " >&6
6293else
6294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6295/* end confdefs.h. */
6296#include <inttypes.h>
6297
6298int
6299main ()
6300{
6301#undef $gl_func
6302 (void) $gl_func;
6303 ;
6304 return 0;
6305}
6306_ACEOF
6307if ac_fn_c_try_compile "$LINENO"; then :
6308 eval "$as_gl_Symbol=yes"
6309else
6310 eval "$as_gl_Symbol=no"
6311fi
6312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6313fi
6314eval ac_res=\$$as_gl_Symbol
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6316$as_echo "$ac_res" >&6; }
6317 eval as_val=\$$as_gl_Symbol
6318 if test "x$as_val" = x""yes; then :
6319 cat >>confdefs.h <<_ACEOF
6320#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
6321_ACEOF
6322
6323 eval ac_cv_have_decl_$gl_func=yes
6324fi
6325 done
6326
6327
6328
6329 for ac_header in inttypes.h
6330do :
6331 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
6332if test "x$ac_cv_header_inttypes_h" = x""yes; then :
6333 cat >>confdefs.h <<_ACEOF
6334#define HAVE_INTTYPES_H 1
6335_ACEOF
6336
6337fi
6338
6339done
6340
6341 if test $ac_cv_header_inttypes_h = yes; then
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
6343$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
6344if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
6345 $as_echo_n "(cached) " >&6
6346else
6347
6348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6349/* end confdefs.h. */
6350
6351#include <inttypes.h>
6352#ifdef PRId32
6353char *p = PRId32;
6354#endif
6355
6356int
6357main ()
6358{
6359
6360 ;
6361 return 0;
6362}
6363_ACEOF
6364if ac_fn_c_try_compile "$LINENO"; then :
6365 gt_cv_inttypes_pri_broken=no
6366else
6367 gt_cv_inttypes_pri_broken=yes
6368fi
6369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6370
6371fi
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
6373$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
6374 fi
6375 if test "$gt_cv_inttypes_pri_broken" = yes; then
6376
6377cat >>confdefs.h <<_ACEOF
6378#define PRI_MACROS_BROKEN 1
6379_ACEOF
6380
6381 PRI_MACROS_BROKEN=1
6382 else
6383 PRI_MACROS_BROKEN=0
6384 fi
55a8c076 6385
55a8c076
YQ
6386
6387
6388
f434ba03
PA
6389
6390
6391
6392
6393
6394
6395
6396 for ac_func in $gl_func_list
6397do :
6398 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6399ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6400eval as_val=\$$as_ac_var
6401 if test "x$as_val" = x""yes; then :
6402 cat >>confdefs.h <<_ACEOF
6403#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6404_ACEOF
6405
6406fi
6407done
6408
6409
6410
6411
6412
6413
770d76d7
PA
6414 GNULIB_FFSL=0;
6415 GNULIB_FFSLL=0;
f434ba03
PA
6416 GNULIB_MEMCHR=0;
6417 GNULIB_MEMMEM=0;
6418 GNULIB_MEMPCPY=0;
6419 GNULIB_MEMRCHR=0;
6420 GNULIB_RAWMEMCHR=0;
6421 GNULIB_STPCPY=0;
6422 GNULIB_STPNCPY=0;
6423 GNULIB_STRCHRNUL=0;
6424 GNULIB_STRDUP=0;
6425 GNULIB_STRNCAT=0;
6426 GNULIB_STRNDUP=0;
6427 GNULIB_STRNLEN=0;
6428 GNULIB_STRPBRK=0;
6429 GNULIB_STRSEP=0;
6430 GNULIB_STRSTR=0;
6431 GNULIB_STRCASESTR=0;
6432 GNULIB_STRTOK_R=0;
6433 GNULIB_MBSLEN=0;
6434 GNULIB_MBSNLEN=0;
6435 GNULIB_MBSCHR=0;
6436 GNULIB_MBSRCHR=0;
6437 GNULIB_MBSSTR=0;
6438 GNULIB_MBSCASECMP=0;
6439 GNULIB_MBSNCASECMP=0;
6440 GNULIB_MBSPCASECMP=0;
6441 GNULIB_MBSCASESTR=0;
6442 GNULIB_MBSCSPN=0;
6443 GNULIB_MBSPBRK=0;
6444 GNULIB_MBSSPN=0;
6445 GNULIB_MBSSEP=0;
6446 GNULIB_MBSTOK_R=0;
6447 GNULIB_STRERROR=0;
770d76d7 6448 GNULIB_STRERROR_R=0;
f434ba03
PA
6449 GNULIB_STRSIGNAL=0;
6450 GNULIB_STRVERSCMP=0;
6451 HAVE_MBSLEN=0;
770d76d7
PA
6452 HAVE_FFSL=1;
6453 HAVE_FFSLL=1;
6454 HAVE_MEMCHR=1;
f434ba03
PA
6455 HAVE_DECL_MEMMEM=1;
6456 HAVE_MEMPCPY=1;
6457 HAVE_DECL_MEMRCHR=1;
6458 HAVE_RAWMEMCHR=1;
6459 HAVE_STPCPY=1;
6460 HAVE_STPNCPY=1;
6461 HAVE_STRCHRNUL=1;
6462 HAVE_DECL_STRDUP=1;
6463 HAVE_DECL_STRNDUP=1;
6464 HAVE_DECL_STRNLEN=1;
6465 HAVE_STRPBRK=1;
6466 HAVE_STRSEP=1;
6467 HAVE_STRCASESTR=1;
6468 HAVE_DECL_STRTOK_R=1;
770d76d7 6469 HAVE_DECL_STRERROR_R=1;
f434ba03
PA
6470 HAVE_DECL_STRSIGNAL=1;
6471 HAVE_STRVERSCMP=1;
6472 REPLACE_MEMCHR=0;
783e057b 6473 REPLACE_MEMMEM=0;
f434ba03
PA
6474 REPLACE_STPNCPY=0;
6475 REPLACE_STRDUP=0;
783e057b 6476 REPLACE_STRSTR=0;
f434ba03 6477 REPLACE_STRCASESTR=0;
770d76d7 6478 REPLACE_STRCHRNUL=0;
f434ba03 6479 REPLACE_STRERROR=0;
770d76d7 6480 REPLACE_STRERROR_R=0;
f434ba03
PA
6481 REPLACE_STRNCAT=0;
6482 REPLACE_STRNDUP=0;
6483 REPLACE_STRNLEN=0;
6484 REPLACE_STRSIGNAL=0;
6485 REPLACE_STRTOK_R=0;
6486 UNDEFINE_STRTOK_R=0;
6487
6488
6489
6490
6491
f434ba03
PA
6492 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
6493 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
6494 # irrelevant for anonymous mappings.
6495 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
6496if test "x$ac_cv_func_mmap" = x""yes; then :
6497 gl_have_mmap=yes
6498else
6499 gl_have_mmap=no
6500fi
6501
6502
6503 # Try to allow MAP_ANONYMOUS.
6504 gl_have_mmap_anonymous=no
6505 if test $gl_have_mmap = yes; then
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
6507$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
6508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509/* end confdefs.h. */
6510
6511#include <sys/mman.h>
6512#ifdef MAP_ANONYMOUS
770d76d7 6513 I cant identify this map
f434ba03
PA
6514#endif
6515
6516_ACEOF
6517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
770d76d7 6518 $EGREP "I cant identify this map" >/dev/null 2>&1; then :
f434ba03
PA
6519 gl_have_mmap_anonymous=yes
6520fi
6521rm -f conftest*
6522
6523 if test $gl_have_mmap_anonymous != yes; then
6524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6525/* end confdefs.h. */
6526
6527#include <sys/mman.h>
6528#ifdef MAP_ANON
770d76d7 6529 I cant identify this map
f434ba03
PA
6530#endif
6531
6532_ACEOF
6533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
770d76d7 6534 $EGREP "I cant identify this map" >/dev/null 2>&1; then :
f434ba03
PA
6535
6536$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
6537
6538 gl_have_mmap_anonymous=yes
6539fi
6540rm -f conftest*
6541
6542 fi
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
6544$as_echo "$gl_have_mmap_anonymous" >&6; }
6545 if test $gl_have_mmap_anonymous = yes; then
6546
6547$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
6548
6549 fi
6550 fi
6551
6552
6553 :
6554
6555
6556
6557
6558
6559
6560 :
6561
6562
6563
6564
6565
6566
6567
6568
770d76d7 6569 if test $HAVE_MEMCHR = 1; then
f434ba03
PA
6570 # Detect platform-specific bugs in some versions of glibc:
6571 # memchr should not dereference anything with length 0
6572 # http://bugzilla.redhat.com/499689
6573 # memchr should not dereference overestimated length after a match
6574 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
6575 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6576 # Assume that memchr works on platforms that lack mprotect.
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
6578$as_echo_n "checking whether memchr works... " >&6; }
6579if test "${gl_cv_func_memchr_works+set}" = set; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 if test "$cross_compiling" = yes; then :
6583 gl_cv_func_memchr_works="guessing no"
6584else
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586/* end confdefs.h. */
6587
6588#include <string.h>
6589#if HAVE_SYS_MMAN_H
6590# include <fcntl.h>
6591# include <unistd.h>
6592# include <sys/types.h>
6593# include <sys/mman.h>
6594# ifndef MAP_FILE
6595# define MAP_FILE 0
6596# endif
6597#endif
6598
6599int
6600main ()
6601{
6602
770d76d7 6603 int result = 0;
f434ba03
PA
6604 char *fence = NULL;
6605#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
6606# if HAVE_MAP_ANONYMOUS
6607 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
6608 const int fd = -1;
6609# else /* !HAVE_MAP_ANONYMOUS */
6610 const int flags = MAP_FILE | MAP_PRIVATE;
6611 int fd = open ("/dev/zero", O_RDONLY, 0666);
6612 if (fd >= 0)
6613# endif
6614 {
6615 int pagesize = getpagesize ();
6616 char *two_pages =
6617 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
6618 flags, fd, 0);
6619 if (two_pages != (char *)(-1)
6620 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
6621 fence = two_pages + pagesize;
6622 }
6623#endif
6624 if (fence)
6625 {
6626 if (memchr (fence, 0, 0))
770d76d7 6627 result |= 1;
f434ba03
PA
6628 strcpy (fence - 9, "12345678");
6629 if (memchr (fence - 9, 0, 79) != fence - 1)
770d76d7
PA
6630 result |= 2;
6631 if (memchr (fence - 1, 0, 3) != fence - 1)
6632 result |= 4;
f434ba03 6633 }
770d76d7 6634 return result;
f434ba03
PA
6635
6636 ;
6637 return 0;
6638}
6639_ACEOF
6640if ac_fn_c_try_run "$LINENO"; then :
6641 gl_cv_func_memchr_works=yes
6642else
6643 gl_cv_func_memchr_works=no
6644fi
6645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6646 conftest.$ac_objext conftest.beam conftest.$ac_ext
6647fi
6648
6649fi
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
6651$as_echo "$gl_cv_func_memchr_works" >&6; }
6652 if test "$gl_cv_func_memchr_works" != yes; then
6653 REPLACE_MEMCHR=1
6654 fi
f434ba03 6655 fi
783e057b
DJ
6656
6657
81ecdfbb
RW
6658 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
6659if test "x$ac_cv_have_decl_memmem" = x""yes; then :
6660 ac_have_decl=1
783e057b 6661else
81ecdfbb 6662 ac_have_decl=0
783e057b 6663fi
783e057b
DJ
6664
6665cat >>confdefs.h <<_ACEOF
81ecdfbb 6666#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
6667_ACEOF
6668
6669
783e057b
DJ
6670
6671
6672
6673
81ecdfbb
RW
6674 for ac_func in memmem
6675do :
6676 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6677if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6678 cat >>confdefs.h <<_ACEOF
81ecdfbb 6679#define HAVE_MEMMEM 1
783e057b
DJ
6680_ACEOF
6681
783e057b
DJ
6682fi
6683done
6684
770d76d7
PA
6685 if test $ac_cv_func_memmem = yes; then
6686 HAVE_MEMMEM=1
6687 else
6688 HAVE_MEMMEM=0
6689 fi
783e057b
DJ
6690
6691 :
6692
6693
6694
6695
6696
6697 if test $ac_cv_have_decl_memmem = no; then
6698 HAVE_DECL_MEMMEM=0
770d76d7
PA
6699 else
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
6701$as_echo_n "checking whether memmem works... " >&6; }
6702if test "${gl_cv_func_memmem_works_always+set}" = set; then :
6703 $as_echo_n "(cached) " >&6
6704else
6705 if test "$cross_compiling" = yes; then :
6706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707/* end confdefs.h. */
6708
6709#ifdef __GNU_LIBRARY__
6710 #include <features.h>
6711 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
6712 || __GLIBC_MINOR__ > 12)) \
6713 || (__GLIBC__ > 2)) \
6714 || defined __UCLIBC__
6715 Lucky user
6716 #endif
6717#elif defined __CYGWIN__
6718 #include <cygwin/version.h>
6719 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
6720 Lucky user
6721 #endif
6722#else
6723 Lucky user
6724#endif
6725
6726_ACEOF
6727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6728 $EGREP "Lucky user" >/dev/null 2>&1; then :
6729 gl_cv_func_memmem_works_always=yes
6730else
6731 gl_cv_func_memmem_works_always="guessing no"
6732fi
6733rm -f conftest*
6734
6735
6736else
6737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6738/* end confdefs.h. */
6739
6740#include <string.h> /* for memmem */
6741#define P "_EF_BF_BD"
6742#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
6743#define NEEDLE P P P P P
6744
6745int
6746main ()
6747{
6748
6749 int result = 0;
6750 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
6751 result |= 1;
6752 /* Check for empty needle behavior. */
6753 {
6754 const char *haystack = "AAA";
6755 if (memmem (haystack, 3, NULL, 0) != haystack)
6756 result |= 2;
6757 }
6758 return result;
6759
6760 ;
6761 return 0;
6762}
6763_ACEOF
6764if ac_fn_c_try_run "$LINENO"; then :
6765 gl_cv_func_memmem_works_always=yes
6766else
6767 gl_cv_func_memmem_works_always=no
6768fi
6769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6770 conftest.$ac_objext conftest.beam conftest.$ac_ext
6771fi
6772
6773
6774fi
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
6776$as_echo "$gl_cv_func_memmem_works_always" >&6; }
6777 if test "$gl_cv_func_memmem_works_always" != yes; then
6778 REPLACE_MEMMEM=1
6779 fi
783e057b
DJ
6780 fi
6781 :
6782
6783
55a8c076
YQ
6784 REPLACE_NULL=0;
6785 HAVE_WCHAR_T=1;
55a8c076
YQ
6786
6787
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
6789$as_echo_n "checking for wchar_t... " >&6; }
6790if test "${gt_cv_c_wchar_t+set}" = set; then :
6791 $as_echo_n "(cached) " >&6
6792else
f434ba03
PA
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794/* end confdefs.h. */
55a8c076 6795#include <stddef.h>
770d76d7 6796 wchar_t foo = (wchar_t)'\0';
55a8c076
YQ
6797int
6798main ()
6799{
f434ba03 6800
55a8c076
YQ
6801 ;
6802 return 0;
6803}
f434ba03
PA
6804_ACEOF
6805if ac_fn_c_try_compile "$LINENO"; then :
55a8c076
YQ
6806 gt_cv_c_wchar_t=yes
6807else
6808 gt_cv_c_wchar_t=no
6809fi
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6811fi
6812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
6813$as_echo "$gt_cv_c_wchar_t" >&6; }
6814 if test $gt_cv_c_wchar_t = yes; then
f434ba03 6815
55a8c076
YQ
6816$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
6817
6818 fi
6819
55a8c076
YQ
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
6821$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
6822if test "${ac_cv_c_restrict+set}" = set; then :
6823 $as_echo_n "(cached) " >&6
6824else
6825 ac_cv_c_restrict=no
6826 # The order here caters to the fact that C++ does not require restrict.
6827 for ac_kw in __restrict __restrict__ _Restrict restrict; do
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829/* end confdefs.h. */
6830typedef int * int_ptr;
6831 int foo (int_ptr $ac_kw ip) {
6832 return ip[0];
6833 }
6834int
6835main ()
6836{
6837int s[1];
6838 int * $ac_kw t = s;
6839 t[0] = 0;
6840 return foo(t)
6841 ;
6842 return 0;
6843}
6844_ACEOF
6845if ac_fn_c_try_compile "$LINENO"; then :
6846 ac_cv_c_restrict=$ac_kw
6847fi
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6849 test "$ac_cv_c_restrict" != no && break
6850 done
6851
6852fi
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
6854$as_echo "$ac_cv_c_restrict" >&6; }
6855
6856 case $ac_cv_c_restrict in
6857 restrict) ;;
6858 no) $as_echo "#define restrict /**/" >>confdefs.h
6859 ;;
6860 *) cat >>confdefs.h <<_ACEOF
6861#define restrict $ac_cv_c_restrict
6862_ACEOF
6863 ;;
6864 esac
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
55a8c076
YQ
6877 if test $gl_cv_have_include_next = yes; then
6878 gl_cv_next_string_h='<'string.h'>'
6879 else
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
6881$as_echo_n "checking absolute name of <string.h>... " >&6; }
6882if test "${gl_cv_next_string_h+set}" = set; then :
6883 $as_echo_n "(cached) " >&6
6884else
6885
770d76d7 6886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55a8c076
YQ
6887/* end confdefs.h. */
6888#include <string.h>
6889
6890_ACEOF
770d76d7
PA
6891 case "$host_os" in
6892 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6893 *) gl_absname_cpp="$ac_cpp" ;;
6894 esac
f434ba03 6895
770d76d7
PA
6896 case "$host_os" in
6897 mingw*)
6898 gl_dirsep_regex='[/\\]'
6899 ;;
6900 *)
6901 gl_dirsep_regex='\/'
6902 ;;
6903 esac
6904 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6905
6906 gl_header_literal_regex=`echo 'string.h' \
6907 | sed -e "$gl_make_literal_regex_sed"`
6908 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
6909 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
6910 s|^/[^/]|//&|
6911 p
6912 q
6913 }'
6914 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6915 sed -n "$gl_absolute_header_sed"`'"'
6916
6917
6918fi
6919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
55a8c076
YQ
6920$as_echo "$gl_cv_next_string_h" >&6; }
6921 fi
6922 NEXT_STRING_H=$gl_cv_next_string_h
f434ba03 6923
55a8c076
YQ
6924 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6925 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6926 gl_next_as_first_directive='<'string.h'>'
6927 else
6928 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6929 gl_next_as_first_directive=$gl_cv_next_string_h
6930 fi
6931 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
f434ba03
PA
6932
6933
6934
f434ba03
PA
6935
6936
770d76d7
PA
6937
6938 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
55a8c076
YQ
6939 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
6941$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
6942if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
f434ba03
PA
6943 $as_echo_n "(cached) " >&6
6944else
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946/* end confdefs.h. */
55a8c076
YQ
6947#include <string.h>
6948
f434ba03
PA
6949int
6950main ()
6951{
55a8c076
YQ
6952#undef $gl_func
6953 (void) $gl_func;
f434ba03
PA
6954 ;
6955 return 0;
6956}
6957_ACEOF
6958if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 6959 eval "$as_gl_Symbol=yes"
f434ba03 6960else
55a8c076 6961 eval "$as_gl_Symbol=no"
f434ba03
PA
6962fi
6963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6964fi
55a8c076
YQ
6965eval ac_res=\$$as_gl_Symbol
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6967$as_echo "$ac_res" >&6; }
770d76d7 6968 eval as_val=\$$as_gl_Symbol
55a8c076
YQ
6969 if test "x$as_val" = x""yes; then :
6970 cat >>confdefs.h <<_ACEOF
6971#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
f434ba03 6972_ACEOF
f434ba03 6973
55a8c076 6974 eval ac_cv_have_decl_$gl_func=yes
f434ba03 6975fi
55a8c076 6976 done
f434ba03
PA
6977
6978
6979
55a8c076
YQ
6980 if false; then
6981 GL_COND_LIBTOOL_TRUE=
6982 GL_COND_LIBTOOL_FALSE='#'
6983else
6984 GL_COND_LIBTOOL_TRUE='#'
6985 GL_COND_LIBTOOL_FALSE=
6986fi
783e057b 6987
55a8c076
YQ
6988 gl_cond_libtool=false
6989 gl_libdeps=
6990 gl_ltlibdeps=
6991 gl_m4_base='gnulib/m4'
783e057b
DJ
6992
6993
6994
6995
6996
6997
6998
6999
55a8c076
YQ
7000
7001 gl_source_base='gnulib'
f434ba03
PA
7002
7003
7004
7005
f434ba03 7006
55a8c076
YQ
7007 PRIPTR_PREFIX=
7008 if test -n "$STDINT_H"; then
7009 PRIPTR_PREFIX='"l"'
7010 else
7011 for glpfx in '' l ll I64; do
7012 case $glpfx in
7013 '') gltype1='int';;
7014 l) gltype1='long int';;
7015 ll) gltype1='long long int';;
7016 I64) gltype1='__int64';;
7017 esac
7018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7019/* end confdefs.h. */
7020#include <stdint.h>
7021 extern intptr_t foo;
7022 extern $gltype1 foo;
f434ba03
PA
7023int
7024main ()
7025{
55a8c076 7026
f434ba03
PA
7027 ;
7028 return 0;
7029}
7030_ACEOF
7031if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 7032 PRIPTR_PREFIX='"'$glpfx'"'
f434ba03
PA
7033fi
7034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55a8c076
YQ
7035 test -n "$PRIPTR_PREFIX" && break
7036 done
7037 fi
f434ba03 7038
f434ba03 7039
55a8c076
YQ
7040
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
7042$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
7043if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
81ecdfbb 7044 $as_echo_n "(cached) " >&6
783e057b 7045else
55a8c076 7046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 7047/* end confdefs.h. */
55a8c076
YQ
7048/* Work also in C++ mode. */
7049 #define __STDC_LIMIT_MACROS 1
7050
7051 /* Work if build is not clean. */
7052 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7053
7054 #include <limits.h>
7055 #if HAVE_STDINT_H
7056 #include <stdint.h>
7057 #endif
7058
7059 #if defined INT32_MAX && defined INTMAX_MAX
7060 #define CONDITION (INT32_MAX < INTMAX_MAX)
7061 #elif HAVE_LONG_LONG_INT
7062 #define CONDITION (sizeof (int) < sizeof (long long int))
7063 #else
7064 #define CONDITION 0
7065 #endif
7066 int test[CONDITION ? 1 : -1];
7067int
7068main ()
7069{
f434ba03 7070
55a8c076
YQ
7071 ;
7072 return 0;
7073}
783e057b 7074_ACEOF
55a8c076
YQ
7075if ac_fn_c_try_compile "$LINENO"; then :
7076 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
7077else
7078 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
783e057b 7079fi
55a8c076
YQ
7080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7081fi
7082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
7083$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
7084 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
7085 INT32_MAX_LT_INTMAX_MAX=1;
7086 else
7087 INT32_MAX_LT_INTMAX_MAX=0;
f434ba03 7088 fi
783e057b
DJ
7089
7090
55a8c076
YQ
7091 if test $APPLE_UNIVERSAL_BUILD = 0; then
7092
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
7094$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
7095if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
f434ba03
PA
7096 $as_echo_n "(cached) " >&6
7097else
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7099/* end confdefs.h. */
55a8c076
YQ
7100/* Work also in C++ mode. */
7101 #define __STDC_LIMIT_MACROS 1
7102
7103 /* Work if build is not clean. */
7104 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7105
7106 #include <limits.h>
7107 #if HAVE_STDINT_H
7108 #include <stdint.h>
7109 #endif
7110
7111 #if defined INT64_MAX
7112 #define CONDITION (INT64_MAX == LONG_MAX)
7113 #elif HAVE_LONG_LONG_INT
7114 #define CONDITION (sizeof (long long int) == sizeof (long int))
7115 #else
7116 #define CONDITION 0
7117 #endif
7118 int test[CONDITION ? 1 : -1];
f434ba03
PA
7119int
7120main ()
7121{
783e057b 7122
f434ba03
PA
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
55a8c076 7128 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
f434ba03 7129else
55a8c076 7130 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
f434ba03
PA
7131fi
7132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133fi
55a8c076
YQ
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
7135$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
7136 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
7137 INT64_MAX_EQ_LONG_MAX=1;
7138 else
7139 INT64_MAX_EQ_LONG_MAX=0;
7140 fi
783e057b 7141
783e057b 7142
55a8c076
YQ
7143 else
7144 INT64_MAX_EQ_LONG_MAX=-1
f434ba03 7145 fi
783e057b 7146
55a8c076
YQ
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
7148$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
7149if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
7150 $as_echo_n "(cached) " >&6
7151else
7152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7153/* end confdefs.h. */
7154/* Work also in C++ mode. */
7155 #define __STDC_LIMIT_MACROS 1
7156
7157 /* Work if build is not clean. */
7158 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7159
7160 #include <limits.h>
7161 #if HAVE_STDINT_H
7162 #include <stdint.h>
7163 #endif
7164
7165 #if defined UINT32_MAX && defined UINTMAX_MAX
7166 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
7167 #elif HAVE_LONG_LONG_INT
7168 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
7169 #else
7170 #define CONDITION 0
7171 #endif
7172 int test[CONDITION ? 1 : -1];
7173int
7174main ()
7175{
783e057b 7176
55a8c076
YQ
7177 ;
7178 return 0;
7179}
7180_ACEOF
7181if ac_fn_c_try_compile "$LINENO"; then :
7182 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
783e057b 7183else
55a8c076
YQ
7184 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
7185fi
7186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 7187fi
55a8c076
YQ
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
7189$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
7190 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
7191 UINT32_MAX_LT_UINTMAX_MAX=1;
7192 else
7193 UINT32_MAX_LT_UINTMAX_MAX=0;
7194 fi
783e057b 7195
783e057b 7196
55a8c076
YQ
7197 if test $APPLE_UNIVERSAL_BUILD = 0; then
7198
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
7200$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
7201if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
7202 $as_echo_n "(cached) " >&6
7203else
7204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205/* end confdefs.h. */
7206/* Work also in C++ mode. */
7207 #define __STDC_LIMIT_MACROS 1
7208
7209 /* Work if build is not clean. */
7210 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
7211
7212 #include <limits.h>
7213 #if HAVE_STDINT_H
7214 #include <stdint.h>
7215 #endif
7216
7217 #if defined UINT64_MAX
7218 #define CONDITION (UINT64_MAX == ULONG_MAX)
7219 #elif HAVE_LONG_LONG_INT
7220 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
7221 #else
7222 #define CONDITION 0
7223 #endif
7224 int test[CONDITION ? 1 : -1];
7225int
7226main ()
7227{
7228
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233if ac_fn_c_try_compile "$LINENO"; then :
7234 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
7235else
7236 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
7241$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
7242 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
7243 UINT64_MAX_EQ_ULONG_MAX=1;
7244 else
7245 UINT64_MAX_EQ_ULONG_MAX=0;
7246 fi
783e057b
DJ
7247
7248
55a8c076
YQ
7249 else
7250 UINT64_MAX_EQ_ULONG_MAX=-1
7251 fi
783e057b
DJ
7252
7253
7254
770d76d7
PA
7255
7256if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
7257
7258
7259
7260
7261
7262
7263
7264
7265 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
7266
7267
7268 for ac_header in bp-sym.h
7269do :
7270 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
7271if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
7272 cat >>confdefs.h <<_ACEOF
7273#define HAVE_BP_SYM_H 1
55a8c076 7274_ACEOF
783e057b 7275
55a8c076 7276fi
783e057b 7277
770d76d7 7278done
783e057b 7279
770d76d7
PA
7280
7281fi
783e057b 7282
783e057b 7283
783e057b 7284
783e057b 7285
770d76d7
PA
7286
7287 GNULIB_MEMCHR=1
7288
7289
783e057b 7290
783e057b 7291
783e057b 7292
f434ba03 7293$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 7294
783e057b
DJ
7295
7296
783e057b
DJ
7297
7298
770d76d7 7299 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
f434ba03
PA
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
7301$as_echo_n "checking whether memmem works in linear time... " >&6; }
770d76d7 7302if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
81ecdfbb 7303 $as_echo_n "(cached) " >&6
783e057b 7304else
81ecdfbb 7305 if test "$cross_compiling" = yes; then :
f434ba03 7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 7307/* end confdefs.h. */
783e057b 7308
f434ba03
PA
7309#include <features.h>
7310#ifdef __GNU_LIBRARY__
770d76d7
PA
7311 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
7312 && !defined __UCLIBC__
f434ba03
PA
7313 Lucky user
7314 #endif
7315#endif
7316#ifdef __CYGWIN__
7317 #include <cygwin/version.h>
770d76d7 7318 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
f434ba03
PA
7319 Lucky user
7320 #endif
7321#endif
783e057b 7322
783e057b 7323_ACEOF
f434ba03
PA
7324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7325 $EGREP "Lucky user" >/dev/null 2>&1; then :
770d76d7 7326 gl_cv_func_memmem_works_fast=yes
783e057b 7327else
770d76d7 7328 gl_cv_func_memmem_works_fast="guessing no"
783e057b 7329fi
f434ba03 7330rm -f conftest*
783e057b
DJ
7331
7332
783e057b 7333else
81ecdfbb 7334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7335/* end confdefs.h. */
7336
f434ba03 7337#include <signal.h> /* for signal */
783e057b
DJ
7338#include <string.h> /* for memmem */
7339#include <stdlib.h> /* for malloc */
7340#include <unistd.h> /* for alarm */
770d76d7 7341static void quit (int sig) { exit (sig + 128); }
783e057b
DJ
7342
7343int
7344main ()
7345{
770d76d7
PA
7346
7347 int result = 0;
7348 size_t m = 1000000;
783e057b
DJ
7349 char *haystack = (char *) malloc (2 * m + 1);
7350 char *needle = (char *) malloc (m + 1);
783e057b
DJ
7351 /* Failure to compile this test due to missing alarm is okay,
7352 since all such platforms (mingw) also lack memmem. */
770d76d7 7353 signal (SIGALRM, quit);
783e057b
DJ
7354 alarm (5);
7355 /* Check for quadratic performance. */
7356 if (haystack && needle)
7357 {
f434ba03
PA
7358 memset (haystack, 'A', 2 * m);
7359 haystack[2 * m] = 'B';
7360 memset (needle, 'A', m);
7361 needle[m] = 'B';
770d76d7
PA
7362 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
7363 result |= 1;
783e057b 7364 }
770d76d7
PA
7365 return result;
7366
783e057b
DJ
7367 ;
7368 return 0;
7369}
7370_ACEOF
81ecdfbb 7371if ac_fn_c_try_run "$LINENO"; then :
770d76d7 7372 gl_cv_func_memmem_works_fast=yes
783e057b 7373else
770d76d7 7374 gl_cv_func_memmem_works_fast=no
783e057b 7375fi
81ecdfbb
RW
7376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7377 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 7378fi
81ecdfbb 7379
f434ba03 7380
783e057b 7381fi
770d76d7
PA
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
7383$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
7384 if test "$gl_cv_func_memmem_works_fast" != yes; then
783e057b 7385 REPLACE_MEMMEM=1
783e057b
DJ
7386 fi
7387 fi
7388
770d76d7 7389if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
f434ba03 7390
783e057b
DJ
7391
7392
7393
7394
7395
7396
7397
770d76d7
PA
7398 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
7399
7400fi
783e057b
DJ
7401
7402
7403
7404
81ecdfbb
RW
7405 for ac_func in memmem
7406do :
7407 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
7408if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 7409 cat >>confdefs.h <<_ACEOF
81ecdfbb 7410#define HAVE_MEMMEM 1
783e057b
DJ
7411_ACEOF
7412
783e057b
DJ
7413fi
7414done
7415
770d76d7
PA
7416 if test $ac_cv_func_memmem = yes; then
7417 HAVE_MEMMEM=1
783e057b 7418 else
770d76d7 7419 HAVE_MEMMEM=0
783e057b
DJ
7420 fi
7421
783e057b
DJ
7422 :
7423
7424
7425
7426
7427
770d76d7
PA
7428 if test $ac_cv_have_decl_memmem = no; then
7429 HAVE_DECL_MEMMEM=0
783e057b 7430 else
770d76d7
PA
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
7432$as_echo_n "checking whether memmem works... " >&6; }
7433if test "${gl_cv_func_memmem_works_always+set}" = set; then :
81ecdfbb 7434 $as_echo_n "(cached) " >&6
783e057b 7435else
770d76d7
PA
7436 if test "$cross_compiling" = yes; then :
7437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7438/* end confdefs.h. */
7439
770d76d7
PA
7440#ifdef __GNU_LIBRARY__
7441 #include <features.h>
7442 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
7443 || __GLIBC_MINOR__ > 12)) \
7444 || (__GLIBC__ > 2)) \
7445 || defined __UCLIBC__
7446 Lucky user
7447 #endif
7448#elif defined __CYGWIN__
7449 #include <cygwin/version.h>
7450 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
7451 Lucky user
7452 #endif
783e057b 7453#else
770d76d7
PA
7454 Lucky user
7455#endif
783e057b 7456
770d76d7
PA
7457_ACEOF
7458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7459 $EGREP "Lucky user" >/dev/null 2>&1; then :
7460 gl_cv_func_memmem_works_always=yes
7461else
7462 gl_cv_func_memmem_works_always="guessing no"
7463fi
7464rm -f conftest*
783e057b
DJ
7465
7466
c906108c 7467else
770d76d7 7468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7469/* end confdefs.h. */
7470
770d76d7
PA
7471#include <string.h> /* for memmem */
7472#define P "_EF_BF_BD"
7473#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
7474#define NEEDLE P P P P P
783e057b 7475
783e057b
DJ
7476int
7477main ()
7478{
7479
770d76d7
PA
7480 int result = 0;
7481 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
7482 result |= 1;
7483 /* Check for empty needle behavior. */
7484 {
7485 const char *haystack = "AAA";
7486 if (memmem (haystack, 3, NULL, 0) != haystack)
7487 result |= 2;
7488 }
7489 return result;
7490
783e057b
DJ
7491 ;
7492 return 0;
7493}
7494_ACEOF
770d76d7
PA
7495if ac_fn_c_try_run "$LINENO"; then :
7496 gl_cv_func_memmem_works_always=yes
7497else
7498 gl_cv_func_memmem_works_always=no
783e057b 7499fi
770d76d7
PA
7500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7501 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 7502fi
783e057b
DJ
7503
7504
770d76d7
PA
7505fi
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
7507$as_echo "$gl_cv_func_memmem_works_always" >&6; }
7508 if test "$gl_cv_func_memmem_works_always" != yes; then
7509 REPLACE_MEMMEM=1
7510 fi
783e057b 7511 fi
770d76d7 7512 :
783e057b 7513
770d76d7 7514if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
783e057b 7515
f434ba03 7516
f434ba03 7517
f434ba03 7518
770d76d7
PA
7519
7520
7521
7522
7523 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
7524
783e057b 7525fi
f434ba03 7526
f434ba03
PA
7527
7528
7529
783e057b 7530
770d76d7 7531 GNULIB_MEMMEM=1
783e057b 7532
f434ba03
PA
7533
7534
7535
f434ba03 7536
770d76d7 7537$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
f434ba03
PA
7538
7539
7540
783e057b
DJ
7541
7542
7543
7544
770d76d7
PA
7545 STDDEF_H=
7546 if test $gt_cv_c_wchar_t = no; then
7547 HAVE_WCHAR_T=0
7548 STDDEF_H=stddef.h
7549 fi
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
7551$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
7552if test "${gl_cv_decl_null_works+set}" = set; then :
7553 $as_echo_n "(cached) " >&6
7554else
7555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7556/* end confdefs.h. */
7557#include <stddef.h>
7558 int test[2 * (sizeof NULL == sizeof (void *)) -1];
783e057b 7559
770d76d7
PA
7560int
7561main ()
7562{
783e057b 7563
770d76d7
PA
7564 ;
7565 return 0;
7566}
7567_ACEOF
7568if ac_fn_c_try_compile "$LINENO"; then :
7569 gl_cv_decl_null_works=yes
7570else
7571 gl_cv_decl_null_works=no
7572fi
7573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7574fi
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
7576$as_echo "$gl_cv_decl_null_works" >&6; }
7577 if test $gl_cv_decl_null_works = no; then
7578 REPLACE_NULL=1
7579 STDDEF_H=stddef.h
7580 fi
783e057b 7581
770d76d7
PA
7582 if test -n "$STDDEF_H"; then
7583 GL_GENERATE_STDDEF_H_TRUE=
7584 GL_GENERATE_STDDEF_H_FALSE='#'
7585else
7586 GL_GENERATE_STDDEF_H_TRUE='#'
7587 GL_GENERATE_STDDEF_H_FALSE=
7588fi
783e057b 7589
770d76d7 7590 if test -n "$STDDEF_H"; then
783e057b 7591
783e057b
DJ
7592
7593
7594
7595
7596
7597
7598
7599 if test $gl_cv_have_include_next = yes; then
770d76d7 7600 gl_cv_next_stddef_h='<'stddef.h'>'
783e057b 7601 else
770d76d7
PA
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
7603$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
7604if test "${gl_cv_next_stddef_h+set}" = set; then :
81ecdfbb 7605 $as_echo_n "(cached) " >&6
783e057b
DJ
7606else
7607
770d76d7 7608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 7609/* end confdefs.h. */
770d76d7 7610#include <stddef.h>
783e057b
DJ
7611
7612_ACEOF
770d76d7
PA
7613 case "$host_os" in
7614 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7615 *) gl_absname_cpp="$ac_cpp" ;;
7616 esac
7617
7618 case "$host_os" in
7619 mingw*)
7620 gl_dirsep_regex='[/\\]'
7621 ;;
7622 *)
7623 gl_dirsep_regex='\/'
7624 ;;
7625 esac
7626 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7627
7628 gl_header_literal_regex=`echo 'stddef.h' \
7629 | sed -e "$gl_make_literal_regex_sed"`
7630 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7631 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7632 s|^/[^/]|//&|
7633 p
7634 q
7635 }'
7636 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7637 sed -n "$gl_absolute_header_sed"`'"'
7638
783e057b
DJ
7639
7640fi
770d76d7
PA
7641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
7642$as_echo "$gl_cv_next_stddef_h" >&6; }
783e057b 7643 fi
770d76d7 7644 NEXT_STDDEF_H=$gl_cv_next_stddef_h
783e057b 7645
f434ba03
PA
7646 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7647 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
770d76d7 7648 gl_next_as_first_directive='<'stddef.h'>'
f434ba03
PA
7649 else
7650 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
770d76d7 7651 gl_next_as_first_directive=$gl_cv_next_stddef_h
f434ba03 7652 fi
770d76d7 7653 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
f434ba03 7654
f434ba03
PA
7655
7656
7657
f434ba03
PA
7658 fi
7659
7660
7661
f434ba03
PA
7662
7663
f434ba03
PA
7664 # End of code from modules
7665
7666
c906108c 7667
c906108c 7668
c906108c 7669
c906108c 7670
c906108c 7671
c906108c 7672
c906108c 7673
783e057b
DJ
7674 gltests_libdeps=
7675 gltests_ltlibdeps=
20e95c23 7676
20e95c23 7677
20e95c23 7678
f434ba03
PA
7679
7680
7681
7682
7683
7684
783e057b 7685 gl_source_base='tests'
f434ba03
PA
7686 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
7687
7688 gl_module_indicator_condition=$gltests_WITNESS
7689
7690
7691
7692
7693
c906108c 7694
bec39cab 7695
bec39cab 7696
783e057b
DJ
7697
7698 LIBGNU_LIBDEPS="$gl_libdeps"
7699
7700 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7701
7702
e28b3332 7703
d5af19ba
DJ
7704# For Makefile dependencies.
7705GNULIB_STDINT_H=
7706if test x"$STDINT_H" != x; then
7707 GNULIB_STDINT_H=gnulib/$STDINT_H
7708fi
7709
7710
bec39cab
AC
7711PACKAGE=gdb
7712
7713cat >>confdefs.h <<_ACEOF
7714#define PACKAGE "$PACKAGE"
7715_ACEOF
7716
7717
7718
f06e05e0
JK
7719# We never need to detect it in this sub-configure.
7720# But preserve it for config.status --recheck.
5048e516 7721
5048e516
JK
7722
7723
7724MAKEINFO_EXTRA_FLAGS=""
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7726$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7727if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7728 $as_echo_n "(cached) " >&6
7729else
7730 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7731 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7732 gdb_cv_have_makeinfo_click=yes
7733 else
7734 gdb_cv_have_makeinfo_click=no
7735 fi
7736fi
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7738$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7739if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7740 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7741fi
7742
7743
e28b3332
DJ
7744# GDB does not use automake, but gnulib does. This line lets us
7745# generate its Makefile.in.
81ecdfbb
RW
7746am__api_version='1.11'
7747
e28b3332
DJ
7748# Find a good install program. We prefer a C program (faster),
7749# so one script is as good as another. But avoid the broken or
7750# incompatible versions:
7751# SysV /etc/install, /usr/sbin/install
7752# SunOS /usr/etc/install
7753# IRIX /sbin/install
7754# AIX /bin/install
7755# AmigaOS /C/install, which installs bootblocks on floppy discs
7756# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7757# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7758# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7759# OS/2's system install, which has a completely different semantic
7760# ./install, which can be erroneously created by make from ./install.sh.
85541719 7761# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7763$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7764if test -z "$INSTALL"; then
81ecdfbb
RW
7765if test "${ac_cv_path_install+set}" = set; then :
7766 $as_echo_n "(cached) " >&6
e28b3332
DJ
7767else
7768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769for as_dir in $PATH
7770do
7771 IFS=$as_save_IFS
7772 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7773 # Account for people who put trailing slashes in PATH elements.
7774case $as_dir/ in #((
7775 ./ | .// | /[cC]/* | \
e28b3332 7776 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7777 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7778 /usr/ucb/* ) ;;
7779 *)
7780 # OSF1 and SCO ODT 3.0 have their own names for install.
7781 # Don't use installbsd from OSF since it installs stuff as root
7782 # by default.
7783 for ac_prog in ginstall scoinst install; do
7784 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7785 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7786 if test $ac_prog = install &&
7787 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7788 # AIX install. It has an incompatible calling convention.
7789 :
7790 elif test $ac_prog = install &&
7791 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7792 # program-specific install script used by HP pwplus--don't use.
7793 :
7794 else
85541719
DE
7795 rm -rf conftest.one conftest.two conftest.dir
7796 echo one > conftest.one
7797 echo two > conftest.two
7798 mkdir conftest.dir
7799 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7800 test -s conftest.one && test -s conftest.two &&
7801 test -s conftest.dir/conftest.one &&
7802 test -s conftest.dir/conftest.two
7803 then
7804 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7805 break 3
7806 fi
e28b3332
DJ
7807 fi
7808 fi
7809 done
7810 done
7811 ;;
7812esac
81ecdfbb
RW
7813
7814 done
7815IFS=$as_save_IFS
e28b3332 7816
85541719 7817rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7818
7819fi
7820 if test "${ac_cv_path_install+set}" = set; then
7821 INSTALL=$ac_cv_path_install
7822 else
85541719
DE
7823 # As a last resort, use the slow shell script. Don't cache a
7824 # value for INSTALL within a source directory, because that will
e28b3332 7825 # break other packages using the cache if that directory is
85541719 7826 # removed, or if the value is a relative name.
e28b3332
DJ
7827 INSTALL=$ac_install_sh
7828 fi
7829fi
81ecdfbb
RW
7830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7831$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7832
7833# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7834# It thinks the first close brace ends the variable substitution.
7835test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7836
7837test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7838
7839test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7840
81ecdfbb
RW
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7842$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7843# Just in case
7844sleep 1
7845echo timestamp > conftest.file
81ecdfbb
RW
7846# Reject unsafe characters in $srcdir or the absolute working directory
7847# name. Accept space and tab only in the latter.
7848am_lf='
7849'
7850case `pwd` in
7851 *[\\\"\#\$\&\'\`$am_lf]*)
7852 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7853esac
7854case $srcdir in
7855 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7856 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7857esac
7858
e28b3332
DJ
7859# Do `set' in a subshell so we don't clobber the current shell's
7860# arguments. Must try -L first in case configure is actually a
7861# symlink; some systems play weird games with the mod time of symlinks
7862# (eg FreeBSD returns the mod time of the symlink's containing
7863# directory).
7864if (
81ecdfbb 7865 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7866 if test "$*" = "X"; then
7867 # -L didn't work.
81ecdfbb 7868 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7869 fi
7870 rm -f conftest.file
7871 if test "$*" != "X $srcdir/configure conftest.file" \
7872 && test "$*" != "X conftest.file $srcdir/configure"; then
7873
7874 # If neither matched, then we have a broken ls. This can happen
7875 # if, for instance, CONFIG_SHELL is bash and it inherits a
7876 # broken ls alias from the environment. This has actually
7877 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7878 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7879alias in your environment" "$LINENO" 5
e28b3332
DJ
7880 fi
7881
7882 test "$2" = conftest.file
7883 )
7884then
7885 # Ok.
7886 :
7887else
81ecdfbb
RW
7888 as_fn_error "newly created file is older than distributed files!
7889Check your system clock" "$LINENO" 5
e28b3332 7890fi
81ecdfbb
RW
7891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7892$as_echo "yes" >&6; }
e28b3332 7893test "$program_prefix" != NONE &&
81ecdfbb 7894 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7895# Use a double $ so make ignores it.
7896test "$program_suffix" != NONE &&
81ecdfbb
RW
7897 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7898# Double any \ or $.
e28b3332 7899# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7900ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7901program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7902
7903# expand $ac_aux_dir to an absolute path
7904am_aux_dir=`cd $ac_aux_dir && pwd`
7905
81ecdfbb
RW
7906if test x"${MISSING+set}" != xset; then
7907 case $am_aux_dir in
7908 *\ * | *\ *)
7909 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7910 *)
7911 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7912 esac
7913fi
e28b3332
DJ
7914# Use eval to expand $SHELL
7915if eval "$MISSING --run true"; then
7916 am_missing_run="$MISSING --run "
7917else
7918 am_missing_run=
81ecdfbb
RW
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7920$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7921fi
7922
7923if test x"${install_sh}" != xset; then
7924 case $am_aux_dir in
7925 *\ * | *\ *)
7926 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7927 *)
7928 install_sh="\${SHELL} $am_aux_dir/install-sh"
7929 esac
7930fi
7931
7932# Installed binaries are usually stripped using `strip' when the user
7933# run `make install-strip'. However `strip' might not be the right
7934# tool to use in cross-compilation environments, therefore Automake
7935# will honor the `STRIP' environment variable to overrule this program.
7936if test "$cross_compiling" != no; then
7937 if test -n "$ac_tool_prefix"; then
7938 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7939set dummy ${ac_tool_prefix}strip; ac_word=$2
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941$as_echo_n "checking for $ac_word... " >&6; }
7942if test "${ac_cv_prog_STRIP+set}" = set; then :
7943 $as_echo_n "(cached) " >&6
7944else
7945 if test -n "$STRIP"; then
7946 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7947else
7948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949for as_dir in $PATH
7950do
7951 IFS=$as_save_IFS
7952 test -z "$as_dir" && as_dir=.
7953 for ac_exec_ext in '' $ac_executable_extensions; do
7954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7955 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7957 break 2
7958 fi
7959done
7960 done
7961IFS=$as_save_IFS
7962
7963fi
7964fi
7965STRIP=$ac_cv_prog_STRIP
7966if test -n "$STRIP"; then
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7968$as_echo "$STRIP" >&6; }
7969else
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7971$as_echo "no" >&6; }
7972fi
7973
7974
7975fi
7976if test -z "$ac_cv_prog_STRIP"; then
7977 ac_ct_STRIP=$STRIP
7978 # Extract the first word of "strip", so it can be a program name with args.
7979set dummy strip; ac_word=$2
7980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7981$as_echo_n "checking for $ac_word... " >&6; }
7982if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7983 $as_echo_n "(cached) " >&6
7984else
7985 if test -n "$ac_ct_STRIP"; then
7986 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7987else
7988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989for as_dir in $PATH
7990do
7991 IFS=$as_save_IFS
7992 test -z "$as_dir" && as_dir=.
7993 for ac_exec_ext in '' $ac_executable_extensions; do
7994 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7995 ac_cv_prog_ac_ct_STRIP="strip"
7996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7997 break 2
7998 fi
7999done
8000 done
8001IFS=$as_save_IFS
8002
8003fi
8004fi
8005ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8006if test -n "$ac_ct_STRIP"; then
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8008$as_echo "$ac_ct_STRIP" >&6; }
8009else
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8011$as_echo "no" >&6; }
8012fi
8013
8014 if test "x$ac_ct_STRIP" = x; then
8015 STRIP=":"
8016 else
8017 case $cross_compiling:$ac_tool_warned in
8018yes:)
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8021ac_tool_warned=yes ;;
8022esac
8023 STRIP=$ac_ct_STRIP
8024 fi
8025else
8026 STRIP="$ac_cv_prog_STRIP"
8027fi
8028
8029fi
8030INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8031
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
8033$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
8034if test -z "$MKDIR_P"; then
8035 if test "${ac_cv_path_mkdir+set}" = set; then :
8036 $as_echo_n "(cached) " >&6
8037else
8038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8039for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
8040do
8041 IFS=$as_save_IFS
8042 test -z "$as_dir" && as_dir=.
8043 for ac_prog in mkdir gmkdir; do
8044 for ac_exec_ext in '' $ac_executable_extensions; do
8045 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
8046 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
8047 'mkdir (GNU coreutils) '* | \
8048 'mkdir (coreutils) '* | \
8049 'mkdir (fileutils) '4.1*)
8050 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
8051 break 3;;
8052 esac
8053 done
8054 done
e28b3332 8055 done
81ecdfbb
RW
8056IFS=$as_save_IFS
8057
8058fi
8059
8060 if test "${ac_cv_path_mkdir+set}" = set; then
8061 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 8062 else
81ecdfbb
RW
8063 # As a last resort, use the slow shell script. Don't cache a
8064 # value for MKDIR_P within a source directory, because that will
8065 # break other packages using the cache if that directory is
8066 # removed, or if the value is a relative name.
8067 test -d ./--version && rmdir ./--version
8068 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
8069 fi
8070fi
81ecdfbb
RW
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
8072$as_echo "$MKDIR_P" >&6; }
8073
f434ba03 8074
81ecdfbb
RW
8075mkdir_p="$MKDIR_P"
8076case $mkdir_p in
8077 [\\/$]* | ?:[\\/]*) ;;
8078 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8079esac
e28b3332
DJ
8080
8081for ac_prog in gawk mawk nawk awk
8082do
8083 # Extract the first word of "$ac_prog", so it can be a program name with args.
8084set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if test "${ac_cv_prog_AWK+set}" = set; then :
8088 $as_echo_n "(cached) " >&6
e28b3332
DJ
8089else
8090 if test -n "$AWK"; then
8091 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8092else
8093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8094for as_dir in $PATH
8095do
8096 IFS=$as_save_IFS
8097 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8098 for ac_exec_ext in '' $ac_executable_extensions; do
8099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 8100 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
8102 break 2
8103 fi
8104done
81ecdfbb
RW
8105 done
8106IFS=$as_save_IFS
e28b3332
DJ
8107
8108fi
8109fi
8110AWK=$ac_cv_prog_AWK
8111if test -n "$AWK"; then
81ecdfbb
RW
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8113$as_echo "$AWK" >&6; }
e28b3332 8114else
81ecdfbb
RW
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
e28b3332
DJ
8117fi
8118
81ecdfbb 8119
e28b3332
DJ
8120 test -n "$AWK" && break
8121done
8122
81ecdfbb 8123ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
8124
8125
8126am_make=${MAKE-make}
8127cat > confinc << 'END'
8128am__doit:
81ecdfbb 8129 @echo this is the am__doit target
e28b3332
DJ
8130.PHONY: am__doit
8131END
8132# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
8133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
8134$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
8135am__include="#"
8136am__quote=
8137_am_result=none
8138# First try GNU make style include.
8139echo "include confinc" > confmf
81ecdfbb
RW
8140# Ignore all kinds of additional output from `make'.
8141case `$am_make -s -f confmf 2> /dev/null` in #(
8142*the\ am__doit\ target*)
8143 am__include=include
8144 am__quote=
8145 _am_result=GNU
8146 ;;
8147esac
e28b3332
DJ
8148# Now try BSD make style include.
8149if test "$am__include" = "#"; then
8150 echo '.include "confinc"' > confmf
81ecdfbb
RW
8151 case `$am_make -s -f confmf 2> /dev/null` in #(
8152 *the\ am__doit\ target*)
8153 am__include=.include
8154 am__quote="\""
8155 _am_result=BSD
8156 ;;
8157 esac
e28b3332
DJ
8158fi
8159
8160
81ecdfbb
RW
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
8162$as_echo "$_am_result" >&6; }
e28b3332
DJ
8163rm -f confinc confmf
8164
81ecdfbb
RW
8165# Check whether --enable-dependency-tracking was given.
8166if test "${enable_dependency_tracking+set}" = set; then :
8167 enableval=$enable_dependency_tracking;
8168fi
e28b3332 8169
e28b3332
DJ
8170if test "x$enable_dependency_tracking" != xno; then
8171 am_depcomp="$ac_aux_dir/depcomp"
8172 AMDEPBACKSLASH='\'
8173fi
81ecdfbb 8174 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
8175 AMDEP_TRUE=
8176 AMDEP_FALSE='#'
8177else
8178 AMDEP_TRUE='#'
8179 AMDEP_FALSE=
8180fi
8181
8182
81ecdfbb
RW
8183if test "`cd $srcdir && pwd`" != "`pwd`"; then
8184 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8185 # is not polluted with repeated "-I."
8186 am__isrc=' -I$(srcdir)'
8187 # test to see if srcdir already configured
8188 if test -f $srcdir/config.status; then
8189 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
8190 fi
e28b3332
DJ
8191fi
8192
8193# test whether we have cygpath
8194if test -z "$CYGPATH_W"; then
8195 if (cygpath --version) >/dev/null 2>/dev/null; then
8196 CYGPATH_W='cygpath -w'
8197 else
8198 CYGPATH_W=echo
8199 fi
8200fi
8201
8202
8203# Define the identity of the package.
8204 PACKAGE=gdb
8205 VERSION=UNUSED-VERSION
8206
8207
8208# Some tools Automake needs.
8209
8210ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
8211
8212
8213AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
8214
8215
8216AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
8217
8218
8219AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
8220
8221
8222MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
8223
e28b3332
DJ
8224# We need awk for the "check" target. The system "awk" is bad on
8225# some platforms.
8226# Always define AMTAR for backward compatibility.
8227
8228AMTAR=${AMTAR-"${am_missing_run}tar"}
8229
8230am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
8231
8232
8233
8234
8235depcc="$CC" am_compiler_list=
8236
81ecdfbb
RW
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
8238$as_echo_n "checking dependency style of $depcc... " >&6; }
8239if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
8240 $as_echo_n "(cached) " >&6
e28b3332
DJ
8241else
8242 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8243 # We make a subdir and do the tests there. Otherwise we can end up
8244 # making bogus files that we don't know about and never remove. For
8245 # instance it was reported that on HP-UX the gcc test will end up
8246 # making a dummy file named `D' -- because `-MD' means `put the output
8247 # in D'.
8248 mkdir conftest.dir
8249 # Copy depcomp to subdir because otherwise we won't find it if we're
8250 # using a relative directory.
8251 cp "$am_depcomp" conftest.dir
8252 cd conftest.dir
8253 # We will build objects and dependencies in a subdirectory because
8254 # it helps to detect inapplicable dependency modes. For instance
8255 # both Tru64's cc and ICC support -MD to output dependencies as a
8256 # side effect of compilation, but ICC will put the dependencies in
8257 # the current directory while Tru64 will put them in the object
8258 # directory.
8259 mkdir sub
8260
8261 am_cv_CC_dependencies_compiler_type=none
8262 if test "$am_compiler_list" = ""; then
8263 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
8264 fi
81ecdfbb
RW
8265 am__universal=false
8266 case " $depcc " in #(
8267 *\ -arch\ *\ -arch\ *) am__universal=true ;;
8268 esac
8269
e28b3332
DJ
8270 for depmode in $am_compiler_list; do
8271 # Setup a source with many dependencies, because some compilers
8272 # like to wrap large dependency lists on column 80 (with \), and
8273 # we should not choose a depcomp mode which is confused by this.
8274 #
8275 # We need to recreate these files for each test, as the compiler may
8276 # overwrite some of them when testing with obscure command lines.
8277 # This happens at least with the AIX C compiler.
8278 : > sub/conftest.c
8279 for i in 1 2 3 4 5 6; do
8280 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8281 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8282 # Solaris 8's {/usr,}/bin/sh.
8283 touch sub/conftst$i.h
8284 done
8285 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8286
81ecdfbb
RW
8287 # We check with `-c' and `-o' for the sake of the "dashmstdout"
8288 # mode. It turns out that the SunPro C++ compiler does not properly
8289 # handle `-M -o', and we need to detect this. Also, some Intel
8290 # versions had trouble with output in subdirs
8291 am__obj=sub/conftest.${OBJEXT-o}
8292 am__minus_obj="-o $am__obj"
e28b3332 8293 case $depmode in
81ecdfbb
RW
8294 gcc)
8295 # This depmode causes a compiler race in universal mode.
8296 test "$am__universal" = false || continue
8297 ;;
e28b3332
DJ
8298 nosideeffect)
8299 # after this tag, mechanisms are not by side-effect, so they'll
8300 # only be used when explicitly requested
8301 if test "x$enable_dependency_tracking" = xyes; then
8302 continue
8303 else
8304 break
8305 fi
8306 ;;
81ecdfbb
RW
8307 msvisualcpp | msvcmsys)
8308 # This compiler won't grok `-c -o', but also, the minuso test has
8309 # not run yet. These depmodes are late enough in the game, and
8310 # so weak that their functioning should not be impacted.
8311 am__obj=conftest.${OBJEXT-o}
8312 am__minus_obj=
8313 ;;
e28b3332
DJ
8314 none) break ;;
8315 esac
e28b3332 8316 if depmode=$depmode \
81ecdfbb 8317 source=sub/conftest.c object=$am__obj \
e28b3332 8318 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 8319 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 8320 >/dev/null 2>conftest.err &&
81ecdfbb 8321 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 8322 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 8323 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
8324 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8325 # icc doesn't choke on unknown options, it will just issue warnings
8326 # or remarks (even with -Werror). So we grep stderr for any message
8327 # that says an option was ignored or not supported.
8328 # When given -MP, icc 7.0 and 7.1 complain thusly:
8329 # icc: Command line warning: ignoring option '-M'; no argument required
8330 # The diagnosis changed in icc 8.0:
8331 # icc: Command line remark: option '-MP' not supported
8332 if (grep 'ignoring option' conftest.err ||
8333 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8334 am_cv_CC_dependencies_compiler_type=$depmode
8335 break
8336 fi
8337 fi
8338 done
8339
8340 cd ..
8341 rm -rf conftest.dir
8342else
8343 am_cv_CC_dependencies_compiler_type=none
8344fi
8345
8346fi
81ecdfbb
RW
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
8348$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
8349CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
8350
81ecdfbb 8351 if
e28b3332
DJ
8352 test "x$enable_dependency_tracking" != xno \
8353 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
8354 am__fastdepCC_TRUE=
8355 am__fastdepCC_FALSE='#'
8356else
8357 am__fastdepCC_TRUE='#'
8358 am__fastdepCC_FALSE=
8359fi
8360
8361
8362
8363
bec39cab
AC
8364
8365
81ecdfbb
RW
8366# Check whether --with-separate-debug-dir was given.
8367if test "${with_separate_debug_dir+set}" = set; then :
8368 withval=$with_separate_debug_dir;
b14b1491
TT
8369 DEBUGDIR=$withval
8370else
8371 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
8372fi
8373
20e95c23 8374
783e057b
DJ
8375 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 8377 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 8378 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 8379
783e057b
DJ
8380cat >>confdefs.h <<_ACEOF
8381#define DEBUGDIR "$ac_define_dir"
20e95c23 8382_ACEOF
20e95c23 8383
20e95c23 8384
20e95c23 8385
0c4a4063 8386
b14b1491
TT
8387 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8388 if test "x$prefix" = xNONE; then
8389 test_prefix=/usr/local
8390 else
8391 test_prefix=$prefix
8392 fi
783e057b 8393 else
b14b1491 8394 test_prefix=$exec_prefix
783e057b 8395 fi
b14b1491
TT
8396 value=0
8397 case ${ac_define_dir} in
8398 "${test_prefix}"|"${test_prefix}/"*|\
8399 '${exec_prefix}'|'${exec_prefix}/'*)
8400 value=1
8401 ;;
8402 esac
8403
8404cat >>confdefs.h <<_ACEOF
8405#define DEBUGDIR_RELOCATABLE $value
8406_ACEOF
8407
8408
8409
0c4a4063 8410
f83d8a90
DE
8411# We can't pass paths as command line arguments.
8412# Mingw32 tries to be clever and will convert the paths for us.
8413# For example -DBINDIR="/usr/local/bin" passed on the command line may get
8414# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
8415# This breaks GDB's relocatable path conversions since paths passed in
8416# config.h would not get so translated, the path prefixes no longer match.
8417
8418 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8419 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8420 ac_define_dir=`eval echo $bindir`
8421 ac_define_dir=`eval echo $ac_define_dir`
8422
8423cat >>confdefs.h <<_ACEOF
8424#define BINDIR "$ac_define_dir"
8425_ACEOF
8426
8427
8428
b14b1491
TT
8429# GDB's datadir relocation
8430
8431
8432
81ecdfbb
RW
8433# Check whether --with-gdb-datadir was given.
8434if test "${with_gdb_datadir+set}" = set; then :
8435 withval=$with_gdb_datadir;
b14b1491 8436 GDB_DATADIR=$withval
20e95c23 8437else
b14b1491 8438 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
8439fi
8440
20e95c23 8441
b14b1491
TT
8442 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8443 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8444 ac_define_dir=`eval echo $GDB_DATADIR`
8445 ac_define_dir=`eval echo $ac_define_dir`
8446
8447cat >>confdefs.h <<_ACEOF
8448#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
8449_ACEOF
8450
b14b1491
TT
8451
8452
0c4a4063 8453
b14b1491
TT
8454 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8455 if test "x$prefix" = xNONE; then
8456 test_prefix=/usr/local
8457 else
8458 test_prefix=$prefix
8459 fi
8460 else
8461 test_prefix=$exec_prefix
8462 fi
8463 value=0
8464 case ${ac_define_dir} in
8465 "${test_prefix}"|"${test_prefix}/"*|\
8466 '${exec_prefix}'|'${exec_prefix}/'*)
8467 value=1
8468 ;;
8469 esac
8470
8471cat >>confdefs.h <<_ACEOF
8472#define GDB_DATADIR_RELOCATABLE $value
8473_ACEOF
8474
8475
783e057b 8476
20e95c23 8477
0c4a4063 8478
81ecdfbb
RW
8479# Check whether --with-relocated-sources was given.
8480if test "${with_relocated_sources+set}" = set; then :
8481 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
8482
8483 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8485 ac_define_dir=`eval echo $reloc_srcdir`
8486 ac_define_dir=`eval echo $ac_define_dir`
8487
8488cat >>confdefs.h <<_ACEOF
8489#define RELOC_SRCDIR "$ac_define_dir"
8490_ACEOF
8491
8492
8493
81ecdfbb
RW
8494fi
8495
29b0e8a2 8496
bccbefd2
JK
8497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
8498$as_echo_n "checking for default auto-load safe-path... " >&6; }
8499
8500# Check whether --with-auto-load-safe-path was given.
8501if test "${with_auto_load_safe_path+set}" = set; then :
8502 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
8503 with_auto_load_safe_path=""
8504 fi
8505else
8506 with_auto_load_safe_path="$prefix"
8507fi
8508
8509
8510 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8511 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8512 ac_define_dir=`eval echo $with_auto_load_safe_path`
8513 ac_define_dir=`eval echo $ac_define_dir`
8514
8515cat >>confdefs.h <<_ACEOF
8516#define DEFAULT_AUTO_LOAD_SAFE_PATH "$ac_define_dir"
8517_ACEOF
8518
8519
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
8521$as_echo "$with_auto_load_safe_path" >&6; }
8522
29b0e8a2 8523
20e95c23 8524
5ae98d25 8525subdirs="$subdirs testsuite"
20e95c23
DJ
8526
8527
783e057b 8528# Check whether to support alternative target configurations
81ecdfbb
RW
8529# Check whether --enable-targets was given.
8530if test "${enable_targets+set}" = set; then :
8531 enableval=$enable_targets; case "${enableval}" in
8532 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
8533 ;;
8534 no) enable_targets= ;;
8535 *) enable_targets=$enableval ;;
8536esac
81ecdfbb
RW
8537fi
8538
20e95c23 8539
783e057b 8540# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
8541# Check whether --enable-64-bit-bfd was given.
8542if test "${enable_64_bit_bfd+set}" = set; then :
8543 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
8544 yes) want64=true ;;
8545 no) want64=false ;;
81ecdfbb 8546 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
8547esac
8548else
8549 want64=false
81ecdfbb
RW
8550fi
8551
783e057b
DJ
8552# Provide defaults for some variables set by the per-host and per-target
8553# configuration.
8554gdb_host_obs=posix-hdep.o
20e95c23 8555
783e057b
DJ
8556if test "${target}" = "${host}"; then
8557 gdb_native=yes
8558else
8559 gdb_native=no
8560fi
20e95c23 8561
783e057b 8562. $srcdir/configure.host
20e95c23 8563
783e057b 8564# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 8565
783e057b
DJ
8566TARGET_OBS=
8567all_targets=
20e95c23 8568
783e057b 8569for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 8570do
783e057b
DJ
8571 if test "$targ_alias" = "all"; then
8572 all_targets=true
8573 else
8574 # Canonicalize the secondary target names.
8575 result=`$ac_config_sub $targ_alias 2>/dev/null`
8576 if test -n "$result"; then
8577 targ=$result
8578 else
8579 targ=$targ_alias
8580 fi
20e95c23 8581
783e057b 8582 . ${srcdir}/configure.tgt
20e95c23 8583
bf307134
JB
8584 if test -z "${gdb_target_obs}"; then :
8585 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8586fi
8587
783e057b
DJ
8588 # Target-specific object files
8589 for i in ${gdb_target_obs}; do
8590 case " $TARGET_OBS " in
8591 *" ${i} "*) ;;
8592 *)
8593 TARGET_OBS="$TARGET_OBS ${i}"
8594 ;;
8595 esac
8596 done
20e95c23 8597
783e057b
DJ
8598 # Check whether this target needs 64-bit CORE_ADDR
8599 if test x${want64} = xfalse; then
8600 . ${srcdir}/../bfd/config.bfd
8601 fi
8602 fi
20e95c23
DJ
8603done
8604
783e057b
DJ
8605if test x${all_targets} = xtrue; then
8606
8607 # We want all 64-bit targets if we either:
8608 # - run on a 64-bit host or
8609 # - already require 64-bit support for some other target or
8610 # - the --enable-64-bit-bfd option was supplied
8611 # Otherwise we only support all 32-bit targets.
8612 #
8613 # NOTE: This test must be in sync with the corresponding
8614 # tests in BFD!
20e95c23 8615
783e057b 8616 if test x${want64} = xfalse; then
81ecdfbb
RW
8617 # The cast to long int works around a bug in the HP C Compiler
8618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8620# This bug is HP SR number 8606223364.
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8622$as_echo_n "checking size of long... " >&6; }
8623if test "${ac_cv_sizeof_long+set}" = set; then :
8624 $as_echo_n "(cached) " >&6
c0993dbe 8625else
81ecdfbb 8626 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8627
81ecdfbb
RW
8628else
8629 if test "$ac_cv_type_long" = yes; then
8630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8632{ as_fn_set_status 77
8633as_fn_error "cannot compute sizeof (long)
8634See \`config.log' for more details." "$LINENO" 5; }; }
8635 else
8636 ac_cv_sizeof_long=0
8637 fi
c0993dbe 8638fi
81ecdfbb 8639
c0993dbe 8640fi
81ecdfbb
RW
8641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8642$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8643
c0993dbe 8644
c0993dbe 8645
c0993dbe
UW
8646cat >>confdefs.h <<_ACEOF
8647#define SIZEOF_LONG $ac_cv_sizeof_long
8648_ACEOF
8649
8650
8651 if test "x${ac_cv_sizeof_long}" = "x8"; then
8652 want64=true
8653 fi
8654 fi
8655 if test x${want64} = xtrue; then
8656 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8657 else
8658 TARGET_OBS='$(ALL_TARGET_OBS)'
8659 fi
8660fi
8661
8662
8663
8664# For other settings, only the main target counts.
8665gdb_sim=
8666gdb_osabi=
8667build_gdbserver=
8668targ=$target; . ${srcdir}/configure.tgt
8669
8670# Fetch the default architecture and default target vector from BFD.
8671targ=$target; . $srcdir/../bfd/config.bfd
8672
8673# We only want the first architecture, so strip off the others if
8674# there is more than one.
8675targ_archs=`echo $targ_archs | sed 's/ .*//'`
8676
8677if test "x$targ_archs" != x; then
8678
8679cat >>confdefs.h <<_ACEOF
8680#define DEFAULT_BFD_ARCH $targ_archs
8681_ACEOF
8682
8683fi
8684if test "x$targ_defvec" != x; then
8685
8686cat >>confdefs.h <<_ACEOF
8687#define DEFAULT_BFD_VEC $targ_defvec
8688_ACEOF
8689
8690fi
8691
c0993dbe
UW
8692# The CLI cannot be disabled yet, but may be in the future.
8693
8694# Enable CLI.
81ecdfbb
RW
8695# Check whether --enable-gdbcli was given.
8696if test "${enable_gdbcli+set}" = set; then :
8697 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8698 yes)
8699 ;;
8700 no)
81ecdfbb 8701 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8702 *)
81ecdfbb 8703 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8704 esac
8705else
8706 enable_gdbcli=yes
81ecdfbb
RW
8707fi
8708
c0993dbe
UW
8709if test x"$enable_gdbcli" = xyes; then
8710 if test -d $srcdir/cli; then
8711 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8712 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8713 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8714 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8715 fi
8716fi
8717
8718# Enable MI.
81ecdfbb
RW
8719# Check whether --enable-gdbmi was given.
8720if test "${enable_gdbmi+set}" = set; then :
8721 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8722 yes | no)
8723 ;;
8724 *)
81ecdfbb 8725 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8726 esac
8727else
8728 enable_gdbmi=yes
81ecdfbb
RW
8729fi
8730
c0993dbe
UW
8731if test x"$enable_gdbmi" = xyes; then
8732 if test -d $srcdir/mi; then
8733 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8734 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8735 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8736 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8737 fi
8738fi
8739
8740# Enable TUI.
81ecdfbb
RW
8741# Check whether --enable-tui was given.
8742if test "${enable_tui+set}" = set; then :
8743 enableval=$enable_tui; case $enableval in
3ca64bd3 8744 yes | no | auto)
c0993dbe
UW
8745 ;;
8746 *)
81ecdfbb 8747 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8748 esac
8749else
3ca64bd3 8750 enable_tui=auto
81ecdfbb
RW
8751fi
8752
c0993dbe
UW
8753
8754# Enable gdbtk.
81ecdfbb
RW
8755# Check whether --enable-gdbtk was given.
8756if test "${enable_gdbtk+set}" = set; then :
8757 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8758 yes | no)
8759 ;;
8760 *)
81ecdfbb 8761 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8762 esac
8763else
5062cc19 8764 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8765 enable_gdbtk=yes
8766 else
8767 enable_gdbtk=no
8768 fi
81ecdfbb
RW
8769fi
8770
c0993dbe
UW
8771# We unconditionally disable gdbtk tests on selected platforms.
8772case $host_os in
8773 go32* | windows*)
81ecdfbb
RW
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8775$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8776 enable_gdbtk=no ;;
8777esac
8778
05e7c244 8779# Libunwind support for ia64.
bec39cab 8780
05e7c244
JK
8781
8782# Check whether --with-libunwind-ia64 was given.
8783if test "${with_libunwind_ia64+set}" = set; then :
8784 withval=$with_libunwind_ia64;
bec39cab 8785else
05e7c244
JK
8786 with_libunwind_ia64=auto
8787fi
bec39cab 8788
05e7c244
JK
8789
8790# Backward compatibility option.
8791if test "${with_libunwind+set}" = set; then
8792 if test x"$with_libunwind_ia64" != xauto; then
8793 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
8794 fi
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
8796$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
8797 with_libunwind_ia64="$with_libunwind"
8798fi
8799
8800case "$with_libunwind_ia64" in
8801 yes | no)
8802 ;;
8803 auto)
8804 for ac_header in libunwind-ia64.h
81ecdfbb 8805do :
b54a8fd7
PA
8806 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8807if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8808 cat >>confdefs.h <<_ACEOF
b54a8fd7 8809#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8810_ACEOF
8811
8812fi
8813
8814done
8815
05e7c244
JK
8816 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
8817 ;;
8818 *)
8819 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
8820 ;;
8821esac
bec39cab 8822
05e7c244 8823if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 8824 for ac_header in libunwind-ia64.h
81ecdfbb 8825do :
b54a8fd7
PA
8826 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8827if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8828 cat >>confdefs.h <<_ACEOF
b54a8fd7 8829#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8830_ACEOF
8831
8832fi
8833
8834done
8835
05e7c244
JK
8836 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
8837 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
8838 fi
8839 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
8840 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
8841 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
8842fi
8843
cb01cfba
JB
8844opt_curses=no
8845
81ecdfbb
RW
8846# Check whether --with-curses was given.
8847if test "${with_curses+set}" = set; then :
8848 withval=$with_curses; opt_curses=$withval
8849fi
8850
cb01cfba 8851
76a39ba7 8852prefer_curses=no
cb01cfba 8853if test "$opt_curses" = "yes"; then
76a39ba7 8854 prefer_curses=yes
cb01cfba
JB
8855fi
8856
a9322a30 8857# Profiling support.
81ecdfbb
RW
8858# Check whether --enable-profiling was given.
8859if test "${enable_profiling+set}" = set; then :
8860 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8861 yes | no)
8862 ;;
8863 *)
81ecdfbb 8864 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8865 esac
8866else
8867 enable_profiling=no
81ecdfbb 8868fi
bec39cab 8869
a9322a30
TT
8870
8871for ac_func in monstartup _mcleanup
81ecdfbb
RW
8872do :
8873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8874ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8875eval as_val=\$$as_ac_var
8876 if test "x$as_val" = x""yes; then :
8877 cat >>confdefs.h <<_ACEOF
8878#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8879_ACEOF
a9322a30 8880
81ecdfbb
RW
8881fi
8882done
a9322a30 8883
81ecdfbb
RW
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8885$as_echo_n "checking for _etext... " >&6; }
8886if test "${ac_cv_var__etext+set}" = set; then :
8887 $as_echo_n "(cached) " >&6
8888else
8889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8890/* end confdefs.h. */
8891#include <stdlib.h>
8892extern char _etext;
a9322a30
TT
8893
8894int
8895main ()
8896{
8897free (&_etext);
8898 ;
8899 return 0;
8900}
bec39cab 8901_ACEOF
81ecdfbb 8902if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8903 ac_cv_var__etext=yes
bec39cab 8904else
81ecdfbb 8905 ac_cv_var__etext=no
bec39cab 8906fi
81ecdfbb
RW
8907rm -f core conftest.err conftest.$ac_objext \
8908 conftest$ac_exeext conftest.$ac_ext
bec39cab 8909fi
81ecdfbb
RW
8910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8911$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8912if test $ac_cv_var__etext = yes; then
60ca704f 8913
81ecdfbb 8914$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8915
bec39cab 8916fi
81ecdfbb
RW
8917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8918$as_echo_n "checking for etext... " >&6; }
8919if test "${ac_cv_var_etext+set}" = set; then :
8920 $as_echo_n "(cached) " >&6
bec39cab 8921else
81ecdfbb 8922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8923/* end confdefs.h. */
a9322a30
TT
8924#include <stdlib.h>
8925extern char etext;
bec39cab
AC
8926
8927int
8928main ()
8929{
a9322a30 8930free (&etext);
bec39cab
AC
8931 ;
8932 return 0;
8933}
8934_ACEOF
81ecdfbb 8935if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8936 ac_cv_var_etext=yes
bec39cab 8937else
81ecdfbb 8938 ac_cv_var_etext=no
bec39cab 8939fi
81ecdfbb
RW
8940rm -f core conftest.err conftest.$ac_objext \
8941 conftest$ac_exeext conftest.$ac_ext
bec39cab 8942fi
81ecdfbb
RW
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8944$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8945if test $ac_cv_var_etext = yes; then
8946
81ecdfbb 8947$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8948
8949fi
a9322a30
TT
8950if test "$enable_profiling" = yes ; then
8951 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8952 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8953 fi
8954 PROFILE_CFLAGS=-pg
8955 OLD_CFLAGS="$CFLAGS"
8956 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8957
81ecdfbb
RW
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8959$as_echo_n "checking whether $CC supports -pg... " >&6; }
8960if test "${ac_cv_cc_supports_pg+set}" = set; then :
8961 $as_echo_n "(cached) " >&6
bec39cab 8962else
81ecdfbb 8963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8964/* end confdefs.h. */
bec39cab
AC
8965
8966int
8967main ()
8968{
a9322a30 8969int x;
bec39cab
AC
8970 ;
8971 return 0;
8972}
8973_ACEOF
81ecdfbb 8974if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8975 ac_cv_cc_supports_pg=yes
bec39cab 8976else
81ecdfbb 8977 ac_cv_cc_supports_pg=no
bec39cab 8978fi
81ecdfbb 8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8980fi
81ecdfbb
RW
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8982$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8983
a9322a30 8984 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8985 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8986 fi
bec39cab 8987
a9322a30 8988 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8989fi
8990
c16158bc
JM
8991
8992
81ecdfbb
RW
8993# Check whether --with-pkgversion was given.
8994if test "${with_pkgversion+set}" = set; then :
8995 withval=$with_pkgversion; case "$withval" in
8996 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8997 no) PKGVERSION= ;;
8998 *) PKGVERSION="($withval) " ;;
8999 esac
9000else
9001 PKGVERSION="(GDB) "
9002
81ecdfbb 9003fi
c16158bc
JM
9004
9005
9006
9007
81ecdfbb
RW
9008
9009# Check whether --with-bugurl was given.
9010if test "${with_bugurl+set}" = set; then :
9011 withval=$with_bugurl; case "$withval" in
9012 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
9013 no) BUGURL=
9014 ;;
9015 *) BUGURL="$withval"
9016 ;;
9017 esac
9018else
9019 BUGURL="http://www.gnu.org/software/gdb/bugs/"
9020
81ecdfbb
RW
9021fi
9022
c16158bc
JM
9023 case ${BUGURL} in
9024 "")
9025 REPORT_BUGS_TO=
9026 REPORT_BUGS_TEXI=
9027 ;;
9028 *)
9029 REPORT_BUGS_TO="<$BUGURL>"
9030 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
9031 ;;
9032 esac;
9033
9034
9035
9036
9037cat >>confdefs.h <<_ACEOF
9038#define PKGVERSION "$PKGVERSION"
9039_ACEOF
9040
9041
9042cat >>confdefs.h <<_ACEOF
9043#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
9044_ACEOF
9045
9046
bec39cab
AC
9047# --------------------- #
9048# Checks for programs. #
9049# --------------------- #
9050
9051for ac_prog in gawk mawk nawk awk
9052do
9053 # Extract the first word of "$ac_prog", so it can be a program name with args.
9054set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
9055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9056$as_echo_n "checking for $ac_word... " >&6; }
9057if test "${ac_cv_prog_AWK+set}" = set; then :
9058 $as_echo_n "(cached) " >&6
bec39cab
AC
9059else
9060 if test -n "$AWK"; then
9061 ac_cv_prog_AWK="$AWK" # Let the user override the test.
9062else
9063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066 IFS=$as_save_IFS
9067 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9068 for ac_exec_ext in '' $ac_executable_extensions; do
9069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9070 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 9071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9072 break 2
9073 fi
9074done
81ecdfbb
RW
9075 done
9076IFS=$as_save_IFS
bec39cab
AC
9077
9078fi
9079fi
9080AWK=$ac_cv_prog_AWK
9081if test -n "$AWK"; then
81ecdfbb
RW
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9083$as_echo "$AWK" >&6; }
bec39cab 9084else
81ecdfbb
RW
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086$as_echo "no" >&6; }
bec39cab
AC
9087fi
9088
bec39cab 9089
81ecdfbb 9090 test -n "$AWK" && break
bec39cab
AC
9091done
9092
bec39cab 9093
81ecdfbb
RW
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9095$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
9096LN_S=$as_ln_s
9097if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9099$as_echo "yes" >&6; }
bec39cab 9100else
81ecdfbb
RW
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9102$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
9103fi
9104
9105if test -n "$ac_tool_prefix"; then
9106 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9107set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109$as_echo_n "checking for $ac_word... " >&6; }
9110if test "${ac_cv_prog_RANLIB+set}" = set; then :
9111 $as_echo_n "(cached) " >&6
bec39cab
AC
9112else
9113 if test -n "$RANLIB"; then
9114 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9115else
9116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117for as_dir in $PATH
9118do
9119 IFS=$as_save_IFS
9120 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9121 for ac_exec_ext in '' $ac_executable_extensions; do
9122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9123 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 9124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9125 break 2
9126 fi
9127done
81ecdfbb
RW
9128 done
9129IFS=$as_save_IFS
bec39cab
AC
9130
9131fi
9132fi
9133RANLIB=$ac_cv_prog_RANLIB
9134if test -n "$RANLIB"; then
81ecdfbb
RW
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9136$as_echo "$RANLIB" >&6; }
bec39cab 9137else
81ecdfbb
RW
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139$as_echo "no" >&6; }
bec39cab
AC
9140fi
9141
81ecdfbb 9142
bec39cab
AC
9143fi
9144if test -z "$ac_cv_prog_RANLIB"; then
9145 ac_ct_RANLIB=$RANLIB
9146 # Extract the first word of "ranlib", so it can be a program name with args.
9147set dummy ranlib; ac_word=$2
81ecdfbb
RW
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9149$as_echo_n "checking for $ac_word... " >&6; }
9150if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
9151 $as_echo_n "(cached) " >&6
bec39cab
AC
9152else
9153 if test -n "$ac_ct_RANLIB"; then
9154 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9155else
9156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9157for as_dir in $PATH
9158do
9159 IFS=$as_save_IFS
9160 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9161 for ac_exec_ext in '' $ac_executable_extensions; do
9162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9163 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 9164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9165 break 2
9166 fi
9167done
81ecdfbb
RW
9168 done
9169IFS=$as_save_IFS
bec39cab 9170
bec39cab
AC
9171fi
9172fi
9173ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9174if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9176$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 9177else
81ecdfbb
RW
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9179$as_echo "no" >&6; }
bec39cab
AC
9180fi
9181
81ecdfbb
RW
9182 if test "x$ac_ct_RANLIB" = x; then
9183 RANLIB=":"
9184 else
9185 case $cross_compiling:$ac_tool_warned in
9186yes:)
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9189ac_tool_warned=yes ;;
9190esac
9191 RANLIB=$ac_ct_RANLIB
9192 fi
bec39cab
AC
9193else
9194 RANLIB="$ac_cv_prog_RANLIB"
9195fi
9196
9197for ac_prog in 'bison -y' byacc
9198do
9199 # Extract the first word of "$ac_prog", so it can be a program name with args.
9200set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9202$as_echo_n "checking for $ac_word... " >&6; }
9203if test "${ac_cv_prog_YACC+set}" = set; then :
9204 $as_echo_n "(cached) " >&6
bec39cab
AC
9205else
9206 if test -n "$YACC"; then
9207 ac_cv_prog_YACC="$YACC" # Let the user override the test.
9208else
9209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9210for as_dir in $PATH
9211do
9212 IFS=$as_save_IFS
9213 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9214 for ac_exec_ext in '' $ac_executable_extensions; do
9215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9216 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 9217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9218 break 2
9219 fi
9220done
81ecdfbb
RW
9221 done
9222IFS=$as_save_IFS
bec39cab
AC
9223
9224fi
9225fi
9226YACC=$ac_cv_prog_YACC
9227if test -n "$YACC"; then
81ecdfbb
RW
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
9229$as_echo "$YACC" >&6; }
bec39cab 9230else
81ecdfbb
RW
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9232$as_echo "no" >&6; }
bec39cab
AC
9233fi
9234
81ecdfbb 9235
bec39cab
AC
9236 test -n "$YACC" && break
9237done
9238test -n "$YACC" || YACC="yacc"
9239
9240
9241if test -n "$ac_tool_prefix"; then
9242 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9243set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if test "${ac_cv_prog_AR+set}" = set; then :
9247 $as_echo_n "(cached) " >&6
bec39cab
AC
9248else
9249 if test -n "$AR"; then
9250 ac_cv_prog_AR="$AR" # Let the user override the test.
9251else
9252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255 IFS=$as_save_IFS
9256 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9257 for ac_exec_ext in '' $ac_executable_extensions; do
9258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9259 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 9260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9261 break 2
9262 fi
9263done
81ecdfbb
RW
9264 done
9265IFS=$as_save_IFS
bec39cab
AC
9266
9267fi
9268fi
9269AR=$ac_cv_prog_AR
9270if test -n "$AR"; then
81ecdfbb
RW
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9272$as_echo "$AR" >&6; }
bec39cab 9273else
81ecdfbb
RW
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
bec39cab
AC
9276fi
9277
81ecdfbb 9278
bec39cab
AC
9279fi
9280if test -z "$ac_cv_prog_AR"; then
9281 ac_ct_AR=$AR
9282 # Extract the first word of "ar", so it can be a program name with args.
9283set dummy ar; ac_word=$2
81ecdfbb
RW
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285$as_echo_n "checking for $ac_word... " >&6; }
9286if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
9287 $as_echo_n "(cached) " >&6
bec39cab
AC
9288else
9289 if test -n "$ac_ct_AR"; then
9290 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9291else
9292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9293for as_dir in $PATH
9294do
9295 IFS=$as_save_IFS
9296 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9297 for ac_exec_ext in '' $ac_executable_extensions; do
9298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9299 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 9300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9301 break 2
9302 fi
9303done
81ecdfbb
RW
9304 done
9305IFS=$as_save_IFS
bec39cab
AC
9306
9307fi
9308fi
9309ac_ct_AR=$ac_cv_prog_ac_ct_AR
9310if test -n "$ac_ct_AR"; then
81ecdfbb
RW
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9312$as_echo "$ac_ct_AR" >&6; }
bec39cab 9313else
81ecdfbb
RW
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
bec39cab
AC
9316fi
9317
81ecdfbb
RW
9318 if test "x$ac_ct_AR" = x; then
9319 AR=""
9320 else
9321 case $cross_compiling:$ac_tool_warned in
9322yes:)
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9325ac_tool_warned=yes ;;
9326esac
9327 AR=$ac_ct_AR
9328 fi
bec39cab
AC
9329else
9330 AR="$ac_cv_prog_AR"
9331fi
9332
9333if test -n "$ac_tool_prefix"; then
9334 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9335set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337$as_echo_n "checking for $ac_word... " >&6; }
9338if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
9339 $as_echo_n "(cached) " >&6
bec39cab
AC
9340else
9341 if test -n "$DLLTOOL"; then
9342 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9343else
9344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347 IFS=$as_save_IFS
9348 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9349 for ac_exec_ext in '' $ac_executable_extensions; do
9350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9351 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 9352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9353 break 2
9354 fi
9355done
81ecdfbb
RW
9356 done
9357IFS=$as_save_IFS
bec39cab
AC
9358
9359fi
9360fi
9361DLLTOOL=$ac_cv_prog_DLLTOOL
9362if test -n "$DLLTOOL"; then
81ecdfbb
RW
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9364$as_echo "$DLLTOOL" >&6; }
bec39cab 9365else
81ecdfbb
RW
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
bec39cab
AC
9368fi
9369
81ecdfbb 9370
bec39cab
AC
9371fi
9372if test -z "$ac_cv_prog_DLLTOOL"; then
9373 ac_ct_DLLTOOL=$DLLTOOL
9374 # Extract the first word of "dlltool", so it can be a program name with args.
9375set dummy dlltool; ac_word=$2
81ecdfbb
RW
9376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9377$as_echo_n "checking for $ac_word... " >&6; }
9378if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
9379 $as_echo_n "(cached) " >&6
bec39cab
AC
9380else
9381 if test -n "$ac_ct_DLLTOOL"; then
9382 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9383else
9384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9385for as_dir in $PATH
9386do
9387 IFS=$as_save_IFS
9388 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9389 for ac_exec_ext in '' $ac_executable_extensions; do
9390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9391 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 9392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9393 break 2
9394 fi
9395done
81ecdfbb
RW
9396 done
9397IFS=$as_save_IFS
bec39cab
AC
9398
9399fi
9400fi
9401ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9402if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9404$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 9405else
81ecdfbb
RW
9406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
bec39cab
AC
9408fi
9409
81ecdfbb
RW
9410 if test "x$ac_ct_DLLTOOL" = x; then
9411 DLLTOOL=""
9412 else
9413 case $cross_compiling:$ac_tool_warned in
9414yes:)
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9417ac_tool_warned=yes ;;
9418esac
9419 DLLTOOL=$ac_ct_DLLTOOL
9420 fi
bec39cab
AC
9421else
9422 DLLTOOL="$ac_cv_prog_DLLTOOL"
9423fi
9424
9425if test -n "$ac_tool_prefix"; then
9426 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9427set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
9428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9429$as_echo_n "checking for $ac_word... " >&6; }
9430if test "${ac_cv_prog_WINDRES+set}" = set; then :
9431 $as_echo_n "(cached) " >&6
bec39cab
AC
9432else
9433 if test -n "$WINDRES"; then
9434 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9435else
9436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439 IFS=$as_save_IFS
9440 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9441 for ac_exec_ext in '' $ac_executable_extensions; do
9442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9443 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 9444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9445 break 2
9446 fi
9447done
81ecdfbb
RW
9448 done
9449IFS=$as_save_IFS
bec39cab
AC
9450
9451fi
9452fi
9453WINDRES=$ac_cv_prog_WINDRES
9454if test -n "$WINDRES"; then
81ecdfbb
RW
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9456$as_echo "$WINDRES" >&6; }
bec39cab 9457else
81ecdfbb
RW
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
bec39cab
AC
9460fi
9461
81ecdfbb 9462
bec39cab
AC
9463fi
9464if test -z "$ac_cv_prog_WINDRES"; then
9465 ac_ct_WINDRES=$WINDRES
9466 # Extract the first word of "windres", so it can be a program name with args.
9467set dummy windres; ac_word=$2
81ecdfbb
RW
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469$as_echo_n "checking for $ac_word... " >&6; }
9470if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9471 $as_echo_n "(cached) " >&6
bec39cab
AC
9472else
9473 if test -n "$ac_ct_WINDRES"; then
9474 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9475else
9476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9477for as_dir in $PATH
9478do
9479 IFS=$as_save_IFS
9480 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9481 for ac_exec_ext in '' $ac_executable_extensions; do
9482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9483 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 9484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9485 break 2
9486 fi
9487done
81ecdfbb
RW
9488 done
9489IFS=$as_save_IFS
bec39cab
AC
9490
9491fi
9492fi
9493ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9494if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9496$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 9497else
81ecdfbb
RW
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499$as_echo "no" >&6; }
c906108c 9500fi
bec39cab 9501
81ecdfbb
RW
9502 if test "x$ac_ct_WINDRES" = x; then
9503 WINDRES=""
9504 else
9505 case $cross_compiling:$ac_tool_warned in
9506yes:)
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9509ac_tool_warned=yes ;;
9510esac
9511 WINDRES=$ac_ct_WINDRES
9512 fi
c906108c 9513else
bec39cab 9514 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
9515fi
9516
bec39cab
AC
9517
9518# Needed for GNU/Hurd.
9519if test -n "$ac_tool_prefix"; then
9520 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9521set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if test "${ac_cv_prog_MIG+set}" = set; then :
9525 $as_echo_n "(cached) " >&6
c906108c 9526else
bec39cab
AC
9527 if test -n "$MIG"; then
9528 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9529else
9530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531for as_dir in $PATH
9532do
9533 IFS=$as_save_IFS
9534 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9535 for ac_exec_ext in '' $ac_executable_extensions; do
9536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9537 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 9538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9539 break 2
9540 fi
9541done
81ecdfbb
RW
9542 done
9543IFS=$as_save_IFS
bec39cab 9544
c906108c 9545fi
bec39cab
AC
9546fi
9547MIG=$ac_cv_prog_MIG
9548if test -n "$MIG"; then
81ecdfbb
RW
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
9550$as_echo "$MIG" >&6; }
c906108c 9551else
81ecdfbb
RW
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
c906108c
SS
9554fi
9555
81ecdfbb 9556
bec39cab
AC
9557fi
9558if test -z "$ac_cv_prog_MIG"; then
9559 ac_ct_MIG=$MIG
9560 # Extract the first word of "mig", so it can be a program name with args.
9561set dummy mig; ac_word=$2
81ecdfbb
RW
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563$as_echo_n "checking for $ac_word... " >&6; }
9564if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
9565 $as_echo_n "(cached) " >&6
bec39cab
AC
9566else
9567 if test -n "$ac_ct_MIG"; then
9568 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9569else
9570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9571for as_dir in $PATH
9572do
9573 IFS=$as_save_IFS
9574 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9575 for ac_exec_ext in '' $ac_executable_extensions; do
9576 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9577 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 9578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9579 break 2
9580 fi
9581done
81ecdfbb
RW
9582 done
9583IFS=$as_save_IFS
c906108c 9584
bec39cab
AC
9585fi
9586fi
9587ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9588if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9590$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9591else
81ecdfbb
RW
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
bec39cab 9594fi
c906108c 9595
81ecdfbb
RW
9596 if test "x$ac_ct_MIG" = x; then
9597 MIG=""
9598 else
9599 case $cross_compiling:$ac_tool_warned in
9600yes:)
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9603ac_tool_warned=yes ;;
9604esac
9605 MIG=$ac_ct_MIG
9606 fi
bec39cab
AC
9607else
9608 MIG="$ac_cv_prog_MIG"
9609fi
c906108c 9610
c906108c 9611
bec39cab
AC
9612# ---------------------- #
9613# Checks for libraries. #
9614# ---------------------- #
c906108c 9615
bec39cab 9616# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9618$as_echo_n "checking for main in -lm... " >&6; }
9619if test "${ac_cv_lib_m_main+set}" = set; then :
9620 $as_echo_n "(cached) " >&6
bec39cab
AC
9621else
9622 ac_check_lib_save_LIBS=$LIBS
9623LIBS="-lm $LIBS"
81ecdfbb 9624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9625/* end confdefs.h. */
c906108c 9626
c906108c 9627
bec39cab
AC
9628int
9629main ()
9630{
81ecdfbb 9631return main ();
bec39cab
AC
9632 ;
9633 return 0;
9634}
9635_ACEOF
81ecdfbb 9636if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9637 ac_cv_lib_m_main=yes
9638else
81ecdfbb 9639 ac_cv_lib_m_main=no
bec39cab 9640fi
81ecdfbb
RW
9641rm -f core conftest.err conftest.$ac_objext \
9642 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9643LIBS=$ac_check_lib_save_LIBS
9644fi
81ecdfbb
RW
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9646$as_echo "$ac_cv_lib_m_main" >&6; }
9647if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9648 cat >>confdefs.h <<_ACEOF
9649#define HAVE_LIBM 1
9650_ACEOF
9651
9652 LIBS="-lm $LIBS"
c906108c 9653
c906108c 9654fi
bec39cab
AC
9655
9656
9657# We need to link with -lw to get `wctype' on Solaris before Solaris
9658# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9659# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9660# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9661ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9662if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9663
c906108c 9664else
81ecdfbb
RW
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9666$as_echo_n "checking for wctype in -lw... " >&6; }
9667if test "${ac_cv_lib_w_wctype+set}" = set; then :
9668 $as_echo_n "(cached) " >&6
bec39cab
AC
9669else
9670 ac_check_lib_save_LIBS=$LIBS
9671LIBS="-lw $LIBS"
81ecdfbb 9672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9673/* end confdefs.h. */
c906108c 9674
81ecdfbb
RW
9675/* Override any GCC internal prototype to avoid an error.
9676 Use char because int might match the return type of a GCC
9677 builtin and then its argument prototype would still apply. */
bec39cab
AC
9678#ifdef __cplusplus
9679extern "C"
9680#endif
bec39cab
AC
9681char wctype ();
9682int
9683main ()
9684{
81ecdfbb 9685return wctype ();
bec39cab
AC
9686 ;
9687 return 0;
9688}
9689_ACEOF
81ecdfbb 9690if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9691 ac_cv_lib_w_wctype=yes
9692else
81ecdfbb 9693 ac_cv_lib_w_wctype=no
bec39cab 9694fi
81ecdfbb
RW
9695rm -f core conftest.err conftest.$ac_objext \
9696 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9697LIBS=$ac_check_lib_save_LIBS
9698fi
81ecdfbb
RW
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9700$as_echo "$ac_cv_lib_w_wctype" >&6; }
9701if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9702 cat >>confdefs.h <<_ACEOF
9703#define HAVE_LIBW 1
9704_ACEOF
c906108c 9705
bec39cab 9706 LIBS="-lw $LIBS"
c906108c 9707
bec39cab 9708fi
c906108c 9709
bec39cab 9710fi
c906108c 9711
ddc9cd0f 9712
bec39cab 9713# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9715$as_echo_n "checking for library containing gethostbyname... " >&6; }
9716if test "${ac_cv_search_gethostbyname+set}" = set; then :
9717 $as_echo_n "(cached) " >&6
bec39cab
AC
9718else
9719 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9721/* end confdefs.h. */
ddc9cd0f 9722
81ecdfbb
RW
9723/* Override any GCC internal prototype to avoid an error.
9724 Use char because int might match the return type of a GCC
9725 builtin and then its argument prototype would still apply. */
bec39cab
AC
9726#ifdef __cplusplus
9727extern "C"
9728#endif
bec39cab
AC
9729char gethostbyname ();
9730int
9731main ()
9732{
81ecdfbb 9733return gethostbyname ();
bec39cab
AC
9734 ;
9735 return 0;
9736}
9737_ACEOF
81ecdfbb
RW
9738for ac_lib in '' nsl; do
9739 if test -z "$ac_lib"; then
9740 ac_res="none required"
9741 else
9742 ac_res=-l$ac_lib
b4e70030 9743 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9744 fi
9745 if ac_fn_c_try_link "$LINENO"; then :
9746 ac_cv_search_gethostbyname=$ac_res
9747fi
9748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext
9750 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9751 break
9752fi
9753done
9754if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9755
bec39cab 9756else
81ecdfbb 9757 ac_cv_search_gethostbyname=no
bec39cab 9758fi
81ecdfbb 9759rm conftest.$ac_ext
bec39cab
AC
9760LIBS=$ac_func_search_save_LIBS
9761fi
81ecdfbb
RW
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9763$as_echo "$ac_cv_search_gethostbyname" >&6; }
9764ac_res=$ac_cv_search_gethostbyname
9765if test "$ac_res" != no; then :
9766 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9767
bec39cab 9768fi
96baa820 9769
c906108c 9770
b4e70030 9771# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9773$as_echo_n "checking for library containing socketpair... " >&6; }
9774if test "${ac_cv_search_socketpair+set}" = set; then :
9775 $as_echo_n "(cached) " >&6
b4e70030
JB
9776else
9777 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9779/* end confdefs.h. */
9780
81ecdfbb
RW
9781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
b4e70030
JB
9784#ifdef __cplusplus
9785extern "C"
9786#endif
b4e70030
JB
9787char socketpair ();
9788int
9789main ()
9790{
81ecdfbb 9791return socketpair ();
b4e70030
JB
9792 ;
9793 return 0;
9794}
9795_ACEOF
81ecdfbb
RW
9796for ac_lib in '' socket; do
9797 if test -z "$ac_lib"; then
9798 ac_res="none required"
9799 else
9800 ac_res=-l$ac_lib
b4e70030 9801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9802 fi
9803 if ac_fn_c_try_link "$LINENO"; then :
9804 ac_cv_search_socketpair=$ac_res
9805fi
9806rm -f core conftest.err conftest.$ac_objext \
9807 conftest$ac_exeext
9808 if test "${ac_cv_search_socketpair+set}" = set; then :
9809 break
9810fi
9811done
9812if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9813
b4e70030 9814else
81ecdfbb 9815 ac_cv_search_socketpair=no
b4e70030 9816fi
81ecdfbb 9817rm conftest.$ac_ext
b4e70030
JB
9818LIBS=$ac_func_search_save_LIBS
9819fi
81ecdfbb
RW
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9821$as_echo "$ac_cv_search_socketpair" >&6; }
9822ac_res=$ac_cv_search_socketpair
9823if test "$ac_res" != no; then :
9824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9825
9826fi
9827
9828
233a11ab 9829# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9830
9831 # See if the user specified whether he wants zlib support or not.
9832
9833# Check whether --with-zlib was given.
9834if test "${with_zlib+set}" = set; then :
9835 withval=$with_zlib;
9836else
9837 with_zlib=auto
9838fi
9839
9840
9841 if test "$with_zlib" != "no"; then
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9843$as_echo_n "checking for library containing zlibVersion... " >&6; }
9844if test "${ac_cv_search_zlibVersion+set}" = set; then :
9845 $as_echo_n "(cached) " >&6
233a11ab
CS
9846else
9847 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9849/* end confdefs.h. */
9850
81ecdfbb
RW
9851/* Override any GCC internal prototype to avoid an error.
9852 Use char because int might match the return type of a GCC
233a11ab 9853 builtin and then its argument prototype would still apply. */
233a11ab
CS
9854#ifdef __cplusplus
9855extern "C"
9856#endif
233a11ab
CS
9857char zlibVersion ();
9858int
9859main ()
9860{
81ecdfbb 9861return zlibVersion ();
233a11ab
CS
9862 ;
9863 return 0;
9864}
9865_ACEOF
81ecdfbb
RW
9866for ac_lib in '' z; do
9867 if test -z "$ac_lib"; then
9868 ac_res="none required"
233a11ab 9869 else
81ecdfbb
RW
9870 ac_res=-l$ac_lib
9871 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9872 fi
81ecdfbb
RW
9873 if ac_fn_c_try_link "$LINENO"; then :
9874 ac_cv_search_zlibVersion=$ac_res
233a11ab 9875fi
81ecdfbb
RW
9876rm -f core conftest.err conftest.$ac_objext \
9877 conftest$ac_exeext
9878 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9879 break
233a11ab 9880fi
81ecdfbb
RW
9881done
9882if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9883
233a11ab 9884else
81ecdfbb 9885 ac_cv_search_zlibVersion=no
233a11ab 9886fi
81ecdfbb
RW
9887rm conftest.$ac_ext
9888LIBS=$ac_func_search_save_LIBS
233a11ab 9889fi
81ecdfbb
RW
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9891$as_echo "$ac_cv_search_zlibVersion" >&6; }
9892ac_res=$ac_cv_search_zlibVersion
9893if test "$ac_res" != no; then :
9894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9895 for ac_header in zlib.h
9896do :
9897 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9898if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9899 cat >>confdefs.h <<_ACEOF
81ecdfbb 9900#define HAVE_ZLIB_H 1
233a11ab
CS
9901_ACEOF
9902
9903fi
9904
9905done
9906
9907fi
9908
b040ad30
JB
9909 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9910 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9911 fi
9912 fi
9913
233a11ab 9914
77f120bf 9915# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9917$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9918if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9919 $as_echo_n "(cached) " >&6
bec39cab
AC
9920else
9921 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9923/* end confdefs.h. */
c906108c 9924
81ecdfbb
RW
9925/* Override any GCC internal prototype to avoid an error.
9926 Use char because int might match the return type of a GCC
9927 builtin and then its argument prototype would still apply. */
bec39cab
AC
9928#ifdef __cplusplus
9929extern "C"
9930#endif
77f120bf 9931char dlgetmodinfo ();
bec39cab
AC
9932int
9933main ()
9934{
81ecdfbb 9935return dlgetmodinfo ();
bec39cab
AC
9936 ;
9937 return 0;
9938}
9939_ACEOF
81ecdfbb
RW
9940for ac_lib in '' dl xpdl; do
9941 if test -z "$ac_lib"; then
9942 ac_res="none required"
9943 else
9944 ac_res=-l$ac_lib
b4e70030 9945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9946 fi
9947 if ac_fn_c_try_link "$LINENO"; then :
9948 ac_cv_search_dlgetmodinfo=$ac_res
9949fi
9950rm -f core conftest.err conftest.$ac_objext \
9951 conftest$ac_exeext
9952 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9953 break
9954fi
9955done
9956if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9957
4e8d927d 9958else
81ecdfbb 9959 ac_cv_search_dlgetmodinfo=no
1ba607ad 9960fi
81ecdfbb 9961rm conftest.$ac_ext
bec39cab
AC
9962LIBS=$ac_func_search_save_LIBS
9963fi
81ecdfbb
RW
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9965$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9966ac_res=$ac_cv_search_dlgetmodinfo
9967if test "$ac_res" != no; then :
9968 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9969
8bb2c122 9970fi
8bb2c122 9971
8bb2c122 9972
77f120bf 9973
77f120bf 9974
6c7a06a3 9975
81ecdfbb
RW
9976# Check whether --with-libiconv-prefix was given.
9977if test "${with_libiconv_prefix+set}" = set; then :
9978 withval=$with_libiconv_prefix;
6c7a06a3 9979 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9980 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9981 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9982 done
9983
81ecdfbb
RW
9984fi
9985
6c7a06a3 9986
f18c4681 9987 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9988 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9989
81ecdfbb
RW
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9991$as_echo_n "checking for iconv... " >&6; }
9992if test "${am_cv_func_iconv+set}" = set; then :
9993 $as_echo_n "(cached) " >&6
d542061a 9994else
6c7a06a3
TT
9995
9996 am_cv_func_iconv="no, consider installing GNU libiconv"
9997 am_cv_lib_iconv=no
9998 am_cv_use_build_libiconv=no
f0f20949 9999 am_cv_build_libiconv_path=
4edb1e84
JB
10000
10001 # If libiconv is part of the build tree, then try using it over
10002 # any system iconv.
10003 if test -d ../libiconv; then
f18c4681
JB
10004 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
10005 am_save_LIBS="$LIBS"
10006 am_save_CPPFLAGS="$CPPFLAGS"
10007 LIBS="$LIBS $lib_dir/libiconv.a"
10008 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 10010/* end confdefs.h. */
6c7a06a3
TT
10011#include <stdlib.h>
10012#include <iconv.h>
d542061a
UW
10013int
10014main ()
10015{
6c7a06a3 10016iconv_t cd = iconv_open("","");
f18c4681
JB
10017 iconv(cd,NULL,NULL,NULL,NULL);
10018 iconv_close(cd);
d542061a
UW
10019 ;
10020 return 0;
10021}
10022_ACEOF
81ecdfbb 10023if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10024 am_cv_use_build_libiconv=yes
f0f20949 10025 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
10026 am_cv_lib_iconv=yes
10027 am_cv_func_iconv=yes
d542061a 10028fi
81ecdfbb
RW
10029rm -f core conftest.err conftest.$ac_objext \
10030 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
10031 LIBS="$am_save_LIBS"
10032 CPPFLAGS="$am_save_CPPFLAGS"
10033 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
10034 break
10035 fi
10036 done
4edb1e84 10037 fi
94ae1714 10038
4edb1e84 10039 # Next, try to find iconv in libc.
6c7a06a3 10040 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 10041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 10042/* end confdefs.h. */
6c7a06a3
TT
10043#include <stdlib.h>
10044#include <iconv.h>
d542061a
UW
10045int
10046main ()
10047{
6c7a06a3
TT
10048iconv_t cd = iconv_open("","");
10049 iconv(cd,NULL,NULL,NULL,NULL);
10050 iconv_close(cd);
d542061a
UW
10051 ;
10052 return 0;
10053}
10054_ACEOF
81ecdfbb 10055if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10056 am_cv_func_iconv=yes
d542061a 10057fi
81ecdfbb
RW
10058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
77f120bf 10060 fi
94ae1714 10061
4edb1e84
JB
10062 # If iconv was not in libc, try -liconv. In this case, arrange to
10063 # look in the libiconv prefix, if it was specified by the user.
10064 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 10065 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
10066 am_save_LIBS="$LIBS"
10067 if test -n "$LIBICONV_INCLUDE"; then
10068 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10069 LIBS="$LIBS $LIBICONV_LIBDIR"
10070 fi
10071 LIBS="$LIBS -liconv"
81ecdfbb 10072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10073/* end confdefs.h. */
6c7a06a3
TT
10074#include <stdlib.h>
10075#include <iconv.h>
bec39cab
AC
10076int
10077main ()
10078{
6c7a06a3
TT
10079iconv_t cd = iconv_open("","");
10080 iconv(cd,NULL,NULL,NULL,NULL);
10081 iconv_close(cd);
bec39cab
AC
10082 ;
10083 return 0;
10084}
10085_ACEOF
81ecdfbb 10086if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 10087 am_cv_lib_iconv=yes
6c7a06a3 10088 am_cv_func_iconv=yes
627af7ea 10089fi
81ecdfbb
RW
10090rm -f core conftest.err conftest.$ac_objext \
10091 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10092 LIBS="$am_save_LIBS"
fc3b640d 10093 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10094 fi
10095
10096fi
81ecdfbb
RW
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
10098$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
10099
10100 # Set the various flags based on the cache variables. We can't rely
10101 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10102 LIBICONV=
10103 if test "$am_cv_lib_iconv" = yes; then
10104 LIBICONV="-liconv"
94ae1714
TT
10105 else
10106 LIBICONV_LIBDIR=
10107 LIBICONV_INCLUDE=
fc3b640d
TT
10108 fi
10109 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 10110 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 10111 LIBICONV_LIBDIR=""
fc3b640d
TT
10112 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10113 fi
10114 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10115 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10116
6c7a06a3
TT
10117 if test "$am_cv_func_iconv" = yes; then
10118
81ecdfbb 10119$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 10120
81ecdfbb
RW
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
10122$as_echo_n "checking for iconv declaration... " >&6; }
10123 if test "${am_cv_proto_iconv+set}" = set; then :
10124 $as_echo_n "(cached) " >&6
6c7a06a3
TT
10125else
10126
81ecdfbb 10127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
10128/* end confdefs.h. */
10129
6c7a06a3
TT
10130#include <stdlib.h>
10131#include <iconv.h>
10132extern
b4e70030 10133#ifdef __cplusplus
6c7a06a3 10134"C"
b4e70030 10135#endif
6c7a06a3
TT
10136#if defined(__STDC__) || defined(__cplusplus)
10137size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10138#else
10139size_t iconv();
10140#endif
10141
b4e70030
JB
10142int
10143main ()
10144{
6c7a06a3 10145
b4e70030
JB
10146 ;
10147 return 0;
10148}
10149_ACEOF
81ecdfbb 10150if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 10151 am_cv_proto_iconv_arg1=""
4e8d927d 10152else
81ecdfbb 10153 am_cv_proto_iconv_arg1="const"
b4e70030 10154fi
81ecdfbb 10155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
10156 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);"
10157fi
10158
10159 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 10161 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
10162$as_echo "${ac_t:-
10163 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
10164
10165cat >>confdefs.h <<_ACEOF
10166#define ICONV_CONST $am_cv_proto_iconv_arg1
10167_ACEOF
10168
10169 fi
6c7a06a3
TT
10170
10171
478aac75
DE
10172# GDB may fork/exec the iconv program to get the list of supported character
10173# sets. Allow the user to specify where to find it.
10174# There are several factors affecting the choice of option name:
10175# - There is already --with-libiconv-prefix but we can't use it, it specifies
10176# the build-time location of libiconv files.
10177# - The program we need to find is iconv, which comes with glibc. The user
10178# doesn't necessarily have libiconv installed. Therefore naming this
10179# --with-libiconv-foo feels wrong.
10180# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
10181# defined to work on directories not files (though it really doesn't know
10182# the difference).
10183# - Calling this --with-iconv-prefix is perceived to cause too much confusion
10184# with --with-libiconv-prefix.
10185# Putting these together is why the option name is --with-iconv-bin.
10186
10187
10188# Check whether --with-iconv-bin was given.
10189if test "${with_iconv_bin+set}" = set; then :
10190 withval=$with_iconv_bin; iconv_bin="${withval}"
10191
10192cat >>confdefs.h <<_ACEOF
10193#define ICONV_BIN "${iconv_bin}"
10194_ACEOF
10195
10196
10197 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10198 if test "x$prefix" = xNONE; then
10199 test_prefix=/usr/local
10200 else
10201 test_prefix=$prefix
10202 fi
10203 else
10204 test_prefix=$exec_prefix
10205 fi
10206 value=0
10207 case ${iconv_bin} in
10208 "${test_prefix}"|"${test_prefix}/"*|\
10209 '${exec_prefix}'|'${exec_prefix}/'*)
10210 value=1
10211 ;;
10212 esac
10213
10214cat >>confdefs.h <<_ACEOF
10215#define ICONV_BIN_RELOCATABLE $value
10216_ACEOF
10217
10218
10219
10220fi
10221
10222
6c7a06a3
TT
10223# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10224# There is a very specific comment in /usr/include/curses.h explaining that
10225# termcap routines built into libcurses must not be used.
10226#
10227# The symptoms we observed so far is GDB unexpectedly changing
10228# the terminal settings when tgetent is called - this is particularly
10229# visible as the output is missing carriage returns, and so rapidly
10230# becomes very hard to read.
10231#
10232# The readline configure script has already decided that libtermcap
10233# was enough for its purposes, and so decided to build readline using
10234# libtermcap. Since the TUI mode requires curses, building GDB with
10235# TUI enabled results in both libraries to be used at the same time,
10236# which is not allowed. This basically means that GDB with TUI is
10237# broken on alpha-osf.
10238
10239case $host_os in
6bcc772d
RO
10240 osf* )
10241 if test x"$enable_tui" = xyes; then
81ecdfbb 10242 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 10243 fi
6bcc772d 10244 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
10245 enable_tui=no
10246 fi
10247 ;;
10248esac
10249
cb01cfba 10250# For the TUI, we need enhanced curses functionality.
bd8a8e1b 10251if test x"$enable_tui" != xno; then
cb01cfba
JB
10252 prefer_curses=yes
10253fi
10254
10255curses_found=no
10256if test x"$prefer_curses" = xyes; then
10257 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10258 # curses library because the latter might not provide all the
10259 # functionality we need. However, this leads to problems on systems
10260 # where the linker searches /usr/local/lib, but the compiler doesn't
10261 # search /usr/local/include, if ncurses is installed in /usr/local. A
10262 # default installation of ncurses on alpha*-dec-osf* will lead to such
10263 # a situation.
81ecdfbb
RW
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
10265$as_echo_n "checking for library containing waddstr... " >&6; }
10266if test "${ac_cv_search_waddstr+set}" = set; then :
10267 $as_echo_n "(cached) " >&6
6c7a06a3
TT
10268else
10269 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10271/* end confdefs.h. */
10272
81ecdfbb
RW
10273/* Override any GCC internal prototype to avoid an error.
10274 Use char because int might match the return type of a GCC
10275 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
10276#ifdef __cplusplus
10277extern "C"
10278#endif
6c7a06a3
TT
10279char waddstr ();
10280int
10281main ()
10282{
81ecdfbb 10283return waddstr ();
6c7a06a3
TT
10284 ;
10285 return 0;
10286}
10287_ACEOF
81ecdfbb
RW
10288for ac_lib in '' ncurses cursesX curses; do
10289 if test -z "$ac_lib"; then
10290 ac_res="none required"
10291 else
10292 ac_res=-l$ac_lib
10293 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10294 fi
10295 if ac_fn_c_try_link "$LINENO"; then :
10296 ac_cv_search_waddstr=$ac_res
10297fi
10298rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext
10300 if test "${ac_cv_search_waddstr+set}" = set; then :
10301 break
10302fi
10303done
10304if test "${ac_cv_search_waddstr+set}" = set; then :
10305
6c7a06a3 10306else
81ecdfbb
RW
10307 ac_cv_search_waddstr=no
10308fi
10309rm conftest.$ac_ext
10310LIBS=$ac_func_search_save_LIBS
10311fi
10312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
10313$as_echo "$ac_cv_search_waddstr" >&6; }
10314ac_res=$ac_cv_search_waddstr
10315if test "$ac_res" != no; then :
10316 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
10317
10318fi
10319
10320
cb01cfba
JB
10321 if test "$ac_cv_search_waddstr" != no; then
10322 curses_found=yes
10323 fi
10324fi
10325
10326# Check whether we should enable the TUI, but only do so if we really
10327# can.
10328if test x"$enable_tui" != xno; then
10329 if test -d $srcdir/tui; then
10330 if test "$curses_found" != no; then
6c7a06a3
TT
10331 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10332 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10333 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10334 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
10335 else
10336 if test x"$enable_tui" = xyes; then
81ecdfbb 10337 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 10338 else
81ecdfbb
RW
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
10340$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
10341 fi
10342 fi
10343 fi
10344fi
10345
10346# Since GDB uses Readline, we need termcap functionality. In many
10347# cases this will be provided by the curses library, but some systems
10348# have a seperate termcap library, or no curses library at all.
10349
10350case $host_os in
10351 cygwin*)
10352 if test -d $srcdir/libtermcap; then
10353 LIBS="../libtermcap/libtermcap.a $LIBS"
10354 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10355 fi ;;
10356 go32* | *djgpp*)
10357 ac_cv_search_tgetent="none required"
10358 ;;
10359 *mingw32*)
10360 ac_cv_search_tgetent="none required"
10361 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10362 ;;
10363esac
10364
10365# These are the libraries checked by Readline.
81ecdfbb
RW
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
10367$as_echo_n "checking for library containing tgetent... " >&6; }
10368if test "${ac_cv_search_tgetent+set}" = set; then :
10369 $as_echo_n "(cached) " >&6
6c7a06a3
TT
10370else
10371 ac_func_search_save_LIBS=$LIBS
81ecdfbb 10372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10373/* end confdefs.h. */
10374
81ecdfbb
RW
10375/* Override any GCC internal prototype to avoid an error.
10376 Use char because int might match the return type of a GCC
10377 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
10378#ifdef __cplusplus
10379extern "C"
10380#endif
6c7a06a3
TT
10381char tgetent ();
10382int
10383main ()
10384{
81ecdfbb 10385return tgetent ();
6c7a06a3
TT
10386 ;
10387 return 0;
10388}
10389_ACEOF
81ecdfbb
RW
10390for ac_lib in '' termcap tinfo curses ncurses; do
10391 if test -z "$ac_lib"; then
10392 ac_res="none required"
10393 else
10394 ac_res=-l$ac_lib
6c7a06a3 10395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
10396 fi
10397 if ac_fn_c_try_link "$LINENO"; then :
10398 ac_cv_search_tgetent=$ac_res
10399fi
10400rm -f core conftest.err conftest.$ac_objext \
10401 conftest$ac_exeext
10402 if test "${ac_cv_search_tgetent+set}" = set; then :
10403 break
10404fi
10405done
10406if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 10407
6c7a06a3 10408else
81ecdfbb 10409 ac_cv_search_tgetent=no
6c7a06a3 10410fi
81ecdfbb 10411rm conftest.$ac_ext
6c7a06a3
TT
10412LIBS=$ac_func_search_save_LIBS
10413fi
81ecdfbb
RW
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
10415$as_echo "$ac_cv_search_tgetent" >&6; }
10416ac_res=$ac_cv_search_tgetent
10417if test "$ac_res" != no; then :
10418 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 10419
06825bd1
MK
10420fi
10421
06825bd1 10422
bec39cab 10423if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 10424 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
10425fi
10426
3841debe 10427
81ecdfbb
RW
10428# Check whether --with-system-readline was given.
10429if test "${with_system_readline+set}" = set; then :
10430 withval=$with_system_readline;
10431fi
6a30b0a5 10432
6a30b0a5
AS
10433
10434if test "$with_system_readline" = yes; then
10435 READLINE=-lreadline
10436 READLINE_DEPS=
10437 READLINE_CFLAGS=
39037522 10438 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
10439else
10440 READLINE='$(READLINE_DIR)/libreadline.a'
10441 READLINE_DEPS='$(READLINE)'
10442 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 10443 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
10444fi
10445
10446
10447
10448
10449
f997c383
SD
10450# Generate jit-reader.h
10451
10452# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
10453TARGET_PTR=
10454
10455# The cast to long int works around a bug in the HP C Compiler
10456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10458# This bug is HP SR number 8606223364.
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
10460$as_echo_n "checking size of unsigned long long... " >&6; }
10461if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
10462 $as_echo_n "(cached) " >&6
10463else
10464 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
10465
10466else
10467 if test "$ac_cv_type_unsigned_long_long" = yes; then
10468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10470{ as_fn_set_status 77
10471as_fn_error "cannot compute sizeof (unsigned long long)
10472See \`config.log' for more details." "$LINENO" 5; }; }
10473 else
10474 ac_cv_sizeof_unsigned_long_long=0
10475 fi
10476fi
10477
10478fi
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
10480$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
10481
10482
10483
10484cat >>confdefs.h <<_ACEOF
10485#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
10486_ACEOF
10487
10488
10489# The cast to long int works around a bug in the HP C Compiler
10490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10492# This bug is HP SR number 8606223364.
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
10494$as_echo_n "checking size of unsigned long... " >&6; }
10495if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
10496 $as_echo_n "(cached) " >&6
10497else
10498 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
10499
10500else
10501 if test "$ac_cv_type_unsigned_long" = yes; then
10502 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10504{ as_fn_set_status 77
10505as_fn_error "cannot compute sizeof (unsigned long)
10506See \`config.log' for more details." "$LINENO" 5; }; }
10507 else
10508 ac_cv_sizeof_unsigned_long=0
10509 fi
10510fi
10511
10512fi
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
10514$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
10515
10516
10517
10518cat >>confdefs.h <<_ACEOF
10519#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
10520_ACEOF
10521
10522
10523# The cast to long int works around a bug in the HP C Compiler
10524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10526# This bug is HP SR number 8606223364.
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
10528$as_echo_n "checking size of unsigned __int128... " >&6; }
10529if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
10530 $as_echo_n "(cached) " >&6
10531else
10532 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
10533
10534else
10535 if test "$ac_cv_type_unsigned___int128" = yes; then
10536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10538{ as_fn_set_status 77
10539as_fn_error "cannot compute sizeof (unsigned __int128)
10540See \`config.log' for more details." "$LINENO" 5; }; }
10541 else
10542 ac_cv_sizeof_unsigned___int128=0
10543 fi
10544fi
10545
10546fi
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
10548$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
10549
10550
10551
10552cat >>confdefs.h <<_ACEOF
10553#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
10554_ACEOF
10555
10556
10557
10558if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
10559 TARGET_PTR="unsigned long"
10560elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
10561 TARGET_PTR="unsigned long long"
10562elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
10563 TARGET_PTR="unsigned __int128"
10564else
10565 TARGET_PTR="unsigned long"
10566fi
10567
10568
10569ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
10570
10571
a2d08b9e
SD
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10573$as_echo_n "checking for library containing dlopen... " >&6; }
10574if test "${ac_cv_search_dlopen+set}" = set; then :
10575 $as_echo_n "(cached) " >&6
10576else
10577 ac_func_search_save_LIBS=$LIBS
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10579/* end confdefs.h. */
10580
10581/* Override any GCC internal prototype to avoid an error.
10582 Use char because int might match the return type of a GCC
10583 builtin and then its argument prototype would still apply. */
10584#ifdef __cplusplus
10585extern "C"
10586#endif
10587char dlopen ();
10588int
10589main ()
10590{
10591return dlopen ();
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596for ac_lib in '' dl; do
10597 if test -z "$ac_lib"; then
10598 ac_res="none required"
10599 else
10600 ac_res=-l$ac_lib
10601 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10602 fi
10603 if ac_fn_c_try_link "$LINENO"; then :
10604 ac_cv_search_dlopen=$ac_res
10605fi
10606rm -f core conftest.err conftest.$ac_objext \
10607 conftest$ac_exeext
10608 if test "${ac_cv_search_dlopen+set}" = set; then :
10609 break
10610fi
10611done
10612if test "${ac_cv_search_dlopen+set}" = set; then :
10613
10614else
10615 ac_cv_search_dlopen=no
10616fi
10617rm conftest.$ac_ext
10618LIBS=$ac_func_search_save_LIBS
10619fi
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10621$as_echo "$ac_cv_search_dlopen" >&6; }
10622ac_res=$ac_cv_search_dlopen
10623if test "$ac_res" != no; then :
10624 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10625
10626fi
10627
10628
39037522 10629
b8e0a31c
SD
10630
10631# Check whether --with-jit-reader-dir was given.
10632if test "${with_jit_reader_dir+set}" = set; then :
10633 withval=$with_jit_reader_dir;
10634 JIT_READER_DIR=$withval
10635else
10636 JIT_READER_DIR=${libdir}/gdb
10637fi
10638
10639
10640 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10641 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10642 ac_define_dir=`eval echo $JIT_READER_DIR`
10643 ac_define_dir=`eval echo $ac_define_dir`
10644
10645cat >>confdefs.h <<_ACEOF
10646#define JIT_READER_DIR "$ac_define_dir"
10647_ACEOF
10648
10649
10650
10651
10652 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10653 if test "x$prefix" = xNONE; then
10654 test_prefix=/usr/local
10655 else
10656 test_prefix=$prefix
10657 fi
10658 else
10659 test_prefix=$exec_prefix
10660 fi
10661 value=0
10662 case ${ac_define_dir} in
10663 "${test_prefix}"|"${test_prefix}/"*|\
10664 '${exec_prefix}'|'${exec_prefix}/'*)
10665 value=1
10666 ;;
10667 esac
10668
10669cat >>confdefs.h <<_ACEOF
10670#define JIT_READER_DIR_RELOCATABLE $value
10671_ACEOF
10672
10673
10674
10675
10676
81ecdfbb
RW
10677# Check whether --with-expat was given.
10678if test "${with_expat+set}" = set; then :
10679 withval=$with_expat;
5c39566f
DJ
10680else
10681 with_expat=auto
81ecdfbb
RW
10682fi
10683
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
10685$as_echo_n "checking whether to use expat... " >&6; }
10686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
10687$as_echo "$with_expat" >&6; }
5c39566f
DJ
10688
10689if test "${with_expat}" = no; then
81ecdfbb
RW
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
10691$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
10692 HAVE_LIBEXPAT=no
10693else
10694
3841debe
DJ
10695 if test "X$prefix" = "XNONE"; then
10696 acl_final_prefix="$ac_default_prefix"
10697 else
10698 acl_final_prefix="$prefix"
10699 fi
10700 if test "X$exec_prefix" = "XNONE"; then
10701 acl_final_exec_prefix='${prefix}'
10702 else
10703 acl_final_exec_prefix="$exec_prefix"
10704 fi
10705 acl_save_prefix="$prefix"
10706 prefix="$acl_final_prefix"
10707 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10708 prefix="$acl_save_prefix"
10709
10710
81ecdfbb
RW
10711# Check whether --with-gnu-ld was given.
10712if test "${with_gnu_ld+set}" = set; then :
10713 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
10714else
10715 with_gnu_ld=no
81ecdfbb
RW
10716fi
10717
3841debe
DJ
10718# Prepare PATH_SEPARATOR.
10719# The user is always right.
10720if test "${PATH_SEPARATOR+set}" != set; then
10721 echo "#! /bin/sh" >conf$$.sh
10722 echo "exit 0" >>conf$$.sh
10723 chmod +x conf$$.sh
10724 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10725 PATH_SEPARATOR=';'
10726 else
10727 PATH_SEPARATOR=:
10728 fi
10729 rm -f conf$$.sh
10730fi
10731ac_prog=ld
10732if test "$GCC" = yes; then
10733 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
10734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
10735$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
10736 case $host in
10737 *-*-mingw*)
10738 # gcc leaves a trailing carriage return which upsets mingw
10739 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10740 *)
10741 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10742 esac
10743 case $ac_prog in
10744 # Accept absolute paths.
10745 [\\/]* | [A-Za-z]:[\\/]*)
10746 re_direlt='/[^/][^/]*/\.\./'
10747 # Canonicalize the path of ld
10748 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10749 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10750 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10751 done
10752 test -z "$LD" && LD="$ac_prog"
10753 ;;
10754 "")
10755 # If it fails, then pretend we aren't using GCC.
10756 ac_prog=ld
10757 ;;
10758 *)
10759 # If it is relative, then search for the first ld in PATH.
10760 with_gnu_ld=unknown
10761 ;;
10762 esac
10763elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10765$as_echo_n "checking for GNU ld... " >&6; }
3841debe 10766else
81ecdfbb
RW
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10768$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 10769fi
81ecdfbb
RW
10770if test "${acl_cv_path_LD+set}" = set; then :
10771 $as_echo_n "(cached) " >&6
3841debe
DJ
10772else
10773 if test -z "$LD"; then
10774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10775 for ac_dir in $PATH; do
10776 test -z "$ac_dir" && ac_dir=.
10777 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10778 acl_cv_path_LD="$ac_dir/$ac_prog"
10779 # Check to see if the program is GNU ld. I'd rather use --version,
10780 # but apparently some GNU ld's only accept -v.
10781 # Break only if it was the GNU/non-GNU ld that we prefer.
10782 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10783 test "$with_gnu_ld" != no && break
10784 else
10785 test "$with_gnu_ld" != yes && break
10786 fi
10787 fi
10788 done
10789 IFS="$ac_save_ifs"
10790else
10791 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10792fi
10793fi
10794
10795LD="$acl_cv_path_LD"
10796if test -n "$LD"; then
81ecdfbb
RW
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10798$as_echo "$LD" >&6; }
3841debe 10799else
81ecdfbb
RW
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
3841debe 10802fi
81ecdfbb
RW
10803test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10805$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10806if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10807 $as_echo_n "(cached) " >&6
3841debe
DJ
10808else
10809 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10810if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10811 acl_cv_prog_gnu_ld=yes
10812else
10813 acl_cv_prog_gnu_ld=no
10814fi
10815fi
81ecdfbb
RW
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10817$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10818with_gnu_ld=$acl_cv_prog_gnu_ld
10819
10820
10821
81ecdfbb
RW
10822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10823$as_echo_n "checking for shared library run path origin... " >&6; }
10824if test "${acl_cv_rpath+set}" = set; then :
10825 $as_echo_n "(cached) " >&6
3841debe
DJ
10826else
10827
10828 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10829 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10830 . ./conftest.sh
10831 rm -f ./conftest.sh
10832 acl_cv_rpath=done
10833
10834fi
81ecdfbb
RW
10835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10836$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10837 wl="$acl_cv_wl"
10838 libext="$acl_cv_libext"
10839 shlibext="$acl_cv_shlibext"
10840 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10841 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10842 hardcode_direct="$acl_cv_hardcode_direct"
10843 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10844 # Check whether --enable-rpath was given.
10845if test "${enable_rpath+set}" = set; then :
10846 enableval=$enable_rpath; :
3841debe
DJ
10847else
10848 enable_rpath=yes
81ecdfbb
RW
10849fi
10850
3841debe
DJ
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860 use_additional=yes
10861
10862 acl_save_prefix="$prefix"
10863 prefix="$acl_final_prefix"
10864 acl_save_exec_prefix="$exec_prefix"
10865 exec_prefix="$acl_final_exec_prefix"
10866
10867 eval additional_includedir=\"$includedir\"
10868 eval additional_libdir=\"$libdir\"
10869
10870 exec_prefix="$acl_save_exec_prefix"
10871 prefix="$acl_save_prefix"
10872
10873
81ecdfbb
RW
10874# Check whether --with-libexpat-prefix was given.
10875if test "${with_libexpat_prefix+set}" = set; then :
10876 withval=$with_libexpat_prefix;
3841debe
DJ
10877 if test "X$withval" = "Xno"; then
10878 use_additional=no
10879 else
10880 if test "X$withval" = "X"; then
10881
10882 acl_save_prefix="$prefix"
10883 prefix="$acl_final_prefix"
10884 acl_save_exec_prefix="$exec_prefix"
10885 exec_prefix="$acl_final_exec_prefix"
10886
10887 eval additional_includedir=\"$includedir\"
10888 eval additional_libdir=\"$libdir\"
10889
10890 exec_prefix="$acl_save_exec_prefix"
10891 prefix="$acl_save_prefix"
10892
10893 else
10894 additional_includedir="$withval/include"
10895 additional_libdir="$withval/lib"
10896 fi
10897 fi
10898
81ecdfbb
RW
10899fi
10900
3841debe
DJ
10901 LIBEXPAT=
10902 LTLIBEXPAT=
10903 INCEXPAT=
10904 rpathdirs=
10905 ltrpathdirs=
10906 names_already_handled=
10907 names_next_round='expat '
10908 while test -n "$names_next_round"; do
10909 names_this_round="$names_next_round"
10910 names_next_round=
10911 for name in $names_this_round; do
10912 already_handled=
10913 for n in $names_already_handled; do
10914 if test "$n" = "$name"; then
10915 already_handled=yes
10916 break
10917 fi
10918 done
10919 if test -z "$already_handled"; then
10920 names_already_handled="$names_already_handled $name"
10921 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10922 eval value=\"\$HAVE_LIB$uppername\"
10923 if test -n "$value"; then
10924 if test "$value" = yes; then
10925 eval value=\"\$LIB$uppername\"
10926 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10927 eval value=\"\$LTLIB$uppername\"
10928 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10929 else
10930 :
10931 fi
10932 else
10933 found_dir=
10934 found_la=
10935 found_so=
10936 found_a=
10937 if test $use_additional = yes; then
10938 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10939 found_dir="$additional_libdir"
10940 found_so="$additional_libdir/lib$name.$shlibext"
10941 if test -f "$additional_libdir/lib$name.la"; then
10942 found_la="$additional_libdir/lib$name.la"
10943 fi
10944 else
10945 if test -f "$additional_libdir/lib$name.$libext"; then
10946 found_dir="$additional_libdir"
10947 found_a="$additional_libdir/lib$name.$libext"
10948 if test -f "$additional_libdir/lib$name.la"; then
10949 found_la="$additional_libdir/lib$name.la"
10950 fi
10951 fi
10952 fi
10953 fi
10954 if test "X$found_dir" = "X"; then
10955 for x in $LDFLAGS $LTLIBEXPAT; do
10956
10957 acl_save_prefix="$prefix"
10958 prefix="$acl_final_prefix"
10959 acl_save_exec_prefix="$exec_prefix"
10960 exec_prefix="$acl_final_exec_prefix"
10961 eval x=\"$x\"
10962 exec_prefix="$acl_save_exec_prefix"
10963 prefix="$acl_save_prefix"
10964
10965 case "$x" in
10966 -L*)
10967 dir=`echo "X$x" | sed -e 's/^X-L//'`
10968 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10969 found_dir="$dir"
10970 found_so="$dir/lib$name.$shlibext"
10971 if test -f "$dir/lib$name.la"; then
10972 found_la="$dir/lib$name.la"
10973 fi
10974 else
10975 if test -f "$dir/lib$name.$libext"; then
10976 found_dir="$dir"
10977 found_a="$dir/lib$name.$libext"
10978 if test -f "$dir/lib$name.la"; then
10979 found_la="$dir/lib$name.la"
10980 fi
10981 fi
10982 fi
10983 ;;
10984 esac
10985 if test "X$found_dir" != "X"; then
10986 break
10987 fi
10988 done
10989 fi
10990 if test "X$found_dir" != "X"; then
10991 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10992 if test "X$found_so" != "X"; then
10993 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10994 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10995 else
10996 haveit=
10997 for x in $ltrpathdirs; do
10998 if test "X$x" = "X$found_dir"; then
10999 haveit=yes
11000 break
11001 fi
11002 done
11003 if test -z "$haveit"; then
11004 ltrpathdirs="$ltrpathdirs $found_dir"
11005 fi
11006 if test "$hardcode_direct" = yes; then
11007 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11008 else
11009 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11010 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11011 haveit=
11012 for x in $rpathdirs; do
11013 if test "X$x" = "X$found_dir"; then
11014 haveit=yes
11015 break
11016 fi
11017 done
11018 if test -z "$haveit"; then
11019 rpathdirs="$rpathdirs $found_dir"
11020 fi
11021 else
11022 haveit=
11023 for x in $LDFLAGS $LIBEXPAT; do
11024
11025 acl_save_prefix="$prefix"
11026 prefix="$acl_final_prefix"
11027 acl_save_exec_prefix="$exec_prefix"
11028 exec_prefix="$acl_final_exec_prefix"
11029 eval x=\"$x\"
11030 exec_prefix="$acl_save_exec_prefix"
11031 prefix="$acl_save_prefix"
11032
11033 if test "X$x" = "X-L$found_dir"; then
11034 haveit=yes
11035 break
11036 fi
11037 done
11038 if test -z "$haveit"; then
11039 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11040 fi
11041 if test "$hardcode_minus_L" != no; then
11042 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11043 else
11044 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11045 fi
11046 fi
11047 fi
11048 fi
11049 else
11050 if test "X$found_a" != "X"; then
11051 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11052 else
11053 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11054 fi
11055 fi
11056 additional_includedir=
11057 case "$found_dir" in
11058 */lib | */lib/)
11059 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11060 additional_includedir="$basedir/include"
11061 ;;
11062 esac
11063 if test "X$additional_includedir" != "X"; then
11064 if test "X$additional_includedir" != "X/usr/include"; then
11065 haveit=
11066 if test "X$additional_includedir" = "X/usr/local/include"; then
11067 if test -n "$GCC"; then
11068 case $host_os in
11069 linux*) haveit=yes;;
11070 esac
11071 fi
11072 fi
11073 if test -z "$haveit"; then
11074 for x in $CPPFLAGS $INCEXPAT; do
11075
11076 acl_save_prefix="$prefix"
11077 prefix="$acl_final_prefix"
11078 acl_save_exec_prefix="$exec_prefix"
11079 exec_prefix="$acl_final_exec_prefix"
11080 eval x=\"$x\"
11081 exec_prefix="$acl_save_exec_prefix"
11082 prefix="$acl_save_prefix"
11083
11084 if test "X$x" = "X-I$additional_includedir"; then
11085 haveit=yes
11086 break
11087 fi
11088 done
11089 if test -z "$haveit"; then
11090 if test -d "$additional_includedir"; then
11091 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11092 fi
11093 fi
11094 fi
11095 fi
11096 fi
11097 if test -n "$found_la"; then
11098 save_libdir="$libdir"
11099 case "$found_la" in
11100 */* | *\\*) . "$found_la" ;;
11101 *) . "./$found_la" ;;
11102 esac
11103 libdir="$save_libdir"
11104 for dep in $dependency_libs; do
11105 case "$dep" in
11106 -L*)
11107 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11108 if test "X$additional_libdir" != "X/usr/lib"; then
11109 haveit=
11110 if test "X$additional_libdir" = "X/usr/local/lib"; then
11111 if test -n "$GCC"; then
11112 case $host_os in
11113 linux*) haveit=yes;;
11114 esac
11115 fi
11116 fi
11117 if test -z "$haveit"; then
11118 haveit=
11119 for x in $LDFLAGS $LIBEXPAT; do
11120
11121 acl_save_prefix="$prefix"
11122 prefix="$acl_final_prefix"
11123 acl_save_exec_prefix="$exec_prefix"
11124 exec_prefix="$acl_final_exec_prefix"
11125 eval x=\"$x\"
11126 exec_prefix="$acl_save_exec_prefix"
11127 prefix="$acl_save_prefix"
11128
11129 if test "X$x" = "X-L$additional_libdir"; then
11130 haveit=yes
11131 break
11132 fi
11133 done
11134 if test -z "$haveit"; then
11135 if test -d "$additional_libdir"; then
11136 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11137 fi
11138 fi
11139 haveit=
11140 for x in $LDFLAGS $LTLIBEXPAT; do
11141
11142 acl_save_prefix="$prefix"
11143 prefix="$acl_final_prefix"
11144 acl_save_exec_prefix="$exec_prefix"
11145 exec_prefix="$acl_final_exec_prefix"
11146 eval x=\"$x\"
11147 exec_prefix="$acl_save_exec_prefix"
11148 prefix="$acl_save_prefix"
11149
11150 if test "X$x" = "X-L$additional_libdir"; then
11151 haveit=yes
11152 break
11153 fi
11154 done
11155 if test -z "$haveit"; then
11156 if test -d "$additional_libdir"; then
11157 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11158 fi
11159 fi
11160 fi
11161 fi
11162 ;;
11163 -R*)
11164 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11165 if test "$enable_rpath" != no; then
11166 haveit=
11167 for x in $rpathdirs; do
11168 if test "X$x" = "X$dir"; then
11169 haveit=yes
11170 break
11171 fi
11172 done
11173 if test -z "$haveit"; then
11174 rpathdirs="$rpathdirs $dir"
11175 fi
11176 haveit=
11177 for x in $ltrpathdirs; do
11178 if test "X$x" = "X$dir"; then
11179 haveit=yes
11180 break
11181 fi
11182 done
11183 if test -z "$haveit"; then
11184 ltrpathdirs="$ltrpathdirs $dir"
11185 fi
11186 fi
11187 ;;
11188 -l*)
11189 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11190 ;;
11191 *.la)
11192 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11193 ;;
11194 *)
11195 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11196 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11197 ;;
81ecdfbb
RW
11198 esac
11199 done
11200 fi
11201 else
11202 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11203 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11204 fi
11205 fi
11206 fi
11207 done
11208 done
11209 if test "X$rpathdirs" != "X"; then
11210 if test -n "$hardcode_libdir_separator"; then
11211 alldirs=
11212 for found_dir in $rpathdirs; do
11213 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11214 done
11215 acl_save_libdir="$libdir"
11216 libdir="$alldirs"
11217 eval flag=\"$hardcode_libdir_flag_spec\"
11218 libdir="$acl_save_libdir"
11219 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11220 else
11221 for found_dir in $rpathdirs; do
11222 acl_save_libdir="$libdir"
11223 libdir="$found_dir"
11224 eval flag=\"$hardcode_libdir_flag_spec\"
11225 libdir="$acl_save_libdir"
11226 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11227 done
11228 fi
11229 fi
11230 if test "X$ltrpathdirs" != "X"; then
11231 for found_dir in $ltrpathdirs; do
11232 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11233 done
11234 fi
a9322a30
TT
11235
11236
81ecdfbb 11237 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 11238
81ecdfbb
RW
11239 for element in $INCEXPAT; do
11240 haveit=
11241 for x in $CPPFLAGS; do
a9322a30 11242
81ecdfbb
RW
11243 acl_save_prefix="$prefix"
11244 prefix="$acl_final_prefix"
11245 acl_save_exec_prefix="$exec_prefix"
11246 exec_prefix="$acl_final_exec_prefix"
11247 eval x=\"$x\"
11248 exec_prefix="$acl_save_exec_prefix"
11249 prefix="$acl_save_prefix"
a8111142 11250
81ecdfbb
RW
11251 if test "X$x" = "X$element"; then
11252 haveit=yes
11253 break
11254 fi
11255 done
11256 if test -z "$haveit"; then
11257 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11258 fi
11259 done
a9322a30
TT
11260
11261
81ecdfbb
RW
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
11263$as_echo_n "checking for libexpat... " >&6; }
11264if test "${ac_cv_libexpat+set}" = set; then :
11265 $as_echo_n "(cached) " >&6
bec39cab 11266else
bec39cab 11267
81ecdfbb
RW
11268 ac_save_LIBS="$LIBS"
11269 LIBS="$LIBS $LIBEXPAT"
11270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11271/* end confdefs.h. */
81ecdfbb
RW
11272#include "expat.h"
11273int
11274main ()
11275{
11276XML_Parser p = XML_ParserCreate (0);
11277 ;
11278 return 0;
11279}
bec39cab 11280_ACEOF
81ecdfbb
RW
11281if ac_fn_c_try_link "$LINENO"; then :
11282 ac_cv_libexpat=yes
c906108c 11283else
81ecdfbb 11284 ac_cv_libexpat=no
bec39cab 11285fi
81ecdfbb
RW
11286rm -f core conftest.err conftest.$ac_objext \
11287 conftest$ac_exeext conftest.$ac_ext
11288 LIBS="$ac_save_LIBS"
c906108c 11289
95ca63c4 11290fi
81ecdfbb
RW
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
11292$as_echo "$ac_cv_libexpat" >&6; }
11293 if test "$ac_cv_libexpat" = yes; then
11294 HAVE_LIBEXPAT=yes
bec39cab 11295
81ecdfbb 11296$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 11297
81ecdfbb
RW
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
11299$as_echo_n "checking how to link with libexpat... " >&6; }
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
11301$as_echo "$LIBEXPAT" >&6; }
11302 else
11303 HAVE_LIBEXPAT=no
11304 CPPFLAGS="$ac_save_CPPFLAGS"
11305 LIBEXPAT=
11306 LTLIBEXPAT=
11307 fi
95ca63c4
CF
11308
11309
11310
7cb9022a
MK
11311
11312
bec39cab 11313
81ecdfbb
RW
11314 if test "$HAVE_LIBEXPAT" != yes; then
11315 if test "$with_expat" = yes; then
11316 as_fn_error "expat is missing or unusable" "$LINENO" 5
11317 else
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11319$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11320 fi
11321 else
11322 save_LIBS=$LIBS
11323 LIBS="$LIBS $LIBEXPAT"
11324 for ac_func in XML_StopParser
11325do :
11326 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
11327if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 11328 cat >>confdefs.h <<_ACEOF
81ecdfbb 11329#define HAVE_XML_STOPPARSER 1
bec39cab 11330_ACEOF
95ca63c4 11331
bec39cab 11332fi
bec39cab 11333done
95ca63c4 11334
81ecdfbb
RW
11335 LIBS=$save_LIBS
11336 fi
a9322a30
TT
11337fi
11338
a9322a30 11339
a9322a30
TT
11340
11341
ec685c5e 11342
0c4a4063 11343
81ecdfbb
RW
11344# Check whether --with-python was given.
11345if test "${with_python+set}" = set; then :
11346 withval=$with_python;
bec39cab 11347else
81ecdfbb 11348 with_python=auto
bec39cab 11349fi
bec39cab 11350
81ecdfbb
RW
11351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11352$as_echo_n "checking whether to use python... " >&6; }
11353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11354$as_echo "$with_python" >&6; }
9a156167 11355
81ecdfbb
RW
11356if test "${with_python}" = no; then
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11358$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11359 have_libpython=no
bec39cab 11360else
81ecdfbb 11361 case "${with_python}" in
8c85a4e2 11362 [\\/]* | ?:[\\/]*)
ec685c5e
DE
11363 if test -d ${with_python}; then
11364 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 11365 python_prog="${with_python}/bin/python"
0c4a4063 11366 python_prefix=
9c4ea6c5
JB
11367 # If python does not exit ${with_python}/bin, then try in
11368 # ${with_python}. On Windows/MinGW, this is where the Python
11369 # executable is.
11370 if test ! -x "${python_prog}"; then
11371 python_prog="${with_python}/python"
11372 python_prefix=
11373 fi
e7a30f46 11374 if test ! -x "${python_prog}"; then
ec685c5e
DE
11375 # Fall back to gdb 7.0/7.1 behaviour.
11376 python_prog=missing
0c4a4063 11377 python_prefix=${with_python}
ec685c5e 11378 fi
e7a30f46 11379 elif test -x "${with_python}"; then
ec685c5e
DE
11380 # While we can't run python compiled for $host (unless host == build),
11381 # the user could write a script that provides the needed information,
11382 # so we support that.
ec685c5e 11383 python_prog=${with_python}
0c4a4063 11384 python_prefix=
ec685c5e
DE
11385 else
11386 as_fn_error "invalid value for --with-python" "$LINENO" 5
11387 fi
81ecdfbb 11388 ;;
ec685c5e
DE
11389 */*)
11390 # Disallow --with-python=foo/bar.
81ecdfbb
RW
11391 as_fn_error "invalid value for --with-python" "$LINENO" 5
11392 ;;
ec685c5e
DE
11393 *)
11394 # The user has either specified auto, yes, or the name of the python
11395 # program assumed to be in $PATH.
11396 python_prefix=
11397 case "${with_python}" in
11398 yes | auto)
11399 if test ${build} = ${host}; then
11400 # Extract the first word of "python", so it can be a program name with args.
11401set dummy python; ac_word=$2
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403$as_echo_n "checking for $ac_word... " >&6; }
11404if test "${ac_cv_path_python_prog_path+set}" = set; then :
11405 $as_echo_n "(cached) " >&6
11406else
11407 case $python_prog_path in
11408 [\\/]* | ?:[\\/]*)
11409 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11410 ;;
11411 *)
11412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH
11414do
11415 IFS=$as_save_IFS
11416 test -z "$as_dir" && as_dir=.
11417 for ac_exec_ext in '' $ac_executable_extensions; do
11418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11419 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421 break 2
11422 fi
11423done
11424 done
11425IFS=$as_save_IFS
11426
11427 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11428 ;;
11429esac
11430fi
11431python_prog_path=$ac_cv_path_python_prog_path
11432if test -n "$python_prog_path"; then
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11434$as_echo "$python_prog_path" >&6; }
11435else
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
11438fi
11439
11440
11441 if test "${python_prog_path}" = missing; then
11442 python_prog=missing
11443 else
11444 python_prog=${python_prog_path}
11445 fi
11446 else
11447 # Not much we can do except assume the cross-compiler will find the
11448 # right files.
11449 python_prog=missing
11450 fi
11451 ;;
11452 *)
11453 # While we can't run python compiled for $host (unless host == build),
11454 # the user could write a script that provides the needed information,
11455 # so we support that.
11456 python_prog="${with_python}"
11457 # Extract the first word of "${python_prog}", so it can be a program name with args.
11458set dummy ${python_prog}; ac_word=$2
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11460$as_echo_n "checking for $ac_word... " >&6; }
11461if test "${ac_cv_path_python_prog_path+set}" = set; then :
11462 $as_echo_n "(cached) " >&6
11463else
11464 case $python_prog_path in
11465 [\\/]* | ?:[\\/]*)
11466 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11467 ;;
11468 *)
11469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11470for as_dir in $PATH
11471do
11472 IFS=$as_save_IFS
11473 test -z "$as_dir" && as_dir=.
11474 for ac_exec_ext in '' $ac_executable_extensions; do
11475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11476 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11478 break 2
11479 fi
11480done
11481 done
11482IFS=$as_save_IFS
11483
11484 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11485 ;;
11486esac
11487fi
11488python_prog_path=$ac_cv_path_python_prog_path
11489if test -n "$python_prog_path"; then
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11491$as_echo "$python_prog_path" >&6; }
11492else
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
11495fi
11496
11497
11498 if test "${python_prog_path}" = missing; then
11499 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
11500 fi
11501 ;;
11502 esac
81ecdfbb
RW
11503 esac
11504
ec685c5e 11505 if test "${python_prog}" != missing; then
e7a30f46
DE
11506 # We have a python program to use, but it may be too old.
11507 # Don't flag an error for --with-python=auto (the default).
11508 have_python_config=yes
ec685c5e
DE
11509 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11510 if test $? != 0; then
e7a30f46
DE
11511 have_python_config=failed
11512 if test "${with_python}" != auto; then
11513 as_fn_error "failure running python-config --includes" "$LINENO" 5
11514 fi
ec685c5e
DE
11515 fi
11516 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11517 if test $? != 0; then
e7a30f46
DE
11518 have_python_config=failed
11519 if test "${with_python}" != auto; then
11520 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
11521 fi
ec685c5e 11522 fi
0c4a4063
DE
11523 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11524 if test $? != 0; then
e7a30f46
DE
11525 have_python_config=failed
11526 if test "${with_python}" != auto; then
11527 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
11528 fi
0c4a4063 11529 fi
ec685c5e 11530 else
ac534cba
JB
11531 # We do not have a python executable we can use to determine where
11532 # to find the Python headers and libs. We cannot guess the include
11533 # path from the python_prefix either, because that include path
11534 # depends on the Python version. So, there is nothing much we can
11535 # do except assume that the compiler will be able to find those files.
11536 python_includes=
11537 python_libs=
0c4a4063 11538 have_python_config=no
ec685c5e 11539 fi
bec39cab 11540
ec685c5e
DE
11541 # If we have python-config, only try the configuration it provides.
11542 # Otherwise fallback on the old way of trying different versions of
11543 # python in turn.
81ecdfbb 11544
ec685c5e
DE
11545 have_libpython=no
11546 if test "${have_python_config}" = yes; then
c1039e3c
JB
11547 # Determine the Python version by extracting "-lpython<version>"
11548 # part of the python_libs. <version> is usually X.Y with X and Y
11549 # being decimal numbers, but can also be XY (seen on Windows).
11550 #
11551 # The extraction is performed using sed with a regular expression.
11552 # Initially, the regexp used was using the '?' quantifier to make
11553 # the dot in the version number optional. Unfortunately, this
11554 # does not work with non-GNU versions of sed because, because of
11555 # what looks like a limitation (the '?' quantifier does not work
11556 # with back-references). We work around this limitation by using
11557 # the '*' quantifier instead. It means that, in theory, we might
11558 # match unexpected version strings such as "-lpython2..7", but
11559 # this seems unlikely in practice. And even if that happens,
11560 # an error will be triggered later on, when checking that version
11561 # number.
ec685c5e 11562 python_version=`echo " ${python_libs} " \
c1039e3c 11563 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
11564 case "${python_version}" in
11565 python*)
ec685c5e
DE
11566
11567 version=${python_version}
11568
11569 new_CPPFLAGS=${python_includes}
11570 new_LIBS=${python_libs}
81ecdfbb
RW
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11572$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11573 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11574 save_LIBS=$LIBS
ec685c5e
DE
11575 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11576 LIBS="$LIBS $new_LIBS"
11577 found_usable_python=no
81ecdfbb 11578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11579/* end confdefs.h. */
ac534cba 11580#include "Python.h"
81ecdfbb
RW
11581int
11582main ()
11583{
11584Py_Initialize ();
11585 ;
11586 return 0;
11587}
bec39cab 11588_ACEOF
81ecdfbb 11589if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11590 have_libpython=${version}
11591 found_usable_python=yes
ac534cba
JB
11592 PYTHON_CPPFLAGS=$new_CPPFLAGS
11593 PYTHON_LIBS=$new_LIBS
9a156167 11594fi
81ecdfbb
RW
11595rm -f core conftest.err conftest.$ac_objext \
11596 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11597 CPPFLAGS=$save_CPPFLAGS
11598 LIBS=$save_LIBS
ec685c5e
DE
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11600$as_echo "${found_usable_python}" >&6; }
9a156167 11601
0c4a4063
DE
11602 ;;
11603 *)
ec685c5e 11604 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
11605 ;;
11606 esac
e7a30f46 11607 elif test "${have_python_config}" != failed; then
ec685c5e 11608 if test "${have_libpython}" = no; then
9a156167 11609
420697bb
TT
11610 version=python2.7
11611
11612 new_CPPFLAGS=${python_includes}
11613 new_LIBS="${python_libs} -lpython2.7"
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11615$as_echo_n "checking for ${version}... " >&6; }
11616 save_CPPFLAGS=$CPPFLAGS
11617 save_LIBS=$LIBS
11618 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11619 LIBS="$LIBS $new_LIBS"
11620 found_usable_python=no
11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622/* end confdefs.h. */
ac534cba 11623#include "Python.h"
420697bb
TT
11624int
11625main ()
11626{
11627Py_Initialize ();
11628 ;
11629 return 0;
11630}
11631_ACEOF
11632if ac_fn_c_try_link "$LINENO"; then :
11633 have_libpython=${version}
11634 found_usable_python=yes
ac534cba
JB
11635 PYTHON_CPPFLAGS=$new_CPPFLAGS
11636 PYTHON_LIBS=$new_LIBS
420697bb
TT
11637fi
11638rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11640 CPPFLAGS=$save_CPPFLAGS
11641 LIBS=$save_LIBS
420697bb
TT
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11643$as_echo "${found_usable_python}" >&6; }
11644
11645 fi
11646 if test "${have_libpython}" = no; then
11647
ec685c5e
DE
11648 version=python2.6
11649
11650 new_CPPFLAGS=${python_includes}
11651 new_LIBS="${python_libs} -lpython2.6"
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11653$as_echo_n "checking for ${version}... " >&6; }
11654 save_CPPFLAGS=$CPPFLAGS
11655 save_LIBS=$LIBS
11656 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11657 LIBS="$LIBS $new_LIBS"
11658 found_usable_python=no
11659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11660/* end confdefs.h. */
ac534cba 11661#include "Python.h"
ec685c5e
DE
11662int
11663main ()
11664{
11665Py_Initialize ();
11666 ;
11667 return 0;
11668}
11669_ACEOF
11670if ac_fn_c_try_link "$LINENO"; then :
11671 have_libpython=${version}
11672 found_usable_python=yes
ac534cba
JB
11673 PYTHON_CPPFLAGS=$new_CPPFLAGS
11674 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
11675fi
11676rm -f core conftest.err conftest.$ac_objext \
11677 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11678 CPPFLAGS=$save_CPPFLAGS
11679 LIBS=$save_LIBS
ec685c5e
DE
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11681$as_echo "${found_usable_python}" >&6; }
9a156167 11682
81ecdfbb 11683 fi
ec685c5e 11684 if test ${have_libpython} = no; then
9a156167 11685
81ecdfbb 11686 version=python2.5
9a156167 11687
ec685c5e
DE
11688 new_CPPFLAGS=${python_includes}
11689 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11691$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11692 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11693 save_LIBS=$LIBS
ec685c5e
DE
11694 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11695 LIBS="$LIBS $new_LIBS"
11696 found_usable_python=no
81ecdfbb 11697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11698/* end confdefs.h. */
ac534cba 11699#include "Python.h"
81ecdfbb
RW
11700int
11701main ()
11702{
11703Py_Initialize ();
11704 ;
11705 return 0;
11706}
436868fb 11707_ACEOF
81ecdfbb 11708if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11709 have_libpython=${version}
11710 found_usable_python=yes
ac534cba
JB
11711 PYTHON_CPPFLAGS=$new_CPPFLAGS
11712 PYTHON_LIBS=$new_LIBS
436868fb 11713fi
81ecdfbb
RW
11714rm -f core conftest.err conftest.$ac_objext \
11715 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11716 CPPFLAGS=$save_CPPFLAGS
11717 LIBS=$save_LIBS
ec685c5e
DE
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11719$as_echo "${found_usable_python}" >&6; }
a9322a30 11720
81ecdfbb 11721 fi
ec685c5e 11722 if test ${have_libpython} = no; then
a9322a30 11723
81ecdfbb 11724 version=python2.4
a9322a30 11725
ec685c5e
DE
11726 new_CPPFLAGS=${python_includes}
11727 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11729$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11730 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11731 save_LIBS=$LIBS
ec685c5e
DE
11732 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11733 LIBS="$LIBS $new_LIBS"
11734 found_usable_python=no
81ecdfbb 11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11736/* end confdefs.h. */
ac534cba 11737#include "Python.h"
a9322a30
TT
11738int
11739main ()
11740{
81ecdfbb 11741Py_Initialize ();
a9322a30
TT
11742 ;
11743 return 0;
11744}
436868fb 11745_ACEOF
81ecdfbb 11746if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11747 have_libpython=${version}
11748 found_usable_python=yes
ac534cba
JB
11749 PYTHON_CPPFLAGS=$new_CPPFLAGS
11750 PYTHON_LIBS=$new_LIBS
436868fb 11751fi
81ecdfbb
RW
11752rm -f core conftest.err conftest.$ac_objext \
11753 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11754 CPPFLAGS=$save_CPPFLAGS
11755 LIBS=$save_LIBS
ec685c5e
DE
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11757$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11758
ec685c5e
DE
11759 fi
11760 fi
9c4ea6c5 11761 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
11762
11763$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
11764
9c4ea6c5 11765 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
11766
11767$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
11768
9c4ea6c5 11769 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
11770
11771$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
11772
9c4ea6c5 11773 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
11774
11775$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
11776
81ecdfbb 11777 fi
ec685c5e
DE
11778
11779 if test "${have_libpython}" = no; then
81ecdfbb
RW
11780 case "${with_python}" in
11781 yes)
11782 as_fn_error "python is missing or unusable" "$LINENO" 5
11783 ;;
11784 auto)
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11786$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11787 ;;
11788 *)
11789 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11790 ;;
11791 esac
0c4a4063
DE
11792 else
11793 if test -n "${python_prefix}"; then
11794
11795cat >>confdefs.h <<_ACEOF
11796#define WITH_PYTHON_PATH "${python_prefix}"
11797_ACEOF
11798
11799
11800 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11801 if test "x$prefix" = xNONE; then
11802 test_prefix=/usr/local
11803 else
11804 test_prefix=$prefix
11805 fi
11806 else
11807 test_prefix=$exec_prefix
11808 fi
11809 value=0
11810 case ${python_prefix} in
11811 "${test_prefix}"|"${test_prefix}/"*|\
11812 '${exec_prefix}'|'${exec_prefix}/'*)
11813 value=1
11814 ;;
11815 esac
11816
11817cat >>confdefs.h <<_ACEOF
11818#define PYTHON_PATH_RELOCATABLE $value
11819_ACEOF
11820
11821
11822 fi
81ecdfbb 11823 fi
436868fb 11824fi
436868fb 11825
ec685c5e 11826if test "${have_libpython}" != no; then
436868fb 11827
81ecdfbb 11828$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11829
81ecdfbb
RW
11830 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11831 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11832 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11833 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11834 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11835
81ecdfbb
RW
11836 # Flags needed to compile Python code (taken from python-config --cflags).
11837 # We cannot call python-config directly because it will output whatever was
11838 # used when compiling the Python interpreter itself, including flags which
11839 # would make the python-related objects be compiled differently from the
11840 # rest of GDB (e.g., -O2 and -fPIC).
11841 if test "${GCC}" = yes; then
11842 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11843 fi
436868fb 11844
81ecdfbb
RW
11845 if test "x${tentative_python_cflags}" != x; then
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11847$as_echo_n "checking compiler flags for python code... " >&6; }
11848 for flag in ${tentative_python_cflags}; do
11849 # Check that the compiler accepts it
11850 saved_CFLAGS="$CFLAGS"
11851 CFLAGS="$CFLAGS $flag"
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11853/* end confdefs.h. */
81ecdfbb 11854
a9322a30
TT
11855int
11856main ()
11857{
a9322a30
TT
11858
11859 ;
11860 return 0;
11861}
bec39cab 11862_ACEOF
81ecdfbb
RW
11863if ac_fn_c_try_compile "$LINENO"; then :
11864 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11865fi
81ecdfbb
RW
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867 CFLAGS="$saved_CFLAGS"
11868 done
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11870$as_echo "${PYTHON_CFLAGS}" >&6; }
11871 fi
043b6510
JB
11872
11873 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11874 # #if _SGIAPI
11875 # #define siginfo __siginfo
11876 # #endif
11877 # The problem is that including Python causes some XOPEN macros to be
11878 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11879 # to false. So, we work around this issue by defining siginfo ourself
11880 # though the command-line.
11881 case "$gdb_host" in
11882 irix*) if test "${GCC}" = yes; then
11883 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11884 fi
11885 ;;
11886 esac
81ecdfbb
RW
11887else
11888 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11889 # included.
11890 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11891 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11892 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11893fi
9a156167 11894
9a156167 11895
ac534cba
JB
11896
11897
81ecdfbb
RW
11898# ------------------------- #
11899# Checks for header files. #
11900# ------------------------- #
c890192f 11901
81ecdfbb
RW
11902ac_header_dirent=no
11903for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11904 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11906$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11907if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11908 $as_echo_n "(cached) " >&6
bec39cab 11909else
81ecdfbb 11910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11911/* end confdefs.h. */
81ecdfbb
RW
11912#include <sys/types.h>
11913#include <$ac_hdr>
11914
a9322a30
TT
11915int
11916main ()
11917{
81ecdfbb
RW
11918if ((DIR *) 0)
11919return 0;
a9322a30
TT
11920 ;
11921 return 0;
11922}
bec39cab 11923_ACEOF
81ecdfbb
RW
11924if ac_fn_c_try_compile "$LINENO"; then :
11925 eval "$as_ac_Header=yes"
bec39cab 11926else
81ecdfbb 11927 eval "$as_ac_Header=no"
bec39cab 11928fi
81ecdfbb 11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11930fi
81ecdfbb
RW
11931eval ac_res=\$$as_ac_Header
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11933$as_echo "$ac_res" >&6; }
11934eval as_val=\$$as_ac_Header
11935 if test "x$as_val" = x""yes; then :
11936 cat >>confdefs.h <<_ACEOF
11937#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11938_ACEOF
bec39cab 11939
81ecdfbb
RW
11940ac_header_dirent=$ac_hdr; break
11941fi
bec39cab 11942
81ecdfbb
RW
11943done
11944# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11945if test $ac_header_dirent = dirent.h; then
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11947$as_echo_n "checking for library containing opendir... " >&6; }
11948if test "${ac_cv_search_opendir+set}" = set; then :
11949 $as_echo_n "(cached) " >&6
c890192f 11950else
81ecdfbb
RW
11951 ac_func_search_save_LIBS=$LIBS
11952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11953/* end confdefs.h. */
11954
11955/* Override any GCC internal prototype to avoid an error.
11956 Use char because int might match the return type of a GCC
11957 builtin and then its argument prototype would still apply. */
11958#ifdef __cplusplus
11959extern "C"
11960#endif
11961char opendir ();
11962int
11963main ()
11964{
11965return opendir ();
11966 ;
11967 return 0;
11968}
bec39cab 11969_ACEOF
81ecdfbb
RW
11970for ac_lib in '' dir; do
11971 if test -z "$ac_lib"; then
11972 ac_res="none required"
11973 else
11974 ac_res=-l$ac_lib
11975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11976 fi
11977 if ac_fn_c_try_link "$LINENO"; then :
11978 ac_cv_search_opendir=$ac_res
11979fi
11980rm -f core conftest.err conftest.$ac_objext \
11981 conftest$ac_exeext
11982 if test "${ac_cv_search_opendir+set}" = set; then :
11983 break
11984fi
11985done
11986if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11987
81ecdfbb
RW
11988else
11989 ac_cv_search_opendir=no
11990fi
11991rm conftest.$ac_ext
11992LIBS=$ac_func_search_save_LIBS
11993fi
11994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11995$as_echo "$ac_cv_search_opendir" >&6; }
11996ac_res=$ac_cv_search_opendir
11997if test "$ac_res" != no; then :
11998 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11999
bec39cab 12000fi
81ecdfbb 12001
bec39cab 12002else
81ecdfbb
RW
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12004$as_echo_n "checking for library containing opendir... " >&6; }
12005if test "${ac_cv_search_opendir+set}" = set; then :
12006 $as_echo_n "(cached) " >&6
12007else
12008 ac_func_search_save_LIBS=$LIBS
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12010/* end confdefs.h. */
81ecdfbb
RW
12011
12012/* Override any GCC internal prototype to avoid an error.
12013 Use char because int might match the return type of a GCC
12014 builtin and then its argument prototype would still apply. */
12015#ifdef __cplusplus
12016extern "C"
12017#endif
12018char opendir ();
a9322a30
TT
12019int
12020main ()
12021{
81ecdfbb 12022return opendir ();
a9322a30
TT
12023 ;
12024 return 0;
12025}
bec39cab 12026_ACEOF
81ecdfbb
RW
12027for ac_lib in '' x; do
12028 if test -z "$ac_lib"; then
12029 ac_res="none required"
12030 else
12031 ac_res=-l$ac_lib
12032 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12033 fi
12034 if ac_fn_c_try_link "$LINENO"; then :
12035 ac_cv_search_opendir=$ac_res
12036fi
12037rm -f core conftest.err conftest.$ac_objext \
12038 conftest$ac_exeext
12039 if test "${ac_cv_search_opendir+set}" = set; then :
12040 break
12041fi
12042done
12043if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 12044
81ecdfbb
RW
12045else
12046 ac_cv_search_opendir=no
bec39cab 12047fi
81ecdfbb
RW
12048rm conftest.$ac_ext
12049LIBS=$ac_func_search_save_LIBS
a9322a30 12050fi
81ecdfbb
RW
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12052$as_echo "$ac_cv_search_opendir" >&6; }
12053ac_res=$ac_cv_search_opendir
12054if test "$ac_res" != no; then :
12055 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 12056
81ecdfbb 12057fi
bec39cab 12058
81ecdfbb 12059fi
bec39cab 12060
81ecdfbb
RW
12061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12062$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12063if test "${ac_cv_header_stat_broken+set}" = set; then :
12064 $as_echo_n "(cached) " >&6
9a156167 12065else
81ecdfbb
RW
12066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12067/* end confdefs.h. */
12068#include <sys/types.h>
12069#include <sys/stat.h>
12070
12071#if defined S_ISBLK && defined S_IFDIR
12072extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12073#endif
12074
12075#if defined S_ISBLK && defined S_IFCHR
12076extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12077#endif
12078
12079#if defined S_ISLNK && defined S_IFREG
12080extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12081#endif
12082
12083#if defined S_ISSOCK && defined S_IFREG
12084extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12085#endif
12086
bec39cab 12087_ACEOF
81ecdfbb
RW
12088if ac_fn_c_try_compile "$LINENO"; then :
12089 ac_cv_header_stat_broken=no
12090else
12091 ac_cv_header_stat_broken=yes
12092fi
12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12094fi
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12096$as_echo "$ac_cv_header_stat_broken" >&6; }
12097if test $ac_cv_header_stat_broken = yes; then
9a156167 12098
81ecdfbb 12099$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 12100
bec39cab 12101fi
81ecdfbb
RW
12102
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12104$as_echo_n "checking for ANSI C header files... " >&6; }
12105if test "${ac_cv_header_stdc+set}" = set; then :
12106 $as_echo_n "(cached) " >&6
bec39cab 12107else
81ecdfbb 12108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12109/* end confdefs.h. */
81ecdfbb
RW
12110#include <stdlib.h>
12111#include <stdarg.h>
12112#include <string.h>
12113#include <float.h>
12114
a9322a30
TT
12115int
12116main ()
12117{
a9322a30
TT
12118
12119 ;
12120 return 0;
12121}
bec39cab 12122_ACEOF
81ecdfbb
RW
12123if ac_fn_c_try_compile "$LINENO"; then :
12124 ac_cv_header_stdc=yes
bec39cab 12125else
81ecdfbb 12126 ac_cv_header_stdc=no
a9322a30 12127fi
81ecdfbb 12128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12129
81ecdfbb
RW
12130if test $ac_cv_header_stdc = yes; then
12131 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133/* end confdefs.h. */
12134#include <string.h>
bec39cab 12135
81ecdfbb
RW
12136_ACEOF
12137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12138 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12139
bec39cab 12140else
81ecdfbb
RW
12141 ac_cv_header_stdc=no
12142fi
12143rm -f conftest*
12144
12145fi
12146
12147if test $ac_cv_header_stdc = yes; then
12148 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h. */
12151#include <stdlib.h>
12152
bec39cab 12153_ACEOF
81ecdfbb
RW
12154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12155 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12156
81ecdfbb
RW
12157else
12158 ac_cv_header_stdc=no
12159fi
12160rm -f conftest*
bec39cab 12161
bec39cab 12162fi
81ecdfbb
RW
12163
12164if test $ac_cv_header_stdc = yes; then
12165 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12166 if test "$cross_compiling" = yes; then :
12167 :
bec39cab 12168else
81ecdfbb 12169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12170/* end confdefs.h. */
81ecdfbb
RW
12171#include <ctype.h>
12172#include <stdlib.h>
12173#if ((' ' & 0x0FF) == 0x020)
12174# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12175# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12176#else
12177# define ISLOWER(c) \
12178 (('a' <= (c) && (c) <= 'i') \
12179 || ('j' <= (c) && (c) <= 'r') \
12180 || ('s' <= (c) && (c) <= 'z'))
12181# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12182#endif
12183
12184#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12185int
12186main ()
12187{
81ecdfbb
RW
12188 int i;
12189 for (i = 0; i < 256; i++)
12190 if (XOR (islower (i), ISLOWER (i))
12191 || toupper (i) != TOUPPER (i))
12192 return 2;
a9322a30
TT
12193 return 0;
12194}
bec39cab 12195_ACEOF
81ecdfbb
RW
12196if ac_fn_c_try_run "$LINENO"; then :
12197
bec39cab 12198else
81ecdfbb
RW
12199 ac_cv_header_stdc=no
12200fi
12201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12202 conftest.$ac_objext conftest.beam conftest.$ac_ext
12203fi
bec39cab 12204
bec39cab 12205fi
a9322a30 12206fi
81ecdfbb
RW
12207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12208$as_echo "$ac_cv_header_stdc" >&6; }
12209if test $ac_cv_header_stdc = yes; then
bec39cab 12210
81ecdfbb 12211$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12212
81ecdfbb 12213fi
bec39cab 12214
81ecdfbb
RW
12215# elf_hp.h is for HP/UX 64-bit shared library support.
12216# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12217# unconditionally, so what's the point in checking these?
12218for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12219 thread_db.h gnu/libc-version.h signal.h stddef.h \
12220 stdlib.h string.h memory.h strings.h sys/fault.h \
12221 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12222 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12223 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12224 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 12225 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 12226 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
12227do :
12228 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12229ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12230eval as_val=\$$as_ac_Header
12231 if test "x$as_val" = x""yes; then :
bec39cab 12232 cat >>confdefs.h <<_ACEOF
81ecdfbb 12233#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12234_ACEOF
c906108c 12235
bec39cab 12236fi
81ecdfbb
RW
12237
12238done
12239
12240for ac_header in link.h
12241do :
12242 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
12243# include <sys/types.h>
12244#endif
12245#if HAVE_NLIST_H
12246# include <nlist.h>
a9322a30
TT
12247#endif
12248
81ecdfbb
RW
12249"
12250if test "x$ac_cv_header_link_h" = x""yes; then :
12251 cat >>confdefs.h <<_ACEOF
12252#define HAVE_LINK_H 1
bec39cab 12253_ACEOF
bec39cab 12254
a9322a30 12255fi
bec39cab 12256
81ecdfbb 12257done
c906108c 12258
81ecdfbb
RW
12259for ac_header in sys/proc.h
12260do :
12261 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
12262# include <sys/param.h>
12263#endif
c906108c 12264
81ecdfbb
RW
12265"
12266if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 12267 cat >>confdefs.h <<_ACEOF
81ecdfbb 12268#define HAVE_SYS_PROC_H 1
bec39cab 12269_ACEOF
5ee754fc 12270
bec39cab 12271fi
81ecdfbb
RW
12272
12273done
12274
12275for ac_header in sys/user.h
12276do :
12277 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12278# include <sys/param.h>
a9322a30
TT
12279#endif
12280
81ecdfbb
RW
12281"
12282if test "x$ac_cv_header_sys_user_h" = x""yes; then :
12283 cat >>confdefs.h <<_ACEOF
12284#define HAVE_SYS_USER_H 1
bec39cab 12285_ACEOF
bec39cab 12286
a9322a30 12287fi
bec39cab 12288
81ecdfbb 12289done
5ee754fc 12290
5ee754fc 12291
81ecdfbb
RW
12292# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12293# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12294# think that we don't have <curses.h> if we're using GCC.
12295case $host_os in
12296 solaris2.[789])
12297 if test "$GCC" = yes; then
12298
12299$as_echo "#define _MSE_INT_H 1" >>confdefs.h
12300
12301 fi ;;
12302esac
12303for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
12304do :
12305 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12306ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12307eval as_val=\$$as_ac_Header
12308 if test "x$as_val" = x""yes; then :
bec39cab 12309 cat >>confdefs.h <<_ACEOF
81ecdfbb 12310#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12311_ACEOF
5ee754fc
MK
12312
12313fi
12314
81ecdfbb 12315done
bec39cab 12316
81ecdfbb
RW
12317for ac_header in term.h
12318do :
12319 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12320# include <curses.h>
12321#endif
bec39cab 12322
81ecdfbb
RW
12323"
12324if test "x$ac_cv_header_term_h" = x""yes; then :
12325 cat >>confdefs.h <<_ACEOF
12326#define HAVE_TERM_H 1
a8111142 12327_ACEOF
a8111142 12328
a8111142 12329fi
a8111142 12330
81ecdfbb 12331done
a8111142
TT
12332
12333
81ecdfbb
RW
12334# ------------------------- #
12335# Checks for declarations. #
12336# ------------------------- #
a9322a30 12337
81ecdfbb
RW
12338ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
12339if test "x$ac_cv_have_decl_free" = x""yes; then :
12340 ac_have_decl=1
bec39cab 12341else
81ecdfbb
RW
12342 ac_have_decl=0
12343fi
12344
12345cat >>confdefs.h <<_ACEOF
12346#define HAVE_DECL_FREE $ac_have_decl
bec39cab 12347_ACEOF
81ecdfbb
RW
12348ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
12349if test "x$ac_cv_have_decl_malloc" = x""yes; then :
12350 ac_have_decl=1
12351else
12352 ac_have_decl=0
12353fi
12354
12355cat >>confdefs.h <<_ACEOF
12356#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 12357_ACEOF
81ecdfbb
RW
12358ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
12359if test "x$ac_cv_have_decl_realloc" = x""yes; then :
12360 ac_have_decl=1
bec39cab 12361else
81ecdfbb
RW
12362 ac_have_decl=0
12363fi
bec39cab 12364
81ecdfbb
RW
12365cat >>confdefs.h <<_ACEOF
12366#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 12367_ACEOF
81ecdfbb
RW
12368ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12369if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12370 ac_have_decl=1
12371else
12372 ac_have_decl=0
12373fi
12374
12375cat >>confdefs.h <<_ACEOF
12376#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 12377_ACEOF
81ecdfbb
RW
12378ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12379if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12380 ac_have_decl=1
bec39cab 12381else
81ecdfbb
RW
12382 ac_have_decl=0
12383fi
5ee754fc 12384
81ecdfbb
RW
12385cat >>confdefs.h <<_ACEOF
12386#define HAVE_DECL_STRSTR $ac_have_decl
12387_ACEOF
12388ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
12389if test "x$ac_cv_have_decl_getopt" = x""yes; then :
12390 ac_have_decl=1
12391else
12392 ac_have_decl=0
5ee754fc 12393fi
81ecdfbb
RW
12394
12395cat >>confdefs.h <<_ACEOF
12396#define HAVE_DECL_GETOPT $ac_have_decl
12397_ACEOF
12398ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12399if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
12400 ac_have_decl=1
12401else
12402 ac_have_decl=0
5ee754fc 12403fi
81ecdfbb
RW
12404
12405cat >>confdefs.h <<_ACEOF
12406#define HAVE_DECL_SNPRINTF $ac_have_decl
12407_ACEOF
12408ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12409if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
12410 ac_have_decl=1
12411else
12412 ac_have_decl=0
5ee754fc
MK
12413fi
12414
a9322a30 12415cat >>confdefs.h <<_ACEOF
81ecdfbb 12416#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 12417_ACEOF
5ee754fc 12418
5ee754fc 12419
81ecdfbb
RW
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12421$as_echo_n "checking for LC_MESSAGES... " >&6; }
12422if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
12423 $as_echo_n "(cached) " >&6
bec39cab 12424else
81ecdfbb 12425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12426/* end confdefs.h. */
81ecdfbb 12427#include <locale.h>
a9322a30
TT
12428int
12429main ()
12430{
81ecdfbb 12431return LC_MESSAGES
a9322a30
TT
12432 ;
12433 return 0;
12434}
bec39cab 12435_ACEOF
81ecdfbb
RW
12436if ac_fn_c_try_link "$LINENO"; then :
12437 am_cv_val_LC_MESSAGES=yes
bec39cab 12438else
81ecdfbb
RW
12439 am_cv_val_LC_MESSAGES=no
12440fi
12441rm -f core conftest.err conftest.$ac_objext \
12442 conftest$ac_exeext conftest.$ac_ext
12443fi
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12445$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12446 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12447
81ecdfbb
RW
12448$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12449
12450 fi
12451
12452
12453# ----------------------- #
12454# Checks for structures. #
12455# ----------------------- #
12456
12457ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12458if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
12459
12460cat >>confdefs.h <<_ACEOF
12461#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12462_ACEOF
7eb368b3 12463
81ecdfbb 12464
7eb368b3 12465fi
81ecdfbb
RW
12466ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12467if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 12468
a9322a30
TT
12469cat >>confdefs.h <<_ACEOF
12470#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12471_ACEOF
12472
a9322a30 12473
7eb368b3
NR
12474fi
12475
7eb368b3 12476
a9322a30
TT
12477# ------------------ #
12478# Checks for types. #
12479# ------------------ #
7eb368b3 12480
81ecdfbb
RW
12481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12482$as_echo_n "checking return type of signal handlers... " >&6; }
12483if test "${ac_cv_type_signal+set}" = set; then :
12484 $as_echo_n "(cached) " >&6
bec39cab 12485else
81ecdfbb 12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12487/* end confdefs.h. */
a9322a30
TT
12488#include <sys/types.h>
12489#include <signal.h>
7cb9022a 12490
a9322a30
TT
12491int
12492main ()
12493{
81ecdfbb 12494return *(signal (0, 0)) (0) == 1;
a9322a30
TT
12495 ;
12496 return 0;
12497}
bec39cab 12498_ACEOF
81ecdfbb
RW
12499if ac_fn_c_try_compile "$LINENO"; then :
12500 ac_cv_type_signal=int
bec39cab 12501else
81ecdfbb 12502 ac_cv_type_signal=void
bec39cab 12503fi
81ecdfbb 12504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12505fi
81ecdfbb
RW
12506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12507$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 12508
a9322a30
TT
12509cat >>confdefs.h <<_ACEOF
12510#define RETSIGTYPE $ac_cv_type_signal
12511_ACEOF
5ee754fc 12512
bec39cab 12513
81ecdfbb 12514ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12515#include <sys/socket.h>
12516
81ecdfbb
RW
12517"
12518if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 12519
a9322a30
TT
12520cat >>confdefs.h <<_ACEOF
12521#define HAVE_SOCKLEN_T 1
12522_ACEOF
12523
12524
12525fi
12526
12527
12528# ------------------------------------- #
12529# Checks for compiler characteristics. #
12530# ------------------------------------- #
12531
81ecdfbb
RW
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12533$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12534if test "${ac_cv_c_const+set}" = set; then :
12535 $as_echo_n "(cached) " >&6
a9322a30 12536else
81ecdfbb 12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12538/* end confdefs.h. */
a9322a30
TT
12539
12540int
12541main ()
12542{
12543/* FIXME: Include the comments suggested by Paul. */
12544#ifndef __cplusplus
12545 /* Ultrix mips cc rejects this. */
12546 typedef int charset[2];
81ecdfbb 12547 const charset cs;
a9322a30 12548 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12549 char const *const *pcpcc;
12550 char **ppc;
a9322a30
TT
12551 /* NEC SVR4.0.2 mips cc rejects this. */
12552 struct point {int x, y;};
12553 static struct point const zero = {0,0};
12554 /* AIX XL C 1.02.0.0 rejects this.
12555 It does not let you subtract one const X* pointer from another in
12556 an arm of an if-expression whose if-part is not a constant
12557 expression */
12558 const char *g = "string";
81ecdfbb 12559 pcpcc = &g + (g ? g-g : 0);
a9322a30 12560 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12561 ++pcpcc;
12562 ppc = (char**) pcpcc;
12563 pcpcc = (char const *const *) ppc;
a9322a30
TT
12564 { /* SCO 3.2v4 cc rejects this. */
12565 char *t;
12566 char const *s = 0 ? (char *) 0 : (char const *) 0;
12567
12568 *t++ = 0;
81ecdfbb 12569 if (s) return 0;
a9322a30
TT
12570 }
12571 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12572 int x[] = {25, 17};
12573 const int *foo = &x[0];
12574 ++foo;
12575 }
12576 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12577 typedef const int *iptr;
12578 iptr p = 0;
12579 ++p;
12580 }
12581 { /* AIX XL C 1.02.0.0 rejects this saying
12582 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12583 struct s { int j; const int *ap[3]; };
12584 struct s *b; b->j = 5;
12585 }
12586 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12587 const int foo = 10;
81ecdfbb 12588 if (!foo) return 0;
a9322a30 12589 }
81ecdfbb 12590 return !cs[0] && !zero.x;
a9322a30
TT
12591#endif
12592
12593 ;
12594 return 0;
12595}
bec39cab 12596_ACEOF
81ecdfbb 12597if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12598 ac_cv_c_const=yes
5ee754fc 12599else
81ecdfbb 12600 ac_cv_c_const=no
5ee754fc 12601fi
81ecdfbb 12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12603fi
81ecdfbb
RW
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12605$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12606if test $ac_cv_c_const = no; then
bec39cab 12607
81ecdfbb 12608$as_echo "#define const /**/" >>confdefs.h
bec39cab 12609
5ee754fc 12610fi
bec39cab 12611
81ecdfbb
RW
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12613$as_echo_n "checking for inline... " >&6; }
12614if test "${ac_cv_c_inline+set}" = set; then :
12615 $as_echo_n "(cached) " >&6
bec39cab 12616else
a9322a30
TT
12617 ac_cv_c_inline=no
12618for ac_kw in inline __inline__ __inline; do
81ecdfbb 12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12620/* end confdefs.h. */
a9322a30
TT
12621#ifndef __cplusplus
12622typedef int foo_t;
12623static $ac_kw foo_t static_foo () {return 0; }
12624$ac_kw foo_t foo () {return 0; }
12625#endif
12626
bec39cab 12627_ACEOF
81ecdfbb
RW
12628if ac_fn_c_try_compile "$LINENO"; then :
12629 ac_cv_c_inline=$ac_kw
bec39cab 12630fi
81ecdfbb
RW
12631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12632 test "$ac_cv_c_inline" != no && break
a9322a30 12633done
bec39cab 12634
5ee754fc 12635fi
81ecdfbb
RW
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12637$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12638
a9322a30
TT
12639case $ac_cv_c_inline in
12640 inline | yes) ;;
12641 *)
12642 case $ac_cv_c_inline in
12643 no) ac_val=;;
12644 *) ac_val=$ac_cv_c_inline;;
12645 esac
12646 cat >>confdefs.h <<_ACEOF
12647#ifndef __cplusplus
12648#define inline $ac_val
12649#endif
12650_ACEOF
bec39cab
AC
12651 ;;
12652esac
bec39cab 12653
81ecdfbb
RW
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12655$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12656if test "${ac_cv_c_bigendian+set}" = set; then :
12657 $as_echo_n "(cached) " >&6
bec39cab 12658else
81ecdfbb
RW
12659 ac_cv_c_bigendian=unknown
12660 # See if we're dealing with a universal compiler.
12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12662/* end confdefs.h. */
12663#ifndef __APPLE_CC__
12664 not a universal capable compiler
12665 #endif
12666 typedef int dummy;
12667
12668_ACEOF
12669if ac_fn_c_try_compile "$LINENO"; then :
12670
12671 # Check for potential -arch flags. It is not universal unless
12672 # there are at least two -arch flags with different values.
12673 ac_arch=
12674 ac_prev=
12675 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12676 if test -n "$ac_prev"; then
12677 case $ac_word in
12678 i?86 | x86_64 | ppc | ppc64)
12679 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12680 ac_arch=$ac_word
12681 else
12682 ac_cv_c_bigendian=universal
12683 break
12684 fi
12685 ;;
12686 esac
12687 ac_prev=
12688 elif test "x$ac_word" = "x-arch"; then
12689 ac_prev=arch
12690 fi
12691 done
12692fi
12693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12694 if test $ac_cv_c_bigendian = unknown; then
12695 # See if sys/param.h defines the BYTE_ORDER macro.
12696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12697/* end confdefs.h. */
a9322a30 12698#include <sys/types.h>
81ecdfbb 12699 #include <sys/param.h>
a9322a30
TT
12700
12701int
12702main ()
12703{
81ecdfbb
RW
12704#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12705 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12706 && LITTLE_ENDIAN)
12707 bogus endian macros
12708 #endif
a9322a30
TT
12709
12710 ;
12711 return 0;
12712}
bec39cab 12713_ACEOF
81ecdfbb 12714if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12715 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12717/* end confdefs.h. */
a9322a30 12718#include <sys/types.h>
81ecdfbb 12719 #include <sys/param.h>
a9322a30
TT
12720
12721int
12722main ()
12723{
12724#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12725 not big endian
12726 #endif
a9322a30
TT
12727
12728 ;
12729 return 0;
12730}
bec39cab 12731_ACEOF
81ecdfbb 12732if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12733 ac_cv_c_bigendian=yes
5ee754fc 12734else
81ecdfbb 12735 ac_cv_c_bigendian=no
5ee754fc 12736fi
81ecdfbb
RW
12737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12738fi
12739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12740 fi
12741 if test $ac_cv_c_bigendian = unknown; then
12742 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12744/* end confdefs.h. */
12745#include <limits.h>
bec39cab 12746
81ecdfbb
RW
12747int
12748main ()
12749{
12750#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12751 bogus endian macros
12752 #endif
12753
12754 ;
12755 return 0;
12756}
7eb368b3 12757_ACEOF
81ecdfbb
RW
12758if ac_fn_c_try_compile "$LINENO"; then :
12759 # It does; now see whether it defined to _BIG_ENDIAN or not.
12760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12761/* end confdefs.h. */
81ecdfbb
RW
12762#include <limits.h>
12763
7eb368b3
NR
12764int
12765main ()
12766{
81ecdfbb
RW
12767#ifndef _BIG_ENDIAN
12768 not big endian
12769 #endif
12770
7eb368b3
NR
12771 ;
12772 return 0;
12773}
12774_ACEOF
81ecdfbb 12775if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12776 ac_cv_c_bigendian=yes
81ecdfbb
RW
12777else
12778 ac_cv_c_bigendian=no
a9322a30 12779fi
81ecdfbb 12780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12781fi
81ecdfbb
RW
12782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12783 fi
12784 if test $ac_cv_c_bigendian = unknown; then
12785 # Compile a test program.
12786 if test "$cross_compiling" = yes; then :
12787 # Try to guess by grepping values from an object file.
12788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12789/* end confdefs.h. */
12790short int ascii_mm[] =
12791 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12792 short int ascii_ii[] =
12793 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12794 int use_ascii (int i) {
12795 return ascii_mm[i] + ascii_ii[i];
12796 }
12797 short int ebcdic_ii[] =
12798 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12799 short int ebcdic_mm[] =
12800 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12801 int use_ebcdic (int i) {
12802 return ebcdic_mm[i] + ebcdic_ii[i];
12803 }
12804 extern int foo;
7eb368b3 12805
81ecdfbb
RW
12806int
12807main ()
12808{
12809return use_ascii (foo) == use_ebcdic (foo);
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814if ac_fn_c_try_compile "$LINENO"; then :
12815 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12816 ac_cv_c_bigendian=yes
12817 fi
12818 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12819 if test "$ac_cv_c_bigendian" = unknown; then
12820 ac_cv_c_bigendian=no
12821 else
12822 # finding both strings is unlikely to happen, but who knows?
12823 ac_cv_c_bigendian=unknown
12824 fi
12825 fi
7eb368b3 12826fi
81ecdfbb 12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12828else
81ecdfbb 12829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12830/* end confdefs.h. */
81ecdfbb 12831$ac_includes_default
d3ea6809
MM
12832int
12833main ()
12834{
81ecdfbb
RW
12835
12836 /* Are we little or big endian? From Harbison&Steele. */
12837 union
12838 {
12839 long int l;
12840 char c[sizeof (long int)];
12841 } u;
12842 u.l = 1;
12843 return u.c[sizeof (long int) - 1] == 1;
12844
12845 ;
12846 return 0;
d3ea6809
MM
12847}
12848_ACEOF
81ecdfbb 12849if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12850 ac_cv_c_bigendian=no
d3ea6809 12851else
81ecdfbb 12852 ac_cv_c_bigendian=yes
d3ea6809 12853fi
81ecdfbb
RW
12854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12855 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12856fi
a9322a30 12857
81ecdfbb
RW
12858 fi
12859fi
12860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12861$as_echo "$ac_cv_c_bigendian" >&6; }
12862 case $ac_cv_c_bigendian in #(
12863 yes)
12864 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12865;; #(
12866 no)
12867 ;; #(
12868 universal)
12869
12870$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12871
12872 ;; #(
12873 *)
12874 as_fn_error "unknown endianness
12875 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12876 esac
d3ea6809
MM
12877
12878
a9322a30
TT
12879# ------------------------------ #
12880# Checks for library functions. #
12881# ------------------------------ #
d3ea6809 12882
a9322a30
TT
12883# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12884# for constant arguments. Useless!
81ecdfbb
RW
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12886$as_echo_n "checking for working alloca.h... " >&6; }
12887if test "${ac_cv_working_alloca_h+set}" = set; then :
12888 $as_echo_n "(cached) " >&6
d3ea6809 12889else
81ecdfbb 12890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12891/* end confdefs.h. */
a9322a30 12892#include <alloca.h>
bec39cab
AC
12893int
12894main ()
12895{
a9322a30 12896char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12897 if (p) return 0;
bec39cab
AC
12898 ;
12899 return 0;
12900}
12901_ACEOF
81ecdfbb 12902if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12903 ac_cv_working_alloca_h=yes
bec39cab 12904else
81ecdfbb 12905 ac_cv_working_alloca_h=no
bec39cab 12906fi
81ecdfbb
RW
12907rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
bec39cab 12909fi
81ecdfbb
RW
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12911$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12912if test $ac_cv_working_alloca_h = yes; then
12913
81ecdfbb 12914$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12915
c906108c 12916fi
bec39cab 12917
81ecdfbb
RW
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12919$as_echo_n "checking for alloca... " >&6; }
12920if test "${ac_cv_func_alloca_works+set}" = set; then :
12921 $as_echo_n "(cached) " >&6
bec39cab 12922else
81ecdfbb 12923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12924/* end confdefs.h. */
a9322a30
TT
12925#ifdef __GNUC__
12926# define alloca __builtin_alloca
b4e70030 12927#else
a9322a30
TT
12928# ifdef _MSC_VER
12929# include <malloc.h>
12930# define alloca _alloca
12931# else
81ecdfbb 12932# ifdef HAVE_ALLOCA_H
a9322a30
TT
12933# include <alloca.h>
12934# else
12935# ifdef _AIX
12936 #pragma alloca
12937# else
12938# ifndef alloca /* predefined by HP cc +Olibcalls */
12939char *alloca ();
12940# endif
12941# endif
12942# endif
12943# endif
c906108c 12944#endif
97bf5e38 12945
bec39cab
AC
12946int
12947main ()
12948{
a9322a30 12949char *p = (char *) alloca (1);
81ecdfbb 12950 if (p) return 0;
bec39cab
AC
12951 ;
12952 return 0;
12953}
12954_ACEOF
81ecdfbb 12955if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12956 ac_cv_func_alloca_works=yes
bec39cab 12957else
81ecdfbb 12958 ac_cv_func_alloca_works=no
bec39cab 12959fi
81ecdfbb
RW
12960rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
bec39cab 12962fi
81ecdfbb
RW
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12964$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12965
12966if test $ac_cv_func_alloca_works = yes; then
12967
81ecdfbb 12968$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12969
a9322a30
TT
12970else
12971 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12972# that cause trouble. Some versions do not even contain alloca or
12973# contain a buggy version. If you still want to use their alloca,
12974# use ar to extract alloca.o from them instead of compiling alloca.c.
12975
81ecdfbb 12976ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12977
81ecdfbb 12978$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12979
bec39cab 12980
81ecdfbb
RW
12981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12982$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12983if test "${ac_cv_os_cray+set}" = set; then :
12984 $as_echo_n "(cached) " >&6
a9322a30 12985else
81ecdfbb 12986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12987/* end confdefs.h. */
81ecdfbb 12988#if defined CRAY && ! defined CRAY2
a9322a30
TT
12989webecray
12990#else
12991wenotbecray
12992#endif
12993
12994_ACEOF
12995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12996 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12997 ac_cv_os_cray=yes
12998else
81ecdfbb 12999 ac_cv_os_cray=no
bec39cab 13000fi
81ecdfbb
RW
13001rm -f conftest*
13002
bec39cab 13003fi
81ecdfbb
RW
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13005$as_echo "$ac_cv_os_cray" >&6; }
13006if test $ac_cv_os_cray = yes; then
13007 for ac_func in _getb67 GETB67 getb67; do
13008 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13009ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13010eval as_val=\$$as_ac_var
13011 if test "x$as_val" = x""yes; then :
a9322a30
TT
13012
13013cat >>confdefs.h <<_ACEOF
13014#define CRAY_STACKSEG_END $ac_func
bec39cab 13015_ACEOF
c906108c 13016
a9322a30 13017 break
c906108c
SS
13018fi
13019
a9322a30
TT
13020 done
13021fi
bec39cab 13022
81ecdfbb
RW
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13024$as_echo_n "checking stack direction for C alloca... " >&6; }
13025if test "${ac_cv_c_stack_direction+set}" = set; then :
13026 $as_echo_n "(cached) " >&6
a9322a30 13027else
81ecdfbb 13028 if test "$cross_compiling" = yes; then :
a9322a30 13029 ac_cv_c_stack_direction=0
bec39cab 13030else
81ecdfbb 13031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13032/* end confdefs.h. */
81ecdfbb 13033$ac_includes_default
a9322a30
TT
13034int
13035find_stack_direction ()
b4e70030 13036{
a9322a30
TT
13037 static char *addr = 0;
13038 auto char dummy;
13039 if (addr == 0)
13040 {
13041 addr = &dummy;
13042 return find_stack_direction ();
13043 }
13044 else
13045 return (&dummy > addr) ? 1 : -1;
b4e70030 13046}
b757528f 13047
bec39cab
AC
13048int
13049main ()
13050{
81ecdfbb 13051 return find_stack_direction () < 0;
bec39cab
AC
13052}
13053_ACEOF
81ecdfbb 13054if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13055 ac_cv_c_stack_direction=1
13056else
81ecdfbb 13057 ac_cv_c_stack_direction=-1
a9322a30 13058fi
81ecdfbb
RW
13059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13060 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13061fi
a9322a30 13062
81ecdfbb
RW
13063fi
13064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13065$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
13066cat >>confdefs.h <<_ACEOF
13067#define STACK_DIRECTION $ac_cv_c_stack_direction
13068_ACEOF
13069
13070
13071fi
13072
a9322a30 13073for ac_header in stdlib.h unistd.h
81ecdfbb
RW
13074do :
13075 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13076ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13077eval as_val=\$$as_ac_Header
13078 if test "x$as_val" = x""yes; then :
bec39cab 13079 cat >>confdefs.h <<_ACEOF
81ecdfbb 13080#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13081_ACEOF
b757528f 13082
b757528f 13083fi
bec39cab 13084
a9322a30 13085done
a3828db0 13086
a9322a30 13087for ac_func in getpagesize
81ecdfbb
RW
13088do :
13089 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13090if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 13091 cat >>confdefs.h <<_ACEOF
81ecdfbb 13092#define HAVE_GETPAGESIZE 1
bec39cab 13093_ACEOF
bcb3dc3d 13094
bcb3dc3d
MK
13095fi
13096done
13097
81ecdfbb
RW
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13099$as_echo_n "checking for working mmap... " >&6; }
13100if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
13101 $as_echo_n "(cached) " >&6
a9322a30 13102else
81ecdfbb 13103 if test "$cross_compiling" = yes; then :
a9322a30 13104 ac_cv_func_mmap_fixed_mapped=no
bec39cab 13105else
81ecdfbb 13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13107/* end confdefs.h. */
a9322a30
TT
13108$ac_includes_default
13109/* malloc might have been renamed as rpl_malloc. */
13110#undef malloc
bec39cab 13111
a9322a30
TT
13112/* Thanks to Mike Haertel and Jim Avera for this test.
13113 Here is a matrix of mmap possibilities:
13114 mmap private not fixed
13115 mmap private fixed at somewhere currently unmapped
13116 mmap private fixed at somewhere already mapped
13117 mmap shared not fixed
13118 mmap shared fixed at somewhere currently unmapped
13119 mmap shared fixed at somewhere already mapped
13120 For private mappings, we should verify that changes cannot be read()
13121 back from the file, nor mmap's back from the file at a different
13122 address. (There have been systems where private was not correctly
13123 implemented like the infamous i386 svr4.0, and systems where the
13124 VM page cache was not coherent with the file system buffer cache
13125 like early versions of FreeBSD and possibly contemporary NetBSD.)
13126 For shared mappings, we should conversely verify that changes get
13127 propagated back to all the places they're supposed to be.
bec39cab 13128
a9322a30
TT
13129 Grep wants private fixed already mapped.
13130 The main things grep needs to know about mmap are:
13131 * does it exist and is it safe to write into the mmap'd area
13132 * how to use it (BSD variants) */
8b9cf735 13133
a9322a30
TT
13134#include <fcntl.h>
13135#include <sys/mman.h>
8b9cf735 13136
81ecdfbb 13137#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13138char *malloc ();
a3828db0
MK
13139#endif
13140
a9322a30 13141/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13142#ifndef HAVE_GETPAGESIZE
a9322a30 13143/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 13144# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
13145# define HAVE_SYS_PARAM_H 1
13146# endif
13147
13148# ifdef _SC_PAGESIZE
13149# define getpagesize() sysconf(_SC_PAGESIZE)
13150# else /* no _SC_PAGESIZE */
81ecdfbb 13151# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13152# include <sys/param.h>
13153# ifdef EXEC_PAGESIZE
13154# define getpagesize() EXEC_PAGESIZE
13155# else /* no EXEC_PAGESIZE */
13156# ifdef NBPG
13157# define getpagesize() NBPG * CLSIZE
13158# ifndef CLSIZE
13159# define CLSIZE 1
13160# endif /* no CLSIZE */
13161# else /* no NBPG */
13162# ifdef NBPC
13163# define getpagesize() NBPC
13164# else /* no NBPC */
13165# ifdef PAGESIZE
13166# define getpagesize() PAGESIZE
13167# endif /* PAGESIZE */
13168# endif /* no NBPC */
13169# endif /* no NBPG */
13170# endif /* no EXEC_PAGESIZE */
13171# else /* no HAVE_SYS_PARAM_H */
13172# define getpagesize() 8192 /* punt totally */
13173# endif /* no HAVE_SYS_PARAM_H */
13174# endif /* no _SC_PAGESIZE */
13175
13176#endif /* no HAVE_GETPAGESIZE */
13177
bec39cab
AC
13178int
13179main ()
13180{
a9322a30
TT
13181 char *data, *data2, *data3;
13182 int i, pagesize;
13183 int fd;
13184
13185 pagesize = getpagesize ();
13186
13187 /* First, make a file with some known garbage in it. */
13188 data = (char *) malloc (pagesize);
13189 if (!data)
81ecdfbb 13190 return 1;
a9322a30
TT
13191 for (i = 0; i < pagesize; ++i)
13192 *(data + i) = rand ();
13193 umask (0);
13194 fd = creat ("conftest.mmap", 0600);
13195 if (fd < 0)
81ecdfbb 13196 return 1;
a9322a30 13197 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 13198 return 1;
a9322a30
TT
13199 close (fd);
13200
13201 /* Next, try to mmap the file at a fixed address which already has
13202 something else allocated at it. If we can, also make sure that
13203 we see the same garbage. */
13204 fd = open ("conftest.mmap", O_RDWR);
13205 if (fd < 0)
81ecdfbb 13206 return 1;
a9322a30
TT
13207 data2 = (char *) malloc (2 * pagesize);
13208 if (!data2)
81ecdfbb
RW
13209 return 1;
13210 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
13211 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13212 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 13213 return 1;
a9322a30
TT
13214 for (i = 0; i < pagesize; ++i)
13215 if (*(data + i) != *(data2 + i))
81ecdfbb 13216 return 1;
a9322a30
TT
13217
13218 /* Finally, make sure that changes to the mapped area do not
13219 percolate back to the file as seen by read(). (This is a bug on
13220 some variants of i386 svr4.0.) */
13221 for (i = 0; i < pagesize; ++i)
13222 *(data2 + i) = *(data2 + i) + 1;
13223 data3 = (char *) malloc (pagesize);
13224 if (!data3)
81ecdfbb 13225 return 1;
a9322a30 13226 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 13227 return 1;
a9322a30
TT
13228 for (i = 0; i < pagesize; ++i)
13229 if (*(data + i) != *(data3 + i))
81ecdfbb 13230 return 1;
a9322a30 13231 close (fd);
81ecdfbb 13232 return 0;
bec39cab
AC
13233}
13234_ACEOF
81ecdfbb 13235if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13236 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13237else
81ecdfbb 13238 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13239fi
81ecdfbb
RW
13240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13241 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13242fi
81ecdfbb 13243
a9322a30 13244fi
81ecdfbb
RW
13245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13246$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13247if test $ac_cv_func_mmap_fixed_mapped = yes; then
13248
81ecdfbb 13249$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13250
086ec9eb 13251fi
a9322a30 13252rm -f conftest.mmap
a3828db0 13253
81ecdfbb
RW
13254ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13255if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 13256
a9322a30
TT
13257else
13258
13259cat >>confdefs.h <<_ACEOF
13260#define pid_t int
bec39cab 13261_ACEOF
086ec9eb
MK
13262
13263fi
13264
81ecdfbb
RW
13265for ac_header in vfork.h
13266do :
13267 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13268if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 13269 cat >>confdefs.h <<_ACEOF
81ecdfbb 13270#define HAVE_VFORK_H 1
bec39cab 13271_ACEOF
c906108c
SS
13272
13273fi
a9322a30 13274
a3828db0 13275done
c906108c 13276
a9322a30 13277for ac_func in fork vfork
81ecdfbb
RW
13278do :
13279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13281eval as_val=\$$as_ac_var
13282 if test "x$as_val" = x""yes; then :
a3828db0 13283 cat >>confdefs.h <<_ACEOF
81ecdfbb 13284#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13285_ACEOF
b83266a0 13286
97bf5e38 13287fi
a3828db0 13288done
b83266a0 13289
a9322a30 13290if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13292$as_echo_n "checking for working fork... " >&6; }
13293if test "${ac_cv_func_fork_works+set}" = set; then :
13294 $as_echo_n "(cached) " >&6
a9322a30 13295else
81ecdfbb 13296 if test "$cross_compiling" = yes; then :
a9322a30
TT
13297 ac_cv_func_fork_works=cross
13298else
81ecdfbb
RW
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
13301$ac_includes_default
13302int
13303main ()
13304{
13305
13306 /* By Ruediger Kuhlmann. */
13307 return fork () < 0;
13308
13309 ;
13310 return 0;
13311}
a9322a30 13312_ACEOF
81ecdfbb 13313if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13314 ac_cv_func_fork_works=yes
13315else
81ecdfbb 13316 ac_cv_func_fork_works=no
a9322a30 13317fi
81ecdfbb
RW
13318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13319 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13320fi
81ecdfbb 13321
a9322a30 13322fi
81ecdfbb
RW
13323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13324$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13325
13326else
13327 ac_cv_func_fork_works=$ac_cv_func_fork
13328fi
13329if test "x$ac_cv_func_fork_works" = xcross; then
13330 case $host in
13331 *-*-amigaos* | *-*-msdosdjgpp*)
13332 # Override, as these systems have only a dummy fork() stub
13333 ac_cv_func_fork_works=no
13334 ;;
13335 *)
13336 ac_cv_func_fork_works=yes
13337 ;;
13338 esac
81ecdfbb
RW
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13340$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13341fi
13342ac_cv_func_vfork_works=$ac_cv_func_vfork
13343if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13345$as_echo_n "checking for working vfork... " >&6; }
13346if test "${ac_cv_func_vfork_works+set}" = set; then :
13347 $as_echo_n "(cached) " >&6
a9322a30 13348else
81ecdfbb 13349 if test "$cross_compiling" = yes; then :
a9322a30
TT
13350 ac_cv_func_vfork_works=cross
13351else
81ecdfbb 13352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13353/* end confdefs.h. */
13354/* Thanks to Paul Eggert for this test. */
81ecdfbb 13355$ac_includes_default
a9322a30 13356#include <sys/wait.h>
81ecdfbb 13357#ifdef HAVE_VFORK_H
a9322a30
TT
13358# include <vfork.h>
13359#endif
13360/* On some sparc systems, changes by the child to local and incoming
13361 argument registers are propagated back to the parent. The compiler
13362 is told about this with #include <vfork.h>, but some compilers
13363 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13364 static variable whose address is put into a register that is
13365 clobbered by the vfork. */
13366static void
13367#ifdef __cplusplus
13368sparc_address_test (int arg)
13369# else
13370sparc_address_test (arg) int arg;
13371#endif
13372{
13373 static pid_t child;
13374 if (!child) {
13375 child = vfork ();
13376 if (child < 0) {
13377 perror ("vfork");
13378 _exit(2);
13379 }
13380 if (!child) {
13381 arg = getpid();
13382 write(-1, "", 0);
13383 _exit (arg);
13384 }
13385 }
13386}
13387
13388int
13389main ()
13390{
13391 pid_t parent = getpid ();
13392 pid_t child;
13393
13394 sparc_address_test (0);
13395
13396 child = vfork ();
13397
13398 if (child == 0) {
13399 /* Here is another test for sparc vfork register problems. This
13400 test uses lots of local variables, at least as many local
13401 variables as main has allocated so far including compiler
13402 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13403 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13404 reuse the register of parent for one of the local variables,
13405 since it will think that parent can't possibly be used any more
13406 in this routine. Assigning to the local variable will thus
13407 munge parent in the parent process. */
13408 pid_t
13409 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13410 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13411 /* Convince the compiler that p..p7 are live; otherwise, it might
13412 use the same hardware register for all 8 local variables. */
13413 if (p != p1 || p != p2 || p != p3 || p != p4
13414 || p != p5 || p != p6 || p != p7)
13415 _exit(1);
13416
13417 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13418 from child file descriptors. If the child closes a descriptor
13419 before it execs or exits, this munges the parent's descriptor
13420 as well. Test for this by closing stdout in the child. */
13421 _exit(close(fileno(stdout)) != 0);
13422 } else {
13423 int status;
13424 struct stat st;
13425
13426 while (wait(&status) != child)
13427 ;
81ecdfbb 13428 return (
a9322a30
TT
13429 /* Was there some problem with vforking? */
13430 child < 0
13431
13432 /* Did the child fail? (This shouldn't happen.) */
13433 || status
13434
13435 /* Did the vfork/compiler bug occur? */
13436 || parent != getpid()
13437
13438 /* Did the file descriptor bug occur? */
13439 || fstat(fileno(stdout), &st) != 0
13440 );
13441 }
13442}
13443_ACEOF
81ecdfbb 13444if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13445 ac_cv_func_vfork_works=yes
13446else
81ecdfbb 13447 ac_cv_func_vfork_works=no
a9322a30 13448fi
81ecdfbb
RW
13449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13450 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13451fi
81ecdfbb 13452
a9322a30 13453fi
81ecdfbb
RW
13454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13455$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13456
13457fi;
13458if test "x$ac_cv_func_fork_works" = xcross; then
13459 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13461$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13462fi
13463
13464if test "x$ac_cv_func_vfork_works" = xyes; then
13465
81ecdfbb 13466$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13467
13468else
13469
81ecdfbb 13470$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13471
13472fi
13473if test "x$ac_cv_func_fork_works" = xyes; then
13474
81ecdfbb 13475$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13476
13477fi
13478
7313baad 13479for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 13480 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 13481 sbrk setpgid setpgrp setsid \
a9322a30 13482 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 13483 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 13484 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
13485do :
13486 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13487ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13488eval as_val=\$$as_ac_var
13489 if test "x$as_val" = x""yes; then :
6c7a06a3 13490 cat >>confdefs.h <<_ACEOF
81ecdfbb 13491#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13492_ACEOF
13493
13494fi
13495done
13496
13497
81ecdfbb
RW
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13499$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13500if test "${am_cv_langinfo_codeset+set}" = set; then :
13501 $as_echo_n "(cached) " >&6
6c7a06a3 13502else
81ecdfbb 13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13504/* end confdefs.h. */
13505#include <langinfo.h>
13506int
13507main ()
13508{
13509char* cs = nl_langinfo(CODESET);
bec39cab
AC
13510 ;
13511 return 0;
13512}
13513_ACEOF
81ecdfbb 13514if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13515 am_cv_langinfo_codeset=yes
a4db0f07 13516else
81ecdfbb 13517 am_cv_langinfo_codeset=no
a4db0f07 13518fi
81ecdfbb
RW
13519rm -f core conftest.err conftest.$ac_objext \
13520 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13521
a4db0f07 13522fi
81ecdfbb
RW
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13524$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13525 if test $am_cv_langinfo_codeset = yes; then
13526
81ecdfbb 13527$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13528
6c7a06a3 13529 fi
c906108c 13530
06825bd1 13531
a3828db0
MK
13532# Check the return and argument types of ptrace. No canned test for
13533# this, so roll our own.
13534gdb_ptrace_headers='
13535#if HAVE_SYS_TYPES_H
13536# include <sys/types.h>
13537#endif
13538#if HAVE_SYS_PTRACE_H
13539# include <sys/ptrace.h>
13540#endif
13541#if HAVE_UNISTD_H
13542# include <unistd.h>
13543#endif
13544'
13545# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
13546ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13547"
13548if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13549 ac_have_decl=1
06825bd1 13550else
81ecdfbb 13551 ac_have_decl=0
06825bd1 13552fi
06825bd1 13553
a3828db0 13554cat >>confdefs.h <<_ACEOF
81ecdfbb 13555#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13556_ACEOF
81ecdfbb 13557if test $ac_have_decl = 1; then :
bec39cab 13558
a3828db0 13559else
a3828db0
MK
13560
13561 : ${gdb_cv_func_ptrace_ret='int'}
13562 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13563
06825bd1
MK
13564fi
13565
064ef605
DJ
13566# Check return type. Varargs (used on GNU/Linux) conflict with the
13567# empty argument list, so check for that explicitly.
81ecdfbb
RW
13568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13569$as_echo_n "checking return type of ptrace... " >&6; }
13570if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13571 $as_echo_n "(cached) " >&6
bec39cab 13572else
81ecdfbb 13573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13574/* end confdefs.h. */
a3828db0 13575$gdb_ptrace_headers
bec39cab
AC
13576int
13577main ()
13578{
064ef605
DJ
13579extern long ptrace (enum __ptrace_request, ...);
13580 ;
13581 return 0;
13582}
13583_ACEOF
81ecdfbb 13584if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13585 gdb_cv_func_ptrace_ret='long'
13586else
81ecdfbb 13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13588/* end confdefs.h. */
13589$gdb_ptrace_headers
13590int
13591main ()
13592{
a3828db0 13593extern int ptrace ();
bec39cab
AC
13594 ;
13595 return 0;
13596}
13597_ACEOF
81ecdfbb 13598if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13599 gdb_cv_func_ptrace_ret='int'
70f9f479 13600else
81ecdfbb 13601 gdb_cv_func_ptrace_ret='long'
70f9f479 13602fi
81ecdfbb 13603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13604fi
81ecdfbb 13605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13606fi
81ecdfbb
RW
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13608$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13609
a3828db0
MK
13610cat >>confdefs.h <<_ACEOF
13611#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13612_ACEOF
70f9f479 13613
a3828db0 13614# Check argument types.
81ecdfbb
RW
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13616$as_echo_n "checking types of arguments for ptrace... " >&6; }
13617if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13618 $as_echo_n "(cached) " >&6
bec39cab 13619else
a3828db0 13620
81ecdfbb 13621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13622/* end confdefs.h. */
13623$gdb_ptrace_headers
13624int
13625main ()
13626{
13627extern long ptrace (enum __ptrace_request, ...);
13628 ;
13629 return 0;
13630}
13631_ACEOF
81ecdfbb 13632if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13633 gdb_cv_func_ptrace_args='int,int,long,long'
13634else
064ef605 13635
a3828db0
MK
13636for gdb_arg1 in 'int' 'long'; do
13637 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13638 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 13639 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13641/* end confdefs.h. */
a3828db0 13642$gdb_ptrace_headers
bec39cab
AC
13643int
13644main ()
13645{
a3828db0
MK
13646
13647extern $gdb_cv_func_ptrace_ret
13648 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13649
bec39cab
AC
13650 ;
13651 return 0;
13652}
13653_ACEOF
81ecdfbb 13654if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13655 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13656 break 4;
5c7f2947 13657fi
81ecdfbb 13658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13659 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13661/* end confdefs.h. */
a3828db0 13662$gdb_ptrace_headers
bec39cab
AC
13663int
13664main ()
13665{
a3828db0
MK
13666
13667extern $gdb_cv_func_ptrace_ret
13668 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13669
bec39cab
AC
13670 ;
13671 return 0;
13672}
13673_ACEOF
81ecdfbb 13674if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13675
13676gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13677 break 5;
78434e59 13678fi
81ecdfbb 13679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13680 done
13681 done
13682 done
13683 done
13684done
13685# Provide a safe default value.
13686: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13687
064ef605 13688fi
81ecdfbb 13689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13690fi
81ecdfbb
RW
13691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13692$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13693ac_save_IFS=$IFS; IFS=','
13694set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13695IFS=$ac_save_IFS
13696shift
bec39cab 13697
a3828db0
MK
13698cat >>confdefs.h <<_ACEOF
13699#define PTRACE_TYPE_ARG3 $3
13700_ACEOF
13701
13702if test -n "$5"; then
13703
13704cat >>confdefs.h <<_ACEOF
13705#define PTRACE_TYPE_ARG5 $5
bec39cab 13706_ACEOF
78434e59
MK
13707
13708fi
13709
a3828db0 13710if test "$cross_compiling" = no; then
81ecdfbb
RW
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13712$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13713if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13714 $as_echo_n "(cached) " >&6
a3828db0 13715else
81ecdfbb
RW
13716 if test "$cross_compiling" = yes; then :
13717 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13718else
81ecdfbb 13719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13720/* end confdefs.h. */
81ecdfbb 13721$ac_includes_default
bec39cab
AC
13722int
13723main ()
13724{
a3828db0
MK
13725/* If this system has a BSD-style setpgrp which takes arguments,
13726 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13727 exit successfully. */
81ecdfbb 13728 return setpgrp (1,1) != -1;
bec39cab
AC
13729 ;
13730 return 0;
13731}
13732_ACEOF
81ecdfbb 13733if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13734 ac_cv_func_setpgrp_void=no
c906108c 13735else
81ecdfbb 13736 ac_cv_func_setpgrp_void=yes
c906108c 13737fi
81ecdfbb
RW
13738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13739 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13740fi
81ecdfbb 13741
a3828db0 13742fi
81ecdfbb
RW
13743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13744$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13745if test $ac_cv_func_setpgrp_void = yes; then
13746
81ecdfbb 13747$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13748
13749fi
a3828db0
MK
13750
13751else
81ecdfbb
RW
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13753$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13754if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13755 $as_echo_n "(cached) " >&6
97bf5e38 13756else
81ecdfbb 13757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13758/* end confdefs.h. */
a3828db0
MK
13759
13760#include <unistd.h>
13761
bec39cab
AC
13762int
13763main ()
13764{
a3828db0
MK
13765
13766 if (setpgrp(1,1) == -1)
13767 exit (0);
13768 else
13769 exit (1);
13770
bec39cab
AC
13771 ;
13772 return 0;
13773}
13774_ACEOF
81ecdfbb 13775if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13776 ac_cv_func_setpgrp_void=no
c906108c 13777else
81ecdfbb 13778 ac_cv_func_setpgrp_void=yes
c906108c 13779fi
81ecdfbb 13780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13781fi
81ecdfbb
RW
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13783$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13784if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13785 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13786
a3828db0 13787fi
c906108c
SS
13788fi
13789
a3828db0
MK
13790# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13791# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13793$as_echo_n "checking for sigsetjmp... " >&6; }
13794if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13795 $as_echo_n "(cached) " >&6
bec39cab 13796else
81ecdfbb 13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13798/* end confdefs.h. */
a3828db0
MK
13799
13800#include <setjmp.h>
13801
bec39cab
AC
13802int
13803main ()
13804{
a3828db0 13805sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13806 ;
13807 return 0;
13808}
13809_ACEOF
81ecdfbb 13810if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13811 gdb_cv_func_sigsetjmp=yes
c906108c 13812else
81ecdfbb 13813 gdb_cv_func_sigsetjmp=no
c906108c 13814fi
81ecdfbb 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13816fi
81ecdfbb
RW
13817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13818$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13819if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13820
81ecdfbb 13821$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13822
97bf5e38 13823fi
c906108c 13824
a3828db0
MK
13825# Assume we'll default to using the included libiberty regex.
13826gdb_use_included_regex=yes
13827
13828# However, if the system regex is GNU regex, then default to *not*
13829# using the included regex.
81ecdfbb
RW
13830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13831$as_echo_n "checking for GNU regex... " >&6; }
13832if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13833 $as_echo_n "(cached) " >&6
bec39cab 13834else
81ecdfbb 13835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13836/* end confdefs.h. */
a3828db0 13837#include <gnu-versions.h>
bec39cab
AC
13838int
13839main ()
13840{
81ecdfbb
RW
13841#define REGEX_INTERFACE_VERSION 1
13842#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13843# error "Version mismatch"
13844#endif
5c45e068
MK
13845 ;
13846 return 0;
13847}
13848_ACEOF
81ecdfbb
RW
13849if ac_fn_c_try_compile "$LINENO"; then :
13850 gdb_cv_have_gnu_regex=yes
5c45e068 13851else
81ecdfbb
RW
13852 gdb_cv_have_gnu_regex=no
13853fi
13854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13855fi
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13857$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13858if test $gdb_cv_have_gnu_regex = yes; then
13859 gdb_use_included_regex=no
5c45e068 13860fi
81ecdfbb
RW
13861
13862
13863# Check whether --with-included-regex was given.
13864if test "${with_included_regex+set}" = set; then :
13865 withval=$with_included_regex; gdb_with_regex=$withval
13866else
13867 gdb_with_regex=$gdb_use_included_regex
c906108c 13868fi
81ecdfbb
RW
13869
13870if test "$gdb_with_regex" = yes; then
13871
13872$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13873
c906108c 13874fi
81ecdfbb
RW
13875
13876# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13877ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13878#include <sys/proc.h>
13879
13880"
13881if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13882
5c45e068 13883cat >>confdefs.h <<_ACEOF
a3828db0 13884#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13885_ACEOF
c906108c 13886
5c45e068 13887
97bf5e38 13888fi
c906108c 13889
5c45e068 13890
a3828db0 13891# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13893$as_echo_n "checking for struct lwp... " >&6; }
13894if test "${gdb_cv_struct_lwp+set}" = set; then :
13895 $as_echo_n "(cached) " >&6
bec39cab 13896else
81ecdfbb 13897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13898/* end confdefs.h. */
a3828db0
MK
13899#include <sys/param.h>
13900#include <sys/lwp.h>
bec39cab
AC
13901int
13902main ()
13903{
a3828db0 13904struct lwp l;
bec39cab
AC
13905 ;
13906 return 0;
13907}
13908_ACEOF
81ecdfbb 13909if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13910 gdb_cv_struct_lwp=yes
c906108c 13911else
81ecdfbb 13912 gdb_cv_struct_lwp=no
c906108c 13913fi
81ecdfbb 13914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13915fi
81ecdfbb
RW
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13917$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13918if test $gdb_cv_struct_lwp = yes; then
c906108c 13919
81ecdfbb 13920$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13921
97bf5e38 13922fi
c906108c 13923
a3828db0 13924# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13926$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13927if test "${gdb_cv_struct_reg+set}" = set; then :
13928 $as_echo_n "(cached) " >&6
bec39cab 13929else
81ecdfbb 13930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13931/* end confdefs.h. */
a3828db0
MK
13932#include <sys/types.h>
13933#include <machine/reg.h>
bec39cab
AC
13934int
13935main ()
13936{
a3828db0 13937struct reg r;
bec39cab
AC
13938 ;
13939 return 0;
13940}
13941_ACEOF
81ecdfbb 13942if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13943 gdb_cv_struct_reg=yes
27ca5dad 13944else
81ecdfbb 13945 gdb_cv_struct_reg=no
27ca5dad 13946fi
81ecdfbb 13947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13948fi
81ecdfbb
RW
13949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13950$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13951if test $gdb_cv_struct_reg = yes; then
bec39cab 13952
81ecdfbb 13953$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13954
13955fi
97bf5e38 13956
a3828db0
MK
13957# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13958# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13959ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13960"
13961if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13962
13963cat >>confdefs.h <<_ACEOF
a3828db0 13964#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13965_ACEOF
3862412b 13966
5c45e068 13967
97bf5e38 13968fi
81ecdfbb
RW
13969ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13970"
13971if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13972
13973cat >>confdefs.h <<_ACEOF
a3828db0 13974#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13975_ACEOF
3862412b 13976
5c45e068 13977
97bf5e38 13978fi
3862412b 13979
5c45e068 13980
a3828db0 13981# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13983$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13984if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13985 $as_echo_n "(cached) " >&6
451928c5 13986else
81ecdfbb 13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13988/* end confdefs.h. */
a3828db0 13989#include <sys/ptrace.h>
bec39cab
AC
13990int
13991main ()
13992{
a3828db0 13993PTRACE_GETREGS;
bec39cab
AC
13994 ;
13995 return 0;
13996}
13997_ACEOF
81ecdfbb 13998if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13999 gdb_cv_have_ptrace_getregs=yes
451928c5 14000else
81ecdfbb 14001 gdb_cv_have_ptrace_getregs=no
451928c5 14002fi
81ecdfbb 14003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14004fi
14005
81ecdfbb
RW
14006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14007$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14008if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14009
81ecdfbb 14010$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14011
97bf5e38 14012fi
451928c5 14013
a3828db0 14014# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14016$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14017if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
14018 $as_echo_n "(cached) " >&6
451928c5 14019else
81ecdfbb 14020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14021/* end confdefs.h. */
a3828db0 14022#include <sys/ptrace.h>
bec39cab
AC
14023int
14024main ()
14025{
a3828db0 14026PTRACE_GETFPXREGS;
bec39cab
AC
14027 ;
14028 return 0;
14029}
14030_ACEOF
81ecdfbb 14031if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14032 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14033else
81ecdfbb 14034 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14035fi
81ecdfbb 14036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14037fi
14038
81ecdfbb
RW
14039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14040$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14041if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14042
81ecdfbb 14043$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14044
97bf5e38 14045fi
451928c5 14046
a3828db0 14047# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14049$as_echo_n "checking for PT_GETDBREGS... " >&6; }
14050if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
14051 $as_echo_n "(cached) " >&6
3862412b 14052else
81ecdfbb 14053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14054/* end confdefs.h. */
a3828db0
MK
14055#include <sys/types.h>
14056#include <sys/ptrace.h>
bec39cab
AC
14057int
14058main ()
14059{
a3828db0 14060PT_GETDBREGS;
bec39cab
AC
14061 ;
14062 return 0;
14063}
14064_ACEOF
81ecdfbb 14065if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14066 gdb_cv_have_pt_getdbregs=yes
3862412b 14067else
81ecdfbb 14068 gdb_cv_have_pt_getdbregs=no
3862412b 14069fi
81ecdfbb 14070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14071fi
14072
81ecdfbb
RW
14073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14074$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14075if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14076
81ecdfbb 14077$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14078
97bf5e38 14079fi
3862412b 14080
a3828db0 14081# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14083$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14084if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
14085 $as_echo_n "(cached) " >&6
3862412b 14086else
81ecdfbb 14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14088/* end confdefs.h. */
a3828db0
MK
14089#include <sys/types.h>
14090#include <sys/ptrace.h>
bec39cab
AC
14091int
14092main ()
14093{
a3828db0 14094PT_GETXMMREGS;
bec39cab
AC
14095 ;
14096 return 0;
14097}
14098_ACEOF
81ecdfbb 14099if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14100 gdb_cv_have_pt_getxmmregs=yes
3862412b 14101else
81ecdfbb 14102 gdb_cv_have_pt_getxmmregs=no
3862412b 14103fi
81ecdfbb 14104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14105fi
14106
81ecdfbb
RW
14107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14108$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14109if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14110
81ecdfbb 14111$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14112
97bf5e38 14113fi
3862412b 14114
eb368090 14115# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
14116
14117if test "${target}" = "${host}"; then
14118 case "${host}" in
97bf5e38 14119 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 14120
81ecdfbb 14121$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
14122
14123 ;;
c162e8c9 14124 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 14125
81ecdfbb 14126$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
14127
14128 ;;
14129 mips-sgi-irix5*)
14130 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 14131
81ecdfbb 14132$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
14133
14134 ;;
14135 esac
14136fi
14137
14138if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
14140$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
14141 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
14142 $as_echo_n "(cached) " >&6
bec39cab 14143else
81ecdfbb 14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14145/* end confdefs.h. */
596c9d4b
KB
14146
14147#define _SYSCALL32
d30c5336
JK
14148/* Needed for new procfs interface on sparc-solaris. */
14149#define _STRUCTURED_PROC 1
596c9d4b 14150#include <sys/procfs.h>
bec39cab
AC
14151int
14152main ()
14153{
97bf5e38 14154pstatus_t avar
bec39cab
AC
14155 ;
14156 return 0;
14157}
14158_ACEOF
81ecdfbb 14159if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14160 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 14161else
81ecdfbb 14162 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 14163
596c9d4b 14164fi
81ecdfbb 14165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14166fi
14167
97bf5e38 14168 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 14169
81ecdfbb 14170$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
14171
14172 fi
81ecdfbb
RW
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
14174$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 14175
81ecdfbb
RW
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
14177$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
14178 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
14179 $as_echo_n "(cached) " >&6
596c9d4b 14180else
81ecdfbb 14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14182/* end confdefs.h. */
596c9d4b
KB
14183
14184#define _SYSCALL32
d30c5336
JK
14185/* Needed for new procfs interface on sparc-solaris. */
14186#define _STRUCTURED_PROC 1
596c9d4b 14187#include <sys/procfs.h>
bec39cab
AC
14188int
14189main ()
14190{
97bf5e38 14191prrun_t avar
bec39cab
AC
14192 ;
14193 return 0;
14194}
14195_ACEOF
81ecdfbb 14196if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14197 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 14198else
81ecdfbb 14199 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 14200
596c9d4b 14201fi
81ecdfbb 14202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14203fi
14204
97bf5e38 14205 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 14206
81ecdfbb 14207$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
14208
14209 fi
81ecdfbb
RW
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
14211$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 14212
81ecdfbb
RW
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14214$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14215 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
14216 $as_echo_n "(cached) " >&6
596c9d4b 14217else
81ecdfbb 14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14219/* end confdefs.h. */
596c9d4b
KB
14220
14221#define _SYSCALL32
d30c5336
JK
14222/* Needed for new procfs interface on sparc-solaris. */
14223#define _STRUCTURED_PROC 1
596c9d4b 14224#include <sys/procfs.h>
bec39cab
AC
14225int
14226main ()
14227{
97bf5e38 14228gregset_t avar
bec39cab
AC
14229 ;
14230 return 0;
14231}
14232_ACEOF
81ecdfbb 14233if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14234 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14235else
81ecdfbb 14236 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14237
596c9d4b 14238fi
81ecdfbb 14239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14240fi
14241
97bf5e38 14242 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14243
81ecdfbb 14244$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14245
14246 fi
81ecdfbb
RW
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14248$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14249
81ecdfbb
RW
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14251$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14252 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
14253 $as_echo_n "(cached) " >&6
d84dd0c5 14254else
81ecdfbb 14255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14256/* end confdefs.h. */
97bf5e38
MK
14257
14258#define _SYSCALL32
d30c5336
JK
14259/* Needed for new procfs interface on sparc-solaris. */
14260#define _STRUCTURED_PROC 1
d84dd0c5 14261#include <sys/procfs.h>
bec39cab
AC
14262int
14263main ()
14264{
97bf5e38 14265fpregset_t avar
bec39cab
AC
14266 ;
14267 return 0;
14268}
14269_ACEOF
81ecdfbb 14270if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14271 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14272else
81ecdfbb 14273 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14274
d84dd0c5 14275fi
81ecdfbb 14276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14277fi
14278
97bf5e38 14279 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14280
81ecdfbb 14281$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14282
97bf5e38 14283 fi
81ecdfbb
RW
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14285$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14286
81ecdfbb
RW
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14288$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14289 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
14290 $as_echo_n "(cached) " >&6
c906108c 14291else
81ecdfbb 14292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14293/* end confdefs.h. */
c906108c 14294
97bf5e38 14295#define _SYSCALL32
d30c5336
JK
14296/* Needed for new procfs interface on sparc-solaris. */
14297#define _STRUCTURED_PROC 1
97bf5e38 14298#include <sys/procfs.h>
bec39cab
AC
14299int
14300main ()
14301{
97bf5e38 14302prgregset_t avar
bec39cab
AC
14303 ;
14304 return 0;
14305}
14306_ACEOF
81ecdfbb 14307if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14308 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14309else
81ecdfbb 14310 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14311
c906108c 14312fi
81ecdfbb 14313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14314fi
14315
97bf5e38 14316 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14317
81ecdfbb 14318$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14319
97bf5e38 14320 fi
81ecdfbb
RW
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14322$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14323
81ecdfbb
RW
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14325$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14326 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
14327 $as_echo_n "(cached) " >&6
d45fe813 14328else
81ecdfbb 14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14330/* end confdefs.h. */
97bf5e38
MK
14331
14332#define _SYSCALL32
d30c5336
JK
14333/* Needed for new procfs interface on sparc-solaris. */
14334#define _STRUCTURED_PROC 1
97bf5e38 14335#include <sys/procfs.h>
bec39cab
AC
14336int
14337main ()
14338{
97bf5e38 14339prfpregset_t avar
bec39cab
AC
14340 ;
14341 return 0;
14342}
14343_ACEOF
81ecdfbb 14344if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14345 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14346else
81ecdfbb 14347 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14348
d45fe813 14349fi
81ecdfbb 14350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14351fi
14352
97bf5e38 14353 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14354
81ecdfbb 14355$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14356
97bf5e38 14357 fi
81ecdfbb
RW
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14359$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14360
81ecdfbb
RW
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14362$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14363 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14364 $as_echo_n "(cached) " >&6
d45fe813 14365else
81ecdfbb 14366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14367/* end confdefs.h. */
97bf5e38
MK
14368
14369#define _SYSCALL32
d30c5336
JK
14370/* Needed for new procfs interface on sparc-solaris. */
14371#define _STRUCTURED_PROC 1
97bf5e38 14372#include <sys/procfs.h>
bec39cab
AC
14373int
14374main ()
14375{
97bf5e38 14376prgregset32_t avar
bec39cab
AC
14377 ;
14378 return 0;
14379}
14380_ACEOF
81ecdfbb 14381if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14382 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14383else
81ecdfbb 14384 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14385
d45fe813 14386fi
81ecdfbb 14387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14388fi
14389
97bf5e38 14390 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14391
81ecdfbb 14392$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14393
97bf5e38 14394 fi
81ecdfbb
RW
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14396$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14397
81ecdfbb
RW
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
14399$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
14400 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
14401 $as_echo_n "(cached) " >&6
d45fe813 14402else
81ecdfbb 14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14404/* end confdefs.h. */
97bf5e38
MK
14405
14406#define _SYSCALL32
d30c5336
JK
14407/* Needed for new procfs interface on sparc-solaris. */
14408#define _STRUCTURED_PROC 1
97bf5e38 14409#include <sys/procfs.h>
bec39cab
AC
14410int
14411main ()
14412{
97bf5e38 14413prfpregset32_t avar
bec39cab
AC
14414 ;
14415 return 0;
14416}
14417_ACEOF
81ecdfbb 14418if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14419 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 14420else
81ecdfbb 14421 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 14422
d45fe813 14423fi
81ecdfbb 14424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14425fi
14426
97bf5e38 14427 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 14428
81ecdfbb 14429$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 14430
97bf5e38 14431 fi
81ecdfbb
RW
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
14433$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 14434
81ecdfbb
RW
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14436$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14437 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14438 $as_echo_n "(cached) " >&6
d45fe813 14439else
81ecdfbb 14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14441/* end confdefs.h. */
97bf5e38 14442
d45fe813 14443#define _SYSCALL32
d30c5336
JK
14444/* Needed for new procfs interface on sparc-solaris. */
14445#define _STRUCTURED_PROC 1
97bf5e38 14446#include <sys/procfs.h>
bec39cab
AC
14447int
14448main ()
14449{
97bf5e38 14450lwpid_t avar
bec39cab
AC
14451 ;
14452 return 0;
14453}
14454_ACEOF
81ecdfbb 14455if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14456 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14457else
81ecdfbb 14458 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14459
d45fe813 14460fi
81ecdfbb 14461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14462fi
14463
97bf5e38 14464 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14465
81ecdfbb 14466$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14467
97bf5e38 14468 fi
81ecdfbb
RW
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14470$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14471
81ecdfbb
RW
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14473$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14474 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14475 $as_echo_n "(cached) " >&6
c906108c 14476else
81ecdfbb 14477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14478/* end confdefs.h. */
c906108c 14479
97bf5e38 14480#define _SYSCALL32
d30c5336
JK
14481/* Needed for new procfs interface on sparc-solaris. */
14482#define _STRUCTURED_PROC 1
97bf5e38 14483#include <sys/procfs.h>
bec39cab
AC
14484int
14485main ()
14486{
97bf5e38 14487psaddr_t avar
bec39cab
AC
14488 ;
14489 return 0;
14490}
14491_ACEOF
81ecdfbb 14492if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14493 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14494else
81ecdfbb 14495 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14496
c906108c 14497fi
81ecdfbb 14498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14499fi
14500
97bf5e38 14501 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14502
81ecdfbb 14503$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14504
97bf5e38 14505 fi
81ecdfbb
RW
14506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14507$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14508
81ecdfbb
RW
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14510$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14511 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14512 $as_echo_n "(cached) " >&6
c906108c 14513else
81ecdfbb 14514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14515/* end confdefs.h. */
c906108c 14516
97bf5e38 14517#define _SYSCALL32
d30c5336
JK
14518/* Needed for new procfs interface on sparc-solaris. */
14519#define _STRUCTURED_PROC 1
97bf5e38 14520#include <sys/procfs.h>
bec39cab
AC
14521int
14522main ()
14523{
97bf5e38 14524prsysent_t avar
bec39cab
AC
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14530 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14531else
81ecdfbb 14532 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14533
c906108c 14534fi
81ecdfbb 14535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14536fi
14537
97bf5e38 14538 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14539
81ecdfbb 14540$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14541
97bf5e38 14542 fi
81ecdfbb
RW
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14544$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14545
81ecdfbb
RW
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14547$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14548 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14549 $as_echo_n "(cached) " >&6
c906108c 14550else
81ecdfbb 14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14552/* end confdefs.h. */
c906108c 14553
97bf5e38 14554#define _SYSCALL32
d30c5336
JK
14555/* Needed for new procfs interface on sparc-solaris. */
14556#define _STRUCTURED_PROC 1
97bf5e38 14557#include <sys/procfs.h>
bec39cab
AC
14558int
14559main ()
14560{
97bf5e38 14561pr_sigset_t avar
bec39cab
AC
14562 ;
14563 return 0;
14564}
14565_ACEOF
81ecdfbb 14566if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14567 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14568else
81ecdfbb 14569 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14570
c906108c 14571fi
81ecdfbb 14572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14573fi
14574
97bf5e38 14575 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14576
81ecdfbb 14577$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14578
97bf5e38 14579 fi
81ecdfbb
RW
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14581$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14582
81ecdfbb
RW
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14584$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14585 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14586 $as_echo_n "(cached) " >&6
c906108c 14587else
81ecdfbb 14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14589/* end confdefs.h. */
c906108c 14590
97bf5e38 14591#define _SYSCALL32
d30c5336
JK
14592/* Needed for new procfs interface on sparc-solaris. */
14593#define _STRUCTURED_PROC 1
97bf5e38 14594#include <sys/procfs.h>
bec39cab
AC
14595int
14596main ()
14597{
97bf5e38 14598pr_sigaction64_t avar
bec39cab
AC
14599 ;
14600 return 0;
14601}
14602_ACEOF
81ecdfbb 14603if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14604 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14605else
81ecdfbb 14606 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14607
c906108c 14608fi
81ecdfbb 14609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14610fi
14611
97bf5e38 14612 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14613
81ecdfbb 14614$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14615
97bf5e38 14616 fi
81ecdfbb
RW
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14618$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14619
81ecdfbb
RW
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14621$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14622 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14623 $as_echo_n "(cached) " >&6
97bf5e38 14624else
81ecdfbb 14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14626/* end confdefs.h. */
97bf5e38
MK
14627
14628#define _SYSCALL32
d30c5336
JK
14629/* Needed for new procfs interface on sparc-solaris. */
14630#define _STRUCTURED_PROC 1
97bf5e38 14631#include <sys/procfs.h>
bec39cab
AC
14632int
14633main ()
14634{
97bf5e38 14635pr_siginfo64_t avar
bec39cab
AC
14636 ;
14637 return 0;
14638}
14639_ACEOF
81ecdfbb 14640if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14641 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14642else
81ecdfbb 14643 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14644
97bf5e38 14645fi
81ecdfbb 14646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14647fi
c906108c 14648
97bf5e38 14649 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14650
81ecdfbb 14651$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14652
97bf5e38 14653 fi
81ecdfbb
RW
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14655$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14656
14657
97bf5e38
MK
14658
14659
14660
97bf5e38 14661 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14663$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14664 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14665 $as_echo_n "(cached) " >&6
c906108c 14666else
81ecdfbb 14667 if test "$cross_compiling" = yes; then :
97bf5e38 14668 gdb_cv_prfpregset_t_broken=yes
c906108c 14669else
81ecdfbb 14670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14671/* end confdefs.h. */
97bf5e38
MK
14672#include <sys/procfs.h>
14673 int main ()
14674 {
14675 if (sizeof (prfpregset_t) == sizeof (void *))
14676 return 1;
14677 return 0;
14678 }
bec39cab 14679_ACEOF
81ecdfbb 14680if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14681 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14682else
14683 gdb_cv_prfpregset_t_broken=yes
c906108c 14684fi
81ecdfbb
RW
14685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14686 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14687fi
81ecdfbb 14688
c906108c
SS
14689fi
14690
81ecdfbb
RW
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14692$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14693 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14694
81ecdfbb 14695$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14696
97bf5e38
MK
14697 fi
14698 fi
c906108c 14699
bec39cab 14700
81ecdfbb
RW
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
14702$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
14703 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
14704 $as_echo_n "(cached) " >&6
c906108c 14705else
81ecdfbb 14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14707/* end confdefs.h. */
97bf5e38
MK
14708#include <unistd.h>
14709#include <sys/types.h>
14710#include <sys/procfs.h>
14711
bec39cab
AC
14712int
14713main ()
14714{
97bf5e38
MK
14715
14716 int dummy;;
14717 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
14718
14719 ;
14720 return 0;
14721}
14722_ACEOF
81ecdfbb 14723if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14724 gdb_cv_have_procfs_piocset=yes
c906108c 14725else
81ecdfbb 14726 gdb_cv_have_procfs_piocset=no
c906108c 14727fi
81ecdfbb 14728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14729fi
97bf5e38 14730
81ecdfbb
RW
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
14732$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 14733 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 14734
81ecdfbb 14735$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
14736
14737 fi
c906108c 14738fi
c906108c 14739
97bf5e38 14740if test ${host} = ${target} ; then
bec39cab 14741
81ecdfbb
RW
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
14743$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
14744 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
14745 $as_echo_n "(cached) " >&6
bec39cab 14746else
81ecdfbb 14747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14748/* end confdefs.h. */
97bf5e38 14749#include <link.h>
bec39cab
AC
14750int
14751main ()
14752{
97bf5e38 14753struct link_map lm; (void) lm.l_addr;
bec39cab
AC
14754 ;
14755 return 0;
14756}
14757_ACEOF
81ecdfbb 14758if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14759 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 14760else
81ecdfbb 14761 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 14762fi
81ecdfbb 14763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14764fi
14765
81ecdfbb
RW
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
14767$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 14768 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 14769
81ecdfbb 14770$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14771
14772 fi
14773
bec39cab 14774
81ecdfbb
RW
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
14776$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
14777 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
14778 $as_echo_n "(cached) " >&6
c906108c 14779else
81ecdfbb 14780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14781/* end confdefs.h. */
97bf5e38
MK
14782#include <sys/types.h>
14783#include <link.h>
bec39cab
AC
14784int
14785main ()
14786{
97bf5e38 14787struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
14788 ;
14789 return 0;
14790}
14791_ACEOF
81ecdfbb 14792if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14793 gdb_cv_have_struct_link_map_with_lm_members=yes
14794else
81ecdfbb 14795 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14796fi
81ecdfbb 14797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14798fi
c906108c 14799
81ecdfbb
RW
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14801$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14802 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14803
81ecdfbb 14804$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14805
14806 fi
14807
bec39cab 14808
81ecdfbb
RW
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14810$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14811 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14812 $as_echo_n "(cached) " >&6
c906108c 14813else
81ecdfbb 14814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14815/* end confdefs.h. */
97bf5e38
MK
14816#include <sys/types.h>
14817#ifdef HAVE_NLIST_H
14818#include <nlist.h>
14819#endif
14820#include <link.h>
bec39cab
AC
14821int
14822main ()
14823{
97bf5e38 14824struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14825 ;
14826 return 0;
14827}
14828_ACEOF
81ecdfbb 14829if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14830 gdb_cv_have_struct_so_map_with_som_members=yes
14831else
81ecdfbb 14832 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14833fi
81ecdfbb 14834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14835fi
c906108c 14836
81ecdfbb
RW
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14838$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14839 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14840
81ecdfbb 14841$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14842
97bf5e38 14843 fi
c906108c 14844
bec39cab 14845
81ecdfbb
RW
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14847$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14848 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14849 $as_echo_n "(cached) " >&6
97bf5e38 14850else
81ecdfbb 14851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14852/* end confdefs.h. */
97bf5e38
MK
14853#define _SYSCALL32
14854#include <sys/link.h>
bec39cab
AC
14855int
14856main ()
14857{
97bf5e38 14858struct link_map32 l;
bec39cab
AC
14859 ;
14860 return 0;
14861}
14862_ACEOF
81ecdfbb 14863if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14864 gdb_cv_have_struct_link_map32=yes
14865else
81ecdfbb 14866 gdb_cv_have_struct_link_map32=no
97bf5e38 14867fi
81ecdfbb 14868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14869fi
c906108c 14870
81ecdfbb
RW
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14872$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14873 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14874
81ecdfbb 14875$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14876
60ca704f 14877
81ecdfbb 14878$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14879
97bf5e38
MK
14880 fi
14881fi
c906108c 14882
bc8bcb4b 14883# Check if the compiler supports the `long long' type.
c906108c 14884
81ecdfbb
RW
14885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14886$as_echo_n "checking for long long support in compiler... " >&6; }
14887if test "${gdb_cv_c_long_long+set}" = set; then :
14888 $as_echo_n "(cached) " >&6
97bf5e38 14889else
81ecdfbb 14890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14891/* end confdefs.h. */
bc8bcb4b 14892extern long long foo;
bec39cab
AC
14893int
14894main ()
14895{
bc8bcb4b 14896switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14897 ;
14898 return 0;
14899}
14900_ACEOF
81ecdfbb 14901if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14902 gdb_cv_c_long_long=yes
14903else
81ecdfbb 14904 gdb_cv_c_long_long=no
97bf5e38 14905fi
81ecdfbb 14906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14907fi
81ecdfbb
RW
14908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14909$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14910if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14911
81ecdfbb 14912$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14913
14914fi
14915
bc8bcb4b 14916# Check if the compiler and runtime support printing long longs.
97bf5e38 14917
81ecdfbb
RW
14918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14919$as_echo_n "checking for long long support in printf... " >&6; }
14920if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14921 $as_echo_n "(cached) " >&6
97bf5e38 14922else
81ecdfbb 14923 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14924 gdb_cv_printf_has_long_long=no
14925else
81ecdfbb 14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14927/* end confdefs.h. */
bc8bcb4b
MK
14928$ac_includes_default
14929int
14930main ()
14931{
14932char buf[32];
97bf5e38
MK
14933 long long l = 0;
14934 l = (l << 16) + 0x0123;
14935 l = (l << 16) + 0x4567;
14936 l = (l << 16) + 0x89ab;
14937 l = (l << 16) + 0xcdef;
14938 sprintf (buf, "0x%016llx", l);
14939 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14940 ;
14941 return 0;
c906108c 14942}
bec39cab 14943_ACEOF
81ecdfbb 14944if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14945 gdb_cv_printf_has_long_long=yes
14946else
81ecdfbb 14947 gdb_cv_printf_has_long_long=no
97bf5e38 14948fi
81ecdfbb
RW
14949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14950 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14951fi
81ecdfbb 14952
97bf5e38 14953fi
81ecdfbb
RW
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14955$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14956if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14957
81ecdfbb 14958$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14959
14960fi
97bf5e38 14961
1a619819
LM
14962# Check if the compiler and runtime support printing decfloats.
14963
81ecdfbb
RW
14964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14965$as_echo_n "checking for decfloat support in printf... " >&6; }
14966if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14967 $as_echo_n "(cached) " >&6
1a619819 14968else
81ecdfbb 14969 if test "$cross_compiling" = yes; then :
1a619819
LM
14970 gdb_cv_printf_has_decfloat=no
14971else
81ecdfbb 14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14973/* end confdefs.h. */
14974$ac_includes_default
14975int
14976main ()
14977{
14978char buf[64];
14979 _Decimal32 d32 = 1.2345df;
14980 _Decimal64 d64 = 1.2345dd;
14981 _Decimal128 d128 = 1.2345dl;
14982 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14983 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14984 ;
14985 return 0;
14986}
14987_ACEOF
81ecdfbb 14988if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14989 gdb_cv_printf_has_decfloat=yes
14990else
81ecdfbb 14991 gdb_cv_printf_has_decfloat=no
1a619819 14992fi
81ecdfbb
RW
14993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14994 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14995fi
81ecdfbb 14996
1a619819 14997fi
81ecdfbb
RW
14998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14999$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
15000if test $gdb_cv_printf_has_decfloat = yes; then
15001
81ecdfbb 15002$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15003
15004fi
15005
bc8bcb4b
MK
15006# Check if the compiler supports the `long double' type. We can't use
15007# AC_C_LONG_DOUBLE because that one does additional checks on the
15008# constants defined in <float.h> that fail on some systems,
15009# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15010
81ecdfbb
RW
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15012$as_echo_n "checking for long double support in compiler... " >&6; }
15013if test "${gdb_cv_c_long_double+set}" = set; then :
15014 $as_echo_n "(cached) " >&6
97bf5e38 15015else
81ecdfbb 15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15017/* end confdefs.h. */
97bf5e38 15018long double foo;
bec39cab 15019_ACEOF
81ecdfbb 15020if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15021 gdb_cv_c_long_double=yes
97bf5e38 15022else
81ecdfbb 15023 gdb_cv_c_long_double=no
97bf5e38 15024fi
81ecdfbb 15025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15026fi
81ecdfbb
RW
15027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15028$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 15029if test $gdb_cv_c_long_double = yes; then
c906108c 15030
81ecdfbb 15031$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15032
15033fi
15034
bc8bcb4b 15035# Check if the compiler and runtime support printing long doubles.
97bf5e38 15036
81ecdfbb
RW
15037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15038$as_echo_n "checking for long double support in printf... " >&6; }
15039if test "${gdb_cv_printf_has_long_double+set}" = set; then :
15040 $as_echo_n "(cached) " >&6
97bf5e38 15041else
81ecdfbb 15042 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15043 gdb_cv_printf_has_long_double=no
15044else
81ecdfbb 15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15046/* end confdefs.h. */
bc8bcb4b
MK
15047$ac_includes_default
15048int
15049main ()
15050{
15051char buf[16];
97bf5e38
MK
15052 long double f = 3.141592653;
15053 sprintf (buf, "%Lg", f);
15054 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15055 ;
15056 return 0;
97bf5e38 15057}
bec39cab 15058_ACEOF
81ecdfbb 15059if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15060 gdb_cv_printf_has_long_double=yes
c906108c 15061else
81ecdfbb 15062 gdb_cv_printf_has_long_double=no
c906108c 15063fi
81ecdfbb
RW
15064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15065 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15066fi
81ecdfbb 15067
c906108c 15068fi
81ecdfbb
RW
15069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15070$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 15071if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 15072
81ecdfbb 15073$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15074
15075fi
97bf5e38 15076
bc8bcb4b 15077# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15078
81ecdfbb
RW
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15080$as_echo_n "checking for long double support in scanf... " >&6; }
15081if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
15082 $as_echo_n "(cached) " >&6
97bf5e38 15083else
81ecdfbb 15084 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15085 gdb_cv_scanf_has_long_double=no
15086else
81ecdfbb 15087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15088/* end confdefs.h. */
bc8bcb4b
MK
15089#include <stdio.h>
15090int
15091main ()
15092{
15093char *buf = "3.141592653";
97bf5e38
MK
15094 long double f = 0;
15095 sscanf (buf, "%Lg", &f);
15096 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15097 ;
15098 return 0;
97bf5e38 15099}
bec39cab 15100_ACEOF
81ecdfbb 15101if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15102 gdb_cv_scanf_has_long_double=yes
15103else
81ecdfbb 15104 gdb_cv_scanf_has_long_double=no
97bf5e38 15105fi
81ecdfbb
RW
15106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15107 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15108fi
81ecdfbb 15109
c906108c 15110fi
81ecdfbb
RW
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15112$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 15113if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 15114
81ecdfbb 15115$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15116
15117fi
c906108c 15118
438013df
AO
15119case ${host_os} in
15120aix*)
81ecdfbb
RW
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15122$as_echo_n "checking for -bbigtoc option... " >&6; }
15123if test "${gdb_cv_bigtoc+set}" = set; then :
15124 $as_echo_n "(cached) " >&6
438013df 15125else
bec39cab 15126
438013df
AO
15127 SAVE_LDFLAGS=$LDFLAGS
15128
15129 case $GCC in
15130 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15131 *) gdb_cv_bigtoc=-bbigtoc ;;
15132 esac
15133
15134 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15136/* end confdefs.h. */
438013df 15137
bec39cab
AC
15138int
15139main ()
15140{
438013df 15141int i;
bec39cab
AC
15142 ;
15143 return 0;
15144}
15145_ACEOF
81ecdfbb 15146if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15147
81ecdfbb
RW
15148else
15149 gdb_cv_bigtoc=
438013df 15150fi
81ecdfbb
RW
15151rm -f core conftest.err conftest.$ac_objext \
15152 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15153 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15154
bec39cab 15155fi
81ecdfbb
RW
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15157$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15158 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15159 ;;
15160esac
15161
38f6b338 15162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15163$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15164dynamic_list=false
15165if test "${gdb_native}" = yes; then
15166 # The dynamically loaded libthread_db needs access to symbols in the gdb
15167 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15168 # may not be supported there.
15169 old_LDFLAGS="$LDFLAGS"
15170 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15171 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15172 LDFLAGS="$LDFLAGS $RDYNAMIC"
15173 if test "${have_libpython}" = no; then
15174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15175/* end confdefs.h. */
15176
15177int
15178main ()
15179{
15180
15181 ;
15182 return 0;
15183}
15184_ACEOF
15185if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15186 dynamic_list=true
15187fi
15188rm -f core conftest.err conftest.$ac_objext \
15189 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15190 else
15191 # Workaround http://bugs.python.org/issue4434 where static
15192 # libpythonX.Y.a would get its symbols required for
15193 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15194 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15195 old_CFLAGS="$CFLAGS"
15196 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15197 if test "$cross_compiling" = yes; then :
3bebe2f2 15198 true
f6528abd 15199else
3bebe2f2
JK
15200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15201/* end confdefs.h. */
15202#include "${have_libpython}/Python.h"
15203int
15204main ()
15205{
15206int err;
38f6b338
JK
15207 Py_Initialize ();
15208 err = PyRun_SimpleString ("import itertools\n");
15209 Py_Finalize ();
15210 return err == 0 ? 0 : 1;
3bebe2f2
JK
15211 ;
15212 return 0;
15213}
15214_ACEOF
15215if ac_fn_c_try_run "$LINENO"; then :
15216 dynamic_list=true
15217fi
15218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15219 conftest.$ac_objext conftest.beam conftest.$ac_ext
15220fi
15221
38f6b338
JK
15222 CFLAGS="$old_CFLAGS"
15223 fi
15224 LDFLAGS="$old_LDFLAGS"
15225fi
15226if $dynamic_list; then
15227 found="-Wl,--dynamic-list"
15228 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15229else
38f6b338
JK
15230 found="-rdynamic"
15231 RDYNAMIC="-rdynamic"
f6528abd 15232fi
f6528abd 15233
38f6b338 15234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15235$as_echo "$found" >&6; }
0407b3f1 15236
f6528abd 15237
0407b3f1 15238if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15239 case ${host_os} in
c906108c 15240 solaris*)
d92419e5
JB
15241 # See if thread_db library is around for Solaris thread debugging.
15242 # Note that we must explicitly test for version 1 of the library
15243 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
15244 # the same API.
81ecdfbb
RW
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
15246$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 15247 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15249$as_echo "yes" >&6; }
60ca704f 15250
81ecdfbb 15251$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 15252
3483b318 15253 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 15254 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
15255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15256$as_echo_n "checking for dlopen in -ldl... " >&6; }
15257if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
15258 $as_echo_n "(cached) " >&6
c906108c 15259else
bec39cab 15260 ac_check_lib_save_LIBS=$LIBS
c906108c 15261LIBS="-ldl $LIBS"
81ecdfbb 15262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
15263/* end confdefs.h. */
15264
81ecdfbb
RW
15265/* Override any GCC internal prototype to avoid an error.
15266 Use char because int might match the return type of a GCC
15267 builtin and then its argument prototype would still apply. */
bec39cab
AC
15268#ifdef __cplusplus
15269extern "C"
15270#endif
bec39cab
AC
15271char dlopen ();
15272int
15273main ()
15274{
81ecdfbb 15275return dlopen ();
bec39cab
AC
15276 ;
15277 return 0;
15278}
15279_ACEOF
81ecdfbb 15280if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
15281 ac_cv_lib_dl_dlopen=yes
15282else
81ecdfbb 15283 ac_cv_lib_dl_dlopen=no
bec39cab 15284fi
81ecdfbb
RW
15285rm -f core conftest.err conftest.$ac_objext \
15286 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
15287LIBS=$ac_check_lib_save_LIBS
15288fi
81ecdfbb
RW
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15290$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
15291if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
15292 cat >>confdefs.h <<_ACEOF
15293#define HAVE_LIBDL 1
15294_ACEOF
c906108c
SS
15295
15296 LIBS="-ldl $LIBS"
15297
c906108c
SS
15298fi
15299
f6528abd 15300 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
15301 # Sun randomly tweaked the prototypes in <proc_service.h>
15302 # at one point.
81ecdfbb
RW
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
15304$as_echo_n "checking if <proc_service.h> is old... " >&6; }
15305 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
15306 $as_echo_n "(cached) " >&6
c906108c 15307else
bec39cab 15308
81ecdfbb 15309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15310/* end confdefs.h. */
c906108c
SS
15311
15312 #include <proc_service.h>
15313 ps_err_e ps_pdwrite
15314 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 15315
bec39cab
AC
15316int
15317main ()
15318{
15319
15320 ;
15321 return 0;
15322}
15323_ACEOF
81ecdfbb 15324if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
15325 gdb_cv_proc_service_is_old=no
15326else
81ecdfbb 15327 gdb_cv_proc_service_is_old=yes
c906108c 15328fi
81ecdfbb 15329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 15330
c906108c
SS
15331fi
15332
81ecdfbb
RW
15333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
15334$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 15335 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 15336
81ecdfbb 15337$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
15338
15339 fi
15340 else
81ecdfbb
RW
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15342$as_echo "no" >&6; }
c906108c
SS
15343 fi
15344 ;;
d92419e5 15345 aix*)
81ecdfbb
RW
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15347$as_echo_n "checking for AiX thread debugging library... " >&6; }
15348 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
15349 $as_echo_n "(cached) " >&6
bec39cab 15350else
81ecdfbb 15351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15352/* end confdefs.h. */
d92419e5 15353#include <sys/pthdebug.h>
bec39cab
AC
15354int
15355main ()
15356{
d92419e5
JB
15357#ifndef PTHDB_VERSION_3
15358 #error
15359 #endif
bec39cab
AC
15360 ;
15361 return 0;
15362}
15363_ACEOF
81ecdfbb 15364if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15365 gdb_cv_have_aix_thread_debug=yes
15366else
81ecdfbb 15367 gdb_cv_have_aix_thread_debug=no
d92419e5 15368fi
81ecdfbb 15369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15370fi
15371
81ecdfbb
RW
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15373$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15374 if test $gdb_cv_have_aix_thread_debug = yes; then
15375 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15376 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15377 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15378
15379 # Older versions of AIX do not provide the declaration for
15380 # the getthrds function (it appears that it was introduced
15381 # with AIX 6.x).
15382 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15383"
15384if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
15385 ac_have_decl=1
15386else
15387 ac_have_decl=0
15388fi
15389
15390cat >>confdefs.h <<_ACEOF
15391#define HAVE_DECL_GETTHRDS $ac_have_decl
15392_ACEOF
15393
d92419e5
JB
15394 fi
15395 ;;
c906108c 15396 esac
bec39cab 15397
c906108c
SS
15398fi
15399
3f47be5c 15400if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15402$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15403if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
15404 $as_echo_n "(cached) " >&6
bec39cab 15405else
81ecdfbb 15406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15407/* end confdefs.h. */
3f47be5c 15408#include <thread_db.h>
bec39cab
AC
15409int
15410main ()
15411{
3f47be5c 15412int i = TD_NOTALLOC;
bec39cab
AC
15413 ;
15414 return 0;
15415}
15416_ACEOF
81ecdfbb 15417if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15418 gdb_cv_thread_db_h_has_td_notalloc=yes
15419else
81ecdfbb 15420 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15421
3f47be5c 15422fi
81ecdfbb 15423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15424
bec39cab 15425fi
81ecdfbb
RW
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15427$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15429$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15430if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
15431 $as_echo_n "(cached) " >&6
59f80f10 15432else
81ecdfbb 15433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15434/* end confdefs.h. */
15435#include <thread_db.h>
15436int
15437main ()
15438{
15439int i = TD_VERSION;
15440 ;
15441 return 0;
15442}
15443_ACEOF
81ecdfbb 15444if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15445 gdb_cv_thread_db_h_has_td_version=yes
15446else
81ecdfbb 15447 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15448
15449fi
81ecdfbb 15450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15451
15452fi
81ecdfbb
RW
15453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15454$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15456$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15457if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
15458 $as_echo_n "(cached) " >&6
59f80f10 15459else
81ecdfbb 15460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15461/* end confdefs.h. */
15462#include <thread_db.h>
15463int
15464main ()
15465{
15466int i = TD_NOTLS;
15467 ;
15468 return 0;
15469}
15470_ACEOF
81ecdfbb 15471if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15472 gdb_cv_thread_db_h_has_td_notls=yes
15473else
81ecdfbb 15474 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15475
15476fi
81ecdfbb 15477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15478
15479fi
81ecdfbb
RW
15480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15481$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15482fi
15483if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15484
81ecdfbb 15485$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15486
59f80f10
DJ
15487fi
15488if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15489
81ecdfbb 15490$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15491
15492fi
15493if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15494
81ecdfbb 15495$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15496
3f47be5c
EZ
15497fi
15498
b757528f 15499if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
15500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
15501$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
15502if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
15503 $as_echo_n "(cached) " >&6
bec39cab 15504else
81ecdfbb 15505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15506/* end confdefs.h. */
b757528f 15507#include <sys/syscall.h>
bec39cab
AC
15508int
15509main ()
15510{
b757528f 15511int i = __NR_tkill;
bec39cab
AC
15512 ;
15513 return 0;
15514}
15515_ACEOF
81ecdfbb 15516if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
15517 gdb_cv_sys_syscall_h_has_tkill=yes
15518else
81ecdfbb 15519 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 15520
b757528f 15521fi
81ecdfbb 15522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 15523
bec39cab 15524fi
81ecdfbb
RW
15525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
15526$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
15527fi
15528if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 15529
81ecdfbb 15530$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
15531
15532fi
15533
81ecdfbb
RW
15534ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15535"
15536if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
15537 ac_have_decl=1
10568435 15538else
81ecdfbb 15539 ac_have_decl=0
10568435 15540fi
10568435
JK
15541
15542cat >>confdefs.h <<_ACEOF
81ecdfbb 15543#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15544_ACEOF
15545
15546
81ecdfbb
RW
15547if test "$cross_compiling" = yes; then :
15548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15549/* end confdefs.h. */
15550#include <sys/personality.h>
15551int
15552main ()
15553{
15554
15555# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15556# define ADDR_NO_RANDOMIZE 0x0040000
15557# endif
15558 /* Test the flag could be set and stays set. */
15559 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15560 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15561 return 1
15562 ;
15563 return 0;
15564}
15565_ACEOF
81ecdfbb 15566if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15567 have_personality=true
15568else
81ecdfbb 15569 have_personality=false
10568435 15570fi
81ecdfbb
RW
15571rm -f core conftest.err conftest.$ac_objext \
15572 conftest$ac_exeext conftest.$ac_ext
10568435 15573else
81ecdfbb 15574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15575/* end confdefs.h. */
15576#include <sys/personality.h>
15577int
15578main ()
15579{
15580
15581# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15582# define ADDR_NO_RANDOMIZE 0x0040000
15583# endif
15584 /* Test the flag could be set and stays set. */
15585 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15586 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15587 return 1
15588 ;
15589 return 0;
15590}
15591_ACEOF
81ecdfbb 15592if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15593 have_personality=true
15594else
81ecdfbb 15595 have_personality=false
10568435 15596fi
81ecdfbb
RW
15597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15598 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15599fi
81ecdfbb 15600
10568435
JK
15601if $have_personality
15602then
15603
81ecdfbb 15604$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15605
15606fi
15607
fb40c209 15608
f83d8a90
DE
15609# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15610# except that the argument to --with-sysroot is optional.
15611# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15612if test "x$with_sysroot" = xyes; then
15613 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15614fi
bec39cab 15615
81ecdfbb
RW
15616# Check whether --with-sysroot was given.
15617if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15618 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15619else
15620 TARGET_SYSTEM_ROOT=
15621fi
030292b7 15622
030292b7 15623
f83d8a90
DE
15624 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15625 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15626 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15627 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15628
f83d8a90
DE
15629cat >>confdefs.h <<_ACEOF
15630#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15631_ACEOF
bec39cab 15632
030292b7 15633
b14b1491 15634
f83d8a90
DE
15635
15636 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15637 if test "x$prefix" = xNONE; then
15638 test_prefix=/usr/local
15639 else
15640 test_prefix=$prefix
15641 fi
15642 else
15643 test_prefix=$exec_prefix
15644 fi
15645 value=0
15646 case ${ac_define_dir} in
15647 "${test_prefix}"|"${test_prefix}/"*|\
15648 '${exec_prefix}'|'${exec_prefix}/'*)
15649 value=1
15650 ;;
15651 esac
15652
15653cat >>confdefs.h <<_ACEOF
15654#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15655_ACEOF
030292b7
DJ
15656
15657
15658
16e7150e 15659
16e7150e 15660
81ecdfbb
RW
15661# Check whether --with-system-gdbinit was given.
15662if test "${with_system_gdbinit+set}" = set; then :
15663 withval=$with_system_gdbinit;
b14b1491
TT
15664 SYSTEM_GDBINIT=$withval
15665else
15666 SYSTEM_GDBINIT=
81ecdfbb
RW
15667fi
15668
16e7150e
JG
15669
15670 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15671 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15672 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15673 ac_define_dir=`eval echo $ac_define_dir`
15674
15675cat >>confdefs.h <<_ACEOF
15676#define SYSTEM_GDBINIT "$ac_define_dir"
15677_ACEOF
15678
15679
15680
0c4a4063 15681
b14b1491
TT
15682 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15683 if test "x$prefix" = xNONE; then
15684 test_prefix=/usr/local
15685 else
15686 test_prefix=$prefix
15687 fi
15688 else
15689 test_prefix=$exec_prefix
15690 fi
15691 value=0
15692 case ${ac_define_dir} in
15693 "${test_prefix}"|"${test_prefix}/"*|\
15694 '${exec_prefix}'|'${exec_prefix}/'*)
15695 value=1
15696 ;;
15697 esac
16e7150e 15698
b14b1491
TT
15699cat >>confdefs.h <<_ACEOF
15700#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15701_ACEOF
15702
b14b1491 15703
16e7150e 15704
0c4a4063 15705
81ecdfbb
RW
15706# Check whether --enable-werror was given.
15707if test "${enable_werror+set}" = set; then :
15708 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15709 yes | y) ERROR_ON_WARNING="yes" ;;
15710 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15711 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15712 esac
81ecdfbb
RW
15713fi
15714
094a342e
MK
15715
15716# Enable -Werror by default when using gcc
15717if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
15718 ERROR_ON_WARNING=yes
15719fi
15720
15721WERROR_CFLAGS=""
15722if test "${ERROR_ON_WARNING}" = yes ; then
15723 WERROR_CFLAGS="-Werror"
15724fi
15725
aa79a185
DJ
15726# The entries after -Wno-pointer-sign are disabled warnings which may
15727# be enabled in the future, which can not currently be used to build
15728# GDB.
15729# NOTE: If you change this list, remember to update
3b851bce 15730# gdb/doc/gdbint.texinfo.
aa79a185
DJ
15731build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
15732-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 15733-Wno-unused -Wunused-value -Wunused-function \
b03a2011 15734-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 15735
3526781e
DJ
15736# Enable -Wno-format by default when using gcc on mingw since many
15737# GCC versions complain about %I64.
15738case "${host}" in
15739 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15740esac
15741
81ecdfbb
RW
15742# Check whether --enable-build-warnings was given.
15743if test "${enable_build_warnings+set}" = set; then :
15744 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15745 yes) ;;
15746 no) build_warnings="-w";;
15747 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15748 build_warnings="${build_warnings} ${t}";;
15749 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15750 build_warnings="${t} ${build_warnings}";;
15751 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15752esac
d4f3574e 15753if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15754 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15755fi
81ecdfbb
RW
15756fi
15757# Check whether --enable-gdb-build-warnings was given.
15758if test "${enable_gdb_build_warnings+set}" = set; then :
15759 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15760 yes) ;;
15761 no) build_warnings="-w";;
15762 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15763 build_warnings="${build_warnings} ${t}";;
15764 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15765 build_warnings="${t} ${build_warnings}";;
15766 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15767esac
15768if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15769 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15770fi
81ecdfbb
RW
15771fi
15772WARN_CFLAGS=""
c906108c
SS
15773if test "x${build_warnings}" != x -a "x$GCC" = xyes
15774then
81ecdfbb
RW
15775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15776$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15777 # Separate out the -Werror flag as some files just cannot be
15778 # compiled with it enabled.
15779 for w in ${build_warnings}; do
15780 case $w in
15781 -Werr*) WERROR_CFLAGS=-Werror ;;
15782 *) # Check that GCC accepts it
4536bbc6
AC
15783 saved_CFLAGS="$CFLAGS"
15784 CFLAGS="$CFLAGS $w"
81ecdfbb 15785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15786/* end confdefs.h. */
4536bbc6 15787
bec39cab
AC
15788int
15789main ()
15790{
4536bbc6 15791
bec39cab
AC
15792 ;
15793 return 0;
15794}
15795_ACEOF
81ecdfbb 15796if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 15797 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15798fi
81ecdfbb 15799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15800 CFLAGS="$saved_CFLAGS"
746a987d
AC
15801 esac
15802 done
81ecdfbb
RW
15803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15804$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15805fi
15806
15807
104c1213 15808
7a292a7a 15809# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15811$as_echo_n "checking for cygwin... " >&6; }
15812if test "${gdb_cv_os_cygwin+set}" = set; then :
15813 $as_echo_n "(cached) " >&6
bec39cab 15814else
81ecdfbb 15815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15816/* end confdefs.h. */
7a292a7a
SS
15817
15818#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15819lose
15820#endif
bec39cab 15821_ACEOF
7a292a7a 15822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15823 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15824 gdb_cv_os_cygwin=yes
15825else
7a292a7a
SS
15826 gdb_cv_os_cygwin=no
15827fi
15828rm -f conftest*
15829
15830fi
81ecdfbb
RW
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15832$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15833
aff38e61 15834
3eb25fda 15835SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15836case ${host} in
95cbc983
AC
15837 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15838 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15839 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15840esac
15841
15842
cd0fc7c3
SS
15843# libreadline needs libuser32.a in a cygwin environment
15844WIN32LIBS=
15845if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15846 WIN32LIBS="-luser32"
15847 case "${target}" in
15848 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15849 ;;
15850 esac
cd0fc7c3 15851fi
c906108c 15852
b4505029
MM
15853# The ser-tcp.c module requires sockets.
15854case ${host} in
15855 *mingw32*)
15856
81ecdfbb 15857$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15858
15859 WIN32LIBS="$WIN32LIBS -lws2_32"
15860 ;;
15861esac
15862
7a292a7a 15863
31d99776
DJ
15864# Add ELF support to GDB, but only if BFD includes ELF support.
15865OLD_CFLAGS=$CFLAGS
15866OLD_LDFLAGS=$LDFLAGS
15867OLD_LIBS=$LIBS
12cd34f3
PA
15868# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15869# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15870# always want our bfd.
15871CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 15872LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 15873intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15874# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15875if test "$plugins" = "yes"; then
15876 LIBS="-ldl $LIBS"
15877fi
0f72fb1c 15878LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15880$as_echo_n "checking for ELF support in BFD... " >&6; }
15881if test "${gdb_cv_var_elf+set}" = set; then :
15882 $as_echo_n "(cached) " >&6
31d99776 15883else
81ecdfbb 15884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15885/* end confdefs.h. */
15886#include <stdlib.h>
15887#include "bfd.h"
15888#include "elf-bfd.h"
15889
15890int
15891main ()
15892{
15893bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15894 ;
15895 return 0;
15896}
15897_ACEOF
81ecdfbb 15898if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15899 gdb_cv_var_elf=yes
15900else
81ecdfbb 15901 gdb_cv_var_elf=no
31d99776 15902fi
81ecdfbb
RW
15903rm -f core conftest.err conftest.$ac_objext \
15904 conftest$ac_exeext conftest.$ac_ext
31d99776 15905fi
81ecdfbb
RW
15906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15907$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15908if test $gdb_cv_var_elf = yes; then
15909 CONFIG_OBS="$CONFIG_OBS elfread.o"
15910
81ecdfbb 15911$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15912
075ff26d
JK
15913 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15914 if test "$plugins" = "yes"; then
15915 OLD_LIBS="-ldl $OLD_LIBS"
15916 fi
31d99776
DJ
15917fi
15918CFLAGS=$OLD_CFLAGS
15919LDFLAGS=$OLD_LDFLAGS
15920LIBS=$OLD_LIBS
15921
121ce6e5
DJ
15922# Add any host-specific objects to GDB.
15923CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15924
3fc11d3e
JM
15925LIBGUI="../libgui/src/libgui.a"
15926GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15927
15928
7a292a7a 15929
3fc11d3e
JM
15930WIN32LDAPP=
15931
15932
15933
d91670b9 15934case "${host}" in
686a5eed 15935*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15936 configdir="win"
15937 ;;
15938*)
15939 configdir="unix"
15940 ;;
15941esac
3fc11d3e
JM
15942
15943GDBTKLIBS=
15944if test "${enable_gdbtk}" = "yes"; then
15945
d1c3b63a
KS
15946 # Gdbtk must have an absolute path to srcdir in order to run
15947 # properly when not installed.
15948 here=`pwd`
15949 cd ${srcdir}
15950 GDBTK_SRC_DIR=`pwd`
15951 cd $here
15952
bec39cab 15953
5062cc19
KS
15954 #
15955 # Ok, lets find the tcl configuration
15956 # First, look for one uninstalled.
15957 # the alternative search directory is invoked by --with-tcl
15958 #
3fc11d3e 15959
5062cc19
KS
15960 if test x"${no_tcl}" = x ; then
15961 # we reset no_tcl in case something fails here
15962 no_tcl=true
bec39cab 15963
81ecdfbb
RW
15964# Check whether --with-tcl was given.
15965if test "${with_tcl+set}" = set; then :
15966 withval=$with_tcl; with_tclconfig=${withval}
15967fi
15968
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15970$as_echo_n "checking for Tcl configuration... " >&6; }
15971 if test "${ac_cv_c_tclconfig+set}" = set; then :
15972 $as_echo_n "(cached) " >&6
3fc11d3e 15973else
bec39cab 15974
3fc11d3e 15975
5062cc19
KS
15976 # First check to see if --with-tcl was specified.
15977 case "${host}" in
15978 *-*-cygwin*) platDir="win" ;;
15979 *) platDir="unix" ;;
15980 esac
15981 if test x"${with_tclconfig}" != x ; then
15982 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15983 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15984 else
81ecdfbb 15985 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15986 fi
15987 fi
15988
15989 # then check for a private Tcl installation
15990 if test x"${ac_cv_c_tclconfig}" = x ; then
15991 for i in \
15992 ../tcl \
15993 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15994 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15995 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15996 ../../tcl \
15997 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15998 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15999 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16000 ../../../tcl \
16001 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16002 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16003 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16004 if test -f "$i/$platDir/tclConfig.sh" ; then
16005 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16006 break
16007 fi
16008 done
16009 fi
16010
16011 # on Darwin, check in Framework installation locations
16012 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16013 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16014 `ls -d /Library/Frameworks 2>/dev/null` \
16015 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16016 `ls -d /System/Library/Frameworks 2>/dev/null` \
16017 ; do
16018 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16019 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16020 break
16021 fi
16022 done
16023 fi
16024
16025 # check in a few common install locations
16026 if test x"${ac_cv_c_tclconfig}" = x ; then
16027 for i in `ls -d ${libdir} 2>/dev/null` \
16028 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16029 `ls -d ${prefix}/lib 2>/dev/null` \
16030 `ls -d /usr/local/lib 2>/dev/null` \
16031 `ls -d /usr/contrib/lib 2>/dev/null` \
16032 `ls -d /usr/lib 2>/dev/null` \
16033 ; do
16034 if test -f "$i/tclConfig.sh" ; then
16035 ac_cv_c_tclconfig=`(cd $i; pwd)`
16036 break
16037 fi
16038 done
16039 fi
3fc11d3e 16040
5062cc19
KS
16041 # check in a few other private locations
16042 if test x"${ac_cv_c_tclconfig}" = x ; then
16043 for i in \
16044 ${srcdir}/../tcl \
16045 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16046 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16047 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16048 if test -f "$i/$platDir/tclConfig.sh" ; then
16049 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16050 break
16051 fi
16052 done
16053 fi
bec39cab 16054
3fc11d3e
JM
16055fi
16056
5062cc19
KS
16057
16058 if test x"${ac_cv_c_tclconfig}" = x ; then
16059 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16061$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16062 else
16063 no_tcl=
16064 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16066$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16067 fi
16068 fi
3fc11d3e 16069
bec39cab 16070
85541719
DE
16071 # If $no_tk is nonempty, then we can't do Tk, and there is no
16072 # point to doing Tcl.
bec39cab 16073
5062cc19
KS
16074 #
16075 # Ok, lets find the tk configuration
16076 # First, look for one uninstalled.
16077 # the alternative search directory is invoked by --with-tk
16078 #
3fc11d3e 16079
5062cc19
KS
16080 if test x"${no_tk}" = x ; then
16081 # we reset no_tk in case something fails here
16082 no_tk=true
bec39cab 16083
81ecdfbb
RW
16084# Check whether --with-tk was given.
16085if test "${with_tk+set}" = set; then :
16086 withval=$with_tk; with_tkconfig=${withval}
16087fi
16088
16089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16090$as_echo_n "checking for Tk configuration... " >&6; }
16091 if test "${ac_cv_c_tkconfig+set}" = set; then :
16092 $as_echo_n "(cached) " >&6
bec39cab 16093else
3fc11d3e
JM
16094
16095
5062cc19
KS
16096 # First check to see if --with-tkconfig was specified.
16097 if test x"${with_tkconfig}" != x ; then
16098 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16099 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16100 else
81ecdfbb 16101 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16102 fi
16103 fi
3fc11d3e 16104
5062cc19
KS
16105 # then check for a private Tk library
16106 case "${host}" in
16107 *-*-cygwin*) platDir="win" ;;
16108 *) platDir="unix" ;;
16109 esac
16110 if test x"${ac_cv_c_tkconfig}" = x ; then
16111 for i in \
16112 ../tk \
16113 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16114 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16115 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16116 ../../tk \
16117 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16118 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16119 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16120 ../../../tk \
16121 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16122 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16123 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16124 if test -f "$i/$platDir/tkConfig.sh" ; then
16125 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16126 break
16127 fi
16128 done
16129 fi
16130
16131 # on Darwin, check in Framework installation locations
16132 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16133 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16134 `ls -d /Library/Frameworks 2>/dev/null` \
16135 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16136 `ls -d /System/Library/Frameworks 2>/dev/null` \
16137 ; do
16138 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16139 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16140 break
16141 fi
16142 done
16143 fi
16144
16145 # check in a few common install locations
16146 if test x"${ac_cv_c_tkconfig}" = x ; then
16147 for i in `ls -d ${libdir} 2>/dev/null` \
16148 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16149 `ls -d ${prefix}/lib 2>/dev/null` \
16150 `ls -d /usr/local/lib 2>/dev/null` \
16151 `ls -d /usr/contrib/lib 2>/dev/null` \
16152 `ls -d /usr/lib 2>/dev/null` \
16153 ; do
16154 if test -f "$i/tkConfig.sh" ; then
16155 ac_cv_c_tkconfig=`(cd $i; pwd)`
16156 break
16157 fi
16158 done
16159 fi
16160 # check in a few other private locations
16161 if test x"${ac_cv_c_tkconfig}" = x ; then
16162 for i in \
16163 ${srcdir}/../tk \
16164 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16165 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16166 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16167 if test -f "$i/$platDir/tkConfig.sh" ; then
16168 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16169 break
16170 fi
16171 done
16172 fi
3fc11d3e 16173
3fc11d3e
JM
16174fi
16175
16176
5062cc19
KS
16177 if test x"${ac_cv_c_tkconfig}" = x ; then
16178 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16180$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16181 else
16182 no_tk=
16183 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16185$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16186 fi
3fc11d3e 16187 fi
dd2504ab 16188
dd2504ab 16189
85541719
DE
16190 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16191
81ecdfbb
RW
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16193$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16194
16195 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16197$as_echo "loading" >&6; }
85541719
DE
16198 . ${TCL_BIN_DIR}/tclConfig.sh
16199 else
81ecdfbb
RW
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16201$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16202 fi
16203
16204 # eval is required to do the TCL_DBGX substitution
16205 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16206 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16207
16208 # If the TCL_BIN_DIR is the build directory (not the install directory),
16209 # then set the common variable name to the value of the build variables.
16210 # For example, the variable TCL_LIB_SPEC will be set to the value
16211 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16212 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16213 # installed and uninstalled version of Tcl.
16214 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16215 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16216 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16217 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16218 elif test "`uname -s`" = "Darwin"; then
16219 # If Tcl was built as a framework, attempt to use the libraries
16220 # from the framework at the given location so that linking works
16221 # against Tcl.framework installed in an arbitary location.
16222 case ${TCL_DEFS} in
16223 *TCL_FRAMEWORK*)
16224 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16225 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16226 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16227 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16228 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16229 break
16230 fi
16231 done
16232 fi
16233 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16234 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16235 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16236 fi
16237 ;;
16238 esac
16239 fi
16240
16241 # eval is required to do the TCL_DBGX substitution
16242 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16243 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16244 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16245 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261 # Check for in-tree tcl
16262 here=`pwd`
16263 cd ${srcdir}/..
16264 topdir=`pwd`
16265 cd ${here}
16266
16267 intree="no"
16268 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16269 intree="yes"
16270 fi
16271
16272 # Find Tcl private headers
16273 if test x"${intree}" = xno; then
16274
81ecdfbb
RW
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16276$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16277 private_dir=""
16278 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16279 if test -f ${dir}/tclInt.h ; then
16280 private_dir=${dir}
16281 fi
16282
16283 if test x"${private_dir}" = x; then
81ecdfbb 16284 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16285 else
16286 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16288$as_echo "${private_dir}" >&6; }
85541719
DE
16289 fi
16290
16291 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16292 TCL_LIBRARY="${TCL_LIB_SPEC}"
16293 TCL_DEPS=""
16294 else
16295 # If building tcl in the same src tree, private headers
16296 # are not needed, but we need to be sure to use the right
16297 # headers library
16298 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16299 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16300 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16301 fi
16302
16303
16304
16305
16306
81ecdfbb
RW
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16308$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16309
5062cc19 16310 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16312$as_echo "loading" >&6; }
5062cc19 16313 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16314 else
81ecdfbb
RW
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16316$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16317 fi
bec39cab 16318
5062cc19
KS
16319 # eval is required to do the TK_DBGX substitution
16320 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16321 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16322
16323 # If the TK_BIN_DIR is the build directory (not the install directory),
16324 # then set the common variable name to the value of the build variables.
16325 # For example, the variable TK_LIB_SPEC will be set to the value
16326 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16327 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16328 # installed and uninstalled version of Tcl.
85541719 16329 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16330 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16331 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16332 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16333 elif test "`uname -s`" = "Darwin"; then
16334 # If Tk was built as a framework, attempt to use the libraries
16335 # from the framework at the given location so that linking works
16336 # against Tk.framework installed in an arbitary location.
16337 case ${TK_DEFS} in
16338 *TK_FRAMEWORK*)
85541719 16339 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16340 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16341 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16342 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16343 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16344 break
16345 fi
16346 done
16347 fi
85541719 16348 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16349 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16350 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16351 fi
16352 ;;
16353 esac
3fc11d3e
JM
16354 fi
16355
5062cc19
KS
16356 # eval is required to do the TK_DBGX substitution
16357 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16358 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16359 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16360 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16361
3fc11d3e
JM
16362
16363
bec39cab
AC
16364
16365
16366
16367
16368
16369
16370
3fc11d3e 16371
3fc11d3e 16372
bec39cab 16373
bec39cab 16374
85541719
DE
16375 # Check for in-tree Tk
16376 intree="no"
16377 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16378 intree="yes"
16379 fi
3fc11d3e 16380
85541719
DE
16381 # Find Tk private headers
16382 if test x"${intree}" = xno; then
3fc11d3e 16383
81ecdfbb
RW
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16385$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16386 private_dir=""
16387 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16388 if test -f ${dir}/tkInt.h; then
16389 private_dir=${dir}
3fc11d3e 16390 fi
bec39cab 16391
5062cc19 16392 if test x"${private_dir}" = x; then
81ecdfbb 16393 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16394 else
5062cc19 16395 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16397$as_echo "${private_dir}" >&6; }
3fc11d3e 16398 fi
3fc11d3e 16399
85541719
DE
16400 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16401 TK_LIBRARY=${TK_LIB_SPEC}
16402 TK_DEPS=""
16403 else
16404 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16405 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16406 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16407 fi
3fc11d3e
JM
16408
16409
3fc11d3e
JM
16410
16411
3fc11d3e 16412
85541719 16413 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16414
85541719
DE
16415 # Include some libraries that Tcl and Tk want.
16416 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16417 # Yes, the ordering seems wrong here. But it isn't.
16418 # TK_LIBS is the list of libraries that need to be linked
16419 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16420 # were in LIBS then any link tests after this point would
16421 # try to include things like `$(LIBGUI)', which wouldn't work.
16422 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16423
85541719
DE
16424 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16425 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16426 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16427 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16428 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16429 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16430 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16431
85541719
DE
16432 if test x$gdb_cv_os_cygwin = xyes; then
16433 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16434 WIN32LDAPP="-Wl,--subsystem,console"
16435 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16436 fi
ffc6a242 16437
81ecdfbb 16438 subdirs="$subdirs gdbtk"
3ace7edb 16439
85541719 16440 fi
3fc11d3e
JM
16441fi
16442
16443
16444
16445
16446
16447
16448
16449
81ecdfbb
RW
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16451$as_echo_n "checking for X... " >&6; }
bec39cab 16452
c906108c 16453
81ecdfbb
RW
16454# Check whether --with-x was given.
16455if test "${with_x+set}" = set; then :
16456 withval=$with_x;
16457fi
c906108c
SS
16458
16459# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16460if test "x$with_x" = xno; then
16461 # The user explicitly disabled X.
16462 have_x=disabled
16463else
81ecdfbb
RW
16464 case $x_includes,$x_libraries in #(
16465 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16466 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16467 $as_echo_n "(cached) " >&6
c906108c
SS
16468else
16469 # One or both of the vars are not set, and there is no cached value.
bec39cab 16470ac_x_includes=no ac_x_libraries=no
81ecdfbb 16471rm -f -r conftest.dir
bec39cab
AC
16472if mkdir conftest.dir; then
16473 cd conftest.dir
bec39cab 16474 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16475incroot:
16476 @echo incroot='${INCROOT}'
16477usrlibdir:
16478 @echo usrlibdir='${USRLIBDIR}'
16479libdir:
16480 @echo libdir='${LIBDIR}'
16481_ACEOF
16482 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16483 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16484 for ac_var in incroot usrlibdir libdir; do
16485 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16486 done
c906108c 16487 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16488 for ac_extension in a so sl dylib la dll; do
16489 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16490 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16491 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16492 fi
16493 done
16494 # Screen out bogus values from the imake configuration. They are
16495 # bogus both because they are the default anyway, and because
16496 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16497 case $ac_im_incroot in
81ecdfbb 16498 /usr/include) ac_x_includes= ;;
bec39cab 16499 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16500 esac
bec39cab 16501 case $ac_im_usrlibdir in
81ecdfbb 16502 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16503 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16504 esac
16505 fi
16506 cd ..
81ecdfbb 16507 rm -f -r conftest.dir
c906108c
SS
16508fi
16509
bec39cab
AC
16510# Standard set of common directories for X headers.
16511# Check X11 before X11Rn because it is often a symlink to the current release.
16512ac_x_header_dirs='
16513/usr/X11/include
81ecdfbb 16514/usr/X11R7/include
bec39cab
AC
16515/usr/X11R6/include
16516/usr/X11R5/include
16517/usr/X11R4/include
16518
16519/usr/include/X11
81ecdfbb 16520/usr/include/X11R7
bec39cab
AC
16521/usr/include/X11R6
16522/usr/include/X11R5
16523/usr/include/X11R4
16524
16525/usr/local/X11/include
81ecdfbb 16526/usr/local/X11R7/include
bec39cab
AC
16527/usr/local/X11R6/include
16528/usr/local/X11R5/include
16529/usr/local/X11R4/include
16530
16531/usr/local/include/X11
81ecdfbb 16532/usr/local/include/X11R7
bec39cab
AC
16533/usr/local/include/X11R6
16534/usr/local/include/X11R5
16535/usr/local/include/X11R4
16536
16537/usr/X386/include
16538/usr/x386/include
16539/usr/XFree86/include/X11
16540
16541/usr/include
16542/usr/local/include
16543/usr/unsupported/include
16544/usr/athena/include
16545/usr/local/x11r5/include
16546/usr/lpp/Xamples/include
16547
16548/usr/openwin/include
16549/usr/openwin/share/include'
16550
16551if test "$ac_x_includes" = no; then
81ecdfbb 16552 # Guess where to find include files, by looking for Xlib.h.
c906108c 16553 # First, try using that file with no special directory specified.
81ecdfbb 16554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16555/* end confdefs.h. */
81ecdfbb 16556#include <X11/Xlib.h>
bec39cab 16557_ACEOF
81ecdfbb 16558if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16559 # We can compile using X headers with no special include directory.
16560ac_x_includes=
16561else
bec39cab 16562 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16563 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16564 ac_x_includes=$ac_dir
16565 break
16566 fi
16567done
c906108c 16568fi
bec39cab
AC
16569rm -f conftest.err conftest.$ac_ext
16570fi # $ac_x_includes = no
c906108c 16571
bec39cab 16572if test "$ac_x_libraries" = no; then
c906108c 16573 # Check for the libraries.
c906108c
SS
16574 # See if we find them without any special options.
16575 # Don't add to $LIBS permanently.
bec39cab 16576 ac_save_LIBS=$LIBS
81ecdfbb
RW
16577 LIBS="-lX11 $LIBS"
16578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16579/* end confdefs.h. */
81ecdfbb 16580#include <X11/Xlib.h>
bec39cab
AC
16581int
16582main ()
16583{
81ecdfbb 16584XrmInitialize ()
bec39cab
AC
16585 ;
16586 return 0;
16587}
16588_ACEOF
81ecdfbb 16589if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16590 LIBS=$ac_save_LIBS
c906108c
SS
16591# We can link X programs with no special library path.
16592ac_x_libraries=
16593else
81ecdfbb
RW
16594 LIBS=$ac_save_LIBS
16595for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16596do
bec39cab 16597 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16598 for ac_extension in a so sl dylib la dll; do
16599 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16600 ac_x_libraries=$ac_dir
16601 break 2
16602 fi
16603 done
16604done
16605fi
81ecdfbb
RW
16606rm -f core conftest.err conftest.$ac_objext \
16607 conftest$ac_exeext conftest.$ac_ext
bec39cab 16608fi # $ac_x_libraries = no
c906108c 16609
81ecdfbb
RW
16610case $ac_x_includes,$ac_x_libraries in #(
16611 no,* | *,no | *\'*)
16612 # Didn't find X, or a directory has "'" in its name.
16613 ac_cv_have_x="have_x=no";; #(
16614 *)
16615 # Record where we found X for the cache.
16616 ac_cv_have_x="have_x=yes\
16617 ac_x_includes='$ac_x_includes'\
16618 ac_x_libraries='$ac_x_libraries'"
16619esac
c906108c 16620fi
81ecdfbb
RW
16621;; #(
16622 *) have_x=yes;;
16623 esac
c906108c
SS
16624 eval "$ac_cv_have_x"
16625fi # $with_x != no
16626
16627if test "$have_x" != yes; then
81ecdfbb
RW
16628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16629$as_echo "$have_x" >&6; }
c906108c
SS
16630 no_x=yes
16631else
16632 # If each of the values was on the command line, it overrides each guess.
16633 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16634 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16635 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16636 ac_cv_have_x="have_x=yes\
16637 ac_x_includes='$x_includes'\
16638 ac_x_libraries='$x_libraries'"
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16640$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16641fi
16642
16643
bec39cab 16644# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16645# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16646# This code just checks for a few cases where we'd like to ignore those
16647# definitions, even when they're present in the '.mt' file. These cases
16648# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16649# not part of the source tree.
7a292a7a 16650#
81ecdfbb
RW
16651# Check whether --enable-sim was given.
16652if test "${enable_sim+set}" = set; then :
16653 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16654 echo "enableval = ${enableval}";
16655 case "${enableval}" in
16656 yes) ignore_sim=false ;;
16657 no) ignore_sim=true ;;
16658 *) ignore_sim=false ;;
16659 esac
16660else
16661 ignore_sim=false
81ecdfbb
RW
16662fi
16663
7a292a7a
SS
16664
16665if test ! -d "${srcdir}/../sim"; then
16666 ignore_sim=true
16667fi
16668
9b624dbe
UW
16669SIM=
16670SIM_OBS=
16671if test "${ignore_sim}" = "false"; then
16672 if test x"${gdb_sim}" != x ; then
16673 SIM="${gdb_sim}"
16674 SIM_OBS="remote-sim.o"
60ca704f 16675
81ecdfbb 16676$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16677
9b624dbe 16678 fi
7a292a7a
SS
16679fi
16680
16681
16682
c906108c
SS
16683
16684
16685
16686
16687
16688
dfcd3bfb 16689
e56ac5c3
AC
16690
16691
b3a90332
AC
16692
16693
c35f4ffc 16694# List of host floatformats.
bec39cab
AC
16695
16696cat >>confdefs.h <<_ACEOF
c35f4ffc 16697#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16698_ACEOF
c35f4ffc 16699
bec39cab
AC
16700
16701cat >>confdefs.h <<_ACEOF
c35f4ffc 16702#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16703_ACEOF
16704
c35f4ffc 16705
bec39cab 16706cat >>confdefs.h <<_ACEOF
c35f4ffc 16707#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16708_ACEOF
c35f4ffc
AC
16709
16710
c906108c
SS
16711# target_subdir is used by the testsuite to find the target libraries.
16712target_subdir=
16713if test "${host}" != "${target}"; then
16714 target_subdir="${target_alias}/"
16715fi
16716
16717
16718frags=
771b4502 16719if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16720 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16721 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16722 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16723 fi
16724 frags="$frags $host_makefile_frag"
16725else
16726 host_makefile_frag=/dev/null
c906108c 16727fi
c906108c 16728
c906108c
SS
16729
16730
16731
771b4502 16732if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16733# We pick this up from the host configuration file (.mh) because we
16734# do not have a native configuration Makefile fragment.
c906108c
SS
16735nativefile=`sed -n '
16736s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16737' ${host_makefile_frag}`
c906108c
SS
16738fi
16739
16740
b00a8037 16741if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16742
16743cat >>confdefs.h <<_ACEOF
b00a8037 16744#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16745_ACEOF
b00a8037
DJ
16746
16747fi
16748
8dcde887 16749# Enable multi-ice-gdb-server.
81ecdfbb
RW
16750# Check whether --enable-multi-ice was given.
16751if test "${enable_multi_ice+set}" = set; then :
16752 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16753 yes | no)
16754 ;;
81ecdfbb 16755 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16756 esac
81ecdfbb 16757fi
b4e70030 16758
81ecdfbb
RW
16759if test "x$enable_multi_ice" = xyes; then
16760 subdirs="$subdirs multi-ice"
3ace7edb 16761
a85f51e7
DJ
16762fi
16763
496c0e1b
JB
16764# Check whether --enable-gdbserver was given.
16765if test "${enable_gdbserver+set}" = set; then :
16766 enableval=$enable_gdbserver; case "${enableval}" in
16767 yes| no|auto) ;;
16768 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16769esac
16770else
16771 enable_gdbserver=auto
16772fi
16773
16774
16775# We only build gdbserver automatically in a native configuration, and
16776# only if the user did not explicitly disable its build.
16777if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16779$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16780 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16782$as_echo "yes" >&6; }
16783 subdirs="$subdirs gdbserver"
3ace7edb 16784
496c0e1b 16785 gdbserver_build_enabled=yes
8dcde887 16786 else
81ecdfbb
RW
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16788$as_echo "no" >&6; }
8dcde887
MK
16789 fi
16790fi
16791
496c0e1b
JB
16792# If the user explicitly request the gdbserver to be built, verify that
16793# we were in fact able to enable it.
16794if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16795 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16796fi
16797
db985757 16798# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16799# to an empty version.
c906108c
SS
16800
16801files=
16802links=
5a2402b8 16803
c906108c
SS
16804rm -f nm.h
16805if test "${nativefile}" != ""; then
0f475e27
AC
16806 case "${nativefile}" in
16807 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16808 * ) GDB_NM_FILE="${nativefile}"
16809 esac
5a2402b8
AC
16810 files="${files} ${GDB_NM_FILE}"
16811 links="${links} nm.h"
60ca704f
SE
16812
16813cat >>confdefs.h <<_ACEOF
b78960be 16814#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16815_ACEOF
5a2402b8 16816
c906108c 16817fi
5a2402b8
AC
16818
16819
bec39cab
AC
16820ac_sources="$files"
16821ac_dests="$links"
16822while test -n "$ac_sources"; do
16823 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16824 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16825 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16826done
81ecdfbb 16827ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16828
16829
c906108c
SS
16830
16831
c906108c 16832
81ecdfbb 16833$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16834
bec39cab 16835
e2207b9a 16836ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16837
16838ac_config_commands="$ac_config_commands default"
89a34d1b 16839
bec39cab
AC
16840cat >confcache <<\_ACEOF
16841# This file is a shell script that caches the results of configure
16842# tests run on this system so they can be shared between configure
16843# scripts and configure runs, see configure's option --config-cache.
16844# It is not useful on other systems. If it contains results you don't
16845# want to keep, you may remove or edit it.
16846#
16847# config.status only pays attention to the cache file if you give it
16848# the --recheck option to rerun configure.
16849#
16850# `ac_cv_env_foo' variables (set or unset) will be overridden when
16851# loading this file, other *unset* `ac_cv_foo' will be assigned the
16852# following values.
16853
16854_ACEOF
16855
16856# The following way of writing the cache mishandles newlines in values,
16857# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16858# So, we kill variables containing newlines.
bec39cab
AC
16859# Ultrix sh set writes to stderr and can't be redirected directly,
16860# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16861(
16862 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16863 eval ac_val=\$$ac_var
16864 case $ac_val in #(
16865 *${as_nl}*)
16866 case $ac_var in #(
16867 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16868$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16869 esac
16870 case $ac_var in #(
16871 _ | IFS | as_nl) ;; #(
16872 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16873 *) { eval $ac_var=; unset $ac_var;} ;;
16874 esac ;;
16875 esac
16876 done
16877
bec39cab 16878 (set) 2>&1 |
81ecdfbb
RW
16879 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16880 *${as_nl}ac_space=\ *)
16881 # `set' does not quote correctly, so add quotes: double-quote
16882 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16883 sed -n \
16884 "s/'/'\\\\''/g;
16885 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16886 ;; #(
bec39cab
AC
16887 *)
16888 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16889 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16890 ;;
81ecdfbb
RW
16891 esac |
16892 sort
16893) |
bec39cab 16894 sed '
81ecdfbb 16895 /^ac_cv_env_/b end
bec39cab 16896 t clear
81ecdfbb 16897 :clear
bec39cab
AC
16898 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16899 t end
81ecdfbb
RW
16900 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16901 :end' >>confcache
16902if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16903 if test -w "$cache_file"; then
16904 test "x$cache_file" != "x/dev/null" &&
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16906$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16907 cat confcache >$cache_file
16908 else
81ecdfbb
RW
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16910$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16911 fi
16912fi
16913rm -f confcache
16914
16915test "x$prefix" = xNONE && prefix=$ac_default_prefix
16916# Let make expand exec_prefix.
16917test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16918
bec39cab
AC
16919DEFS=-DHAVE_CONFIG_H
16920
16921ac_libobjs=
16922ac_ltlibobjs=
16923for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16924 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16925 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16926 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16927 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16928 # will be set to the directory where LIBOBJS objects are built.
16929 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16930 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16931done
16932LIBOBJS=$ac_libobjs
16933
16934LTLIBOBJS=$ac_ltlibobjs
16935
16936
85981d60 16937if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16938 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16939Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16940fi
a417dc56 16941if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16942 as_fn_error "conditional \"GMAKE\" was never defined.
16943Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16944fi
783e057b 16945if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16946 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16947Usually this means the macro was only invoked conditionally." "$LINENO" 5
770d76d7
PA
16948fi
16949if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
16950 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
16951Usually this means the macro was only invoked conditionally." "$LINENO" 5
16952fi
16953if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
16954 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
16955Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16956fi
16957
16958 gl_libobjs=
16959 gl_ltlibobjs=
16960 if test -n "$gl_LIBOBJS"; then
16961 # Remove the extension.
16962 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16963 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16964 gl_libobjs="$gl_libobjs $i.$ac_objext"
16965 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16966 done
16967 fi
16968 gl_LIBOBJS=$gl_libobjs
16969
16970 gl_LTLIBOBJS=$gl_ltlibobjs
16971
16972
16973
16974 gltests_libobjs=
16975 gltests_ltlibobjs=
16976 if test -n "$gltests_LIBOBJS"; then
16977 # Remove the extension.
16978 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16979 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16980 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16981 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16982 done
16983 fi
16984 gltests_LIBOBJS=$gltests_libobjs
16985
16986 gltests_LTLIBOBJS=$gltests_ltlibobjs
16987
16988
e28b3332 16989if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16990 as_fn_error "conditional \"AMDEP\" was never defined.
16991Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16992fi
16993if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16994 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16995Usually this means the macro was only invoked conditionally." "$LINENO" 5
16996fi
16997 if test -n "$EXEEXT"; then
16998 am__EXEEXT_TRUE=
16999 am__EXEEXT_FALSE='#'
17000else
17001 am__EXEEXT_TRUE='#'
17002 am__EXEEXT_FALSE=
e28b3332 17003fi
bec39cab 17004
81ecdfbb
RW
17005
17006
bec39cab 17007: ${CONFIG_STATUS=./config.status}
81ecdfbb 17008ac_write_fail=0
bec39cab
AC
17009ac_clean_files_save=$ac_clean_files
17010ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17011{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17012$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17013as_write_fail=0
17014cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17015#! $SHELL
17016# Generated by $as_me.
17017# Run this file to recreate the current configuration.
17018# Compiler output produced by configure, useful for debugging
17019# configure, is in config.log if it exists.
17020
17021debug=false
17022ac_cs_recheck=false
17023ac_cs_silent=false
bec39cab 17024
81ecdfbb
RW
17025SHELL=\${CONFIG_SHELL-$SHELL}
17026export SHELL
17027_ASEOF
17028cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17029## -------------------- ##
17030## M4sh Initialization. ##
17031## -------------------- ##
17032
17033# Be more Bourne compatible
17034DUALCASE=1; export DUALCASE # for MKS sh
17035if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17036 emulate sh
17037 NULLCMD=:
81ecdfbb 17038 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17039 # is contrary to our usage. Disable this feature.
17040 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17041 setopt NO_GLOB_SUBST
17042else
17043 case `(set -o) 2>/dev/null` in #(
17044 *posix*) :
17045 set -o posix ;; #(
17046 *) :
17047 ;;
17048esac
bec39cab 17049fi
bec39cab 17050
81ecdfbb
RW
17051
17052as_nl='
17053'
17054export as_nl
17055# Printing a long string crashes Solaris 7 /usr/bin/printf.
17056as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17057as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17058as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17059# Prefer a ksh shell builtin over an external printf program on Solaris,
17060# but without wasting forks for bash or zsh.
17061if test -z "$BASH_VERSION$ZSH_VERSION" \
17062 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17063 as_echo='print -r --'
17064 as_echo_n='print -rn --'
17065elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17066 as_echo='printf %s\n'
17067 as_echo_n='printf %s'
17068else
17069 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17070 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17071 as_echo_n='/usr/ucb/echo -n'
17072 else
17073 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17074 as_echo_n_body='eval
17075 arg=$1;
17076 case $arg in #(
17077 *"$as_nl"*)
17078 expr "X$arg" : "X\\(.*\\)$as_nl";
17079 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17080 esac;
17081 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17082 '
17083 export as_echo_n_body
17084 as_echo_n='sh -c $as_echo_n_body as_echo'
17085 fi
17086 export as_echo_body
17087 as_echo='sh -c $as_echo_body as_echo'
17088fi
17089
17090# The user is always right.
17091if test "${PATH_SEPARATOR+set}" != set; then
17092 PATH_SEPARATOR=:
17093 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17094 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17095 PATH_SEPARATOR=';'
17096 }
bec39cab
AC
17097fi
17098
17099
81ecdfbb
RW
17100# IFS
17101# We need space, tab and new line, in precisely that order. Quoting is
17102# there to prevent editors from complaining about space-tab.
17103# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17104# splitting by setting IFS to empty value.)
17105IFS=" "" $as_nl"
17106
17107# Find who we are. Look in the path if we contain no directory separator.
17108case $0 in #((
17109 *[\\/]* ) as_myself=$0 ;;
17110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17111for as_dir in $PATH
17112do
17113 IFS=$as_save_IFS
17114 test -z "$as_dir" && as_dir=.
17115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17116 done
17117IFS=$as_save_IFS
17118
17119 ;;
17120esac
17121# We did not find ourselves, most probably we were run as `sh COMMAND'
17122# in which case we are not to be found in the path.
17123if test "x$as_myself" = x; then
17124 as_myself=$0
17125fi
17126if test ! -f "$as_myself"; then
17127 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17128 exit 1
17129fi
17130
17131# Unset variables that we do not need and which cause bugs (e.g. in
17132# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17133# suppresses any "Segmentation fault" message there. '((' could
17134# trigger a bug in pdksh 5.2.14.
17135for as_var in BASH_ENV ENV MAIL MAILPATH
17136do eval test x\${$as_var+set} = xset \
17137 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17138done
bec39cab
AC
17139PS1='$ '
17140PS2='> '
17141PS4='+ '
17142
17143# NLS nuisances.
81ecdfbb
RW
17144LC_ALL=C
17145export LC_ALL
17146LANGUAGE=C
17147export LANGUAGE
17148
17149# CDPATH.
17150(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17151
17152
17153# as_fn_error ERROR [LINENO LOG_FD]
17154# ---------------------------------
17155# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17156# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17157# script with status $?, using 1 if that was 0.
17158as_fn_error ()
17159{
17160 as_status=$?; test $as_status -eq 0 && as_status=1
17161 if test "$3"; then
17162 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17163 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17164 fi
17165 $as_echo "$as_me: error: $1" >&2
17166 as_fn_exit $as_status
17167} # as_fn_error
17168
17169
17170# as_fn_set_status STATUS
17171# -----------------------
17172# Set $? to STATUS, without forking.
17173as_fn_set_status ()
17174{
17175 return $1
17176} # as_fn_set_status
17177
17178# as_fn_exit STATUS
17179# -----------------
17180# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17181as_fn_exit ()
17182{
17183 set +e
17184 as_fn_set_status $1
17185 exit $1
17186} # as_fn_exit
17187
17188# as_fn_unset VAR
17189# ---------------
17190# Portably unset VAR.
17191as_fn_unset ()
17192{
17193 { eval $1=; unset $1;}
17194}
17195as_unset=as_fn_unset
17196# as_fn_append VAR VALUE
17197# ----------------------
17198# Append the text in VALUE to the end of the definition contained in VAR. Take
17199# advantage of any shell optimizations that allow amortized linear growth over
17200# repeated appends, instead of the typical quadratic growth present in naive
17201# implementations.
17202if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17203 eval 'as_fn_append ()
17204 {
17205 eval $1+=\$2
17206 }'
17207else
17208 as_fn_append ()
17209 {
17210 eval $1=\$$1\$2
17211 }
17212fi # as_fn_append
17213
17214# as_fn_arith ARG...
17215# ------------------
17216# Perform arithmetic evaluation on the ARGs, and store the result in the
17217# global $as_val. Take advantage of shells that can avoid forks. The arguments
17218# must be portable across $(()) and expr.
17219if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17220 eval 'as_fn_arith ()
17221 {
17222 as_val=$(( $* ))
17223 }'
17224else
17225 as_fn_arith ()
17226 {
17227 as_val=`expr "$@" || test $? -eq 1`
17228 }
17229fi # as_fn_arith
bec39cab 17230
81ecdfbb
RW
17231
17232if expr a : '\(a\)' >/dev/null 2>&1 &&
17233 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
17234 as_expr=expr
17235else
17236 as_expr=false
17237fi
17238
81ecdfbb 17239if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
17240 as_basename=basename
17241else
17242 as_basename=false
17243fi
17244
81ecdfbb
RW
17245if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17246 as_dirname=dirname
17247else
17248 as_dirname=false
17249fi
bec39cab 17250
81ecdfbb 17251as_me=`$as_basename -- "$0" ||
bec39cab
AC
17252$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17253 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
17254 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17255$as_echo X/"$0" |
17256 sed '/^.*\/\([^/][^/]*\)\/*$/{
17257 s//\1/
17258 q
17259 }
17260 /^X\/\(\/\/\)$/{
17261 s//\1/
17262 q
17263 }
17264 /^X\/\(\/\).*/{
17265 s//\1/
17266 q
17267 }
17268 s/.*/./; q'`
b4e70030 17269
b4e70030
JB
17270# Avoid depending upon Character Ranges.
17271as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17272as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17273as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17274as_cr_digits='0123456789'
17275as_cr_alnum=$as_cr_Letters$as_cr_digits
17276
81ecdfbb
RW
17277ECHO_C= ECHO_N= ECHO_T=
17278case `echo -n x` in #(((((
17279-n*)
17280 case `echo 'xy\c'` in
17281 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17282 xy) ECHO_C='\c';;
17283 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17284 ECHO_T=' ';;
17285 esac;;
17286*)
17287 ECHO_N='-n';;
bec39cab
AC
17288esac
17289
81ecdfbb
RW
17290rm -f conf$$ conf$$.exe conf$$.file
17291if test -d conf$$.dir; then
17292 rm -f conf$$.dir/conf$$.file
bec39cab 17293else
81ecdfbb
RW
17294 rm -f conf$$.dir
17295 mkdir conf$$.dir 2>/dev/null
bec39cab 17296fi
81ecdfbb
RW
17297if (echo >conf$$.file) 2>/dev/null; then
17298 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17299 as_ln_s='ln -s'
81ecdfbb
RW
17300 # ... but there are two gotchas:
17301 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17302 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17303 # In both cases, we have to default to `cp -p'.
17304 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17305 as_ln_s='cp -p'
17306 elif ln conf$$.file conf$$ 2>/dev/null; then
17307 as_ln_s=ln
17308 else
17309 as_ln_s='cp -p'
b4e70030 17310 fi
bec39cab
AC
17311else
17312 as_ln_s='cp -p'
17313fi
81ecdfbb
RW
17314rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17315rmdir conf$$.dir 2>/dev/null
17316
17317
17318# as_fn_mkdir_p
17319# -------------
17320# Create "$as_dir" as a directory, including parents if necessary.
17321as_fn_mkdir_p ()
17322{
17323
17324 case $as_dir in #(
17325 -*) as_dir=./$as_dir;;
17326 esac
17327 test -d "$as_dir" || eval $as_mkdir_p || {
17328 as_dirs=
17329 while :; do
17330 case $as_dir in #(
17331 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17332 *) as_qdir=$as_dir;;
17333 esac
17334 as_dirs="'$as_qdir' $as_dirs"
17335 as_dir=`$as_dirname -- "$as_dir" ||
17336$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17337 X"$as_dir" : 'X\(//\)[^/]' \| \
17338 X"$as_dir" : 'X\(//\)$' \| \
17339 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17340$as_echo X"$as_dir" |
17341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17342 s//\1/
17343 q
17344 }
17345 /^X\(\/\/\)[^/].*/{
17346 s//\1/
17347 q
17348 }
17349 /^X\(\/\/\)$/{
17350 s//\1/
17351 q
17352 }
17353 /^X\(\/\).*/{
17354 s//\1/
17355 q
17356 }
17357 s/.*/./; q'`
17358 test -d "$as_dir" && break
17359 done
17360 test -z "$as_dirs" || eval "mkdir $as_dirs"
17361 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17362
bec39cab 17363
81ecdfbb 17364} # as_fn_mkdir_p
bec39cab 17365if mkdir -p . 2>/dev/null; then
81ecdfbb 17366 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17367else
17368 test -d ./-p && rmdir ./-p
17369 as_mkdir_p=false
17370fi
17371
81ecdfbb
RW
17372if test -x / >/dev/null 2>&1; then
17373 as_test_x='test -x'
17374else
17375 if ls -dL / >/dev/null 2>&1; then
17376 as_ls_L_option=L
17377 else
17378 as_ls_L_option=
17379 fi
17380 as_test_x='
17381 eval sh -c '\''
17382 if test -d "$1"; then
17383 test -d "$1/.";
17384 else
17385 case $1 in #(
17386 -*)set "./$1";;
17387 esac;
17388 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17389 ???[sx]*):;;*)false;;esac;fi
17390 '\'' sh
17391 '
17392fi
17393as_executable_p=$as_test_x
bec39cab
AC
17394
17395# Sed expression to map a string onto a valid CPP name.
17396as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17397
17398# Sed expression to map a string onto a valid variable name.
17399as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17400
17401
bec39cab 17402exec 6>&1
81ecdfbb
RW
17403## ----------------------------------- ##
17404## Main body of $CONFIG_STATUS script. ##
17405## ----------------------------------- ##
17406_ASEOF
17407test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17408
17409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17410# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17411# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17412# values after options handling.
17413ac_log="
bec39cab 17414This file was extended by $as_me, which was
81ecdfbb 17415generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17416
17417 CONFIG_FILES = $CONFIG_FILES
17418 CONFIG_HEADERS = $CONFIG_HEADERS
17419 CONFIG_LINKS = $CONFIG_LINKS
17420 CONFIG_COMMANDS = $CONFIG_COMMANDS
17421 $ $0 $@
17422
81ecdfbb
RW
17423on `(hostname || uname -n) 2>/dev/null | sed 1q`
17424"
17425
bec39cab
AC
17426_ACEOF
17427
81ecdfbb
RW
17428case $ac_config_files in *"
17429"*) set x $ac_config_files; shift; ac_config_files=$*;;
17430esac
234b45d4 17431
81ecdfbb
RW
17432case $ac_config_headers in *"
17433"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17434esac
b4e70030 17435
b4e70030 17436
81ecdfbb
RW
17437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17438# Files that config.status was made for.
17439config_files="$ac_config_files"
17440config_headers="$ac_config_headers"
17441config_links="$ac_config_links"
17442config_commands="$ac_config_commands"
234b45d4 17443
81ecdfbb 17444_ACEOF
b4e70030 17445
81ecdfbb 17446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17447ac_cs_usage="\
81ecdfbb
RW
17448\`$as_me' instantiates files and other configuration actions
17449from templates according to the current configuration. Unless the files
17450and actions are specified as TAGs, all are instantiated by default.
234b45d4 17451
81ecdfbb 17452Usage: $0 [OPTION]... [TAG]...
234b45d4 17453
bec39cab 17454 -h, --help print this help, then exit
81ecdfbb
RW
17455 -V, --version print version number and configuration settings, then exit
17456 -q, --quiet, --silent
17457 do not print progress messages
bec39cab
AC
17458 -d, --debug don't remove temporary files
17459 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17460 --file=FILE[:TEMPLATE]
17461 instantiate the configuration file FILE
17462 --header=FILE[:TEMPLATE]
17463 instantiate the configuration header FILE
234b45d4 17464
bec39cab
AC
17465Configuration files:
17466$config_files
234b45d4 17467
bec39cab
AC
17468Configuration headers:
17469$config_headers
234b45d4 17470
bec39cab
AC
17471Configuration links:
17472$config_links
234b45d4 17473
bec39cab
AC
17474Configuration commands:
17475$config_commands
17476
81ecdfbb 17477Report bugs to the package provider."
b4e70030 17478
81ecdfbb
RW
17479_ACEOF
17480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17481ac_cs_version="\\
17482config.status
81ecdfbb
RW
17483configured by $0, generated by GNU Autoconf 2.64,
17484 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17485
81ecdfbb 17486Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17487This config.status script is free software; the Free Software Foundation
17488gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17489
17490ac_pwd='$ac_pwd'
17491srcdir='$srcdir'
17492INSTALL='$INSTALL'
17493MKDIR_P='$MKDIR_P'
17494AWK='$AWK'
17495test -n "\$AWK" || AWK=awk
bec39cab
AC
17496_ACEOF
17497
81ecdfbb
RW
17498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17499# The default lists apply if the user does not specify any file.
bec39cab
AC
17500ac_need_defaults=:
17501while test $# != 0
17502do
17503 case $1 in
17504 --*=*)
81ecdfbb
RW
17505 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17506 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17507 ac_shift=:
c906108c 17508 ;;
81ecdfbb 17509 *)
bec39cab
AC
17510 ac_option=$1
17511 ac_optarg=$2
17512 ac_shift=shift
c906108c 17513 ;;
bec39cab 17514 esac
c906108c 17515
bec39cab
AC
17516 case $ac_option in
17517 # Handling of the options.
bec39cab
AC
17518 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17519 ac_cs_recheck=: ;;
81ecdfbb
RW
17520 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17521 $as_echo "$ac_cs_version"; exit ;;
17522 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17523 debug=: ;;
17524 --file | --fil | --fi | --f )
17525 $ac_shift
81ecdfbb
RW
17526 case $ac_optarg in
17527 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17528 esac
17529 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17530 ac_need_defaults=false;;
17531 --header | --heade | --head | --hea )
17532 $ac_shift
81ecdfbb
RW
17533 case $ac_optarg in
17534 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17535 esac
17536 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17537 ac_need_defaults=false;;
81ecdfbb
RW
17538 --he | --h)
17539 # Conflict between --help and --header
17540 as_fn_error "ambiguous option: \`$1'
17541Try \`$0 --help' for more information.";;
17542 --help | --hel | -h )
17543 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17544 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17545 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17546 ac_cs_silent=: ;;
c906108c 17547
bec39cab 17548 # This is an error.
81ecdfbb
RW
17549 -*) as_fn_error "unrecognized option: \`$1'
17550Try \`$0 --help' for more information." ;;
c906108c 17551
81ecdfbb
RW
17552 *) as_fn_append ac_config_targets " $1"
17553 ac_need_defaults=false ;;
c906108c 17554
bec39cab
AC
17555 esac
17556 shift
17557done
c906108c 17558
bec39cab 17559ac_configure_extra_args=
c906108c 17560
bec39cab
AC
17561if $ac_cs_silent; then
17562 exec 6>/dev/null
17563 ac_configure_extra_args="$ac_configure_extra_args --silent"
17564fi
c906108c 17565
bec39cab 17566_ACEOF
81ecdfbb 17567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17568if \$ac_cs_recheck; then
81ecdfbb
RW
17569 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17570 shift
17571 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17572 CONFIG_SHELL='$SHELL'
17573 export CONFIG_SHELL
17574 exec "\$@"
bec39cab
AC
17575fi
17576
17577_ACEOF
81ecdfbb
RW
17578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17579exec 5>>config.log
17580{
17581 echo
17582 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17583## Running $as_me. ##
17584_ASBOX
17585 $as_echo "$ac_log"
17586} >&5
bec39cab 17587
81ecdfbb
RW
17588_ACEOF
17589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17590#
81ecdfbb 17591# INIT-COMMANDS
c906108c 17592#
a417dc56 17593ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 17594AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 17595
bec39cab
AC
17596_ACEOF
17597
81ecdfbb 17598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17599
81ecdfbb 17600# Handling of arguments.
bec39cab 17601for ac_config_target in $ac_config_targets
c906108c 17602do
81ecdfbb
RW
17603 case $ac_config_target in
17604 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17605 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
17606 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 17607 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
17608 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
17609 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17610 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17611 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 17612 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 17613 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17614 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17615
17616 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17617 esac
17618done
17619
81ecdfbb 17620
bec39cab
AC
17621# If the user did not use the arguments to specify the items to instantiate,
17622# then the envvar interface is used. Set only those that are not.
17623# We use the long form for the default assignment because of an extremely
17624# bizarre bug on SunOS 4.1.3.
17625if $ac_need_defaults; then
17626 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17627 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17628 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17629 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17630fi
17631
b4e70030 17632# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17633# simply because there is no reason against having it here, and in addition,
b4e70030 17634# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17635# Hook for its removal unless debugging.
17636# Note that there is a small window in which the directory will not be cleaned:
17637# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17638$debug ||
17639{
81ecdfbb
RW
17640 tmp=
17641 trap 'exit_status=$?
17642 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17643' 0
17644 trap 'as_fn_exit 1' 1 2 13 15
17645}
17646# Create a (secure) tmp directory for tmp files.
17647
17648{
17649 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17650 test -n "$tmp" && test -d "$tmp"
17651} ||
17652{
17653 tmp=./conf$$-$RANDOM
17654 (umask 077 && mkdir "$tmp")
17655} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17656
17657# Set up the scripts for CONFIG_FILES section.
17658# No need to generate them if there are no CONFIG_FILES.
17659# This happens for instance with `./config.status config.h'.
17660if test -n "$CONFIG_FILES"; then
17661
17662if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17663 ac_cs_awk_getline=:
17664 ac_cs_awk_pipe_init=
17665 ac_cs_awk_read_file='
17666 while ((getline aline < (F[key])) > 0)
17667 print(aline)
17668 close(F[key])'
17669 ac_cs_awk_pipe_fini=
17670else
17671 ac_cs_awk_getline=false
17672 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17673 ac_cs_awk_read_file='
17674 print "|#_!!_#|"
17675 print "cat " F[key] " &&"
17676 '$ac_cs_awk_pipe_init
17677 # The final `:' finishes the AND list.
17678 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17679fi
17680ac_cr=`echo X | tr X '\015'`
17681# On cygwin, bash can eat \r inside `` if the user requested igncr.
17682# But we know of no other shell where ac_cr would be empty at this
17683# point, so we can use a bashism as a fallback.
17684if test "x$ac_cr" = x; then
17685 eval ac_cr=\$\'\\r\'
17686fi
17687ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17688if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17689 ac_cs_awk_cr='\r'
17690else
17691 ac_cs_awk_cr=$ac_cr
17692fi
17693
17694echo 'BEGIN {' >"$tmp/subs1.awk" &&
17695_ACEOF
17696
17697# Create commands to substitute file output variables.
17698{
17699 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17700 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17701 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17702 echo "_ACAWK" &&
17703 echo "_ACEOF"
17704} >conf$$files.sh &&
17705. ./conf$$files.sh ||
17706 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17707rm -f conf$$files.sh
17708
17709{
17710 echo "cat >conf$$subs.awk <<_ACEOF" &&
17711 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17712 echo "_ACEOF"
17713} >conf$$subs.sh ||
17714 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17715ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17716ac_delim='%!_!# '
17717for ac_last_try in false false false false false :; do
17718 . ./conf$$subs.sh ||
17719 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17720
17721 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17722 if test $ac_delim_n = $ac_delim_num; then
17723 break
17724 elif $ac_last_try; then
17725 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17726 else
17727 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17728 fi
17729done
17730rm -f conf$$subs.sh
17731
17732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17733cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17734_ACEOF
17735sed -n '
17736h
17737s/^/S["/; s/!.*/"]=/
17738p
17739g
17740s/^[^!]*!//
17741:repl
17742t repl
17743s/'"$ac_delim"'$//
17744t delim
17745:nl
17746h
17747s/\(.\{148\}\).*/\1/
17748t more1
17749s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17750p
17751n
17752b repl
17753:more1
17754s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17755p
17756g
17757s/.\{148\}//
17758t nl
17759:delim
17760h
17761s/\(.\{148\}\).*/\1/
17762t more2
17763s/["\\]/\\&/g; s/^/"/; s/$/"/
17764p
17765b
17766:more2
17767s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17768p
17769g
17770s/.\{148\}//
17771t delim
17772' <conf$$subs.awk | sed '
17773/^[^""]/{
17774 N
17775 s/\n//
17776}
17777' >>$CONFIG_STATUS || ac_write_fail=1
17778rm -f conf$$subs.awk
17779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17780_ACAWK
17781cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17782 for (key in S) S_is_set[key] = 1
17783 FS = "\a"
17784 \$ac_cs_awk_pipe_init
17785}
17786{
17787 line = $ 0
17788 nfields = split(line, field, "@")
17789 substed = 0
17790 len = length(field[1])
17791 for (i = 2; i < nfields; i++) {
17792 key = field[i]
17793 keylen = length(key)
17794 if (S_is_set[key]) {
17795 value = S[key]
17796 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17797 len += length(value) + length(field[++i])
17798 substed = 1
17799 } else
17800 len += 1 + keylen
17801 }
17802 if (nfields == 3 && !substed) {
17803 key = field[2]
17804 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17805 \$ac_cs_awk_read_file
17806 next
17807 }
17808 }
17809 print line
b4e70030 17810}
81ecdfbb
RW
17811\$ac_cs_awk_pipe_fini
17812_ACAWK
17813_ACEOF
17814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17815if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17816 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17817else
17818 cat
17819fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17820 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17821_ACEOF
17822
17823# VPATH may cause trouble with some makes, so we remove $(srcdir),
17824# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17825# trailing colons and then remove the whole line if VPATH becomes empty
17826# (actually we leave an empty line to preserve line numbers).
17827if test "x$srcdir" = x.; then
17828 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17829s/:*\$(srcdir):*/:/
17830s/:*\${srcdir}:*/:/
17831s/:*@srcdir@:*/:/
17832s/^\([^=]*=[ ]*\):*/\1/
17833s/:*$//
17834s/^[^=]*=[ ]*$//
17835}'
17836fi
17837
17838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17839fi # test -n "$CONFIG_FILES"
17840
17841# Set up the scripts for CONFIG_HEADERS section.
17842# No need to generate them if there are no CONFIG_HEADERS.
17843# This happens for instance with `./config.status Makefile'.
17844if test -n "$CONFIG_HEADERS"; then
17845cat >"$tmp/defines.awk" <<\_ACAWK ||
17846BEGIN {
17847_ACEOF
17848
17849# Transform confdefs.h into an awk script `defines.awk', embedded as
17850# here-document in config.status, that substitutes the proper values into
17851# config.h.in to produce config.h.
4e8d927d 17852
81ecdfbb
RW
17853# Create a delimiter string that does not exist in confdefs.h, to ease
17854# handling of long lines.
17855ac_delim='%!_!# '
17856for ac_last_try in false false :; do
17857 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17858 if test -z "$ac_t"; then
17859 break
17860 elif $ac_last_try; then
17861 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17862 else
17863 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17864 fi
17865done
4e8d927d 17866
81ecdfbb
RW
17867# For the awk script, D is an array of macro values keyed by name,
17868# likewise P contains macro parameters if any. Preserve backslash
17869# newline sequences.
17870
17871ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17872sed -n '
17873s/.\{148\}/&'"$ac_delim"'/g
17874t rset
17875:rset
17876s/^[ ]*#[ ]*define[ ][ ]*/ /
17877t def
17878d
17879:def
17880s/\\$//
17881t bsnl
17882s/["\\]/\\&/g
17883s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17884D["\1"]=" \3"/p
17885s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17886d
17887:bsnl
17888s/["\\]/\\&/g
17889s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17890D["\1"]=" \3\\\\\\n"\\/p
17891t cont
17892s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17893t cont
17894d
17895:cont
17896n
17897s/.\{148\}/&'"$ac_delim"'/g
17898t clear
17899:clear
17900s/\\$//
17901t bsnlc
17902s/["\\]/\\&/g; s/^/"/; s/$/"/p
17903d
17904:bsnlc
17905s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17906b cont
17907' <confdefs.h | sed '
17908s/'"$ac_delim"'/"\\\
17909"/g' >>$CONFIG_STATUS || ac_write_fail=1
17910
17911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17912 for (key in D) D_is_set[key] = 1
17913 FS = "\a"
17914}
17915/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17916 line = \$ 0
17917 split(line, arg, " ")
17918 if (arg[1] == "#") {
17919 defundef = arg[2]
17920 mac1 = arg[3]
17921 } else {
17922 defundef = substr(arg[1], 2)
17923 mac1 = arg[2]
17924 }
17925 split(mac1, mac2, "(") #)
17926 macro = mac2[1]
17927 prefix = substr(line, 1, index(line, defundef) - 1)
17928 if (D_is_set[macro]) {
17929 # Preserve the white space surrounding the "#".
17930 print prefix "define", macro P[macro] D[macro]
17931 next
17932 } else {
17933 # Replace #undef with comments. This is necessary, for example,
17934 # in the case of _POSIX_SOURCE, which is predefined and required
17935 # on some systems where configure will not decide to define it.
17936 if (defundef == "undef") {
17937 print "/*", prefix defundef, macro, "*/"
17938 next
17939 }
17940 }
b4e70030 17941}
81ecdfbb
RW
17942{ print }
17943_ACAWK
b4e70030 17944_ACEOF
81ecdfbb
RW
17945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17946 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17947fi # test -n "$CONFIG_HEADERS"
4e8d927d 17948
4e8d927d 17949
81ecdfbb
RW
17950eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17951shift
17952for ac_tag
17953do
17954 case $ac_tag in
17955 :[FHLC]) ac_mode=$ac_tag; continue;;
17956 esac
17957 case $ac_mode$ac_tag in
17958 :[FHL]*:*);;
17959 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17960 :[FH]-) ac_tag=-:-;;
17961 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17962 esac
17963 ac_save_IFS=$IFS
17964 IFS=:
17965 set x $ac_tag
17966 IFS=$ac_save_IFS
17967 shift
17968 ac_file=$1
17969 shift
4e8d927d 17970
81ecdfbb
RW
17971 case $ac_mode in
17972 :L) ac_source=$1;;
17973 :[FH])
17974 ac_file_inputs=
17975 for ac_f
17976 do
17977 case $ac_f in
17978 -) ac_f="$tmp/stdin";;
17979 *) # Look for the file first in the build tree, then in the source tree
17980 # (if the path is not absolute). The absolute path cannot be DOS-style,
17981 # because $ac_f cannot contain `:'.
17982 test -f "$ac_f" ||
17983 case $ac_f in
17984 [\\/$]*) false;;
17985 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17986 esac ||
17987 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17988 esac
17989 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17990 as_fn_append ac_file_inputs " '$ac_f'"
17991 done
17992
17993 # Let's still pretend it is `configure' which instantiates (i.e., don't
17994 # use $as_me), people would be surprised to read:
17995 # /* config.h. Generated by config.status. */
17996 configure_input='Generated from '`
17997 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17998 `' by configure.'
17999 if test x"$ac_file" != x-; then
18000 configure_input="$ac_file. $configure_input"
18001 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18002$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18003 fi
81ecdfbb
RW
18004 # Neutralize special characters interpreted by sed in replacement strings.
18005 case $configure_input in #(
18006 *\&* | *\|* | *\\* )
18007 ac_sed_conf_input=`$as_echo "$configure_input" |
18008 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18009 *) ac_sed_conf_input=$configure_input;;
18010 esac
4e8d927d 18011
81ecdfbb
RW
18012 case $ac_tag in
18013 *:-:* | *:-) cat >"$tmp/stdin" \
18014 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18015 esac
18016 ;;
c906108c
SS
18017 esac
18018
81ecdfbb 18019 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18020$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18021 X"$ac_file" : 'X\(//\)[^/]' \| \
18022 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18023 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18024$as_echo X"$ac_file" |
18025 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18026 s//\1/
18027 q
18028 }
18029 /^X\(\/\/\)[^/].*/{
18030 s//\1/
18031 q
18032 }
18033 /^X\(\/\/\)$/{
18034 s//\1/
18035 q
18036 }
18037 /^X\(\/\).*/{
18038 s//\1/
18039 q
18040 }
18041 s/.*/./; q'`
18042 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18043 ac_builddir=.
18044
81ecdfbb
RW
18045case "$ac_dir" in
18046.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18047*)
18048 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18049 # A ".." for each directory in $ac_dir_suffix.
18050 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18051 case $ac_top_builddir_sub in
18052 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18053 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18054 esac ;;
18055esac
18056ac_abs_top_builddir=$ac_pwd
18057ac_abs_builddir=$ac_pwd$ac_dir_suffix
18058# for backward compatibility:
18059ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18060
18061case $srcdir in
81ecdfbb 18062 .) # We are building in place.
bec39cab 18063 ac_srcdir=.
81ecdfbb
RW
18064 ac_top_srcdir=$ac_top_builddir_sub
18065 ac_abs_top_srcdir=$ac_pwd ;;
18066 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18067 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18068 ac_top_srcdir=$srcdir
18069 ac_abs_top_srcdir=$srcdir ;;
18070 *) # Relative name.
18071 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18072 ac_top_srcdir=$ac_top_build_prefix$srcdir
18073 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18074esac
81ecdfbb 18075ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18076
c906108c 18077
81ecdfbb
RW
18078 case $ac_mode in
18079 :F)
18080 #
18081 # CONFIG_FILE
18082 #
c906108c 18083
bec39cab
AC
18084 case $INSTALL in
18085 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18086 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18087 esac
81ecdfbb
RW
18088 ac_MKDIR_P=$MKDIR_P
18089 case $MKDIR_P in
18090 [\\/$]* | ?:[\\/]* ) ;;
18091 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18092 esac
18093_ACEOF
121ce6e5 18094
81ecdfbb
RW
18095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18096# If the template does not know about datarootdir, expand it.
18097# FIXME: This hack should be removed a few years after 2.60.
18098ac_datarootdir_hack=; ac_datarootdir_seen=
18099ac_sed_dataroot='
18100/datarootdir/ {
18101 p
18102 q
18103}
18104/@datadir@/p
18105/@docdir@/p
18106/@infodir@/p
18107/@localedir@/p
18108/@mandir@/p'
18109case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18110*datarootdir*) ac_datarootdir_seen=yes;;
18111*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18113$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18114_ACEOF
18115cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18116 ac_datarootdir_hack='
18117 s&@datadir@&$datadir&g
18118 s&@docdir@&$docdir&g
18119 s&@infodir@&$infodir&g
18120 s&@localedir@&$localedir&g
18121 s&@mandir@&$mandir&g
18122 s&\\\${datarootdir}&$datarootdir&g' ;;
18123esac
4e8d927d 18124_ACEOF
81ecdfbb
RW
18125
18126# Neutralize VPATH when `$srcdir' = `.'.
18127# Shell code in configure.ac might set extrasub.
18128# FIXME: do we really want to maintain this feature?
18129cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18130ac_sed_extra="$ac_vpsub
bec39cab
AC
18131$extrasub
18132_ACEOF
81ecdfbb 18133cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18134:t
18135/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18136s|@configure_input@|$ac_sed_conf_input|;t t
18137s&@top_builddir@&$ac_top_builddir_sub&;t t
18138s&@top_build_prefix@&$ac_top_build_prefix&;t t
18139s&@srcdir@&$ac_srcdir&;t t
18140s&@abs_srcdir@&$ac_abs_srcdir&;t t
18141s&@top_srcdir@&$ac_top_srcdir&;t t
18142s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18143s&@builddir@&$ac_builddir&;t t
18144s&@abs_builddir@&$ac_abs_builddir&;t t
18145s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18146s&@INSTALL@&$ac_INSTALL&;t t
18147s&@MKDIR_P@&$ac_MKDIR_P&;t t
18148$ac_datarootdir_hack
18149"
18150eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18151if $ac_cs_awk_getline; then
18152 $AWK -f "$tmp/subs.awk"
18153else
18154 $AWK -f "$tmp/subs.awk" | $SHELL
18155fi >$tmp/out \
18156 || as_fn_error "could not create $ac_file" "$LINENO" 5
18157
18158test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18159 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18160 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18162which seems to be undefined. Please make sure it is defined." >&5
18163$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18164which seems to be undefined. Please make sure it is defined." >&2;}
18165
18166 rm -f "$tmp/stdin"
bec39cab 18167 case $ac_file in
81ecdfbb
RW
18168 -) cat "$tmp/out" && rm -f "$tmp/out";;
18169 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18170 esac \
18171 || as_fn_error "could not create $ac_file" "$LINENO" 5
18172 ;;
18173 :H)
18174 #
18175 # CONFIG_HEADER
18176 #
bec39cab 18177 if test x"$ac_file" != x-; then
81ecdfbb
RW
18178 {
18179 $as_echo "/* $configure_input */" \
18180 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18181 } >"$tmp/config.h" \
18182 || as_fn_error "could not create $ac_file" "$LINENO" 5
18183 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18185$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18186 else
81ecdfbb
RW
18187 rm -f "$ac_file"
18188 mv "$tmp/config.h" "$ac_file" \
18189 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18190 fi
18191 else
81ecdfbb
RW
18192 $as_echo "/* $configure_input */" \
18193 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18194 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18195 fi
81ecdfbb
RW
18196# Compute "$ac_file"'s index in $config_headers.
18197_am_arg="$ac_file"
e28b3332
DJ
18198_am_stamp_count=1
18199for _am_header in $config_headers :; do
18200 case $_am_header in
81ecdfbb 18201 $_am_arg | $_am_arg:* )
e28b3332
DJ
18202 break ;;
18203 * )
18204 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
18205 esac
18206done
81ecdfbb
RW
18207echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
18208$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18209 X"$_am_arg" : 'X\(//\)[^/]' \| \
18210 X"$_am_arg" : 'X\(//\)$' \| \
18211 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
18212$as_echo X"$_am_arg" |
18213 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18214 s//\1/
18215 q
18216 }
18217 /^X\(\/\/\)[^/].*/{
18218 s//\1/
18219 q
18220 }
18221 /^X\(\/\/\)$/{
18222 s//\1/
18223 q
18224 }
18225 /^X\(\/\).*/{
18226 s//\1/
18227 q
18228 }
18229 s/.*/./; q'`/stamp-h$_am_stamp_count
18230 ;;
18231 :L)
18232 #
18233 # CONFIG_LINK
18234 #
c906108c 18235
81ecdfbb
RW
18236 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18237 :
b4e70030 18238 else
81ecdfbb
RW
18239 # Prefer the file from the source tree if names are identical.
18240 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18241 ac_source=$srcdir/$ac_source
18242 fi
b4e70030 18243
81ecdfbb
RW
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18245$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18246
81ecdfbb
RW
18247 if test ! -r "$ac_source"; then
18248 as_fn_error "$ac_source: file not found" "$LINENO" 5
18249 fi
18250 rm -f "$ac_file"
bec39cab 18251
81ecdfbb
RW
18252 # Try a relative symlink, then a hard link, then a copy.
18253 case $srcdir in
18254 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18255 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18256 esac
18257 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18258 ln "$ac_source" "$ac_file" 2>/dev/null ||
18259 cp -p "$ac_source" "$ac_file" ||
18260 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18261 fi
18262 ;;
18263 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18264$as_echo "$as_me: executing $ac_file commands" >&6;}
18265 ;;
c906108c 18266 esac
b4e70030 18267
bec39cab 18268
81ecdfbb
RW
18269 case $ac_file$ac_mode in
18270 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
18271 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
18272 # Autoconf 2.62 quotes --file arguments for eval, but not when files
18273 # are listed without --file. Let's play safe and only enable the eval
18274 # if we detect the quoting.
18275 case $CONFIG_FILES in
18276 *\'*) eval set x "$CONFIG_FILES" ;;
18277 *) set x $CONFIG_FILES ;;
18278 esac
18279 shift
18280 for mf
18281 do
18282 # Strip MF so we end up with the name of the file.
18283 mf=`echo "$mf" | sed -e 's/:.*$//'`
18284 # Check whether this is an Automake generated Makefile or not.
18285 # We used to match only the files named `Makefile.in', but
18286 # some people rename them; so instead we look at the file content.
18287 # Grep'ing the first line is not enough: some people post-process
18288 # each Makefile.in and add a new line on top of each file to say so.
18289 # Grep'ing the whole file is not good either: AIX grep has a line
18290 # limit of 2048, but all sed's we know have understand at least 4000.
18291 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
18292 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
18293$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18294 X"$mf" : 'X\(//\)[^/]' \| \
18295 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
18296 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
18297$as_echo X"$mf" |
18298 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18299 s//\1/
18300 q
18301 }
18302 /^X\(\/\/\)[^/].*/{
18303 s//\1/
18304 q
18305 }
18306 /^X\(\/\/\)$/{
18307 s//\1/
18308 q
18309 }
18310 /^X\(\/\).*/{
18311 s//\1/
18312 q
18313 }
18314 s/.*/./; q'`
18315 else
18316 continue
18317 fi
18318 # Extract the definition of DEPDIR, am__include, and am__quote
18319 # from the Makefile without running `make'.
18320 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
18321 test -z "$DEPDIR" && continue
18322 am__include=`sed -n 's/^am__include = //p' < "$mf"`
18323 test -z "am__include" && continue
18324 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
18325 # When using ansi2knr, U may be empty or an underscore; expand it
18326 U=`sed -n 's/^U = //p' < "$mf"`
18327 # Find all dependency output files, they are included files with
18328 # $(DEPDIR) in their names. We invoke sed twice because it is the
18329 # simplest approach to changing $(DEPDIR) to its actual value in the
18330 # expansion.
18331 for file in `sed -n "
18332 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
18333 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
18334 # Make sure the directory exists.
18335 test -f "$dirpart/$file" && continue
18336 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
18337$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18338 X"$file" : 'X\(//\)[^/]' \| \
18339 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
18340 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
18341$as_echo X"$file" |
18342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18343 s//\1/
18344 q
18345 }
18346 /^X\(\/\/\)[^/].*/{
18347 s//\1/
18348 q
18349 }
18350 /^X\(\/\/\)$/{
18351 s//\1/
18352 q
18353 }
18354 /^X\(\/\).*/{
18355 s//\1/
18356 q
18357 }
18358 s/.*/./; q'`
18359 as_dir=$dirpart/$fdir; as_fn_mkdir_p
18360 # echo "creating $dirpart/$file"
18361 echo '# dummy' > "$dirpart/$file"
e28b3332 18362 done
e28b3332 18363 done
81ecdfbb 18364}
4e8d927d 18365 ;;
81ecdfbb 18366 "default":C)
c906108c
SS
18367case x$CONFIG_HEADERS in
18368xconfig.h:config.in)
18369echo > stamp-h ;;
18370esac
bec39cab 18371 ;;
81ecdfbb 18372
bec39cab 18373 esac
81ecdfbb 18374done # for ac_tag
c906108c 18375
bec39cab 18376
81ecdfbb 18377as_fn_exit 0
bec39cab 18378_ACEOF
bec39cab
AC
18379ac_clean_files=$ac_clean_files_save
18380
81ecdfbb
RW
18381test $ac_write_fail = 0 ||
18382 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18383
bec39cab
AC
18384
18385# configure is writing to config.log, and then calls config.status.
18386# config.status does its own redirection, appending to config.log.
18387# Unfortunately, on DOS this fails, as config.log is still kept open
18388# by configure, so config.status won't be able to write to it; its
18389# output is simply discarded. So we exec the FD to /dev/null,
18390# effectively closing config.log, so it can be properly (re)opened and
18391# appended to by config.status. When coming back to configure, we
18392# need to make the FD available again.
18393if test "$no_create" != yes; then
18394 ac_cs_success=:
18395 ac_config_status_args=
18396 test "$silent" = yes &&
18397 ac_config_status_args="$ac_config_status_args --quiet"
18398 exec 5>/dev/null
18399 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18400 exec 5>>config.log
18401 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18402 # would make configure fail if this is the last instruction.
81ecdfbb 18403 $ac_cs_success || as_fn_exit $?
bec39cab 18404fi
c906108c 18405
bec39cab 18406#
81ecdfbb 18407# CONFIG_SUBDIRS section.
bec39cab 18408#
c906108c
SS
18409if test "$no_recursion" != yes; then
18410
81ecdfbb
RW
18411 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18412 # so they do not pile up.
c906108c
SS
18413 ac_sub_configure_args=
18414 ac_prev=
fdc59709
PB
18415 eval "set x $ac_configure_args"
18416 shift
18417 for ac_arg
18418 do
c906108c
SS
18419 if test -n "$ac_prev"; then
18420 ac_prev=
18421 continue
18422 fi
bec39cab 18423 case $ac_arg in
c906108c
SS
18424 -cache-file | --cache-file | --cache-fil | --cache-fi \
18425 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18426 ac_prev=cache_file ;;
18427 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18428 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18429 | --c=*)
18430 ;;
18431 --config-cache | -C)
c906108c
SS
18432 ;;
18433 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18434 ac_prev=srcdir ;;
18435 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18436 ;;
bec39cab
AC
18437 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18438 ac_prev=prefix ;;
18439 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18440 ;;
81ecdfbb
RW
18441 --disable-option-checking)
18442 ;;
fdc59709
PB
18443 *)
18444 case $ac_arg in
81ecdfbb 18445 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18446 esac
81ecdfbb 18447 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18448 esac
18449 done
18450
bec39cab
AC
18451 # Always prepend --prefix to ensure using the same prefix
18452 # in subdir configurations.
fdc59709
PB
18453 ac_arg="--prefix=$prefix"
18454 case $ac_arg in
81ecdfbb 18455 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18456 esac
81ecdfbb
RW
18457 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18458
18459 # Pass --silent
18460 if test "$silent" = yes; then
18461 ac_sub_configure_args="--silent $ac_sub_configure_args"
18462 fi
18463
18464 # Always prepend --disable-option-checking to silence warnings, since
18465 # different subdirs can have different --enable and --with options.
18466 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18467
b4e70030 18468 ac_popdir=`pwd`
bec39cab 18469 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18470
18471 # Do not complain, so a configure script can configure whichever
18472 # parts of a large source tree are present.
fdc59709 18473 test -d "$srcdir/$ac_dir" || continue
c906108c 18474
81ecdfbb
RW
18475 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18476 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18477 $as_echo "$ac_msg" >&6
18478 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18479 ac_builddir=.
18480
81ecdfbb
RW
18481case "$ac_dir" in
18482.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18483*)
18484 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18485 # A ".." for each directory in $ac_dir_suffix.
18486 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18487 case $ac_top_builddir_sub in
18488 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18489 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18490 esac ;;
18491esac
18492ac_abs_top_builddir=$ac_pwd
18493ac_abs_builddir=$ac_pwd$ac_dir_suffix
18494# for backward compatibility:
18495ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18496
18497case $srcdir in
81ecdfbb 18498 .) # We are building in place.
bec39cab 18499 ac_srcdir=.
81ecdfbb
RW
18500 ac_top_srcdir=$ac_top_builddir_sub
18501 ac_abs_top_srcdir=$ac_pwd ;;
18502 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18503 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18504 ac_top_srcdir=$srcdir
18505 ac_abs_top_srcdir=$srcdir ;;
18506 *) # Relative name.
18507 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18508 ac_top_srcdir=$ac_top_build_prefix$srcdir
18509 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18510esac
81ecdfbb 18511ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18512
c906108c 18513
fdc59709 18514 cd "$ac_dir"
c906108c
SS
18515
18516 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18517 if test -f "$ac_srcdir/configure.gnu"; then
18518 ac_sub_configure=$ac_srcdir/configure.gnu
18519 elif test -f "$ac_srcdir/configure"; then
18520 ac_sub_configure=$ac_srcdir/configure
18521 elif test -f "$ac_srcdir/configure.in"; then
18522 # This should be Cygnus configure.
18523 ac_sub_configure=$ac_aux_dir/configure
c906108c 18524 else
81ecdfbb
RW
18525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18526$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18527 ac_sub_configure=
18528 fi
18529
18530 # The recursion is here.
18531 if test -n "$ac_sub_configure"; then
c906108c 18532 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18533 case $cache_file in
18534 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18535 *) # Relative name.
18536 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18537 esac
c906108c 18538
81ecdfbb
RW
18539 { $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
18540$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18541 # The eval makes quoting arguments work.
fdc59709
PB
18542 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18543 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18544 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18545 fi
18546
fdc59709 18547 cd "$ac_popdir"
c906108c
SS
18548 done
18549fi
81ecdfbb
RW
18550if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18552$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18553fi
c906108c
SS
18554
18555
18556exit 0
This page took 2.952495 seconds and 4 git commands to generate.