2012-02-21 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
677AR
678YFLAGS
679YACC
680LN_S
681REPORT_BUGS_TEXI
682REPORT_BUGS_TO
683PKGVERSION
684TARGET_OBS
685subdirs
686GDB_DATADIR
687DEBUGDIR
688am__fastdepCC_FALSE
689am__fastdepCC_TRUE
690AMDEPBACKSLASH
691AMDEP_FALSE
692AMDEP_TRUE
693am__quote
694am__include
695am__untar
696am__tar
697AMTAR
698AWK
699mkdir_p
700MKDIR_P
701INSTALL_STRIP_PROGRAM
702STRIP
703install_sh
81ecdfbb
RW
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709CYGPATH_W
710am__isrc
711INSTALL_DATA
712INSTALL_SCRIPT
713INSTALL_PROGRAM
5048e516
JK
714MAKEINFO_EXTRA_FLAGS
715MAKEINFOFLAGS
716MAKEINFO
81ecdfbb
RW
717PACKAGE
718GNULIB_STDINT_H
719LIBGNU_LTLIBDEPS
720LIBGNU_LIBDEPS
f434ba03
PA
721gltests_WITNESS
722HAVE_WINT_T
81ecdfbb 723HAVE_WCHAR_H
f434ba03
PA
724NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
725NEXT_WCHAR_H
81ecdfbb 726REPLACE_WCWIDTH
f434ba03
PA
727REPLACE_WCSNRTOMBS
728REPLACE_WCSRTOMBS
729REPLACE_WCRTOMB
730REPLACE_MBSNRTOWCS
731REPLACE_MBSRTOWCS
732REPLACE_MBRLEN
733REPLACE_MBRTOWC
734REPLACE_MBSINIT
735REPLACE_WCTOB
736REPLACE_BTOWC
737REPLACE_MBSTATE_T
81ecdfbb 738HAVE_DECL_WCWIDTH
f434ba03
PA
739HAVE_DECL_WCTOB
740HAVE_WCSNRTOMBS
741HAVE_WCSRTOMBS
742HAVE_WCRTOMB
743HAVE_MBSNRTOWCS
744HAVE_MBSRTOWCS
745HAVE_MBRLEN
746HAVE_MBRTOWC
747HAVE_MBSINIT
748HAVE_BTOWC
81ecdfbb 749GNULIB_WCWIDTH
f434ba03
PA
750GNULIB_WCSNRTOMBS
751GNULIB_WCSRTOMBS
752GNULIB_WCRTOMB
753GNULIB_MBSNRTOWCS
754GNULIB_MBSRTOWCS
755GNULIB_MBRLEN
756GNULIB_MBRTOWC
757GNULIB_MBSINIT
758GNULIB_WCTOB
759GNULIB_BTOWC
760NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
761NEXT_STRING_H
762STDINT_H
763WINT_T_SUFFIX
764WCHAR_T_SUFFIX
81ecdfbb 765SIG_ATOMIC_T_SUFFIX
f434ba03 766SIZE_T_SUFFIX
81ecdfbb
RW
767PTRDIFF_T_SUFFIX
768HAVE_SIGNED_WINT_T
769HAVE_SIGNED_WCHAR_T
770HAVE_SIGNED_SIG_ATOMIC_T
771BITSIZEOF_WINT_T
772BITSIZEOF_WCHAR_T
81ecdfbb 773BITSIZEOF_SIG_ATOMIC_T
f434ba03 774BITSIZEOF_SIZE_T
81ecdfbb
RW
775BITSIZEOF_PTRDIFF_T
776HAVE_SYS_BITYPES_H
777HAVE_SYS_INTTYPES_H
778HAVE_STDINT_H
f434ba03 779NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 780NEXT_STDINT_H
81ecdfbb
RW
781HAVE_SYS_TYPES_H
782HAVE_INTTYPES_H
783HAVE_UNSIGNED_LONG_LONG_INT
784HAVE_LONG_LONG_INT
f434ba03
PA
785NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
786NEXT_STDDEF_H
787PRAGMA_SYSTEM_HEADER
788INCLUDE_NEXT_AS_FIRST_DIRECTIVE
789INCLUDE_NEXT
790STDDEF_H
791HAVE_WCHAR_T
792REPLACE_NULL
793APPLE_UNIVERSAL_BUILD
794UNDEFINE_STRTOK_R
795REPLACE_STRTOK_R
81ecdfbb 796REPLACE_STRSIGNAL
f434ba03
PA
797REPLACE_STRNLEN
798REPLACE_STRNDUP
799REPLACE_STRNCAT
81ecdfbb 800REPLACE_STRERROR
f434ba03
PA
801REPLACE_STRCASESTR
802REPLACE_STRSTR
803REPLACE_STRDUP
804REPLACE_STPNCPY
805REPLACE_MEMMEM
806REPLACE_MEMCHR
807HAVE_STRVERSCMP
81ecdfbb 808HAVE_DECL_STRSIGNAL
81ecdfbb
RW
809HAVE_DECL_STRTOK_R
810HAVE_STRCASESTR
811HAVE_STRSEP
812HAVE_STRPBRK
813HAVE_DECL_STRNLEN
814HAVE_DECL_STRNDUP
81ecdfbb
RW
815HAVE_DECL_STRDUP
816HAVE_STRCHRNUL
817HAVE_STPNCPY
818HAVE_STPCPY
f434ba03 819HAVE_RAWMEMCHR
81ecdfbb
RW
820HAVE_DECL_MEMRCHR
821HAVE_MEMPCPY
822HAVE_DECL_MEMMEM
f434ba03
PA
823HAVE_MEMCHR
824HAVE_MBSLEN
825GNULIB_STRVERSCMP
81ecdfbb
RW
826GNULIB_STRSIGNAL
827GNULIB_STRERROR
828GNULIB_MBSTOK_R
829GNULIB_MBSSEP
830GNULIB_MBSSPN
831GNULIB_MBSPBRK
832GNULIB_MBSCSPN
833GNULIB_MBSCASESTR
834GNULIB_MBSPCASECMP
835GNULIB_MBSNCASECMP
836GNULIB_MBSCASECMP
837GNULIB_MBSSTR
838GNULIB_MBSRCHR
839GNULIB_MBSCHR
840GNULIB_MBSNLEN
841GNULIB_MBSLEN
842GNULIB_STRTOK_R
843GNULIB_STRCASESTR
844GNULIB_STRSTR
845GNULIB_STRSEP
846GNULIB_STRPBRK
847GNULIB_STRNLEN
848GNULIB_STRNDUP
f434ba03 849GNULIB_STRNCAT
81ecdfbb
RW
850GNULIB_STRDUP
851GNULIB_STRCHRNUL
852GNULIB_STPNCPY
853GNULIB_STPCPY
f434ba03 854GNULIB_RAWMEMCHR
81ecdfbb
RW
855GNULIB_MEMRCHR
856GNULIB_MEMPCPY
857GNULIB_MEMMEM
f434ba03 858GNULIB_MEMCHR
81ecdfbb
RW
859GL_COND_LIBTOOL_FALSE
860GL_COND_LIBTOOL_TRUE
861CATOBJEXT
862GENCAT
863INSTOBJEXT
864DATADIRNAME
865CATALOGS
866POSUB
867GMSGFMT
868XGETTEXT
869INCINTL
870LIBINTL_DEP
871LIBINTL
872USE_NLS
873SET_MAKE
874GMAKE_FALSE
875GMAKE_TRUE
876MAKE
877CCDEPMODE
878DEPDIR
879am__leading_dot
880target_os
881target_vendor
882target_cpu
883target
f434ba03
PA
884RANLIB
885EGREP
886GREP
887CPP
81ecdfbb
RW
888host_os
889host_vendor
890host_cpu
891host
892build_os
893build_vendor
894build_cpu
895build
81ecdfbb
RW
896OBJEXT
897EXEEXT
898ac_ct_CC
899CPPFLAGS
900LDFLAGS
901CFLAGS
902CC
903MAINT
904MAINTAINER_MODE_FALSE
905MAINTAINER_MODE_TRUE
906target_alias
907host_alias
908build_alias
909LIBS
910ECHO_T
911ECHO_N
912ECHO_C
913DEFS
914mandir
915localedir
916libdir
917psdir
918pdfdir
919dvidir
920htmldir
921infodir
922docdir
923oldincludedir
924includedir
925localstatedir
926sharedstatedir
927sysconfdir
928datadir
929datarootdir
930libexecdir
931sbindir
932bindir
933program_transform_name
934prefix
935exec_prefix
936PACKAGE_URL
937PACKAGE_BUGREPORT
938PACKAGE_STRING
939PACKAGE_VERSION
940PACKAGE_TARNAME
941PACKAGE_NAME
942PATH_SEPARATOR
943SHELL'
a4ce5b0d 944ac_subst_files='host_makefile_frag'
81ecdfbb
RW
945ac_user_opts='
946enable_option_checking
947enable_maintainer_mode
da2f07f1
JK
948enable_plugins
949enable_largefile
81ecdfbb
RW
950enable_dependency_tracking
951with_separate_debug_dir
952with_gdb_datadir
953with_relocated_sources
954enable_targets
955enable_64_bit_bfd
956enable_gdbcli
957enable_gdbmi
958enable_tui
959enable_gdbtk
960with_libunwind
961with_curses
962enable_profiling
963with_pkgversion
964with_bugurl
b040ad30 965with_zlib
81ecdfbb 966with_libiconv_prefix
478aac75 967with_iconv_bin
81ecdfbb 968with_system_readline
b8e0a31c 969with_jit_reader_dir
81ecdfbb
RW
970with_expat
971with_gnu_ld
972enable_rpath
973with_libexpat_prefix
974with_python
975with_included_regex
976with_sysroot
977with_system_gdbinit
978enable_werror
979enable_build_warnings
980enable_gdb_build_warnings
981with_tcl
982with_tk
983with_x
984enable_sim
985enable_multi_ice
496c0e1b 986enable_gdbserver
81ecdfbb
RW
987'
988 ac_precious_vars='build_alias
989host_alias
990target_alias
991CC
992CFLAGS
993LDFLAGS
994LIBS
995CPPFLAGS
996CPP
997YACC
998YFLAGS
999XMKMF'
5ae98d25 1000ac_subdirs_all='testsuite
81ecdfbb
RW
1001gdbtk
1002multi-ice
1003gdbserver'
c906108c
SS
1004
1005# Initialize some variables set by options.
bec39cab
AC
1006ac_init_help=
1007ac_init_version=false
81ecdfbb
RW
1008ac_unrecognized_opts=
1009ac_unrecognized_sep=
c906108c
SS
1010# The variables have the same names as the options, with
1011# dashes changed to underlines.
bec39cab 1012cache_file=/dev/null
c906108c 1013exec_prefix=NONE
c906108c 1014no_create=
c906108c
SS
1015no_recursion=
1016prefix=NONE
1017program_prefix=NONE
1018program_suffix=NONE
1019program_transform_name=s,x,x,
1020silent=
1021site=
1022srcdir=
c906108c
SS
1023verbose=
1024x_includes=NONE
1025x_libraries=NONE
bec39cab
AC
1026
1027# Installation directory options.
1028# These are left unexpanded so users can "make install exec_prefix=/foo"
1029# and all the variables that are supposed to be based on exec_prefix
1030# by default will actually change.
1031# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1032# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1033bindir='${exec_prefix}/bin'
1034sbindir='${exec_prefix}/sbin'
1035libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1036datarootdir='${prefix}/share'
1037datadir='${datarootdir}'
c906108c
SS
1038sysconfdir='${prefix}/etc'
1039sharedstatedir='${prefix}/com'
1040localstatedir='${prefix}/var'
c906108c
SS
1041includedir='${prefix}/include'
1042oldincludedir='/usr/include'
81ecdfbb
RW
1043docdir='${datarootdir}/doc/${PACKAGE}'
1044infodir='${datarootdir}/info'
1045htmldir='${docdir}'
1046dvidir='${docdir}'
1047pdfdir='${docdir}'
1048psdir='${docdir}'
1049libdir='${exec_prefix}/lib'
1050localedir='${datarootdir}/locale'
1051mandir='${datarootdir}/man'
c906108c 1052
c906108c 1053ac_prev=
81ecdfbb 1054ac_dashdash=
c906108c
SS
1055for ac_option
1056do
c906108c
SS
1057 # If the previous option needs an argument, assign it.
1058 if test -n "$ac_prev"; then
81ecdfbb 1059 eval $ac_prev=\$ac_option
c906108c
SS
1060 ac_prev=
1061 continue
1062 fi
1063
81ecdfbb
RW
1064 case $ac_option in
1065 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1066 *) ac_optarg=yes ;;
1067 esac
c906108c
SS
1068
1069 # Accept the important Cygnus configure options, so we can diagnose typos.
1070
81ecdfbb
RW
1071 case $ac_dashdash$ac_option in
1072 --)
1073 ac_dashdash=yes ;;
c906108c
SS
1074
1075 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1076 ac_prev=bindir ;;
1077 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1078 bindir=$ac_optarg ;;
c906108c
SS
1079
1080 -build | --build | --buil | --bui | --bu)
bec39cab 1081 ac_prev=build_alias ;;
c906108c 1082 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1083 build_alias=$ac_optarg ;;
c906108c
SS
1084
1085 -cache-file | --cache-file | --cache-fil | --cache-fi \
1086 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1087 ac_prev=cache_file ;;
1088 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1089 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1090 cache_file=$ac_optarg ;;
1091
1092 --config-cache | -C)
1093 cache_file=config.cache ;;
c906108c 1094
81ecdfbb 1095 -datadir | --datadir | --datadi | --datad)
c906108c 1096 ac_prev=datadir ;;
81ecdfbb 1097 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1098 datadir=$ac_optarg ;;
c906108c 1099
81ecdfbb
RW
1100 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1101 | --dataroo | --dataro | --datar)
1102 ac_prev=datarootdir ;;
1103 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1104 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1105 datarootdir=$ac_optarg ;;
1106
c906108c 1107 -disable-* | --disable-*)
81ecdfbb 1108 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1109 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1110 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1111 as_fn_error "invalid feature name: $ac_useropt"
1112 ac_useropt_orig=$ac_useropt
1113 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1114 case $ac_user_opts in
1115 *"
1116"enable_$ac_useropt"
1117"*) ;;
1118 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1119 ac_unrecognized_sep=', ';;
1120 esac
1121 eval enable_$ac_useropt=no ;;
1122
1123 -docdir | --docdir | --docdi | --doc | --do)
1124 ac_prev=docdir ;;
1125 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1126 docdir=$ac_optarg ;;
1127
1128 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1129 ac_prev=dvidir ;;
1130 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1131 dvidir=$ac_optarg ;;
c906108c
SS
1132
1133 -enable-* | --enable-*)
81ecdfbb 1134 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1135 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1137 as_fn_error "invalid feature name: $ac_useropt"
1138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"enable_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
b4e70030 1146 esac
81ecdfbb 1147 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1148
1149 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1150 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1151 | --exec | --exe | --ex)
1152 ac_prev=exec_prefix ;;
1153 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1154 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1155 | --exec=* | --exe=* | --ex=*)
bec39cab 1156 exec_prefix=$ac_optarg ;;
c906108c
SS
1157
1158 -gas | --gas | --ga | --g)
1159 # Obsolete; use --with-gas.
1160 with_gas=yes ;;
1161
bec39cab
AC
1162 -help | --help | --hel | --he | -h)
1163 ac_init_help=long ;;
1164 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1165 ac_init_help=recursive ;;
1166 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1167 ac_init_help=short ;;
c906108c
SS
1168
1169 -host | --host | --hos | --ho)
bec39cab 1170 ac_prev=host_alias ;;
c906108c 1171 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1172 host_alias=$ac_optarg ;;
c906108c 1173
81ecdfbb
RW
1174 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1175 ac_prev=htmldir ;;
1176 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1177 | --ht=*)
1178 htmldir=$ac_optarg ;;
1179
c906108c
SS
1180 -includedir | --includedir | --includedi | --included | --include \
1181 | --includ | --inclu | --incl | --inc)
1182 ac_prev=includedir ;;
1183 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1184 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1185 includedir=$ac_optarg ;;
c906108c
SS
1186
1187 -infodir | --infodir | --infodi | --infod | --info | --inf)
1188 ac_prev=infodir ;;
1189 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1190 infodir=$ac_optarg ;;
c906108c
SS
1191
1192 -libdir | --libdir | --libdi | --libd)
1193 ac_prev=libdir ;;
1194 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1195 libdir=$ac_optarg ;;
c906108c
SS
1196
1197 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1198 | --libexe | --libex | --libe)
1199 ac_prev=libexecdir ;;
1200 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1201 | --libexe=* | --libex=* | --libe=*)
bec39cab 1202 libexecdir=$ac_optarg ;;
c906108c 1203
81ecdfbb
RW
1204 -localedir | --localedir | --localedi | --localed | --locale)
1205 ac_prev=localedir ;;
1206 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1207 localedir=$ac_optarg ;;
1208
c906108c 1209 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1210 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1211 ac_prev=localstatedir ;;
1212 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1213 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1214 localstatedir=$ac_optarg ;;
c906108c
SS
1215
1216 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1217 ac_prev=mandir ;;
1218 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1219 mandir=$ac_optarg ;;
c906108c
SS
1220
1221 -nfp | --nfp | --nf)
1222 # Obsolete; use --without-fp.
1223 with_fp=no ;;
1224
1225 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1226 | --no-cr | --no-c | -n)
c906108c
SS
1227 no_create=yes ;;
1228
1229 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1230 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1231 no_recursion=yes ;;
1232
1233 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1234 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1235 | --oldin | --oldi | --old | --ol | --o)
1236 ac_prev=oldincludedir ;;
1237 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1238 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1239 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1240 oldincludedir=$ac_optarg ;;
c906108c
SS
1241
1242 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1243 ac_prev=prefix ;;
1244 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1245 prefix=$ac_optarg ;;
c906108c
SS
1246
1247 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1248 | --program-pre | --program-pr | --program-p)
1249 ac_prev=program_prefix ;;
1250 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1251 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1252 program_prefix=$ac_optarg ;;
c906108c
SS
1253
1254 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1255 | --program-suf | --program-su | --program-s)
1256 ac_prev=program_suffix ;;
1257 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1258 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1259 program_suffix=$ac_optarg ;;
c906108c
SS
1260
1261 -program-transform-name | --program-transform-name \
1262 | --program-transform-nam | --program-transform-na \
1263 | --program-transform-n | --program-transform- \
1264 | --program-transform | --program-transfor \
1265 | --program-transfo | --program-transf \
1266 | --program-trans | --program-tran \
1267 | --progr-tra | --program-tr | --program-t)
1268 ac_prev=program_transform_name ;;
1269 -program-transform-name=* | --program-transform-name=* \
1270 | --program-transform-nam=* | --program-transform-na=* \
1271 | --program-transform-n=* | --program-transform-=* \
1272 | --program-transform=* | --program-transfor=* \
1273 | --program-transfo=* | --program-transf=* \
1274 | --program-trans=* | --program-tran=* \
1275 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1276 program_transform_name=$ac_optarg ;;
c906108c 1277
81ecdfbb
RW
1278 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1279 ac_prev=pdfdir ;;
1280 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1281 pdfdir=$ac_optarg ;;
1282
1283 -psdir | --psdir | --psdi | --psd | --ps)
1284 ac_prev=psdir ;;
1285 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1286 psdir=$ac_optarg ;;
1287
c906108c
SS
1288 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1289 | -silent | --silent | --silen | --sile | --sil)
1290 silent=yes ;;
1291
1292 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1293 ac_prev=sbindir ;;
1294 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1295 | --sbi=* | --sb=*)
bec39cab 1296 sbindir=$ac_optarg ;;
c906108c
SS
1297
1298 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1299 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1300 | --sharedst | --shareds | --shared | --share | --shar \
1301 | --sha | --sh)
1302 ac_prev=sharedstatedir ;;
1303 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1304 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1305 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1306 | --sha=* | --sh=*)
bec39cab 1307 sharedstatedir=$ac_optarg ;;
c906108c
SS
1308
1309 -site | --site | --sit)
1310 ac_prev=site ;;
1311 -site=* | --site=* | --sit=*)
bec39cab 1312 site=$ac_optarg ;;
3ace7edb 1313
c906108c
SS
1314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1315 ac_prev=srcdir ;;
1316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1317 srcdir=$ac_optarg ;;
c906108c
SS
1318
1319 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1320 | --syscon | --sysco | --sysc | --sys | --sy)
1321 ac_prev=sysconfdir ;;
1322 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1323 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1324 sysconfdir=$ac_optarg ;;
c906108c
SS
1325
1326 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1327 ac_prev=target_alias ;;
c906108c 1328 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1329 target_alias=$ac_optarg ;;
c906108c
SS
1330
1331 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1332 verbose=yes ;;
1333
bec39cab
AC
1334 -version | --version | --versio | --versi | --vers | -V)
1335 ac_init_version=: ;;
c906108c
SS
1336
1337 -with-* | --with-*)
81ecdfbb 1338 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1339 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1340 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1341 as_fn_error "invalid package name: $ac_useropt"
1342 ac_useropt_orig=$ac_useropt
1343 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1344 case $ac_user_opts in
1345 *"
1346"with_$ac_useropt"
1347"*) ;;
1348 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1349 ac_unrecognized_sep=', ';;
b4e70030 1350 esac
81ecdfbb 1351 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1352
1353 -without-* | --without-*)
81ecdfbb 1354 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1355 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1356 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1357 as_fn_error "invalid package name: $ac_useropt"
1358 ac_useropt_orig=$ac_useropt
1359 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1360 case $ac_user_opts in
1361 *"
1362"with_$ac_useropt"
1363"*) ;;
1364 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1365 ac_unrecognized_sep=', ';;
1366 esac
1367 eval with_$ac_useropt=no ;;
c906108c
SS
1368
1369 --x)
1370 # Obsolete; use --with-x.
1371 with_x=yes ;;
1372
1373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1374 | --x-incl | --x-inc | --x-in | --x-i)
1375 ac_prev=x_includes ;;
1376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1378 x_includes=$ac_optarg ;;
c906108c
SS
1379
1380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1382 ac_prev=x_libraries ;;
1383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1385 x_libraries=$ac_optarg ;;
c906108c 1386
81ecdfbb
RW
1387 -*) as_fn_error "unrecognized option: \`$ac_option'
1388Try \`$0 --help' for more information."
c906108c
SS
1389 ;;
1390
bec39cab
AC
1391 *=*)
1392 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1393 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1394 case $ac_envvar in #(
1395 '' | [0-9]* | *[!_$as_cr_alnum]* )
1396 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1397 esac
1398 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1399 export $ac_envvar ;;
1400
c906108c 1401 *)
bec39cab 1402 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1403 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1404 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1405 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1406 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1407 ;;
1408
1409 esac
1410done
1411
1412if test -n "$ac_prev"; then
bec39cab 1413 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1414 as_fn_error "missing argument to $ac_option"
c906108c 1415fi
c906108c 1416
81ecdfbb
RW
1417if test -n "$ac_unrecognized_opts"; then
1418 case $enable_option_checking in
1419 no) ;;
1420 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1421 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1422 esac
81ecdfbb 1423fi
b4e70030 1424
81ecdfbb
RW
1425# Check all directory arguments for consistency.
1426for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1427 datadir sysconfdir sharedstatedir localstatedir includedir \
1428 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1429 libdir localedir mandir
b4e70030 1430do
81ecdfbb
RW
1431 eval ac_val=\$$ac_var
1432 # Remove trailing slashes.
1433 case $ac_val in
1434 */ )
1435 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1436 eval $ac_var=\$ac_val;;
1437 esac
1438 # Be sure to have absolute directory names.
b4e70030 1439 case $ac_val in
81ecdfbb
RW
1440 [\\/$]* | ?:[\\/]* ) continue;;
1441 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1442 esac
81ecdfbb 1443 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1444done
1445
bec39cab
AC
1446# There might be people who depend on the old broken behavior: `$host'
1447# used to hold the argument of --host etc.
1448# FIXME: To remove some day.
1449build=$build_alias
1450host=$host_alias
1451target=$target_alias
1452
1453# FIXME: To remove some day.
1454if test "x$host_alias" != x; then
1455 if test "x$build_alias" = x; then
1456 cross_compiling=maybe
81ecdfbb 1457 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1458 If a cross compiler is detected then cross compile mode will be used." >&2
1459 elif test "x$build_alias" != "x$host_alias"; then
1460 cross_compiling=yes
1461 fi
1462fi
c906108c 1463
bec39cab
AC
1464ac_tool_prefix=
1465test -n "$host_alias" && ac_tool_prefix=$host_alias-
1466
1467test "$silent" = yes && exec 6>/dev/null
c906108c 1468
c906108c 1469
81ecdfbb
RW
1470ac_pwd=`pwd` && test -n "$ac_pwd" &&
1471ac_ls_di=`ls -di .` &&
1472ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1473 as_fn_error "working directory cannot be determined"
1474test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1475 as_fn_error "pwd does not report name of working directory"
1476
1477
c906108c
SS
1478# Find the source files, if location was not specified.
1479if test -z "$srcdir"; then
1480 ac_srcdir_defaulted=yes
81ecdfbb
RW
1481 # Try the directory containing this script, then the parent directory.
1482 ac_confdir=`$as_dirname -- "$as_myself" ||
1483$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1484 X"$as_myself" : 'X\(//\)[^/]' \| \
1485 X"$as_myself" : 'X\(//\)$' \| \
1486 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1487$as_echo X"$as_myself" |
1488 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1489 s//\1/
1490 q
1491 }
1492 /^X\(\/\/\)[^/].*/{
1493 s//\1/
1494 q
1495 }
1496 /^X\(\/\/\)$/{
1497 s//\1/
1498 q
1499 }
1500 /^X\(\/\).*/{
1501 s//\1/
1502 q
1503 }
1504 s/.*/./; q'`
c906108c 1505 srcdir=$ac_confdir
81ecdfbb 1506 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1507 srcdir=..
1508 fi
1509else
1510 ac_srcdir_defaulted=no
1511fi
81ecdfbb
RW
1512if test ! -r "$srcdir/$ac_unique_file"; then
1513 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1514 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1515fi
1516ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1517ac_abs_confdir=`(
1518 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1519 pwd)`
1520# When building in place, set srcdir=.
1521if test "$ac_abs_confdir" = "$ac_pwd"; then
1522 srcdir=.
1523fi
1524# Remove unnecessary trailing slashes from srcdir.
1525# Double slashes in file names in object file debugging info
1526# mess up M-x gdb in Emacs.
1527case $srcdir in
1528*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1529esac
1530for ac_var in $ac_precious_vars; do
1531 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1532 eval ac_env_${ac_var}_value=\$${ac_var}
1533 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1534 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1535done
c906108c 1536
bec39cab
AC
1537#
1538# Report the --help message.
1539#
1540if test "$ac_init_help" = "long"; then
1541 # Omit some internal or obsolete options to make the list less imposing.
1542 # This message is too long to be a string in the A/UX 3.1 sh.
1543 cat <<_ACEOF
1544\`configure' configures this package to adapt to many kinds of systems.
1545
1546Usage: $0 [OPTION]... [VAR=VALUE]...
1547
1548To assign environment variables (e.g., CC, CFLAGS...), specify them as
1549VAR=VALUE. See below for descriptions of some of the useful variables.
1550
1551Defaults for the options are specified in brackets.
1552
1553Configuration:
1554 -h, --help display this help and exit
1555 --help=short display options specific to this package
1556 --help=recursive display the short help of all the included packages
1557 -V, --version display version information and exit
1558 -q, --quiet, --silent do not print \`checking...' messages
1559 --cache-file=FILE cache test results in FILE [disabled]
1560 -C, --config-cache alias for \`--cache-file=config.cache'
1561 -n, --no-create do not create output files
1562 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1563
bec39cab
AC
1564Installation directories:
1565 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1566 [$ac_default_prefix]
bec39cab 1567 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1568 [PREFIX]
bec39cab
AC
1569
1570By default, \`make install' will install all the files in
1571\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1572an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1573for instance \`--prefix=\$HOME'.
1574
1575For better control, use the options below.
1576
1577Fine tuning of the installation directories:
81ecdfbb
RW
1578 --bindir=DIR user executables [EPREFIX/bin]
1579 --sbindir=DIR system admin executables [EPREFIX/sbin]
1580 --libexecdir=DIR program executables [EPREFIX/libexec]
1581 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1582 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1583 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1584 --libdir=DIR object code libraries [EPREFIX/lib]
1585 --includedir=DIR C header files [PREFIX/include]
1586 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1587 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1588 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1589 --infodir=DIR info documentation [DATAROOTDIR/info]
1590 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1591 --mandir=DIR man documentation [DATAROOTDIR/man]
1592 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1593 --htmldir=DIR html documentation [DOCDIR]
1594 --dvidir=DIR dvi documentation [DOCDIR]
1595 --pdfdir=DIR pdf documentation [DOCDIR]
1596 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1597_ACEOF
1598
1599 cat <<\_ACEOF
1600
1601Program names:
1602 --program-prefix=PREFIX prepend PREFIX to installed program names
1603 --program-suffix=SUFFIX append SUFFIX to installed program names
1604 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1605
1606X features:
1607 --x-includes=DIR X include files are in DIR
1608 --x-libraries=DIR X library files are in DIR
1609
1610System types:
1611 --build=BUILD configure for building on BUILD [guessed]
1612 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1613 --target=TARGET configure for building compilers for TARGET [HOST]
1614_ACEOF
1615fi
1616
1617if test -n "$ac_init_help"; then
1618
1619 cat <<\_ACEOF
1620
1621Optional Features:
81ecdfbb 1622 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1623 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1624 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1625 --enable-maintainer-mode enable make rules and dependencies not useful
1626 (and sometimes confusing) to the casual installer
da2f07f1
JK
1627 --enable-plugins Enable support for plugins (defaults no)
1628 --disable-largefile omit support for large files
e28b3332
DJ
1629 --disable-dependency-tracking speeds up one-time build
1630 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1631 --enable-targets=TARGETS
1632 alternative target configurations
c0993dbe 1633 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1634 --disable-gdbcli disable command-line interface (CLI)
1635 --disable-gdbmi disable machine-interface (MI)
1636 --enable-tui enable full-screen terminal user interface (TUI)
1637 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1638 --enable-profiling enable profiling of GDB
3841debe 1639 --disable-rpath do not hardcode runtime library paths
a1220294 1640 --enable-werror treat compile warnings as errors
32c1c914 1641 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1642 --enable-gdb-build-warnings
32c1c914 1643 enable GDB specific build-time compiler warnings if
a1220294 1644 gcc is used
32c1c914 1645 --enable-sim link gdb with simulator
bec39cab 1646 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1647 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1648 is auto)
bec39cab
AC
1649
1650Optional Packages:
1651 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1652 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1653 --with-separate-debug-dir=PATH
32c1c914 1654 look for global separate debug info in this path
62e4f60c 1655 [LIBDIR/debug]
b14b1491
TT
1656 --with-gdb-datadir=PATH look for global separate data files in this path
1657 [DATADIR/gdb]
29b0e8a2 1658 --with-relocated-sources=PATH
32c1c914
TT
1659 automatically relocate this path for source files
1660 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1661 --with-curses use the curses library instead of the termcap
1662 library
c16158bc
JM
1663 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1664 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1665 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1666 --with-libiconv-prefix=DIR
1667 search for libiconv in DIR/include and DIR/lib
478aac75 1668 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1669 --with-system-readline use installed readline library
b8e0a31c
SD
1670 --with-jit-reader-dir=PATH
1671 directory to load the JIT readers from
5c39566f 1672 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1673 --with-gnu-ld assume the C compiler uses GNU ld default=no
1674 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1675 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1676 --with-python[=PYTHON] include python support
1677 (auto/yes/no/<python-program>)
a1220294
TT
1678 --without-included-regex
1679 don't use included regex; this is the default on
1680 systems with version 2 of the GNU C library (use
1681 with caution on other system)
81ecdfbb 1682 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1683 --with-system-gdbinit=PATH
32c1c914 1684 automatically load a system-wide gdbinit file
5062cc19
KS
1685 --with-tcl directory containing tcl configuration (tclConfig.sh)
1686 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1687 --with-x use the X Window System
bec39cab
AC
1688
1689Some influential environment variables:
1690 CC C compiler command
1691 CFLAGS C compiler flags
1692 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1693 nonstandard directory <lib dir>
81ecdfbb
RW
1694 LIBS libraries to pass to the linker, e.g. -l<library>
1695 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1696 you have headers in a nonstandard directory <include dir>
bec39cab 1697 CPP C preprocessor
81ecdfbb
RW
1698 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1699 the first program found out of: `bison -y', `byacc', `yacc'.
1700 YFLAGS The list of arguments that will be passed by default to $YACC.
1701 This script will default YFLAGS to the empty string to avoid a
1702 default value of `-d' given by some make applications.
1703 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1704
1705Use these variables to override the choices made by `configure' or to help
1706it to find libraries and programs with nonstandard names/locations.
1707
81ecdfbb 1708Report bugs to the package provider.
bec39cab 1709_ACEOF
81ecdfbb 1710ac_status=$?
bec39cab
AC
1711fi
1712
1713if test "$ac_init_help" = "recursive"; then
1714 # If there are subdirs, report their specific --help.
bec39cab 1715 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1716 test -d "$ac_dir" ||
1717 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1718 continue
bec39cab
AC
1719 ac_builddir=.
1720
81ecdfbb
RW
1721case "$ac_dir" in
1722.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1723*)
1724 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1725 # A ".." for each directory in $ac_dir_suffix.
1726 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1727 case $ac_top_builddir_sub in
1728 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1729 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1730 esac ;;
1731esac
1732ac_abs_top_builddir=$ac_pwd
1733ac_abs_builddir=$ac_pwd$ac_dir_suffix
1734# for backward compatibility:
1735ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1736
1737case $srcdir in
81ecdfbb 1738 .) # We are building in place.
bec39cab 1739 ac_srcdir=.
81ecdfbb
RW
1740 ac_top_srcdir=$ac_top_builddir_sub
1741 ac_abs_top_srcdir=$ac_pwd ;;
1742 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1743 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1744 ac_top_srcdir=$srcdir
1745 ac_abs_top_srcdir=$srcdir ;;
1746 *) # Relative name.
1747 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1748 ac_top_srcdir=$ac_top_build_prefix$srcdir
1749 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1750esac
81ecdfbb 1751ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1752
81ecdfbb
RW
1753 cd "$ac_dir" || { ac_status=$?; continue; }
1754 # Check for guested configure.
1755 if test -f "$ac_srcdir/configure.gnu"; then
1756 echo &&
1757 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1758 elif test -f "$ac_srcdir/configure"; then
1759 echo &&
1760 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1761 else
81ecdfbb
RW
1762 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1763 fi || ac_status=$?
1764 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1765 done
1766fi
1767
81ecdfbb 1768test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1769if $ac_init_version; then
1770 cat <<\_ACEOF
81ecdfbb
RW
1771configure
1772generated by GNU Autoconf 2.64
bec39cab 1773
81ecdfbb 1774Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1775This configure script is free software; the Free Software Foundation
1776gives unlimited permission to copy, distribute and modify it.
1777_ACEOF
81ecdfbb 1778 exit
bec39cab 1779fi
bec39cab 1780
81ecdfbb
RW
1781## ------------------------ ##
1782## Autoconf initialization. ##
1783## ------------------------ ##
bec39cab 1784
81ecdfbb
RW
1785# ac_fn_c_try_compile LINENO
1786# --------------------------
1787# Try to compile conftest.$ac_ext, and return whether this succeeded.
1788ac_fn_c_try_compile ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 rm -f conftest.$ac_objext
1792 if { { ac_try="$ac_compile"
1793case "(($ac_try" in
1794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1795 *) ac_try_echo=$ac_try;;
1796esac
1797eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1798$as_echo "$ac_try_echo"; } >&5
1799 (eval "$ac_compile") 2>conftest.err
1800 ac_status=$?
1801 if test -s conftest.err; then
1802 grep -v '^ *+' conftest.err >conftest.er1
1803 cat conftest.er1 >&5
1804 mv -f conftest.er1 conftest.err
1805 fi
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && {
1808 test -z "$ac_c_werror_flag" ||
1809 test ! -s conftest.err
1810 } && test -s conftest.$ac_objext; then :
1811 ac_retval=0
1812else
1813 $as_echo "$as_me: failed program was:" >&5
1814sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1815
81ecdfbb
RW
1816 ac_retval=1
1817fi
1818 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1819 return $ac_retval
1820
1821} # ac_fn_c_try_compile
1822
1823# ac_fn_c_try_cpp LINENO
1824# ----------------------
1825# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1826ac_fn_c_try_cpp ()
bec39cab 1827{
81ecdfbb
RW
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 if { { ac_try="$ac_cpp conftest.$ac_ext"
1830case "(($ac_try" in
1831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1832 *) ac_try_echo=$ac_try;;
1833esac
1834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1835$as_echo "$ac_try_echo"; } >&5
1836 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1837 ac_status=$?
1838 if test -s conftest.err; then
1839 grep -v '^ *+' conftest.err >conftest.er1
1840 cat conftest.er1 >&5
1841 mv -f conftest.er1 conftest.err
1842 fi
1843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1844 test $ac_status = 0; } >/dev/null && {
1845 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1846 test ! -s conftest.err
1847 }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: failed program was:" >&5
1851sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1852
81ecdfbb
RW
1853 ac_retval=1
1854fi
1855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1856 return $ac_retval
bec39cab 1857
81ecdfbb 1858} # ac_fn_c_try_cpp
bec39cab 1859
81ecdfbb
RW
1860# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1861# -------------------------------------------------------
1862# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1863# the include files in INCLUDES and setting the cache variable VAR
1864# accordingly.
1865ac_fn_c_check_header_mongrel ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1872 $as_echo_n "(cached) " >&6
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877else
1878 # Is the header compilable?
1879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1880$as_echo_n "checking $2 usability... " >&6; }
1881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$4
1884#include <$2>
1885_ACEOF
1886if ac_fn_c_try_compile "$LINENO"; then :
1887 ac_header_compiler=yes
1888else
1889 ac_header_compiler=no
1890fi
1891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1893$as_echo "$ac_header_compiler" >&6; }
bec39cab 1894
81ecdfbb
RW
1895# Is the header present?
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1897$as_echo_n "checking $2 presence... " >&6; }
1898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h. */
1900#include <$2>
1901_ACEOF
1902if ac_fn_c_try_cpp "$LINENO"; then :
1903 ac_header_preproc=yes
1904else
1905 ac_header_preproc=no
1906fi
1907rm -f conftest.err conftest.$ac_ext
1908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1909$as_echo "$ac_header_preproc" >&6; }
bec39cab 1910
81ecdfbb
RW
1911# So? What about this header?
1912case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1913 yes:no: )
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1915$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1917$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1918 ;;
1919 no:yes:* )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1921$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1923$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1925$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1927$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1929$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1930 ;;
1931esac
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
1934if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=\$ac_header_compiler"
1938fi
1939eval ac_res=\$$3
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1941$as_echo "$ac_res" >&6; }
1942fi
1943 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1944
81ecdfbb 1945} # ac_fn_c_check_header_mongrel
bec39cab 1946
81ecdfbb
RW
1947# ac_fn_c_try_run LINENO
1948# ----------------------
1949# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1950# that executables *can* be run.
1951ac_fn_c_try_run ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 if { { ac_try="$ac_link"
1955case "(($ac_try" in
1956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1957 *) ac_try_echo=$ac_try;;
1958esac
1959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1960$as_echo "$ac_try_echo"; } >&5
1961 (eval "$ac_link") 2>&5
1962 ac_status=$?
1963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1965 { { case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_try") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; }; }; then :
1975 ac_retval=0
1976else
1977 $as_echo "$as_me: program exited with status $ac_status" >&5
1978 $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1980
81ecdfbb
RW
1981 ac_retval=$ac_status
1982fi
1983 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985 return $ac_retval
bec39cab 1986
81ecdfbb 1987} # ac_fn_c_try_run
bec39cab 1988
81ecdfbb
RW
1989# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1990# -------------------------------------------------------
1991# Tests whether HEADER exists and can be compiled using the include files in
1992# INCLUDES, setting the cache variable VAR accordingly.
1993ac_fn_c_check_header_compile ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1997$as_echo_n "checking for $2... " >&6; }
1998if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1999 $as_echo_n "(cached) " >&6
2000else
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004#include <$2>
bec39cab 2005_ACEOF
81ecdfbb
RW
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 eval "$3=yes"
2008else
2009 eval "$3=no"
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2017
81ecdfbb 2018} # ac_fn_c_check_header_compile
bec39cab 2019
81ecdfbb
RW
2020# ac_fn_c_try_link LINENO
2021# -----------------------
2022# Try to link conftest.$ac_ext, and return whether this succeeded.
2023ac_fn_c_try_link ()
b4e70030 2024{
81ecdfbb
RW
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 rm -f conftest.$ac_objext conftest$ac_exeext
2027 if { { ac_try="$ac_link"
2028case "(($ac_try" in
2029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2030 *) ac_try_echo=$ac_try;;
2031esac
2032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2033$as_echo "$ac_try_echo"; } >&5
2034 (eval "$ac_link") 2>conftest.err
2035 ac_status=$?
2036 if test -s conftest.err; then
2037 grep -v '^ *+' conftest.err >conftest.er1
2038 cat conftest.er1 >&5
2039 mv -f conftest.er1 conftest.err
2040 fi
2041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2042 test $ac_status = 0; } && {
2043 test -z "$ac_c_werror_flag" ||
2044 test ! -s conftest.err
2045 } && test -s conftest$ac_exeext && {
2046 test "$cross_compiling" = yes ||
2047 $as_test_x conftest$ac_exeext
2048 }; then :
2049 ac_retval=0
2050else
2051 $as_echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2053
81ecdfbb
RW
2054 ac_retval=1
2055fi
2056 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2057 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2058 # interfere with the next link command; also delete a directory that is
2059 # left behind by Apple's compiler. We do this before executing the actions.
2060 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2061 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2062 return $ac_retval
bec39cab 2063
81ecdfbb 2064} # ac_fn_c_try_link
bec39cab 2065
81ecdfbb
RW
2066# ac_fn_c_check_func LINENO FUNC VAR
2067# ----------------------------------
2068# Tests whether FUNC exists, setting the cache variable VAR accordingly
2069ac_fn_c_check_func ()
2070{
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073$as_echo_n "checking for $2... " >&6; }
2074if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2075 $as_echo_n "(cached) " >&6
2076else
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2080 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2081#define $2 innocuous_$2
bec39cab 2082
81ecdfbb
RW
2083/* System header to define __stub macros and hopefully few prototypes,
2084 which can conflict with char $2 (); below.
2085 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2086 <limits.h> exists even on freestanding compilers. */
bec39cab 2087
81ecdfbb
RW
2088#ifdef __STDC__
2089# include <limits.h>
2090#else
2091# include <assert.h>
2092#endif
bec39cab 2093
81ecdfbb 2094#undef $2
bec39cab 2095
81ecdfbb
RW
2096/* Override any GCC internal prototype to avoid an error.
2097 Use char because int might match the return type of a GCC
2098 builtin and then its argument prototype would still apply. */
2099#ifdef __cplusplus
2100extern "C"
2101#endif
2102char $2 ();
2103/* The GNU C library defines this for functions which it implements
2104 to always fail with ENOSYS. Some functions are actually named
2105 something starting with __ and the normal name is an alias. */
2106#if defined __stub_$2 || defined __stub___$2
2107choke me
2108#endif
bec39cab 2109
81ecdfbb
RW
2110int
2111main ()
2112{
2113return $2 ();
2114 ;
2115 return 0;
2116}
bec39cab 2117_ACEOF
81ecdfbb
RW
2118if ac_fn_c_try_link "$LINENO"; then :
2119 eval "$3=yes"
2120else
2121 eval "$3=no"
2122fi
2123rm -f core conftest.err conftest.$ac_objext \
2124 conftest$ac_exeext conftest.$ac_ext
2125fi
2126eval ac_res=\$$3
2127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2128$as_echo "$ac_res" >&6; }
2129 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2130
81ecdfbb 2131} # ac_fn_c_check_func
bec39cab 2132
81ecdfbb
RW
2133# ac_fn_c_check_decl LINENO SYMBOL VAR
2134# ------------------------------------
2135# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2136ac_fn_c_check_decl ()
2137{
2138 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2139 as_decl_name=`echo $2|sed 's/ *(.*//'`
2140 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2142$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2143if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2144 $as_echo_n "(cached) " >&6
2145else
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
2150main ()
2151{
e7a30f46
DE
2152#ifndef $as_decl_name
2153#ifdef __cplusplus
2154 (void) $as_decl_use;
2155#else
2156 (void) $as_decl_name;
2157#endif
81ecdfbb 2158#endif
bec39cab 2159
81ecdfbb
RW
2160 ;
2161 return 0;
2162}
bec39cab 2163_ACEOF
81ecdfbb
RW
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 eval "$3=yes"
2166else
2167 eval "$3=no"
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170fi
2171eval ac_res=\$$3
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2173$as_echo "$ac_res" >&6; }
2174 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2175
81ecdfbb 2176} # ac_fn_c_check_decl
bec39cab 2177
81ecdfbb
RW
2178# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2179# --------------------------------------------
2180# Tries to find the compile-time value of EXPR in a program that includes
2181# INCLUDES, setting VAR accordingly. Returns whether the value could be
2182# computed
2183ac_fn_c_compute_int ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 if test "$cross_compiling" = yes; then
2187 # Depending upon the size, compute the lo and hi bounds.
2188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) >= 0)];
2195test_array [0] = 0
bec39cab 2196
81ecdfbb
RW
2197 ;
2198 return 0;
2199}
2200_ACEOF
2201if ac_fn_c_try_compile "$LINENO"; then :
2202 ac_lo=0 ac_mid=0
2203 while :; do
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
2206$4
2207int
2208main ()
2209{
2210static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2211test_array [0] = 0
bec39cab 2212
81ecdfbb
RW
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_compile "$LINENO"; then :
2218 ac_hi=$ac_mid; break
2219else
2220 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2221 if test $ac_lo -le $ac_mid; then
2222 ac_lo= ac_hi=
2223 break
2224 fi
2225 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2226fi
81ecdfbb
RW
2227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228 done
c906108c 2229else
81ecdfbb
RW
2230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231/* end confdefs.h. */
2232$4
2233int
2234main ()
2235{
2236static int test_array [1 - 2 * !(($2) < 0)];
2237test_array [0] = 0
bec39cab 2238
81ecdfbb
RW
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_compile "$LINENO"; then :
2244 ac_hi=-1 ac_mid=-1
2245 while :; do
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2253test_array [0] = 0
bec39cab 2254
81ecdfbb
RW
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 ac_lo=$ac_mid; break
2261else
2262 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2263 if test $ac_mid -le $ac_hi; then
2264 ac_lo= ac_hi=
2265 break
2266 fi
2267 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270 done
2271else
2272 ac_lo= ac_hi=
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277# Binary search between lo and hi bounds.
2278while test "x$ac_lo" != "x$ac_hi"; do
2279 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283int
2284main ()
2285{
2286static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2287test_array [0] = 0
bec39cab 2288
81ecdfbb
RW
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_hi=$ac_mid
2295else
2296 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299done
2300case $ac_lo in #((
2301?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2302'') ac_retval=1 ;;
2303esac
2304 else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307$4
2308static long int longval () { return $2; }
2309static unsigned long int ulongval () { return $2; }
2310#include <stdio.h>
2311#include <stdlib.h>
2312int
2313main ()
2314{
bec39cab 2315
81ecdfbb
RW
2316 FILE *f = fopen ("conftest.val", "w");
2317 if (! f)
2318 return 1;
2319 if (($2) < 0)
2320 {
2321 long int i = longval ();
2322 if (i != ($2))
2323 return 1;
2324 fprintf (f, "%ld", i);
2325 }
2326 else
2327 {
2328 unsigned long int i = ulongval ();
2329 if (i != ($2))
2330 return 1;
2331 fprintf (f, "%lu", i);
2332 }
2333 /* Do not output a trailing newline, as this causes \r\n confusion
2334 on some platforms. */
2335 return ferror (f) || fclose (f) != 0;
bec39cab 2336
81ecdfbb
RW
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_run "$LINENO"; then :
2342 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2343else
2344 ac_retval=1
2345fi
2346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2347 conftest.$ac_objext conftest.beam conftest.$ac_ext
2348rm -f conftest.val
bec39cab 2349
81ecdfbb
RW
2350 fi
2351 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2352 return $ac_retval
bec39cab 2353
81ecdfbb 2354} # ac_fn_c_compute_int
bec39cab 2355
81ecdfbb
RW
2356# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2357# ----------------------------------------------------
2358# Tries to find if the field MEMBER exists in type AGGR, after including
2359# INCLUDES, setting cache variable VAR accordingly.
2360ac_fn_c_check_member ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2364$as_echo_n "checking for $2.$3... " >&6; }
2365if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2366 $as_echo_n "(cached) " >&6
2367else
2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
2372main ()
2373{
2374static $2 ac_aggr;
2375if (ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$4=yes"
2383else
2384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385/* end confdefs.h. */
2386$5
2387int
2388main ()
2389{
2390static $2 ac_aggr;
2391if (sizeof ac_aggr.$3)
2392return 0;
2393 ;
2394 return 0;
2395}
2396_ACEOF
2397if ac_fn_c_try_compile "$LINENO"; then :
2398 eval "$4=yes"
2399else
2400 eval "$4=no"
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406eval ac_res=\$$4
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408$as_echo "$ac_res" >&6; }
2409 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2410
81ecdfbb 2411} # ac_fn_c_check_member
bec39cab 2412
81ecdfbb
RW
2413# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2414# -------------------------------------------
2415# Tests whether TYPE exists after having included INCLUDES, setting cache
2416# variable VAR accordingly.
2417ac_fn_c_check_type ()
2418{
2419 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2421$as_echo_n "checking for $2... " >&6; }
2422if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2423 $as_echo_n "(cached) " >&6
2424else
2425 eval "$3=no"
2426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h. */
2428$4
2429int
2430main ()
2431{
2432if (sizeof ($2))
2433 return 0;
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438if ac_fn_c_try_compile "$LINENO"; then :
2439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2440/* end confdefs.h. */
2441$4
2442int
2443main ()
2444{
2445if (sizeof (($2)))
2446 return 0;
2447 ;
2448 return 0;
2449}
2450_ACEOF
2451if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2452
81ecdfbb
RW
2453else
2454 eval "$3=yes"
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2457fi
2458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2459fi
2460eval ac_res=\$$3
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2462$as_echo "$ac_res" >&6; }
2463 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2464
81ecdfbb
RW
2465} # ac_fn_c_check_type
2466cat >config.log <<_ACEOF
2467This file contains any messages produced by compilers while
2468running configure, to aid debugging if configure makes a mistake.
d5af19ba 2469
81ecdfbb
RW
2470It was created by $as_me, which was
2471generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2472
81ecdfbb 2473 $ $0 $@
413ccac7 2474
81ecdfbb
RW
2475_ACEOF
2476exec 5>>config.log
2477{
2478cat <<_ASUNAME
2479## --------- ##
2480## Platform. ##
2481## --------- ##
413ccac7 2482
81ecdfbb
RW
2483hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2484uname -m = `(uname -m) 2>/dev/null || echo unknown`
2485uname -r = `(uname -r) 2>/dev/null || echo unknown`
2486uname -s = `(uname -s) 2>/dev/null || echo unknown`
2487uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2488
81ecdfbb
RW
2489/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2490/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2491
81ecdfbb
RW
2492/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2493/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2494/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2495/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2496/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2497/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2498/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2499
81ecdfbb 2500_ASUNAME
bec39cab 2501
bec39cab
AC
2502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2503for as_dir in $PATH
2504do
2505 IFS=$as_save_IFS
2506 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2507 $as_echo "PATH: $as_dir"
2508 done
2509IFS=$as_save_IFS
bec39cab 2510
81ecdfbb 2511} >&5
bec39cab 2512
81ecdfbb 2513cat >&5 <<_ACEOF
bec39cab 2514
bec39cab 2515
81ecdfbb
RW
2516## ----------- ##
2517## Core tests. ##
2518## ----------- ##
2519
2520_ACEOF
2521
2522
2523# Keep a trace of the command line.
2524# Strip out --no-create and --no-recursion so they do not pile up.
2525# Strip out --silent because we don't want to record it for future runs.
2526# Also quote any args containing shell meta-characters.
2527# Make two passes to allow for proper duplicate-argument suppression.
2528ac_configure_args=
2529ac_configure_args0=
2530ac_configure_args1=
2531ac_must_keep_next=false
2532for ac_pass in 1 2
2533do
2534 for ac_arg
2535 do
2536 case $ac_arg in
2537 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2539 | -silent | --silent | --silen | --sile | --sil)
2540 continue ;;
2541 *\'*)
2542 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2543 esac
2544 case $ac_pass in
2545 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2546 2)
2547 as_fn_append ac_configure_args1 " '$ac_arg'"
2548 if test $ac_must_keep_next = true; then
2549 ac_must_keep_next=false # Got value, back to normal.
2550 else
2551 case $ac_arg in
2552 *=* | --config-cache | -C | -disable-* | --disable-* \
2553 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2554 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2555 | -with-* | --with-* | -without-* | --without-* | --x)
2556 case "$ac_configure_args0 " in
2557 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2558 esac
2559 ;;
2560 -* ) ac_must_keep_next=true ;;
2561 esac
2562 fi
2563 as_fn_append ac_configure_args " '$ac_arg'"
2564 ;;
2565 esac
2566 done
2567done
2568{ ac_configure_args0=; unset ac_configure_args0;}
2569{ ac_configure_args1=; unset ac_configure_args1;}
2570
2571# When interrupted or exit'd, cleanup temporary files, and complete
2572# config.log. We remove comments because anyway the quotes in there
2573# would cause problems or look ugly.
2574# WARNING: Use '\'' to represent an apostrophe within the trap.
2575# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2576trap 'exit_status=$?
2577 # Save into config.log some information that might help in debugging.
2578 {
2579 echo
2580
2581 cat <<\_ASBOX
2582## ---------------- ##
2583## Cache variables. ##
2584## ---------------- ##
2585_ASBOX
2586 echo
2587 # The following way of writing the cache mishandles newlines in values,
2588(
2589 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2590 eval ac_val=\$$ac_var
2591 case $ac_val in #(
2592 *${as_nl}*)
2593 case $ac_var in #(
2594 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2595$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2596 esac
2597 case $ac_var in #(
2598 _ | IFS | as_nl) ;; #(
2599 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2600 *) { eval $ac_var=; unset $ac_var;} ;;
2601 esac ;;
2602 esac
2603 done
2604 (set) 2>&1 |
2605 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2606 *${as_nl}ac_space=\ *)
2607 sed -n \
2608 "s/'\''/'\''\\\\'\'''\''/g;
2609 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2610 ;; #(
2611 *)
2612 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2613 ;;
2614 esac |
2615 sort
2616)
2617 echo
2618
2619 cat <<\_ASBOX
2620## ----------------- ##
2621## Output variables. ##
2622## ----------------- ##
2623_ASBOX
2624 echo
2625 for ac_var in $ac_subst_vars
2626 do
2627 eval ac_val=\$$ac_var
2628 case $ac_val in
2629 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2630 esac
2631 $as_echo "$ac_var='\''$ac_val'\''"
2632 done | sort
2633 echo
2634
2635 if test -n "$ac_subst_files"; then
2636 cat <<\_ASBOX
2637## ------------------- ##
2638## File substitutions. ##
2639## ------------------- ##
2640_ASBOX
2641 echo
2642 for ac_var in $ac_subst_files
2643 do
2644 eval ac_val=\$$ac_var
2645 case $ac_val in
2646 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2647 esac
2648 $as_echo "$ac_var='\''$ac_val'\''"
2649 done | sort
2650 echo
2651 fi
2652
2653 if test -s confdefs.h; then
2654 cat <<\_ASBOX
2655## ----------- ##
2656## confdefs.h. ##
2657## ----------- ##
2658_ASBOX
2659 echo
2660 cat confdefs.h
2661 echo
2662 fi
2663 test "$ac_signal" != 0 &&
2664 $as_echo "$as_me: caught signal $ac_signal"
2665 $as_echo "$as_me: exit $exit_status"
2666 } >&5
2667 rm -f core *.core core.conftest.* &&
2668 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2669 exit $exit_status
2670' 0
2671for ac_signal in 1 2 13 15; do
2672 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2673done
2674ac_signal=0
2675
2676# confdefs.h avoids OS command line length limits that DEFS can exceed.
2677rm -f -r conftest* confdefs.h
2678
2679$as_echo "/* confdefs.h */" > confdefs.h
2680
2681# Predefined preprocessor variables.
2682
2683cat >>confdefs.h <<_ACEOF
2684#define PACKAGE_NAME "$PACKAGE_NAME"
2685_ACEOF
2686
2687cat >>confdefs.h <<_ACEOF
2688#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2689_ACEOF
2690
2691cat >>confdefs.h <<_ACEOF
2692#define PACKAGE_VERSION "$PACKAGE_VERSION"
2693_ACEOF
2694
2695cat >>confdefs.h <<_ACEOF
2696#define PACKAGE_STRING "$PACKAGE_STRING"
2697_ACEOF
2698
2699cat >>confdefs.h <<_ACEOF
2700#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2701_ACEOF
2702
2703cat >>confdefs.h <<_ACEOF
2704#define PACKAGE_URL "$PACKAGE_URL"
2705_ACEOF
2706
2707
2708# Let the site file select an alternate cache file if it wants to.
2709# Prefer an explicitly selected file to automatically selected ones.
2710ac_site_file1=NONE
2711ac_site_file2=NONE
2712if test -n "$CONFIG_SITE"; then
2713 ac_site_file1=$CONFIG_SITE
2714elif test "x$prefix" != xNONE; then
2715 ac_site_file1=$prefix/share/config.site
2716 ac_site_file2=$prefix/etc/config.site
2717else
2718 ac_site_file1=$ac_default_prefix/share/config.site
2719 ac_site_file2=$ac_default_prefix/etc/config.site
2720fi
2721for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2722do
2723 test "x$ac_site_file" = xNONE && continue
2724 if test -r "$ac_site_file"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2726$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2727 sed 's/^/| /' "$ac_site_file" >&5
2728 . "$ac_site_file"
2729 fi
2730done
2731
2732if test -r "$cache_file"; then
2733 # Some versions of bash will fail to source /dev/null (special
2734 # files actually), so we avoid doing that.
2735 if test -f "$cache_file"; then
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2737$as_echo "$as_me: loading cache $cache_file" >&6;}
2738 case $cache_file in
2739 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2740 *) . "./$cache_file";;
2741 esac
2742 fi
2743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2745$as_echo "$as_me: creating cache $cache_file" >&6;}
2746 >$cache_file
bec39cab
AC
2747fi
2748
f434ba03
PA
2749gl_header_list="$gl_header_list sys/mman.h"
2750gl_func_list="$gl_func_list mprotect"
2751gl_func_list="$gl_func_list memchr"
2752gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2753gl_header_list="$gl_header_list stdint.h"
2754gl_header_list="$gl_header_list wchar.h"
2755gl_header_list="$gl_header_list string.h"
2756# Check that the precious variables saved in the cache have kept the same
2757# value.
2758ac_cache_corrupted=false
2759for ac_var in $ac_precious_vars; do
2760 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2761 eval ac_new_set=\$ac_env_${ac_var}_set
2762 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2763 eval ac_new_val=\$ac_env_${ac_var}_value
2764 case $ac_old_set,$ac_new_set in
2765 set,)
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2767$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2768 ac_cache_corrupted=: ;;
2769 ,set)
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2771$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2772 ac_cache_corrupted=: ;;
2773 ,);;
2774 *)
2775 if test "x$ac_old_val" != "x$ac_new_val"; then
2776 # differences in whitespace do not lead to failure.
2777 ac_old_val_w=`echo x $ac_old_val`
2778 ac_new_val_w=`echo x $ac_new_val`
2779 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2781$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2782 ac_cache_corrupted=:
2783 else
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2785$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2786 eval $ac_var=\$ac_old_val
2787 fi
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2789$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2791$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2792 fi;;
2793 esac
2794 # Pass precious variables to config.status.
2795 if test "$ac_new_set" = set; then
2796 case $ac_new_val in
2797 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2798 *) ac_arg=$ac_var=$ac_new_val ;;
2799 esac
2800 case " $ac_configure_args " in
2801 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2802 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2803 esac
2804 fi
2805done
2806if $ac_cache_corrupted; then
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2810$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2811 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2812fi
2813## -------------------- ##
2814## Main body of script. ##
2815## -------------------- ##
2816
2817ac_ext=c
2818ac_cpp='$CPP $CPPFLAGS'
2819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2821ac_compiler_gnu=$ac_cv_c_compiler_gnu
2822
2823
2824
2825
2826
2827ac_config_headers="$ac_config_headers config.h:config.in"
2828
2829
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2831$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2832 # Check whether --enable-maintainer-mode was given.
2833if test "${enable_maintainer_mode+set}" = set; then :
2834 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2835else
2836 USE_MAINTAINER_MODE=no
2837fi
2838
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2840$as_echo "$USE_MAINTAINER_MODE" >&6; }
2841 if test $USE_MAINTAINER_MODE = yes; then
2842 MAINTAINER_MODE_TRUE=
2843 MAINTAINER_MODE_FALSE='#'
2844else
2845 MAINTAINER_MODE_TRUE='#'
2846 MAINTAINER_MODE_FALSE=
2847fi
2848
2849 MAINT=$MAINTAINER_MODE_TRUE
2850
2851
2852
2853ac_ext=c
2854ac_cpp='$CPP $CPPFLAGS'
2855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2857ac_compiler_gnu=$ac_cv_c_compiler_gnu
2858if test -n "$ac_tool_prefix"; then
2859 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2860set dummy ${ac_tool_prefix}gcc; ac_word=$2
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2862$as_echo_n "checking for $ac_word... " >&6; }
2863if test "${ac_cv_prog_CC+set}" = set; then :
2864 $as_echo_n "(cached) " >&6
c906108c
SS
2865else
2866 if test -n "$CC"; then
2867 ac_cv_prog_CC="$CC" # Let the user override the test.
2868else
bec39cab
AC
2869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2870for as_dir in $PATH
2871do
2872 IFS=$as_save_IFS
2873 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2874 for ac_exec_ext in '' $ac_executable_extensions; do
2875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2876 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2878 break 2
2879 fi
2880done
81ecdfbb
RW
2881 done
2882IFS=$as_save_IFS
bec39cab 2883
c906108c
SS
2884fi
2885fi
bec39cab 2886CC=$ac_cv_prog_CC
c906108c 2887if test -n "$CC"; then
81ecdfbb
RW
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2889$as_echo "$CC" >&6; }
c906108c 2890else
81ecdfbb
RW
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2892$as_echo "no" >&6; }
c906108c
SS
2893fi
2894
81ecdfbb 2895
b4e70030
JB
2896fi
2897if test -z "$ac_cv_prog_CC"; then
2898 ac_ct_CC=$CC
81ecdfbb
RW
2899 # Extract the first word of "gcc", so it can be a program name with args.
2900set dummy gcc; ac_word=$2
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2902$as_echo_n "checking for $ac_word... " >&6; }
2903if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2904 $as_echo_n "(cached) " >&6
b4e70030
JB
2905else
2906 if test -n "$ac_ct_CC"; then
2907 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2908else
2909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2910for as_dir in $PATH
2911do
2912 IFS=$as_save_IFS
2913 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2914 for ac_exec_ext in '' $ac_executable_extensions; do
2915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2916 ac_cv_prog_ac_ct_CC="gcc"
2917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2918 break 2
4e8d927d 2919 fi
b4e70030 2920done
81ecdfbb
RW
2921 done
2922IFS=$as_save_IFS
b4e70030
JB
2923
2924fi
2925fi
2926ac_ct_CC=$ac_cv_prog_ac_ct_CC
2927if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2929$as_echo "$ac_ct_CC" >&6; }
b4e70030 2930else
81ecdfbb
RW
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2932$as_echo "no" >&6; }
b4e70030
JB
2933fi
2934
81ecdfbb
RW
2935 if test "x$ac_ct_CC" = x; then
2936 CC=""
2937 else
2938 case $cross_compiling:$ac_tool_warned in
2939yes:)
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2942ac_tool_warned=yes ;;
2943esac
2944 CC=$ac_ct_CC
2945 fi
b4e70030
JB
2946else
2947 CC="$ac_cv_prog_CC"
2948fi
2949
c906108c 2950if test -z "$CC"; then
81ecdfbb
RW
2951 if test -n "$ac_tool_prefix"; then
2952 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2953set dummy ${ac_tool_prefix}cc; ac_word=$2
2954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2955$as_echo_n "checking for $ac_word... " >&6; }
2956if test "${ac_cv_prog_CC+set}" = set; then :
2957 $as_echo_n "(cached) " >&6
c906108c
SS
2958else
2959 if test -n "$CC"; then
2960 ac_cv_prog_CC="$CC" # Let the user override the test.
2961else
bec39cab
AC
2962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2963for as_dir in $PATH
2964do
2965 IFS=$as_save_IFS
2966 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2967 for ac_exec_ext in '' $ac_executable_extensions; do
2968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2969 ac_cv_prog_CC="${ac_tool_prefix}cc"
2970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2971 break 2
2972 fi
2973done
81ecdfbb
RW
2974 done
2975IFS=$as_save_IFS
2976
2977fi
2978fi
2979CC=$ac_cv_prog_CC
2980if test -n "$CC"; then
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2982$as_echo "$CC" >&6; }
2983else
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2985$as_echo "no" >&6; }
2986fi
2987
2988
2989 fi
2990fi
2991if test -z "$CC"; then
2992 # Extract the first word of "cc", so it can be a program name with args.
2993set dummy cc; ac_word=$2
2994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2995$as_echo_n "checking for $ac_word... " >&6; }
2996if test "${ac_cv_prog_CC+set}" = set; then :
2997 $as_echo_n "(cached) " >&6
2998else
2999 if test -n "$CC"; then
3000 ac_cv_prog_CC="$CC" # Let the user override the test.
3001else
3002 ac_prog_rejected=no
3003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3004for as_dir in $PATH
3005do
3006 IFS=$as_save_IFS
3007 test -z "$as_dir" && as_dir=.
3008 for ac_exec_ext in '' $ac_executable_extensions; do
3009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3010 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3011 ac_prog_rejected=yes
3012 continue
3013 fi
3014 ac_cv_prog_CC="cc"
3015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3016 break 2
3017 fi
3018done
3019 done
3020IFS=$as_save_IFS
bec39cab 3021
c906108c
SS
3022if test $ac_prog_rejected = yes; then
3023 # We found a bogon in the path, so make sure we never use it.
3024 set dummy $ac_cv_prog_CC
3025 shift
bec39cab 3026 if test $# != 0; then
c906108c
SS
3027 # We chose a different compiler from the bogus one.
3028 # However, it has the same basename, so the bogon will be chosen
3029 # first if we set CC to just the basename; use the full file name.
3030 shift
bec39cab 3031 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3032 fi
3033fi
3034fi
3035fi
bec39cab 3036CC=$ac_cv_prog_CC
c906108c 3037if test -n "$CC"; then
81ecdfbb
RW
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3039$as_echo "$CC" >&6; }
c906108c 3040else
81ecdfbb
RW
3041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3042$as_echo "no" >&6; }
c906108c
SS
3043fi
3044
81ecdfbb 3045
bec39cab
AC
3046fi
3047if test -z "$CC"; then
3048 if test -n "$ac_tool_prefix"; then
81ecdfbb 3049 for ac_prog in cl.exe
bec39cab
AC
3050 do
3051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3054$as_echo_n "checking for $ac_word... " >&6; }
3055if test "${ac_cv_prog_CC+set}" = set; then :
3056 $as_echo_n "(cached) " >&6
c906108c
SS
3057else
3058 if test -n "$CC"; then
3059 ac_cv_prog_CC="$CC" # Let the user override the test.
3060else
bec39cab
AC
3061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3062for as_dir in $PATH
3063do
3064 IFS=$as_save_IFS
3065 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3066 for ac_exec_ext in '' $ac_executable_extensions; do
3067 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3068 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3070 break 2
3071 fi
3072done
81ecdfbb
RW
3073 done
3074IFS=$as_save_IFS
bec39cab 3075
c906108c
SS
3076fi
3077fi
bec39cab 3078CC=$ac_cv_prog_CC
c906108c 3079if test -n "$CC"; then
81ecdfbb
RW
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3081$as_echo "$CC" >&6; }
c906108c 3082else
81ecdfbb
RW
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
c906108c 3085fi
bec39cab 3086
81ecdfbb 3087
bec39cab
AC
3088 test -n "$CC" && break
3089 done
3090fi
3091if test -z "$CC"; then
3092 ac_ct_CC=$CC
81ecdfbb 3093 for ac_prog in cl.exe
bec39cab
AC
3094do
3095 # Extract the first word of "$ac_prog", so it can be a program name with args.
3096set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3098$as_echo_n "checking for $ac_word... " >&6; }
3099if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3100 $as_echo_n "(cached) " >&6
bec39cab
AC
3101else
3102 if test -n "$ac_ct_CC"; then
3103 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3104else
3105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3106for as_dir in $PATH
3107do
3108 IFS=$as_save_IFS
3109 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3110 for ac_exec_ext in '' $ac_executable_extensions; do
3111 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3112 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3114 break 2
c906108c 3115 fi
bec39cab 3116done
81ecdfbb
RW
3117 done
3118IFS=$as_save_IFS
bec39cab
AC
3119
3120fi
3121fi
3122ac_ct_CC=$ac_cv_prog_ac_ct_CC
3123if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3125$as_echo "$ac_ct_CC" >&6; }
bec39cab 3126else
81ecdfbb
RW
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
c906108c
SS
3129fi
3130
81ecdfbb 3131
bec39cab
AC
3132 test -n "$ac_ct_CC" && break
3133done
c906108c 3134
81ecdfbb
RW
3135 if test "x$ac_ct_CC" = x; then
3136 CC=""
3137 else
3138 case $cross_compiling:$ac_tool_warned in
3139yes:)
3140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3142ac_tool_warned=yes ;;
3143esac
3144 CC=$ac_ct_CC
3145 fi
bec39cab
AC
3146fi
3147
3148fi
3149
3150
81ecdfbb
RW
3151test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3153as_fn_error "no acceptable C compiler found in \$PATH
3154See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3155
3156# Provide some information about the compiler.
81ecdfbb
RW
3157$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3158set X $ac_compile
3159ac_compiler=$2
3160for ac_option in --version -v -V -qversion; do
3161 { { ac_try="$ac_compiler $ac_option >&5"
3162case "(($ac_try" in
3163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3164 *) ac_try_echo=$ac_try;;
3165esac
3166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3167$as_echo "$ac_try_echo"; } >&5
3168 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3169 ac_status=$?
81ecdfbb
RW
3170 if test -s conftest.err; then
3171 sed '10a\
3172... rest of stderr output deleted ...
3173 10q' conftest.err >conftest.er1
3174 cat conftest.er1 >&5
3175 rm -f conftest.er1 conftest.err
3176 fi
3177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3178 test $ac_status = 0; }
3179done
bec39cab 3180
81ecdfbb 3181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3182/* end confdefs.h. */
3183
3184int
3185main ()
3186{
3187
3188 ;
3189 return 0;
3190}
3191_ACEOF
3192ac_clean_files_save=$ac_clean_files
81ecdfbb 3193ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3194# Try to create an executable without -o first, disregard a.out.
3195# It will help us diagnose broken compilers, and finding out an intuition
3196# of exeext.
81ecdfbb
RW
3197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3198$as_echo_n "checking for C compiler default output file name... " >&6; }
3199ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3200
3201# The possible output files:
3202ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3203
3204ac_rmfiles=
3205for ac_file in $ac_files
3206do
3207 case $ac_file in
3208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3209 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3210 esac
3211done
3212rm -f $ac_rmfiles
3213
3214if { { ac_try="$ac_link_default"
3215case "(($ac_try" in
3216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3217 *) ac_try_echo=$ac_try;;
3218esac
3219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3220$as_echo "$ac_try_echo"; } >&5
3221 (eval "$ac_link_default") 2>&5
3222 ac_status=$?
3223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3224 test $ac_status = 0; }; then :
3225 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3226# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3227# in a Makefile. We should not override ac_cv_exeext if it was cached,
3228# so that the user can short-circuit this test for compilers unknown to
3229# Autoconf.
3230for ac_file in $ac_files ''
bec39cab
AC
3231do
3232 test -f "$ac_file" || continue
3233 case $ac_file in
81ecdfbb 3234 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3235 ;;
3236 [ab].out )
3237 # We found the default executable, but exeext='' is most
3238 # certainly right.
3239 break;;
3240 *.* )
81ecdfbb
RW
3241 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3242 then :; else
3243 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3244 fi
3245 # We set ac_cv_exeext here because the later test for it is not
3246 # safe: cross compilers may not add the suffix if given an `-o'
3247 # argument, so we may need to know it at that point already.
3248 # Even if this section looks crufty: it has the advantage of
3249 # actually working.
b4e70030
JB
3250 break;;
3251 * )
3252 break;;
bec39cab
AC
3253 esac
3254done
81ecdfbb
RW
3255test "$ac_cv_exeext" = no && ac_cv_exeext=
3256
bec39cab 3257else
81ecdfbb
RW
3258 ac_file=''
3259fi
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3261$as_echo "$ac_file" >&6; }
3262if test -z "$ac_file"; then :
3263 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3264sed 's/^/| /' conftest.$ac_ext >&5
3265
81ecdfbb
RW
3266{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3267$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3268{ as_fn_set_status 77
3269as_fn_error "C compiler cannot create executables
3270See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3271fi
b4e70030 3272ac_exeext=$ac_cv_exeext
b4e70030 3273
81ecdfbb 3274# Check that the compiler produces executables we can run. If not, either
bec39cab 3275# the compiler is broken, or we cross compile.
81ecdfbb
RW
3276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3277$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3278# If not cross compiling, check that we can run a simple program.
3279if test "$cross_compiling" != yes; then
3280 if { ac_try='./$ac_file'
81ecdfbb
RW
3281 { { case "(($ac_try" in
3282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3283 *) ac_try_echo=$ac_try;;
3284esac
3285eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3286$as_echo "$ac_try_echo"; } >&5
3287 (eval "$ac_try") 2>&5
bec39cab 3288 ac_status=$?
81ecdfbb
RW
3289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3290 test $ac_status = 0; }; }; then
bec39cab 3291 cross_compiling=no
c906108c 3292 else
bec39cab
AC
3293 if test "$cross_compiling" = maybe; then
3294 cross_compiling=yes
3295 else
81ecdfbb
RW
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298as_fn_error "cannot run C compiled programs.
bec39cab 3299If you meant to cross compile, use \`--host'.
81ecdfbb 3300See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3301 fi
c906108c 3302 fi
bec39cab 3303fi
81ecdfbb
RW
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3305$as_echo "yes" >&6; }
bec39cab 3306
81ecdfbb 3307rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3308ac_clean_files=$ac_clean_files_save
81ecdfbb 3309# Check that the compiler produces executables we can run. If not, either
b4e70030 3310# the compiler is broken, or we cross compile.
81ecdfbb
RW
3311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3312$as_echo_n "checking whether we are cross compiling... " >&6; }
3313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3314$as_echo "$cross_compiling" >&6; }
3315
3316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3317$as_echo_n "checking for suffix of executables... " >&6; }
3318if { { ac_try="$ac_link"
3319case "(($ac_try" in
3320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3321 *) ac_try_echo=$ac_try;;
3322esac
3323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3324$as_echo "$ac_try_echo"; } >&5
3325 (eval "$ac_link") 2>&5
bec39cab 3326 ac_status=$?
81ecdfbb
RW
3327 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3328 test $ac_status = 0; }; then :
b4e70030
JB
3329 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3330# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3331# work properly (i.e., refer to `conftest.exe'), while it won't with
3332# `rm'.
3333for ac_file in conftest.exe conftest conftest.*; do
3334 test -f "$ac_file" || continue
3335 case $ac_file in
81ecdfbb 3336 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3337 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3338 break;;
3339 * ) break;;
3340 esac
3341done
c906108c 3342else
81ecdfbb
RW
3343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3345as_fn_error "cannot compute suffix of executables: cannot compile and link
3346See \`config.log' for more details." "$LINENO" 5; }
c906108c 3347fi
b4e70030 3348rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3350$as_echo "$ac_cv_exeext" >&6; }
c906108c 3351
b4e70030 3352rm -f conftest.$ac_ext
bec39cab
AC
3353EXEEXT=$ac_cv_exeext
3354ac_exeext=$EXEEXT
81ecdfbb
RW
3355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3356$as_echo_n "checking for suffix of object files... " >&6; }
3357if test "${ac_cv_objext+set}" = set; then :
3358 $as_echo_n "(cached) " >&6
bec39cab 3359else
81ecdfbb 3360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3361/* end confdefs.h. */
3362
3363int
3364main ()
3365{
3366
3367 ;
3368 return 0;
3369}
3370_ACEOF
3371rm -f conftest.o conftest.obj
81ecdfbb
RW
3372if { { ac_try="$ac_compile"
3373case "(($ac_try" in
3374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3375 *) ac_try_echo=$ac_try;;
3376esac
3377eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3378$as_echo "$ac_try_echo"; } >&5
3379 (eval "$ac_compile") 2>&5
3380 ac_status=$?
3381 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3382 test $ac_status = 0; }; then :
3383 for ac_file in conftest.o conftest.obj conftest.*; do
3384 test -f "$ac_file" || continue;
bec39cab 3385 case $ac_file in
81ecdfbb 3386 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3387 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3388 break;;
3389 esac
3390done
c906108c 3391else
81ecdfbb 3392 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3393sed 's/^/| /' conftest.$ac_ext >&5
3394
81ecdfbb
RW
3395{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3397as_fn_error "cannot compute suffix of object files: cannot compile
3398See \`config.log' for more details." "$LINENO" 5; }
c906108c 3399fi
b4e70030 3400rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3401fi
81ecdfbb
RW
3402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3403$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3404OBJEXT=$ac_cv_objext
3405ac_objext=$OBJEXT
81ecdfbb
RW
3406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3407$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3408if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3409 $as_echo_n "(cached) " >&6
c906108c 3410else
81ecdfbb 3411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3412/* end confdefs.h. */
3413
3414int
3415main ()
3416{
3417#ifndef __GNUC__
3418 choke me
3419#endif
3420
3421 ;
3422 return 0;
3423}
3424_ACEOF
81ecdfbb 3425if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3426 ac_compiler_gnu=yes
3427else
81ecdfbb 3428 ac_compiler_gnu=no
bec39cab 3429fi
81ecdfbb 3430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3431ac_cv_c_compiler_gnu=$ac_compiler_gnu
3432
3433fi
81ecdfbb
RW
3434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3435$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3436if test $ac_compiler_gnu = yes; then
3437 GCC=yes
3438else
3439 GCC=
3440fi
bec39cab
AC
3441ac_test_CFLAGS=${CFLAGS+set}
3442ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3444$as_echo_n "checking whether $CC accepts -g... " >&6; }
3445if test "${ac_cv_prog_cc_g+set}" = set; then :
3446 $as_echo_n "(cached) " >&6
bec39cab 3447else
81ecdfbb
RW
3448 ac_save_c_werror_flag=$ac_c_werror_flag
3449 ac_c_werror_flag=yes
3450 ac_cv_prog_cc_g=no
3451 CFLAGS="-g"
3452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3453/* end confdefs.h. */
3454
3455int
3456main ()
3457{
3458
3459 ;
3460 return 0;
3461}
3462_ACEOF
81ecdfbb 3463if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3464 ac_cv_prog_cc_g=yes
3465else
81ecdfbb
RW
3466 CFLAGS=""
3467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3468/* end confdefs.h. */
3469
3470int
3471main ()
3472{
3473
3474 ;
3475 return 0;
3476}
3477_ACEOF
3478if ac_fn_c_try_compile "$LINENO"; then :
3479
3480else
3481 ac_c_werror_flag=$ac_save_c_werror_flag
3482 CFLAGS="-g"
3483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3484/* end confdefs.h. */
3485
3486int
3487main ()
3488{
c906108c 3489
81ecdfbb
RW
3490 ;
3491 return 0;
3492}
3493_ACEOF
3494if ac_fn_c_try_compile "$LINENO"; then :
3495 ac_cv_prog_cc_g=yes
3496fi
3497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3498fi
3499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3500fi
81ecdfbb
RW
3501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3502 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3503fi
81ecdfbb
RW
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3505$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3506if test "$ac_test_CFLAGS" = set; then
bec39cab 3507 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3508elif test $ac_cv_prog_cc_g = yes; then
3509 if test "$GCC" = yes; then
3510 CFLAGS="-g -O2"
3511 else
3512 CFLAGS="-g"
3513 fi
3514else
3515 if test "$GCC" = yes; then
3516 CFLAGS="-O2"
3517 else
3518 CFLAGS=
3519 fi
3520fi
81ecdfbb
RW
3521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3522$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3523if test "${ac_cv_prog_cc_c89+set}" = set; then :
3524 $as_echo_n "(cached) " >&6
bec39cab 3525else
81ecdfbb 3526 ac_cv_prog_cc_c89=no
bec39cab 3527ac_save_CC=$CC
81ecdfbb 3528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3529/* end confdefs.h. */
c906108c
SS
3530#include <stdarg.h>
3531#include <stdio.h>
3532#include <sys/types.h>
3533#include <sys/stat.h>
3534/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3535struct buf { int x; };
3536FILE * (*rcsopen) (struct buf *, struct stat *, int);
3537static char *e (p, i)
3538 char **p;
3539 int i;
3540{
3541 return p[i];
3542}
3543static char *f (char * (*g) (char **, int), char **p, ...)
3544{
3545 char *s;
3546 va_list v;
3547 va_start (v,p);
3548 s = g (p, va_arg (v,int));
3549 va_end (v);
3550 return s;
3551}
bec39cab
AC
3552
3553/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3554 function prototypes and stuff, but not '\xHH' hex character constants.
3555 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3556 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3557 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3558 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3559 that's true only with -std. */
bec39cab
AC
3560int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3561
81ecdfbb
RW
3562/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3563 inside strings and character constants. */
3564#define FOO(x) 'x'
3565int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3566
c906108c
SS
3567int test (int i, double x);
3568struct s1 {int (*f) (int a);};
3569struct s2 {int (*f) (double a);};
3570int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3571int argc;
3572char **argv;
bec39cab
AC
3573int
3574main ()
3575{
c906108c 3576return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3577 ;
3578 return 0;
3579}
3580_ACEOF
81ecdfbb
RW
3581for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3582 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3583do
3584 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3585 if ac_fn_c_try_compile "$LINENO"; then :
3586 ac_cv_prog_cc_c89=$ac_arg
c906108c 3587fi
81ecdfbb
RW
3588rm -f core conftest.err conftest.$ac_objext
3589 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3590done
81ecdfbb 3591rm -f conftest.$ac_ext
bec39cab 3592CC=$ac_save_CC
c906108c
SS
3593
3594fi
81ecdfbb
RW
3595# AC_CACHE_VAL
3596case "x$ac_cv_prog_cc_c89" in
3597 x)
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3599$as_echo "none needed" >&6; } ;;
3600 xno)
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3602$as_echo "unsupported" >&6; } ;;
bec39cab 3603 *)
81ecdfbb
RW
3604 CC="$CC $ac_cv_prog_cc_c89"
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3606$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3607esac
81ecdfbb 3608if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3609
b4e70030
JB
3610fi
3611
bec39cab
AC
3612ac_ext=c
3613ac_cpp='$CPP $CPPFLAGS'
3614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3616ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3617
f434ba03
PA
3618ac_aux_dir=
3619for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3620 for ac_t in install-sh install.sh shtool; do
3621 if test -f "$ac_dir/$ac_t"; then
3622 ac_aux_dir=$ac_dir
3623 ac_install_sh="$ac_aux_dir/$ac_t -c"
3624 break 2
3625 fi
3626 done
3627done
3628if test -z "$ac_aux_dir"; then
3629 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3630fi
3631
3632# These three variables are undocumented and unsupported,
3633# and are intended to be withdrawn in a future Autoconf release.
3634# They can cause serious problems if a builder's source tree is in a directory
3635# whose full name contains unusual characters.
3636ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3637ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3638ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3639
3640
3641# Make sure we can run config.sub.
3642$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3643 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3644
3645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3646$as_echo_n "checking build system type... " >&6; }
3647if test "${ac_cv_build+set}" = set; then :
3648 $as_echo_n "(cached) " >&6
3649else
3650 ac_build_alias=$build_alias
3651test "x$ac_build_alias" = x &&
3652 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3653test "x$ac_build_alias" = x &&
3654 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3655ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3656 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3657
3658fi
3659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3660$as_echo "$ac_cv_build" >&6; }
3661case $ac_cv_build in
3662*-*-*) ;;
3663*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3664esac
3665build=$ac_cv_build
3666ac_save_IFS=$IFS; IFS='-'
3667set x $ac_cv_build
3668shift
3669build_cpu=$1
3670build_vendor=$2
3671shift; shift
3672# Remember, the first character of IFS is used to create $*,
3673# except with old shells:
3674build_os=$*
3675IFS=$ac_save_IFS
3676case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3677
3678
3679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3680$as_echo_n "checking host system type... " >&6; }
3681if test "${ac_cv_host+set}" = set; then :
3682 $as_echo_n "(cached) " >&6
3683else
3684 if test "x$host_alias" = x; then
3685 ac_cv_host=$ac_cv_build
3686else
3687 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3688 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3689fi
3690
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3693$as_echo "$ac_cv_host" >&6; }
3694case $ac_cv_host in
3695*-*-*) ;;
3696*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3697esac
3698host=$ac_cv_host
3699ac_save_IFS=$IFS; IFS='-'
3700set x $ac_cv_host
3701shift
3702host_cpu=$1
3703host_vendor=$2
3704shift; shift
3705# Remember, the first character of IFS is used to create $*,
3706# except with old shells:
3707host_os=$*
3708IFS=$ac_save_IFS
3709case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3710
3711
60ca704f 3712
bec39cab
AC
3713ac_ext=c
3714ac_cpp='$CPP $CPPFLAGS'
3715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3717ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3719$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3720# On Suns, sometimes $CPP names a directory.
3721if test -n "$CPP" && test -d "$CPP"; then
3722 CPP=
8bb2c122 3723fi
bec39cab 3724if test -z "$CPP"; then
81ecdfbb
RW
3725 if test "${ac_cv_prog_CPP+set}" = set; then :
3726 $as_echo_n "(cached) " >&6
bec39cab
AC
3727else
3728 # Double quotes because CPP needs to be expanded
3729 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3730 do
3731 ac_preproc_ok=false
3732for ac_c_preproc_warn_flag in '' yes
3733do
3734 # Use a header file that comes with gcc, so configuring glibc
3735 # with a fresh cross-compiler works.
3736 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3737 # <limits.h> exists even on freestanding compilers.
3738 # On the NeXT, cc -E runs the code through the compiler's parser,
3739 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3741/* end confdefs.h. */
3742#ifdef __STDC__
3743# include <limits.h>
3744#else
3745# include <assert.h>
3746#endif
3747 Syntax error
3748_ACEOF
81ecdfbb 3749if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3750
81ecdfbb 3751else
bec39cab
AC
3752 # Broken: fails on valid input.
3753continue
3754fi
3755rm -f conftest.err conftest.$ac_ext
3756
81ecdfbb 3757 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3758 # can be detected and how.
81ecdfbb 3759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3760/* end confdefs.h. */
3761#include <ac_nonexistent.h>
3762_ACEOF
81ecdfbb 3763if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3764 # Broken: success on invalid input.
3765continue
8bb2c122 3766else
bec39cab
AC
3767 # Passes both tests.
3768ac_preproc_ok=:
3769break
8bb2c122 3770fi
bec39cab 3771rm -f conftest.err conftest.$ac_ext
8bb2c122 3772
bec39cab
AC
3773done
3774# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3775rm -f conftest.err conftest.$ac_ext
81ecdfbb 3776if $ac_preproc_ok; then :
bec39cab
AC
3777 break
3778fi
8bb2c122 3779
bec39cab
AC
3780 done
3781 ac_cv_prog_CPP=$CPP
ddc9cd0f 3782
c906108c 3783fi
bec39cab
AC
3784 CPP=$ac_cv_prog_CPP
3785else
3786 ac_cv_prog_CPP=$CPP
c906108c 3787fi
81ecdfbb
RW
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3789$as_echo "$CPP" >&6; }
bec39cab
AC
3790ac_preproc_ok=false
3791for ac_c_preproc_warn_flag in '' yes
3792do
3793 # Use a header file that comes with gcc, so configuring glibc
3794 # with a fresh cross-compiler works.
3795 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3796 # <limits.h> exists even on freestanding compilers.
3797 # On the NeXT, cc -E runs the code through the compiler's parser,
3798 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3800/* end confdefs.h. */
3801#ifdef __STDC__
3802# include <limits.h>
3803#else
3804# include <assert.h>
3805#endif
3806 Syntax error
3807_ACEOF
81ecdfbb 3808if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3809
81ecdfbb 3810else
bec39cab
AC
3811 # Broken: fails on valid input.
3812continue
3813fi
3814rm -f conftest.err conftest.$ac_ext
3815
81ecdfbb 3816 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3817 # can be detected and how.
81ecdfbb 3818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3819/* end confdefs.h. */
3820#include <ac_nonexistent.h>
3821_ACEOF
81ecdfbb 3822if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3823 # Broken: success on invalid input.
3824continue
c906108c 3825else
bec39cab
AC
3826 # Passes both tests.
3827ac_preproc_ok=:
3828break
c906108c 3829fi
bec39cab 3830rm -f conftest.err conftest.$ac_ext
c906108c 3831
bec39cab
AC
3832done
3833# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3834rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3835if $ac_preproc_ok; then :
3836
c906108c 3837else
81ecdfbb
RW
3838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3840as_fn_error "C preprocessor \"$CPP\" fails sanity check
3841See \`config.log' for more details." "$LINENO" 5; }
c906108c 3842fi
c906108c 3843
bec39cab
AC
3844ac_ext=c
3845ac_cpp='$CPP $CPPFLAGS'
3846ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3847ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3848ac_compiler_gnu=$ac_cv_c_compiler_gnu
3849
3850
81ecdfbb
RW
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3852$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3853if test "${ac_cv_path_GREP+set}" = set; then :
3854 $as_echo_n "(cached) " >&6
4e8d927d 3855else
81ecdfbb
RW
3856 if test -z "$GREP"; then
3857 ac_path_GREP_found=false
3858 # Loop through the user's path and test for each of PROGNAME-LIST
3859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
3864 for ac_prog in grep ggrep; do
3865 for ac_exec_ext in '' $ac_executable_extensions; do
3866 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3867 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3868# Check for GNU ac_path_GREP and select it if it is found.
3869 # Check for GNU $ac_path_GREP
3870case `"$ac_path_GREP" --version 2>&1` in
3871*GNU*)
3872 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3873*)
3874 ac_count=0
3875 $as_echo_n 0123456789 >"conftest.in"
3876 while :
3877 do
3878 cat "conftest.in" "conftest.in" >"conftest.tmp"
3879 mv "conftest.tmp" "conftest.in"
3880 cp "conftest.in" "conftest.nl"
3881 $as_echo 'GREP' >> "conftest.nl"
3882 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3883 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3884 as_fn_arith $ac_count + 1 && ac_count=$as_val
3885 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3886 # Best one so far, save it but keep looking for a better one
3887 ac_cv_path_GREP="$ac_path_GREP"
3888 ac_path_GREP_max=$ac_count
bec39cab 3889 fi
81ecdfbb
RW
3890 # 10*(2^10) chars as input seems more than enough
3891 test $ac_count -gt 10 && break
3892 done
3893 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3894esac
bec39cab 3895
81ecdfbb
RW
3896 $ac_path_GREP_found && break 3
3897 done
3898 done
3899 done
3900IFS=$as_save_IFS
3901 if test -z "$ac_cv_path_GREP"; then
3902 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3903 fi
c906108c 3904else
81ecdfbb 3905 ac_cv_path_GREP=$GREP
c906108c 3906fi
c906108c 3907
81ecdfbb
RW
3908fi
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3910$as_echo "$ac_cv_path_GREP" >&6; }
3911 GREP="$ac_cv_path_GREP"
c906108c 3912
c906108c 3913
81ecdfbb
RW
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3915$as_echo_n "checking for egrep... " >&6; }
3916if test "${ac_cv_path_EGREP+set}" = set; then :
3917 $as_echo_n "(cached) " >&6
783e057b 3918else
81ecdfbb
RW
3919 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3920 then ac_cv_path_EGREP="$GREP -E"
3921 else
3922 if test -z "$EGREP"; then
3923 ac_path_EGREP_found=false
3924 # Loop through the user's path and test for each of PROGNAME-LIST
3925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3926for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3927do
3928 IFS=$as_save_IFS
3929 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3930 for ac_prog in egrep; do
3931 for ac_exec_ext in '' $ac_executable_extensions; do
3932 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3933 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3934# Check for GNU ac_path_EGREP and select it if it is found.
3935 # Check for GNU $ac_path_EGREP
3936case `"$ac_path_EGREP" --version 2>&1` in
3937*GNU*)
3938 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3939*)
3940 ac_count=0
3941 $as_echo_n 0123456789 >"conftest.in"
3942 while :
3943 do
3944 cat "conftest.in" "conftest.in" >"conftest.tmp"
3945 mv "conftest.tmp" "conftest.in"
3946 cp "conftest.in" "conftest.nl"
3947 $as_echo 'EGREP' >> "conftest.nl"
3948 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3949 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3950 as_fn_arith $ac_count + 1 && ac_count=$as_val
3951 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3952 # Best one so far, save it but keep looking for a better one
3953 ac_cv_path_EGREP="$ac_path_EGREP"
3954 ac_path_EGREP_max=$ac_count
3955 fi
3956 # 10*(2^10) chars as input seems more than enough
3957 test $ac_count -gt 10 && break
3958 done
3959 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3960esac
bec39cab 3961
81ecdfbb
RW
3962 $ac_path_EGREP_found && break 3
3963 done
3964 done
3965 done
3966IFS=$as_save_IFS
3967 if test -z "$ac_cv_path_EGREP"; then
3968 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3969 fi
783e057b 3970else
81ecdfbb 3971 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3972fi
3973
81ecdfbb 3974 fi
783e057b 3975fi
81ecdfbb
RW
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3977$as_echo "$ac_cv_path_EGREP" >&6; }
3978 EGREP="$ac_cv_path_EGREP"
3979
783e057b 3980
81ecdfbb
RW
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3982$as_echo_n "checking for ANSI C header files... " >&6; }
3983if test "${ac_cv_header_stdc+set}" = set; then :
3984 $as_echo_n "(cached) " >&6
783e057b 3985else
81ecdfbb 3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3987/* end confdefs.h. */
783e057b 3988#include <stdlib.h>
bec39cab 3989#include <stdarg.h>
783e057b
DJ
3990#include <string.h>
3991#include <float.h>
c906108c 3992
bec39cab
AC
3993int
3994main ()
3995{
c906108c 3996
bec39cab
AC
3997 ;
3998 return 0;
3999}
4000_ACEOF
81ecdfbb 4001if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4002 ac_cv_header_stdc=yes
c906108c 4003else
81ecdfbb 4004 ac_cv_header_stdc=no
c906108c 4005fi
81ecdfbb 4006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4007
783e057b
DJ
4008if test $ac_cv_header_stdc = yes; then
4009 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4011/* end confdefs.h. */
4012#include <string.h>
c906108c 4013
783e057b
DJ
4014_ACEOF
4015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4016 $EGREP "memchr" >/dev/null 2>&1; then :
4017
c906108c 4018else
783e057b 4019 ac_cv_header_stdc=no
c906108c 4020fi
783e057b 4021rm -f conftest*
c906108c
SS
4022
4023fi
4024
783e057b
DJ
4025if test $ac_cv_header_stdc = yes; then
4026 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4028/* end confdefs.h. */
4029#include <stdlib.h>
bec39cab 4030
783e057b
DJ
4031_ACEOF
4032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4033 $EGREP "free" >/dev/null 2>&1; then :
4034
bec39cab 4035else
783e057b 4036 ac_cv_header_stdc=no
bec39cab 4037fi
783e057b 4038rm -f conftest*
bec39cab
AC
4039
4040fi
bec39cab 4041
783e057b
DJ
4042if test $ac_cv_header_stdc = yes; then
4043 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4044 if test "$cross_compiling" = yes; then :
783e057b 4045 :
bec39cab 4046else
81ecdfbb 4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4048/* end confdefs.h. */
4049#include <ctype.h>
81ecdfbb 4050#include <stdlib.h>
783e057b
DJ
4051#if ((' ' & 0x0FF) == 0x020)
4052# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4053# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4054#else
4055# define ISLOWER(c) \
4056 (('a' <= (c) && (c) <= 'i') \
4057 || ('j' <= (c) && (c) <= 'r') \
4058 || ('s' <= (c) && (c) <= 'z'))
4059# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4060#endif
4061
4062#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4063int
4064main ()
4065{
4066 int i;
4067 for (i = 0; i < 256; i++)
4068 if (XOR (islower (i), ISLOWER (i))
4069 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4070 return 2;
4071 return 0;
783e057b
DJ
4072}
4073_ACEOF
81ecdfbb 4074if ac_fn_c_try_run "$LINENO"; then :
783e057b 4075
81ecdfbb
RW
4076else
4077 ac_cv_header_stdc=no
783e057b 4078fi
81ecdfbb
RW
4079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4080 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4081fi
81ecdfbb 4082
783e057b
DJ
4083fi
4084fi
81ecdfbb
RW
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4086$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4087if test $ac_cv_header_stdc = yes; then
4088
81ecdfbb 4089$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4090
4091fi
4092
4093# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4094for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4095 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4096do :
4097 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4098ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4099"
4100eval as_val=\$$as_ac_Header
4101 if test "x$as_val" = x""yes; then :
783e057b 4102 cat >>confdefs.h <<_ACEOF
81ecdfbb 4103#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4104_ACEOF
4105
4106fi
4107
4108done
4109
4110
4111
f434ba03
PA
4112
4113
81ecdfbb
RW
4114 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4115if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4116 MINIX=yes
4117else
4118 MINIX=
4119fi
4120
4121
4122 if test "$MINIX" = yes; then
4123
81ecdfbb 4124$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4125
4126
81ecdfbb 4127$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4128
4129
81ecdfbb 4130$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4131
4132 fi
4133
f434ba03
PA
4134 case "$host_os" in
4135 hpux*)
4136
4137$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4138
4139 ;;
4140 esac
4141
783e057b 4142
81ecdfbb
RW
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4144$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4145if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4146 $as_echo_n "(cached) " >&6
783e057b 4147else
81ecdfbb 4148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4149/* end confdefs.h. */
4150
f434ba03
PA
4151# define __EXTENSIONS__ 1
4152 $ac_includes_default
783e057b
DJ
4153int
4154main ()
4155{
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
81ecdfbb 4161if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4162 ac_cv_safe_to_define___extensions__=yes
4163else
81ecdfbb 4164 ac_cv_safe_to_define___extensions__=no
783e057b 4165fi
81ecdfbb 4166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4167fi
81ecdfbb
RW
4168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4169$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4170 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4171 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4172
81ecdfbb 4173 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4174
81ecdfbb 4175 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4176
81ecdfbb 4177 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4178
81ecdfbb 4179 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4180
4181
81ecdfbb
RW
4182if test -n "$ac_tool_prefix"; then
4183 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4184set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4186$as_echo_n "checking for $ac_word... " >&6; }
4187if test "${ac_cv_prog_RANLIB+set}" = set; then :
4188 $as_echo_n "(cached) " >&6
4189else
4190 if test -n "$RANLIB"; then
4191 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4192else
4193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196 IFS=$as_save_IFS
4197 test -z "$as_dir" && as_dir=.
4198 for ac_exec_ext in '' $ac_executable_extensions; do
4199 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202 break 2
4203 fi
4204done
4205 done
4206IFS=$as_save_IFS
783e057b 4207
81ecdfbb
RW
4208fi
4209fi
4210RANLIB=$ac_cv_prog_RANLIB
4211if test -n "$RANLIB"; then
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4213$as_echo "$RANLIB" >&6; }
4214else
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217fi
783e057b
DJ
4218
4219
81ecdfbb
RW
4220fi
4221if test -z "$ac_cv_prog_RANLIB"; then
4222 ac_ct_RANLIB=$RANLIB
4223 # Extract the first word of "ranlib", so it can be a program name with args.
4224set dummy ranlib; ac_word=$2
4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4226$as_echo_n "checking for $ac_word... " >&6; }
4227if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4228 $as_echo_n "(cached) " >&6
783e057b 4229else
81ecdfbb
RW
4230 if test -n "$ac_ct_RANLIB"; then
4231 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4232else
4233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234for as_dir in $PATH
4235do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_exec_ext in '' $ac_executable_extensions; do
4239 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4240 ac_cv_prog_ac_ct_RANLIB="ranlib"
4241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4242 break 2
4243 fi
4244done
4245 done
4246IFS=$as_save_IFS
4247
4248fi
4249fi
4250ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4251if test -n "$ac_ct_RANLIB"; then
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4253$as_echo "$ac_ct_RANLIB" >&6; }
4254else
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4256$as_echo "no" >&6; }
4257fi
4258
4259 if test "x$ac_ct_RANLIB" = x; then
4260 RANLIB=":"
4261 else
4262 case $cross_compiling:$ac_tool_warned in
4263yes:)
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4266ac_tool_warned=yes ;;
4267esac
4268 RANLIB=$ac_ct_RANLIB
4269 fi
4270else
4271 RANLIB="$ac_cv_prog_RANLIB"
4272fi
4273
4274
4275
4276
4277
4278
3388710e
JM
4279
4280
3388710e 4281
f434ba03
PA
4282 # Code from module arg-nonnull:
4283 # Code from module c++defs:
4284 # Code from module extensions:
3388710e 4285
f434ba03
PA
4286 # Code from module include_next:
4287 # Code from module memchr:
4288 # Code from module memmem:
4289 # Code from module memmem-simple:
4290 # Code from module multiarch:
4291 # Code from module stddef:
4292 # Code from module stdint:
4293 # Code from module string:
4294 # Code from module warn-on-use:
4295 # Code from module wchar:
3388710e
JM
4296
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4298$as_echo_n "checking target system type... " >&6; }
4299if test "${ac_cv_target+set}" = set; then :
4300 $as_echo_n "(cached) " >&6
4301else
4302 if test "x$target_alias" = x; then
4303 ac_cv_target=$ac_cv_host
4304else
4305 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4306 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4307fi
4308
4309fi
4310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4311$as_echo "$ac_cv_target" >&6; }
4312case $ac_cv_target in
4313*-*-*) ;;
4314*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4315esac
4316target=$ac_cv_target
4317ac_save_IFS=$IFS; IFS='-'
4318set x $ac_cv_target
4319shift
4320target_cpu=$1
4321target_vendor=$2
4322shift; shift
4323# Remember, the first character of IFS is used to create $*,
4324# except with old shells:
4325target_os=$*
4326IFS=$ac_save_IFS
4327case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4328
4329
4330# The aliases save the names the user supplied, while $host etc.
4331# will get canonicalized.
4332test -n "$target_alias" &&
4333 test "$program_prefix$program_suffix$program_transform_name" = \
4334 NONENONEs,x,x, &&
4335 program_prefix=${target_alias}-
4336
4337# The tests for host and target for $enable_largefile require
4338# canonical names.
4339
4340
81ecdfbb 4341
da2f07f1
JK
4342# As the $enable_largefile decision depends on --enable-plugins we must set it
4343# even in directories otherwise not depending on the $plugins option.
4344
4345
4346# Check whether --enable-plugins was given.
4347if test "${enable_plugins+set}" = set; then :
4348 enableval=$enable_plugins; case "${enableval}" in
4349 yes | "") plugins=yes ;;
4350 no) plugins=no ;;
4351 *) plugins=yes ;;
4352 esac
4353else
4354 plugins=no
4355fi
4356
4357
4358
4359case "${host}" in
4360 sparc-*-solaris*|i[3-7]86-*-solaris*)
4361 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4362 # are mutually exclusive; and without procfs support, the bfd/ elf module
4363 # cannot provide certain routines such as elfcore_write_prpsinfo
4364 # or elfcore_write_prstatus. So unless the user explicitly requested
4365 # large-file support through the --enable-largefile switch, disable
4366 # large-file support in favor of procfs support.
4367 test "${target}" = "${host}" -a "x$plugins" = xno \
4368 && : ${enable_largefile="no"}
4369 ;;
4370esac
4371
4372# Check whether --enable-largefile was given.
4373if test "${enable_largefile+set}" = set; then :
4374 enableval=$enable_largefile;
4375fi
4376
4377if test "$enable_largefile" != no; then
4378
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4380$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4381if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4382 $as_echo_n "(cached) " >&6
4383else
4384 ac_cv_sys_largefile_CC=no
4385 if test "$GCC" != yes; then
4386 ac_save_CC=$CC
4387 while :; do
4388 # IRIX 6.2 and later do not support large files by default,
4389 # so use the C compiler's -n32 option if that helps.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#include <sys/types.h>
4393 /* Check that off_t can represent 2**63 - 1 correctly.
4394 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4395 since some C++ compilers masquerading as C compilers
4396 incorrectly reject 9223372036854775807. */
4397#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4398 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4399 && LARGE_OFF_T % 2147483647 == 1)
4400 ? 1 : -1];
4401int
4402main ()
4403{
4404
4405 ;
4406 return 0;
4407}
4408_ACEOF
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 break
4411fi
4412rm -f core conftest.err conftest.$ac_objext
4413 CC="$CC -n32"
4414 if ac_fn_c_try_compile "$LINENO"; then :
4415 ac_cv_sys_largefile_CC=' -n32'; break
4416fi
4417rm -f core conftest.err conftest.$ac_objext
4418 break
4419 done
4420 CC=$ac_save_CC
4421 rm -f conftest.$ac_ext
4422 fi
4423fi
4424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4425$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4426 if test "$ac_cv_sys_largefile_CC" != no; then
4427 CC=$CC$ac_cv_sys_largefile_CC
4428 fi
4429
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4431$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4432if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4433 $as_echo_n "(cached) " >&6
4434else
4435 while :; do
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437/* end confdefs.h. */
4438#include <sys/types.h>
4439 /* Check that off_t can represent 2**63 - 1 correctly.
4440 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4441 since some C++ compilers masquerading as C compilers
4442 incorrectly reject 9223372036854775807. */
4443#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4444 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4445 && LARGE_OFF_T % 2147483647 == 1)
4446 ? 1 : -1];
4447int
4448main ()
4449{
4450
4451 ;
4452 return 0;
4453}
4454_ACEOF
4455if ac_fn_c_try_compile "$LINENO"; then :
4456 ac_cv_sys_file_offset_bits=no; break
4457fi
4458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#define _FILE_OFFSET_BITS 64
4462#include <sys/types.h>
4463 /* Check that off_t can represent 2**63 - 1 correctly.
4464 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4465 since some C++ compilers masquerading as C compilers
4466 incorrectly reject 9223372036854775807. */
4467#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4468 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4469 && LARGE_OFF_T % 2147483647 == 1)
4470 ? 1 : -1];
4471int
4472main ()
4473{
4474
4475 ;
4476 return 0;
4477}
4478_ACEOF
4479if ac_fn_c_try_compile "$LINENO"; then :
4480 ac_cv_sys_file_offset_bits=64; break
4481fi
4482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483 ac_cv_sys_file_offset_bits=unknown
4484 break
4485done
4486fi
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4488$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4489case $ac_cv_sys_file_offset_bits in #(
4490 no | unknown) ;;
4491 *)
4492cat >>confdefs.h <<_ACEOF
4493#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4494_ACEOF
4495;;
4496esac
4497rm -rf conftest*
4498 if test $ac_cv_sys_file_offset_bits = unknown; then
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4500$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4501if test "${ac_cv_sys_large_files+set}" = set; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 while :; do
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506/* end confdefs.h. */
4507#include <sys/types.h>
4508 /* Check that off_t can represent 2**63 - 1 correctly.
4509 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4510 since some C++ compilers masquerading as C compilers
4511 incorrectly reject 9223372036854775807. */
4512#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4513 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4514 && LARGE_OFF_T % 2147483647 == 1)
4515 ? 1 : -1];
4516int
4517main ()
4518{
4519
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524if ac_fn_c_try_compile "$LINENO"; then :
4525 ac_cv_sys_large_files=no; break
4526fi
4527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529/* end confdefs.h. */
4530#define _LARGE_FILES 1
4531#include <sys/types.h>
4532 /* Check that off_t can represent 2**63 - 1 correctly.
4533 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4534 since some C++ compilers masquerading as C compilers
4535 incorrectly reject 9223372036854775807. */
4536#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4537 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4538 && LARGE_OFF_T % 2147483647 == 1)
4539 ? 1 : -1];
4540int
4541main ()
4542{
4543
4544 ;
4545 return 0;
4546}
4547_ACEOF
4548if ac_fn_c_try_compile "$LINENO"; then :
4549 ac_cv_sys_large_files=1; break
4550fi
4551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552 ac_cv_sys_large_files=unknown
4553 break
4554done
4555fi
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4557$as_echo "$ac_cv_sys_large_files" >&6; }
4558case $ac_cv_sys_large_files in #(
4559 no | unknown) ;;
4560 *)
4561cat >>confdefs.h <<_ACEOF
4562#define _LARGE_FILES $ac_cv_sys_large_files
4563_ACEOF
4564;;
4565esac
4566rm -rf conftest*
4567 fi
4568fi
4569
4570
4571
81ecdfbb
RW
4572
4573
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4575$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4576if test "${am_cv_prog_cc_stdc+set}" = set; then :
4577 $as_echo_n "(cached) " >&6
4578else
4579 am_cv_prog_cc_stdc=no
4580ac_save_CC="$CC"
4581# Don't try gcc -ansi; that turns off useful extensions and
4582# breaks some systems' header files.
4583# AIX -qlanglvl=ansi
4584# Ultrix and OSF/1 -std1
4585# HP-UX 10.20 and later -Ae
4586# HP-UX older versions -Aa -D_HPUX_SOURCE
4587# SVR4 -Xc -D__EXTENSIONS__
4588for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4589do
783e057b 4590 CC="$ac_save_CC $ac_arg"
81ecdfbb 4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4592/* end confdefs.h. */
4593#include <stdarg.h>
4594#include <stdio.h>
4595#include <sys/types.h>
4596#include <sys/stat.h>
4597/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4598struct buf { int x; };
4599FILE * (*rcsopen) (struct buf *, struct stat *, int);
4600static char *e (p, i)
4601 char **p;
4602 int i;
4603{
4604 return p[i];
4605}
4606static char *f (char * (*g) (char **, int), char **p, ...)
4607{
4608 char *s;
4609 va_list v;
4610 va_start (v,p);
4611 s = g (p, va_arg (v,int));
4612 va_end (v);
4613 return s;
4614}
4615int test (int i, double x);
4616struct s1 {int (*f) (int a);};
4617struct s2 {int (*f) (double a);};
4618int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4619int argc;
4620char **argv;
4621
4622int
4623main ()
4624{
4625
4626return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4627
4628 ;
4629 return 0;
4630}
4631_ACEOF
81ecdfbb 4632if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4633 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4634fi
81ecdfbb 4635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4636done
4637CC="$ac_save_CC"
4638
4639fi
4640
4641if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4643$as_echo "none needed" >&6; }
783e057b 4644else
81ecdfbb
RW
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4646$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4647fi
4648case "x$am_cv_prog_cc_stdc" in
4649 x|xno) ;;
4650 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4651esac
4652
4653
4654ac_aux_dir=
81ecdfbb
RW
4655for ac_dir in .. "$srcdir"/..; do
4656 for ac_t in install-sh install.sh shtool; do
4657 if test -f "$ac_dir/$ac_t"; then
4658 ac_aux_dir=$ac_dir
4659 ac_install_sh="$ac_aux_dir/$ac_t -c"
4660 break 2
4661 fi
4662 done
783e057b
DJ
4663done
4664if test -z "$ac_aux_dir"; then
81ecdfbb 4665 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4666fi
81ecdfbb
RW
4667
4668# These three variables are undocumented and unsupported,
4669# and are intended to be withdrawn in a future Autoconf release.
4670# They can cause serious problems if a builder's source tree is in a directory
4671# whose full name contains unusual characters.
4672ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4673ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4674ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4675
783e057b 4676
783e057b 4677
81ecdfbb 4678
a417dc56
RW
4679# Dependency checking.
4680rm -rf .tst 2>/dev/null
4681mkdir .tst 2>/dev/null
4682if test -d .tst; then
4683 am__leading_dot=.
4684else
4685 am__leading_dot=_
4686fi
4687rmdir .tst 2>/dev/null
4688
4689DEPDIR="${am__leading_dot}deps"
4690
81ecdfbb 4691ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4692
4693
4694depcc="$CC" am_compiler_list=
4695
4696am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4698$as_echo_n "checking dependency style of $depcc... " >&6; }
4699if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4700 $as_echo_n "(cached) " >&6
a417dc56
RW
4701else
4702 if test -f "$am_depcomp"; then
4703 # We make a subdir and do the tests there. Otherwise we can end up
4704 # making bogus files that we don't know about and never remove. For
4705 # instance it was reported that on HP-UX the gcc test will end up
4706 # making a dummy file named `D' -- because `-MD' means `put the output
4707 # in D'.
4708 mkdir conftest.dir
4709 # Copy depcomp to subdir because otherwise we won't find it if we're
4710 # using a relative directory.
4711 cp "$am_depcomp" conftest.dir
4712 cd conftest.dir
4713 # We will build objects and dependencies in a subdirectory because
4714 # it helps to detect inapplicable dependency modes. For instance
4715 # both Tru64's cc and ICC support -MD to output dependencies as a
4716 # side effect of compilation, but ICC will put the dependencies in
4717 # the current directory while Tru64 will put them in the object
4718 # directory.
4719 mkdir sub
4720
4721 am_cv_CC_dependencies_compiler_type=none
4722 if test "$am_compiler_list" = ""; then
4723 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4724 fi
4725 for depmode in $am_compiler_list; do
4726 if test $depmode = none; then break; fi
4727
81ecdfbb 4728 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4729 # Setup a source with many dependencies, because some compilers
4730 # like to wrap large dependency lists on column 80 (with \), and
4731 # we should not choose a depcomp mode which is confused by this.
4732 #
4733 # We need to recreate these files for each test, as the compiler may
4734 # overwrite some of them when testing with obscure command lines.
4735 # This happens at least with the AIX C compiler.
4736 : > sub/conftest.c
4737 for i in 1 2 3 4 5 6; do
4738 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4739 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4740 # Solaris 8's {/usr,}/bin/sh.
4741 touch sub/conftst$i.h
4742 done
4743 echo "include sub/conftest.Po" > confmf
4744
4745 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4746 # mode. It turns out that the SunPro C++ compiler does not properly
4747 # handle `-M -o', and we need to detect this.
4748 depcmd="depmode=$depmode \
4749 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4750 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4751 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4752 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4753 if env $depcmd > conftest.err 2>&1 &&
4754 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4755 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4756 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4757 # icc doesn't choke on unknown options, it will just issue warnings
4758 # or remarks (even with -Werror). So we grep stderr for any message
4759 # that says an option was ignored or not supported.
4760 # When given -MP, icc 7.0 and 7.1 complain thusly:
4761 # icc: Command line warning: ignoring option '-M'; no argument required
4762 # The diagnosis changed in icc 8.0:
4763 # icc: Command line remark: option '-MP' not supported
4764 if (grep 'ignoring option' conftest.err ||
4765 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4766 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4767 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4768 break
4769 fi
4770 fi
81ecdfbb 4771 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4772 sed -e 's/^/| /' < conftest.err >&5
4773 done
4774
4775 cd ..
4776 rm -rf conftest.dir
4777else
4778 am_cv_CC_dependencies_compiler_type=none
4779fi
4780
4781fi
81ecdfbb
RW
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4783$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4784if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4785then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4786else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4787
4788fi
4789
4790
4791# Check for the 'make' the user wants to use.
4792for ac_prog in make
4793do
4794 # Extract the first word of "$ac_prog", so it can be a program name with args.
4795set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4797$as_echo_n "checking for $ac_word... " >&6; }
4798if test "${ac_cv_prog_MAKE+set}" = set; then :
4799 $as_echo_n "(cached) " >&6
a417dc56
RW
4800else
4801 if test -n "$MAKE"; then
4802 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4803else
4804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in $PATH
4806do
4807 IFS=$as_save_IFS
4808 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4809 for ac_exec_ext in '' $ac_executable_extensions; do
4810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4811 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4813 break 2
4814 fi
4815done
81ecdfbb
RW
4816 done
4817IFS=$as_save_IFS
a417dc56
RW
4818
4819fi
4820fi
4821MAKE=$ac_cv_prog_MAKE
4822if test -n "$MAKE"; then
81ecdfbb
RW
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4824$as_echo "$MAKE" >&6; }
a417dc56 4825else
81ecdfbb
RW
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4827$as_echo "no" >&6; }
a417dc56
RW
4828fi
4829
81ecdfbb 4830
a417dc56
RW
4831 test -n "$MAKE" && break
4832done
4833
4834MAKE_IS_GNU=
4835case "`$MAKE --version 2>&1 | sed 1q`" in
4836 *GNU*)
4837 MAKE_IS_GNU=yes
4838 ;;
4839esac
81ecdfbb 4840 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4841 GMAKE_TRUE=
4842 GMAKE_FALSE='#'
4843else
4844 GMAKE_TRUE='#'
4845 GMAKE_FALSE=
4846fi
4847
81ecdfbb
RW
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4849$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4850set x ${MAKE-make}
4851ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4852if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4853 $as_echo_n "(cached) " >&6
a417dc56
RW
4854else
4855 cat >conftest.make <<\_ACEOF
81ecdfbb 4856SHELL = /bin/sh
a417dc56 4857all:
81ecdfbb 4858 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4859_ACEOF
4860# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4861case `${MAKE-make} -f conftest.make 2>/dev/null` in
4862 *@@@%%%=?*=@@@%%%*)
4863 eval ac_cv_prog_make_${ac_make}_set=yes;;
4864 *)
4865 eval ac_cv_prog_make_${ac_make}_set=no;;
4866esac
a417dc56
RW
4867rm -f conftest.make
4868fi
81ecdfbb
RW
4869if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4871$as_echo "yes" >&6; }
a417dc56
RW
4872 SET_MAKE=
4873else
81ecdfbb
RW
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
a417dc56
RW
4876 SET_MAKE="MAKE=${MAKE-make}"
4877fi
4878
4879
783e057b
DJ
4880
4881CONFIG_OBS=
4882CONFIG_DEPS=
4883CONFIG_SRCS=
4884ENABLE_CFLAGS=
4885
4886CONFIG_ALL=
4887CONFIG_CLEAN=
4888CONFIG_INSTALL=
4889CONFIG_UNINSTALL=
4890
4891# If we haven't got the data from the intl directory,
4892# assume NLS is disabled.
4893USE_NLS=no
4894LIBINTL=
4895LIBINTL_DEP=
4896INCINTL=
4897XGETTEXT=
4898GMSGFMT=
4899POSUB=
4900
4901if test -f ../intl/config.intl; then
4902 . ../intl/config.intl
4903fi
81ecdfbb
RW
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4905$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4906if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
783e057b 4909else
81ecdfbb
RW
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4911$as_echo "yes" >&6; }
783e057b 4912
81ecdfbb 4913$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4914
4915
81ecdfbb
RW
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4917$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4918 # Look for .po and .gmo files in the source directory.
4919 CATALOGS=
4920 XLINGUAS=
4921 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4922 # If there aren't any .gmo files the shell will give us the
4923 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4924 # weeded out.
4925 case "$cat" in *\**)
4926 continue;;
4927 esac
4928 # The quadruple backslash is collapsed to a double backslash
4929 # by the backticks, then collapsed again by the double quotes,
4930 # leaving us with one backslash in the sed expression (right
4931 # before the dot that mustn't act as a wildcard).
4932 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4933 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4934 # The user is allowed to set LINGUAS to a list of languages to
4935 # install catalogs for. If it's empty that means "all of them."
4936 if test "x$LINGUAS" = x; then
4937 CATALOGS="$CATALOGS $cat"
4938 XLINGUAS="$XLINGUAS $lang"
4939 else
4940 case "$LINGUAS" in *$lang*)
4941 CATALOGS="$CATALOGS $cat"
4942 XLINGUAS="$XLINGUAS $lang"
4943 ;;
4944 esac
4945 fi
4946 done
4947 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4949$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4950
4951
4952 DATADIRNAME=share
4953
4954 INSTOBJEXT=.mo
4955
4956 GENCAT=gencat
4957
4958 CATOBJEXT=.gmo
4959
4960fi
4961
4962localedir='${datadir}/locale'
4963
4964
4965if test x"$USE_NLS" = xyes; then
4966 CONFIG_ALL="$CONFIG_ALL all-po"
4967 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4968 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4969 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4970fi
4971
4972
f434ba03
PA
4973
4974
4975
4976 LIBC_FATAL_STDERR_=1
4977 export LIBC_FATAL_STDERR_
4978
4979
4980
4981
4982
4983 for ac_header in $gl_header_list
4984do :
4985 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4986ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4987eval as_val=\$$as_ac_Header
4988 if test "x$as_val" = x""yes; then :
4989 cat >>confdefs.h <<_ACEOF
4990#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4991_ACEOF
4992
4993fi
4994
4995done
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005 for ac_func in $gl_func_list
5006do :
5007 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5008ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5009eval as_val=\$$as_ac_var
5010 if test "x$as_val" = x""yes; then :
5011 cat >>confdefs.h <<_ACEOF
5012#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5013_ACEOF
5014
5015fi
5016done
5017
5018
5019
5020
5021
5022
5023 GNULIB_MEMCHR=0;
5024 GNULIB_MEMMEM=0;
5025 GNULIB_MEMPCPY=0;
5026 GNULIB_MEMRCHR=0;
5027 GNULIB_RAWMEMCHR=0;
5028 GNULIB_STPCPY=0;
5029 GNULIB_STPNCPY=0;
5030 GNULIB_STRCHRNUL=0;
5031 GNULIB_STRDUP=0;
5032 GNULIB_STRNCAT=0;
5033 GNULIB_STRNDUP=0;
5034 GNULIB_STRNLEN=0;
5035 GNULIB_STRPBRK=0;
5036 GNULIB_STRSEP=0;
5037 GNULIB_STRSTR=0;
5038 GNULIB_STRCASESTR=0;
5039 GNULIB_STRTOK_R=0;
5040 GNULIB_MBSLEN=0;
5041 GNULIB_MBSNLEN=0;
5042 GNULIB_MBSCHR=0;
5043 GNULIB_MBSRCHR=0;
5044 GNULIB_MBSSTR=0;
5045 GNULIB_MBSCASECMP=0;
5046 GNULIB_MBSNCASECMP=0;
5047 GNULIB_MBSPCASECMP=0;
5048 GNULIB_MBSCASESTR=0;
5049 GNULIB_MBSCSPN=0;
5050 GNULIB_MBSPBRK=0;
5051 GNULIB_MBSSPN=0;
5052 GNULIB_MBSSEP=0;
5053 GNULIB_MBSTOK_R=0;
5054 GNULIB_STRERROR=0;
5055 GNULIB_STRSIGNAL=0;
5056 GNULIB_STRVERSCMP=0;
5057 HAVE_MBSLEN=0;
5058 HAVE_MEMCHR=1;
5059 HAVE_DECL_MEMMEM=1;
5060 HAVE_MEMPCPY=1;
5061 HAVE_DECL_MEMRCHR=1;
5062 HAVE_RAWMEMCHR=1;
5063 HAVE_STPCPY=1;
5064 HAVE_STPNCPY=1;
5065 HAVE_STRCHRNUL=1;
5066 HAVE_DECL_STRDUP=1;
5067 HAVE_DECL_STRNDUP=1;
5068 HAVE_DECL_STRNLEN=1;
5069 HAVE_STRPBRK=1;
5070 HAVE_STRSEP=1;
5071 HAVE_STRCASESTR=1;
5072 HAVE_DECL_STRTOK_R=1;
5073 HAVE_DECL_STRSIGNAL=1;
5074 HAVE_STRVERSCMP=1;
5075 REPLACE_MEMCHR=0;
783e057b 5076 REPLACE_MEMMEM=0;
f434ba03
PA
5077 REPLACE_STPNCPY=0;
5078 REPLACE_STRDUP=0;
783e057b 5079 REPLACE_STRSTR=0;
f434ba03
PA
5080 REPLACE_STRCASESTR=0;
5081 REPLACE_STRERROR=0;
5082 REPLACE_STRNCAT=0;
5083 REPLACE_STRNDUP=0;
5084 REPLACE_STRNLEN=0;
5085 REPLACE_STRSIGNAL=0;
5086 REPLACE_STRTOK_R=0;
5087 UNDEFINE_STRTOK_R=0;
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5102 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5103 # irrelevant for anonymous mappings.
5104 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5105if test "x$ac_cv_func_mmap" = x""yes; then :
5106 gl_have_mmap=yes
5107else
5108 gl_have_mmap=no
5109fi
5110
5111
5112 # Try to allow MAP_ANONYMOUS.
5113 gl_have_mmap_anonymous=no
5114 if test $gl_have_mmap = yes; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5116$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5118/* end confdefs.h. */
5119
5120#include <sys/mman.h>
5121#ifdef MAP_ANONYMOUS
5122 I cant identify this map.
5123#endif
5124
5125_ACEOF
5126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5127 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5128 gl_have_mmap_anonymous=yes
5129fi
5130rm -f conftest*
5131
5132 if test $gl_have_mmap_anonymous != yes; then
5133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5134/* end confdefs.h. */
5135
5136#include <sys/mman.h>
5137#ifdef MAP_ANON
5138 I cant identify this map.
5139#endif
5140
5141_ACEOF
5142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5143 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5144
5145$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5146
5147 gl_have_mmap_anonymous=yes
5148fi
5149rm -f conftest*
5150
5151 fi
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5153$as_echo "$gl_have_mmap_anonymous" >&6; }
5154 if test $gl_have_mmap_anonymous = yes; then
5155
5156$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5157
5158 fi
5159 fi
5160
5161
5162 :
5163
5164
5165
5166
5167
5168
5169 :
5170
5171
5172
5173
5174
5175
5176
5177
5178 :
5179
5180
5181
5182
5183
5184 if test $ac_cv_func_memchr = yes; then
5185 # Detect platform-specific bugs in some versions of glibc:
5186 # memchr should not dereference anything with length 0
5187 # http://bugzilla.redhat.com/499689
5188 # memchr should not dereference overestimated length after a match
5189 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5190 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5191 # Assume that memchr works on platforms that lack mprotect.
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5193$as_echo_n "checking whether memchr works... " >&6; }
5194if test "${gl_cv_func_memchr_works+set}" = set; then :
5195 $as_echo_n "(cached) " >&6
5196else
5197 if test "$cross_compiling" = yes; then :
5198 gl_cv_func_memchr_works="guessing no"
5199else
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202
5203#include <string.h>
5204#if HAVE_SYS_MMAN_H
5205# include <fcntl.h>
5206# include <unistd.h>
5207# include <sys/types.h>
5208# include <sys/mman.h>
5209# ifndef MAP_FILE
5210# define MAP_FILE 0
5211# endif
5212#endif
5213
5214int
5215main ()
5216{
5217
5218 char *fence = NULL;
5219#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5220# if HAVE_MAP_ANONYMOUS
5221 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5222 const int fd = -1;
5223# else /* !HAVE_MAP_ANONYMOUS */
5224 const int flags = MAP_FILE | MAP_PRIVATE;
5225 int fd = open ("/dev/zero", O_RDONLY, 0666);
5226 if (fd >= 0)
5227# endif
5228 {
5229 int pagesize = getpagesize ();
5230 char *two_pages =
5231 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5232 flags, fd, 0);
5233 if (two_pages != (char *)(-1)
5234 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5235 fence = two_pages + pagesize;
5236 }
5237#endif
5238 if (fence)
5239 {
5240 if (memchr (fence, 0, 0))
5241 return 1;
5242 strcpy (fence - 9, "12345678");
5243 if (memchr (fence - 9, 0, 79) != fence - 1)
5244 return 2;
5245 }
5246 return 0;
5247
5248 ;
5249 return 0;
5250}
5251_ACEOF
5252if ac_fn_c_try_run "$LINENO"; then :
5253 gl_cv_func_memchr_works=yes
5254else
5255 gl_cv_func_memchr_works=no
5256fi
5257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5258 conftest.$ac_objext conftest.beam conftest.$ac_ext
5259fi
5260
5261fi
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5263$as_echo "$gl_cv_func_memchr_works" >&6; }
5264 if test "$gl_cv_func_memchr_works" != yes; then
5265 REPLACE_MEMCHR=1
5266 fi
5267 else
5268 HAVE_MEMCHR=0
5269 fi
5270 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5271
5272
5273
5274
5275
5276
5277
5278
5279 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5280
5281
5282 for ac_header in bp-sym.h
5283do :
5284 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5285if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5286 cat >>confdefs.h <<_ACEOF
5287#define HAVE_BP_SYM_H 1
5288_ACEOF
5289
5290fi
5291
5292done
5293
5294
5295 fi
783e057b
DJ
5296
5297
81ecdfbb
RW
5298 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5299if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5300 ac_have_decl=1
783e057b 5301else
81ecdfbb 5302 ac_have_decl=0
783e057b 5303fi
783e057b
DJ
5304
5305cat >>confdefs.h <<_ACEOF
81ecdfbb 5306#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5307_ACEOF
5308
5309
783e057b
DJ
5310
5311
5312
5313
5314
5315
5316
5317
783e057b 5318
783e057b 5319
783e057b 5320
f434ba03 5321
81ecdfbb
RW
5322 for ac_func in memmem
5323do :
5324 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5325if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5326 cat >>confdefs.h <<_ACEOF
81ecdfbb 5327#define HAVE_MEMMEM 1
783e057b
DJ
5328_ACEOF
5329
5330else
5331
5332 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5333
5334fi
5335done
5336
5337
5338
5339 :
5340
5341
5342
5343
5344
5345 if test $ac_cv_have_decl_memmem = no; then
5346 HAVE_DECL_MEMMEM=0
5347 fi
5348 :
5349
5350
f434ba03
PA
5351 gl_cv_c_multiarch=no
5352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5353/* end confdefs.h. */
5354#ifndef __APPLE_CC__
5355 not a universal capable compiler
5356 #endif
5357 typedef int dummy;
5358
5359_ACEOF
5360if ac_fn_c_try_compile "$LINENO"; then :
5361
5362 arch=
5363 prev=
5364 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5365 if test -n "$prev"; then
5366 case $word in
5367 i?86 | x86_64 | ppc | ppc64)
5368 if test -z "$arch" || test "$arch" = "$word"; then
5369 arch="$word"
5370 else
5371 gl_cv_c_multiarch=yes
5372 fi
5373 ;;
5374 esac
5375 prev=
5376 else
5377 if test "x$word" = "x-arch"; then
5378 prev=arch
5379 fi
5380 fi
5381 done
5382
5383fi
5384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5385 if test $gl_cv_c_multiarch = yes; then
5386
5387$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5388
5389 APPLE_UNIVERSAL_BUILD=1
5390 else
5391 APPLE_UNIVERSAL_BUILD=0
5392 fi
5393
5394
5395
5396 REPLACE_NULL=0;
5397 HAVE_WCHAR_T=1;
5398 STDDEF_H='';
5399
5400
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5402$as_echo_n "checking for wchar_t... " >&6; }
5403if test "${gt_cv_c_wchar_t+set}" = set; then :
5404 $as_echo_n "(cached) " >&6
5405else
5406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407/* end confdefs.h. */
5408#include <stddef.h>
5409 wchar_t foo = (wchar_t)'\0';
5410int
5411main ()
5412{
5413
5414 ;
5415 return 0;
5416}
5417_ACEOF
5418if ac_fn_c_try_compile "$LINENO"; then :
5419 gt_cv_c_wchar_t=yes
5420else
5421 gt_cv_c_wchar_t=no
5422fi
5423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5424fi
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5426$as_echo "$gt_cv_c_wchar_t" >&6; }
5427 if test $gt_cv_c_wchar_t = yes; then
5428
5429$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5430
5431 fi
5432
5433
5434
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5436$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5437if test "${gl_cv_have_include_next+set}" = set; then :
5438 $as_echo_n "(cached) " >&6
5439else
5440 rm -rf conftestd1a conftestd1b conftestd2
5441 mkdir conftestd1a conftestd1b conftestd2
5442 cat <<EOF > conftestd1a/conftest.h
5443#define DEFINED_IN_CONFTESTD1
5444#include_next <conftest.h>
5445#ifdef DEFINED_IN_CONFTESTD2
5446int foo;
5447#else
5448#error "include_next doesn't work"
5449#endif
5450EOF
5451 cat <<EOF > conftestd1b/conftest.h
5452#define DEFINED_IN_CONFTESTD1
5453#include <stdio.h>
5454#include_next <conftest.h>
5455#ifdef DEFINED_IN_CONFTESTD2
5456int foo;
5457#else
5458#error "include_next doesn't work"
5459#endif
5460EOF
5461 cat <<EOF > conftestd2/conftest.h
5462#ifndef DEFINED_IN_CONFTESTD1
5463#error "include_next test doesn't work"
5464#endif
5465#define DEFINED_IN_CONFTESTD2
5466EOF
5467 gl_save_CPPFLAGS="$CPPFLAGS"
5468 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <conftest.h>
5472_ACEOF
5473if ac_fn_c_try_compile "$LINENO"; then :
5474 gl_cv_have_include_next=yes
5475else
5476 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h. */
5479#include <conftest.h>
5480_ACEOF
5481if ac_fn_c_try_compile "$LINENO"; then :
5482 gl_cv_have_include_next=buggy
5483else
5484 gl_cv_have_include_next=no
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488fi
5489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5490 CPPFLAGS="$gl_save_CPPFLAGS"
5491 rm -rf conftestd1a conftestd1b conftestd2
5492
5493fi
5494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5495$as_echo "$gl_cv_have_include_next" >&6; }
5496 PRAGMA_SYSTEM_HEADER=
5497 if test $gl_cv_have_include_next = yes; then
5498 INCLUDE_NEXT=include_next
5499 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5500 if test -n "$GCC"; then
5501 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5502 fi
5503 else
5504 if test $gl_cv_have_include_next = buggy; then
5505 INCLUDE_NEXT=include
5506 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5507 else
5508 INCLUDE_NEXT=include
5509 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5510 fi
5511 fi
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
81ecdfbb
RW
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5523$as_echo_n "checking for long long int... " >&6; }
5524if test "${ac_cv_type_long_long_int+set}" = set; then :
5525 $as_echo_n "(cached) " >&6
783e057b 5526else
81ecdfbb 5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5528/* end confdefs.h. */
81ecdfbb
RW
5529
5530 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5531 implementations with broken preprocessors. Perhaps this can
5532 be revisited in 2012. In the meantime, code should not expect
5533 #if to work with literals wider than 32 bits. */
783e057b
DJ
5534 /* Test literals. */
5535 long long int ll = 9223372036854775807ll;
5536 long long int nll = -9223372036854775807LL;
5537 unsigned long long int ull = 18446744073709551615ULL;
5538 /* Test constant expressions. */
5539 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5540 ? 1 : -1)];
783e057b 5541 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5542 ? 1 : -1)];
783e057b
DJ
5543 int i = 63;
5544int
5545main ()
5546{
5547/* Test availability of runtime routines for shift and division. */
5548 long long int llmax = 9223372036854775807ll;
5549 unsigned long long int ullmax = 18446744073709551615ull;
5550 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5551 | (llmax / ll) | (llmax % ll)
5552 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5553 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5554 ;
5555 return 0;
5556}
5557
5558_ACEOF
81ecdfbb 5559if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5560 if test "$cross_compiling" = yes; then :
783e057b
DJ
5561 ac_cv_type_long_long_int=yes
5562else
81ecdfbb 5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5564/* end confdefs.h. */
5565#include <limits.h>
f434ba03
PA
5566 #ifndef LLONG_MAX
5567 # define HALF \
5568 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5569 # define LLONG_MAX (HALF - 1 + HALF)
5570 #endif
783e057b
DJ
5571int
5572main ()
5573{
5574long long int n = 1;
f434ba03
PA
5575 int i;
5576 for (i = 0; ; i++)
5577 {
5578 long long int m = n << i;
5579 if (m >> i != n)
5580 return 1;
5581 if (LLONG_MAX / 2 < m)
5582 break;
5583 }
5584 return 0;
783e057b
DJ
5585 ;
5586 return 0;
5587}
5588_ACEOF
81ecdfbb 5589if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5590 ac_cv_type_long_long_int=yes
5591else
81ecdfbb 5592 ac_cv_type_long_long_int=no
783e057b 5593fi
81ecdfbb
RW
5594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5595 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5596fi
783e057b 5597
81ecdfbb
RW
5598else
5599 ac_cv_type_long_long_int=no
783e057b 5600fi
81ecdfbb
RW
5601rm -f core conftest.err conftest.$ac_objext \
5602 conftest$ac_exeext conftest.$ac_ext
783e057b 5603fi
81ecdfbb
RW
5604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5605$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5606 if test $ac_cv_type_long_long_int = yes; then
5607
81ecdfbb 5608$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5609
5610 fi
5611
5612
81ecdfbb
RW
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5614$as_echo_n "checking for unsigned long long int... " >&6; }
5615if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5616 $as_echo_n "(cached) " >&6
783e057b 5617else
81ecdfbb 5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5619/* end confdefs.h. */
81ecdfbb
RW
5620
5621 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5622 implementations with broken preprocessors. Perhaps this can
5623 be revisited in 2012. In the meantime, code should not expect
5624 #if to work with literals wider than 32 bits. */
783e057b
DJ
5625 /* Test literals. */
5626 long long int ll = 9223372036854775807ll;
5627 long long int nll = -9223372036854775807LL;
5628 unsigned long long int ull = 18446744073709551615ULL;
5629 /* Test constant expressions. */
5630 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5631 ? 1 : -1)];
783e057b 5632 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5633 ? 1 : -1)];
783e057b
DJ
5634 int i = 63;
5635int
5636main ()
5637{
5638/* Test availability of runtime routines for shift and division. */
5639 long long int llmax = 9223372036854775807ll;
5640 unsigned long long int ullmax = 18446744073709551615ull;
5641 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5642 | (llmax / ll) | (llmax % ll)
5643 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5644 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5645 ;
5646 return 0;
5647}
5648
5649_ACEOF
81ecdfbb 5650if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5651 ac_cv_type_unsigned_long_long_int=yes
5652else
81ecdfbb 5653 ac_cv_type_unsigned_long_long_int=no
783e057b 5654fi
81ecdfbb
RW
5655rm -f core conftest.err conftest.$ac_objext \
5656 conftest$ac_exeext conftest.$ac_ext
783e057b 5657fi
81ecdfbb
RW
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5659$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5660 if test $ac_cv_type_unsigned_long_long_int = yes; then
5661
81ecdfbb 5662$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5663
5664 fi
5665
5666
5667
783e057b
DJ
5668
5669
5670
5671
5672
5673
5674
5675
81ecdfbb
RW
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5677$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5678if test "${ac_cv_c_restrict+set}" = set; then :
5679 $as_echo_n "(cached) " >&6
783e057b
DJ
5680else
5681 ac_cv_c_restrict=no
5682 # The order here caters to the fact that C++ does not require restrict.
5683 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5685/* end confdefs.h. */
5686typedef int * int_ptr;
5687 int foo (int_ptr $ac_kw ip) {
5688 return ip[0];
5689 }
5690int
5691main ()
5692{
5693int s[1];
5694 int * $ac_kw t = s;
5695 t[0] = 0;
5696 return foo(t)
5697 ;
5698 return 0;
5699}
5700_ACEOF
81ecdfbb 5701if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5702 ac_cv_c_restrict=$ac_kw
783e057b 5703fi
81ecdfbb 5704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5705 test "$ac_cv_c_restrict" != no && break
5706 done
5707
5708fi
81ecdfbb
RW
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5710$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5711
5712 case $ac_cv_c_restrict in
5713 restrict) ;;
81ecdfbb 5714 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5715 ;;
5716 *) cat >>confdefs.h <<_ACEOF
5717#define restrict $ac_cv_c_restrict
5718_ACEOF
5719 ;;
5720 esac
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
f434ba03 5733
783e057b
DJ
5734 :
5735
5736
5737
5738
5739
5740
5741
f434ba03
PA
5742 if test $gl_cv_have_include_next = yes; then
5743 gl_cv_next_string_h='<'string.h'>'
5744 else
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5746$as_echo_n "checking absolute name of <string.h>... " >&6; }
5747if test "${gl_cv_next_string_h+set}" = set; then :
5748 $as_echo_n "(cached) " >&6
5749else
5750
5751 if test $ac_cv_header_string_h = yes; then
5752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5753/* end confdefs.h. */
5754#include <string.h>
5755
5756_ACEOF
5757 case "$host_os" in
5758 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5759 *) gl_absname_cpp="$ac_cpp" ;;
5760 esac
5761 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5762 sed -n '\#/string.h#{
5763 s#.*"\(.*/string.h\)".*#\1#
5764 s#^/[^/]#//&#
5765 p
5766 q
5767 }'`'"'
5768 else
5769 gl_cv_next_string_h='<'string.h'>'
5770 fi
5771
5772fi
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5774$as_echo "$gl_cv_next_string_h" >&6; }
5775 fi
5776 NEXT_STRING_H=$gl_cv_next_string_h
5777
5778 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5780 gl_next_as_first_directive='<'string.h'>'
5781 else
5782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5783 gl_next_as_first_directive=$gl_cv_next_string_h
5784 fi
5785 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5786
5787
5788
5789
5790
5791 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5792 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5794$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5795if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5796 $as_echo_n "(cached) " >&6
5797else
5798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799/* end confdefs.h. */
5800#include <string.h>
5801
5802int
5803main ()
5804{
5805#undef $gl_func
5806 (void) $gl_func;
5807 ;
5808 return 0;
5809}
5810_ACEOF
5811if ac_fn_c_try_compile "$LINENO"; then :
5812 eval "$as_gl_Symbol=yes"
5813else
5814 eval "$as_gl_Symbol=no"
5815fi
5816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5817fi
5818eval ac_res=\$$as_gl_Symbol
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5820$as_echo "$ac_res" >&6; }
5821 eval as_val=\$$as_gl_Symbol
5822 if test "x$as_val" = x""yes; then :
5823 cat >>confdefs.h <<_ACEOF
5824#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5825_ACEOF
5826
5827 eval ac_cv_have_decl_$gl_func=yes
5828fi
5829 done
5830
5831
5832
5833 GNULIB_BTOWC=0;
5834 GNULIB_WCTOB=0;
5835 GNULIB_MBSINIT=0;
5836 GNULIB_MBRTOWC=0;
5837 GNULIB_MBRLEN=0;
5838 GNULIB_MBSRTOWCS=0;
5839 GNULIB_MBSNRTOWCS=0;
5840 GNULIB_WCRTOMB=0;
5841 GNULIB_WCSRTOMBS=0;
5842 GNULIB_WCSNRTOMBS=0;
5843 GNULIB_WCWIDTH=0;
5844 HAVE_BTOWC=1;
5845 HAVE_MBSINIT=1;
5846 HAVE_MBRTOWC=1;
5847 HAVE_MBRLEN=1;
5848 HAVE_MBSRTOWCS=1;
5849 HAVE_MBSNRTOWCS=1;
5850 HAVE_WCRTOMB=1;
5851 HAVE_WCSRTOMBS=1;
5852 HAVE_WCSNRTOMBS=1;
5853 HAVE_DECL_WCTOB=1;
5854 HAVE_DECL_WCWIDTH=1;
5855 REPLACE_MBSTATE_T=0;
5856 REPLACE_BTOWC=0;
5857 REPLACE_WCTOB=0;
5858 REPLACE_MBSINIT=0;
5859 REPLACE_MBRTOWC=0;
5860 REPLACE_MBRLEN=0;
5861 REPLACE_MBSRTOWCS=0;
5862 REPLACE_MBSNRTOWCS=0;
5863 REPLACE_WCRTOMB=0;
5864 REPLACE_WCSRTOMBS=0;
5865 REPLACE_WCSNRTOMBS=0;
5866 REPLACE_WCWIDTH=0;
5867
5868
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5870$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5871if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5872 $as_echo_n "(cached) " >&6
783e057b 5873else
f434ba03
PA
5874 gl_cv_header_wchar_h_correct_inline=yes
5875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5876/* end confdefs.h. */
783e057b 5877
f434ba03
PA
5878 #define wcstod renamed_wcstod
5879#include <wchar.h>
5880extern int zero (void);
5881int main () { return zero(); }
5882
5883_ACEOF
5884 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5885 (eval $ac_compile) 2>&5
5886 ac_status=$?
5887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5888 test $ac_status = 0; }; then
5889 mv conftest.$ac_objext conftest1.$ac_objext
5890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5891/* end confdefs.h. */
f434ba03
PA
5892
5893 #define wcstod renamed_wcstod
5894#include <wchar.h>
5895int zero (void) { return 0; }
783e057b
DJ
5896
5897_ACEOF
f434ba03
PA
5898 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5902 test $ac_status = 0; }; then
5903 mv conftest.$ac_objext conftest2.$ac_objext
5904 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5905 :
5906 else
5907 gl_cv_header_wchar_h_correct_inline=no
5908 fi
5909 fi
5910 fi
5911 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5912
5913fi
f434ba03
PA
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5915$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5916 if test $gl_cv_header_wchar_h_correct_inline = no; then
5917 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5918This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5919C99 mode. You have four options:
5920 - Add the flag -fgnu89-inline to CC and reconfigure, or
5921 - Fix your include files, using parts of
5922 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5923 - Use a gcc version older than 4.3, or
5924 - Don't use the flags -std=c99 or -std=gnu99.
5925Configuration aborted." "$LINENO" 5
5926 fi
783e057b
DJ
5927
5928
f434ba03
PA
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5930$as_echo_n "checking for wint_t... " >&6; }
5931if test "${gt_cv_c_wint_t+set}" = set; then :
5932 $as_echo_n "(cached) " >&6
5933else
5934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5935/* end confdefs.h. */
783e057b 5936
f434ba03
PA
5937/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5938 <wchar.h>.
5939 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5940 before <wchar.h>. */
5941#include <stddef.h>
5942#include <stdio.h>
5943#include <time.h>
5944#include <wchar.h>
5945 wint_t foo = (wchar_t)'\0';
5946int
5947main ()
5948{
783e057b 5949
f434ba03
PA
5950 ;
5951 return 0;
5952}
5953_ACEOF
5954if ac_fn_c_try_compile "$LINENO"; then :
5955 gt_cv_c_wint_t=yes
5956else
5957 gt_cv_c_wint_t=no
5958fi
5959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5960fi
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5962$as_echo "$gt_cv_c_wint_t" >&6; }
5963 if test $gt_cv_c_wint_t = yes; then
783e057b 5964
f434ba03 5965$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5966
f434ba03 5967 fi
783e057b
DJ
5968
5969
81ecdfbb 5970 if false; then
783e057b
DJ
5971 GL_COND_LIBTOOL_TRUE=
5972 GL_COND_LIBTOOL_FALSE='#'
5973else
5974 GL_COND_LIBTOOL_TRUE='#'
5975 GL_COND_LIBTOOL_FALSE=
5976fi
5977
5978 gl_cond_libtool=false
5979 gl_libdeps=
5980 gl_ltlibdeps=
f434ba03 5981 gl_m4_base='gnulib/m4'
783e057b
DJ
5982
5983
5984
783e057b
DJ
5985
5986
5987
5988
5989
5990
f434ba03
PA
5991 gl_source_base='gnulib'
5992 # Code from module arg-nonnull:
5993 # Code from module c++defs:
5994 # Code from module extensions:
5995 # Code from module include_next:
5996 # Code from module memchr:
783e057b 5997
783e057b 5998
783e057b 5999
783e057b 6000
f434ba03 6001 GNULIB_MEMCHR=1
783e057b 6002
783e057b 6003
783e057b 6004
f434ba03 6005$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6006
783e057b
DJ
6007
6008
f434ba03 6009 # Code from module memmem:
783e057b
DJ
6010
6011
f434ba03
PA
6012 if test $ac_cv_have_decl_memmem = yes; then
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6014$as_echo_n "checking whether memmem works in linear time... " >&6; }
6015if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6016 $as_echo_n "(cached) " >&6
783e057b 6017else
81ecdfbb 6018 if test "$cross_compiling" = yes; then :
f434ba03 6019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6020/* end confdefs.h. */
783e057b 6021
f434ba03
PA
6022#include <features.h>
6023#ifdef __GNU_LIBRARY__
6024 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6025 Lucky user
6026 #endif
6027#endif
6028#ifdef __CYGWIN__
6029 #include <cygwin/version.h>
6030 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6031 Lucky user
6032 #endif
6033#endif
783e057b 6034
783e057b 6035_ACEOF
f434ba03
PA
6036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6037 $EGREP "Lucky user" >/dev/null 2>&1; then :
6038 gl_cv_func_memmem_works=yes
783e057b 6039else
f434ba03 6040 gl_cv_func_memmem_works="guessing no"
783e057b 6041fi
f434ba03 6042rm -f conftest*
783e057b
DJ
6043
6044
783e057b 6045else
81ecdfbb 6046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6047/* end confdefs.h. */
6048
f434ba03 6049#include <signal.h> /* for signal */
783e057b
DJ
6050#include <string.h> /* for memmem */
6051#include <stdlib.h> /* for malloc */
6052#include <unistd.h> /* for alarm */
6053
6054int
6055main ()
6056{
6057size_t m = 1000000;
6058 char *haystack = (char *) malloc (2 * m + 1);
6059 char *needle = (char *) malloc (m + 1);
6060 void *result = 0;
6061 /* Failure to compile this test due to missing alarm is okay,
6062 since all such platforms (mingw) also lack memmem. */
f434ba03 6063 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6064 alarm (5);
6065 /* Check for quadratic performance. */
6066 if (haystack && needle)
6067 {
f434ba03
PA
6068 memset (haystack, 'A', 2 * m);
6069 haystack[2 * m] = 'B';
6070 memset (needle, 'A', m);
6071 needle[m] = 'B';
6072 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6073 }
6074 /* Check for empty needle behavior. */
6075 return !result || !memmem ("a", 1, 0, 0);
6076 ;
6077 return 0;
6078}
6079_ACEOF
81ecdfbb 6080if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6081 gl_cv_func_memmem_works=yes
6082else
81ecdfbb 6083 gl_cv_func_memmem_works=no
783e057b 6084fi
81ecdfbb
RW
6085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6086 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6087fi
81ecdfbb 6088
f434ba03 6089
783e057b 6090fi
81ecdfbb
RW
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6092$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6093 if test "$gl_cv_func_memmem_works" != yes; then
6094 REPLACE_MEMMEM=1
6095
6096
6097
6098
6099
6100
6101
f434ba03 6102
783e057b
DJ
6103 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6104
6105 fi
6106 fi
6107
f434ba03
PA
6108 # Code from module memmem-simple:
6109
783e057b
DJ
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
81ecdfbb
RW
6121 for ac_func in memmem
6122do :
6123 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6124if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6125 cat >>confdefs.h <<_ACEOF
81ecdfbb 6126#define HAVE_MEMMEM 1
783e057b
DJ
6127_ACEOF
6128
6129else
6130
6131 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6132
6133fi
6134done
6135
6136
6137
6138 :
6139
6140
6141
6142
6143
6144 if test $ac_cv_have_decl_memmem = no; then
6145 HAVE_DECL_MEMMEM=0
6146 fi
6147 :
6148
6149
6150
f434ba03 6151
783e057b
DJ
6152 GNULIB_MEMMEM=1
6153
6154
6155
f434ba03
PA
6156$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6157
6158
6159
6160 # Code from module multiarch:
6161
6162 # Code from module stddef:
6163
6164
6165
6166 if test $gt_cv_c_wchar_t = no; then
6167 HAVE_WCHAR_T=0
6168 STDDEF_H=stddef.h
6169 fi
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6171$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6172if test "${gl_cv_decl_null_works+set}" = set; then :
6173 $as_echo_n "(cached) " >&6
6174else
6175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6176/* end confdefs.h. */
6177#include <stddef.h>
6178 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6179
6180int
6181main ()
6182{
6183
6184 ;
6185 return 0;
6186}
6187_ACEOF
6188if ac_fn_c_try_compile "$LINENO"; then :
6189 gl_cv_decl_null_works=yes
6190else
6191 gl_cv_decl_null_works=no
6192fi
6193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194fi
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6196$as_echo "$gl_cv_decl_null_works" >&6; }
6197 if test $gl_cv_decl_null_works = no; then
6198 REPLACE_NULL=1
6199 STDDEF_H=stddef.h
6200 fi
6201 if test -n "$STDDEF_H"; then
6202
6203
6204
6205
6206 :
6207
6208
6209
6210
6211
6212
6213
6214 if test $gl_cv_have_include_next = yes; then
6215 gl_cv_next_stddef_h='<'stddef.h'>'
6216 else
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6218$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6219if test "${gl_cv_next_stddef_h+set}" = set; then :
6220 $as_echo_n "(cached) " >&6
6221else
6222
6223 if test $ac_cv_header_stddef_h = yes; then
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225/* end confdefs.h. */
6226#include <stddef.h>
6227
6228_ACEOF
6229 case "$host_os" in
6230 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6231 *) gl_absname_cpp="$ac_cpp" ;;
6232 esac
6233 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6234 sed -n '\#/stddef.h#{
6235 s#.*"\(.*/stddef.h\)".*#\1#
6236 s#^/[^/]#//&#
6237 p
6238 q
6239 }'`'"'
6240 else
6241 gl_cv_next_stddef_h='<'stddef.h'>'
6242 fi
6243
6244fi
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6246$as_echo "$gl_cv_next_stddef_h" >&6; }
6247 fi
6248 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6249
6250 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6251 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6252 gl_next_as_first_directive='<'stddef.h'>'
6253 else
6254 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6255 gl_next_as_first_directive=$gl_cv_next_stddef_h
6256 fi
6257 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6258
6259
6260
6261 fi
6262
6263 # Code from module stdint:
6264
6265
783e057b
DJ
6266
6267 if test $ac_cv_type_long_long_int = yes; then
6268 HAVE_LONG_LONG_INT=1
6269 else
6270 HAVE_LONG_LONG_INT=0
6271 fi
6272
6273
6274 if test $ac_cv_type_unsigned_long_long_int = yes; then
6275 HAVE_UNSIGNED_LONG_LONG_INT=1
6276 else
6277 HAVE_UNSIGNED_LONG_LONG_INT=0
6278 fi
6279
6280
6281 if test $ac_cv_header_inttypes_h = yes; then
6282 HAVE_INTTYPES_H=1
6283 else
6284 HAVE_INTTYPES_H=0
6285 fi
6286
6287
6288 if test $ac_cv_header_sys_types_h = yes; then
6289 HAVE_SYS_TYPES_H=1
6290 else
6291 HAVE_SYS_TYPES_H=0
6292 fi
6293
6294
6295
6296
6297
f434ba03 6298
783e057b
DJ
6299 :
6300
6301
6302
6303
6304
6305
6306
6307 if test $gl_cv_have_include_next = yes; then
6308 gl_cv_next_stdint_h='<'stdint.h'>'
6309 else
81ecdfbb
RW
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6311$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6312if test "${gl_cv_next_stdint_h+set}" = set; then :
6313 $as_echo_n "(cached) " >&6
783e057b
DJ
6314else
6315
f434ba03
PA
6316 if test $ac_cv_header_stdint_h = yes; then
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6318/* end confdefs.h. */
6319#include <stdint.h>
6320
6321_ACEOF
f434ba03
PA
6322 case "$host_os" in
6323 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6324 *) gl_absname_cpp="$ac_cpp" ;;
6325 esac
6326 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6327 sed -n '\#/stdint.h#{
6328 s#.*"\(.*/stdint.h\)".*#\1#
6329 s#^/[^/]#//&#
6330 p
6331 q
6332 }'`'"'
6333 else
6334 gl_cv_next_stdint_h='<'stdint.h'>'
6335 fi
783e057b
DJ
6336
6337fi
81ecdfbb
RW
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6339$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6340 fi
6341 NEXT_STDINT_H=$gl_cv_next_stdint_h
6342
f434ba03
PA
6343 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6344 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6345 gl_next_as_first_directive='<'stdint.h'>'
6346 else
6347 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6348 gl_next_as_first_directive=$gl_cv_next_stdint_h
6349 fi
6350 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6351
783e057b
DJ
6352
6353
6354 if test $ac_cv_header_stdint_h = yes; then
6355 HAVE_STDINT_H=1
6356 else
6357 HAVE_STDINT_H=0
6358 fi
6359
6360
6361 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6363$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6364if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6365 $as_echo_n "(cached) " >&6
783e057b
DJ
6366else
6367 gl_cv_header_working_stdint_h=no
81ecdfbb 6368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6369/* end confdefs.h. */
6370
81ecdfbb 6371
783e057b
DJ
6372#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6373#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6374#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6375#include <stdint.h>
6376/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6377#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6378#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6379#endif
6380
6381
6382 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6383 included before <wchar.h>. */
6384 #include <stddef.h>
6385 #include <signal.h>
6386 #if HAVE_WCHAR_H
6387 # include <stdio.h>
6388 # include <time.h>
6389 # include <wchar.h>
6390 #endif
6391
6392
6393#ifdef INT8_MAX
6394int8_t a1 = INT8_MAX;
6395int8_t a1min = INT8_MIN;
6396#endif
6397#ifdef INT16_MAX
6398int16_t a2 = INT16_MAX;
6399int16_t a2min = INT16_MIN;
6400#endif
6401#ifdef INT32_MAX
6402int32_t a3 = INT32_MAX;
6403int32_t a3min = INT32_MIN;
6404#endif
6405#ifdef INT64_MAX
6406int64_t a4 = INT64_MAX;
6407int64_t a4min = INT64_MIN;
6408#endif
6409#ifdef UINT8_MAX
6410uint8_t b1 = UINT8_MAX;
6411#else
6412typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6413#endif
6414#ifdef UINT16_MAX
6415uint16_t b2 = UINT16_MAX;
6416#endif
6417#ifdef UINT32_MAX
6418uint32_t b3 = UINT32_MAX;
6419#endif
6420#ifdef UINT64_MAX
6421uint64_t b4 = UINT64_MAX;
6422#endif
6423int_least8_t c1 = INT8_C (0x7f);
6424int_least8_t c1max = INT_LEAST8_MAX;
6425int_least8_t c1min = INT_LEAST8_MIN;
6426int_least16_t c2 = INT16_C (0x7fff);
6427int_least16_t c2max = INT_LEAST16_MAX;
6428int_least16_t c2min = INT_LEAST16_MIN;
6429int_least32_t c3 = INT32_C (0x7fffffff);
6430int_least32_t c3max = INT_LEAST32_MAX;
6431int_least32_t c3min = INT_LEAST32_MIN;
6432int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6433int_least64_t c4max = INT_LEAST64_MAX;
6434int_least64_t c4min = INT_LEAST64_MIN;
6435uint_least8_t d1 = UINT8_C (0xff);
6436uint_least8_t d1max = UINT_LEAST8_MAX;
6437uint_least16_t d2 = UINT16_C (0xffff);
6438uint_least16_t d2max = UINT_LEAST16_MAX;
6439uint_least32_t d3 = UINT32_C (0xffffffff);
6440uint_least32_t d3max = UINT_LEAST32_MAX;
6441uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6442uint_least64_t d4max = UINT_LEAST64_MAX;
6443int_fast8_t e1 = INT_FAST8_MAX;
6444int_fast8_t e1min = INT_FAST8_MIN;
6445int_fast16_t e2 = INT_FAST16_MAX;
6446int_fast16_t e2min = INT_FAST16_MIN;
6447int_fast32_t e3 = INT_FAST32_MAX;
6448int_fast32_t e3min = INT_FAST32_MIN;
6449int_fast64_t e4 = INT_FAST64_MAX;
6450int_fast64_t e4min = INT_FAST64_MIN;
6451uint_fast8_t f1 = UINT_FAST8_MAX;
6452uint_fast16_t f2 = UINT_FAST16_MAX;
6453uint_fast32_t f3 = UINT_FAST32_MAX;
6454uint_fast64_t f4 = UINT_FAST64_MAX;
6455#ifdef INTPTR_MAX
6456intptr_t g = INTPTR_MAX;
6457intptr_t gmin = INTPTR_MIN;
6458#endif
6459#ifdef UINTPTR_MAX
6460uintptr_t h = UINTPTR_MAX;
6461#endif
6462intmax_t i = INTMAX_MAX;
6463uintmax_t j = UINTMAX_MAX;
6464
6465#include <limits.h> /* for CHAR_BIT */
6466#define TYPE_MINIMUM(t) \
6467 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6468#define TYPE_MAXIMUM(t) \
6469 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6470struct s {
6471 int check_PTRDIFF:
6472 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6473 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6474 ? 1 : -1;
6475 /* Detect bug in FreeBSD 6.0 / ia64. */
6476 int check_SIG_ATOMIC:
6477 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6478 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6479 ? 1 : -1;
6480 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6481 int check_WCHAR:
6482 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6483 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6484 ? 1 : -1;
6485 /* Detect bug in mingw. */
6486 int check_WINT:
6487 WINT_MIN == TYPE_MINIMUM (wint_t)
6488 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6489 ? 1 : -1;
6490
f434ba03
PA
6491 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6492 int check_UINT8_C:
6493 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6494 int check_UINT16_C:
6495 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6496
6497 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6498#ifdef UINT8_MAX
6499 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6500#endif
6501#ifdef UINT16_MAX
6502 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6503#endif
6504#ifdef UINT32_MAX
6505 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6506#endif
6507#ifdef UINT64_MAX
6508 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6509#endif
6510 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6511 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6512 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6513 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6514 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6515 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6516 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6517 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6518 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6519 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6520 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6521};
6522
6523int
6524main ()
6525{
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531if ac_fn_c_try_compile "$LINENO"; then :
6532 if test "$cross_compiling" = yes; then :
6533 gl_cv_header_working_stdint_h=yes
6534
6535else
6536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537/* end confdefs.h. */
6538
6539
6540#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6541#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6542#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6543#include <stdint.h>
6544
783e057b 6545
f434ba03
PA
6546 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6547 included before <wchar.h>. */
6548 #include <stddef.h>
6549 #include <signal.h>
6550 #if HAVE_WCHAR_H
6551 # include <stdio.h>
6552 # include <time.h>
6553 # include <wchar.h>
6554 #endif
6555
6556
6557#include <stdio.h>
6558#include <string.h>
6559#define MVAL(macro) MVAL1(macro)
6560#define MVAL1(expression) #expression
6561static const char *macro_values[] =
6562 {
6563#ifdef INT8_MAX
6564 MVAL (INT8_MAX),
6565#endif
6566#ifdef INT16_MAX
6567 MVAL (INT16_MAX),
6568#endif
6569#ifdef INT32_MAX
6570 MVAL (INT32_MAX),
6571#endif
6572#ifdef INT64_MAX
6573 MVAL (INT64_MAX),
6574#endif
783e057b 6575#ifdef UINT8_MAX
f434ba03 6576 MVAL (UINT8_MAX),
783e057b
DJ
6577#endif
6578#ifdef UINT16_MAX
f434ba03 6579 MVAL (UINT16_MAX),
783e057b
DJ
6580#endif
6581#ifdef UINT32_MAX
f434ba03 6582 MVAL (UINT32_MAX),
783e057b
DJ
6583#endif
6584#ifdef UINT64_MAX
f434ba03 6585 MVAL (UINT64_MAX),
783e057b 6586#endif
f434ba03
PA
6587 NULL
6588 };
783e057b
DJ
6589
6590int
6591main ()
6592{
6593
f434ba03
PA
6594 const char **mv;
6595 for (mv = macro_values; *mv != NULL; mv++)
6596 {
6597 const char *value = *mv;
6598 /* Test whether it looks like a cast expression. */
6599 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6600 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6601 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6602 || strncmp (value, "((int)"/*)*/, 6) == 0
6603 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6604 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6605 return 1;
6606 }
6607 return 0;
6608
783e057b
DJ
6609 ;
6610 return 0;
6611}
6612_ACEOF
f434ba03 6613if ac_fn_c_try_run "$LINENO"; then :
783e057b 6614 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6615fi
6616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6617 conftest.$ac_objext conftest.beam conftest.$ac_ext
6618fi
6619
6620
783e057b 6621fi
81ecdfbb 6622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6623
783e057b 6624fi
81ecdfbb
RW
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6626$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6627 fi
6628 if test "$gl_cv_header_working_stdint_h" = yes; then
6629 STDINT_H=
6630 else
81ecdfbb
RW
6631 for ac_header in sys/inttypes.h sys/bitypes.h
6632do :
6633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6634ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6635eval as_val=\$$as_ac_Header
6636 if test "x$as_val" = x""yes; then :
783e057b 6637 cat >>confdefs.h <<_ACEOF
81ecdfbb 6638#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6639_ACEOF
6640
6641fi
6642
6643done
6644
6645 if test $ac_cv_header_sys_inttypes_h = yes; then
6646 HAVE_SYS_INTTYPES_H=1
6647 else
6648 HAVE_SYS_INTTYPES_H=0
6649 fi
6650
6651 if test $ac_cv_header_sys_bitypes_h = yes; then
6652 HAVE_SYS_BITYPES_H=1
6653 else
6654 HAVE_SYS_BITYPES_H=0
6655 fi
6656
6657
6658
6659 :
6660
6661
6662
6663
6664
6665
6666
6667
f434ba03
PA
6668 if test $APPLE_UNIVERSAL_BUILD = 0; then
6669
6670
6671 for gltype in ptrdiff_t size_t ; do
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6673$as_echo_n "checking for bit size of $gltype... " >&6; }
6674if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6675 $as_echo_n "(cached) " >&6
6676else
6677 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6678 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6679 included before <wchar.h>. */
6680 #include <stddef.h>
6681 #include <signal.h>
6682 #if HAVE_WCHAR_H
6683 # include <stdio.h>
6684 # include <time.h>
6685 # include <wchar.h>
6686 #endif
6687
6688#include <limits.h>"; then :
6689
6690else
6691 result=unknown
6692fi
6693
6694 eval gl_cv_bitsizeof_${gltype}=\$result
6695
6696fi
6697eval ac_res=\$gl_cv_bitsizeof_${gltype}
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6699$as_echo "$ac_res" >&6; }
6700 eval result=\$gl_cv_bitsizeof_${gltype}
6701 if test $result = unknown; then
6702 result=0
6703 fi
6704 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6705 cat >>confdefs.h <<_ACEOF
6706#define BITSIZEOF_${GLTYPE} $result
6707_ACEOF
6708
6709 eval BITSIZEOF_${GLTYPE}=\$result
6710 done
6711
6712
6713 fi
6714
783e057b 6715
f434ba03 6716 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6718$as_echo_n "checking for bit size of $gltype... " >&6; }
6719if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6720 $as_echo_n "(cached) " >&6
6721else
6722 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6723 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6724 included before <wchar.h>. */
6725 #include <stddef.h>
6726 #include <signal.h>
6727 #if HAVE_WCHAR_H
6728 # include <stdio.h>
6729 # include <time.h>
6730 # include <wchar.h>
6731 #endif
6732
6733#include <limits.h>"; then :
6734
6735else
6736 result=unknown
6737fi
6738
6739 eval gl_cv_bitsizeof_${gltype}=\$result
6740
6741fi
6742eval ac_res=\$gl_cv_bitsizeof_${gltype}
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6744$as_echo "$ac_res" >&6; }
6745 eval result=\$gl_cv_bitsizeof_${gltype}
6746 if test $result = unknown; then
6747 result=0
6748 fi
6749 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6750 cat >>confdefs.h <<_ACEOF
6751#define BITSIZEOF_${GLTYPE} $result
6752_ACEOF
783e057b 6753
81ecdfbb
RW
6754 eval BITSIZEOF_${GLTYPE}=\$result
6755 done
783e057b
DJ
6756
6757
6758
6759
81ecdfbb
RW
6760 for gltype in sig_atomic_t wchar_t wint_t ; do
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6762$as_echo_n "checking whether $gltype is signed... " >&6; }
6763if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6764 $as_echo_n "(cached) " >&6
783e057b 6765else
81ecdfbb 6766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6767/* end confdefs.h. */
6768
6769 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6770 included before <wchar.h>. */
6771 #include <stddef.h>
6772 #include <signal.h>
6773 #if HAVE_WCHAR_H
6774 # include <stdio.h>
6775 # include <time.h>
6776 # include <wchar.h>
6777 #endif
6778
6779 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6780int
6781main ()
6782{
6783
6784 ;
6785 return 0;
6786}
6787_ACEOF
81ecdfbb 6788if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6789 result=yes
6790else
81ecdfbb 6791 result=no
20e95c23 6792fi
81ecdfbb 6793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6794 eval gl_cv_type_${gltype}_signed=\$result
6795
6796fi
81ecdfbb
RW
6797eval ac_res=\$gl_cv_type_${gltype}_signed
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6799$as_echo "$ac_res" >&6; }
783e057b
DJ
6800 eval result=\$gl_cv_type_${gltype}_signed
6801 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6802 if test "$result" = yes; then
6803 cat >>confdefs.h <<_ACEOF
6804#define HAVE_SIGNED_${GLTYPE} 1
6805_ACEOF
6806
6807 eval HAVE_SIGNED_${GLTYPE}=1
6808 else
6809 eval HAVE_SIGNED_${GLTYPE}=0
6810 fi
6811 done
6812
6813
6814 gl_cv_type_ptrdiff_t_signed=yes
6815 gl_cv_type_size_t_signed=no
f434ba03 6816 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6817
6818
f434ba03 6819 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6821$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6822if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6823 $as_echo_n "(cached) " >&6
c906108c 6824else
783e057b
DJ
6825 eval gl_cv_type_${gltype}_suffix=no
6826 eval result=\$gl_cv_type_${gltype}_signed
6827 if test "$result" = yes; then
6828 glsufu=
6829 else
6830 glsufu=u
6831 fi
6832 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6833 case $glsuf in
6834 '') gltype1='int';;
f434ba03
PA
6835 l) gltype1='long int';;
6836 ll) gltype1='long long int';;
6837 i64) gltype1='__int64';;
6838 u) gltype1='unsigned int';;
6839 ul) gltype1='unsigned long int';;
6840 ull) gltype1='unsigned long long int';;
783e057b
DJ
6841 ui64)gltype1='unsigned __int64';;
6842 esac
81ecdfbb 6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6844/* end confdefs.h. */
6845
6846 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6847 included before <wchar.h>. */
6848 #include <stddef.h>
6849 #include <signal.h>
6850 #if HAVE_WCHAR_H
6851 # include <stdio.h>
6852 # include <time.h>
6853 # include <wchar.h>
6854 #endif
6855
6856 extern $gltype foo;
6857 extern $gltype1 foo;
6858int
6859main ()
6860{
6861
6862 ;
6863 return 0;
6864}
6865_ACEOF
81ecdfbb 6866if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6867 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6868fi
81ecdfbb 6869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6870 eval result=\$gl_cv_type_${gltype}_suffix
6871 test "$result" != no && break
6872 done
6873fi
81ecdfbb
RW
6874eval ac_res=\$gl_cv_type_${gltype}_suffix
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6876$as_echo "$ac_res" >&6; }
783e057b
DJ
6877 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6878 eval result=\$gl_cv_type_${gltype}_suffix
6879 test "$result" = no && result=
6880 eval ${GLTYPE}_SUFFIX=\$result
6881 cat >>confdefs.h <<_ACEOF
6882#define ${GLTYPE}_SUFFIX $result
6883_ACEOF
6884
6885 done
6886
6887
783e057b
DJ
6888 fi
6889
6890
f434ba03
PA
6891 for gltype in sig_atomic_t wchar_t wint_t ; do
6892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6893$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6894if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6895 $as_echo_n "(cached) " >&6
783e057b 6896else
f434ba03
PA
6897 eval gl_cv_type_${gltype}_suffix=no
6898 eval result=\$gl_cv_type_${gltype}_signed
6899 if test "$result" = yes; then
6900 glsufu=
6901 else
6902 glsufu=u
6903 fi
6904 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6905 case $glsuf in
6906 '') gltype1='int';;
6907 l) gltype1='long int';;
6908 ll) gltype1='long long int';;
6909 i64) gltype1='__int64';;
6910 u) gltype1='unsigned int';;
6911 ul) gltype1='unsigned long int';;
6912 ull) gltype1='unsigned long long int';;
6913 ui64)gltype1='unsigned __int64';;
6914 esac
6915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6916/* end confdefs.h. */
f434ba03
PA
6917
6918 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6919 included before <wchar.h>. */
6920 #include <stddef.h>
6921 #include <signal.h>
6922 #if HAVE_WCHAR_H
6923 # include <stdio.h>
6924 # include <time.h>
6925 # include <wchar.h>
6926 #endif
6927
6928 extern $gltype foo;
6929 extern $gltype1 foo;
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
783e057b 6937_ACEOF
81ecdfbb 6938if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6939 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6940fi
81ecdfbb 6941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6942 eval result=\$gl_cv_type_${gltype}_suffix
6943 test "$result" != no && break
6944 done
783e057b 6945fi
f434ba03
PA
6946eval ac_res=\$gl_cv_type_${gltype}_suffix
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6948$as_echo "$ac_res" >&6; }
6949 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6950 eval result=\$gl_cv_type_${gltype}_suffix
6951 test "$result" = no && result=
6952 eval ${GLTYPE}_SUFFIX=\$result
6953 cat >>confdefs.h <<_ACEOF
6954#define ${GLTYPE}_SUFFIX $result
6955_ACEOF
6956
6957 done
6958
6959
6960
6961 STDINT_H=stdint.h
783e057b
DJ
6962 fi
6963
6964
f434ba03
PA
6965 # Code from module string:
6966
6967
6968
6969 # Code from module warn-on-use:
6970 # Code from module wchar:
6971
6972
6973
6974
783e057b
DJ
6975 :
6976
6977
6978
6979
6980
783e057b
DJ
6981
6982
6983
6984
6985 :
6986
6987
6988
6989
6990
6991
6992
6993 if test $gl_cv_have_include_next = yes; then
6994 gl_cv_next_wchar_h='<'wchar.h'>'
6995 else
81ecdfbb
RW
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6997$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6998if test "${gl_cv_next_wchar_h+set}" = set; then :
6999 $as_echo_n "(cached) " >&6
783e057b
DJ
7000else
7001
f434ba03
PA
7002 if test $ac_cv_header_wchar_h = yes; then
7003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7004/* end confdefs.h. */
7005#include <wchar.h>
7006
7007_ACEOF
f434ba03
PA
7008 case "$host_os" in
7009 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7010 *) gl_absname_cpp="$ac_cpp" ;;
7011 esac
7012 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7013 sed -n '\#/wchar.h#{
7014 s#.*"\(.*/wchar.h\)".*#\1#
7015 s#^/[^/]#//&#
7016 p
7017 q
7018 }'`'"'
7019 else
7020 gl_cv_next_wchar_h='<'wchar.h'>'
7021 fi
783e057b
DJ
7022
7023fi
81ecdfbb
RW
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7025$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7026 fi
7027 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7028
f434ba03
PA
7029 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7030 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7031 gl_next_as_first_directive='<'wchar.h'>'
7032 else
7033 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7034 gl_next_as_first_directive=$gl_cv_next_wchar_h
7035 fi
7036 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7037
7038
7039
7040 if test $ac_cv_header_wchar_h = yes; then
7041 HAVE_WCHAR_H=1
7042 else
7043 HAVE_WCHAR_H=0
7044 fi
7045
7046
7047
7048 if test $gt_cv_c_wint_t = yes; then
7049 HAVE_WINT_T=1
7050 else
7051 HAVE_WINT_T=0
7052 fi
7053
7054
7055
7056 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7057 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7059$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7060if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7061 $as_echo_n "(cached) " >&6
7062else
7063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7064/* end confdefs.h. */
7065
7066/* Some systems require additional headers. */
7067#ifndef __GLIBC__
7068# include <stddef.h>
7069# include <stdio.h>
7070# include <time.h>
7071#endif
7072#include <wchar.h>
7073
7074int
7075main ()
7076{
7077#undef $gl_func
7078 (void) $gl_func;
7079 ;
7080 return 0;
7081}
7082_ACEOF
7083if ac_fn_c_try_compile "$LINENO"; then :
7084 eval "$as_gl_Symbol=yes"
7085else
7086 eval "$as_gl_Symbol=no"
7087fi
7088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7089fi
7090eval ac_res=\$$as_gl_Symbol
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7092$as_echo "$ac_res" >&6; }
7093 eval as_val=\$$as_gl_Symbol
7094 if test "x$as_val" = x""yes; then :
7095 cat >>confdefs.h <<_ACEOF
7096#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7097_ACEOF
7098
7099 eval ac_cv_have_decl_$gl_func=yes
7100fi
7101 done
7102
7103
7104 # Code from module dummy:
7105 # End of code from modules
7106
7107
c906108c 7108
c906108c 7109
c906108c 7110
c906108c 7111
c906108c 7112
c906108c 7113
c906108c 7114
783e057b
DJ
7115 gltests_libdeps=
7116 gltests_ltlibdeps=
20e95c23 7117
20e95c23 7118
20e95c23 7119
f434ba03
PA
7120
7121
7122
7123
7124
7125
783e057b 7126 gl_source_base='tests'
f434ba03
PA
7127 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
7128
7129 gl_module_indicator_condition=$gltests_WITNESS
7130
7131
7132
7133
7134
c906108c 7135
bec39cab 7136
bec39cab 7137
783e057b
DJ
7138
7139 LIBGNU_LIBDEPS="$gl_libdeps"
7140
7141 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7142
7143
e28b3332 7144
d5af19ba
DJ
7145# For Makefile dependencies.
7146GNULIB_STDINT_H=
7147if test x"$STDINT_H" != x; then
7148 GNULIB_STDINT_H=gnulib/$STDINT_H
7149fi
7150
7151
bec39cab
AC
7152PACKAGE=gdb
7153
7154cat >>confdefs.h <<_ACEOF
7155#define PACKAGE "$PACKAGE"
7156_ACEOF
7157
7158
7159
5048e516
JK
7160# Do we have a single-tree copy of texinfo? Even if we do, we can't
7161# rely on it - libiberty is built before texinfo.
7162# Extract the first word of "makeinfo", so it can be a program name with args.
7163set dummy makeinfo; ac_word=$2
7164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7165$as_echo_n "checking for $ac_word... " >&6; }
7166if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
7168else
7169 if test -n "$MAKEINFO"; then
7170 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7171else
7172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7173for as_dir in $PATH
7174do
7175 IFS=$as_save_IFS
7176 test -z "$as_dir" && as_dir=.
7177 for ac_exec_ext in '' $ac_executable_extensions; do
7178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7179 ac_cv_prog_MAKEINFO="makeinfo"
7180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7181 break 2
7182 fi
7183done
7184 done
7185IFS=$as_save_IFS
7186
7187fi
7188fi
7189MAKEINFO=$ac_cv_prog_MAKEINFO
7190if test -n "$MAKEINFO"; then
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7192$as_echo "$MAKEINFO" >&6; }
7193else
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195$as_echo "no" >&6; }
7196fi
7197
7198
7199if test "x$MAKEINFO" = "x"; then
7200 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7201else
7202 case "$MAKEINFO" in
7203 */missing\ makeinfo*)
7204 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7205 ;;
7206 esac
7207fi
7208
7209
7210# --split-size=5000000 may be already in $MAKEINFO from parent configure.
7211# Re-running configure in gdb/ would lose it so ensure it stays present.
7212MAKEINFOFLAGS=${MAKEINFOFLAGS---split-size=5000000}
7213
7214
7215MAKEINFO_EXTRA_FLAGS=""
7216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7217$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7218if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7219 $as_echo_n "(cached) " >&6
7220else
7221 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7222 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7223 gdb_cv_have_makeinfo_click=yes
7224 else
7225 gdb_cv_have_makeinfo_click=no
7226 fi
7227fi
7228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7229$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7230if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7231 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7232fi
7233
7234
e28b3332
DJ
7235# GDB does not use automake, but gnulib does. This line lets us
7236# generate its Makefile.in.
81ecdfbb
RW
7237am__api_version='1.11'
7238
e28b3332
DJ
7239# Find a good install program. We prefer a C program (faster),
7240# so one script is as good as another. But avoid the broken or
7241# incompatible versions:
7242# SysV /etc/install, /usr/sbin/install
7243# SunOS /usr/etc/install
7244# IRIX /sbin/install
7245# AIX /bin/install
7246# AmigaOS /C/install, which installs bootblocks on floppy discs
7247# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7248# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7249# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7250# OS/2's system install, which has a completely different semantic
7251# ./install, which can be erroneously created by make from ./install.sh.
85541719 7252# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7254$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7255if test -z "$INSTALL"; then
81ecdfbb
RW
7256if test "${ac_cv_path_install+set}" = set; then :
7257 $as_echo_n "(cached) " >&6
e28b3332
DJ
7258else
7259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262 IFS=$as_save_IFS
7263 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7264 # Account for people who put trailing slashes in PATH elements.
7265case $as_dir/ in #((
7266 ./ | .// | /[cC]/* | \
e28b3332 7267 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7268 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7269 /usr/ucb/* ) ;;
7270 *)
7271 # OSF1 and SCO ODT 3.0 have their own names for install.
7272 # Don't use installbsd from OSF since it installs stuff as root
7273 # by default.
7274 for ac_prog in ginstall scoinst install; do
7275 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7276 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7277 if test $ac_prog = install &&
7278 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7279 # AIX install. It has an incompatible calling convention.
7280 :
7281 elif test $ac_prog = install &&
7282 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7283 # program-specific install script used by HP pwplus--don't use.
7284 :
7285 else
85541719
DE
7286 rm -rf conftest.one conftest.two conftest.dir
7287 echo one > conftest.one
7288 echo two > conftest.two
7289 mkdir conftest.dir
7290 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7291 test -s conftest.one && test -s conftest.two &&
7292 test -s conftest.dir/conftest.one &&
7293 test -s conftest.dir/conftest.two
7294 then
7295 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7296 break 3
7297 fi
e28b3332
DJ
7298 fi
7299 fi
7300 done
7301 done
7302 ;;
7303esac
81ecdfbb
RW
7304
7305 done
7306IFS=$as_save_IFS
e28b3332 7307
85541719 7308rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7309
7310fi
7311 if test "${ac_cv_path_install+set}" = set; then
7312 INSTALL=$ac_cv_path_install
7313 else
85541719
DE
7314 # As a last resort, use the slow shell script. Don't cache a
7315 # value for INSTALL within a source directory, because that will
e28b3332 7316 # break other packages using the cache if that directory is
85541719 7317 # removed, or if the value is a relative name.
e28b3332
DJ
7318 INSTALL=$ac_install_sh
7319 fi
7320fi
81ecdfbb
RW
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7322$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7323
7324# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7325# It thinks the first close brace ends the variable substitution.
7326test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7327
7328test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7329
7330test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7331
81ecdfbb
RW
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7333$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7334# Just in case
7335sleep 1
7336echo timestamp > conftest.file
81ecdfbb
RW
7337# Reject unsafe characters in $srcdir or the absolute working directory
7338# name. Accept space and tab only in the latter.
7339am_lf='
7340'
7341case `pwd` in
7342 *[\\\"\#\$\&\'\`$am_lf]*)
7343 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7344esac
7345case $srcdir in
7346 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7347 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7348esac
7349
e28b3332
DJ
7350# Do `set' in a subshell so we don't clobber the current shell's
7351# arguments. Must try -L first in case configure is actually a
7352# symlink; some systems play weird games with the mod time of symlinks
7353# (eg FreeBSD returns the mod time of the symlink's containing
7354# directory).
7355if (
81ecdfbb 7356 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7357 if test "$*" = "X"; then
7358 # -L didn't work.
81ecdfbb 7359 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7360 fi
7361 rm -f conftest.file
7362 if test "$*" != "X $srcdir/configure conftest.file" \
7363 && test "$*" != "X conftest.file $srcdir/configure"; then
7364
7365 # If neither matched, then we have a broken ls. This can happen
7366 # if, for instance, CONFIG_SHELL is bash and it inherits a
7367 # broken ls alias from the environment. This has actually
7368 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7369 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7370alias in your environment" "$LINENO" 5
e28b3332
DJ
7371 fi
7372
7373 test "$2" = conftest.file
7374 )
7375then
7376 # Ok.
7377 :
7378else
81ecdfbb
RW
7379 as_fn_error "newly created file is older than distributed files!
7380Check your system clock" "$LINENO" 5
e28b3332 7381fi
81ecdfbb
RW
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7383$as_echo "yes" >&6; }
e28b3332 7384test "$program_prefix" != NONE &&
81ecdfbb 7385 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7386# Use a double $ so make ignores it.
7387test "$program_suffix" != NONE &&
81ecdfbb
RW
7388 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7389# Double any \ or $.
e28b3332 7390# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7391ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7392program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7393
7394# expand $ac_aux_dir to an absolute path
7395am_aux_dir=`cd $ac_aux_dir && pwd`
7396
81ecdfbb
RW
7397if test x"${MISSING+set}" != xset; then
7398 case $am_aux_dir in
7399 *\ * | *\ *)
7400 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7401 *)
7402 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7403 esac
7404fi
e28b3332
DJ
7405# Use eval to expand $SHELL
7406if eval "$MISSING --run true"; then
7407 am_missing_run="$MISSING --run "
7408else
7409 am_missing_run=
81ecdfbb
RW
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7411$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7412fi
7413
7414if test x"${install_sh}" != xset; then
7415 case $am_aux_dir in
7416 *\ * | *\ *)
7417 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7418 *)
7419 install_sh="\${SHELL} $am_aux_dir/install-sh"
7420 esac
7421fi
7422
7423# Installed binaries are usually stripped using `strip' when the user
7424# run `make install-strip'. However `strip' might not be the right
7425# tool to use in cross-compilation environments, therefore Automake
7426# will honor the `STRIP' environment variable to overrule this program.
7427if test "$cross_compiling" != no; then
7428 if test -n "$ac_tool_prefix"; then
7429 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7430set dummy ${ac_tool_prefix}strip; ac_word=$2
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if test "${ac_cv_prog_STRIP+set}" = set; then :
7434 $as_echo_n "(cached) " >&6
7435else
7436 if test -n "$STRIP"; then
7437 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
7444 for ac_exec_ext in '' $ac_executable_extensions; do
7445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7446 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7448 break 2
7449 fi
7450done
7451 done
7452IFS=$as_save_IFS
7453
7454fi
7455fi
7456STRIP=$ac_cv_prog_STRIP
7457if test -n "$STRIP"; then
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7459$as_echo "$STRIP" >&6; }
7460else
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
7463fi
7464
7465
7466fi
7467if test -z "$ac_cv_prog_STRIP"; then
7468 ac_ct_STRIP=$STRIP
7469 # Extract the first word of "strip", so it can be a program name with args.
7470set dummy strip; ac_word=$2
7471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472$as_echo_n "checking for $ac_word... " >&6; }
7473if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7474 $as_echo_n "(cached) " >&6
7475else
7476 if test -n "$ac_ct_STRIP"; then
7477 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7478else
7479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482 IFS=$as_save_IFS
7483 test -z "$as_dir" && as_dir=.
7484 for ac_exec_ext in '' $ac_executable_extensions; do
7485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7486 ac_cv_prog_ac_ct_STRIP="strip"
7487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488 break 2
7489 fi
7490done
7491 done
7492IFS=$as_save_IFS
7493
7494fi
7495fi
7496ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7497if test -n "$ac_ct_STRIP"; then
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7499$as_echo "$ac_ct_STRIP" >&6; }
7500else
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505 if test "x$ac_ct_STRIP" = x; then
7506 STRIP=":"
7507 else
7508 case $cross_compiling:$ac_tool_warned in
7509yes:)
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7512ac_tool_warned=yes ;;
7513esac
7514 STRIP=$ac_ct_STRIP
7515 fi
7516else
7517 STRIP="$ac_cv_prog_STRIP"
7518fi
7519
7520fi
7521INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7522
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7524$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7525if test -z "$MKDIR_P"; then
7526 if test "${ac_cv_path_mkdir+set}" = set; then :
7527 $as_echo_n "(cached) " >&6
7528else
7529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7531do
7532 IFS=$as_save_IFS
7533 test -z "$as_dir" && as_dir=.
7534 for ac_prog in mkdir gmkdir; do
7535 for ac_exec_ext in '' $ac_executable_extensions; do
7536 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7537 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7538 'mkdir (GNU coreutils) '* | \
7539 'mkdir (coreutils) '* | \
7540 'mkdir (fileutils) '4.1*)
7541 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7542 break 3;;
7543 esac
7544 done
7545 done
e28b3332 7546 done
81ecdfbb
RW
7547IFS=$as_save_IFS
7548
7549fi
7550
7551 if test "${ac_cv_path_mkdir+set}" = set; then
7552 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7553 else
81ecdfbb
RW
7554 # As a last resort, use the slow shell script. Don't cache a
7555 # value for MKDIR_P within a source directory, because that will
7556 # break other packages using the cache if that directory is
7557 # removed, or if the value is a relative name.
7558 test -d ./--version && rmdir ./--version
7559 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7560 fi
7561fi
81ecdfbb
RW
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7563$as_echo "$MKDIR_P" >&6; }
7564
f434ba03 7565
81ecdfbb
RW
7566mkdir_p="$MKDIR_P"
7567case $mkdir_p in
7568 [\\/$]* | ?:[\\/]*) ;;
7569 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7570esac
e28b3332
DJ
7571
7572for ac_prog in gawk mawk nawk awk
7573do
7574 # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if test "${ac_cv_prog_AWK+set}" = set; then :
7579 $as_echo_n "(cached) " >&6
e28b3332
DJ
7580else
7581 if test -n "$AWK"; then
7582 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7583else
7584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587 IFS=$as_save_IFS
7588 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7589 for ac_exec_ext in '' $ac_executable_extensions; do
7590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7591 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7593 break 2
7594 fi
7595done
81ecdfbb
RW
7596 done
7597IFS=$as_save_IFS
e28b3332
DJ
7598
7599fi
7600fi
7601AWK=$ac_cv_prog_AWK
7602if test -n "$AWK"; then
81ecdfbb
RW
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7604$as_echo "$AWK" >&6; }
e28b3332 7605else
81ecdfbb
RW
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7607$as_echo "no" >&6; }
e28b3332
DJ
7608fi
7609
81ecdfbb 7610
e28b3332
DJ
7611 test -n "$AWK" && break
7612done
7613
81ecdfbb 7614ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7615
7616
7617am_make=${MAKE-make}
7618cat > confinc << 'END'
7619am__doit:
81ecdfbb 7620 @echo this is the am__doit target
e28b3332
DJ
7621.PHONY: am__doit
7622END
7623# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7625$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7626am__include="#"
7627am__quote=
7628_am_result=none
7629# First try GNU make style include.
7630echo "include confinc" > confmf
81ecdfbb
RW
7631# Ignore all kinds of additional output from `make'.
7632case `$am_make -s -f confmf 2> /dev/null` in #(
7633*the\ am__doit\ target*)
7634 am__include=include
7635 am__quote=
7636 _am_result=GNU
7637 ;;
7638esac
e28b3332
DJ
7639# Now try BSD make style include.
7640if test "$am__include" = "#"; then
7641 echo '.include "confinc"' > confmf
81ecdfbb
RW
7642 case `$am_make -s -f confmf 2> /dev/null` in #(
7643 *the\ am__doit\ target*)
7644 am__include=.include
7645 am__quote="\""
7646 _am_result=BSD
7647 ;;
7648 esac
e28b3332
DJ
7649fi
7650
7651
81ecdfbb
RW
7652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7653$as_echo "$_am_result" >&6; }
e28b3332
DJ
7654rm -f confinc confmf
7655
81ecdfbb
RW
7656# Check whether --enable-dependency-tracking was given.
7657if test "${enable_dependency_tracking+set}" = set; then :
7658 enableval=$enable_dependency_tracking;
7659fi
e28b3332 7660
e28b3332
DJ
7661if test "x$enable_dependency_tracking" != xno; then
7662 am_depcomp="$ac_aux_dir/depcomp"
7663 AMDEPBACKSLASH='\'
7664fi
81ecdfbb 7665 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7666 AMDEP_TRUE=
7667 AMDEP_FALSE='#'
7668else
7669 AMDEP_TRUE='#'
7670 AMDEP_FALSE=
7671fi
7672
7673
81ecdfbb
RW
7674if test "`cd $srcdir && pwd`" != "`pwd`"; then
7675 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7676 # is not polluted with repeated "-I."
7677 am__isrc=' -I$(srcdir)'
7678 # test to see if srcdir already configured
7679 if test -f $srcdir/config.status; then
7680 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7681 fi
e28b3332
DJ
7682fi
7683
7684# test whether we have cygpath
7685if test -z "$CYGPATH_W"; then
7686 if (cygpath --version) >/dev/null 2>/dev/null; then
7687 CYGPATH_W='cygpath -w'
7688 else
7689 CYGPATH_W=echo
7690 fi
7691fi
7692
7693
7694# Define the identity of the package.
7695 PACKAGE=gdb
7696 VERSION=UNUSED-VERSION
7697
7698
7699# Some tools Automake needs.
7700
7701ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7702
7703
7704AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7705
7706
7707AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7708
7709
7710AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7711
7712
7713MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7714
e28b3332
DJ
7715# We need awk for the "check" target. The system "awk" is bad on
7716# some platforms.
7717# Always define AMTAR for backward compatibility.
7718
7719AMTAR=${AMTAR-"${am_missing_run}tar"}
7720
7721am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7722
7723
7724
7725
7726depcc="$CC" am_compiler_list=
7727
81ecdfbb
RW
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7729$as_echo_n "checking dependency style of $depcc... " >&6; }
7730if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7731 $as_echo_n "(cached) " >&6
e28b3332
DJ
7732else
7733 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7734 # We make a subdir and do the tests there. Otherwise we can end up
7735 # making bogus files that we don't know about and never remove. For
7736 # instance it was reported that on HP-UX the gcc test will end up
7737 # making a dummy file named `D' -- because `-MD' means `put the output
7738 # in D'.
7739 mkdir conftest.dir
7740 # Copy depcomp to subdir because otherwise we won't find it if we're
7741 # using a relative directory.
7742 cp "$am_depcomp" conftest.dir
7743 cd conftest.dir
7744 # We will build objects and dependencies in a subdirectory because
7745 # it helps to detect inapplicable dependency modes. For instance
7746 # both Tru64's cc and ICC support -MD to output dependencies as a
7747 # side effect of compilation, but ICC will put the dependencies in
7748 # the current directory while Tru64 will put them in the object
7749 # directory.
7750 mkdir sub
7751
7752 am_cv_CC_dependencies_compiler_type=none
7753 if test "$am_compiler_list" = ""; then
7754 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7755 fi
81ecdfbb
RW
7756 am__universal=false
7757 case " $depcc " in #(
7758 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7759 esac
7760
e28b3332
DJ
7761 for depmode in $am_compiler_list; do
7762 # Setup a source with many dependencies, because some compilers
7763 # like to wrap large dependency lists on column 80 (with \), and
7764 # we should not choose a depcomp mode which is confused by this.
7765 #
7766 # We need to recreate these files for each test, as the compiler may
7767 # overwrite some of them when testing with obscure command lines.
7768 # This happens at least with the AIX C compiler.
7769 : > sub/conftest.c
7770 for i in 1 2 3 4 5 6; do
7771 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7772 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7773 # Solaris 8's {/usr,}/bin/sh.
7774 touch sub/conftst$i.h
7775 done
7776 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7777
81ecdfbb
RW
7778 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7779 # mode. It turns out that the SunPro C++ compiler does not properly
7780 # handle `-M -o', and we need to detect this. Also, some Intel
7781 # versions had trouble with output in subdirs
7782 am__obj=sub/conftest.${OBJEXT-o}
7783 am__minus_obj="-o $am__obj"
e28b3332 7784 case $depmode in
81ecdfbb
RW
7785 gcc)
7786 # This depmode causes a compiler race in universal mode.
7787 test "$am__universal" = false || continue
7788 ;;
e28b3332
DJ
7789 nosideeffect)
7790 # after this tag, mechanisms are not by side-effect, so they'll
7791 # only be used when explicitly requested
7792 if test "x$enable_dependency_tracking" = xyes; then
7793 continue
7794 else
7795 break
7796 fi
7797 ;;
81ecdfbb
RW
7798 msvisualcpp | msvcmsys)
7799 # This compiler won't grok `-c -o', but also, the minuso test has
7800 # not run yet. These depmodes are late enough in the game, and
7801 # so weak that their functioning should not be impacted.
7802 am__obj=conftest.${OBJEXT-o}
7803 am__minus_obj=
7804 ;;
e28b3332
DJ
7805 none) break ;;
7806 esac
e28b3332 7807 if depmode=$depmode \
81ecdfbb 7808 source=sub/conftest.c object=$am__obj \
e28b3332 7809 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7810 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7811 >/dev/null 2>conftest.err &&
81ecdfbb 7812 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7813 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7814 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7815 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7816 # icc doesn't choke on unknown options, it will just issue warnings
7817 # or remarks (even with -Werror). So we grep stderr for any message
7818 # that says an option was ignored or not supported.
7819 # When given -MP, icc 7.0 and 7.1 complain thusly:
7820 # icc: Command line warning: ignoring option '-M'; no argument required
7821 # The diagnosis changed in icc 8.0:
7822 # icc: Command line remark: option '-MP' not supported
7823 if (grep 'ignoring option' conftest.err ||
7824 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7825 am_cv_CC_dependencies_compiler_type=$depmode
7826 break
7827 fi
7828 fi
7829 done
7830
7831 cd ..
7832 rm -rf conftest.dir
7833else
7834 am_cv_CC_dependencies_compiler_type=none
7835fi
7836
7837fi
81ecdfbb
RW
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7839$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7840CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7841
81ecdfbb 7842 if
e28b3332
DJ
7843 test "x$enable_dependency_tracking" != xno \
7844 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7845 am__fastdepCC_TRUE=
7846 am__fastdepCC_FALSE='#'
7847else
7848 am__fastdepCC_TRUE='#'
7849 am__fastdepCC_FALSE=
7850fi
7851
7852
7853
7854
bec39cab
AC
7855
7856
81ecdfbb
RW
7857# Check whether --with-separate-debug-dir was given.
7858if test "${with_separate_debug_dir+set}" = set; then :
7859 withval=$with_separate_debug_dir;
b14b1491
TT
7860 DEBUGDIR=$withval
7861else
7862 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7863fi
7864
20e95c23 7865
783e057b
DJ
7866 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7867 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7868 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7869 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7870
783e057b
DJ
7871cat >>confdefs.h <<_ACEOF
7872#define DEBUGDIR "$ac_define_dir"
20e95c23 7873_ACEOF
20e95c23 7874
20e95c23 7875
20e95c23 7876
0c4a4063 7877
b14b1491
TT
7878 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7879 if test "x$prefix" = xNONE; then
7880 test_prefix=/usr/local
7881 else
7882 test_prefix=$prefix
7883 fi
783e057b 7884 else
b14b1491 7885 test_prefix=$exec_prefix
783e057b 7886 fi
b14b1491
TT
7887 value=0
7888 case ${ac_define_dir} in
7889 "${test_prefix}"|"${test_prefix}/"*|\
7890 '${exec_prefix}'|'${exec_prefix}/'*)
7891 value=1
7892 ;;
7893 esac
7894
7895cat >>confdefs.h <<_ACEOF
7896#define DEBUGDIR_RELOCATABLE $value
7897_ACEOF
7898
7899
7900
0c4a4063 7901
f83d8a90
DE
7902# We can't pass paths as command line arguments.
7903# Mingw32 tries to be clever and will convert the paths for us.
7904# For example -DBINDIR="/usr/local/bin" passed on the command line may get
7905# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
7906# This breaks GDB's relocatable path conversions since paths passed in
7907# config.h would not get so translated, the path prefixes no longer match.
7908
7909 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7910 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7911 ac_define_dir=`eval echo $bindir`
7912 ac_define_dir=`eval echo $ac_define_dir`
7913
7914cat >>confdefs.h <<_ACEOF
7915#define BINDIR "$ac_define_dir"
7916_ACEOF
7917
7918
7919
b14b1491
TT
7920# GDB's datadir relocation
7921
7922
7923
81ecdfbb
RW
7924# Check whether --with-gdb-datadir was given.
7925if test "${with_gdb_datadir+set}" = set; then :
7926 withval=$with_gdb_datadir;
b14b1491 7927 GDB_DATADIR=$withval
20e95c23 7928else
b14b1491 7929 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7930fi
7931
20e95c23 7932
b14b1491
TT
7933 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7934 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7935 ac_define_dir=`eval echo $GDB_DATADIR`
7936 ac_define_dir=`eval echo $ac_define_dir`
7937
7938cat >>confdefs.h <<_ACEOF
7939#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7940_ACEOF
7941
b14b1491
TT
7942
7943
0c4a4063 7944
b14b1491
TT
7945 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7946 if test "x$prefix" = xNONE; then
7947 test_prefix=/usr/local
7948 else
7949 test_prefix=$prefix
7950 fi
7951 else
7952 test_prefix=$exec_prefix
7953 fi
7954 value=0
7955 case ${ac_define_dir} in
7956 "${test_prefix}"|"${test_prefix}/"*|\
7957 '${exec_prefix}'|'${exec_prefix}/'*)
7958 value=1
7959 ;;
7960 esac
7961
7962cat >>confdefs.h <<_ACEOF
7963#define GDB_DATADIR_RELOCATABLE $value
7964_ACEOF
7965
7966
783e057b 7967
20e95c23 7968
0c4a4063 7969
81ecdfbb
RW
7970# Check whether --with-relocated-sources was given.
7971if test "${with_relocated_sources+set}" = set; then :
7972 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7973
7974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7976 ac_define_dir=`eval echo $reloc_srcdir`
7977 ac_define_dir=`eval echo $ac_define_dir`
7978
7979cat >>confdefs.h <<_ACEOF
7980#define RELOC_SRCDIR "$ac_define_dir"
7981_ACEOF
7982
7983
7984
81ecdfbb
RW
7985fi
7986
29b0e8a2
JM
7987
7988
20e95c23 7989
5ae98d25 7990subdirs="$subdirs testsuite"
20e95c23
DJ
7991
7992
783e057b 7993# Check whether to support alternative target configurations
81ecdfbb
RW
7994# Check whether --enable-targets was given.
7995if test "${enable_targets+set}" = set; then :
7996 enableval=$enable_targets; case "${enableval}" in
7997 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7998 ;;
7999 no) enable_targets= ;;
8000 *) enable_targets=$enableval ;;
8001esac
81ecdfbb
RW
8002fi
8003
20e95c23 8004
783e057b 8005# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
8006# Check whether --enable-64-bit-bfd was given.
8007if test "${enable_64_bit_bfd+set}" = set; then :
8008 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
8009 yes) want64=true ;;
8010 no) want64=false ;;
81ecdfbb 8011 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
8012esac
8013else
8014 want64=false
81ecdfbb
RW
8015fi
8016
783e057b
DJ
8017# Provide defaults for some variables set by the per-host and per-target
8018# configuration.
8019gdb_host_obs=posix-hdep.o
20e95c23 8020
783e057b
DJ
8021if test "${target}" = "${host}"; then
8022 gdb_native=yes
8023else
8024 gdb_native=no
8025fi
20e95c23 8026
783e057b 8027. $srcdir/configure.host
20e95c23 8028
783e057b 8029# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 8030
783e057b
DJ
8031TARGET_OBS=
8032all_targets=
20e95c23 8033
783e057b 8034for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 8035do
783e057b
DJ
8036 if test "$targ_alias" = "all"; then
8037 all_targets=true
8038 else
8039 # Canonicalize the secondary target names.
8040 result=`$ac_config_sub $targ_alias 2>/dev/null`
8041 if test -n "$result"; then
8042 targ=$result
8043 else
8044 targ=$targ_alias
8045 fi
20e95c23 8046
783e057b 8047 . ${srcdir}/configure.tgt
20e95c23 8048
bf307134
JB
8049 if test -z "${gdb_target_obs}"; then :
8050 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8051fi
8052
783e057b
DJ
8053 # Target-specific object files
8054 for i in ${gdb_target_obs}; do
8055 case " $TARGET_OBS " in
8056 *" ${i} "*) ;;
8057 *)
8058 TARGET_OBS="$TARGET_OBS ${i}"
8059 ;;
8060 esac
8061 done
20e95c23 8062
783e057b
DJ
8063 # Check whether this target needs 64-bit CORE_ADDR
8064 if test x${want64} = xfalse; then
8065 . ${srcdir}/../bfd/config.bfd
8066 fi
8067 fi
20e95c23
DJ
8068done
8069
783e057b
DJ
8070if test x${all_targets} = xtrue; then
8071
8072 # We want all 64-bit targets if we either:
8073 # - run on a 64-bit host or
8074 # - already require 64-bit support for some other target or
8075 # - the --enable-64-bit-bfd option was supplied
8076 # Otherwise we only support all 32-bit targets.
8077 #
8078 # NOTE: This test must be in sync with the corresponding
8079 # tests in BFD!
20e95c23 8080
783e057b 8081 if test x${want64} = xfalse; then
81ecdfbb
RW
8082 # The cast to long int works around a bug in the HP C Compiler
8083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8085# This bug is HP SR number 8606223364.
8086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8087$as_echo_n "checking size of long... " >&6; }
8088if test "${ac_cv_sizeof_long+set}" = set; then :
8089 $as_echo_n "(cached) " >&6
c0993dbe 8090else
81ecdfbb 8091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8092
81ecdfbb
RW
8093else
8094 if test "$ac_cv_type_long" = yes; then
8095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8097{ as_fn_set_status 77
8098as_fn_error "cannot compute sizeof (long)
8099See \`config.log' for more details." "$LINENO" 5; }; }
8100 else
8101 ac_cv_sizeof_long=0
8102 fi
c0993dbe 8103fi
81ecdfbb 8104
c0993dbe 8105fi
81ecdfbb
RW
8106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8107$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8108
c0993dbe 8109
c0993dbe 8110
c0993dbe
UW
8111cat >>confdefs.h <<_ACEOF
8112#define SIZEOF_LONG $ac_cv_sizeof_long
8113_ACEOF
8114
8115
8116 if test "x${ac_cv_sizeof_long}" = "x8"; then
8117 want64=true
8118 fi
8119 fi
8120 if test x${want64} = xtrue; then
8121 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8122 else
8123 TARGET_OBS='$(ALL_TARGET_OBS)'
8124 fi
8125fi
8126
8127
8128
8129# For other settings, only the main target counts.
8130gdb_sim=
8131gdb_osabi=
8132build_gdbserver=
8133targ=$target; . ${srcdir}/configure.tgt
8134
8135# Fetch the default architecture and default target vector from BFD.
8136targ=$target; . $srcdir/../bfd/config.bfd
8137
8138# We only want the first architecture, so strip off the others if
8139# there is more than one.
8140targ_archs=`echo $targ_archs | sed 's/ .*//'`
8141
8142if test "x$targ_archs" != x; then
8143
8144cat >>confdefs.h <<_ACEOF
8145#define DEFAULT_BFD_ARCH $targ_archs
8146_ACEOF
8147
8148fi
8149if test "x$targ_defvec" != x; then
8150
8151cat >>confdefs.h <<_ACEOF
8152#define DEFAULT_BFD_VEC $targ_defvec
8153_ACEOF
8154
8155fi
8156
c0993dbe
UW
8157# The CLI cannot be disabled yet, but may be in the future.
8158
8159# Enable CLI.
81ecdfbb
RW
8160# Check whether --enable-gdbcli was given.
8161if test "${enable_gdbcli+set}" = set; then :
8162 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8163 yes)
8164 ;;
8165 no)
81ecdfbb 8166 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8167 *)
81ecdfbb 8168 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8169 esac
8170else
8171 enable_gdbcli=yes
81ecdfbb
RW
8172fi
8173
c0993dbe
UW
8174if test x"$enable_gdbcli" = xyes; then
8175 if test -d $srcdir/cli; then
8176 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8177 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8178 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8179 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8180 fi
8181fi
8182
8183# Enable MI.
81ecdfbb
RW
8184# Check whether --enable-gdbmi was given.
8185if test "${enable_gdbmi+set}" = set; then :
8186 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8187 yes | no)
8188 ;;
8189 *)
81ecdfbb 8190 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8191 esac
8192else
8193 enable_gdbmi=yes
81ecdfbb
RW
8194fi
8195
c0993dbe
UW
8196if test x"$enable_gdbmi" = xyes; then
8197 if test -d $srcdir/mi; then
8198 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8199 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8200 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8201 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8202 fi
8203fi
8204
8205# Enable TUI.
81ecdfbb
RW
8206# Check whether --enable-tui was given.
8207if test "${enable_tui+set}" = set; then :
8208 enableval=$enable_tui; case $enableval in
3ca64bd3 8209 yes | no | auto)
c0993dbe
UW
8210 ;;
8211 *)
81ecdfbb 8212 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8213 esac
8214else
3ca64bd3 8215 enable_tui=auto
81ecdfbb
RW
8216fi
8217
c0993dbe
UW
8218
8219# Enable gdbtk.
81ecdfbb
RW
8220# Check whether --enable-gdbtk was given.
8221if test "${enable_gdbtk+set}" = set; then :
8222 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8223 yes | no)
8224 ;;
8225 *)
81ecdfbb 8226 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8227 esac
8228else
5062cc19 8229 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8230 enable_gdbtk=yes
8231 else
8232 enable_gdbtk=no
8233 fi
81ecdfbb
RW
8234fi
8235
c0993dbe
UW
8236# We unconditionally disable gdbtk tests on selected platforms.
8237case $host_os in
8238 go32* | windows*)
81ecdfbb
RW
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8240$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8241 enable_gdbtk=no ;;
8242esac
8243
8244# Libunwind support.
bec39cab 8245
81ecdfbb
RW
8246# Check whether --with-libunwind was given.
8247if test "${with_libunwind+set}" = set; then :
8248 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8249 yes) enable_libunwind=yes ;;
8250 no) enable_libunwind=no ;;
81ecdfbb 8251 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8252esac
bec39cab 8253else
bec39cab 8254
b54a8fd7 8255 for ac_header in libunwind-ia64.h
81ecdfbb 8256do :
b54a8fd7
PA
8257 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8258if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8259 cat >>confdefs.h <<_ACEOF
b54a8fd7 8260#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8261_ACEOF
8262
8263fi
8264
8265done
8266
b54a8fd7 8267 if test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
a9322a30
TT
8268 enable_libunwind=yes;
8269 fi
8270
bec39cab 8271fi
bec39cab 8272
bec39cab 8273
81ecdfbb 8274if test x"$enable_libunwind" = xyes; then
b54a8fd7 8275 for ac_header in libunwind-ia64.h
81ecdfbb 8276do :
b54a8fd7
PA
8277 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8278if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8279 cat >>confdefs.h <<_ACEOF
b54a8fd7 8280#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8281_ACEOF
8282
8283fi
8284
8285done
8286
bec39cab 8287
81ecdfbb 8288$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8289
8290 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8291 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8292 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8293fi
8294
cb01cfba
JB
8295opt_curses=no
8296
81ecdfbb
RW
8297# Check whether --with-curses was given.
8298if test "${with_curses+set}" = set; then :
8299 withval=$with_curses; opt_curses=$withval
8300fi
8301
cb01cfba 8302
76a39ba7 8303prefer_curses=no
cb01cfba 8304if test "$opt_curses" = "yes"; then
76a39ba7 8305 prefer_curses=yes
cb01cfba
JB
8306fi
8307
a9322a30 8308# Profiling support.
81ecdfbb
RW
8309# Check whether --enable-profiling was given.
8310if test "${enable_profiling+set}" = set; then :
8311 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8312 yes | no)
8313 ;;
8314 *)
81ecdfbb 8315 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8316 esac
8317else
8318 enable_profiling=no
81ecdfbb 8319fi
bec39cab 8320
a9322a30
TT
8321
8322for ac_func in monstartup _mcleanup
81ecdfbb
RW
8323do :
8324 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8325ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8326eval as_val=\$$as_ac_var
8327 if test "x$as_val" = x""yes; then :
8328 cat >>confdefs.h <<_ACEOF
8329#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8330_ACEOF
a9322a30 8331
81ecdfbb
RW
8332fi
8333done
a9322a30 8334
81ecdfbb
RW
8335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8336$as_echo_n "checking for _etext... " >&6; }
8337if test "${ac_cv_var__etext+set}" = set; then :
8338 $as_echo_n "(cached) " >&6
8339else
8340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8341/* end confdefs.h. */
8342#include <stdlib.h>
8343extern char _etext;
a9322a30
TT
8344
8345int
8346main ()
8347{
8348free (&_etext);
8349 ;
8350 return 0;
8351}
bec39cab 8352_ACEOF
81ecdfbb 8353if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8354 ac_cv_var__etext=yes
bec39cab 8355else
81ecdfbb 8356 ac_cv_var__etext=no
bec39cab 8357fi
81ecdfbb
RW
8358rm -f core conftest.err conftest.$ac_objext \
8359 conftest$ac_exeext conftest.$ac_ext
bec39cab 8360fi
81ecdfbb
RW
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8362$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8363if test $ac_cv_var__etext = yes; then
60ca704f 8364
81ecdfbb 8365$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8366
bec39cab 8367fi
81ecdfbb
RW
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8369$as_echo_n "checking for etext... " >&6; }
8370if test "${ac_cv_var_etext+set}" = set; then :
8371 $as_echo_n "(cached) " >&6
bec39cab 8372else
81ecdfbb 8373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8374/* end confdefs.h. */
a9322a30
TT
8375#include <stdlib.h>
8376extern char etext;
bec39cab
AC
8377
8378int
8379main ()
8380{
a9322a30 8381free (&etext);
bec39cab
AC
8382 ;
8383 return 0;
8384}
8385_ACEOF
81ecdfbb 8386if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8387 ac_cv_var_etext=yes
bec39cab 8388else
81ecdfbb 8389 ac_cv_var_etext=no
bec39cab 8390fi
81ecdfbb
RW
8391rm -f core conftest.err conftest.$ac_objext \
8392 conftest$ac_exeext conftest.$ac_ext
bec39cab 8393fi
81ecdfbb
RW
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8395$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8396if test $ac_cv_var_etext = yes; then
8397
81ecdfbb 8398$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8399
8400fi
a9322a30
TT
8401if test "$enable_profiling" = yes ; then
8402 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8403 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8404 fi
8405 PROFILE_CFLAGS=-pg
8406 OLD_CFLAGS="$CFLAGS"
8407 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8408
81ecdfbb
RW
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8410$as_echo_n "checking whether $CC supports -pg... " >&6; }
8411if test "${ac_cv_cc_supports_pg+set}" = set; then :
8412 $as_echo_n "(cached) " >&6
bec39cab 8413else
81ecdfbb 8414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8415/* end confdefs.h. */
bec39cab
AC
8416
8417int
8418main ()
8419{
a9322a30 8420int x;
bec39cab
AC
8421 ;
8422 return 0;
8423}
8424_ACEOF
81ecdfbb 8425if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8426 ac_cv_cc_supports_pg=yes
bec39cab 8427else
81ecdfbb 8428 ac_cv_cc_supports_pg=no
bec39cab 8429fi
81ecdfbb 8430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8431fi
81ecdfbb
RW
8432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8433$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8434
a9322a30 8435 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8436 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8437 fi
bec39cab 8438
a9322a30 8439 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8440fi
8441
c16158bc
JM
8442
8443
81ecdfbb
RW
8444# Check whether --with-pkgversion was given.
8445if test "${with_pkgversion+set}" = set; then :
8446 withval=$with_pkgversion; case "$withval" in
8447 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8448 no) PKGVERSION= ;;
8449 *) PKGVERSION="($withval) " ;;
8450 esac
8451else
8452 PKGVERSION="(GDB) "
8453
81ecdfbb 8454fi
c16158bc
JM
8455
8456
8457
8458
81ecdfbb
RW
8459
8460# Check whether --with-bugurl was given.
8461if test "${with_bugurl+set}" = set; then :
8462 withval=$with_bugurl; case "$withval" in
8463 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8464 no) BUGURL=
8465 ;;
8466 *) BUGURL="$withval"
8467 ;;
8468 esac
8469else
8470 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8471
81ecdfbb
RW
8472fi
8473
c16158bc
JM
8474 case ${BUGURL} in
8475 "")
8476 REPORT_BUGS_TO=
8477 REPORT_BUGS_TEXI=
8478 ;;
8479 *)
8480 REPORT_BUGS_TO="<$BUGURL>"
8481 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8482 ;;
8483 esac;
8484
8485
8486
8487
8488cat >>confdefs.h <<_ACEOF
8489#define PKGVERSION "$PKGVERSION"
8490_ACEOF
8491
8492
8493cat >>confdefs.h <<_ACEOF
8494#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8495_ACEOF
8496
8497
bec39cab
AC
8498# --------------------- #
8499# Checks for programs. #
8500# --------------------- #
8501
8502for ac_prog in gawk mawk nawk awk
8503do
8504 # Extract the first word of "$ac_prog", so it can be a program name with args.
8505set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8507$as_echo_n "checking for $ac_word... " >&6; }
8508if test "${ac_cv_prog_AWK+set}" = set; then :
8509 $as_echo_n "(cached) " >&6
bec39cab
AC
8510else
8511 if test -n "$AWK"; then
8512 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8513else
8514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8515for as_dir in $PATH
8516do
8517 IFS=$as_save_IFS
8518 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8519 for ac_exec_ext in '' $ac_executable_extensions; do
8520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8521 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8523 break 2
8524 fi
8525done
81ecdfbb
RW
8526 done
8527IFS=$as_save_IFS
bec39cab
AC
8528
8529fi
8530fi
8531AWK=$ac_cv_prog_AWK
8532if test -n "$AWK"; then
81ecdfbb
RW
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8534$as_echo "$AWK" >&6; }
bec39cab 8535else
81ecdfbb
RW
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537$as_echo "no" >&6; }
bec39cab
AC
8538fi
8539
bec39cab 8540
81ecdfbb 8541 test -n "$AWK" && break
bec39cab
AC
8542done
8543
bec39cab 8544
81ecdfbb
RW
8545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8546$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8547LN_S=$as_ln_s
8548if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8550$as_echo "yes" >&6; }
bec39cab 8551else
81ecdfbb
RW
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8553$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8554fi
8555
8556if test -n "$ac_tool_prefix"; then
8557 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8558set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8560$as_echo_n "checking for $ac_word... " >&6; }
8561if test "${ac_cv_prog_RANLIB+set}" = set; then :
8562 $as_echo_n "(cached) " >&6
bec39cab
AC
8563else
8564 if test -n "$RANLIB"; then
8565 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8566else
8567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570 IFS=$as_save_IFS
8571 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8572 for ac_exec_ext in '' $ac_executable_extensions; do
8573 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8574 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8576 break 2
8577 fi
8578done
81ecdfbb
RW
8579 done
8580IFS=$as_save_IFS
bec39cab
AC
8581
8582fi
8583fi
8584RANLIB=$ac_cv_prog_RANLIB
8585if test -n "$RANLIB"; then
81ecdfbb
RW
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8587$as_echo "$RANLIB" >&6; }
bec39cab 8588else
81ecdfbb
RW
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
bec39cab
AC
8591fi
8592
81ecdfbb 8593
bec39cab
AC
8594fi
8595if test -z "$ac_cv_prog_RANLIB"; then
8596 ac_ct_RANLIB=$RANLIB
8597 # Extract the first word of "ranlib", so it can be a program name with args.
8598set dummy ranlib; ac_word=$2
81ecdfbb
RW
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8602 $as_echo_n "(cached) " >&6
bec39cab
AC
8603else
8604 if test -n "$ac_ct_RANLIB"; then
8605 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8606else
8607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610 IFS=$as_save_IFS
8611 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8612 for ac_exec_ext in '' $ac_executable_extensions; do
8613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8614 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8616 break 2
8617 fi
8618done
81ecdfbb
RW
8619 done
8620IFS=$as_save_IFS
bec39cab 8621
bec39cab
AC
8622fi
8623fi
8624ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8625if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8627$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8628else
81ecdfbb
RW
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630$as_echo "no" >&6; }
bec39cab
AC
8631fi
8632
81ecdfbb
RW
8633 if test "x$ac_ct_RANLIB" = x; then
8634 RANLIB=":"
8635 else
8636 case $cross_compiling:$ac_tool_warned in
8637yes:)
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8640ac_tool_warned=yes ;;
8641esac
8642 RANLIB=$ac_ct_RANLIB
8643 fi
bec39cab
AC
8644else
8645 RANLIB="$ac_cv_prog_RANLIB"
8646fi
8647
8648for ac_prog in 'bison -y' byacc
8649do
8650 # Extract the first word of "$ac_prog", so it can be a program name with args.
8651set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8653$as_echo_n "checking for $ac_word... " >&6; }
8654if test "${ac_cv_prog_YACC+set}" = set; then :
8655 $as_echo_n "(cached) " >&6
bec39cab
AC
8656else
8657 if test -n "$YACC"; then
8658 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8659else
8660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8661for as_dir in $PATH
8662do
8663 IFS=$as_save_IFS
8664 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8665 for ac_exec_ext in '' $ac_executable_extensions; do
8666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8667 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8669 break 2
8670 fi
8671done
81ecdfbb
RW
8672 done
8673IFS=$as_save_IFS
bec39cab
AC
8674
8675fi
8676fi
8677YACC=$ac_cv_prog_YACC
8678if test -n "$YACC"; then
81ecdfbb
RW
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8680$as_echo "$YACC" >&6; }
bec39cab 8681else
81ecdfbb
RW
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8683$as_echo "no" >&6; }
bec39cab
AC
8684fi
8685
81ecdfbb 8686
bec39cab
AC
8687 test -n "$YACC" && break
8688done
8689test -n "$YACC" || YACC="yacc"
8690
8691
8692if test -n "$ac_tool_prefix"; then
8693 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8694set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8696$as_echo_n "checking for $ac_word... " >&6; }
8697if test "${ac_cv_prog_AR+set}" = set; then :
8698 $as_echo_n "(cached) " >&6
bec39cab
AC
8699else
8700 if test -n "$AR"; then
8701 ac_cv_prog_AR="$AR" # Let the user override the test.
8702else
8703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706 IFS=$as_save_IFS
8707 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8708 for ac_exec_ext in '' $ac_executable_extensions; do
8709 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8710 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8712 break 2
8713 fi
8714done
81ecdfbb
RW
8715 done
8716IFS=$as_save_IFS
bec39cab
AC
8717
8718fi
8719fi
8720AR=$ac_cv_prog_AR
8721if test -n "$AR"; then
81ecdfbb
RW
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8723$as_echo "$AR" >&6; }
bec39cab 8724else
81ecdfbb
RW
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
bec39cab
AC
8727fi
8728
81ecdfbb 8729
bec39cab
AC
8730fi
8731if test -z "$ac_cv_prog_AR"; then
8732 ac_ct_AR=$AR
8733 # Extract the first word of "ar", so it can be a program name with args.
8734set dummy ar; ac_word=$2
81ecdfbb
RW
8735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736$as_echo_n "checking for $ac_word... " >&6; }
8737if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8738 $as_echo_n "(cached) " >&6
bec39cab
AC
8739else
8740 if test -n "$ac_ct_AR"; then
8741 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8742else
8743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746 IFS=$as_save_IFS
8747 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8748 for ac_exec_ext in '' $ac_executable_extensions; do
8749 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8750 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8752 break 2
8753 fi
8754done
81ecdfbb
RW
8755 done
8756IFS=$as_save_IFS
bec39cab
AC
8757
8758fi
8759fi
8760ac_ct_AR=$ac_cv_prog_ac_ct_AR
8761if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8763$as_echo "$ac_ct_AR" >&6; }
bec39cab 8764else
81ecdfbb
RW
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
bec39cab
AC
8767fi
8768
81ecdfbb
RW
8769 if test "x$ac_ct_AR" = x; then
8770 AR=""
8771 else
8772 case $cross_compiling:$ac_tool_warned in
8773yes:)
8774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8776ac_tool_warned=yes ;;
8777esac
8778 AR=$ac_ct_AR
8779 fi
bec39cab
AC
8780else
8781 AR="$ac_cv_prog_AR"
8782fi
8783
8784if test -n "$ac_tool_prefix"; then
8785 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8786set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8788$as_echo_n "checking for $ac_word... " >&6; }
8789if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8790 $as_echo_n "(cached) " >&6
bec39cab
AC
8791else
8792 if test -n "$DLLTOOL"; then
8793 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8794else
8795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8796for as_dir in $PATH
8797do
8798 IFS=$as_save_IFS
8799 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8800 for ac_exec_ext in '' $ac_executable_extensions; do
8801 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8802 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8804 break 2
8805 fi
8806done
81ecdfbb
RW
8807 done
8808IFS=$as_save_IFS
bec39cab
AC
8809
8810fi
8811fi
8812DLLTOOL=$ac_cv_prog_DLLTOOL
8813if test -n "$DLLTOOL"; then
81ecdfbb
RW
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8815$as_echo "$DLLTOOL" >&6; }
bec39cab 8816else
81ecdfbb
RW
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
bec39cab
AC
8819fi
8820
81ecdfbb 8821
bec39cab
AC
8822fi
8823if test -z "$ac_cv_prog_DLLTOOL"; then
8824 ac_ct_DLLTOOL=$DLLTOOL
8825 # Extract the first word of "dlltool", so it can be a program name with args.
8826set dummy dlltool; ac_word=$2
81ecdfbb
RW
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8830 $as_echo_n "(cached) " >&6
bec39cab
AC
8831else
8832 if test -n "$ac_ct_DLLTOOL"; then
8833 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8834else
8835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8836for as_dir in $PATH
8837do
8838 IFS=$as_save_IFS
8839 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8840 for ac_exec_ext in '' $ac_executable_extensions; do
8841 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8842 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8844 break 2
8845 fi
8846done
81ecdfbb
RW
8847 done
8848IFS=$as_save_IFS
bec39cab
AC
8849
8850fi
8851fi
8852ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8853if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8855$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8856else
81ecdfbb
RW
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858$as_echo "no" >&6; }
bec39cab
AC
8859fi
8860
81ecdfbb
RW
8861 if test "x$ac_ct_DLLTOOL" = x; then
8862 DLLTOOL=""
8863 else
8864 case $cross_compiling:$ac_tool_warned in
8865yes:)
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8868ac_tool_warned=yes ;;
8869esac
8870 DLLTOOL=$ac_ct_DLLTOOL
8871 fi
bec39cab
AC
8872else
8873 DLLTOOL="$ac_cv_prog_DLLTOOL"
8874fi
8875
8876if test -n "$ac_tool_prefix"; then
8877 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8878set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880$as_echo_n "checking for $ac_word... " >&6; }
8881if test "${ac_cv_prog_WINDRES+set}" = set; then :
8882 $as_echo_n "(cached) " >&6
bec39cab
AC
8883else
8884 if test -n "$WINDRES"; then
8885 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8886else
8887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890 IFS=$as_save_IFS
8891 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8892 for ac_exec_ext in '' $ac_executable_extensions; do
8893 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8894 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8896 break 2
8897 fi
8898done
81ecdfbb
RW
8899 done
8900IFS=$as_save_IFS
bec39cab
AC
8901
8902fi
8903fi
8904WINDRES=$ac_cv_prog_WINDRES
8905if test -n "$WINDRES"; then
81ecdfbb
RW
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8907$as_echo "$WINDRES" >&6; }
bec39cab 8908else
81ecdfbb
RW
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8910$as_echo "no" >&6; }
bec39cab
AC
8911fi
8912
81ecdfbb 8913
bec39cab
AC
8914fi
8915if test -z "$ac_cv_prog_WINDRES"; then
8916 ac_ct_WINDRES=$WINDRES
8917 # Extract the first word of "windres", so it can be a program name with args.
8918set dummy windres; ac_word=$2
81ecdfbb
RW
8919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8920$as_echo_n "checking for $ac_word... " >&6; }
8921if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8922 $as_echo_n "(cached) " >&6
bec39cab
AC
8923else
8924 if test -n "$ac_ct_WINDRES"; then
8925 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8926else
8927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8928for as_dir in $PATH
8929do
8930 IFS=$as_save_IFS
8931 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8932 for ac_exec_ext in '' $ac_executable_extensions; do
8933 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8934 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8936 break 2
8937 fi
8938done
81ecdfbb
RW
8939 done
8940IFS=$as_save_IFS
bec39cab
AC
8941
8942fi
8943fi
8944ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8945if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8947$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8948else
81ecdfbb
RW
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
c906108c 8951fi
bec39cab 8952
81ecdfbb
RW
8953 if test "x$ac_ct_WINDRES" = x; then
8954 WINDRES=""
8955 else
8956 case $cross_compiling:$ac_tool_warned in
8957yes:)
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8960ac_tool_warned=yes ;;
8961esac
8962 WINDRES=$ac_ct_WINDRES
8963 fi
c906108c 8964else
bec39cab 8965 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8966fi
8967
bec39cab
AC
8968
8969# Needed for GNU/Hurd.
8970if test -n "$ac_tool_prefix"; then
8971 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8972set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if test "${ac_cv_prog_MIG+set}" = set; then :
8976 $as_echo_n "(cached) " >&6
c906108c 8977else
bec39cab
AC
8978 if test -n "$MIG"; then
8979 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8980else
8981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8982for as_dir in $PATH
8983do
8984 IFS=$as_save_IFS
8985 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8986 for ac_exec_ext in '' $ac_executable_extensions; do
8987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8988 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8990 break 2
8991 fi
8992done
81ecdfbb
RW
8993 done
8994IFS=$as_save_IFS
bec39cab 8995
c906108c 8996fi
bec39cab
AC
8997fi
8998MIG=$ac_cv_prog_MIG
8999if test -n "$MIG"; then
81ecdfbb
RW
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
9001$as_echo "$MIG" >&6; }
c906108c 9002else
81ecdfbb
RW
9003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9004$as_echo "no" >&6; }
c906108c
SS
9005fi
9006
81ecdfbb 9007
bec39cab
AC
9008fi
9009if test -z "$ac_cv_prog_MIG"; then
9010 ac_ct_MIG=$MIG
9011 # Extract the first word of "mig", so it can be a program name with args.
9012set dummy mig; ac_word=$2
81ecdfbb
RW
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9014$as_echo_n "checking for $ac_word... " >&6; }
9015if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
9016 $as_echo_n "(cached) " >&6
bec39cab
AC
9017else
9018 if test -n "$ac_ct_MIG"; then
9019 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9020else
9021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9022for as_dir in $PATH
9023do
9024 IFS=$as_save_IFS
9025 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9026 for ac_exec_ext in '' $ac_executable_extensions; do
9027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9028 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 9029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9030 break 2
9031 fi
9032done
81ecdfbb
RW
9033 done
9034IFS=$as_save_IFS
c906108c 9035
bec39cab
AC
9036fi
9037fi
9038ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9039if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9041$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9042else
81ecdfbb
RW
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9044$as_echo "no" >&6; }
bec39cab 9045fi
c906108c 9046
81ecdfbb
RW
9047 if test "x$ac_ct_MIG" = x; then
9048 MIG=""
9049 else
9050 case $cross_compiling:$ac_tool_warned in
9051yes:)
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9054ac_tool_warned=yes ;;
9055esac
9056 MIG=$ac_ct_MIG
9057 fi
bec39cab
AC
9058else
9059 MIG="$ac_cv_prog_MIG"
9060fi
c906108c 9061
c906108c 9062
bec39cab
AC
9063# ---------------------- #
9064# Checks for libraries. #
9065# ---------------------- #
c906108c 9066
bec39cab 9067# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9069$as_echo_n "checking for main in -lm... " >&6; }
9070if test "${ac_cv_lib_m_main+set}" = set; then :
9071 $as_echo_n "(cached) " >&6
bec39cab
AC
9072else
9073 ac_check_lib_save_LIBS=$LIBS
9074LIBS="-lm $LIBS"
81ecdfbb 9075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9076/* end confdefs.h. */
c906108c 9077
c906108c 9078
bec39cab
AC
9079int
9080main ()
9081{
81ecdfbb 9082return main ();
bec39cab
AC
9083 ;
9084 return 0;
9085}
9086_ACEOF
81ecdfbb 9087if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9088 ac_cv_lib_m_main=yes
9089else
81ecdfbb 9090 ac_cv_lib_m_main=no
bec39cab 9091fi
81ecdfbb
RW
9092rm -f core conftest.err conftest.$ac_objext \
9093 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9094LIBS=$ac_check_lib_save_LIBS
9095fi
81ecdfbb
RW
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9097$as_echo "$ac_cv_lib_m_main" >&6; }
9098if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9099 cat >>confdefs.h <<_ACEOF
9100#define HAVE_LIBM 1
9101_ACEOF
9102
9103 LIBS="-lm $LIBS"
c906108c 9104
c906108c 9105fi
bec39cab
AC
9106
9107
9108# We need to link with -lw to get `wctype' on Solaris before Solaris
9109# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9110# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9111# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9112ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9113if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9114
c906108c 9115else
81ecdfbb
RW
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9117$as_echo_n "checking for wctype in -lw... " >&6; }
9118if test "${ac_cv_lib_w_wctype+set}" = set; then :
9119 $as_echo_n "(cached) " >&6
bec39cab
AC
9120else
9121 ac_check_lib_save_LIBS=$LIBS
9122LIBS="-lw $LIBS"
81ecdfbb 9123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9124/* end confdefs.h. */
c906108c 9125
81ecdfbb
RW
9126/* Override any GCC internal prototype to avoid an error.
9127 Use char because int might match the return type of a GCC
9128 builtin and then its argument prototype would still apply. */
bec39cab
AC
9129#ifdef __cplusplus
9130extern "C"
9131#endif
bec39cab
AC
9132char wctype ();
9133int
9134main ()
9135{
81ecdfbb 9136return wctype ();
bec39cab
AC
9137 ;
9138 return 0;
9139}
9140_ACEOF
81ecdfbb 9141if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9142 ac_cv_lib_w_wctype=yes
9143else
81ecdfbb 9144 ac_cv_lib_w_wctype=no
bec39cab 9145fi
81ecdfbb
RW
9146rm -f core conftest.err conftest.$ac_objext \
9147 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9148LIBS=$ac_check_lib_save_LIBS
9149fi
81ecdfbb
RW
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9151$as_echo "$ac_cv_lib_w_wctype" >&6; }
9152if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9153 cat >>confdefs.h <<_ACEOF
9154#define HAVE_LIBW 1
9155_ACEOF
c906108c 9156
bec39cab 9157 LIBS="-lw $LIBS"
c906108c 9158
bec39cab 9159fi
c906108c 9160
bec39cab 9161fi
c906108c 9162
ddc9cd0f 9163
bec39cab 9164# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9166$as_echo_n "checking for library containing gethostbyname... " >&6; }
9167if test "${ac_cv_search_gethostbyname+set}" = set; then :
9168 $as_echo_n "(cached) " >&6
bec39cab
AC
9169else
9170 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9172/* end confdefs.h. */
ddc9cd0f 9173
81ecdfbb
RW
9174/* Override any GCC internal prototype to avoid an error.
9175 Use char because int might match the return type of a GCC
9176 builtin and then its argument prototype would still apply. */
bec39cab
AC
9177#ifdef __cplusplus
9178extern "C"
9179#endif
bec39cab
AC
9180char gethostbyname ();
9181int
9182main ()
9183{
81ecdfbb 9184return gethostbyname ();
bec39cab
AC
9185 ;
9186 return 0;
9187}
9188_ACEOF
81ecdfbb
RW
9189for ac_lib in '' nsl; do
9190 if test -z "$ac_lib"; then
9191 ac_res="none required"
9192 else
9193 ac_res=-l$ac_lib
b4e70030 9194 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9195 fi
9196 if ac_fn_c_try_link "$LINENO"; then :
9197 ac_cv_search_gethostbyname=$ac_res
9198fi
9199rm -f core conftest.err conftest.$ac_objext \
9200 conftest$ac_exeext
9201 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9202 break
9203fi
9204done
9205if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9206
bec39cab 9207else
81ecdfbb 9208 ac_cv_search_gethostbyname=no
bec39cab 9209fi
81ecdfbb 9210rm conftest.$ac_ext
bec39cab
AC
9211LIBS=$ac_func_search_save_LIBS
9212fi
81ecdfbb
RW
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9214$as_echo "$ac_cv_search_gethostbyname" >&6; }
9215ac_res=$ac_cv_search_gethostbyname
9216if test "$ac_res" != no; then :
9217 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9218
bec39cab 9219fi
96baa820 9220
c906108c 9221
b4e70030 9222# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9224$as_echo_n "checking for library containing socketpair... " >&6; }
9225if test "${ac_cv_search_socketpair+set}" = set; then :
9226 $as_echo_n "(cached) " >&6
b4e70030
JB
9227else
9228 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9230/* end confdefs.h. */
9231
81ecdfbb
RW
9232/* Override any GCC internal prototype to avoid an error.
9233 Use char because int might match the return type of a GCC
9234 builtin and then its argument prototype would still apply. */
b4e70030
JB
9235#ifdef __cplusplus
9236extern "C"
9237#endif
b4e70030
JB
9238char socketpair ();
9239int
9240main ()
9241{
81ecdfbb 9242return socketpair ();
b4e70030
JB
9243 ;
9244 return 0;
9245}
9246_ACEOF
81ecdfbb
RW
9247for ac_lib in '' socket; do
9248 if test -z "$ac_lib"; then
9249 ac_res="none required"
9250 else
9251 ac_res=-l$ac_lib
b4e70030 9252 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9253 fi
9254 if ac_fn_c_try_link "$LINENO"; then :
9255 ac_cv_search_socketpair=$ac_res
9256fi
9257rm -f core conftest.err conftest.$ac_objext \
9258 conftest$ac_exeext
9259 if test "${ac_cv_search_socketpair+set}" = set; then :
9260 break
9261fi
9262done
9263if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9264
b4e70030 9265else
81ecdfbb 9266 ac_cv_search_socketpair=no
b4e70030 9267fi
81ecdfbb 9268rm conftest.$ac_ext
b4e70030
JB
9269LIBS=$ac_func_search_save_LIBS
9270fi
81ecdfbb
RW
9271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9272$as_echo "$ac_cv_search_socketpair" >&6; }
9273ac_res=$ac_cv_search_socketpair
9274if test "$ac_res" != no; then :
9275 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9276
9277fi
9278
9279
233a11ab 9280# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9281
9282 # See if the user specified whether he wants zlib support or not.
9283
9284# Check whether --with-zlib was given.
9285if test "${with_zlib+set}" = set; then :
9286 withval=$with_zlib;
9287else
9288 with_zlib=auto
9289fi
9290
9291
9292 if test "$with_zlib" != "no"; then
9293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9294$as_echo_n "checking for library containing zlibVersion... " >&6; }
9295if test "${ac_cv_search_zlibVersion+set}" = set; then :
9296 $as_echo_n "(cached) " >&6
233a11ab
CS
9297else
9298 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9300/* end confdefs.h. */
9301
81ecdfbb
RW
9302/* Override any GCC internal prototype to avoid an error.
9303 Use char because int might match the return type of a GCC
233a11ab 9304 builtin and then its argument prototype would still apply. */
233a11ab
CS
9305#ifdef __cplusplus
9306extern "C"
9307#endif
233a11ab
CS
9308char zlibVersion ();
9309int
9310main ()
9311{
81ecdfbb 9312return zlibVersion ();
233a11ab
CS
9313 ;
9314 return 0;
9315}
9316_ACEOF
81ecdfbb
RW
9317for ac_lib in '' z; do
9318 if test -z "$ac_lib"; then
9319 ac_res="none required"
233a11ab 9320 else
81ecdfbb
RW
9321 ac_res=-l$ac_lib
9322 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9323 fi
81ecdfbb
RW
9324 if ac_fn_c_try_link "$LINENO"; then :
9325 ac_cv_search_zlibVersion=$ac_res
233a11ab 9326fi
81ecdfbb
RW
9327rm -f core conftest.err conftest.$ac_objext \
9328 conftest$ac_exeext
9329 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9330 break
233a11ab 9331fi
81ecdfbb
RW
9332done
9333if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9334
233a11ab 9335else
81ecdfbb 9336 ac_cv_search_zlibVersion=no
233a11ab 9337fi
81ecdfbb
RW
9338rm conftest.$ac_ext
9339LIBS=$ac_func_search_save_LIBS
233a11ab 9340fi
81ecdfbb
RW
9341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9342$as_echo "$ac_cv_search_zlibVersion" >&6; }
9343ac_res=$ac_cv_search_zlibVersion
9344if test "$ac_res" != no; then :
9345 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9346 for ac_header in zlib.h
9347do :
9348 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9349if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9350 cat >>confdefs.h <<_ACEOF
81ecdfbb 9351#define HAVE_ZLIB_H 1
233a11ab
CS
9352_ACEOF
9353
9354fi
9355
9356done
9357
9358fi
9359
b040ad30
JB
9360 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9361 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9362 fi
9363 fi
9364
233a11ab 9365
77f120bf 9366# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9368$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9369if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9370 $as_echo_n "(cached) " >&6
bec39cab
AC
9371else
9372 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9374/* end confdefs.h. */
c906108c 9375
81ecdfbb
RW
9376/* Override any GCC internal prototype to avoid an error.
9377 Use char because int might match the return type of a GCC
9378 builtin and then its argument prototype would still apply. */
bec39cab
AC
9379#ifdef __cplusplus
9380extern "C"
9381#endif
77f120bf 9382char dlgetmodinfo ();
bec39cab
AC
9383int
9384main ()
9385{
81ecdfbb 9386return dlgetmodinfo ();
bec39cab
AC
9387 ;
9388 return 0;
9389}
9390_ACEOF
81ecdfbb
RW
9391for ac_lib in '' dl xpdl; do
9392 if test -z "$ac_lib"; then
9393 ac_res="none required"
9394 else
9395 ac_res=-l$ac_lib
b4e70030 9396 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9397 fi
9398 if ac_fn_c_try_link "$LINENO"; then :
9399 ac_cv_search_dlgetmodinfo=$ac_res
9400fi
9401rm -f core conftest.err conftest.$ac_objext \
9402 conftest$ac_exeext
9403 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9404 break
9405fi
9406done
9407if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9408
4e8d927d 9409else
81ecdfbb 9410 ac_cv_search_dlgetmodinfo=no
1ba607ad 9411fi
81ecdfbb 9412rm conftest.$ac_ext
bec39cab
AC
9413LIBS=$ac_func_search_save_LIBS
9414fi
81ecdfbb
RW
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9416$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9417ac_res=$ac_cv_search_dlgetmodinfo
9418if test "$ac_res" != no; then :
9419 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9420
8bb2c122 9421fi
8bb2c122 9422
8bb2c122 9423
77f120bf 9424
77f120bf 9425
6c7a06a3 9426
81ecdfbb
RW
9427# Check whether --with-libiconv-prefix was given.
9428if test "${with_libiconv_prefix+set}" = set; then :
9429 withval=$with_libiconv_prefix;
6c7a06a3 9430 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9431 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9432 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9433 done
9434
81ecdfbb
RW
9435fi
9436
6c7a06a3 9437
f18c4681 9438 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9439 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9440
81ecdfbb
RW
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9442$as_echo_n "checking for iconv... " >&6; }
9443if test "${am_cv_func_iconv+set}" = set; then :
9444 $as_echo_n "(cached) " >&6
d542061a 9445else
6c7a06a3
TT
9446
9447 am_cv_func_iconv="no, consider installing GNU libiconv"
9448 am_cv_lib_iconv=no
9449 am_cv_use_build_libiconv=no
f0f20949 9450 am_cv_build_libiconv_path=
4edb1e84
JB
9451
9452 # If libiconv is part of the build tree, then try using it over
9453 # any system iconv.
9454 if test -d ../libiconv; then
f18c4681
JB
9455 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9456 am_save_LIBS="$LIBS"
9457 am_save_CPPFLAGS="$CPPFLAGS"
9458 LIBS="$LIBS $lib_dir/libiconv.a"
9459 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9461/* end confdefs.h. */
6c7a06a3
TT
9462#include <stdlib.h>
9463#include <iconv.h>
d542061a
UW
9464int
9465main ()
9466{
6c7a06a3 9467iconv_t cd = iconv_open("","");
f18c4681
JB
9468 iconv(cd,NULL,NULL,NULL,NULL);
9469 iconv_close(cd);
d542061a
UW
9470 ;
9471 return 0;
9472}
9473_ACEOF
81ecdfbb 9474if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9475 am_cv_use_build_libiconv=yes
f0f20949 9476 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9477 am_cv_lib_iconv=yes
9478 am_cv_func_iconv=yes
d542061a 9479fi
81ecdfbb
RW
9480rm -f core conftest.err conftest.$ac_objext \
9481 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9482 LIBS="$am_save_LIBS"
9483 CPPFLAGS="$am_save_CPPFLAGS"
9484 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9485 break
9486 fi
9487 done
4edb1e84 9488 fi
94ae1714 9489
4edb1e84 9490 # Next, try to find iconv in libc.
6c7a06a3 9491 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9493/* end confdefs.h. */
6c7a06a3
TT
9494#include <stdlib.h>
9495#include <iconv.h>
d542061a
UW
9496int
9497main ()
9498{
6c7a06a3
TT
9499iconv_t cd = iconv_open("","");
9500 iconv(cd,NULL,NULL,NULL,NULL);
9501 iconv_close(cd);
d542061a
UW
9502 ;
9503 return 0;
9504}
9505_ACEOF
81ecdfbb 9506if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9507 am_cv_func_iconv=yes
d542061a 9508fi
81ecdfbb
RW
9509rm -f core conftest.err conftest.$ac_objext \
9510 conftest$ac_exeext conftest.$ac_ext
77f120bf 9511 fi
94ae1714 9512
4edb1e84
JB
9513 # If iconv was not in libc, try -liconv. In this case, arrange to
9514 # look in the libiconv prefix, if it was specified by the user.
9515 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9516 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9517 am_save_LIBS="$LIBS"
9518 if test -n "$LIBICONV_INCLUDE"; then
9519 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9520 LIBS="$LIBS $LIBICONV_LIBDIR"
9521 fi
9522 LIBS="$LIBS -liconv"
81ecdfbb 9523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9524/* end confdefs.h. */
6c7a06a3
TT
9525#include <stdlib.h>
9526#include <iconv.h>
bec39cab
AC
9527int
9528main ()
9529{
6c7a06a3
TT
9530iconv_t cd = iconv_open("","");
9531 iconv(cd,NULL,NULL,NULL,NULL);
9532 iconv_close(cd);
bec39cab
AC
9533 ;
9534 return 0;
9535}
9536_ACEOF
81ecdfbb 9537if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9538 am_cv_lib_iconv=yes
6c7a06a3 9539 am_cv_func_iconv=yes
627af7ea 9540fi
81ecdfbb
RW
9541rm -f core conftest.err conftest.$ac_objext \
9542 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9543 LIBS="$am_save_LIBS"
fc3b640d 9544 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9545 fi
9546
9547fi
81ecdfbb
RW
9548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9549$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9550
9551 # Set the various flags based on the cache variables. We can't rely
9552 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9553 LIBICONV=
9554 if test "$am_cv_lib_iconv" = yes; then
9555 LIBICONV="-liconv"
94ae1714
TT
9556 else
9557 LIBICONV_LIBDIR=
9558 LIBICONV_INCLUDE=
fc3b640d
TT
9559 fi
9560 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9561 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9562 LIBICONV_LIBDIR=""
fc3b640d
TT
9563 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9564 fi
9565 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9566 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9567
6c7a06a3
TT
9568 if test "$am_cv_func_iconv" = yes; then
9569
81ecdfbb 9570$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9571
81ecdfbb
RW
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9573$as_echo_n "checking for iconv declaration... " >&6; }
9574 if test "${am_cv_proto_iconv+set}" = set; then :
9575 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9576else
9577
81ecdfbb 9578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9579/* end confdefs.h. */
9580
6c7a06a3
TT
9581#include <stdlib.h>
9582#include <iconv.h>
9583extern
b4e70030 9584#ifdef __cplusplus
6c7a06a3 9585"C"
b4e70030 9586#endif
6c7a06a3
TT
9587#if defined(__STDC__) || defined(__cplusplus)
9588size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9589#else
9590size_t iconv();
9591#endif
9592
b4e70030
JB
9593int
9594main ()
9595{
6c7a06a3 9596
b4e70030
JB
9597 ;
9598 return 0;
9599}
9600_ACEOF
81ecdfbb 9601if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9602 am_cv_proto_iconv_arg1=""
4e8d927d 9603else
81ecdfbb 9604 am_cv_proto_iconv_arg1="const"
b4e70030 9605fi
81ecdfbb 9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9607 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);"
9608fi
9609
9610 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9612 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9613$as_echo "${ac_t:-
9614 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9615
9616cat >>confdefs.h <<_ACEOF
9617#define ICONV_CONST $am_cv_proto_iconv_arg1
9618_ACEOF
9619
9620 fi
6c7a06a3
TT
9621
9622
478aac75
DE
9623# GDB may fork/exec the iconv program to get the list of supported character
9624# sets. Allow the user to specify where to find it.
9625# There are several factors affecting the choice of option name:
9626# - There is already --with-libiconv-prefix but we can't use it, it specifies
9627# the build-time location of libiconv files.
9628# - The program we need to find is iconv, which comes with glibc. The user
9629# doesn't necessarily have libiconv installed. Therefore naming this
9630# --with-libiconv-foo feels wrong.
9631# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9632# defined to work on directories not files (though it really doesn't know
9633# the difference).
9634# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9635# with --with-libiconv-prefix.
9636# Putting these together is why the option name is --with-iconv-bin.
9637
9638
9639# Check whether --with-iconv-bin was given.
9640if test "${with_iconv_bin+set}" = set; then :
9641 withval=$with_iconv_bin; iconv_bin="${withval}"
9642
9643cat >>confdefs.h <<_ACEOF
9644#define ICONV_BIN "${iconv_bin}"
9645_ACEOF
9646
9647
9648 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9649 if test "x$prefix" = xNONE; then
9650 test_prefix=/usr/local
9651 else
9652 test_prefix=$prefix
9653 fi
9654 else
9655 test_prefix=$exec_prefix
9656 fi
9657 value=0
9658 case ${iconv_bin} in
9659 "${test_prefix}"|"${test_prefix}/"*|\
9660 '${exec_prefix}'|'${exec_prefix}/'*)
9661 value=1
9662 ;;
9663 esac
9664
9665cat >>confdefs.h <<_ACEOF
9666#define ICONV_BIN_RELOCATABLE $value
9667_ACEOF
9668
9669
9670
9671fi
9672
9673
6c7a06a3
TT
9674# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9675# There is a very specific comment in /usr/include/curses.h explaining that
9676# termcap routines built into libcurses must not be used.
9677#
9678# The symptoms we observed so far is GDB unexpectedly changing
9679# the terminal settings when tgetent is called - this is particularly
9680# visible as the output is missing carriage returns, and so rapidly
9681# becomes very hard to read.
9682#
9683# The readline configure script has already decided that libtermcap
9684# was enough for its purposes, and so decided to build readline using
9685# libtermcap. Since the TUI mode requires curses, building GDB with
9686# TUI enabled results in both libraries to be used at the same time,
9687# which is not allowed. This basically means that GDB with TUI is
9688# broken on alpha-osf.
9689
9690case $host_os in
6bcc772d
RO
9691 osf* )
9692 if test x"$enable_tui" = xyes; then
81ecdfbb 9693 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9694 fi
6bcc772d 9695 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9696 enable_tui=no
9697 fi
9698 ;;
9699esac
9700
cb01cfba 9701# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9702if test x"$enable_tui" != xno; then
cb01cfba
JB
9703 prefer_curses=yes
9704fi
9705
9706curses_found=no
9707if test x"$prefer_curses" = xyes; then
9708 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9709 # curses library because the latter might not provide all the
9710 # functionality we need. However, this leads to problems on systems
9711 # where the linker searches /usr/local/lib, but the compiler doesn't
9712 # search /usr/local/include, if ncurses is installed in /usr/local. A
9713 # default installation of ncurses on alpha*-dec-osf* will lead to such
9714 # a situation.
81ecdfbb
RW
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9716$as_echo_n "checking for library containing waddstr... " >&6; }
9717if test "${ac_cv_search_waddstr+set}" = set; then :
9718 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9719else
9720 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9722/* end confdefs.h. */
9723
81ecdfbb
RW
9724/* Override any GCC internal prototype to avoid an error.
9725 Use char because int might match the return type of a GCC
9726 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9727#ifdef __cplusplus
9728extern "C"
9729#endif
6c7a06a3
TT
9730char waddstr ();
9731int
9732main ()
9733{
81ecdfbb 9734return waddstr ();
6c7a06a3
TT
9735 ;
9736 return 0;
9737}
9738_ACEOF
81ecdfbb
RW
9739for ac_lib in '' ncurses cursesX curses; do
9740 if test -z "$ac_lib"; then
9741 ac_res="none required"
9742 else
9743 ac_res=-l$ac_lib
9744 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9745 fi
9746 if ac_fn_c_try_link "$LINENO"; then :
9747 ac_cv_search_waddstr=$ac_res
9748fi
9749rm -f core conftest.err conftest.$ac_objext \
9750 conftest$ac_exeext
9751 if test "${ac_cv_search_waddstr+set}" = set; then :
9752 break
9753fi
9754done
9755if test "${ac_cv_search_waddstr+set}" = set; then :
9756
6c7a06a3 9757else
81ecdfbb
RW
9758 ac_cv_search_waddstr=no
9759fi
9760rm conftest.$ac_ext
9761LIBS=$ac_func_search_save_LIBS
9762fi
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9764$as_echo "$ac_cv_search_waddstr" >&6; }
9765ac_res=$ac_cv_search_waddstr
9766if test "$ac_res" != no; then :
9767 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9768
9769fi
9770
9771
cb01cfba
JB
9772 if test "$ac_cv_search_waddstr" != no; then
9773 curses_found=yes
9774 fi
9775fi
9776
9777# Check whether we should enable the TUI, but only do so if we really
9778# can.
9779if test x"$enable_tui" != xno; then
9780 if test -d $srcdir/tui; then
9781 if test "$curses_found" != no; then
6c7a06a3
TT
9782 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9783 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9784 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9785 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9786 else
9787 if test x"$enable_tui" = xyes; then
81ecdfbb 9788 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9789 else
81ecdfbb
RW
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9791$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9792 fi
9793 fi
9794 fi
9795fi
9796
9797# Since GDB uses Readline, we need termcap functionality. In many
9798# cases this will be provided by the curses library, but some systems
9799# have a seperate termcap library, or no curses library at all.
9800
9801case $host_os in
9802 cygwin*)
9803 if test -d $srcdir/libtermcap; then
9804 LIBS="../libtermcap/libtermcap.a $LIBS"
9805 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9806 fi ;;
9807 go32* | *djgpp*)
9808 ac_cv_search_tgetent="none required"
9809 ;;
9810 *mingw32*)
9811 ac_cv_search_tgetent="none required"
9812 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9813 ;;
9814esac
9815
9816# These are the libraries checked by Readline.
81ecdfbb
RW
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9818$as_echo_n "checking for library containing tgetent... " >&6; }
9819if test "${ac_cv_search_tgetent+set}" = set; then :
9820 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9821else
9822 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9824/* end confdefs.h. */
9825
81ecdfbb
RW
9826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9829#ifdef __cplusplus
9830extern "C"
9831#endif
6c7a06a3
TT
9832char tgetent ();
9833int
9834main ()
9835{
81ecdfbb 9836return tgetent ();
6c7a06a3
TT
9837 ;
9838 return 0;
9839}
9840_ACEOF
81ecdfbb
RW
9841for ac_lib in '' termcap tinfo curses ncurses; do
9842 if test -z "$ac_lib"; then
9843 ac_res="none required"
9844 else
9845 ac_res=-l$ac_lib
6c7a06a3 9846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9847 fi
9848 if ac_fn_c_try_link "$LINENO"; then :
9849 ac_cv_search_tgetent=$ac_res
9850fi
9851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext
9853 if test "${ac_cv_search_tgetent+set}" = set; then :
9854 break
9855fi
9856done
9857if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9858
6c7a06a3 9859else
81ecdfbb 9860 ac_cv_search_tgetent=no
6c7a06a3 9861fi
81ecdfbb 9862rm conftest.$ac_ext
6c7a06a3
TT
9863LIBS=$ac_func_search_save_LIBS
9864fi
81ecdfbb
RW
9865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9866$as_echo "$ac_cv_search_tgetent" >&6; }
9867ac_res=$ac_cv_search_tgetent
9868if test "$ac_res" != no; then :
9869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9870
06825bd1
MK
9871fi
9872
06825bd1 9873
bec39cab 9874if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9875 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9876fi
9877
3841debe 9878
81ecdfbb
RW
9879# Check whether --with-system-readline was given.
9880if test "${with_system_readline+set}" = set; then :
9881 withval=$with_system_readline;
9882fi
6a30b0a5 9883
6a30b0a5
AS
9884
9885if test "$with_system_readline" = yes; then
9886 READLINE=-lreadline
9887 READLINE_DEPS=
9888 READLINE_CFLAGS=
39037522 9889 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9890else
9891 READLINE='$(READLINE_DIR)/libreadline.a'
9892 READLINE_DEPS='$(READLINE)'
9893 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9894 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9895fi
9896
9897
9898
9899
9900
f997c383
SD
9901# Generate jit-reader.h
9902
9903# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9904TARGET_PTR=
9905
9906# The cast to long int works around a bug in the HP C Compiler
9907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9909# This bug is HP SR number 8606223364.
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9911$as_echo_n "checking size of unsigned long long... " >&6; }
9912if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9913 $as_echo_n "(cached) " >&6
9914else
9915 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9916
9917else
9918 if test "$ac_cv_type_unsigned_long_long" = yes; then
9919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9921{ as_fn_set_status 77
9922as_fn_error "cannot compute sizeof (unsigned long long)
9923See \`config.log' for more details." "$LINENO" 5; }; }
9924 else
9925 ac_cv_sizeof_unsigned_long_long=0
9926 fi
9927fi
9928
9929fi
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9931$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9932
9933
9934
9935cat >>confdefs.h <<_ACEOF
9936#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9937_ACEOF
9938
9939
9940# The cast to long int works around a bug in the HP C Compiler
9941# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9942# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9943# This bug is HP SR number 8606223364.
9944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9945$as_echo_n "checking size of unsigned long... " >&6; }
9946if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9947 $as_echo_n "(cached) " >&6
9948else
9949 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9950
9951else
9952 if test "$ac_cv_type_unsigned_long" = yes; then
9953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9955{ as_fn_set_status 77
9956as_fn_error "cannot compute sizeof (unsigned long)
9957See \`config.log' for more details." "$LINENO" 5; }; }
9958 else
9959 ac_cv_sizeof_unsigned_long=0
9960 fi
9961fi
9962
9963fi
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9965$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9966
9967
9968
9969cat >>confdefs.h <<_ACEOF
9970#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9971_ACEOF
9972
9973
9974# The cast to long int works around a bug in the HP C Compiler
9975# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9976# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9977# This bug is HP SR number 8606223364.
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9979$as_echo_n "checking size of unsigned __int128... " >&6; }
9980if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9981 $as_echo_n "(cached) " >&6
9982else
9983 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9984
9985else
9986 if test "$ac_cv_type_unsigned___int128" = yes; then
9987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9989{ as_fn_set_status 77
9990as_fn_error "cannot compute sizeof (unsigned __int128)
9991See \`config.log' for more details." "$LINENO" 5; }; }
9992 else
9993 ac_cv_sizeof_unsigned___int128=0
9994 fi
9995fi
9996
9997fi
9998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9999$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
10000
10001
10002
10003cat >>confdefs.h <<_ACEOF
10004#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
10005_ACEOF
10006
10007
10008
10009if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
10010 TARGET_PTR="unsigned long"
10011elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
10012 TARGET_PTR="unsigned long long"
10013elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
10014 TARGET_PTR="unsigned __int128"
10015else
10016 TARGET_PTR="unsigned long"
10017fi
10018
10019
10020ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
10021
10022
a2d08b9e
SD
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10024$as_echo_n "checking for library containing dlopen... " >&6; }
10025if test "${ac_cv_search_dlopen+set}" = set; then :
10026 $as_echo_n "(cached) " >&6
10027else
10028 ac_func_search_save_LIBS=$LIBS
10029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10030/* end confdefs.h. */
10031
10032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
10035#ifdef __cplusplus
10036extern "C"
10037#endif
10038char dlopen ();
10039int
10040main ()
10041{
10042return dlopen ();
10043 ;
10044 return 0;
10045}
10046_ACEOF
10047for ac_lib in '' dl; do
10048 if test -z "$ac_lib"; then
10049 ac_res="none required"
10050 else
10051 ac_res=-l$ac_lib
10052 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10053 fi
10054 if ac_fn_c_try_link "$LINENO"; then :
10055 ac_cv_search_dlopen=$ac_res
10056fi
10057rm -f core conftest.err conftest.$ac_objext \
10058 conftest$ac_exeext
10059 if test "${ac_cv_search_dlopen+set}" = set; then :
10060 break
10061fi
10062done
10063if test "${ac_cv_search_dlopen+set}" = set; then :
10064
10065else
10066 ac_cv_search_dlopen=no
10067fi
10068rm conftest.$ac_ext
10069LIBS=$ac_func_search_save_LIBS
10070fi
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10072$as_echo "$ac_cv_search_dlopen" >&6; }
10073ac_res=$ac_cv_search_dlopen
10074if test "$ac_res" != no; then :
10075 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10076
10077fi
10078
10079
39037522 10080
b8e0a31c
SD
10081
10082# Check whether --with-jit-reader-dir was given.
10083if test "${with_jit_reader_dir+set}" = set; then :
10084 withval=$with_jit_reader_dir;
10085 JIT_READER_DIR=$withval
10086else
10087 JIT_READER_DIR=${libdir}/gdb
10088fi
10089
10090
10091 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10092 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10093 ac_define_dir=`eval echo $JIT_READER_DIR`
10094 ac_define_dir=`eval echo $ac_define_dir`
10095
10096cat >>confdefs.h <<_ACEOF
10097#define JIT_READER_DIR "$ac_define_dir"
10098_ACEOF
10099
10100
10101
10102
10103 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10104 if test "x$prefix" = xNONE; then
10105 test_prefix=/usr/local
10106 else
10107 test_prefix=$prefix
10108 fi
10109 else
10110 test_prefix=$exec_prefix
10111 fi
10112 value=0
10113 case ${ac_define_dir} in
10114 "${test_prefix}"|"${test_prefix}/"*|\
10115 '${exec_prefix}'|'${exec_prefix}/'*)
10116 value=1
10117 ;;
10118 esac
10119
10120cat >>confdefs.h <<_ACEOF
10121#define JIT_READER_DIR_RELOCATABLE $value
10122_ACEOF
10123
10124
10125
10126
10127
81ecdfbb
RW
10128# Check whether --with-expat was given.
10129if test "${with_expat+set}" = set; then :
10130 withval=$with_expat;
5c39566f
DJ
10131else
10132 with_expat=auto
81ecdfbb
RW
10133fi
10134
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
10136$as_echo_n "checking whether to use expat... " >&6; }
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
10138$as_echo "$with_expat" >&6; }
5c39566f
DJ
10139
10140if test "${with_expat}" = no; then
81ecdfbb
RW
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
10142$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
10143 HAVE_LIBEXPAT=no
10144else
10145
3841debe
DJ
10146 if test "X$prefix" = "XNONE"; then
10147 acl_final_prefix="$ac_default_prefix"
10148 else
10149 acl_final_prefix="$prefix"
10150 fi
10151 if test "X$exec_prefix" = "XNONE"; then
10152 acl_final_exec_prefix='${prefix}'
10153 else
10154 acl_final_exec_prefix="$exec_prefix"
10155 fi
10156 acl_save_prefix="$prefix"
10157 prefix="$acl_final_prefix"
10158 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10159 prefix="$acl_save_prefix"
10160
10161
81ecdfbb
RW
10162# Check whether --with-gnu-ld was given.
10163if test "${with_gnu_ld+set}" = set; then :
10164 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
10165else
10166 with_gnu_ld=no
81ecdfbb
RW
10167fi
10168
3841debe
DJ
10169# Prepare PATH_SEPARATOR.
10170# The user is always right.
10171if test "${PATH_SEPARATOR+set}" != set; then
10172 echo "#! /bin/sh" >conf$$.sh
10173 echo "exit 0" >>conf$$.sh
10174 chmod +x conf$$.sh
10175 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10176 PATH_SEPARATOR=';'
10177 else
10178 PATH_SEPARATOR=:
10179 fi
10180 rm -f conf$$.sh
10181fi
10182ac_prog=ld
10183if test "$GCC" = yes; then
10184 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
10186$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
10187 case $host in
10188 *-*-mingw*)
10189 # gcc leaves a trailing carriage return which upsets mingw
10190 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10191 *)
10192 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10193 esac
10194 case $ac_prog in
10195 # Accept absolute paths.
10196 [\\/]* | [A-Za-z]:[\\/]*)
10197 re_direlt='/[^/][^/]*/\.\./'
10198 # Canonicalize the path of ld
10199 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10200 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10201 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10202 done
10203 test -z "$LD" && LD="$ac_prog"
10204 ;;
10205 "")
10206 # If it fails, then pretend we aren't using GCC.
10207 ac_prog=ld
10208 ;;
10209 *)
10210 # If it is relative, then search for the first ld in PATH.
10211 with_gnu_ld=unknown
10212 ;;
10213 esac
10214elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10216$as_echo_n "checking for GNU ld... " >&6; }
3841debe 10217else
81ecdfbb
RW
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10219$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 10220fi
81ecdfbb
RW
10221if test "${acl_cv_path_LD+set}" = set; then :
10222 $as_echo_n "(cached) " >&6
3841debe
DJ
10223else
10224 if test -z "$LD"; then
10225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10226 for ac_dir in $PATH; do
10227 test -z "$ac_dir" && ac_dir=.
10228 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10229 acl_cv_path_LD="$ac_dir/$ac_prog"
10230 # Check to see if the program is GNU ld. I'd rather use --version,
10231 # but apparently some GNU ld's only accept -v.
10232 # Break only if it was the GNU/non-GNU ld that we prefer.
10233 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10234 test "$with_gnu_ld" != no && break
10235 else
10236 test "$with_gnu_ld" != yes && break
10237 fi
10238 fi
10239 done
10240 IFS="$ac_save_ifs"
10241else
10242 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10243fi
10244fi
10245
10246LD="$acl_cv_path_LD"
10247if test -n "$LD"; then
81ecdfbb
RW
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10249$as_echo "$LD" >&6; }
3841debe 10250else
81ecdfbb
RW
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10252$as_echo "no" >&6; }
3841debe 10253fi
81ecdfbb
RW
10254test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10256$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10257if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10258 $as_echo_n "(cached) " >&6
3841debe
DJ
10259else
10260 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10261if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10262 acl_cv_prog_gnu_ld=yes
10263else
10264 acl_cv_prog_gnu_ld=no
10265fi
10266fi
81ecdfbb
RW
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10268$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10269with_gnu_ld=$acl_cv_prog_gnu_ld
10270
10271
10272
81ecdfbb
RW
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10274$as_echo_n "checking for shared library run path origin... " >&6; }
10275if test "${acl_cv_rpath+set}" = set; then :
10276 $as_echo_n "(cached) " >&6
3841debe
DJ
10277else
10278
10279 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10280 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10281 . ./conftest.sh
10282 rm -f ./conftest.sh
10283 acl_cv_rpath=done
10284
10285fi
81ecdfbb
RW
10286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10287$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10288 wl="$acl_cv_wl"
10289 libext="$acl_cv_libext"
10290 shlibext="$acl_cv_shlibext"
10291 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10292 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10293 hardcode_direct="$acl_cv_hardcode_direct"
10294 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10295 # Check whether --enable-rpath was given.
10296if test "${enable_rpath+set}" = set; then :
10297 enableval=$enable_rpath; :
3841debe
DJ
10298else
10299 enable_rpath=yes
81ecdfbb
RW
10300fi
10301
3841debe
DJ
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311 use_additional=yes
10312
10313 acl_save_prefix="$prefix"
10314 prefix="$acl_final_prefix"
10315 acl_save_exec_prefix="$exec_prefix"
10316 exec_prefix="$acl_final_exec_prefix"
10317
10318 eval additional_includedir=\"$includedir\"
10319 eval additional_libdir=\"$libdir\"
10320
10321 exec_prefix="$acl_save_exec_prefix"
10322 prefix="$acl_save_prefix"
10323
10324
81ecdfbb
RW
10325# Check whether --with-libexpat-prefix was given.
10326if test "${with_libexpat_prefix+set}" = set; then :
10327 withval=$with_libexpat_prefix;
3841debe
DJ
10328 if test "X$withval" = "Xno"; then
10329 use_additional=no
10330 else
10331 if test "X$withval" = "X"; then
10332
10333 acl_save_prefix="$prefix"
10334 prefix="$acl_final_prefix"
10335 acl_save_exec_prefix="$exec_prefix"
10336 exec_prefix="$acl_final_exec_prefix"
10337
10338 eval additional_includedir=\"$includedir\"
10339 eval additional_libdir=\"$libdir\"
10340
10341 exec_prefix="$acl_save_exec_prefix"
10342 prefix="$acl_save_prefix"
10343
10344 else
10345 additional_includedir="$withval/include"
10346 additional_libdir="$withval/lib"
10347 fi
10348 fi
10349
81ecdfbb
RW
10350fi
10351
3841debe
DJ
10352 LIBEXPAT=
10353 LTLIBEXPAT=
10354 INCEXPAT=
10355 rpathdirs=
10356 ltrpathdirs=
10357 names_already_handled=
10358 names_next_round='expat '
10359 while test -n "$names_next_round"; do
10360 names_this_round="$names_next_round"
10361 names_next_round=
10362 for name in $names_this_round; do
10363 already_handled=
10364 for n in $names_already_handled; do
10365 if test "$n" = "$name"; then
10366 already_handled=yes
10367 break
10368 fi
10369 done
10370 if test -z "$already_handled"; then
10371 names_already_handled="$names_already_handled $name"
10372 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10373 eval value=\"\$HAVE_LIB$uppername\"
10374 if test -n "$value"; then
10375 if test "$value" = yes; then
10376 eval value=\"\$LIB$uppername\"
10377 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10378 eval value=\"\$LTLIB$uppername\"
10379 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10380 else
10381 :
10382 fi
10383 else
10384 found_dir=
10385 found_la=
10386 found_so=
10387 found_a=
10388 if test $use_additional = yes; then
10389 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10390 found_dir="$additional_libdir"
10391 found_so="$additional_libdir/lib$name.$shlibext"
10392 if test -f "$additional_libdir/lib$name.la"; then
10393 found_la="$additional_libdir/lib$name.la"
10394 fi
10395 else
10396 if test -f "$additional_libdir/lib$name.$libext"; then
10397 found_dir="$additional_libdir"
10398 found_a="$additional_libdir/lib$name.$libext"
10399 if test -f "$additional_libdir/lib$name.la"; then
10400 found_la="$additional_libdir/lib$name.la"
10401 fi
10402 fi
10403 fi
10404 fi
10405 if test "X$found_dir" = "X"; then
10406 for x in $LDFLAGS $LTLIBEXPAT; do
10407
10408 acl_save_prefix="$prefix"
10409 prefix="$acl_final_prefix"
10410 acl_save_exec_prefix="$exec_prefix"
10411 exec_prefix="$acl_final_exec_prefix"
10412 eval x=\"$x\"
10413 exec_prefix="$acl_save_exec_prefix"
10414 prefix="$acl_save_prefix"
10415
10416 case "$x" in
10417 -L*)
10418 dir=`echo "X$x" | sed -e 's/^X-L//'`
10419 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10420 found_dir="$dir"
10421 found_so="$dir/lib$name.$shlibext"
10422 if test -f "$dir/lib$name.la"; then
10423 found_la="$dir/lib$name.la"
10424 fi
10425 else
10426 if test -f "$dir/lib$name.$libext"; then
10427 found_dir="$dir"
10428 found_a="$dir/lib$name.$libext"
10429 if test -f "$dir/lib$name.la"; then
10430 found_la="$dir/lib$name.la"
10431 fi
10432 fi
10433 fi
10434 ;;
10435 esac
10436 if test "X$found_dir" != "X"; then
10437 break
10438 fi
10439 done
10440 fi
10441 if test "X$found_dir" != "X"; then
10442 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10443 if test "X$found_so" != "X"; then
10444 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10445 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10446 else
10447 haveit=
10448 for x in $ltrpathdirs; do
10449 if test "X$x" = "X$found_dir"; then
10450 haveit=yes
10451 break
10452 fi
10453 done
10454 if test -z "$haveit"; then
10455 ltrpathdirs="$ltrpathdirs $found_dir"
10456 fi
10457 if test "$hardcode_direct" = yes; then
10458 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10459 else
10460 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10461 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10462 haveit=
10463 for x in $rpathdirs; do
10464 if test "X$x" = "X$found_dir"; then
10465 haveit=yes
10466 break
10467 fi
10468 done
10469 if test -z "$haveit"; then
10470 rpathdirs="$rpathdirs $found_dir"
10471 fi
10472 else
10473 haveit=
10474 for x in $LDFLAGS $LIBEXPAT; do
10475
10476 acl_save_prefix="$prefix"
10477 prefix="$acl_final_prefix"
10478 acl_save_exec_prefix="$exec_prefix"
10479 exec_prefix="$acl_final_exec_prefix"
10480 eval x=\"$x\"
10481 exec_prefix="$acl_save_exec_prefix"
10482 prefix="$acl_save_prefix"
10483
10484 if test "X$x" = "X-L$found_dir"; then
10485 haveit=yes
10486 break
10487 fi
10488 done
10489 if test -z "$haveit"; then
10490 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10491 fi
10492 if test "$hardcode_minus_L" != no; then
10493 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10494 else
10495 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10496 fi
10497 fi
10498 fi
10499 fi
10500 else
10501 if test "X$found_a" != "X"; then
10502 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10503 else
10504 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10505 fi
10506 fi
10507 additional_includedir=
10508 case "$found_dir" in
10509 */lib | */lib/)
10510 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10511 additional_includedir="$basedir/include"
10512 ;;
10513 esac
10514 if test "X$additional_includedir" != "X"; then
10515 if test "X$additional_includedir" != "X/usr/include"; then
10516 haveit=
10517 if test "X$additional_includedir" = "X/usr/local/include"; then
10518 if test -n "$GCC"; then
10519 case $host_os in
10520 linux*) haveit=yes;;
10521 esac
10522 fi
10523 fi
10524 if test -z "$haveit"; then
10525 for x in $CPPFLAGS $INCEXPAT; do
10526
10527 acl_save_prefix="$prefix"
10528 prefix="$acl_final_prefix"
10529 acl_save_exec_prefix="$exec_prefix"
10530 exec_prefix="$acl_final_exec_prefix"
10531 eval x=\"$x\"
10532 exec_prefix="$acl_save_exec_prefix"
10533 prefix="$acl_save_prefix"
10534
10535 if test "X$x" = "X-I$additional_includedir"; then
10536 haveit=yes
10537 break
10538 fi
10539 done
10540 if test -z "$haveit"; then
10541 if test -d "$additional_includedir"; then
10542 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10543 fi
10544 fi
10545 fi
10546 fi
10547 fi
10548 if test -n "$found_la"; then
10549 save_libdir="$libdir"
10550 case "$found_la" in
10551 */* | *\\*) . "$found_la" ;;
10552 *) . "./$found_la" ;;
10553 esac
10554 libdir="$save_libdir"
10555 for dep in $dependency_libs; do
10556 case "$dep" in
10557 -L*)
10558 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10559 if test "X$additional_libdir" != "X/usr/lib"; then
10560 haveit=
10561 if test "X$additional_libdir" = "X/usr/local/lib"; then
10562 if test -n "$GCC"; then
10563 case $host_os in
10564 linux*) haveit=yes;;
10565 esac
10566 fi
10567 fi
10568 if test -z "$haveit"; then
10569 haveit=
10570 for x in $LDFLAGS $LIBEXPAT; do
10571
10572 acl_save_prefix="$prefix"
10573 prefix="$acl_final_prefix"
10574 acl_save_exec_prefix="$exec_prefix"
10575 exec_prefix="$acl_final_exec_prefix"
10576 eval x=\"$x\"
10577 exec_prefix="$acl_save_exec_prefix"
10578 prefix="$acl_save_prefix"
10579
10580 if test "X$x" = "X-L$additional_libdir"; then
10581 haveit=yes
10582 break
10583 fi
10584 done
10585 if test -z "$haveit"; then
10586 if test -d "$additional_libdir"; then
10587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10588 fi
10589 fi
10590 haveit=
10591 for x in $LDFLAGS $LTLIBEXPAT; do
10592
10593 acl_save_prefix="$prefix"
10594 prefix="$acl_final_prefix"
10595 acl_save_exec_prefix="$exec_prefix"
10596 exec_prefix="$acl_final_exec_prefix"
10597 eval x=\"$x\"
10598 exec_prefix="$acl_save_exec_prefix"
10599 prefix="$acl_save_prefix"
10600
10601 if test "X$x" = "X-L$additional_libdir"; then
10602 haveit=yes
10603 break
10604 fi
10605 done
10606 if test -z "$haveit"; then
10607 if test -d "$additional_libdir"; then
10608 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10609 fi
10610 fi
10611 fi
10612 fi
10613 ;;
10614 -R*)
10615 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10616 if test "$enable_rpath" != no; then
10617 haveit=
10618 for x in $rpathdirs; do
10619 if test "X$x" = "X$dir"; then
10620 haveit=yes
10621 break
10622 fi
10623 done
10624 if test -z "$haveit"; then
10625 rpathdirs="$rpathdirs $dir"
10626 fi
10627 haveit=
10628 for x in $ltrpathdirs; do
10629 if test "X$x" = "X$dir"; then
10630 haveit=yes
10631 break
10632 fi
10633 done
10634 if test -z "$haveit"; then
10635 ltrpathdirs="$ltrpathdirs $dir"
10636 fi
10637 fi
10638 ;;
10639 -l*)
10640 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10641 ;;
10642 *.la)
10643 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10644 ;;
10645 *)
10646 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10647 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10648 ;;
81ecdfbb
RW
10649 esac
10650 done
10651 fi
10652 else
10653 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10654 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10655 fi
10656 fi
10657 fi
10658 done
10659 done
10660 if test "X$rpathdirs" != "X"; then
10661 if test -n "$hardcode_libdir_separator"; then
10662 alldirs=
10663 for found_dir in $rpathdirs; do
10664 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10665 done
10666 acl_save_libdir="$libdir"
10667 libdir="$alldirs"
10668 eval flag=\"$hardcode_libdir_flag_spec\"
10669 libdir="$acl_save_libdir"
10670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10671 else
10672 for found_dir in $rpathdirs; do
10673 acl_save_libdir="$libdir"
10674 libdir="$found_dir"
10675 eval flag=\"$hardcode_libdir_flag_spec\"
10676 libdir="$acl_save_libdir"
10677 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10678 done
10679 fi
10680 fi
10681 if test "X$ltrpathdirs" != "X"; then
10682 for found_dir in $ltrpathdirs; do
10683 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10684 done
10685 fi
a9322a30
TT
10686
10687
81ecdfbb 10688 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10689
81ecdfbb
RW
10690 for element in $INCEXPAT; do
10691 haveit=
10692 for x in $CPPFLAGS; do
a9322a30 10693
81ecdfbb
RW
10694 acl_save_prefix="$prefix"
10695 prefix="$acl_final_prefix"
10696 acl_save_exec_prefix="$exec_prefix"
10697 exec_prefix="$acl_final_exec_prefix"
10698 eval x=\"$x\"
10699 exec_prefix="$acl_save_exec_prefix"
10700 prefix="$acl_save_prefix"
a8111142 10701
81ecdfbb
RW
10702 if test "X$x" = "X$element"; then
10703 haveit=yes
10704 break
10705 fi
10706 done
10707 if test -z "$haveit"; then
10708 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10709 fi
10710 done
a9322a30
TT
10711
10712
81ecdfbb
RW
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10714$as_echo_n "checking for libexpat... " >&6; }
10715if test "${ac_cv_libexpat+set}" = set; then :
10716 $as_echo_n "(cached) " >&6
bec39cab 10717else
bec39cab 10718
81ecdfbb
RW
10719 ac_save_LIBS="$LIBS"
10720 LIBS="$LIBS $LIBEXPAT"
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10722/* end confdefs.h. */
81ecdfbb
RW
10723#include "expat.h"
10724int
10725main ()
10726{
10727XML_Parser p = XML_ParserCreate (0);
10728 ;
10729 return 0;
10730}
bec39cab 10731_ACEOF
81ecdfbb
RW
10732if ac_fn_c_try_link "$LINENO"; then :
10733 ac_cv_libexpat=yes
c906108c 10734else
81ecdfbb 10735 ac_cv_libexpat=no
bec39cab 10736fi
81ecdfbb
RW
10737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
10739 LIBS="$ac_save_LIBS"
c906108c 10740
95ca63c4 10741fi
81ecdfbb
RW
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10743$as_echo "$ac_cv_libexpat" >&6; }
10744 if test "$ac_cv_libexpat" = yes; then
10745 HAVE_LIBEXPAT=yes
bec39cab 10746
81ecdfbb 10747$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10748
81ecdfbb
RW
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10750$as_echo_n "checking how to link with libexpat... " >&6; }
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10752$as_echo "$LIBEXPAT" >&6; }
10753 else
10754 HAVE_LIBEXPAT=no
10755 CPPFLAGS="$ac_save_CPPFLAGS"
10756 LIBEXPAT=
10757 LTLIBEXPAT=
10758 fi
95ca63c4
CF
10759
10760
10761
7cb9022a
MK
10762
10763
bec39cab 10764
81ecdfbb
RW
10765 if test "$HAVE_LIBEXPAT" != yes; then
10766 if test "$with_expat" = yes; then
10767 as_fn_error "expat is missing or unusable" "$LINENO" 5
10768 else
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10770$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10771 fi
10772 else
10773 save_LIBS=$LIBS
10774 LIBS="$LIBS $LIBEXPAT"
10775 for ac_func in XML_StopParser
10776do :
10777 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10778if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10779 cat >>confdefs.h <<_ACEOF
81ecdfbb 10780#define HAVE_XML_STOPPARSER 1
bec39cab 10781_ACEOF
95ca63c4 10782
bec39cab 10783fi
bec39cab 10784done
95ca63c4 10785
81ecdfbb
RW
10786 LIBS=$save_LIBS
10787 fi
a9322a30
TT
10788fi
10789
a9322a30 10790
a9322a30
TT
10791
10792
ec685c5e 10793
0c4a4063 10794
81ecdfbb
RW
10795# Check whether --with-python was given.
10796if test "${with_python+set}" = set; then :
10797 withval=$with_python;
bec39cab 10798else
81ecdfbb 10799 with_python=auto
bec39cab 10800fi
bec39cab 10801
81ecdfbb
RW
10802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10803$as_echo_n "checking whether to use python... " >&6; }
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10805$as_echo "$with_python" >&6; }
9a156167 10806
81ecdfbb
RW
10807if test "${with_python}" = no; then
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10809$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10810 have_libpython=no
bec39cab 10811else
81ecdfbb 10812 case "${with_python}" in
8c85a4e2 10813 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10814 if test -d ${with_python}; then
10815 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10816 python_prog="${with_python}/bin/python"
0c4a4063 10817 python_prefix=
9c4ea6c5
JB
10818 # If python does not exit ${with_python}/bin, then try in
10819 # ${with_python}. On Windows/MinGW, this is where the Python
10820 # executable is.
10821 if test ! -x "${python_prog}"; then
10822 python_prog="${with_python}/python"
10823 python_prefix=
10824 fi
e7a30f46 10825 if test ! -x "${python_prog}"; then
ec685c5e
DE
10826 # Fall back to gdb 7.0/7.1 behaviour.
10827 python_prog=missing
0c4a4063 10828 python_prefix=${with_python}
ec685c5e 10829 fi
e7a30f46 10830 elif test -x "${with_python}"; then
ec685c5e
DE
10831 # While we can't run python compiled for $host (unless host == build),
10832 # the user could write a script that provides the needed information,
10833 # so we support that.
ec685c5e 10834 python_prog=${with_python}
0c4a4063 10835 python_prefix=
ec685c5e
DE
10836 else
10837 as_fn_error "invalid value for --with-python" "$LINENO" 5
10838 fi
81ecdfbb 10839 ;;
ec685c5e
DE
10840 */*)
10841 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10842 as_fn_error "invalid value for --with-python" "$LINENO" 5
10843 ;;
ec685c5e
DE
10844 *)
10845 # The user has either specified auto, yes, or the name of the python
10846 # program assumed to be in $PATH.
10847 python_prefix=
10848 case "${with_python}" in
10849 yes | auto)
10850 if test ${build} = ${host}; then
10851 # Extract the first word of "python", so it can be a program name with args.
10852set dummy python; ac_word=$2
10853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10854$as_echo_n "checking for $ac_word... " >&6; }
10855if test "${ac_cv_path_python_prog_path+set}" = set; then :
10856 $as_echo_n "(cached) " >&6
10857else
10858 case $python_prog_path in
10859 [\\/]* | ?:[\\/]*)
10860 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10861 ;;
10862 *)
10863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10864for as_dir in $PATH
10865do
10866 IFS=$as_save_IFS
10867 test -z "$as_dir" && as_dir=.
10868 for ac_exec_ext in '' $ac_executable_extensions; do
10869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10870 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10872 break 2
10873 fi
10874done
10875 done
10876IFS=$as_save_IFS
10877
10878 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10879 ;;
10880esac
10881fi
10882python_prog_path=$ac_cv_path_python_prog_path
10883if test -n "$python_prog_path"; then
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10885$as_echo "$python_prog_path" >&6; }
10886else
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892 if test "${python_prog_path}" = missing; then
10893 python_prog=missing
10894 else
10895 python_prog=${python_prog_path}
10896 fi
10897 else
10898 # Not much we can do except assume the cross-compiler will find the
10899 # right files.
10900 python_prog=missing
10901 fi
10902 ;;
10903 *)
10904 # While we can't run python compiled for $host (unless host == build),
10905 # the user could write a script that provides the needed information,
10906 # so we support that.
10907 python_prog="${with_python}"
10908 # Extract the first word of "${python_prog}", so it can be a program name with args.
10909set dummy ${python_prog}; ac_word=$2
10910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10911$as_echo_n "checking for $ac_word... " >&6; }
10912if test "${ac_cv_path_python_prog_path+set}" = set; then :
10913 $as_echo_n "(cached) " >&6
10914else
10915 case $python_prog_path in
10916 [\\/]* | ?:[\\/]*)
10917 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10918 ;;
10919 *)
10920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10921for as_dir in $PATH
10922do
10923 IFS=$as_save_IFS
10924 test -z "$as_dir" && as_dir=.
10925 for ac_exec_ext in '' $ac_executable_extensions; do
10926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10927 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10929 break 2
10930 fi
10931done
10932 done
10933IFS=$as_save_IFS
10934
10935 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10936 ;;
10937esac
10938fi
10939python_prog_path=$ac_cv_path_python_prog_path
10940if test -n "$python_prog_path"; then
10941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10942$as_echo "$python_prog_path" >&6; }
10943else
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10945$as_echo "no" >&6; }
10946fi
10947
10948
10949 if test "${python_prog_path}" = missing; then
10950 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10951 fi
10952 ;;
10953 esac
81ecdfbb
RW
10954 esac
10955
ec685c5e 10956 if test "${python_prog}" != missing; then
e7a30f46
DE
10957 # We have a python program to use, but it may be too old.
10958 # Don't flag an error for --with-python=auto (the default).
10959 have_python_config=yes
ec685c5e
DE
10960 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10961 if test $? != 0; then
e7a30f46
DE
10962 have_python_config=failed
10963 if test "${with_python}" != auto; then
10964 as_fn_error "failure running python-config --includes" "$LINENO" 5
10965 fi
ec685c5e
DE
10966 fi
10967 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10968 if test $? != 0; then
e7a30f46
DE
10969 have_python_config=failed
10970 if test "${with_python}" != auto; then
10971 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10972 fi
ec685c5e 10973 fi
0c4a4063
DE
10974 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10975 if test $? != 0; then
e7a30f46
DE
10976 have_python_config=failed
10977 if test "${with_python}" != auto; then
10978 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10979 fi
0c4a4063 10980 fi
ec685c5e 10981 else
ac534cba
JB
10982 # We do not have a python executable we can use to determine where
10983 # to find the Python headers and libs. We cannot guess the include
10984 # path from the python_prefix either, because that include path
10985 # depends on the Python version. So, there is nothing much we can
10986 # do except assume that the compiler will be able to find those files.
10987 python_includes=
10988 python_libs=
0c4a4063 10989 have_python_config=no
ec685c5e 10990 fi
bec39cab 10991
ec685c5e
DE
10992 # If we have python-config, only try the configuration it provides.
10993 # Otherwise fallback on the old way of trying different versions of
10994 # python in turn.
81ecdfbb 10995
ec685c5e
DE
10996 have_libpython=no
10997 if test "${have_python_config}" = yes; then
c1039e3c
JB
10998 # Determine the Python version by extracting "-lpython<version>"
10999 # part of the python_libs. <version> is usually X.Y with X and Y
11000 # being decimal numbers, but can also be XY (seen on Windows).
11001 #
11002 # The extraction is performed using sed with a regular expression.
11003 # Initially, the regexp used was using the '?' quantifier to make
11004 # the dot in the version number optional. Unfortunately, this
11005 # does not work with non-GNU versions of sed because, because of
11006 # what looks like a limitation (the '?' quantifier does not work
11007 # with back-references). We work around this limitation by using
11008 # the '*' quantifier instead. It means that, in theory, we might
11009 # match unexpected version strings such as "-lpython2..7", but
11010 # this seems unlikely in practice. And even if that happens,
11011 # an error will be triggered later on, when checking that version
11012 # number.
ec685c5e 11013 python_version=`echo " ${python_libs} " \
c1039e3c 11014 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
11015 case "${python_version}" in
11016 python*)
ec685c5e
DE
11017
11018 version=${python_version}
11019
11020 new_CPPFLAGS=${python_includes}
11021 new_LIBS=${python_libs}
81ecdfbb
RW
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11023$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11024 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11025 save_LIBS=$LIBS
ec685c5e
DE
11026 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11027 LIBS="$LIBS $new_LIBS"
11028 found_usable_python=no
81ecdfbb 11029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11030/* end confdefs.h. */
ac534cba 11031#include "Python.h"
81ecdfbb
RW
11032int
11033main ()
11034{
11035Py_Initialize ();
11036 ;
11037 return 0;
11038}
bec39cab 11039_ACEOF
81ecdfbb 11040if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11041 have_libpython=${version}
11042 found_usable_python=yes
ac534cba
JB
11043 PYTHON_CPPFLAGS=$new_CPPFLAGS
11044 PYTHON_LIBS=$new_LIBS
9a156167 11045fi
81ecdfbb
RW
11046rm -f core conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11048 CPPFLAGS=$save_CPPFLAGS
11049 LIBS=$save_LIBS
ec685c5e
DE
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11051$as_echo "${found_usable_python}" >&6; }
9a156167 11052
0c4a4063
DE
11053 ;;
11054 *)
ec685c5e 11055 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
11056 ;;
11057 esac
e7a30f46 11058 elif test "${have_python_config}" != failed; then
ec685c5e 11059 if test "${have_libpython}" = no; then
9a156167 11060
420697bb
TT
11061 version=python2.7
11062
11063 new_CPPFLAGS=${python_includes}
11064 new_LIBS="${python_libs} -lpython2.7"
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11066$as_echo_n "checking for ${version}... " >&6; }
11067 save_CPPFLAGS=$CPPFLAGS
11068 save_LIBS=$LIBS
11069 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11070 LIBS="$LIBS $new_LIBS"
11071 found_usable_python=no
11072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11073/* end confdefs.h. */
ac534cba 11074#include "Python.h"
420697bb
TT
11075int
11076main ()
11077{
11078Py_Initialize ();
11079 ;
11080 return 0;
11081}
11082_ACEOF
11083if ac_fn_c_try_link "$LINENO"; then :
11084 have_libpython=${version}
11085 found_usable_python=yes
ac534cba
JB
11086 PYTHON_CPPFLAGS=$new_CPPFLAGS
11087 PYTHON_LIBS=$new_LIBS
420697bb
TT
11088fi
11089rm -f core conftest.err conftest.$ac_objext \
11090 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11091 CPPFLAGS=$save_CPPFLAGS
11092 LIBS=$save_LIBS
420697bb
TT
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11094$as_echo "${found_usable_python}" >&6; }
11095
11096 fi
11097 if test "${have_libpython}" = no; then
11098
ec685c5e
DE
11099 version=python2.6
11100
11101 new_CPPFLAGS=${python_includes}
11102 new_LIBS="${python_libs} -lpython2.6"
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11104$as_echo_n "checking for ${version}... " >&6; }
11105 save_CPPFLAGS=$CPPFLAGS
11106 save_LIBS=$LIBS
11107 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11108 LIBS="$LIBS $new_LIBS"
11109 found_usable_python=no
11110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111/* end confdefs.h. */
ac534cba 11112#include "Python.h"
ec685c5e
DE
11113int
11114main ()
11115{
11116Py_Initialize ();
11117 ;
11118 return 0;
11119}
11120_ACEOF
11121if ac_fn_c_try_link "$LINENO"; then :
11122 have_libpython=${version}
11123 found_usable_python=yes
ac534cba
JB
11124 PYTHON_CPPFLAGS=$new_CPPFLAGS
11125 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
11126fi
11127rm -f core conftest.err conftest.$ac_objext \
11128 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11129 CPPFLAGS=$save_CPPFLAGS
11130 LIBS=$save_LIBS
ec685c5e
DE
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11132$as_echo "${found_usable_python}" >&6; }
9a156167 11133
81ecdfbb 11134 fi
ec685c5e 11135 if test ${have_libpython} = no; then
9a156167 11136
81ecdfbb 11137 version=python2.5
9a156167 11138
ec685c5e
DE
11139 new_CPPFLAGS=${python_includes}
11140 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11142$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11143 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11144 save_LIBS=$LIBS
ec685c5e
DE
11145 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11146 LIBS="$LIBS $new_LIBS"
11147 found_usable_python=no
81ecdfbb 11148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11149/* end confdefs.h. */
ac534cba 11150#include "Python.h"
81ecdfbb
RW
11151int
11152main ()
11153{
11154Py_Initialize ();
11155 ;
11156 return 0;
11157}
436868fb 11158_ACEOF
81ecdfbb 11159if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11160 have_libpython=${version}
11161 found_usable_python=yes
ac534cba
JB
11162 PYTHON_CPPFLAGS=$new_CPPFLAGS
11163 PYTHON_LIBS=$new_LIBS
436868fb 11164fi
81ecdfbb
RW
11165rm -f core conftest.err conftest.$ac_objext \
11166 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11167 CPPFLAGS=$save_CPPFLAGS
11168 LIBS=$save_LIBS
ec685c5e
DE
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11170$as_echo "${found_usable_python}" >&6; }
a9322a30 11171
81ecdfbb 11172 fi
ec685c5e 11173 if test ${have_libpython} = no; then
a9322a30 11174
81ecdfbb 11175 version=python2.4
a9322a30 11176
ec685c5e
DE
11177 new_CPPFLAGS=${python_includes}
11178 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11180$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11181 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11182 save_LIBS=$LIBS
ec685c5e
DE
11183 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11184 LIBS="$LIBS $new_LIBS"
11185 found_usable_python=no
81ecdfbb 11186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11187/* end confdefs.h. */
ac534cba 11188#include "Python.h"
a9322a30
TT
11189int
11190main ()
11191{
81ecdfbb 11192Py_Initialize ();
a9322a30
TT
11193 ;
11194 return 0;
11195}
436868fb 11196_ACEOF
81ecdfbb 11197if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11198 have_libpython=${version}
11199 found_usable_python=yes
ac534cba
JB
11200 PYTHON_CPPFLAGS=$new_CPPFLAGS
11201 PYTHON_LIBS=$new_LIBS
436868fb 11202fi
81ecdfbb
RW
11203rm -f core conftest.err conftest.$ac_objext \
11204 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11205 CPPFLAGS=$save_CPPFLAGS
11206 LIBS=$save_LIBS
ec685c5e
DE
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11208$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11209
ec685c5e
DE
11210 fi
11211 fi
9c4ea6c5 11212 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
11213
11214$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
11215
9c4ea6c5 11216 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
11217
11218$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
11219
9c4ea6c5 11220 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
11221
11222$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
11223
9c4ea6c5 11224 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
11225
11226$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
11227
81ecdfbb 11228 fi
ec685c5e
DE
11229
11230 if test "${have_libpython}" = no; then
81ecdfbb
RW
11231 case "${with_python}" in
11232 yes)
11233 as_fn_error "python is missing or unusable" "$LINENO" 5
11234 ;;
11235 auto)
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11237$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11238 ;;
11239 *)
11240 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11241 ;;
11242 esac
0c4a4063
DE
11243 else
11244 if test -n "${python_prefix}"; then
11245
11246cat >>confdefs.h <<_ACEOF
11247#define WITH_PYTHON_PATH "${python_prefix}"
11248_ACEOF
11249
11250
11251 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11252 if test "x$prefix" = xNONE; then
11253 test_prefix=/usr/local
11254 else
11255 test_prefix=$prefix
11256 fi
11257 else
11258 test_prefix=$exec_prefix
11259 fi
11260 value=0
11261 case ${python_prefix} in
11262 "${test_prefix}"|"${test_prefix}/"*|\
11263 '${exec_prefix}'|'${exec_prefix}/'*)
11264 value=1
11265 ;;
11266 esac
11267
11268cat >>confdefs.h <<_ACEOF
11269#define PYTHON_PATH_RELOCATABLE $value
11270_ACEOF
11271
11272
11273 fi
81ecdfbb 11274 fi
436868fb 11275fi
436868fb 11276
ec685c5e 11277if test "${have_libpython}" != no; then
436868fb 11278
81ecdfbb 11279$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11280
81ecdfbb
RW
11281 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11282 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11283 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11284 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11285 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11286
81ecdfbb
RW
11287 # Flags needed to compile Python code (taken from python-config --cflags).
11288 # We cannot call python-config directly because it will output whatever was
11289 # used when compiling the Python interpreter itself, including flags which
11290 # would make the python-related objects be compiled differently from the
11291 # rest of GDB (e.g., -O2 and -fPIC).
11292 if test "${GCC}" = yes; then
11293 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11294 fi
436868fb 11295
81ecdfbb
RW
11296 if test "x${tentative_python_cflags}" != x; then
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11298$as_echo_n "checking compiler flags for python code... " >&6; }
11299 for flag in ${tentative_python_cflags}; do
11300 # Check that the compiler accepts it
11301 saved_CFLAGS="$CFLAGS"
11302 CFLAGS="$CFLAGS $flag"
11303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11304/* end confdefs.h. */
81ecdfbb 11305
a9322a30
TT
11306int
11307main ()
11308{
a9322a30
TT
11309
11310 ;
11311 return 0;
11312}
bec39cab 11313_ACEOF
81ecdfbb
RW
11314if ac_fn_c_try_compile "$LINENO"; then :
11315 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11316fi
81ecdfbb
RW
11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318 CFLAGS="$saved_CFLAGS"
11319 done
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11321$as_echo "${PYTHON_CFLAGS}" >&6; }
11322 fi
043b6510
JB
11323
11324 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11325 # #if _SGIAPI
11326 # #define siginfo __siginfo
11327 # #endif
11328 # The problem is that including Python causes some XOPEN macros to be
11329 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11330 # to false. So, we work around this issue by defining siginfo ourself
11331 # though the command-line.
11332 case "$gdb_host" in
11333 irix*) if test "${GCC}" = yes; then
11334 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11335 fi
11336 ;;
11337 esac
81ecdfbb
RW
11338else
11339 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11340 # included.
11341 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11342 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11343 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11344fi
9a156167 11345
9a156167 11346
ac534cba
JB
11347
11348
81ecdfbb
RW
11349# ------------------------- #
11350# Checks for header files. #
11351# ------------------------- #
c890192f 11352
81ecdfbb
RW
11353ac_header_dirent=no
11354for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11355 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11357$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11358if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11359 $as_echo_n "(cached) " >&6
bec39cab 11360else
81ecdfbb 11361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11362/* end confdefs.h. */
81ecdfbb
RW
11363#include <sys/types.h>
11364#include <$ac_hdr>
11365
a9322a30
TT
11366int
11367main ()
11368{
81ecdfbb
RW
11369if ((DIR *) 0)
11370return 0;
a9322a30
TT
11371 ;
11372 return 0;
11373}
bec39cab 11374_ACEOF
81ecdfbb
RW
11375if ac_fn_c_try_compile "$LINENO"; then :
11376 eval "$as_ac_Header=yes"
bec39cab 11377else
81ecdfbb 11378 eval "$as_ac_Header=no"
bec39cab 11379fi
81ecdfbb 11380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11381fi
81ecdfbb
RW
11382eval ac_res=\$$as_ac_Header
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11384$as_echo "$ac_res" >&6; }
11385eval as_val=\$$as_ac_Header
11386 if test "x$as_val" = x""yes; then :
11387 cat >>confdefs.h <<_ACEOF
11388#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11389_ACEOF
bec39cab 11390
81ecdfbb
RW
11391ac_header_dirent=$ac_hdr; break
11392fi
bec39cab 11393
81ecdfbb
RW
11394done
11395# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11396if test $ac_header_dirent = dirent.h; then
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11398$as_echo_n "checking for library containing opendir... " >&6; }
11399if test "${ac_cv_search_opendir+set}" = set; then :
11400 $as_echo_n "(cached) " >&6
c890192f 11401else
81ecdfbb
RW
11402 ac_func_search_save_LIBS=$LIBS
11403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11404/* end confdefs.h. */
11405
11406/* Override any GCC internal prototype to avoid an error.
11407 Use char because int might match the return type of a GCC
11408 builtin and then its argument prototype would still apply. */
11409#ifdef __cplusplus
11410extern "C"
11411#endif
11412char opendir ();
11413int
11414main ()
11415{
11416return opendir ();
11417 ;
11418 return 0;
11419}
bec39cab 11420_ACEOF
81ecdfbb
RW
11421for ac_lib in '' dir; do
11422 if test -z "$ac_lib"; then
11423 ac_res="none required"
11424 else
11425 ac_res=-l$ac_lib
11426 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11427 fi
11428 if ac_fn_c_try_link "$LINENO"; then :
11429 ac_cv_search_opendir=$ac_res
11430fi
11431rm -f core conftest.err conftest.$ac_objext \
11432 conftest$ac_exeext
11433 if test "${ac_cv_search_opendir+set}" = set; then :
11434 break
11435fi
11436done
11437if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11438
81ecdfbb
RW
11439else
11440 ac_cv_search_opendir=no
11441fi
11442rm conftest.$ac_ext
11443LIBS=$ac_func_search_save_LIBS
11444fi
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11446$as_echo "$ac_cv_search_opendir" >&6; }
11447ac_res=$ac_cv_search_opendir
11448if test "$ac_res" != no; then :
11449 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11450
bec39cab 11451fi
81ecdfbb 11452
bec39cab 11453else
81ecdfbb
RW
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11455$as_echo_n "checking for library containing opendir... " >&6; }
11456if test "${ac_cv_search_opendir+set}" = set; then :
11457 $as_echo_n "(cached) " >&6
11458else
11459 ac_func_search_save_LIBS=$LIBS
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11461/* end confdefs.h. */
81ecdfbb
RW
11462
11463/* Override any GCC internal prototype to avoid an error.
11464 Use char because int might match the return type of a GCC
11465 builtin and then its argument prototype would still apply. */
11466#ifdef __cplusplus
11467extern "C"
11468#endif
11469char opendir ();
a9322a30
TT
11470int
11471main ()
11472{
81ecdfbb 11473return opendir ();
a9322a30
TT
11474 ;
11475 return 0;
11476}
bec39cab 11477_ACEOF
81ecdfbb
RW
11478for ac_lib in '' x; do
11479 if test -z "$ac_lib"; then
11480 ac_res="none required"
11481 else
11482 ac_res=-l$ac_lib
11483 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11484 fi
11485 if ac_fn_c_try_link "$LINENO"; then :
11486 ac_cv_search_opendir=$ac_res
11487fi
11488rm -f core conftest.err conftest.$ac_objext \
11489 conftest$ac_exeext
11490 if test "${ac_cv_search_opendir+set}" = set; then :
11491 break
11492fi
11493done
11494if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11495
81ecdfbb
RW
11496else
11497 ac_cv_search_opendir=no
bec39cab 11498fi
81ecdfbb
RW
11499rm conftest.$ac_ext
11500LIBS=$ac_func_search_save_LIBS
a9322a30 11501fi
81ecdfbb
RW
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11503$as_echo "$ac_cv_search_opendir" >&6; }
11504ac_res=$ac_cv_search_opendir
11505if test "$ac_res" != no; then :
11506 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11507
81ecdfbb 11508fi
bec39cab 11509
81ecdfbb 11510fi
bec39cab 11511
81ecdfbb
RW
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11513$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11514if test "${ac_cv_header_stat_broken+set}" = set; then :
11515 $as_echo_n "(cached) " >&6
9a156167 11516else
81ecdfbb
RW
11517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518/* end confdefs.h. */
11519#include <sys/types.h>
11520#include <sys/stat.h>
11521
11522#if defined S_ISBLK && defined S_IFDIR
11523extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11524#endif
11525
11526#if defined S_ISBLK && defined S_IFCHR
11527extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11528#endif
11529
11530#if defined S_ISLNK && defined S_IFREG
11531extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11532#endif
11533
11534#if defined S_ISSOCK && defined S_IFREG
11535extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11536#endif
11537
bec39cab 11538_ACEOF
81ecdfbb
RW
11539if ac_fn_c_try_compile "$LINENO"; then :
11540 ac_cv_header_stat_broken=no
11541else
11542 ac_cv_header_stat_broken=yes
11543fi
11544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11545fi
11546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11547$as_echo "$ac_cv_header_stat_broken" >&6; }
11548if test $ac_cv_header_stat_broken = yes; then
9a156167 11549
81ecdfbb 11550$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11551
bec39cab 11552fi
81ecdfbb
RW
11553
11554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11555$as_echo_n "checking for ANSI C header files... " >&6; }
11556if test "${ac_cv_header_stdc+set}" = set; then :
11557 $as_echo_n "(cached) " >&6
bec39cab 11558else
81ecdfbb 11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11560/* end confdefs.h. */
81ecdfbb
RW
11561#include <stdlib.h>
11562#include <stdarg.h>
11563#include <string.h>
11564#include <float.h>
11565
a9322a30
TT
11566int
11567main ()
11568{
a9322a30
TT
11569
11570 ;
11571 return 0;
11572}
bec39cab 11573_ACEOF
81ecdfbb
RW
11574if ac_fn_c_try_compile "$LINENO"; then :
11575 ac_cv_header_stdc=yes
bec39cab 11576else
81ecdfbb 11577 ac_cv_header_stdc=no
a9322a30 11578fi
81ecdfbb 11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11580
81ecdfbb
RW
11581if test $ac_cv_header_stdc = yes; then
11582 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584/* end confdefs.h. */
11585#include <string.h>
bec39cab 11586
81ecdfbb
RW
11587_ACEOF
11588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11589 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11590
bec39cab 11591else
81ecdfbb
RW
11592 ac_cv_header_stdc=no
11593fi
11594rm -f conftest*
11595
11596fi
11597
11598if test $ac_cv_header_stdc = yes; then
11599 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11601/* end confdefs.h. */
11602#include <stdlib.h>
11603
bec39cab 11604_ACEOF
81ecdfbb
RW
11605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11606 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11607
81ecdfbb
RW
11608else
11609 ac_cv_header_stdc=no
11610fi
11611rm -f conftest*
bec39cab 11612
bec39cab 11613fi
81ecdfbb
RW
11614
11615if test $ac_cv_header_stdc = yes; then
11616 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11617 if test "$cross_compiling" = yes; then :
11618 :
bec39cab 11619else
81ecdfbb 11620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11621/* end confdefs.h. */
81ecdfbb
RW
11622#include <ctype.h>
11623#include <stdlib.h>
11624#if ((' ' & 0x0FF) == 0x020)
11625# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11626# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11627#else
11628# define ISLOWER(c) \
11629 (('a' <= (c) && (c) <= 'i') \
11630 || ('j' <= (c) && (c) <= 'r') \
11631 || ('s' <= (c) && (c) <= 'z'))
11632# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11633#endif
11634
11635#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11636int
11637main ()
11638{
81ecdfbb
RW
11639 int i;
11640 for (i = 0; i < 256; i++)
11641 if (XOR (islower (i), ISLOWER (i))
11642 || toupper (i) != TOUPPER (i))
11643 return 2;
a9322a30
TT
11644 return 0;
11645}
bec39cab 11646_ACEOF
81ecdfbb
RW
11647if ac_fn_c_try_run "$LINENO"; then :
11648
bec39cab 11649else
81ecdfbb
RW
11650 ac_cv_header_stdc=no
11651fi
11652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11653 conftest.$ac_objext conftest.beam conftest.$ac_ext
11654fi
bec39cab 11655
bec39cab 11656fi
a9322a30 11657fi
81ecdfbb
RW
11658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11659$as_echo "$ac_cv_header_stdc" >&6; }
11660if test $ac_cv_header_stdc = yes; then
bec39cab 11661
81ecdfbb 11662$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11663
81ecdfbb 11664fi
bec39cab 11665
81ecdfbb
RW
11666# elf_hp.h is for HP/UX 64-bit shared library support.
11667# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11668# unconditionally, so what's the point in checking these?
11669for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11670 thread_db.h gnu/libc-version.h signal.h stddef.h \
11671 stdlib.h string.h memory.h strings.h sys/fault.h \
11672 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11673 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11674 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11675 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 11676 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
b161e06f 11677 dlfcn.h
81ecdfbb
RW
11678do :
11679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11680ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11681eval as_val=\$$as_ac_Header
11682 if test "x$as_val" = x""yes; then :
bec39cab 11683 cat >>confdefs.h <<_ACEOF
81ecdfbb 11684#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11685_ACEOF
c906108c 11686
bec39cab 11687fi
81ecdfbb
RW
11688
11689done
11690
11691for ac_header in link.h
11692do :
11693 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11694# include <sys/types.h>
11695#endif
11696#if HAVE_NLIST_H
11697# include <nlist.h>
a9322a30
TT
11698#endif
11699
81ecdfbb
RW
11700"
11701if test "x$ac_cv_header_link_h" = x""yes; then :
11702 cat >>confdefs.h <<_ACEOF
11703#define HAVE_LINK_H 1
bec39cab 11704_ACEOF
bec39cab 11705
a9322a30 11706fi
bec39cab 11707
81ecdfbb 11708done
c906108c 11709
81ecdfbb
RW
11710for ac_header in sys/proc.h
11711do :
11712 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11713# include <sys/param.h>
11714#endif
c906108c 11715
81ecdfbb
RW
11716"
11717if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11718 cat >>confdefs.h <<_ACEOF
81ecdfbb 11719#define HAVE_SYS_PROC_H 1
bec39cab 11720_ACEOF
5ee754fc 11721
bec39cab 11722fi
81ecdfbb
RW
11723
11724done
11725
11726for ac_header in sys/user.h
11727do :
11728 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11729# include <sys/param.h>
a9322a30
TT
11730#endif
11731
81ecdfbb
RW
11732"
11733if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11734 cat >>confdefs.h <<_ACEOF
11735#define HAVE_SYS_USER_H 1
bec39cab 11736_ACEOF
bec39cab 11737
a9322a30 11738fi
bec39cab 11739
81ecdfbb 11740done
5ee754fc 11741
5ee754fc 11742
81ecdfbb
RW
11743# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11744# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11745# think that we don't have <curses.h> if we're using GCC.
11746case $host_os in
11747 solaris2.[789])
11748 if test "$GCC" = yes; then
11749
11750$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11751
11752 fi ;;
11753esac
11754for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11755do :
11756 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11757ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11758eval as_val=\$$as_ac_Header
11759 if test "x$as_val" = x""yes; then :
bec39cab 11760 cat >>confdefs.h <<_ACEOF
81ecdfbb 11761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11762_ACEOF
5ee754fc
MK
11763
11764fi
11765
81ecdfbb 11766done
bec39cab 11767
81ecdfbb
RW
11768for ac_header in term.h
11769do :
11770 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11771# include <curses.h>
11772#endif
bec39cab 11773
81ecdfbb
RW
11774"
11775if test "x$ac_cv_header_term_h" = x""yes; then :
11776 cat >>confdefs.h <<_ACEOF
11777#define HAVE_TERM_H 1
a8111142 11778_ACEOF
a8111142 11779
a8111142 11780fi
a8111142 11781
81ecdfbb 11782done
a8111142
TT
11783
11784
81ecdfbb
RW
11785# ------------------------- #
11786# Checks for declarations. #
11787# ------------------------- #
a9322a30 11788
81ecdfbb
RW
11789ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11790if test "x$ac_cv_have_decl_free" = x""yes; then :
11791 ac_have_decl=1
bec39cab 11792else
81ecdfbb
RW
11793 ac_have_decl=0
11794fi
11795
11796cat >>confdefs.h <<_ACEOF
11797#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11798_ACEOF
81ecdfbb
RW
11799ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11800if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11801 ac_have_decl=1
11802else
11803 ac_have_decl=0
11804fi
11805
11806cat >>confdefs.h <<_ACEOF
11807#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11808_ACEOF
81ecdfbb
RW
11809ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11810if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11811 ac_have_decl=1
bec39cab 11812else
81ecdfbb
RW
11813 ac_have_decl=0
11814fi
bec39cab 11815
81ecdfbb
RW
11816cat >>confdefs.h <<_ACEOF
11817#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11818_ACEOF
81ecdfbb
RW
11819ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11820if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11821 ac_have_decl=1
11822else
11823 ac_have_decl=0
11824fi
11825
11826cat >>confdefs.h <<_ACEOF
11827#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11828_ACEOF
81ecdfbb
RW
11829ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11830if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11831 ac_have_decl=1
bec39cab 11832else
81ecdfbb
RW
11833 ac_have_decl=0
11834fi
5ee754fc 11835
81ecdfbb
RW
11836cat >>confdefs.h <<_ACEOF
11837#define HAVE_DECL_STRSTR $ac_have_decl
11838_ACEOF
11839ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11840if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11841 ac_have_decl=1
11842else
11843 ac_have_decl=0
5ee754fc 11844fi
81ecdfbb
RW
11845
11846cat >>confdefs.h <<_ACEOF
11847#define HAVE_DECL_GETOPT $ac_have_decl
11848_ACEOF
11849ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11850if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11851 ac_have_decl=1
11852else
11853 ac_have_decl=0
5ee754fc 11854fi
81ecdfbb
RW
11855
11856cat >>confdefs.h <<_ACEOF
11857#define HAVE_DECL_SNPRINTF $ac_have_decl
11858_ACEOF
11859ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11860if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11861 ac_have_decl=1
11862else
11863 ac_have_decl=0
5ee754fc
MK
11864fi
11865
a9322a30 11866cat >>confdefs.h <<_ACEOF
81ecdfbb 11867#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11868_ACEOF
5ee754fc 11869
5ee754fc 11870
81ecdfbb
RW
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11872$as_echo_n "checking for LC_MESSAGES... " >&6; }
11873if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11874 $as_echo_n "(cached) " >&6
bec39cab 11875else
81ecdfbb 11876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11877/* end confdefs.h. */
81ecdfbb 11878#include <locale.h>
a9322a30
TT
11879int
11880main ()
11881{
81ecdfbb 11882return LC_MESSAGES
a9322a30
TT
11883 ;
11884 return 0;
11885}
bec39cab 11886_ACEOF
81ecdfbb
RW
11887if ac_fn_c_try_link "$LINENO"; then :
11888 am_cv_val_LC_MESSAGES=yes
bec39cab 11889else
81ecdfbb
RW
11890 am_cv_val_LC_MESSAGES=no
11891fi
11892rm -f core conftest.err conftest.$ac_objext \
11893 conftest$ac_exeext conftest.$ac_ext
11894fi
11895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11896$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11897 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11898
81ecdfbb
RW
11899$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11900
11901 fi
11902
11903
11904# ----------------------- #
11905# Checks for structures. #
11906# ----------------------- #
11907
11908ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11909if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11910
11911cat >>confdefs.h <<_ACEOF
11912#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11913_ACEOF
7eb368b3 11914
81ecdfbb 11915
7eb368b3 11916fi
81ecdfbb
RW
11917ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11918if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11919
a9322a30
TT
11920cat >>confdefs.h <<_ACEOF
11921#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11922_ACEOF
11923
a9322a30 11924
7eb368b3
NR
11925fi
11926
7eb368b3 11927
a9322a30
TT
11928# ------------------ #
11929# Checks for types. #
11930# ------------------ #
7eb368b3 11931
81ecdfbb
RW
11932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11933$as_echo_n "checking return type of signal handlers... " >&6; }
11934if test "${ac_cv_type_signal+set}" = set; then :
11935 $as_echo_n "(cached) " >&6
bec39cab 11936else
81ecdfbb 11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11938/* end confdefs.h. */
a9322a30
TT
11939#include <sys/types.h>
11940#include <signal.h>
7cb9022a 11941
a9322a30
TT
11942int
11943main ()
11944{
81ecdfbb 11945return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11946 ;
11947 return 0;
11948}
bec39cab 11949_ACEOF
81ecdfbb
RW
11950if ac_fn_c_try_compile "$LINENO"; then :
11951 ac_cv_type_signal=int
bec39cab 11952else
81ecdfbb 11953 ac_cv_type_signal=void
bec39cab 11954fi
81ecdfbb 11955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11956fi
81ecdfbb
RW
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11958$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11959
a9322a30
TT
11960cat >>confdefs.h <<_ACEOF
11961#define RETSIGTYPE $ac_cv_type_signal
11962_ACEOF
5ee754fc 11963
bec39cab 11964
81ecdfbb 11965ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11966#include <sys/socket.h>
11967
81ecdfbb
RW
11968"
11969if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11970
a9322a30
TT
11971cat >>confdefs.h <<_ACEOF
11972#define HAVE_SOCKLEN_T 1
11973_ACEOF
11974
11975
11976fi
11977
11978
11979# ------------------------------------- #
11980# Checks for compiler characteristics. #
11981# ------------------------------------- #
11982
81ecdfbb
RW
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11984$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11985if test "${ac_cv_c_const+set}" = set; then :
11986 $as_echo_n "(cached) " >&6
a9322a30 11987else
81ecdfbb 11988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11989/* end confdefs.h. */
a9322a30
TT
11990
11991int
11992main ()
11993{
11994/* FIXME: Include the comments suggested by Paul. */
11995#ifndef __cplusplus
11996 /* Ultrix mips cc rejects this. */
11997 typedef int charset[2];
81ecdfbb 11998 const charset cs;
a9322a30 11999 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12000 char const *const *pcpcc;
12001 char **ppc;
a9322a30
TT
12002 /* NEC SVR4.0.2 mips cc rejects this. */
12003 struct point {int x, y;};
12004 static struct point const zero = {0,0};
12005 /* AIX XL C 1.02.0.0 rejects this.
12006 It does not let you subtract one const X* pointer from another in
12007 an arm of an if-expression whose if-part is not a constant
12008 expression */
12009 const char *g = "string";
81ecdfbb 12010 pcpcc = &g + (g ? g-g : 0);
a9322a30 12011 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12012 ++pcpcc;
12013 ppc = (char**) pcpcc;
12014 pcpcc = (char const *const *) ppc;
a9322a30
TT
12015 { /* SCO 3.2v4 cc rejects this. */
12016 char *t;
12017 char const *s = 0 ? (char *) 0 : (char const *) 0;
12018
12019 *t++ = 0;
81ecdfbb 12020 if (s) return 0;
a9322a30
TT
12021 }
12022 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12023 int x[] = {25, 17};
12024 const int *foo = &x[0];
12025 ++foo;
12026 }
12027 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12028 typedef const int *iptr;
12029 iptr p = 0;
12030 ++p;
12031 }
12032 { /* AIX XL C 1.02.0.0 rejects this saying
12033 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12034 struct s { int j; const int *ap[3]; };
12035 struct s *b; b->j = 5;
12036 }
12037 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12038 const int foo = 10;
81ecdfbb 12039 if (!foo) return 0;
a9322a30 12040 }
81ecdfbb 12041 return !cs[0] && !zero.x;
a9322a30
TT
12042#endif
12043
12044 ;
12045 return 0;
12046}
bec39cab 12047_ACEOF
81ecdfbb 12048if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12049 ac_cv_c_const=yes
5ee754fc 12050else
81ecdfbb 12051 ac_cv_c_const=no
5ee754fc 12052fi
81ecdfbb 12053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12054fi
81ecdfbb
RW
12055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12056$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12057if test $ac_cv_c_const = no; then
bec39cab 12058
81ecdfbb 12059$as_echo "#define const /**/" >>confdefs.h
bec39cab 12060
5ee754fc 12061fi
bec39cab 12062
81ecdfbb
RW
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12064$as_echo_n "checking for inline... " >&6; }
12065if test "${ac_cv_c_inline+set}" = set; then :
12066 $as_echo_n "(cached) " >&6
bec39cab 12067else
a9322a30
TT
12068 ac_cv_c_inline=no
12069for ac_kw in inline __inline__ __inline; do
81ecdfbb 12070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12071/* end confdefs.h. */
a9322a30
TT
12072#ifndef __cplusplus
12073typedef int foo_t;
12074static $ac_kw foo_t static_foo () {return 0; }
12075$ac_kw foo_t foo () {return 0; }
12076#endif
12077
bec39cab 12078_ACEOF
81ecdfbb
RW
12079if ac_fn_c_try_compile "$LINENO"; then :
12080 ac_cv_c_inline=$ac_kw
bec39cab 12081fi
81ecdfbb
RW
12082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12083 test "$ac_cv_c_inline" != no && break
a9322a30 12084done
bec39cab 12085
5ee754fc 12086fi
81ecdfbb
RW
12087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12088$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12089
a9322a30
TT
12090case $ac_cv_c_inline in
12091 inline | yes) ;;
12092 *)
12093 case $ac_cv_c_inline in
12094 no) ac_val=;;
12095 *) ac_val=$ac_cv_c_inline;;
12096 esac
12097 cat >>confdefs.h <<_ACEOF
12098#ifndef __cplusplus
12099#define inline $ac_val
12100#endif
12101_ACEOF
bec39cab
AC
12102 ;;
12103esac
bec39cab 12104
81ecdfbb
RW
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12106$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12107if test "${ac_cv_c_bigendian+set}" = set; then :
12108 $as_echo_n "(cached) " >&6
bec39cab 12109else
81ecdfbb
RW
12110 ac_cv_c_bigendian=unknown
12111 # See if we're dealing with a universal compiler.
12112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12113/* end confdefs.h. */
12114#ifndef __APPLE_CC__
12115 not a universal capable compiler
12116 #endif
12117 typedef int dummy;
12118
12119_ACEOF
12120if ac_fn_c_try_compile "$LINENO"; then :
12121
12122 # Check for potential -arch flags. It is not universal unless
12123 # there are at least two -arch flags with different values.
12124 ac_arch=
12125 ac_prev=
12126 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12127 if test -n "$ac_prev"; then
12128 case $ac_word in
12129 i?86 | x86_64 | ppc | ppc64)
12130 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12131 ac_arch=$ac_word
12132 else
12133 ac_cv_c_bigendian=universal
12134 break
12135 fi
12136 ;;
12137 esac
12138 ac_prev=
12139 elif test "x$ac_word" = "x-arch"; then
12140 ac_prev=arch
12141 fi
12142 done
12143fi
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145 if test $ac_cv_c_bigendian = unknown; then
12146 # See if sys/param.h defines the BYTE_ORDER macro.
12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12148/* end confdefs.h. */
a9322a30 12149#include <sys/types.h>
81ecdfbb 12150 #include <sys/param.h>
a9322a30
TT
12151
12152int
12153main ()
12154{
81ecdfbb
RW
12155#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12156 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12157 && LITTLE_ENDIAN)
12158 bogus endian macros
12159 #endif
a9322a30
TT
12160
12161 ;
12162 return 0;
12163}
bec39cab 12164_ACEOF
81ecdfbb 12165if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12166 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12168/* end confdefs.h. */
a9322a30 12169#include <sys/types.h>
81ecdfbb 12170 #include <sys/param.h>
a9322a30
TT
12171
12172int
12173main ()
12174{
12175#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12176 not big endian
12177 #endif
a9322a30
TT
12178
12179 ;
12180 return 0;
12181}
bec39cab 12182_ACEOF
81ecdfbb 12183if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12184 ac_cv_c_bigendian=yes
5ee754fc 12185else
81ecdfbb 12186 ac_cv_c_bigendian=no
5ee754fc 12187fi
81ecdfbb
RW
12188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12189fi
12190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12191 fi
12192 if test $ac_cv_c_bigendian = unknown; then
12193 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195/* end confdefs.h. */
12196#include <limits.h>
bec39cab 12197
81ecdfbb
RW
12198int
12199main ()
12200{
12201#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12202 bogus endian macros
12203 #endif
12204
12205 ;
12206 return 0;
12207}
7eb368b3 12208_ACEOF
81ecdfbb
RW
12209if ac_fn_c_try_compile "$LINENO"; then :
12210 # It does; now see whether it defined to _BIG_ENDIAN or not.
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12212/* end confdefs.h. */
81ecdfbb
RW
12213#include <limits.h>
12214
7eb368b3
NR
12215int
12216main ()
12217{
81ecdfbb
RW
12218#ifndef _BIG_ENDIAN
12219 not big endian
12220 #endif
12221
7eb368b3
NR
12222 ;
12223 return 0;
12224}
12225_ACEOF
81ecdfbb 12226if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12227 ac_cv_c_bigendian=yes
81ecdfbb
RW
12228else
12229 ac_cv_c_bigendian=no
a9322a30 12230fi
81ecdfbb 12231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12232fi
81ecdfbb
RW
12233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12234 fi
12235 if test $ac_cv_c_bigendian = unknown; then
12236 # Compile a test program.
12237 if test "$cross_compiling" = yes; then :
12238 # Try to guess by grepping values from an object file.
12239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12240/* end confdefs.h. */
12241short int ascii_mm[] =
12242 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12243 short int ascii_ii[] =
12244 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12245 int use_ascii (int i) {
12246 return ascii_mm[i] + ascii_ii[i];
12247 }
12248 short int ebcdic_ii[] =
12249 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12250 short int ebcdic_mm[] =
12251 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12252 int use_ebcdic (int i) {
12253 return ebcdic_mm[i] + ebcdic_ii[i];
12254 }
12255 extern int foo;
7eb368b3 12256
81ecdfbb
RW
12257int
12258main ()
12259{
12260return use_ascii (foo) == use_ebcdic (foo);
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265if ac_fn_c_try_compile "$LINENO"; then :
12266 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12267 ac_cv_c_bigendian=yes
12268 fi
12269 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12270 if test "$ac_cv_c_bigendian" = unknown; then
12271 ac_cv_c_bigendian=no
12272 else
12273 # finding both strings is unlikely to happen, but who knows?
12274 ac_cv_c_bigendian=unknown
12275 fi
12276 fi
7eb368b3 12277fi
81ecdfbb 12278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12279else
81ecdfbb 12280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12281/* end confdefs.h. */
81ecdfbb 12282$ac_includes_default
d3ea6809
MM
12283int
12284main ()
12285{
81ecdfbb
RW
12286
12287 /* Are we little or big endian? From Harbison&Steele. */
12288 union
12289 {
12290 long int l;
12291 char c[sizeof (long int)];
12292 } u;
12293 u.l = 1;
12294 return u.c[sizeof (long int) - 1] == 1;
12295
12296 ;
12297 return 0;
d3ea6809
MM
12298}
12299_ACEOF
81ecdfbb 12300if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12301 ac_cv_c_bigendian=no
d3ea6809 12302else
81ecdfbb 12303 ac_cv_c_bigendian=yes
d3ea6809 12304fi
81ecdfbb
RW
12305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12306 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12307fi
a9322a30 12308
81ecdfbb
RW
12309 fi
12310fi
12311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12312$as_echo "$ac_cv_c_bigendian" >&6; }
12313 case $ac_cv_c_bigendian in #(
12314 yes)
12315 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12316;; #(
12317 no)
12318 ;; #(
12319 universal)
12320
12321$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12322
12323 ;; #(
12324 *)
12325 as_fn_error "unknown endianness
12326 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12327 esac
d3ea6809
MM
12328
12329
a9322a30
TT
12330# ------------------------------ #
12331# Checks for library functions. #
12332# ------------------------------ #
d3ea6809 12333
a9322a30
TT
12334# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12335# for constant arguments. Useless!
81ecdfbb
RW
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12337$as_echo_n "checking for working alloca.h... " >&6; }
12338if test "${ac_cv_working_alloca_h+set}" = set; then :
12339 $as_echo_n "(cached) " >&6
d3ea6809 12340else
81ecdfbb 12341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12342/* end confdefs.h. */
a9322a30 12343#include <alloca.h>
bec39cab
AC
12344int
12345main ()
12346{
a9322a30 12347char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12348 if (p) return 0;
bec39cab
AC
12349 ;
12350 return 0;
12351}
12352_ACEOF
81ecdfbb 12353if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12354 ac_cv_working_alloca_h=yes
bec39cab 12355else
81ecdfbb 12356 ac_cv_working_alloca_h=no
bec39cab 12357fi
81ecdfbb
RW
12358rm -f core conftest.err conftest.$ac_objext \
12359 conftest$ac_exeext conftest.$ac_ext
bec39cab 12360fi
81ecdfbb
RW
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12362$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12363if test $ac_cv_working_alloca_h = yes; then
12364
81ecdfbb 12365$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12366
c906108c 12367fi
bec39cab 12368
81ecdfbb
RW
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12370$as_echo_n "checking for alloca... " >&6; }
12371if test "${ac_cv_func_alloca_works+set}" = set; then :
12372 $as_echo_n "(cached) " >&6
bec39cab 12373else
81ecdfbb 12374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12375/* end confdefs.h. */
a9322a30
TT
12376#ifdef __GNUC__
12377# define alloca __builtin_alloca
b4e70030 12378#else
a9322a30
TT
12379# ifdef _MSC_VER
12380# include <malloc.h>
12381# define alloca _alloca
12382# else
81ecdfbb 12383# ifdef HAVE_ALLOCA_H
a9322a30
TT
12384# include <alloca.h>
12385# else
12386# ifdef _AIX
12387 #pragma alloca
12388# else
12389# ifndef alloca /* predefined by HP cc +Olibcalls */
12390char *alloca ();
12391# endif
12392# endif
12393# endif
12394# endif
c906108c 12395#endif
97bf5e38 12396
bec39cab
AC
12397int
12398main ()
12399{
a9322a30 12400char *p = (char *) alloca (1);
81ecdfbb 12401 if (p) return 0;
bec39cab
AC
12402 ;
12403 return 0;
12404}
12405_ACEOF
81ecdfbb 12406if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12407 ac_cv_func_alloca_works=yes
bec39cab 12408else
81ecdfbb 12409 ac_cv_func_alloca_works=no
bec39cab 12410fi
81ecdfbb
RW
12411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
bec39cab 12413fi
81ecdfbb
RW
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12415$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12416
12417if test $ac_cv_func_alloca_works = yes; then
12418
81ecdfbb 12419$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12420
a9322a30
TT
12421else
12422 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12423# that cause trouble. Some versions do not even contain alloca or
12424# contain a buggy version. If you still want to use their alloca,
12425# use ar to extract alloca.o from them instead of compiling alloca.c.
12426
81ecdfbb 12427ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12428
81ecdfbb 12429$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12430
bec39cab 12431
81ecdfbb
RW
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12433$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12434if test "${ac_cv_os_cray+set}" = set; then :
12435 $as_echo_n "(cached) " >&6
a9322a30 12436else
81ecdfbb 12437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12438/* end confdefs.h. */
81ecdfbb 12439#if defined CRAY && ! defined CRAY2
a9322a30
TT
12440webecray
12441#else
12442wenotbecray
12443#endif
12444
12445_ACEOF
12446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12447 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12448 ac_cv_os_cray=yes
12449else
81ecdfbb 12450 ac_cv_os_cray=no
bec39cab 12451fi
81ecdfbb
RW
12452rm -f conftest*
12453
bec39cab 12454fi
81ecdfbb
RW
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12456$as_echo "$ac_cv_os_cray" >&6; }
12457if test $ac_cv_os_cray = yes; then
12458 for ac_func in _getb67 GETB67 getb67; do
12459 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12461eval as_val=\$$as_ac_var
12462 if test "x$as_val" = x""yes; then :
a9322a30
TT
12463
12464cat >>confdefs.h <<_ACEOF
12465#define CRAY_STACKSEG_END $ac_func
bec39cab 12466_ACEOF
c906108c 12467
a9322a30 12468 break
c906108c
SS
12469fi
12470
a9322a30
TT
12471 done
12472fi
bec39cab 12473
81ecdfbb
RW
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12475$as_echo_n "checking stack direction for C alloca... " >&6; }
12476if test "${ac_cv_c_stack_direction+set}" = set; then :
12477 $as_echo_n "(cached) " >&6
a9322a30 12478else
81ecdfbb 12479 if test "$cross_compiling" = yes; then :
a9322a30 12480 ac_cv_c_stack_direction=0
bec39cab 12481else
81ecdfbb 12482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12483/* end confdefs.h. */
81ecdfbb 12484$ac_includes_default
a9322a30
TT
12485int
12486find_stack_direction ()
b4e70030 12487{
a9322a30
TT
12488 static char *addr = 0;
12489 auto char dummy;
12490 if (addr == 0)
12491 {
12492 addr = &dummy;
12493 return find_stack_direction ();
12494 }
12495 else
12496 return (&dummy > addr) ? 1 : -1;
b4e70030 12497}
b757528f 12498
bec39cab
AC
12499int
12500main ()
12501{
81ecdfbb 12502 return find_stack_direction () < 0;
bec39cab
AC
12503}
12504_ACEOF
81ecdfbb 12505if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12506 ac_cv_c_stack_direction=1
12507else
81ecdfbb 12508 ac_cv_c_stack_direction=-1
a9322a30 12509fi
81ecdfbb
RW
12510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12511 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12512fi
a9322a30 12513
81ecdfbb
RW
12514fi
12515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12516$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12517cat >>confdefs.h <<_ACEOF
12518#define STACK_DIRECTION $ac_cv_c_stack_direction
12519_ACEOF
12520
12521
12522fi
12523
a9322a30 12524for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12525do :
12526 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12527ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12528eval as_val=\$$as_ac_Header
12529 if test "x$as_val" = x""yes; then :
bec39cab 12530 cat >>confdefs.h <<_ACEOF
81ecdfbb 12531#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12532_ACEOF
b757528f 12533
b757528f 12534fi
bec39cab 12535
a9322a30 12536done
a3828db0 12537
a9322a30 12538for ac_func in getpagesize
81ecdfbb
RW
12539do :
12540 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12541if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12542 cat >>confdefs.h <<_ACEOF
81ecdfbb 12543#define HAVE_GETPAGESIZE 1
bec39cab 12544_ACEOF
bcb3dc3d 12545
bcb3dc3d
MK
12546fi
12547done
12548
81ecdfbb
RW
12549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12550$as_echo_n "checking for working mmap... " >&6; }
12551if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12552 $as_echo_n "(cached) " >&6
a9322a30 12553else
81ecdfbb 12554 if test "$cross_compiling" = yes; then :
a9322a30 12555 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12556else
81ecdfbb 12557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12558/* end confdefs.h. */
a9322a30
TT
12559$ac_includes_default
12560/* malloc might have been renamed as rpl_malloc. */
12561#undef malloc
bec39cab 12562
a9322a30
TT
12563/* Thanks to Mike Haertel and Jim Avera for this test.
12564 Here is a matrix of mmap possibilities:
12565 mmap private not fixed
12566 mmap private fixed at somewhere currently unmapped
12567 mmap private fixed at somewhere already mapped
12568 mmap shared not fixed
12569 mmap shared fixed at somewhere currently unmapped
12570 mmap shared fixed at somewhere already mapped
12571 For private mappings, we should verify that changes cannot be read()
12572 back from the file, nor mmap's back from the file at a different
12573 address. (There have been systems where private was not correctly
12574 implemented like the infamous i386 svr4.0, and systems where the
12575 VM page cache was not coherent with the file system buffer cache
12576 like early versions of FreeBSD and possibly contemporary NetBSD.)
12577 For shared mappings, we should conversely verify that changes get
12578 propagated back to all the places they're supposed to be.
bec39cab 12579
a9322a30
TT
12580 Grep wants private fixed already mapped.
12581 The main things grep needs to know about mmap are:
12582 * does it exist and is it safe to write into the mmap'd area
12583 * how to use it (BSD variants) */
8b9cf735 12584
a9322a30
TT
12585#include <fcntl.h>
12586#include <sys/mman.h>
8b9cf735 12587
81ecdfbb 12588#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12589char *malloc ();
a3828db0
MK
12590#endif
12591
a9322a30 12592/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12593#ifndef HAVE_GETPAGESIZE
a9322a30 12594/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12595# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12596# define HAVE_SYS_PARAM_H 1
12597# endif
12598
12599# ifdef _SC_PAGESIZE
12600# define getpagesize() sysconf(_SC_PAGESIZE)
12601# else /* no _SC_PAGESIZE */
81ecdfbb 12602# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12603# include <sys/param.h>
12604# ifdef EXEC_PAGESIZE
12605# define getpagesize() EXEC_PAGESIZE
12606# else /* no EXEC_PAGESIZE */
12607# ifdef NBPG
12608# define getpagesize() NBPG * CLSIZE
12609# ifndef CLSIZE
12610# define CLSIZE 1
12611# endif /* no CLSIZE */
12612# else /* no NBPG */
12613# ifdef NBPC
12614# define getpagesize() NBPC
12615# else /* no NBPC */
12616# ifdef PAGESIZE
12617# define getpagesize() PAGESIZE
12618# endif /* PAGESIZE */
12619# endif /* no NBPC */
12620# endif /* no NBPG */
12621# endif /* no EXEC_PAGESIZE */
12622# else /* no HAVE_SYS_PARAM_H */
12623# define getpagesize() 8192 /* punt totally */
12624# endif /* no HAVE_SYS_PARAM_H */
12625# endif /* no _SC_PAGESIZE */
12626
12627#endif /* no HAVE_GETPAGESIZE */
12628
bec39cab
AC
12629int
12630main ()
12631{
a9322a30
TT
12632 char *data, *data2, *data3;
12633 int i, pagesize;
12634 int fd;
12635
12636 pagesize = getpagesize ();
12637
12638 /* First, make a file with some known garbage in it. */
12639 data = (char *) malloc (pagesize);
12640 if (!data)
81ecdfbb 12641 return 1;
a9322a30
TT
12642 for (i = 0; i < pagesize; ++i)
12643 *(data + i) = rand ();
12644 umask (0);
12645 fd = creat ("conftest.mmap", 0600);
12646 if (fd < 0)
81ecdfbb 12647 return 1;
a9322a30 12648 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12649 return 1;
a9322a30
TT
12650 close (fd);
12651
12652 /* Next, try to mmap the file at a fixed address which already has
12653 something else allocated at it. If we can, also make sure that
12654 we see the same garbage. */
12655 fd = open ("conftest.mmap", O_RDWR);
12656 if (fd < 0)
81ecdfbb 12657 return 1;
a9322a30
TT
12658 data2 = (char *) malloc (2 * pagesize);
12659 if (!data2)
81ecdfbb
RW
12660 return 1;
12661 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12662 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12663 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12664 return 1;
a9322a30
TT
12665 for (i = 0; i < pagesize; ++i)
12666 if (*(data + i) != *(data2 + i))
81ecdfbb 12667 return 1;
a9322a30
TT
12668
12669 /* Finally, make sure that changes to the mapped area do not
12670 percolate back to the file as seen by read(). (This is a bug on
12671 some variants of i386 svr4.0.) */
12672 for (i = 0; i < pagesize; ++i)
12673 *(data2 + i) = *(data2 + i) + 1;
12674 data3 = (char *) malloc (pagesize);
12675 if (!data3)
81ecdfbb 12676 return 1;
a9322a30 12677 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12678 return 1;
a9322a30
TT
12679 for (i = 0; i < pagesize; ++i)
12680 if (*(data + i) != *(data3 + i))
81ecdfbb 12681 return 1;
a9322a30 12682 close (fd);
81ecdfbb 12683 return 0;
bec39cab
AC
12684}
12685_ACEOF
81ecdfbb 12686if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12687 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12688else
81ecdfbb 12689 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12690fi
81ecdfbb
RW
12691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12692 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12693fi
81ecdfbb 12694
a9322a30 12695fi
81ecdfbb
RW
12696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12697$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12698if test $ac_cv_func_mmap_fixed_mapped = yes; then
12699
81ecdfbb 12700$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12701
086ec9eb 12702fi
a9322a30 12703rm -f conftest.mmap
a3828db0 12704
81ecdfbb
RW
12705ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12706if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12707
a9322a30
TT
12708else
12709
12710cat >>confdefs.h <<_ACEOF
12711#define pid_t int
bec39cab 12712_ACEOF
086ec9eb
MK
12713
12714fi
12715
81ecdfbb
RW
12716for ac_header in vfork.h
12717do :
12718 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12719if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12720 cat >>confdefs.h <<_ACEOF
81ecdfbb 12721#define HAVE_VFORK_H 1
bec39cab 12722_ACEOF
c906108c
SS
12723
12724fi
a9322a30 12725
a3828db0 12726done
c906108c 12727
a9322a30 12728for ac_func in fork vfork
81ecdfbb
RW
12729do :
12730 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12731ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12732eval as_val=\$$as_ac_var
12733 if test "x$as_val" = x""yes; then :
a3828db0 12734 cat >>confdefs.h <<_ACEOF
81ecdfbb 12735#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12736_ACEOF
b83266a0 12737
97bf5e38 12738fi
a3828db0 12739done
b83266a0 12740
a9322a30 12741if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12743$as_echo_n "checking for working fork... " >&6; }
12744if test "${ac_cv_func_fork_works+set}" = set; then :
12745 $as_echo_n "(cached) " >&6
a9322a30 12746else
81ecdfbb 12747 if test "$cross_compiling" = yes; then :
a9322a30
TT
12748 ac_cv_func_fork_works=cross
12749else
81ecdfbb
RW
12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752$ac_includes_default
12753int
12754main ()
12755{
12756
12757 /* By Ruediger Kuhlmann. */
12758 return fork () < 0;
12759
12760 ;
12761 return 0;
12762}
a9322a30 12763_ACEOF
81ecdfbb 12764if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12765 ac_cv_func_fork_works=yes
12766else
81ecdfbb 12767 ac_cv_func_fork_works=no
a9322a30 12768fi
81ecdfbb
RW
12769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12770 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12771fi
81ecdfbb 12772
a9322a30 12773fi
81ecdfbb
RW
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12775$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12776
12777else
12778 ac_cv_func_fork_works=$ac_cv_func_fork
12779fi
12780if test "x$ac_cv_func_fork_works" = xcross; then
12781 case $host in
12782 *-*-amigaos* | *-*-msdosdjgpp*)
12783 # Override, as these systems have only a dummy fork() stub
12784 ac_cv_func_fork_works=no
12785 ;;
12786 *)
12787 ac_cv_func_fork_works=yes
12788 ;;
12789 esac
81ecdfbb
RW
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12791$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12792fi
12793ac_cv_func_vfork_works=$ac_cv_func_vfork
12794if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12796$as_echo_n "checking for working vfork... " >&6; }
12797if test "${ac_cv_func_vfork_works+set}" = set; then :
12798 $as_echo_n "(cached) " >&6
a9322a30 12799else
81ecdfbb 12800 if test "$cross_compiling" = yes; then :
a9322a30
TT
12801 ac_cv_func_vfork_works=cross
12802else
81ecdfbb 12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12804/* end confdefs.h. */
12805/* Thanks to Paul Eggert for this test. */
81ecdfbb 12806$ac_includes_default
a9322a30 12807#include <sys/wait.h>
81ecdfbb 12808#ifdef HAVE_VFORK_H
a9322a30
TT
12809# include <vfork.h>
12810#endif
12811/* On some sparc systems, changes by the child to local and incoming
12812 argument registers are propagated back to the parent. The compiler
12813 is told about this with #include <vfork.h>, but some compilers
12814 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12815 static variable whose address is put into a register that is
12816 clobbered by the vfork. */
12817static void
12818#ifdef __cplusplus
12819sparc_address_test (int arg)
12820# else
12821sparc_address_test (arg) int arg;
12822#endif
12823{
12824 static pid_t child;
12825 if (!child) {
12826 child = vfork ();
12827 if (child < 0) {
12828 perror ("vfork");
12829 _exit(2);
12830 }
12831 if (!child) {
12832 arg = getpid();
12833 write(-1, "", 0);
12834 _exit (arg);
12835 }
12836 }
12837}
12838
12839int
12840main ()
12841{
12842 pid_t parent = getpid ();
12843 pid_t child;
12844
12845 sparc_address_test (0);
12846
12847 child = vfork ();
12848
12849 if (child == 0) {
12850 /* Here is another test for sparc vfork register problems. This
12851 test uses lots of local variables, at least as many local
12852 variables as main has allocated so far including compiler
12853 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12854 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12855 reuse the register of parent for one of the local variables,
12856 since it will think that parent can't possibly be used any more
12857 in this routine. Assigning to the local variable will thus
12858 munge parent in the parent process. */
12859 pid_t
12860 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12861 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12862 /* Convince the compiler that p..p7 are live; otherwise, it might
12863 use the same hardware register for all 8 local variables. */
12864 if (p != p1 || p != p2 || p != p3 || p != p4
12865 || p != p5 || p != p6 || p != p7)
12866 _exit(1);
12867
12868 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12869 from child file descriptors. If the child closes a descriptor
12870 before it execs or exits, this munges the parent's descriptor
12871 as well. Test for this by closing stdout in the child. */
12872 _exit(close(fileno(stdout)) != 0);
12873 } else {
12874 int status;
12875 struct stat st;
12876
12877 while (wait(&status) != child)
12878 ;
81ecdfbb 12879 return (
a9322a30
TT
12880 /* Was there some problem with vforking? */
12881 child < 0
12882
12883 /* Did the child fail? (This shouldn't happen.) */
12884 || status
12885
12886 /* Did the vfork/compiler bug occur? */
12887 || parent != getpid()
12888
12889 /* Did the file descriptor bug occur? */
12890 || fstat(fileno(stdout), &st) != 0
12891 );
12892 }
12893}
12894_ACEOF
81ecdfbb 12895if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12896 ac_cv_func_vfork_works=yes
12897else
81ecdfbb 12898 ac_cv_func_vfork_works=no
a9322a30 12899fi
81ecdfbb
RW
12900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12901 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12902fi
81ecdfbb 12903
a9322a30 12904fi
81ecdfbb
RW
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12906$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12907
12908fi;
12909if test "x$ac_cv_func_fork_works" = xcross; then
12910 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12912$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12913fi
12914
12915if test "x$ac_cv_func_vfork_works" = xyes; then
12916
81ecdfbb 12917$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12918
12919else
12920
81ecdfbb 12921$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12922
12923fi
12924if test "x$ac_cv_func_fork_works" = xyes; then
12925
81ecdfbb 12926$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12927
12928fi
12929
7313baad 12930for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 12931 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 12932 sbrk setpgid setpgrp setsid \
a9322a30 12933 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12934 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 12935 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
12936do :
12937 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12938ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12939eval as_val=\$$as_ac_var
12940 if test "x$as_val" = x""yes; then :
6c7a06a3 12941 cat >>confdefs.h <<_ACEOF
81ecdfbb 12942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12943_ACEOF
12944
12945fi
12946done
12947
12948
81ecdfbb
RW
12949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12950$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12951if test "${am_cv_langinfo_codeset+set}" = set; then :
12952 $as_echo_n "(cached) " >&6
6c7a06a3 12953else
81ecdfbb 12954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12955/* end confdefs.h. */
12956#include <langinfo.h>
12957int
12958main ()
12959{
12960char* cs = nl_langinfo(CODESET);
bec39cab
AC
12961 ;
12962 return 0;
12963}
12964_ACEOF
81ecdfbb 12965if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12966 am_cv_langinfo_codeset=yes
a4db0f07 12967else
81ecdfbb 12968 am_cv_langinfo_codeset=no
a4db0f07 12969fi
81ecdfbb
RW
12970rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12972
a4db0f07 12973fi
81ecdfbb
RW
12974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12975$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12976 if test $am_cv_langinfo_codeset = yes; then
12977
81ecdfbb 12978$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12979
6c7a06a3 12980 fi
c906108c 12981
06825bd1 12982
a3828db0
MK
12983# Check the return and argument types of ptrace. No canned test for
12984# this, so roll our own.
12985gdb_ptrace_headers='
12986#if HAVE_SYS_TYPES_H
12987# include <sys/types.h>
12988#endif
12989#if HAVE_SYS_PTRACE_H
12990# include <sys/ptrace.h>
12991#endif
12992#if HAVE_UNISTD_H
12993# include <unistd.h>
12994#endif
12995'
12996# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12997ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12998"
12999if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13000 ac_have_decl=1
06825bd1 13001else
81ecdfbb 13002 ac_have_decl=0
06825bd1 13003fi
06825bd1 13004
a3828db0 13005cat >>confdefs.h <<_ACEOF
81ecdfbb 13006#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13007_ACEOF
81ecdfbb 13008if test $ac_have_decl = 1; then :
bec39cab 13009
a3828db0 13010else
a3828db0
MK
13011
13012 : ${gdb_cv_func_ptrace_ret='int'}
13013 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13014
06825bd1
MK
13015fi
13016
064ef605
DJ
13017# Check return type. Varargs (used on GNU/Linux) conflict with the
13018# empty argument list, so check for that explicitly.
81ecdfbb
RW
13019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13020$as_echo_n "checking return type of ptrace... " >&6; }
13021if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13022 $as_echo_n "(cached) " >&6
bec39cab 13023else
81ecdfbb 13024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13025/* end confdefs.h. */
a3828db0 13026$gdb_ptrace_headers
bec39cab
AC
13027int
13028main ()
13029{
064ef605
DJ
13030extern long ptrace (enum __ptrace_request, ...);
13031 ;
13032 return 0;
13033}
13034_ACEOF
81ecdfbb 13035if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13036 gdb_cv_func_ptrace_ret='long'
13037else
81ecdfbb 13038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13039/* end confdefs.h. */
13040$gdb_ptrace_headers
13041int
13042main ()
13043{
a3828db0 13044extern int ptrace ();
bec39cab
AC
13045 ;
13046 return 0;
13047}
13048_ACEOF
81ecdfbb 13049if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13050 gdb_cv_func_ptrace_ret='int'
70f9f479 13051else
81ecdfbb 13052 gdb_cv_func_ptrace_ret='long'
70f9f479 13053fi
81ecdfbb 13054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13055fi
81ecdfbb 13056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13057fi
81ecdfbb
RW
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13059$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13060
a3828db0
MK
13061cat >>confdefs.h <<_ACEOF
13062#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13063_ACEOF
70f9f479 13064
a3828db0 13065# Check argument types.
81ecdfbb
RW
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13067$as_echo_n "checking types of arguments for ptrace... " >&6; }
13068if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13069 $as_echo_n "(cached) " >&6
bec39cab 13070else
a3828db0 13071
81ecdfbb 13072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13073/* end confdefs.h. */
13074$gdb_ptrace_headers
13075int
13076main ()
13077{
13078extern long ptrace (enum __ptrace_request, ...);
13079 ;
13080 return 0;
13081}
13082_ACEOF
81ecdfbb 13083if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13084 gdb_cv_func_ptrace_args='int,int,long,long'
13085else
064ef605 13086
a3828db0
MK
13087for gdb_arg1 in 'int' 'long'; do
13088 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13089 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 13090 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 13091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13092/* end confdefs.h. */
a3828db0 13093$gdb_ptrace_headers
bec39cab
AC
13094int
13095main ()
13096{
a3828db0
MK
13097
13098extern $gdb_cv_func_ptrace_ret
13099 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13100
bec39cab
AC
13101 ;
13102 return 0;
13103}
13104_ACEOF
81ecdfbb 13105if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13106 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13107 break 4;
5c7f2947 13108fi
81ecdfbb 13109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13110 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13112/* end confdefs.h. */
a3828db0 13113$gdb_ptrace_headers
bec39cab
AC
13114int
13115main ()
13116{
a3828db0
MK
13117
13118extern $gdb_cv_func_ptrace_ret
13119 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13120
bec39cab
AC
13121 ;
13122 return 0;
13123}
13124_ACEOF
81ecdfbb 13125if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13126
13127gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13128 break 5;
78434e59 13129fi
81ecdfbb 13130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13131 done
13132 done
13133 done
13134 done
13135done
13136# Provide a safe default value.
13137: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13138
064ef605 13139fi
81ecdfbb 13140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13141fi
81ecdfbb
RW
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13143$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13144ac_save_IFS=$IFS; IFS=','
13145set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13146IFS=$ac_save_IFS
13147shift
bec39cab 13148
a3828db0
MK
13149cat >>confdefs.h <<_ACEOF
13150#define PTRACE_TYPE_ARG3 $3
13151_ACEOF
13152
13153if test -n "$5"; then
13154
13155cat >>confdefs.h <<_ACEOF
13156#define PTRACE_TYPE_ARG5 $5
bec39cab 13157_ACEOF
78434e59
MK
13158
13159fi
13160
a3828db0 13161if test "$cross_compiling" = no; then
81ecdfbb
RW
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13163$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13164if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13165 $as_echo_n "(cached) " >&6
a3828db0 13166else
81ecdfbb
RW
13167 if test "$cross_compiling" = yes; then :
13168 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13169else
81ecdfbb 13170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13171/* end confdefs.h. */
81ecdfbb 13172$ac_includes_default
bec39cab
AC
13173int
13174main ()
13175{
a3828db0
MK
13176/* If this system has a BSD-style setpgrp which takes arguments,
13177 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13178 exit successfully. */
81ecdfbb 13179 return setpgrp (1,1) != -1;
bec39cab
AC
13180 ;
13181 return 0;
13182}
13183_ACEOF
81ecdfbb 13184if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13185 ac_cv_func_setpgrp_void=no
c906108c 13186else
81ecdfbb 13187 ac_cv_func_setpgrp_void=yes
c906108c 13188fi
81ecdfbb
RW
13189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13190 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13191fi
81ecdfbb 13192
a3828db0 13193fi
81ecdfbb
RW
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13195$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13196if test $ac_cv_func_setpgrp_void = yes; then
13197
81ecdfbb 13198$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13199
13200fi
a3828db0
MK
13201
13202else
81ecdfbb
RW
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13204$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13205if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13206 $as_echo_n "(cached) " >&6
97bf5e38 13207else
81ecdfbb 13208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13209/* end confdefs.h. */
a3828db0
MK
13210
13211#include <unistd.h>
13212
bec39cab
AC
13213int
13214main ()
13215{
a3828db0
MK
13216
13217 if (setpgrp(1,1) == -1)
13218 exit (0);
13219 else
13220 exit (1);
13221
bec39cab
AC
13222 ;
13223 return 0;
13224}
13225_ACEOF
81ecdfbb 13226if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13227 ac_cv_func_setpgrp_void=no
c906108c 13228else
81ecdfbb 13229 ac_cv_func_setpgrp_void=yes
c906108c 13230fi
81ecdfbb 13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13232fi
81ecdfbb
RW
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13234$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13235if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13236 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13237
a3828db0 13238fi
c906108c
SS
13239fi
13240
a3828db0
MK
13241# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13242# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13244$as_echo_n "checking for sigsetjmp... " >&6; }
13245if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13246 $as_echo_n "(cached) " >&6
bec39cab 13247else
81ecdfbb 13248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13249/* end confdefs.h. */
a3828db0
MK
13250
13251#include <setjmp.h>
13252
bec39cab
AC
13253int
13254main ()
13255{
a3828db0 13256sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13257 ;
13258 return 0;
13259}
13260_ACEOF
81ecdfbb 13261if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13262 gdb_cv_func_sigsetjmp=yes
c906108c 13263else
81ecdfbb 13264 gdb_cv_func_sigsetjmp=no
c906108c 13265fi
81ecdfbb 13266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13267fi
81ecdfbb
RW
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13269$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13270if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13271
81ecdfbb 13272$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13273
97bf5e38 13274fi
c906108c 13275
a3828db0
MK
13276# Assume we'll default to using the included libiberty regex.
13277gdb_use_included_regex=yes
13278
13279# However, if the system regex is GNU regex, then default to *not*
13280# using the included regex.
81ecdfbb
RW
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13282$as_echo_n "checking for GNU regex... " >&6; }
13283if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13284 $as_echo_n "(cached) " >&6
bec39cab 13285else
81ecdfbb 13286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13287/* end confdefs.h. */
a3828db0 13288#include <gnu-versions.h>
bec39cab
AC
13289int
13290main ()
13291{
81ecdfbb
RW
13292#define REGEX_INTERFACE_VERSION 1
13293#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13294# error "Version mismatch"
13295#endif
5c45e068
MK
13296 ;
13297 return 0;
13298}
13299_ACEOF
81ecdfbb
RW
13300if ac_fn_c_try_compile "$LINENO"; then :
13301 gdb_cv_have_gnu_regex=yes
5c45e068 13302else
81ecdfbb
RW
13303 gdb_cv_have_gnu_regex=no
13304fi
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306fi
13307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13308$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13309if test $gdb_cv_have_gnu_regex = yes; then
13310 gdb_use_included_regex=no
5c45e068 13311fi
81ecdfbb
RW
13312
13313
13314# Check whether --with-included-regex was given.
13315if test "${with_included_regex+set}" = set; then :
13316 withval=$with_included_regex; gdb_with_regex=$withval
13317else
13318 gdb_with_regex=$gdb_use_included_regex
c906108c 13319fi
81ecdfbb
RW
13320
13321if test "$gdb_with_regex" = yes; then
13322
13323$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13324
c906108c 13325fi
81ecdfbb
RW
13326
13327# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13328ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13329#include <sys/proc.h>
13330
13331"
13332if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13333
5c45e068 13334cat >>confdefs.h <<_ACEOF
a3828db0 13335#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13336_ACEOF
c906108c 13337
5c45e068 13338
97bf5e38 13339fi
c906108c 13340
5c45e068 13341
a3828db0 13342# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13344$as_echo_n "checking for struct lwp... " >&6; }
13345if test "${gdb_cv_struct_lwp+set}" = set; then :
13346 $as_echo_n "(cached) " >&6
bec39cab 13347else
81ecdfbb 13348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13349/* end confdefs.h. */
a3828db0
MK
13350#include <sys/param.h>
13351#include <sys/lwp.h>
bec39cab
AC
13352int
13353main ()
13354{
a3828db0 13355struct lwp l;
bec39cab
AC
13356 ;
13357 return 0;
13358}
13359_ACEOF
81ecdfbb 13360if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13361 gdb_cv_struct_lwp=yes
c906108c 13362else
81ecdfbb 13363 gdb_cv_struct_lwp=no
c906108c 13364fi
81ecdfbb 13365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13366fi
81ecdfbb
RW
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13368$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13369if test $gdb_cv_struct_lwp = yes; then
c906108c 13370
81ecdfbb 13371$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13372
97bf5e38 13373fi
c906108c 13374
a3828db0 13375# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13377$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13378if test "${gdb_cv_struct_reg+set}" = set; then :
13379 $as_echo_n "(cached) " >&6
bec39cab 13380else
81ecdfbb 13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13382/* end confdefs.h. */
a3828db0
MK
13383#include <sys/types.h>
13384#include <machine/reg.h>
bec39cab
AC
13385int
13386main ()
13387{
a3828db0 13388struct reg r;
bec39cab
AC
13389 ;
13390 return 0;
13391}
13392_ACEOF
81ecdfbb 13393if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13394 gdb_cv_struct_reg=yes
27ca5dad 13395else
81ecdfbb 13396 gdb_cv_struct_reg=no
27ca5dad 13397fi
81ecdfbb 13398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13399fi
81ecdfbb
RW
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13401$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13402if test $gdb_cv_struct_reg = yes; then
bec39cab 13403
81ecdfbb 13404$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13405
13406fi
97bf5e38 13407
a3828db0
MK
13408# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13409# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13410ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13411"
13412if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13413
13414cat >>confdefs.h <<_ACEOF
a3828db0 13415#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13416_ACEOF
3862412b 13417
5c45e068 13418
97bf5e38 13419fi
81ecdfbb
RW
13420ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13421"
13422if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13423
13424cat >>confdefs.h <<_ACEOF
a3828db0 13425#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13426_ACEOF
3862412b 13427
5c45e068 13428
97bf5e38 13429fi
3862412b 13430
5c45e068 13431
a3828db0 13432# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13434$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13435if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13436 $as_echo_n "(cached) " >&6
451928c5 13437else
81ecdfbb 13438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13439/* end confdefs.h. */
a3828db0 13440#include <sys/ptrace.h>
bec39cab
AC
13441int
13442main ()
13443{
a3828db0 13444PTRACE_GETREGS;
bec39cab
AC
13445 ;
13446 return 0;
13447}
13448_ACEOF
81ecdfbb 13449if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13450 gdb_cv_have_ptrace_getregs=yes
451928c5 13451else
81ecdfbb 13452 gdb_cv_have_ptrace_getregs=no
451928c5 13453fi
81ecdfbb 13454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13455fi
13456
81ecdfbb
RW
13457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13458$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13459if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13460
81ecdfbb 13461$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13462
97bf5e38 13463fi
451928c5 13464
a3828db0 13465# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13467$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13468if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13469 $as_echo_n "(cached) " >&6
451928c5 13470else
81ecdfbb 13471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13472/* end confdefs.h. */
a3828db0 13473#include <sys/ptrace.h>
bec39cab
AC
13474int
13475main ()
13476{
a3828db0 13477PTRACE_GETFPXREGS;
bec39cab
AC
13478 ;
13479 return 0;
13480}
13481_ACEOF
81ecdfbb 13482if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13483 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13484else
81ecdfbb 13485 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13486fi
81ecdfbb 13487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13488fi
13489
81ecdfbb
RW
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13491$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13492if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13493
81ecdfbb 13494$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13495
97bf5e38 13496fi
451928c5 13497
a3828db0 13498# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13500$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13501if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13502 $as_echo_n "(cached) " >&6
3862412b 13503else
81ecdfbb 13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13505/* end confdefs.h. */
a3828db0
MK
13506#include <sys/types.h>
13507#include <sys/ptrace.h>
bec39cab
AC
13508int
13509main ()
13510{
a3828db0 13511PT_GETDBREGS;
bec39cab
AC
13512 ;
13513 return 0;
13514}
13515_ACEOF
81ecdfbb 13516if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13517 gdb_cv_have_pt_getdbregs=yes
3862412b 13518else
81ecdfbb 13519 gdb_cv_have_pt_getdbregs=no
3862412b 13520fi
81ecdfbb 13521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13522fi
13523
81ecdfbb
RW
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13525$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13526if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13527
81ecdfbb 13528$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13529
97bf5e38 13530fi
3862412b 13531
a3828db0 13532# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13534$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13535if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13536 $as_echo_n "(cached) " >&6
3862412b 13537else
81ecdfbb 13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13539/* end confdefs.h. */
a3828db0
MK
13540#include <sys/types.h>
13541#include <sys/ptrace.h>
bec39cab
AC
13542int
13543main ()
13544{
a3828db0 13545PT_GETXMMREGS;
bec39cab
AC
13546 ;
13547 return 0;
13548}
13549_ACEOF
81ecdfbb 13550if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13551 gdb_cv_have_pt_getxmmregs=yes
3862412b 13552else
81ecdfbb 13553 gdb_cv_have_pt_getxmmregs=no
3862412b 13554fi
81ecdfbb 13555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13556fi
13557
81ecdfbb
RW
13558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13559$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13560if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13561
81ecdfbb 13562$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13563
97bf5e38 13564fi
3862412b 13565
eb368090 13566# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13567
13568if test "${target}" = "${host}"; then
13569 case "${host}" in
97bf5e38 13570 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13571
81ecdfbb 13572$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13573
13574 ;;
c162e8c9 13575 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13576
81ecdfbb 13577$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13578
13579 ;;
13580 mips-sgi-irix5*)
13581 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13582
81ecdfbb 13583$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13584
13585 ;;
13586 esac
13587fi
13588
13589if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13591$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13592 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13593 $as_echo_n "(cached) " >&6
bec39cab 13594else
81ecdfbb 13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13596/* end confdefs.h. */
596c9d4b
KB
13597
13598#define _SYSCALL32
d30c5336
JK
13599/* Needed for new procfs interface on sparc-solaris. */
13600#define _STRUCTURED_PROC 1
596c9d4b 13601#include <sys/procfs.h>
bec39cab
AC
13602int
13603main ()
13604{
97bf5e38 13605pstatus_t avar
bec39cab
AC
13606 ;
13607 return 0;
13608}
13609_ACEOF
81ecdfbb 13610if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13611 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13612else
81ecdfbb 13613 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13614
596c9d4b 13615fi
81ecdfbb 13616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13617fi
13618
97bf5e38 13619 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13620
81ecdfbb 13621$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13622
13623 fi
81ecdfbb
RW
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13625$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13626
81ecdfbb
RW
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13628$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13629 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13630 $as_echo_n "(cached) " >&6
596c9d4b 13631else
81ecdfbb 13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13633/* end confdefs.h. */
596c9d4b
KB
13634
13635#define _SYSCALL32
d30c5336
JK
13636/* Needed for new procfs interface on sparc-solaris. */
13637#define _STRUCTURED_PROC 1
596c9d4b 13638#include <sys/procfs.h>
bec39cab
AC
13639int
13640main ()
13641{
97bf5e38 13642prrun_t avar
bec39cab
AC
13643 ;
13644 return 0;
13645}
13646_ACEOF
81ecdfbb 13647if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13648 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13649else
81ecdfbb 13650 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13651
596c9d4b 13652fi
81ecdfbb 13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13654fi
13655
97bf5e38 13656 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13657
81ecdfbb 13658$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13659
13660 fi
81ecdfbb
RW
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13662$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13663
81ecdfbb
RW
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13665$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13666 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13667 $as_echo_n "(cached) " >&6
596c9d4b 13668else
81ecdfbb 13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13670/* end confdefs.h. */
596c9d4b
KB
13671
13672#define _SYSCALL32
d30c5336
JK
13673/* Needed for new procfs interface on sparc-solaris. */
13674#define _STRUCTURED_PROC 1
596c9d4b 13675#include <sys/procfs.h>
bec39cab
AC
13676int
13677main ()
13678{
97bf5e38 13679gregset_t avar
bec39cab
AC
13680 ;
13681 return 0;
13682}
13683_ACEOF
81ecdfbb 13684if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13685 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13686else
81ecdfbb 13687 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13688
596c9d4b 13689fi
81ecdfbb 13690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13691fi
13692
97bf5e38 13693 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13694
81ecdfbb 13695$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13696
13697 fi
81ecdfbb
RW
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13699$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13700
81ecdfbb
RW
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13702$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13703 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13704 $as_echo_n "(cached) " >&6
d84dd0c5 13705else
81ecdfbb 13706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13707/* end confdefs.h. */
97bf5e38
MK
13708
13709#define _SYSCALL32
d30c5336
JK
13710/* Needed for new procfs interface on sparc-solaris. */
13711#define _STRUCTURED_PROC 1
d84dd0c5 13712#include <sys/procfs.h>
bec39cab
AC
13713int
13714main ()
13715{
97bf5e38 13716fpregset_t avar
bec39cab
AC
13717 ;
13718 return 0;
13719}
13720_ACEOF
81ecdfbb 13721if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13722 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13723else
81ecdfbb 13724 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13725
d84dd0c5 13726fi
81ecdfbb 13727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13728fi
13729
97bf5e38 13730 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13731
81ecdfbb 13732$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13733
97bf5e38 13734 fi
81ecdfbb
RW
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13736$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13737
81ecdfbb
RW
13738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13739$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13740 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13741 $as_echo_n "(cached) " >&6
c906108c 13742else
81ecdfbb 13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13744/* end confdefs.h. */
c906108c 13745
97bf5e38 13746#define _SYSCALL32
d30c5336
JK
13747/* Needed for new procfs interface on sparc-solaris. */
13748#define _STRUCTURED_PROC 1
97bf5e38 13749#include <sys/procfs.h>
bec39cab
AC
13750int
13751main ()
13752{
97bf5e38 13753prgregset_t avar
bec39cab
AC
13754 ;
13755 return 0;
13756}
13757_ACEOF
81ecdfbb 13758if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13759 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13760else
81ecdfbb 13761 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13762
c906108c 13763fi
81ecdfbb 13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13765fi
13766
97bf5e38 13767 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13768
81ecdfbb 13769$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13770
97bf5e38 13771 fi
81ecdfbb
RW
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13773$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13774
81ecdfbb
RW
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13776$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13777 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13778 $as_echo_n "(cached) " >&6
d45fe813 13779else
81ecdfbb 13780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13781/* end confdefs.h. */
97bf5e38
MK
13782
13783#define _SYSCALL32
d30c5336
JK
13784/* Needed for new procfs interface on sparc-solaris. */
13785#define _STRUCTURED_PROC 1
97bf5e38 13786#include <sys/procfs.h>
bec39cab
AC
13787int
13788main ()
13789{
97bf5e38 13790prfpregset_t avar
bec39cab
AC
13791 ;
13792 return 0;
13793}
13794_ACEOF
81ecdfbb 13795if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13796 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13797else
81ecdfbb 13798 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13799
d45fe813 13800fi
81ecdfbb 13801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13802fi
13803
97bf5e38 13804 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13805
81ecdfbb 13806$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13807
97bf5e38 13808 fi
81ecdfbb
RW
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13810$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13811
81ecdfbb
RW
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13813$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13814 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13815 $as_echo_n "(cached) " >&6
d45fe813 13816else
81ecdfbb 13817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13818/* end confdefs.h. */
97bf5e38
MK
13819
13820#define _SYSCALL32
d30c5336
JK
13821/* Needed for new procfs interface on sparc-solaris. */
13822#define _STRUCTURED_PROC 1
97bf5e38 13823#include <sys/procfs.h>
bec39cab
AC
13824int
13825main ()
13826{
97bf5e38 13827prgregset32_t avar
bec39cab
AC
13828 ;
13829 return 0;
13830}
13831_ACEOF
81ecdfbb 13832if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13833 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13834else
81ecdfbb 13835 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13836
d45fe813 13837fi
81ecdfbb 13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13839fi
13840
97bf5e38 13841 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13842
81ecdfbb 13843$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13844
97bf5e38 13845 fi
81ecdfbb
RW
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13847$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13848
81ecdfbb
RW
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13850$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13851 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13852 $as_echo_n "(cached) " >&6
d45fe813 13853else
81ecdfbb 13854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13855/* end confdefs.h. */
97bf5e38
MK
13856
13857#define _SYSCALL32
d30c5336
JK
13858/* Needed for new procfs interface on sparc-solaris. */
13859#define _STRUCTURED_PROC 1
97bf5e38 13860#include <sys/procfs.h>
bec39cab
AC
13861int
13862main ()
13863{
97bf5e38 13864prfpregset32_t avar
bec39cab
AC
13865 ;
13866 return 0;
13867}
13868_ACEOF
81ecdfbb 13869if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13870 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13871else
81ecdfbb 13872 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13873
d45fe813 13874fi
81ecdfbb 13875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13876fi
13877
97bf5e38 13878 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13879
81ecdfbb 13880$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13881
97bf5e38 13882 fi
81ecdfbb
RW
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13884$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13885
81ecdfbb
RW
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13887$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13888 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13889 $as_echo_n "(cached) " >&6
d45fe813 13890else
81ecdfbb 13891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13892/* end confdefs.h. */
97bf5e38 13893
d45fe813 13894#define _SYSCALL32
d30c5336
JK
13895/* Needed for new procfs interface on sparc-solaris. */
13896#define _STRUCTURED_PROC 1
97bf5e38 13897#include <sys/procfs.h>
bec39cab
AC
13898int
13899main ()
13900{
97bf5e38 13901lwpid_t avar
bec39cab
AC
13902 ;
13903 return 0;
13904}
13905_ACEOF
81ecdfbb 13906if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13907 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13908else
81ecdfbb 13909 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13910
d45fe813 13911fi
81ecdfbb 13912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13913fi
13914
97bf5e38 13915 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13916
81ecdfbb 13917$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13918
97bf5e38 13919 fi
81ecdfbb
RW
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13921$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13922
81ecdfbb
RW
13923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13924$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13925 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13926 $as_echo_n "(cached) " >&6
c906108c 13927else
81ecdfbb 13928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13929/* end confdefs.h. */
c906108c 13930
97bf5e38 13931#define _SYSCALL32
d30c5336
JK
13932/* Needed for new procfs interface on sparc-solaris. */
13933#define _STRUCTURED_PROC 1
97bf5e38 13934#include <sys/procfs.h>
bec39cab
AC
13935int
13936main ()
13937{
97bf5e38 13938psaddr_t avar
bec39cab
AC
13939 ;
13940 return 0;
13941}
13942_ACEOF
81ecdfbb 13943if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13944 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13945else
81ecdfbb 13946 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13947
c906108c 13948fi
81ecdfbb 13949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13950fi
13951
97bf5e38 13952 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13953
81ecdfbb 13954$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13955
97bf5e38 13956 fi
81ecdfbb
RW
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13958$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13959
81ecdfbb
RW
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13961$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13962 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13963 $as_echo_n "(cached) " >&6
c906108c 13964else
81ecdfbb 13965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13966/* end confdefs.h. */
c906108c 13967
97bf5e38 13968#define _SYSCALL32
d30c5336
JK
13969/* Needed for new procfs interface on sparc-solaris. */
13970#define _STRUCTURED_PROC 1
97bf5e38 13971#include <sys/procfs.h>
bec39cab
AC
13972int
13973main ()
13974{
97bf5e38 13975prsysent_t avar
bec39cab
AC
13976 ;
13977 return 0;
13978}
13979_ACEOF
81ecdfbb 13980if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13981 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13982else
81ecdfbb 13983 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13984
c906108c 13985fi
81ecdfbb 13986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13987fi
13988
97bf5e38 13989 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13990
81ecdfbb 13991$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13992
97bf5e38 13993 fi
81ecdfbb
RW
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13995$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13996
81ecdfbb
RW
13997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13998$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13999 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14000 $as_echo_n "(cached) " >&6
c906108c 14001else
81ecdfbb 14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14003/* end confdefs.h. */
c906108c 14004
97bf5e38 14005#define _SYSCALL32
d30c5336
JK
14006/* Needed for new procfs interface on sparc-solaris. */
14007#define _STRUCTURED_PROC 1
97bf5e38 14008#include <sys/procfs.h>
bec39cab
AC
14009int
14010main ()
14011{
97bf5e38 14012pr_sigset_t avar
bec39cab
AC
14013 ;
14014 return 0;
14015}
14016_ACEOF
81ecdfbb 14017if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14018 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14019else
81ecdfbb 14020 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14021
c906108c 14022fi
81ecdfbb 14023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14024fi
14025
97bf5e38 14026 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14027
81ecdfbb 14028$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14029
97bf5e38 14030 fi
81ecdfbb
RW
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14032$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14033
81ecdfbb
RW
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14035$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14036 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14037 $as_echo_n "(cached) " >&6
c906108c 14038else
81ecdfbb 14039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14040/* end confdefs.h. */
c906108c 14041
97bf5e38 14042#define _SYSCALL32
d30c5336
JK
14043/* Needed for new procfs interface on sparc-solaris. */
14044#define _STRUCTURED_PROC 1
97bf5e38 14045#include <sys/procfs.h>
bec39cab
AC
14046int
14047main ()
14048{
97bf5e38 14049pr_sigaction64_t avar
bec39cab
AC
14050 ;
14051 return 0;
14052}
14053_ACEOF
81ecdfbb 14054if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14055 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14056else
81ecdfbb 14057 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14058
c906108c 14059fi
81ecdfbb 14060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14061fi
14062
97bf5e38 14063 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14064
81ecdfbb 14065$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14066
97bf5e38 14067 fi
81ecdfbb
RW
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14069$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14070
81ecdfbb
RW
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14072$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14073 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14074 $as_echo_n "(cached) " >&6
97bf5e38 14075else
81ecdfbb 14076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14077/* end confdefs.h. */
97bf5e38
MK
14078
14079#define _SYSCALL32
d30c5336
JK
14080/* Needed for new procfs interface on sparc-solaris. */
14081#define _STRUCTURED_PROC 1
97bf5e38 14082#include <sys/procfs.h>
bec39cab
AC
14083int
14084main ()
14085{
97bf5e38 14086pr_siginfo64_t avar
bec39cab
AC
14087 ;
14088 return 0;
14089}
14090_ACEOF
81ecdfbb 14091if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14092 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14093else
81ecdfbb 14094 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14095
97bf5e38 14096fi
81ecdfbb 14097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14098fi
c906108c 14099
97bf5e38 14100 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14101
81ecdfbb 14102$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14103
97bf5e38 14104 fi
81ecdfbb
RW
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14106$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14107
14108
97bf5e38
MK
14109
14110
14111
97bf5e38 14112 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14114$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14115 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14116 $as_echo_n "(cached) " >&6
c906108c 14117else
81ecdfbb 14118 if test "$cross_compiling" = yes; then :
97bf5e38 14119 gdb_cv_prfpregset_t_broken=yes
c906108c 14120else
81ecdfbb 14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14122/* end confdefs.h. */
97bf5e38
MK
14123#include <sys/procfs.h>
14124 int main ()
14125 {
14126 if (sizeof (prfpregset_t) == sizeof (void *))
14127 return 1;
14128 return 0;
14129 }
bec39cab 14130_ACEOF
81ecdfbb 14131if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14132 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14133else
14134 gdb_cv_prfpregset_t_broken=yes
c906108c 14135fi
81ecdfbb
RW
14136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14137 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14138fi
81ecdfbb 14139
c906108c
SS
14140fi
14141
81ecdfbb
RW
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14143$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14144 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14145
81ecdfbb 14146$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14147
97bf5e38
MK
14148 fi
14149 fi
c906108c 14150
bec39cab 14151
81ecdfbb
RW
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
14153$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
14154 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
14155 $as_echo_n "(cached) " >&6
c906108c 14156else
81ecdfbb 14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14158/* end confdefs.h. */
97bf5e38
MK
14159#include <unistd.h>
14160#include <sys/types.h>
14161#include <sys/procfs.h>
14162
bec39cab
AC
14163int
14164main ()
14165{
97bf5e38
MK
14166
14167 int dummy;;
14168 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
14169
14170 ;
14171 return 0;
14172}
14173_ACEOF
81ecdfbb 14174if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14175 gdb_cv_have_procfs_piocset=yes
c906108c 14176else
81ecdfbb 14177 gdb_cv_have_procfs_piocset=no
c906108c 14178fi
81ecdfbb 14179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14180fi
97bf5e38 14181
81ecdfbb
RW
14182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
14183$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 14184 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 14185
81ecdfbb 14186$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
14187
14188 fi
c906108c 14189fi
c906108c 14190
97bf5e38 14191if test ${host} = ${target} ; then
bec39cab 14192
81ecdfbb
RW
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
14194$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
14195 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
14196 $as_echo_n "(cached) " >&6
bec39cab 14197else
81ecdfbb 14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14199/* end confdefs.h. */
97bf5e38 14200#include <link.h>
bec39cab
AC
14201int
14202main ()
14203{
97bf5e38 14204struct link_map lm; (void) lm.l_addr;
bec39cab
AC
14205 ;
14206 return 0;
14207}
14208_ACEOF
81ecdfbb 14209if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14210 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 14211else
81ecdfbb 14212 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 14213fi
81ecdfbb 14214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14215fi
14216
81ecdfbb
RW
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
14218$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 14219 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 14220
81ecdfbb 14221$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14222
14223 fi
14224
bec39cab 14225
81ecdfbb
RW
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
14227$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
14228 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
14229 $as_echo_n "(cached) " >&6
c906108c 14230else
81ecdfbb 14231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14232/* end confdefs.h. */
97bf5e38
MK
14233#include <sys/types.h>
14234#include <link.h>
bec39cab
AC
14235int
14236main ()
14237{
97bf5e38 14238struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
14239 ;
14240 return 0;
14241}
14242_ACEOF
81ecdfbb 14243if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14244 gdb_cv_have_struct_link_map_with_lm_members=yes
14245else
81ecdfbb 14246 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14247fi
81ecdfbb 14248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14249fi
c906108c 14250
81ecdfbb
RW
14251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14252$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14253 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14254
81ecdfbb 14255$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14256
14257 fi
14258
bec39cab 14259
81ecdfbb
RW
14260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14261$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14262 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14263 $as_echo_n "(cached) " >&6
c906108c 14264else
81ecdfbb 14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14266/* end confdefs.h. */
97bf5e38
MK
14267#include <sys/types.h>
14268#ifdef HAVE_NLIST_H
14269#include <nlist.h>
14270#endif
14271#include <link.h>
bec39cab
AC
14272int
14273main ()
14274{
97bf5e38 14275struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14276 ;
14277 return 0;
14278}
14279_ACEOF
81ecdfbb 14280if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14281 gdb_cv_have_struct_so_map_with_som_members=yes
14282else
81ecdfbb 14283 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14284fi
81ecdfbb 14285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14286fi
c906108c 14287
81ecdfbb
RW
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14289$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14290 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14291
81ecdfbb 14292$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14293
97bf5e38 14294 fi
c906108c 14295
bec39cab 14296
81ecdfbb
RW
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14298$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14299 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14300 $as_echo_n "(cached) " >&6
97bf5e38 14301else
81ecdfbb 14302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14303/* end confdefs.h. */
97bf5e38
MK
14304#define _SYSCALL32
14305#include <sys/link.h>
bec39cab
AC
14306int
14307main ()
14308{
97bf5e38 14309struct link_map32 l;
bec39cab
AC
14310 ;
14311 return 0;
14312}
14313_ACEOF
81ecdfbb 14314if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14315 gdb_cv_have_struct_link_map32=yes
14316else
81ecdfbb 14317 gdb_cv_have_struct_link_map32=no
97bf5e38 14318fi
81ecdfbb 14319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14320fi
c906108c 14321
81ecdfbb
RW
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14323$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14324 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14325
81ecdfbb 14326$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14327
60ca704f 14328
81ecdfbb 14329$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14330
97bf5e38
MK
14331 fi
14332fi
c906108c 14333
bc8bcb4b 14334# Check if the compiler supports the `long long' type.
c906108c 14335
81ecdfbb
RW
14336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14337$as_echo_n "checking for long long support in compiler... " >&6; }
14338if test "${gdb_cv_c_long_long+set}" = set; then :
14339 $as_echo_n "(cached) " >&6
97bf5e38 14340else
81ecdfbb 14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14342/* end confdefs.h. */
bc8bcb4b 14343extern long long foo;
bec39cab
AC
14344int
14345main ()
14346{
bc8bcb4b 14347switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14348 ;
14349 return 0;
14350}
14351_ACEOF
81ecdfbb 14352if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14353 gdb_cv_c_long_long=yes
14354else
81ecdfbb 14355 gdb_cv_c_long_long=no
97bf5e38 14356fi
81ecdfbb 14357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14358fi
81ecdfbb
RW
14359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14360$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14361if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14362
81ecdfbb 14363$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14364
14365fi
14366
bc8bcb4b 14367# Check if the compiler and runtime support printing long longs.
97bf5e38 14368
81ecdfbb
RW
14369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14370$as_echo_n "checking for long long support in printf... " >&6; }
14371if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14372 $as_echo_n "(cached) " >&6
97bf5e38 14373else
81ecdfbb 14374 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14375 gdb_cv_printf_has_long_long=no
14376else
81ecdfbb 14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14378/* end confdefs.h. */
bc8bcb4b
MK
14379$ac_includes_default
14380int
14381main ()
14382{
14383char buf[32];
97bf5e38
MK
14384 long long l = 0;
14385 l = (l << 16) + 0x0123;
14386 l = (l << 16) + 0x4567;
14387 l = (l << 16) + 0x89ab;
14388 l = (l << 16) + 0xcdef;
14389 sprintf (buf, "0x%016llx", l);
14390 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14391 ;
14392 return 0;
c906108c 14393}
bec39cab 14394_ACEOF
81ecdfbb 14395if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14396 gdb_cv_printf_has_long_long=yes
14397else
81ecdfbb 14398 gdb_cv_printf_has_long_long=no
97bf5e38 14399fi
81ecdfbb
RW
14400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14401 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14402fi
81ecdfbb 14403
97bf5e38 14404fi
81ecdfbb
RW
14405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14406$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14407if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14408
81ecdfbb 14409$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14410
14411fi
97bf5e38 14412
1a619819
LM
14413# Check if the compiler and runtime support printing decfloats.
14414
81ecdfbb
RW
14415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14416$as_echo_n "checking for decfloat support in printf... " >&6; }
14417if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14418 $as_echo_n "(cached) " >&6
1a619819 14419else
81ecdfbb 14420 if test "$cross_compiling" = yes; then :
1a619819
LM
14421 gdb_cv_printf_has_decfloat=no
14422else
81ecdfbb 14423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14424/* end confdefs.h. */
14425$ac_includes_default
14426int
14427main ()
14428{
14429char buf[64];
14430 _Decimal32 d32 = 1.2345df;
14431 _Decimal64 d64 = 1.2345dd;
14432 _Decimal128 d128 = 1.2345dl;
14433 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14434 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14435 ;
14436 return 0;
14437}
14438_ACEOF
81ecdfbb 14439if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14440 gdb_cv_printf_has_decfloat=yes
14441else
81ecdfbb 14442 gdb_cv_printf_has_decfloat=no
1a619819 14443fi
81ecdfbb
RW
14444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14445 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14446fi
81ecdfbb 14447
1a619819 14448fi
81ecdfbb
RW
14449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14450$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14451if test $gdb_cv_printf_has_decfloat = yes; then
14452
81ecdfbb 14453$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14454
14455fi
14456
bc8bcb4b
MK
14457# Check if the compiler supports the `long double' type. We can't use
14458# AC_C_LONG_DOUBLE because that one does additional checks on the
14459# constants defined in <float.h> that fail on some systems,
14460# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14461
81ecdfbb
RW
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14463$as_echo_n "checking for long double support in compiler... " >&6; }
14464if test "${gdb_cv_c_long_double+set}" = set; then :
14465 $as_echo_n "(cached) " >&6
97bf5e38 14466else
81ecdfbb 14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14468/* end confdefs.h. */
97bf5e38 14469long double foo;
bec39cab 14470_ACEOF
81ecdfbb 14471if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14472 gdb_cv_c_long_double=yes
97bf5e38 14473else
81ecdfbb 14474 gdb_cv_c_long_double=no
97bf5e38 14475fi
81ecdfbb 14476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14477fi
81ecdfbb
RW
14478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14479$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14480if test $gdb_cv_c_long_double = yes; then
c906108c 14481
81ecdfbb 14482$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14483
14484fi
14485
bc8bcb4b 14486# Check if the compiler and runtime support printing long doubles.
97bf5e38 14487
81ecdfbb
RW
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14489$as_echo_n "checking for long double support in printf... " >&6; }
14490if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14491 $as_echo_n "(cached) " >&6
97bf5e38 14492else
81ecdfbb 14493 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14494 gdb_cv_printf_has_long_double=no
14495else
81ecdfbb 14496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14497/* end confdefs.h. */
bc8bcb4b
MK
14498$ac_includes_default
14499int
14500main ()
14501{
14502char buf[16];
97bf5e38
MK
14503 long double f = 3.141592653;
14504 sprintf (buf, "%Lg", f);
14505 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14506 ;
14507 return 0;
97bf5e38 14508}
bec39cab 14509_ACEOF
81ecdfbb 14510if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14511 gdb_cv_printf_has_long_double=yes
c906108c 14512else
81ecdfbb 14513 gdb_cv_printf_has_long_double=no
c906108c 14514fi
81ecdfbb
RW
14515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14516 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14517fi
81ecdfbb 14518
c906108c 14519fi
81ecdfbb
RW
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14521$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14522if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14523
81ecdfbb 14524$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14525
14526fi
97bf5e38 14527
bc8bcb4b 14528# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14529
81ecdfbb
RW
14530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14531$as_echo_n "checking for long double support in scanf... " >&6; }
14532if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14533 $as_echo_n "(cached) " >&6
97bf5e38 14534else
81ecdfbb 14535 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14536 gdb_cv_scanf_has_long_double=no
14537else
81ecdfbb 14538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14539/* end confdefs.h. */
bc8bcb4b
MK
14540#include <stdio.h>
14541int
14542main ()
14543{
14544char *buf = "3.141592653";
97bf5e38
MK
14545 long double f = 0;
14546 sscanf (buf, "%Lg", &f);
14547 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14548 ;
14549 return 0;
97bf5e38 14550}
bec39cab 14551_ACEOF
81ecdfbb 14552if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14553 gdb_cv_scanf_has_long_double=yes
14554else
81ecdfbb 14555 gdb_cv_scanf_has_long_double=no
97bf5e38 14556fi
81ecdfbb
RW
14557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14558 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14559fi
81ecdfbb 14560
c906108c 14561fi
81ecdfbb
RW
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14563$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14564if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14565
81ecdfbb 14566$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14567
14568fi
c906108c 14569
438013df
AO
14570case ${host_os} in
14571aix*)
81ecdfbb
RW
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14573$as_echo_n "checking for -bbigtoc option... " >&6; }
14574if test "${gdb_cv_bigtoc+set}" = set; then :
14575 $as_echo_n "(cached) " >&6
438013df 14576else
bec39cab 14577
438013df
AO
14578 SAVE_LDFLAGS=$LDFLAGS
14579
14580 case $GCC in
14581 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14582 *) gdb_cv_bigtoc=-bbigtoc ;;
14583 esac
14584
14585 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14587/* end confdefs.h. */
438013df 14588
bec39cab
AC
14589int
14590main ()
14591{
438013df 14592int i;
bec39cab
AC
14593 ;
14594 return 0;
14595}
14596_ACEOF
81ecdfbb 14597if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14598
81ecdfbb
RW
14599else
14600 gdb_cv_bigtoc=
438013df 14601fi
81ecdfbb
RW
14602rm -f core conftest.err conftest.$ac_objext \
14603 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14604 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14605
bec39cab 14606fi
81ecdfbb
RW
14607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14608$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14609 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14610 ;;
14611esac
14612
38f6b338 14613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14614$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14615dynamic_list=false
14616if test "${gdb_native}" = yes; then
14617 # The dynamically loaded libthread_db needs access to symbols in the gdb
14618 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14619 # may not be supported there.
14620 old_LDFLAGS="$LDFLAGS"
14621 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14622 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14623 LDFLAGS="$LDFLAGS $RDYNAMIC"
14624 if test "${have_libpython}" = no; then
14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14626/* end confdefs.h. */
14627
14628int
14629main ()
14630{
14631
14632 ;
14633 return 0;
14634}
14635_ACEOF
14636if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14637 dynamic_list=true
14638fi
14639rm -f core conftest.err conftest.$ac_objext \
14640 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14641 else
14642 # Workaround http://bugs.python.org/issue4434 where static
14643 # libpythonX.Y.a would get its symbols required for
14644 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14645 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14646 old_CFLAGS="$CFLAGS"
14647 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14648 if test "$cross_compiling" = yes; then :
3bebe2f2 14649 true
f6528abd 14650else
3bebe2f2
JK
14651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652/* end confdefs.h. */
14653#include "${have_libpython}/Python.h"
14654int
14655main ()
14656{
14657int err;
38f6b338
JK
14658 Py_Initialize ();
14659 err = PyRun_SimpleString ("import itertools\n");
14660 Py_Finalize ();
14661 return err == 0 ? 0 : 1;
3bebe2f2
JK
14662 ;
14663 return 0;
14664}
14665_ACEOF
14666if ac_fn_c_try_run "$LINENO"; then :
14667 dynamic_list=true
14668fi
14669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14670 conftest.$ac_objext conftest.beam conftest.$ac_ext
14671fi
14672
38f6b338
JK
14673 CFLAGS="$old_CFLAGS"
14674 fi
14675 LDFLAGS="$old_LDFLAGS"
14676fi
14677if $dynamic_list; then
14678 found="-Wl,--dynamic-list"
14679 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14680else
38f6b338
JK
14681 found="-rdynamic"
14682 RDYNAMIC="-rdynamic"
f6528abd 14683fi
f6528abd 14684
38f6b338 14685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14686$as_echo "$found" >&6; }
0407b3f1 14687
f6528abd 14688
0407b3f1 14689if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14690 case ${host_os} in
c906108c 14691 solaris*)
d92419e5
JB
14692 # See if thread_db library is around for Solaris thread debugging.
14693 # Note that we must explicitly test for version 1 of the library
14694 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14695 # the same API.
81ecdfbb
RW
14696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14697$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14698 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14700$as_echo "yes" >&6; }
60ca704f 14701
81ecdfbb 14702$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14703
3483b318 14704 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14705 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14707$as_echo_n "checking for dlopen in -ldl... " >&6; }
14708if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14709 $as_echo_n "(cached) " >&6
c906108c 14710else
bec39cab 14711 ac_check_lib_save_LIBS=$LIBS
c906108c 14712LIBS="-ldl $LIBS"
81ecdfbb 14713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14714/* end confdefs.h. */
14715
81ecdfbb
RW
14716/* Override any GCC internal prototype to avoid an error.
14717 Use char because int might match the return type of a GCC
14718 builtin and then its argument prototype would still apply. */
bec39cab
AC
14719#ifdef __cplusplus
14720extern "C"
14721#endif
bec39cab
AC
14722char dlopen ();
14723int
14724main ()
14725{
81ecdfbb 14726return dlopen ();
bec39cab
AC
14727 ;
14728 return 0;
14729}
14730_ACEOF
81ecdfbb 14731if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14732 ac_cv_lib_dl_dlopen=yes
14733else
81ecdfbb 14734 ac_cv_lib_dl_dlopen=no
bec39cab 14735fi
81ecdfbb
RW
14736rm -f core conftest.err conftest.$ac_objext \
14737 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14738LIBS=$ac_check_lib_save_LIBS
14739fi
81ecdfbb
RW
14740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14741$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14742if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14743 cat >>confdefs.h <<_ACEOF
14744#define HAVE_LIBDL 1
14745_ACEOF
c906108c
SS
14746
14747 LIBS="-ldl $LIBS"
14748
c906108c
SS
14749fi
14750
f6528abd 14751 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14752 # Sun randomly tweaked the prototypes in <proc_service.h>
14753 # at one point.
81ecdfbb
RW
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14755$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14756 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14757 $as_echo_n "(cached) " >&6
c906108c 14758else
bec39cab 14759
81ecdfbb 14760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14761/* end confdefs.h. */
c906108c
SS
14762
14763 #include <proc_service.h>
14764 ps_err_e ps_pdwrite
14765 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14766
bec39cab
AC
14767int
14768main ()
14769{
14770
14771 ;
14772 return 0;
14773}
14774_ACEOF
81ecdfbb 14775if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14776 gdb_cv_proc_service_is_old=no
14777else
81ecdfbb 14778 gdb_cv_proc_service_is_old=yes
c906108c 14779fi
81ecdfbb 14780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14781
c906108c
SS
14782fi
14783
81ecdfbb
RW
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14785$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14786 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14787
81ecdfbb 14788$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14789
14790 fi
14791 else
81ecdfbb
RW
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14793$as_echo "no" >&6; }
c906108c
SS
14794 fi
14795 ;;
d92419e5 14796 aix*)
81ecdfbb
RW
14797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14798$as_echo_n "checking for AiX thread debugging library... " >&6; }
14799 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14800 $as_echo_n "(cached) " >&6
bec39cab 14801else
81ecdfbb 14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14803/* end confdefs.h. */
d92419e5 14804#include <sys/pthdebug.h>
bec39cab
AC
14805int
14806main ()
14807{
d92419e5
JB
14808#ifndef PTHDB_VERSION_3
14809 #error
14810 #endif
bec39cab
AC
14811 ;
14812 return 0;
14813}
14814_ACEOF
81ecdfbb 14815if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14816 gdb_cv_have_aix_thread_debug=yes
14817else
81ecdfbb 14818 gdb_cv_have_aix_thread_debug=no
d92419e5 14819fi
81ecdfbb 14820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14821fi
14822
81ecdfbb
RW
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14824$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14825 if test $gdb_cv_have_aix_thread_debug = yes; then
14826 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14827 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14828 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14829
14830 # Older versions of AIX do not provide the declaration for
14831 # the getthrds function (it appears that it was introduced
14832 # with AIX 6.x).
14833 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14834"
14835if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14836 ac_have_decl=1
14837else
14838 ac_have_decl=0
14839fi
14840
14841cat >>confdefs.h <<_ACEOF
14842#define HAVE_DECL_GETTHRDS $ac_have_decl
14843_ACEOF
14844
d92419e5
JB
14845 fi
14846 ;;
c906108c 14847 esac
bec39cab 14848
c906108c
SS
14849fi
14850
3f47be5c 14851if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14853$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14854if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14855 $as_echo_n "(cached) " >&6
bec39cab 14856else
81ecdfbb 14857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14858/* end confdefs.h. */
3f47be5c 14859#include <thread_db.h>
bec39cab
AC
14860int
14861main ()
14862{
3f47be5c 14863int i = TD_NOTALLOC;
bec39cab
AC
14864 ;
14865 return 0;
14866}
14867_ACEOF
81ecdfbb 14868if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14869 gdb_cv_thread_db_h_has_td_notalloc=yes
14870else
81ecdfbb 14871 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14872
3f47be5c 14873fi
81ecdfbb 14874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14875
bec39cab 14876fi
81ecdfbb
RW
14877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14878$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14880$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14881if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14882 $as_echo_n "(cached) " >&6
59f80f10 14883else
81ecdfbb 14884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14885/* end confdefs.h. */
14886#include <thread_db.h>
14887int
14888main ()
14889{
14890int i = TD_VERSION;
14891 ;
14892 return 0;
14893}
14894_ACEOF
81ecdfbb 14895if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14896 gdb_cv_thread_db_h_has_td_version=yes
14897else
81ecdfbb 14898 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14899
14900fi
81ecdfbb 14901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14902
14903fi
81ecdfbb
RW
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14905$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14907$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14908if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14909 $as_echo_n "(cached) " >&6
59f80f10 14910else
81ecdfbb 14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14912/* end confdefs.h. */
14913#include <thread_db.h>
14914int
14915main ()
14916{
14917int i = TD_NOTLS;
14918 ;
14919 return 0;
14920}
14921_ACEOF
81ecdfbb 14922if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14923 gdb_cv_thread_db_h_has_td_notls=yes
14924else
81ecdfbb 14925 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14926
14927fi
81ecdfbb 14928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14929
14930fi
81ecdfbb
RW
14931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14932$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14933fi
14934if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14935
81ecdfbb 14936$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14937
59f80f10
DJ
14938fi
14939if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14940
81ecdfbb 14941$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14942
14943fi
14944if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14945
81ecdfbb 14946$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14947
3f47be5c
EZ
14948fi
14949
b757528f 14950if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14952$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14953if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14954 $as_echo_n "(cached) " >&6
bec39cab 14955else
81ecdfbb 14956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14957/* end confdefs.h. */
b757528f 14958#include <sys/syscall.h>
bec39cab
AC
14959int
14960main ()
14961{
b757528f 14962int i = __NR_tkill;
bec39cab
AC
14963 ;
14964 return 0;
14965}
14966_ACEOF
81ecdfbb 14967if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14968 gdb_cv_sys_syscall_h_has_tkill=yes
14969else
81ecdfbb 14970 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14971
b757528f 14972fi
81ecdfbb 14973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14974
bec39cab 14975fi
81ecdfbb
RW
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14977$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14978fi
14979if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14980
81ecdfbb 14981$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14982
14983fi
14984
81ecdfbb
RW
14985ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14986"
14987if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14988 ac_have_decl=1
10568435 14989else
81ecdfbb 14990 ac_have_decl=0
10568435 14991fi
10568435
JK
14992
14993cat >>confdefs.h <<_ACEOF
81ecdfbb 14994#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14995_ACEOF
14996
14997
81ecdfbb
RW
14998if test "$cross_compiling" = yes; then :
14999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15000/* end confdefs.h. */
15001#include <sys/personality.h>
15002int
15003main ()
15004{
15005
15006# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15007# define ADDR_NO_RANDOMIZE 0x0040000
15008# endif
15009 /* Test the flag could be set and stays set. */
15010 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15011 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15012 return 1
15013 ;
15014 return 0;
15015}
15016_ACEOF
81ecdfbb 15017if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15018 have_personality=true
15019else
81ecdfbb 15020 have_personality=false
10568435 15021fi
81ecdfbb
RW
15022rm -f core conftest.err conftest.$ac_objext \
15023 conftest$ac_exeext conftest.$ac_ext
10568435 15024else
81ecdfbb 15025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15026/* end confdefs.h. */
15027#include <sys/personality.h>
15028int
15029main ()
15030{
15031
15032# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15033# define ADDR_NO_RANDOMIZE 0x0040000
15034# endif
15035 /* Test the flag could be set and stays set. */
15036 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15037 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15038 return 1
15039 ;
15040 return 0;
15041}
15042_ACEOF
81ecdfbb 15043if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15044 have_personality=true
15045else
81ecdfbb 15046 have_personality=false
10568435 15047fi
81ecdfbb
RW
15048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15049 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15050fi
81ecdfbb 15051
10568435
JK
15052if $have_personality
15053then
15054
81ecdfbb 15055$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15056
15057fi
15058
fb40c209 15059
f83d8a90
DE
15060# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15061# except that the argument to --with-sysroot is optional.
15062# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15063if test "x$with_sysroot" = xyes; then
15064 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15065fi
bec39cab 15066
81ecdfbb
RW
15067# Check whether --with-sysroot was given.
15068if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15069 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15070else
15071 TARGET_SYSTEM_ROOT=
15072fi
030292b7 15073
030292b7 15074
f83d8a90
DE
15075 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15076 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15077 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15078 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15079
f83d8a90
DE
15080cat >>confdefs.h <<_ACEOF
15081#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15082_ACEOF
bec39cab 15083
030292b7 15084
b14b1491 15085
f83d8a90
DE
15086
15087 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15088 if test "x$prefix" = xNONE; then
15089 test_prefix=/usr/local
15090 else
15091 test_prefix=$prefix
15092 fi
15093 else
15094 test_prefix=$exec_prefix
15095 fi
15096 value=0
15097 case ${ac_define_dir} in
15098 "${test_prefix}"|"${test_prefix}/"*|\
15099 '${exec_prefix}'|'${exec_prefix}/'*)
15100 value=1
15101 ;;
15102 esac
15103
15104cat >>confdefs.h <<_ACEOF
15105#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15106_ACEOF
030292b7
DJ
15107
15108
15109
16e7150e 15110
16e7150e 15111
81ecdfbb
RW
15112# Check whether --with-system-gdbinit was given.
15113if test "${with_system_gdbinit+set}" = set; then :
15114 withval=$with_system_gdbinit;
b14b1491
TT
15115 SYSTEM_GDBINIT=$withval
15116else
15117 SYSTEM_GDBINIT=
81ecdfbb
RW
15118fi
15119
16e7150e
JG
15120
15121 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15122 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15123 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15124 ac_define_dir=`eval echo $ac_define_dir`
15125
15126cat >>confdefs.h <<_ACEOF
15127#define SYSTEM_GDBINIT "$ac_define_dir"
15128_ACEOF
15129
15130
15131
0c4a4063 15132
b14b1491
TT
15133 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15134 if test "x$prefix" = xNONE; then
15135 test_prefix=/usr/local
15136 else
15137 test_prefix=$prefix
15138 fi
15139 else
15140 test_prefix=$exec_prefix
15141 fi
15142 value=0
15143 case ${ac_define_dir} in
15144 "${test_prefix}"|"${test_prefix}/"*|\
15145 '${exec_prefix}'|'${exec_prefix}/'*)
15146 value=1
15147 ;;
15148 esac
16e7150e 15149
b14b1491
TT
15150cat >>confdefs.h <<_ACEOF
15151#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15152_ACEOF
15153
b14b1491 15154
16e7150e 15155
0c4a4063 15156
81ecdfbb
RW
15157# Check whether --enable-werror was given.
15158if test "${enable_werror+set}" = set; then :
15159 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15160 yes | y) ERROR_ON_WARNING="yes" ;;
15161 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15162 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15163 esac
81ecdfbb
RW
15164fi
15165
094a342e
MK
15166
15167# Enable -Werror by default when using gcc
15168if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
15169 ERROR_ON_WARNING=yes
15170fi
15171
15172WERROR_CFLAGS=""
15173if test "${ERROR_ON_WARNING}" = yes ; then
15174 WERROR_CFLAGS="-Werror"
15175fi
15176
aa79a185
DJ
15177# The entries after -Wno-pointer-sign are disabled warnings which may
15178# be enabled in the future, which can not currently be used to build
15179# GDB.
15180# NOTE: If you change this list, remember to update
3b851bce 15181# gdb/doc/gdbint.texinfo.
aa79a185
DJ
15182build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
15183-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
15184-Wno-unused -Wunused-value -Wunused-function \
15185-Wno-switch -Wno-char-subscripts"
a3b362c4 15186
3526781e
DJ
15187# Enable -Wno-format by default when using gcc on mingw since many
15188# GCC versions complain about %I64.
15189case "${host}" in
15190 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15191esac
15192
81ecdfbb
RW
15193# Check whether --enable-build-warnings was given.
15194if test "${enable_build_warnings+set}" = set; then :
15195 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15196 yes) ;;
15197 no) build_warnings="-w";;
15198 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15199 build_warnings="${build_warnings} ${t}";;
15200 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15201 build_warnings="${t} ${build_warnings}";;
15202 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15203esac
d4f3574e 15204if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15205 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15206fi
81ecdfbb
RW
15207fi
15208# Check whether --enable-gdb-build-warnings was given.
15209if test "${enable_gdb_build_warnings+set}" = set; then :
15210 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15211 yes) ;;
15212 no) build_warnings="-w";;
15213 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15214 build_warnings="${build_warnings} ${t}";;
15215 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15216 build_warnings="${t} ${build_warnings}";;
15217 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15218esac
15219if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15220 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15221fi
81ecdfbb
RW
15222fi
15223WARN_CFLAGS=""
c906108c
SS
15224if test "x${build_warnings}" != x -a "x$GCC" = xyes
15225then
81ecdfbb
RW
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15227$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15228 # Separate out the -Werror flag as some files just cannot be
15229 # compiled with it enabled.
15230 for w in ${build_warnings}; do
15231 case $w in
15232 -Werr*) WERROR_CFLAGS=-Werror ;;
15233 *) # Check that GCC accepts it
4536bbc6
AC
15234 saved_CFLAGS="$CFLAGS"
15235 CFLAGS="$CFLAGS $w"
81ecdfbb 15236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15237/* end confdefs.h. */
4536bbc6 15238
bec39cab
AC
15239int
15240main ()
15241{
4536bbc6 15242
bec39cab
AC
15243 ;
15244 return 0;
15245}
15246_ACEOF
81ecdfbb 15247if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 15248 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15249fi
81ecdfbb 15250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15251 CFLAGS="$saved_CFLAGS"
746a987d
AC
15252 esac
15253 done
81ecdfbb
RW
15254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15255$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15256fi
15257
15258
104c1213 15259
7a292a7a 15260# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15262$as_echo_n "checking for cygwin... " >&6; }
15263if test "${gdb_cv_os_cygwin+set}" = set; then :
15264 $as_echo_n "(cached) " >&6
bec39cab 15265else
81ecdfbb 15266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15267/* end confdefs.h. */
7a292a7a
SS
15268
15269#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15270lose
15271#endif
bec39cab 15272_ACEOF
7a292a7a 15273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15274 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15275 gdb_cv_os_cygwin=yes
15276else
7a292a7a
SS
15277 gdb_cv_os_cygwin=no
15278fi
15279rm -f conftest*
15280
15281fi
81ecdfbb
RW
15282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15283$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15284
aff38e61 15285
3eb25fda 15286SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15287case ${host} in
95cbc983
AC
15288 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15289 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15290 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15291esac
15292
15293
cd0fc7c3
SS
15294# libreadline needs libuser32.a in a cygwin environment
15295WIN32LIBS=
15296if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15297 WIN32LIBS="-luser32"
15298 case "${target}" in
15299 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15300 ;;
15301 esac
cd0fc7c3 15302fi
c906108c 15303
b4505029
MM
15304# The ser-tcp.c module requires sockets.
15305case ${host} in
15306 *mingw32*)
15307
81ecdfbb 15308$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15309
15310 WIN32LIBS="$WIN32LIBS -lws2_32"
15311 ;;
15312esac
15313
7a292a7a 15314
31d99776
DJ
15315# Add ELF support to GDB, but only if BFD includes ELF support.
15316OLD_CFLAGS=$CFLAGS
15317OLD_LDFLAGS=$LDFLAGS
15318OLD_LIBS=$LIBS
12cd34f3
PA
15319# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15320# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15321# always want our bfd.
15322CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 15323LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 15324intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15325# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15326if test "$plugins" = "yes"; then
15327 LIBS="-ldl $LIBS"
15328fi
0f72fb1c 15329LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15331$as_echo_n "checking for ELF support in BFD... " >&6; }
15332if test "${gdb_cv_var_elf+set}" = set; then :
15333 $as_echo_n "(cached) " >&6
31d99776 15334else
81ecdfbb 15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15336/* end confdefs.h. */
15337#include <stdlib.h>
15338#include "bfd.h"
15339#include "elf-bfd.h"
15340
15341int
15342main ()
15343{
15344bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15345 ;
15346 return 0;
15347}
15348_ACEOF
81ecdfbb 15349if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15350 gdb_cv_var_elf=yes
15351else
81ecdfbb 15352 gdb_cv_var_elf=no
31d99776 15353fi
81ecdfbb
RW
15354rm -f core conftest.err conftest.$ac_objext \
15355 conftest$ac_exeext conftest.$ac_ext
31d99776 15356fi
81ecdfbb
RW
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15358$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15359if test $gdb_cv_var_elf = yes; then
15360 CONFIG_OBS="$CONFIG_OBS elfread.o"
15361
81ecdfbb 15362$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15363
075ff26d
JK
15364 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15365 if test "$plugins" = "yes"; then
15366 OLD_LIBS="-ldl $OLD_LIBS"
15367 fi
31d99776
DJ
15368fi
15369CFLAGS=$OLD_CFLAGS
15370LDFLAGS=$OLD_LDFLAGS
15371LIBS=$OLD_LIBS
15372
121ce6e5
DJ
15373# Add any host-specific objects to GDB.
15374CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15375
3fc11d3e
JM
15376LIBGUI="../libgui/src/libgui.a"
15377GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15378
15379
7a292a7a 15380
3fc11d3e
JM
15381WIN32LDAPP=
15382
15383
15384
d91670b9 15385case "${host}" in
686a5eed 15386*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15387 configdir="win"
15388 ;;
15389*)
15390 configdir="unix"
15391 ;;
15392esac
3fc11d3e
JM
15393
15394GDBTKLIBS=
15395if test "${enable_gdbtk}" = "yes"; then
15396
d1c3b63a
KS
15397 # Gdbtk must have an absolute path to srcdir in order to run
15398 # properly when not installed.
15399 here=`pwd`
15400 cd ${srcdir}
15401 GDBTK_SRC_DIR=`pwd`
15402 cd $here
15403
bec39cab 15404
5062cc19
KS
15405 #
15406 # Ok, lets find the tcl configuration
15407 # First, look for one uninstalled.
15408 # the alternative search directory is invoked by --with-tcl
15409 #
3fc11d3e 15410
5062cc19
KS
15411 if test x"${no_tcl}" = x ; then
15412 # we reset no_tcl in case something fails here
15413 no_tcl=true
bec39cab 15414
81ecdfbb
RW
15415# Check whether --with-tcl was given.
15416if test "${with_tcl+set}" = set; then :
15417 withval=$with_tcl; with_tclconfig=${withval}
15418fi
15419
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15421$as_echo_n "checking for Tcl configuration... " >&6; }
15422 if test "${ac_cv_c_tclconfig+set}" = set; then :
15423 $as_echo_n "(cached) " >&6
3fc11d3e 15424else
bec39cab 15425
3fc11d3e 15426
5062cc19
KS
15427 # First check to see if --with-tcl was specified.
15428 case "${host}" in
15429 *-*-cygwin*) platDir="win" ;;
15430 *) platDir="unix" ;;
15431 esac
15432 if test x"${with_tclconfig}" != x ; then
15433 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15434 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15435 else
81ecdfbb 15436 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15437 fi
15438 fi
15439
15440 # then check for a private Tcl installation
15441 if test x"${ac_cv_c_tclconfig}" = x ; then
15442 for i in \
15443 ../tcl \
15444 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15445 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15446 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15447 ../../tcl \
15448 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15449 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15450 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15451 ../../../tcl \
15452 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15453 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15454 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15455 if test -f "$i/$platDir/tclConfig.sh" ; then
15456 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15457 break
15458 fi
15459 done
15460 fi
15461
15462 # on Darwin, check in Framework installation locations
15463 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15464 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15465 `ls -d /Library/Frameworks 2>/dev/null` \
15466 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15467 `ls -d /System/Library/Frameworks 2>/dev/null` \
15468 ; do
15469 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15470 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15471 break
15472 fi
15473 done
15474 fi
15475
15476 # check in a few common install locations
15477 if test x"${ac_cv_c_tclconfig}" = x ; then
15478 for i in `ls -d ${libdir} 2>/dev/null` \
15479 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15480 `ls -d ${prefix}/lib 2>/dev/null` \
15481 `ls -d /usr/local/lib 2>/dev/null` \
15482 `ls -d /usr/contrib/lib 2>/dev/null` \
15483 `ls -d /usr/lib 2>/dev/null` \
15484 ; do
15485 if test -f "$i/tclConfig.sh" ; then
15486 ac_cv_c_tclconfig=`(cd $i; pwd)`
15487 break
15488 fi
15489 done
15490 fi
3fc11d3e 15491
5062cc19
KS
15492 # check in a few other private locations
15493 if test x"${ac_cv_c_tclconfig}" = x ; then
15494 for i in \
15495 ${srcdir}/../tcl \
15496 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15497 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15498 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15499 if test -f "$i/$platDir/tclConfig.sh" ; then
15500 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15501 break
15502 fi
15503 done
15504 fi
bec39cab 15505
3fc11d3e
JM
15506fi
15507
5062cc19
KS
15508
15509 if test x"${ac_cv_c_tclconfig}" = x ; then
15510 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15512$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15513 else
15514 no_tcl=
15515 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15517$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15518 fi
15519 fi
3fc11d3e 15520
bec39cab 15521
85541719
DE
15522 # If $no_tk is nonempty, then we can't do Tk, and there is no
15523 # point to doing Tcl.
bec39cab 15524
5062cc19
KS
15525 #
15526 # Ok, lets find the tk configuration
15527 # First, look for one uninstalled.
15528 # the alternative search directory is invoked by --with-tk
15529 #
3fc11d3e 15530
5062cc19
KS
15531 if test x"${no_tk}" = x ; then
15532 # we reset no_tk in case something fails here
15533 no_tk=true
bec39cab 15534
81ecdfbb
RW
15535# Check whether --with-tk was given.
15536if test "${with_tk+set}" = set; then :
15537 withval=$with_tk; with_tkconfig=${withval}
15538fi
15539
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15541$as_echo_n "checking for Tk configuration... " >&6; }
15542 if test "${ac_cv_c_tkconfig+set}" = set; then :
15543 $as_echo_n "(cached) " >&6
bec39cab 15544else
3fc11d3e
JM
15545
15546
5062cc19
KS
15547 # First check to see if --with-tkconfig was specified.
15548 if test x"${with_tkconfig}" != x ; then
15549 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15550 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15551 else
81ecdfbb 15552 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15553 fi
15554 fi
3fc11d3e 15555
5062cc19
KS
15556 # then check for a private Tk library
15557 case "${host}" in
15558 *-*-cygwin*) platDir="win" ;;
15559 *) platDir="unix" ;;
15560 esac
15561 if test x"${ac_cv_c_tkconfig}" = x ; then
15562 for i in \
15563 ../tk \
15564 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15565 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15566 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15567 ../../tk \
15568 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15569 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15570 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15571 ../../../tk \
15572 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15573 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15574 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15575 if test -f "$i/$platDir/tkConfig.sh" ; then
15576 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15577 break
15578 fi
15579 done
15580 fi
15581
15582 # on Darwin, check in Framework installation locations
15583 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15584 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15585 `ls -d /Library/Frameworks 2>/dev/null` \
15586 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15587 `ls -d /System/Library/Frameworks 2>/dev/null` \
15588 ; do
15589 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15590 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15591 break
15592 fi
15593 done
15594 fi
15595
15596 # check in a few common install locations
15597 if test x"${ac_cv_c_tkconfig}" = x ; then
15598 for i in `ls -d ${libdir} 2>/dev/null` \
15599 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15600 `ls -d ${prefix}/lib 2>/dev/null` \
15601 `ls -d /usr/local/lib 2>/dev/null` \
15602 `ls -d /usr/contrib/lib 2>/dev/null` \
15603 `ls -d /usr/lib 2>/dev/null` \
15604 ; do
15605 if test -f "$i/tkConfig.sh" ; then
15606 ac_cv_c_tkconfig=`(cd $i; pwd)`
15607 break
15608 fi
15609 done
15610 fi
15611 # check in a few other private locations
15612 if test x"${ac_cv_c_tkconfig}" = x ; then
15613 for i in \
15614 ${srcdir}/../tk \
15615 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15616 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15617 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15618 if test -f "$i/$platDir/tkConfig.sh" ; then
15619 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15620 break
15621 fi
15622 done
15623 fi
3fc11d3e 15624
3fc11d3e
JM
15625fi
15626
15627
5062cc19
KS
15628 if test x"${ac_cv_c_tkconfig}" = x ; then
15629 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15631$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15632 else
15633 no_tk=
15634 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15636$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15637 fi
3fc11d3e 15638 fi
dd2504ab 15639
dd2504ab 15640
85541719
DE
15641 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15642
81ecdfbb
RW
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15644$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15645
15646 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15648$as_echo "loading" >&6; }
85541719
DE
15649 . ${TCL_BIN_DIR}/tclConfig.sh
15650 else
81ecdfbb
RW
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15652$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15653 fi
15654
15655 # eval is required to do the TCL_DBGX substitution
15656 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15657 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15658
15659 # If the TCL_BIN_DIR is the build directory (not the install directory),
15660 # then set the common variable name to the value of the build variables.
15661 # For example, the variable TCL_LIB_SPEC will be set to the value
15662 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15663 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15664 # installed and uninstalled version of Tcl.
15665 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15666 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15667 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15668 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15669 elif test "`uname -s`" = "Darwin"; then
15670 # If Tcl was built as a framework, attempt to use the libraries
15671 # from the framework at the given location so that linking works
15672 # against Tcl.framework installed in an arbitary location.
15673 case ${TCL_DEFS} in
15674 *TCL_FRAMEWORK*)
15675 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15676 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15677 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15678 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15679 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15680 break
15681 fi
15682 done
15683 fi
15684 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15685 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15686 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15687 fi
15688 ;;
15689 esac
15690 fi
15691
15692 # eval is required to do the TCL_DBGX substitution
15693 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15694 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15695 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15696 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712 # Check for in-tree tcl
15713 here=`pwd`
15714 cd ${srcdir}/..
15715 topdir=`pwd`
15716 cd ${here}
15717
15718 intree="no"
15719 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15720 intree="yes"
15721 fi
15722
15723 # Find Tcl private headers
15724 if test x"${intree}" = xno; then
15725
81ecdfbb
RW
15726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15727$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15728 private_dir=""
15729 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15730 if test -f ${dir}/tclInt.h ; then
15731 private_dir=${dir}
15732 fi
15733
15734 if test x"${private_dir}" = x; then
81ecdfbb 15735 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15736 else
15737 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15739$as_echo "${private_dir}" >&6; }
85541719
DE
15740 fi
15741
15742 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15743 TCL_LIBRARY="${TCL_LIB_SPEC}"
15744 TCL_DEPS=""
15745 else
15746 # If building tcl in the same src tree, private headers
15747 # are not needed, but we need to be sure to use the right
15748 # headers library
15749 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15750 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15751 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15752 fi
15753
15754
15755
15756
15757
81ecdfbb
RW
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15759$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15760
5062cc19 15761 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15763$as_echo "loading" >&6; }
5062cc19 15764 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15765 else
81ecdfbb
RW
15766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15767$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15768 fi
bec39cab 15769
5062cc19
KS
15770 # eval is required to do the TK_DBGX substitution
15771 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15772 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15773
15774 # If the TK_BIN_DIR is the build directory (not the install directory),
15775 # then set the common variable name to the value of the build variables.
15776 # For example, the variable TK_LIB_SPEC will be set to the value
15777 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15778 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15779 # installed and uninstalled version of Tcl.
85541719 15780 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15781 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15782 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15783 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15784 elif test "`uname -s`" = "Darwin"; then
15785 # If Tk was built as a framework, attempt to use the libraries
15786 # from the framework at the given location so that linking works
15787 # against Tk.framework installed in an arbitary location.
15788 case ${TK_DEFS} in
15789 *TK_FRAMEWORK*)
85541719 15790 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15791 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15792 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15793 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15794 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15795 break
15796 fi
15797 done
15798 fi
85541719 15799 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15800 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15801 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15802 fi
15803 ;;
15804 esac
3fc11d3e
JM
15805 fi
15806
5062cc19
KS
15807 # eval is required to do the TK_DBGX substitution
15808 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15809 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15810 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15811 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15812
3fc11d3e
JM
15813
15814
bec39cab
AC
15815
15816
15817
15818
15819
15820
15821
3fc11d3e 15822
3fc11d3e 15823
bec39cab 15824
bec39cab 15825
85541719
DE
15826 # Check for in-tree Tk
15827 intree="no"
15828 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15829 intree="yes"
15830 fi
3fc11d3e 15831
85541719
DE
15832 # Find Tk private headers
15833 if test x"${intree}" = xno; then
3fc11d3e 15834
81ecdfbb
RW
15835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15836$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15837 private_dir=""
15838 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15839 if test -f ${dir}/tkInt.h; then
15840 private_dir=${dir}
3fc11d3e 15841 fi
bec39cab 15842
5062cc19 15843 if test x"${private_dir}" = x; then
81ecdfbb 15844 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15845 else
5062cc19 15846 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15848$as_echo "${private_dir}" >&6; }
3fc11d3e 15849 fi
3fc11d3e 15850
85541719
DE
15851 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15852 TK_LIBRARY=${TK_LIB_SPEC}
15853 TK_DEPS=""
15854 else
15855 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15856 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15857 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15858 fi
3fc11d3e
JM
15859
15860
3fc11d3e
JM
15861
15862
3fc11d3e 15863
85541719 15864 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15865
85541719
DE
15866 # Include some libraries that Tcl and Tk want.
15867 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15868 # Yes, the ordering seems wrong here. But it isn't.
15869 # TK_LIBS is the list of libraries that need to be linked
15870 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15871 # were in LIBS then any link tests after this point would
15872 # try to include things like `$(LIBGUI)', which wouldn't work.
15873 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15874
85541719
DE
15875 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15876 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15877 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15878 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15879 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15880 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15881 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15882
85541719
DE
15883 if test x$gdb_cv_os_cygwin = xyes; then
15884 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15885 WIN32LDAPP="-Wl,--subsystem,console"
15886 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15887 fi
ffc6a242 15888
81ecdfbb 15889 subdirs="$subdirs gdbtk"
3ace7edb 15890
85541719 15891 fi
3fc11d3e
JM
15892fi
15893
15894
15895
15896
15897
15898
15899
15900
81ecdfbb
RW
15901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15902$as_echo_n "checking for X... " >&6; }
bec39cab 15903
c906108c 15904
81ecdfbb
RW
15905# Check whether --with-x was given.
15906if test "${with_x+set}" = set; then :
15907 withval=$with_x;
15908fi
c906108c
SS
15909
15910# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15911if test "x$with_x" = xno; then
15912 # The user explicitly disabled X.
15913 have_x=disabled
15914else
81ecdfbb
RW
15915 case $x_includes,$x_libraries in #(
15916 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15917 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15918 $as_echo_n "(cached) " >&6
c906108c
SS
15919else
15920 # One or both of the vars are not set, and there is no cached value.
bec39cab 15921ac_x_includes=no ac_x_libraries=no
81ecdfbb 15922rm -f -r conftest.dir
bec39cab
AC
15923if mkdir conftest.dir; then
15924 cd conftest.dir
bec39cab 15925 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15926incroot:
15927 @echo incroot='${INCROOT}'
15928usrlibdir:
15929 @echo usrlibdir='${USRLIBDIR}'
15930libdir:
15931 @echo libdir='${LIBDIR}'
15932_ACEOF
15933 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15934 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15935 for ac_var in incroot usrlibdir libdir; do
15936 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15937 done
c906108c 15938 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15939 for ac_extension in a so sl dylib la dll; do
15940 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15941 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15942 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15943 fi
15944 done
15945 # Screen out bogus values from the imake configuration. They are
15946 # bogus both because they are the default anyway, and because
15947 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15948 case $ac_im_incroot in
81ecdfbb 15949 /usr/include) ac_x_includes= ;;
bec39cab 15950 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15951 esac
bec39cab 15952 case $ac_im_usrlibdir in
81ecdfbb 15953 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15954 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15955 esac
15956 fi
15957 cd ..
81ecdfbb 15958 rm -f -r conftest.dir
c906108c
SS
15959fi
15960
bec39cab
AC
15961# Standard set of common directories for X headers.
15962# Check X11 before X11Rn because it is often a symlink to the current release.
15963ac_x_header_dirs='
15964/usr/X11/include
81ecdfbb 15965/usr/X11R7/include
bec39cab
AC
15966/usr/X11R6/include
15967/usr/X11R5/include
15968/usr/X11R4/include
15969
15970/usr/include/X11
81ecdfbb 15971/usr/include/X11R7
bec39cab
AC
15972/usr/include/X11R6
15973/usr/include/X11R5
15974/usr/include/X11R4
15975
15976/usr/local/X11/include
81ecdfbb 15977/usr/local/X11R7/include
bec39cab
AC
15978/usr/local/X11R6/include
15979/usr/local/X11R5/include
15980/usr/local/X11R4/include
15981
15982/usr/local/include/X11
81ecdfbb 15983/usr/local/include/X11R7
bec39cab
AC
15984/usr/local/include/X11R6
15985/usr/local/include/X11R5
15986/usr/local/include/X11R4
15987
15988/usr/X386/include
15989/usr/x386/include
15990/usr/XFree86/include/X11
15991
15992/usr/include
15993/usr/local/include
15994/usr/unsupported/include
15995/usr/athena/include
15996/usr/local/x11r5/include
15997/usr/lpp/Xamples/include
15998
15999/usr/openwin/include
16000/usr/openwin/share/include'
16001
16002if test "$ac_x_includes" = no; then
81ecdfbb 16003 # Guess where to find include files, by looking for Xlib.h.
c906108c 16004 # First, try using that file with no special directory specified.
81ecdfbb 16005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16006/* end confdefs.h. */
81ecdfbb 16007#include <X11/Xlib.h>
bec39cab 16008_ACEOF
81ecdfbb 16009if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16010 # We can compile using X headers with no special include directory.
16011ac_x_includes=
16012else
bec39cab 16013 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16014 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16015 ac_x_includes=$ac_dir
16016 break
16017 fi
16018done
c906108c 16019fi
bec39cab
AC
16020rm -f conftest.err conftest.$ac_ext
16021fi # $ac_x_includes = no
c906108c 16022
bec39cab 16023if test "$ac_x_libraries" = no; then
c906108c 16024 # Check for the libraries.
c906108c
SS
16025 # See if we find them without any special options.
16026 # Don't add to $LIBS permanently.
bec39cab 16027 ac_save_LIBS=$LIBS
81ecdfbb
RW
16028 LIBS="-lX11 $LIBS"
16029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16030/* end confdefs.h. */
81ecdfbb 16031#include <X11/Xlib.h>
bec39cab
AC
16032int
16033main ()
16034{
81ecdfbb 16035XrmInitialize ()
bec39cab
AC
16036 ;
16037 return 0;
16038}
16039_ACEOF
81ecdfbb 16040if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16041 LIBS=$ac_save_LIBS
c906108c
SS
16042# We can link X programs with no special library path.
16043ac_x_libraries=
16044else
81ecdfbb
RW
16045 LIBS=$ac_save_LIBS
16046for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16047do
bec39cab 16048 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16049 for ac_extension in a so sl dylib la dll; do
16050 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16051 ac_x_libraries=$ac_dir
16052 break 2
16053 fi
16054 done
16055done
16056fi
81ecdfbb
RW
16057rm -f core conftest.err conftest.$ac_objext \
16058 conftest$ac_exeext conftest.$ac_ext
bec39cab 16059fi # $ac_x_libraries = no
c906108c 16060
81ecdfbb
RW
16061case $ac_x_includes,$ac_x_libraries in #(
16062 no,* | *,no | *\'*)
16063 # Didn't find X, or a directory has "'" in its name.
16064 ac_cv_have_x="have_x=no";; #(
16065 *)
16066 # Record where we found X for the cache.
16067 ac_cv_have_x="have_x=yes\
16068 ac_x_includes='$ac_x_includes'\
16069 ac_x_libraries='$ac_x_libraries'"
16070esac
c906108c 16071fi
81ecdfbb
RW
16072;; #(
16073 *) have_x=yes;;
16074 esac
c906108c
SS
16075 eval "$ac_cv_have_x"
16076fi # $with_x != no
16077
16078if test "$have_x" != yes; then
81ecdfbb
RW
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16080$as_echo "$have_x" >&6; }
c906108c
SS
16081 no_x=yes
16082else
16083 # If each of the values was on the command line, it overrides each guess.
16084 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16085 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16086 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16087 ac_cv_have_x="have_x=yes\
16088 ac_x_includes='$x_includes'\
16089 ac_x_libraries='$x_libraries'"
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16091$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16092fi
16093
16094
bec39cab 16095# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16096# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16097# This code just checks for a few cases where we'd like to ignore those
16098# definitions, even when they're present in the '.mt' file. These cases
16099# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16100# not part of the source tree.
7a292a7a 16101#
81ecdfbb
RW
16102# Check whether --enable-sim was given.
16103if test "${enable_sim+set}" = set; then :
16104 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16105 echo "enableval = ${enableval}";
16106 case "${enableval}" in
16107 yes) ignore_sim=false ;;
16108 no) ignore_sim=true ;;
16109 *) ignore_sim=false ;;
16110 esac
16111else
16112 ignore_sim=false
81ecdfbb
RW
16113fi
16114
7a292a7a
SS
16115
16116if test ! -d "${srcdir}/../sim"; then
16117 ignore_sim=true
16118fi
16119
9b624dbe
UW
16120SIM=
16121SIM_OBS=
16122if test "${ignore_sim}" = "false"; then
16123 if test x"${gdb_sim}" != x ; then
16124 SIM="${gdb_sim}"
16125 SIM_OBS="remote-sim.o"
60ca704f 16126
81ecdfbb 16127$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16128
9b624dbe 16129 fi
7a292a7a
SS
16130fi
16131
16132
16133
c906108c
SS
16134
16135
16136
16137
16138
16139
dfcd3bfb 16140
e56ac5c3
AC
16141
16142
b3a90332
AC
16143
16144
c35f4ffc 16145# List of host floatformats.
bec39cab
AC
16146
16147cat >>confdefs.h <<_ACEOF
c35f4ffc 16148#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16149_ACEOF
c35f4ffc 16150
bec39cab
AC
16151
16152cat >>confdefs.h <<_ACEOF
c35f4ffc 16153#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16154_ACEOF
16155
c35f4ffc 16156
bec39cab 16157cat >>confdefs.h <<_ACEOF
c35f4ffc 16158#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16159_ACEOF
c35f4ffc
AC
16160
16161
c906108c
SS
16162# target_subdir is used by the testsuite to find the target libraries.
16163target_subdir=
16164if test "${host}" != "${target}"; then
16165 target_subdir="${target_alias}/"
16166fi
16167
16168
16169frags=
771b4502 16170if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16171 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16172 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16173 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16174 fi
16175 frags="$frags $host_makefile_frag"
16176else
16177 host_makefile_frag=/dev/null
c906108c 16178fi
c906108c 16179
c906108c
SS
16180
16181
16182
771b4502 16183if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16184# We pick this up from the host configuration file (.mh) because we
16185# do not have a native configuration Makefile fragment.
c906108c
SS
16186nativefile=`sed -n '
16187s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16188' ${host_makefile_frag}`
c906108c
SS
16189fi
16190
16191
b00a8037 16192if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16193
16194cat >>confdefs.h <<_ACEOF
b00a8037 16195#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16196_ACEOF
b00a8037
DJ
16197
16198fi
16199
8dcde887 16200# Enable multi-ice-gdb-server.
81ecdfbb
RW
16201# Check whether --enable-multi-ice was given.
16202if test "${enable_multi_ice+set}" = set; then :
16203 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16204 yes | no)
16205 ;;
81ecdfbb 16206 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16207 esac
81ecdfbb 16208fi
b4e70030 16209
81ecdfbb
RW
16210if test "x$enable_multi_ice" = xyes; then
16211 subdirs="$subdirs multi-ice"
3ace7edb 16212
a85f51e7
DJ
16213fi
16214
496c0e1b
JB
16215# Check whether --enable-gdbserver was given.
16216if test "${enable_gdbserver+set}" = set; then :
16217 enableval=$enable_gdbserver; case "${enableval}" in
16218 yes| no|auto) ;;
16219 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16220esac
16221else
16222 enable_gdbserver=auto
16223fi
16224
16225
16226# We only build gdbserver automatically in a native configuration, and
16227# only if the user did not explicitly disable its build.
16228if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16230$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16231 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16233$as_echo "yes" >&6; }
16234 subdirs="$subdirs gdbserver"
3ace7edb 16235
496c0e1b 16236 gdbserver_build_enabled=yes
8dcde887 16237 else
81ecdfbb
RW
16238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16239$as_echo "no" >&6; }
8dcde887
MK
16240 fi
16241fi
16242
496c0e1b
JB
16243# If the user explicitly request the gdbserver to be built, verify that
16244# we were in fact able to enable it.
16245if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16246 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16247fi
16248
db985757 16249# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16250# to an empty version.
c906108c
SS
16251
16252files=
16253links=
5a2402b8 16254
c906108c
SS
16255rm -f nm.h
16256if test "${nativefile}" != ""; then
0f475e27
AC
16257 case "${nativefile}" in
16258 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16259 * ) GDB_NM_FILE="${nativefile}"
16260 esac
5a2402b8
AC
16261 files="${files} ${GDB_NM_FILE}"
16262 links="${links} nm.h"
60ca704f
SE
16263
16264cat >>confdefs.h <<_ACEOF
b78960be 16265#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16266_ACEOF
5a2402b8 16267
c906108c 16268fi
5a2402b8
AC
16269
16270
bec39cab
AC
16271ac_sources="$files"
16272ac_dests="$links"
16273while test -n "$ac_sources"; do
16274 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16275 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16276 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16277done
81ecdfbb 16278ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16279
16280
c906108c
SS
16281
16282
c906108c 16283
81ecdfbb 16284$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16285
bec39cab 16286
5ae98d25 16287ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16288
16289ac_config_commands="$ac_config_commands default"
89a34d1b 16290
bec39cab
AC
16291cat >confcache <<\_ACEOF
16292# This file is a shell script that caches the results of configure
16293# tests run on this system so they can be shared between configure
16294# scripts and configure runs, see configure's option --config-cache.
16295# It is not useful on other systems. If it contains results you don't
16296# want to keep, you may remove or edit it.
16297#
16298# config.status only pays attention to the cache file if you give it
16299# the --recheck option to rerun configure.
16300#
16301# `ac_cv_env_foo' variables (set or unset) will be overridden when
16302# loading this file, other *unset* `ac_cv_foo' will be assigned the
16303# following values.
16304
16305_ACEOF
16306
16307# The following way of writing the cache mishandles newlines in values,
16308# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16309# So, we kill variables containing newlines.
bec39cab
AC
16310# Ultrix sh set writes to stderr and can't be redirected directly,
16311# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16312(
16313 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16314 eval ac_val=\$$ac_var
16315 case $ac_val in #(
16316 *${as_nl}*)
16317 case $ac_var in #(
16318 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16319$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16320 esac
16321 case $ac_var in #(
16322 _ | IFS | as_nl) ;; #(
16323 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16324 *) { eval $ac_var=; unset $ac_var;} ;;
16325 esac ;;
16326 esac
16327 done
16328
bec39cab 16329 (set) 2>&1 |
81ecdfbb
RW
16330 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16331 *${as_nl}ac_space=\ *)
16332 # `set' does not quote correctly, so add quotes: double-quote
16333 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16334 sed -n \
16335 "s/'/'\\\\''/g;
16336 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16337 ;; #(
bec39cab
AC
16338 *)
16339 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16340 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16341 ;;
81ecdfbb
RW
16342 esac |
16343 sort
16344) |
bec39cab 16345 sed '
81ecdfbb 16346 /^ac_cv_env_/b end
bec39cab 16347 t clear
81ecdfbb 16348 :clear
bec39cab
AC
16349 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16350 t end
81ecdfbb
RW
16351 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16352 :end' >>confcache
16353if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16354 if test -w "$cache_file"; then
16355 test "x$cache_file" != "x/dev/null" &&
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16357$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16358 cat confcache >$cache_file
16359 else
81ecdfbb
RW
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16361$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16362 fi
16363fi
16364rm -f confcache
16365
16366test "x$prefix" = xNONE && prefix=$ac_default_prefix
16367# Let make expand exec_prefix.
16368test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16369
bec39cab
AC
16370DEFS=-DHAVE_CONFIG_H
16371
16372ac_libobjs=
16373ac_ltlibobjs=
16374for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16375 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16376 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16377 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16378 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16379 # will be set to the directory where LIBOBJS objects are built.
16380 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16381 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16382done
16383LIBOBJS=$ac_libobjs
16384
16385LTLIBOBJS=$ac_ltlibobjs
16386
16387
85981d60 16388if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16389 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16390Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16391fi
a417dc56 16392if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16393 as_fn_error "conditional \"GMAKE\" was never defined.
16394Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16395fi
783e057b 16396if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16397 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16398Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16399fi
16400
16401 gl_libobjs=
16402 gl_ltlibobjs=
16403 if test -n "$gl_LIBOBJS"; then
16404 # Remove the extension.
16405 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16406 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16407 gl_libobjs="$gl_libobjs $i.$ac_objext"
16408 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16409 done
16410 fi
16411 gl_LIBOBJS=$gl_libobjs
16412
16413 gl_LTLIBOBJS=$gl_ltlibobjs
16414
16415
16416
16417 gltests_libobjs=
16418 gltests_ltlibobjs=
16419 if test -n "$gltests_LIBOBJS"; then
16420 # Remove the extension.
16421 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16422 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16423 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16424 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16425 done
16426 fi
16427 gltests_LIBOBJS=$gltests_libobjs
16428
16429 gltests_LTLIBOBJS=$gltests_ltlibobjs
16430
16431
e28b3332 16432if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16433 as_fn_error "conditional \"AMDEP\" was never defined.
16434Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16435fi
16436if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16437 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16438Usually this means the macro was only invoked conditionally." "$LINENO" 5
16439fi
16440 if test -n "$EXEEXT"; then
16441 am__EXEEXT_TRUE=
16442 am__EXEEXT_FALSE='#'
16443else
16444 am__EXEEXT_TRUE='#'
16445 am__EXEEXT_FALSE=
e28b3332 16446fi
bec39cab 16447
81ecdfbb
RW
16448
16449
bec39cab 16450: ${CONFIG_STATUS=./config.status}
81ecdfbb 16451ac_write_fail=0
bec39cab
AC
16452ac_clean_files_save=$ac_clean_files
16453ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16454{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16455$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16456as_write_fail=0
16457cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16458#! $SHELL
16459# Generated by $as_me.
16460# Run this file to recreate the current configuration.
16461# Compiler output produced by configure, useful for debugging
16462# configure, is in config.log if it exists.
16463
16464debug=false
16465ac_cs_recheck=false
16466ac_cs_silent=false
bec39cab 16467
81ecdfbb
RW
16468SHELL=\${CONFIG_SHELL-$SHELL}
16469export SHELL
16470_ASEOF
16471cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16472## -------------------- ##
16473## M4sh Initialization. ##
16474## -------------------- ##
16475
16476# Be more Bourne compatible
16477DUALCASE=1; export DUALCASE # for MKS sh
16478if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16479 emulate sh
16480 NULLCMD=:
81ecdfbb 16481 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16482 # is contrary to our usage. Disable this feature.
16483 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16484 setopt NO_GLOB_SUBST
16485else
16486 case `(set -o) 2>/dev/null` in #(
16487 *posix*) :
16488 set -o posix ;; #(
16489 *) :
16490 ;;
16491esac
bec39cab 16492fi
bec39cab 16493
81ecdfbb
RW
16494
16495as_nl='
16496'
16497export as_nl
16498# Printing a long string crashes Solaris 7 /usr/bin/printf.
16499as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16500as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16501as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16502# Prefer a ksh shell builtin over an external printf program on Solaris,
16503# but without wasting forks for bash or zsh.
16504if test -z "$BASH_VERSION$ZSH_VERSION" \
16505 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16506 as_echo='print -r --'
16507 as_echo_n='print -rn --'
16508elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16509 as_echo='printf %s\n'
16510 as_echo_n='printf %s'
16511else
16512 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16513 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16514 as_echo_n='/usr/ucb/echo -n'
16515 else
16516 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16517 as_echo_n_body='eval
16518 arg=$1;
16519 case $arg in #(
16520 *"$as_nl"*)
16521 expr "X$arg" : "X\\(.*\\)$as_nl";
16522 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16523 esac;
16524 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16525 '
16526 export as_echo_n_body
16527 as_echo_n='sh -c $as_echo_n_body as_echo'
16528 fi
16529 export as_echo_body
16530 as_echo='sh -c $as_echo_body as_echo'
16531fi
16532
16533# The user is always right.
16534if test "${PATH_SEPARATOR+set}" != set; then
16535 PATH_SEPARATOR=:
16536 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16537 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16538 PATH_SEPARATOR=';'
16539 }
bec39cab
AC
16540fi
16541
16542
81ecdfbb
RW
16543# IFS
16544# We need space, tab and new line, in precisely that order. Quoting is
16545# there to prevent editors from complaining about space-tab.
16546# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16547# splitting by setting IFS to empty value.)
16548IFS=" "" $as_nl"
16549
16550# Find who we are. Look in the path if we contain no directory separator.
16551case $0 in #((
16552 *[\\/]* ) as_myself=$0 ;;
16553 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16554for as_dir in $PATH
16555do
16556 IFS=$as_save_IFS
16557 test -z "$as_dir" && as_dir=.
16558 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16559 done
16560IFS=$as_save_IFS
16561
16562 ;;
16563esac
16564# We did not find ourselves, most probably we were run as `sh COMMAND'
16565# in which case we are not to be found in the path.
16566if test "x$as_myself" = x; then
16567 as_myself=$0
16568fi
16569if test ! -f "$as_myself"; then
16570 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16571 exit 1
16572fi
16573
16574# Unset variables that we do not need and which cause bugs (e.g. in
16575# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16576# suppresses any "Segmentation fault" message there. '((' could
16577# trigger a bug in pdksh 5.2.14.
16578for as_var in BASH_ENV ENV MAIL MAILPATH
16579do eval test x\${$as_var+set} = xset \
16580 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16581done
bec39cab
AC
16582PS1='$ '
16583PS2='> '
16584PS4='+ '
16585
16586# NLS nuisances.
81ecdfbb
RW
16587LC_ALL=C
16588export LC_ALL
16589LANGUAGE=C
16590export LANGUAGE
16591
16592# CDPATH.
16593(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16594
16595
16596# as_fn_error ERROR [LINENO LOG_FD]
16597# ---------------------------------
16598# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16599# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16600# script with status $?, using 1 if that was 0.
16601as_fn_error ()
16602{
16603 as_status=$?; test $as_status -eq 0 && as_status=1
16604 if test "$3"; then
16605 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16606 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16607 fi
16608 $as_echo "$as_me: error: $1" >&2
16609 as_fn_exit $as_status
16610} # as_fn_error
16611
16612
16613# as_fn_set_status STATUS
16614# -----------------------
16615# Set $? to STATUS, without forking.
16616as_fn_set_status ()
16617{
16618 return $1
16619} # as_fn_set_status
16620
16621# as_fn_exit STATUS
16622# -----------------
16623# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16624as_fn_exit ()
16625{
16626 set +e
16627 as_fn_set_status $1
16628 exit $1
16629} # as_fn_exit
16630
16631# as_fn_unset VAR
16632# ---------------
16633# Portably unset VAR.
16634as_fn_unset ()
16635{
16636 { eval $1=; unset $1;}
16637}
16638as_unset=as_fn_unset
16639# as_fn_append VAR VALUE
16640# ----------------------
16641# Append the text in VALUE to the end of the definition contained in VAR. Take
16642# advantage of any shell optimizations that allow amortized linear growth over
16643# repeated appends, instead of the typical quadratic growth present in naive
16644# implementations.
16645if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16646 eval 'as_fn_append ()
16647 {
16648 eval $1+=\$2
16649 }'
16650else
16651 as_fn_append ()
16652 {
16653 eval $1=\$$1\$2
16654 }
16655fi # as_fn_append
16656
16657# as_fn_arith ARG...
16658# ------------------
16659# Perform arithmetic evaluation on the ARGs, and store the result in the
16660# global $as_val. Take advantage of shells that can avoid forks. The arguments
16661# must be portable across $(()) and expr.
16662if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16663 eval 'as_fn_arith ()
16664 {
16665 as_val=$(( $* ))
16666 }'
16667else
16668 as_fn_arith ()
16669 {
16670 as_val=`expr "$@" || test $? -eq 1`
16671 }
16672fi # as_fn_arith
bec39cab 16673
81ecdfbb
RW
16674
16675if expr a : '\(a\)' >/dev/null 2>&1 &&
16676 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16677 as_expr=expr
16678else
16679 as_expr=false
16680fi
16681
81ecdfbb 16682if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16683 as_basename=basename
16684else
16685 as_basename=false
16686fi
16687
81ecdfbb
RW
16688if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16689 as_dirname=dirname
16690else
16691 as_dirname=false
16692fi
bec39cab 16693
81ecdfbb 16694as_me=`$as_basename -- "$0" ||
bec39cab
AC
16695$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16696 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16697 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16698$as_echo X/"$0" |
16699 sed '/^.*\/\([^/][^/]*\)\/*$/{
16700 s//\1/
16701 q
16702 }
16703 /^X\/\(\/\/\)$/{
16704 s//\1/
16705 q
16706 }
16707 /^X\/\(\/\).*/{
16708 s//\1/
16709 q
16710 }
16711 s/.*/./; q'`
b4e70030 16712
b4e70030
JB
16713# Avoid depending upon Character Ranges.
16714as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16715as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16716as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16717as_cr_digits='0123456789'
16718as_cr_alnum=$as_cr_Letters$as_cr_digits
16719
81ecdfbb
RW
16720ECHO_C= ECHO_N= ECHO_T=
16721case `echo -n x` in #(((((
16722-n*)
16723 case `echo 'xy\c'` in
16724 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16725 xy) ECHO_C='\c';;
16726 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16727 ECHO_T=' ';;
16728 esac;;
16729*)
16730 ECHO_N='-n';;
bec39cab
AC
16731esac
16732
81ecdfbb
RW
16733rm -f conf$$ conf$$.exe conf$$.file
16734if test -d conf$$.dir; then
16735 rm -f conf$$.dir/conf$$.file
bec39cab 16736else
81ecdfbb
RW
16737 rm -f conf$$.dir
16738 mkdir conf$$.dir 2>/dev/null
bec39cab 16739fi
81ecdfbb
RW
16740if (echo >conf$$.file) 2>/dev/null; then
16741 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16742 as_ln_s='ln -s'
81ecdfbb
RW
16743 # ... but there are two gotchas:
16744 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16745 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16746 # In both cases, we have to default to `cp -p'.
16747 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16748 as_ln_s='cp -p'
16749 elif ln conf$$.file conf$$ 2>/dev/null; then
16750 as_ln_s=ln
16751 else
16752 as_ln_s='cp -p'
b4e70030 16753 fi
bec39cab
AC
16754else
16755 as_ln_s='cp -p'
16756fi
81ecdfbb
RW
16757rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16758rmdir conf$$.dir 2>/dev/null
16759
16760
16761# as_fn_mkdir_p
16762# -------------
16763# Create "$as_dir" as a directory, including parents if necessary.
16764as_fn_mkdir_p ()
16765{
16766
16767 case $as_dir in #(
16768 -*) as_dir=./$as_dir;;
16769 esac
16770 test -d "$as_dir" || eval $as_mkdir_p || {
16771 as_dirs=
16772 while :; do
16773 case $as_dir in #(
16774 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16775 *) as_qdir=$as_dir;;
16776 esac
16777 as_dirs="'$as_qdir' $as_dirs"
16778 as_dir=`$as_dirname -- "$as_dir" ||
16779$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16780 X"$as_dir" : 'X\(//\)[^/]' \| \
16781 X"$as_dir" : 'X\(//\)$' \| \
16782 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16783$as_echo X"$as_dir" |
16784 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16785 s//\1/
16786 q
16787 }
16788 /^X\(\/\/\)[^/].*/{
16789 s//\1/
16790 q
16791 }
16792 /^X\(\/\/\)$/{
16793 s//\1/
16794 q
16795 }
16796 /^X\(\/\).*/{
16797 s//\1/
16798 q
16799 }
16800 s/.*/./; q'`
16801 test -d "$as_dir" && break
16802 done
16803 test -z "$as_dirs" || eval "mkdir $as_dirs"
16804 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16805
bec39cab 16806
81ecdfbb 16807} # as_fn_mkdir_p
bec39cab 16808if mkdir -p . 2>/dev/null; then
81ecdfbb 16809 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16810else
16811 test -d ./-p && rmdir ./-p
16812 as_mkdir_p=false
16813fi
16814
81ecdfbb
RW
16815if test -x / >/dev/null 2>&1; then
16816 as_test_x='test -x'
16817else
16818 if ls -dL / >/dev/null 2>&1; then
16819 as_ls_L_option=L
16820 else
16821 as_ls_L_option=
16822 fi
16823 as_test_x='
16824 eval sh -c '\''
16825 if test -d "$1"; then
16826 test -d "$1/.";
16827 else
16828 case $1 in #(
16829 -*)set "./$1";;
16830 esac;
16831 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16832 ???[sx]*):;;*)false;;esac;fi
16833 '\'' sh
16834 '
16835fi
16836as_executable_p=$as_test_x
bec39cab
AC
16837
16838# Sed expression to map a string onto a valid CPP name.
16839as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16840
16841# Sed expression to map a string onto a valid variable name.
16842as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16843
16844
bec39cab 16845exec 6>&1
81ecdfbb
RW
16846## ----------------------------------- ##
16847## Main body of $CONFIG_STATUS script. ##
16848## ----------------------------------- ##
16849_ASEOF
16850test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16851
16852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16853# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16854# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16855# values after options handling.
16856ac_log="
bec39cab 16857This file was extended by $as_me, which was
81ecdfbb 16858generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16859
16860 CONFIG_FILES = $CONFIG_FILES
16861 CONFIG_HEADERS = $CONFIG_HEADERS
16862 CONFIG_LINKS = $CONFIG_LINKS
16863 CONFIG_COMMANDS = $CONFIG_COMMANDS
16864 $ $0 $@
16865
81ecdfbb
RW
16866on `(hostname || uname -n) 2>/dev/null | sed 1q`
16867"
16868
bec39cab
AC
16869_ACEOF
16870
81ecdfbb
RW
16871case $ac_config_files in *"
16872"*) set x $ac_config_files; shift; ac_config_files=$*;;
16873esac
234b45d4 16874
81ecdfbb
RW
16875case $ac_config_headers in *"
16876"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16877esac
b4e70030 16878
b4e70030 16879
81ecdfbb
RW
16880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16881# Files that config.status was made for.
16882config_files="$ac_config_files"
16883config_headers="$ac_config_headers"
16884config_links="$ac_config_links"
16885config_commands="$ac_config_commands"
234b45d4 16886
81ecdfbb 16887_ACEOF
b4e70030 16888
81ecdfbb 16889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16890ac_cs_usage="\
81ecdfbb
RW
16891\`$as_me' instantiates files and other configuration actions
16892from templates according to the current configuration. Unless the files
16893and actions are specified as TAGs, all are instantiated by default.
234b45d4 16894
81ecdfbb 16895Usage: $0 [OPTION]... [TAG]...
234b45d4 16896
bec39cab 16897 -h, --help print this help, then exit
81ecdfbb
RW
16898 -V, --version print version number and configuration settings, then exit
16899 -q, --quiet, --silent
16900 do not print progress messages
bec39cab
AC
16901 -d, --debug don't remove temporary files
16902 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16903 --file=FILE[:TEMPLATE]
16904 instantiate the configuration file FILE
16905 --header=FILE[:TEMPLATE]
16906 instantiate the configuration header FILE
234b45d4 16907
bec39cab
AC
16908Configuration files:
16909$config_files
234b45d4 16910
bec39cab
AC
16911Configuration headers:
16912$config_headers
234b45d4 16913
bec39cab
AC
16914Configuration links:
16915$config_links
234b45d4 16916
bec39cab
AC
16917Configuration commands:
16918$config_commands
16919
81ecdfbb 16920Report bugs to the package provider."
b4e70030 16921
81ecdfbb
RW
16922_ACEOF
16923cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16924ac_cs_version="\\
16925config.status
81ecdfbb
RW
16926configured by $0, generated by GNU Autoconf 2.64,
16927 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16928
81ecdfbb 16929Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16930This config.status script is free software; the Free Software Foundation
16931gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16932
16933ac_pwd='$ac_pwd'
16934srcdir='$srcdir'
16935INSTALL='$INSTALL'
16936MKDIR_P='$MKDIR_P'
16937AWK='$AWK'
16938test -n "\$AWK" || AWK=awk
bec39cab
AC
16939_ACEOF
16940
81ecdfbb
RW
16941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16942# The default lists apply if the user does not specify any file.
bec39cab
AC
16943ac_need_defaults=:
16944while test $# != 0
16945do
16946 case $1 in
16947 --*=*)
81ecdfbb
RW
16948 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16949 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16950 ac_shift=:
c906108c 16951 ;;
81ecdfbb 16952 *)
bec39cab
AC
16953 ac_option=$1
16954 ac_optarg=$2
16955 ac_shift=shift
c906108c 16956 ;;
bec39cab 16957 esac
c906108c 16958
bec39cab
AC
16959 case $ac_option in
16960 # Handling of the options.
bec39cab
AC
16961 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16962 ac_cs_recheck=: ;;
81ecdfbb
RW
16963 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16964 $as_echo "$ac_cs_version"; exit ;;
16965 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16966 debug=: ;;
16967 --file | --fil | --fi | --f )
16968 $ac_shift
81ecdfbb
RW
16969 case $ac_optarg in
16970 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16971 esac
16972 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16973 ac_need_defaults=false;;
16974 --header | --heade | --head | --hea )
16975 $ac_shift
81ecdfbb
RW
16976 case $ac_optarg in
16977 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16978 esac
16979 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16980 ac_need_defaults=false;;
81ecdfbb
RW
16981 --he | --h)
16982 # Conflict between --help and --header
16983 as_fn_error "ambiguous option: \`$1'
16984Try \`$0 --help' for more information.";;
16985 --help | --hel | -h )
16986 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16987 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16988 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16989 ac_cs_silent=: ;;
c906108c 16990
bec39cab 16991 # This is an error.
81ecdfbb
RW
16992 -*) as_fn_error "unrecognized option: \`$1'
16993Try \`$0 --help' for more information." ;;
c906108c 16994
81ecdfbb
RW
16995 *) as_fn_append ac_config_targets " $1"
16996 ac_need_defaults=false ;;
c906108c 16997
bec39cab
AC
16998 esac
16999 shift
17000done
c906108c 17001
bec39cab 17002ac_configure_extra_args=
c906108c 17003
bec39cab
AC
17004if $ac_cs_silent; then
17005 exec 6>/dev/null
17006 ac_configure_extra_args="$ac_configure_extra_args --silent"
17007fi
c906108c 17008
bec39cab 17009_ACEOF
81ecdfbb 17010cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17011if \$ac_cs_recheck; then
81ecdfbb
RW
17012 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17013 shift
17014 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17015 CONFIG_SHELL='$SHELL'
17016 export CONFIG_SHELL
17017 exec "\$@"
bec39cab
AC
17018fi
17019
17020_ACEOF
81ecdfbb
RW
17021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17022exec 5>>config.log
17023{
17024 echo
17025 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17026## Running $as_me. ##
17027_ASBOX
17028 $as_echo "$ac_log"
17029} >&5
bec39cab 17030
81ecdfbb
RW
17031_ACEOF
17032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17033#
81ecdfbb 17034# INIT-COMMANDS
c906108c 17035#
a417dc56 17036ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 17037AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 17038
bec39cab
AC
17039_ACEOF
17040
81ecdfbb 17041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17042
81ecdfbb 17043# Handling of arguments.
bec39cab 17044for ac_config_target in $ac_config_targets
c906108c 17045do
81ecdfbb
RW
17046 case $ac_config_target in
17047 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17048 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
17049 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 17050 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
17051 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
17052 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17053 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 17054 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 17055 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 17056 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17057 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17058
17059 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17060 esac
17061done
17062
81ecdfbb 17063
bec39cab
AC
17064# If the user did not use the arguments to specify the items to instantiate,
17065# then the envvar interface is used. Set only those that are not.
17066# We use the long form for the default assignment because of an extremely
17067# bizarre bug on SunOS 4.1.3.
17068if $ac_need_defaults; then
17069 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17070 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17071 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17072 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17073fi
17074
b4e70030 17075# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17076# simply because there is no reason against having it here, and in addition,
b4e70030 17077# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17078# Hook for its removal unless debugging.
17079# Note that there is a small window in which the directory will not be cleaned:
17080# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17081$debug ||
17082{
81ecdfbb
RW
17083 tmp=
17084 trap 'exit_status=$?
17085 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17086' 0
17087 trap 'as_fn_exit 1' 1 2 13 15
17088}
17089# Create a (secure) tmp directory for tmp files.
17090
17091{
17092 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17093 test -n "$tmp" && test -d "$tmp"
17094} ||
17095{
17096 tmp=./conf$$-$RANDOM
17097 (umask 077 && mkdir "$tmp")
17098} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17099
17100# Set up the scripts for CONFIG_FILES section.
17101# No need to generate them if there are no CONFIG_FILES.
17102# This happens for instance with `./config.status config.h'.
17103if test -n "$CONFIG_FILES"; then
17104
17105if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17106 ac_cs_awk_getline=:
17107 ac_cs_awk_pipe_init=
17108 ac_cs_awk_read_file='
17109 while ((getline aline < (F[key])) > 0)
17110 print(aline)
17111 close(F[key])'
17112 ac_cs_awk_pipe_fini=
17113else
17114 ac_cs_awk_getline=false
17115 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17116 ac_cs_awk_read_file='
17117 print "|#_!!_#|"
17118 print "cat " F[key] " &&"
17119 '$ac_cs_awk_pipe_init
17120 # The final `:' finishes the AND list.
17121 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17122fi
17123ac_cr=`echo X | tr X '\015'`
17124# On cygwin, bash can eat \r inside `` if the user requested igncr.
17125# But we know of no other shell where ac_cr would be empty at this
17126# point, so we can use a bashism as a fallback.
17127if test "x$ac_cr" = x; then
17128 eval ac_cr=\$\'\\r\'
17129fi
17130ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17131if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17132 ac_cs_awk_cr='\r'
17133else
17134 ac_cs_awk_cr=$ac_cr
17135fi
17136
17137echo 'BEGIN {' >"$tmp/subs1.awk" &&
17138_ACEOF
17139
17140# Create commands to substitute file output variables.
17141{
17142 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17143 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17144 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17145 echo "_ACAWK" &&
17146 echo "_ACEOF"
17147} >conf$$files.sh &&
17148. ./conf$$files.sh ||
17149 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17150rm -f conf$$files.sh
17151
17152{
17153 echo "cat >conf$$subs.awk <<_ACEOF" &&
17154 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17155 echo "_ACEOF"
17156} >conf$$subs.sh ||
17157 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17158ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17159ac_delim='%!_!# '
17160for ac_last_try in false false false false false :; do
17161 . ./conf$$subs.sh ||
17162 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17163
17164 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17165 if test $ac_delim_n = $ac_delim_num; then
17166 break
17167 elif $ac_last_try; then
17168 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17169 else
17170 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17171 fi
17172done
17173rm -f conf$$subs.sh
17174
17175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17176cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17177_ACEOF
17178sed -n '
17179h
17180s/^/S["/; s/!.*/"]=/
17181p
17182g
17183s/^[^!]*!//
17184:repl
17185t repl
17186s/'"$ac_delim"'$//
17187t delim
17188:nl
17189h
17190s/\(.\{148\}\).*/\1/
17191t more1
17192s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17193p
17194n
17195b repl
17196:more1
17197s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17198p
17199g
17200s/.\{148\}//
17201t nl
17202:delim
17203h
17204s/\(.\{148\}\).*/\1/
17205t more2
17206s/["\\]/\\&/g; s/^/"/; s/$/"/
17207p
17208b
17209:more2
17210s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17211p
17212g
17213s/.\{148\}//
17214t delim
17215' <conf$$subs.awk | sed '
17216/^[^""]/{
17217 N
17218 s/\n//
17219}
17220' >>$CONFIG_STATUS || ac_write_fail=1
17221rm -f conf$$subs.awk
17222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17223_ACAWK
17224cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17225 for (key in S) S_is_set[key] = 1
17226 FS = "\a"
17227 \$ac_cs_awk_pipe_init
17228}
17229{
17230 line = $ 0
17231 nfields = split(line, field, "@")
17232 substed = 0
17233 len = length(field[1])
17234 for (i = 2; i < nfields; i++) {
17235 key = field[i]
17236 keylen = length(key)
17237 if (S_is_set[key]) {
17238 value = S[key]
17239 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17240 len += length(value) + length(field[++i])
17241 substed = 1
17242 } else
17243 len += 1 + keylen
17244 }
17245 if (nfields == 3 && !substed) {
17246 key = field[2]
17247 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17248 \$ac_cs_awk_read_file
17249 next
17250 }
17251 }
17252 print line
b4e70030 17253}
81ecdfbb
RW
17254\$ac_cs_awk_pipe_fini
17255_ACAWK
17256_ACEOF
17257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17258if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17259 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17260else
17261 cat
17262fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17263 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17264_ACEOF
17265
17266# VPATH may cause trouble with some makes, so we remove $(srcdir),
17267# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17268# trailing colons and then remove the whole line if VPATH becomes empty
17269# (actually we leave an empty line to preserve line numbers).
17270if test "x$srcdir" = x.; then
17271 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17272s/:*\$(srcdir):*/:/
17273s/:*\${srcdir}:*/:/
17274s/:*@srcdir@:*/:/
17275s/^\([^=]*=[ ]*\):*/\1/
17276s/:*$//
17277s/^[^=]*=[ ]*$//
17278}'
17279fi
17280
17281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17282fi # test -n "$CONFIG_FILES"
17283
17284# Set up the scripts for CONFIG_HEADERS section.
17285# No need to generate them if there are no CONFIG_HEADERS.
17286# This happens for instance with `./config.status Makefile'.
17287if test -n "$CONFIG_HEADERS"; then
17288cat >"$tmp/defines.awk" <<\_ACAWK ||
17289BEGIN {
17290_ACEOF
17291
17292# Transform confdefs.h into an awk script `defines.awk', embedded as
17293# here-document in config.status, that substitutes the proper values into
17294# config.h.in to produce config.h.
4e8d927d 17295
81ecdfbb
RW
17296# Create a delimiter string that does not exist in confdefs.h, to ease
17297# handling of long lines.
17298ac_delim='%!_!# '
17299for ac_last_try in false false :; do
17300 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17301 if test -z "$ac_t"; then
17302 break
17303 elif $ac_last_try; then
17304 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17305 else
17306 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17307 fi
17308done
4e8d927d 17309
81ecdfbb
RW
17310# For the awk script, D is an array of macro values keyed by name,
17311# likewise P contains macro parameters if any. Preserve backslash
17312# newline sequences.
17313
17314ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17315sed -n '
17316s/.\{148\}/&'"$ac_delim"'/g
17317t rset
17318:rset
17319s/^[ ]*#[ ]*define[ ][ ]*/ /
17320t def
17321d
17322:def
17323s/\\$//
17324t bsnl
17325s/["\\]/\\&/g
17326s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17327D["\1"]=" \3"/p
17328s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17329d
17330:bsnl
17331s/["\\]/\\&/g
17332s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17333D["\1"]=" \3\\\\\\n"\\/p
17334t cont
17335s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17336t cont
17337d
17338:cont
17339n
17340s/.\{148\}/&'"$ac_delim"'/g
17341t clear
17342:clear
17343s/\\$//
17344t bsnlc
17345s/["\\]/\\&/g; s/^/"/; s/$/"/p
17346d
17347:bsnlc
17348s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17349b cont
17350' <confdefs.h | sed '
17351s/'"$ac_delim"'/"\\\
17352"/g' >>$CONFIG_STATUS || ac_write_fail=1
17353
17354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17355 for (key in D) D_is_set[key] = 1
17356 FS = "\a"
17357}
17358/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17359 line = \$ 0
17360 split(line, arg, " ")
17361 if (arg[1] == "#") {
17362 defundef = arg[2]
17363 mac1 = arg[3]
17364 } else {
17365 defundef = substr(arg[1], 2)
17366 mac1 = arg[2]
17367 }
17368 split(mac1, mac2, "(") #)
17369 macro = mac2[1]
17370 prefix = substr(line, 1, index(line, defundef) - 1)
17371 if (D_is_set[macro]) {
17372 # Preserve the white space surrounding the "#".
17373 print prefix "define", macro P[macro] D[macro]
17374 next
17375 } else {
17376 # Replace #undef with comments. This is necessary, for example,
17377 # in the case of _POSIX_SOURCE, which is predefined and required
17378 # on some systems where configure will not decide to define it.
17379 if (defundef == "undef") {
17380 print "/*", prefix defundef, macro, "*/"
17381 next
17382 }
17383 }
b4e70030 17384}
81ecdfbb
RW
17385{ print }
17386_ACAWK
b4e70030 17387_ACEOF
81ecdfbb
RW
17388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17389 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17390fi # test -n "$CONFIG_HEADERS"
4e8d927d 17391
4e8d927d 17392
81ecdfbb
RW
17393eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17394shift
17395for ac_tag
17396do
17397 case $ac_tag in
17398 :[FHLC]) ac_mode=$ac_tag; continue;;
17399 esac
17400 case $ac_mode$ac_tag in
17401 :[FHL]*:*);;
17402 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17403 :[FH]-) ac_tag=-:-;;
17404 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17405 esac
17406 ac_save_IFS=$IFS
17407 IFS=:
17408 set x $ac_tag
17409 IFS=$ac_save_IFS
17410 shift
17411 ac_file=$1
17412 shift
4e8d927d 17413
81ecdfbb
RW
17414 case $ac_mode in
17415 :L) ac_source=$1;;
17416 :[FH])
17417 ac_file_inputs=
17418 for ac_f
17419 do
17420 case $ac_f in
17421 -) ac_f="$tmp/stdin";;
17422 *) # Look for the file first in the build tree, then in the source tree
17423 # (if the path is not absolute). The absolute path cannot be DOS-style,
17424 # because $ac_f cannot contain `:'.
17425 test -f "$ac_f" ||
17426 case $ac_f in
17427 [\\/$]*) false;;
17428 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17429 esac ||
17430 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17431 esac
17432 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17433 as_fn_append ac_file_inputs " '$ac_f'"
17434 done
17435
17436 # Let's still pretend it is `configure' which instantiates (i.e., don't
17437 # use $as_me), people would be surprised to read:
17438 # /* config.h. Generated by config.status. */
17439 configure_input='Generated from '`
17440 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17441 `' by configure.'
17442 if test x"$ac_file" != x-; then
17443 configure_input="$ac_file. $configure_input"
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17445$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17446 fi
81ecdfbb
RW
17447 # Neutralize special characters interpreted by sed in replacement strings.
17448 case $configure_input in #(
17449 *\&* | *\|* | *\\* )
17450 ac_sed_conf_input=`$as_echo "$configure_input" |
17451 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17452 *) ac_sed_conf_input=$configure_input;;
17453 esac
4e8d927d 17454
81ecdfbb
RW
17455 case $ac_tag in
17456 *:-:* | *:-) cat >"$tmp/stdin" \
17457 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17458 esac
17459 ;;
c906108c
SS
17460 esac
17461
81ecdfbb 17462 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17463$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17464 X"$ac_file" : 'X\(//\)[^/]' \| \
17465 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17466 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17467$as_echo X"$ac_file" |
17468 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17469 s//\1/
17470 q
17471 }
17472 /^X\(\/\/\)[^/].*/{
17473 s//\1/
17474 q
17475 }
17476 /^X\(\/\/\)$/{
17477 s//\1/
17478 q
17479 }
17480 /^X\(\/\).*/{
17481 s//\1/
17482 q
17483 }
17484 s/.*/./; q'`
17485 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17486 ac_builddir=.
17487
81ecdfbb
RW
17488case "$ac_dir" in
17489.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17490*)
17491 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17492 # A ".." for each directory in $ac_dir_suffix.
17493 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17494 case $ac_top_builddir_sub in
17495 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17496 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17497 esac ;;
17498esac
17499ac_abs_top_builddir=$ac_pwd
17500ac_abs_builddir=$ac_pwd$ac_dir_suffix
17501# for backward compatibility:
17502ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17503
17504case $srcdir in
81ecdfbb 17505 .) # We are building in place.
bec39cab 17506 ac_srcdir=.
81ecdfbb
RW
17507 ac_top_srcdir=$ac_top_builddir_sub
17508 ac_abs_top_srcdir=$ac_pwd ;;
17509 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17510 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17511 ac_top_srcdir=$srcdir
17512 ac_abs_top_srcdir=$srcdir ;;
17513 *) # Relative name.
17514 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17515 ac_top_srcdir=$ac_top_build_prefix$srcdir
17516 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17517esac
81ecdfbb 17518ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17519
c906108c 17520
81ecdfbb
RW
17521 case $ac_mode in
17522 :F)
17523 #
17524 # CONFIG_FILE
17525 #
c906108c 17526
bec39cab
AC
17527 case $INSTALL in
17528 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17529 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17530 esac
81ecdfbb
RW
17531 ac_MKDIR_P=$MKDIR_P
17532 case $MKDIR_P in
17533 [\\/$]* | ?:[\\/]* ) ;;
17534 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17535 esac
17536_ACEOF
121ce6e5 17537
81ecdfbb
RW
17538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17539# If the template does not know about datarootdir, expand it.
17540# FIXME: This hack should be removed a few years after 2.60.
17541ac_datarootdir_hack=; ac_datarootdir_seen=
17542ac_sed_dataroot='
17543/datarootdir/ {
17544 p
17545 q
17546}
17547/@datadir@/p
17548/@docdir@/p
17549/@infodir@/p
17550/@localedir@/p
17551/@mandir@/p'
17552case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17553*datarootdir*) ac_datarootdir_seen=yes;;
17554*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17556$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17557_ACEOF
17558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17559 ac_datarootdir_hack='
17560 s&@datadir@&$datadir&g
17561 s&@docdir@&$docdir&g
17562 s&@infodir@&$infodir&g
17563 s&@localedir@&$localedir&g
17564 s&@mandir@&$mandir&g
17565 s&\\\${datarootdir}&$datarootdir&g' ;;
17566esac
4e8d927d 17567_ACEOF
81ecdfbb
RW
17568
17569# Neutralize VPATH when `$srcdir' = `.'.
17570# Shell code in configure.ac might set extrasub.
17571# FIXME: do we really want to maintain this feature?
17572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17573ac_sed_extra="$ac_vpsub
bec39cab
AC
17574$extrasub
17575_ACEOF
81ecdfbb 17576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17577:t
17578/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17579s|@configure_input@|$ac_sed_conf_input|;t t
17580s&@top_builddir@&$ac_top_builddir_sub&;t t
17581s&@top_build_prefix@&$ac_top_build_prefix&;t t
17582s&@srcdir@&$ac_srcdir&;t t
17583s&@abs_srcdir@&$ac_abs_srcdir&;t t
17584s&@top_srcdir@&$ac_top_srcdir&;t t
17585s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17586s&@builddir@&$ac_builddir&;t t
17587s&@abs_builddir@&$ac_abs_builddir&;t t
17588s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17589s&@INSTALL@&$ac_INSTALL&;t t
17590s&@MKDIR_P@&$ac_MKDIR_P&;t t
17591$ac_datarootdir_hack
17592"
17593eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17594if $ac_cs_awk_getline; then
17595 $AWK -f "$tmp/subs.awk"
17596else
17597 $AWK -f "$tmp/subs.awk" | $SHELL
17598fi >$tmp/out \
17599 || as_fn_error "could not create $ac_file" "$LINENO" 5
17600
17601test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17602 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17603 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17605which seems to be undefined. Please make sure it is defined." >&5
17606$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17607which seems to be undefined. Please make sure it is defined." >&2;}
17608
17609 rm -f "$tmp/stdin"
bec39cab 17610 case $ac_file in
81ecdfbb
RW
17611 -) cat "$tmp/out" && rm -f "$tmp/out";;
17612 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17613 esac \
17614 || as_fn_error "could not create $ac_file" "$LINENO" 5
17615 ;;
17616 :H)
17617 #
17618 # CONFIG_HEADER
17619 #
bec39cab 17620 if test x"$ac_file" != x-; then
81ecdfbb
RW
17621 {
17622 $as_echo "/* $configure_input */" \
17623 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17624 } >"$tmp/config.h" \
17625 || as_fn_error "could not create $ac_file" "$LINENO" 5
17626 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17627 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17628$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17629 else
81ecdfbb
RW
17630 rm -f "$ac_file"
17631 mv "$tmp/config.h" "$ac_file" \
17632 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17633 fi
17634 else
81ecdfbb
RW
17635 $as_echo "/* $configure_input */" \
17636 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17637 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17638 fi
81ecdfbb
RW
17639# Compute "$ac_file"'s index in $config_headers.
17640_am_arg="$ac_file"
e28b3332
DJ
17641_am_stamp_count=1
17642for _am_header in $config_headers :; do
17643 case $_am_header in
81ecdfbb 17644 $_am_arg | $_am_arg:* )
e28b3332
DJ
17645 break ;;
17646 * )
17647 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17648 esac
17649done
81ecdfbb
RW
17650echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17651$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17652 X"$_am_arg" : 'X\(//\)[^/]' \| \
17653 X"$_am_arg" : 'X\(//\)$' \| \
17654 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17655$as_echo X"$_am_arg" |
17656 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17657 s//\1/
17658 q
17659 }
17660 /^X\(\/\/\)[^/].*/{
17661 s//\1/
17662 q
17663 }
17664 /^X\(\/\/\)$/{
17665 s//\1/
17666 q
17667 }
17668 /^X\(\/\).*/{
17669 s//\1/
17670 q
17671 }
17672 s/.*/./; q'`/stamp-h$_am_stamp_count
17673 ;;
17674 :L)
17675 #
17676 # CONFIG_LINK
17677 #
c906108c 17678
81ecdfbb
RW
17679 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17680 :
b4e70030 17681 else
81ecdfbb
RW
17682 # Prefer the file from the source tree if names are identical.
17683 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17684 ac_source=$srcdir/$ac_source
17685 fi
b4e70030 17686
81ecdfbb
RW
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17688$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17689
81ecdfbb
RW
17690 if test ! -r "$ac_source"; then
17691 as_fn_error "$ac_source: file not found" "$LINENO" 5
17692 fi
17693 rm -f "$ac_file"
bec39cab 17694
81ecdfbb
RW
17695 # Try a relative symlink, then a hard link, then a copy.
17696 case $srcdir in
17697 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17698 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17699 esac
17700 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17701 ln "$ac_source" "$ac_file" 2>/dev/null ||
17702 cp -p "$ac_source" "$ac_file" ||
17703 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17704 fi
17705 ;;
17706 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17707$as_echo "$as_me: executing $ac_file commands" >&6;}
17708 ;;
c906108c 17709 esac
b4e70030 17710
bec39cab 17711
81ecdfbb
RW
17712 case $ac_file$ac_mode in
17713 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17714 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17715 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17716 # are listed without --file. Let's play safe and only enable the eval
17717 # if we detect the quoting.
17718 case $CONFIG_FILES in
17719 *\'*) eval set x "$CONFIG_FILES" ;;
17720 *) set x $CONFIG_FILES ;;
17721 esac
17722 shift
17723 for mf
17724 do
17725 # Strip MF so we end up with the name of the file.
17726 mf=`echo "$mf" | sed -e 's/:.*$//'`
17727 # Check whether this is an Automake generated Makefile or not.
17728 # We used to match only the files named `Makefile.in', but
17729 # some people rename them; so instead we look at the file content.
17730 # Grep'ing the first line is not enough: some people post-process
17731 # each Makefile.in and add a new line on top of each file to say so.
17732 # Grep'ing the whole file is not good either: AIX grep has a line
17733 # limit of 2048, but all sed's we know have understand at least 4000.
17734 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17735 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17736$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17737 X"$mf" : 'X\(//\)[^/]' \| \
17738 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17739 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17740$as_echo X"$mf" |
17741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17742 s//\1/
17743 q
17744 }
17745 /^X\(\/\/\)[^/].*/{
17746 s//\1/
17747 q
17748 }
17749 /^X\(\/\/\)$/{
17750 s//\1/
17751 q
17752 }
17753 /^X\(\/\).*/{
17754 s//\1/
17755 q
17756 }
17757 s/.*/./; q'`
17758 else
17759 continue
17760 fi
17761 # Extract the definition of DEPDIR, am__include, and am__quote
17762 # from the Makefile without running `make'.
17763 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17764 test -z "$DEPDIR" && continue
17765 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17766 test -z "am__include" && continue
17767 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17768 # When using ansi2knr, U may be empty or an underscore; expand it
17769 U=`sed -n 's/^U = //p' < "$mf"`
17770 # Find all dependency output files, they are included files with
17771 # $(DEPDIR) in their names. We invoke sed twice because it is the
17772 # simplest approach to changing $(DEPDIR) to its actual value in the
17773 # expansion.
17774 for file in `sed -n "
17775 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17776 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17777 # Make sure the directory exists.
17778 test -f "$dirpart/$file" && continue
17779 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17780$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17781 X"$file" : 'X\(//\)[^/]' \| \
17782 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17783 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17784$as_echo X"$file" |
17785 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17786 s//\1/
17787 q
17788 }
17789 /^X\(\/\/\)[^/].*/{
17790 s//\1/
17791 q
17792 }
17793 /^X\(\/\/\)$/{
17794 s//\1/
17795 q
17796 }
17797 /^X\(\/\).*/{
17798 s//\1/
17799 q
17800 }
17801 s/.*/./; q'`
17802 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17803 # echo "creating $dirpart/$file"
17804 echo '# dummy' > "$dirpart/$file"
e28b3332 17805 done
e28b3332 17806 done
81ecdfbb 17807}
4e8d927d 17808 ;;
81ecdfbb 17809 "default":C)
c906108c
SS
17810case x$CONFIG_HEADERS in
17811xconfig.h:config.in)
17812echo > stamp-h ;;
17813esac
bec39cab 17814 ;;
81ecdfbb 17815
bec39cab 17816 esac
81ecdfbb 17817done # for ac_tag
c906108c 17818
bec39cab 17819
81ecdfbb 17820as_fn_exit 0
bec39cab 17821_ACEOF
bec39cab
AC
17822ac_clean_files=$ac_clean_files_save
17823
81ecdfbb
RW
17824test $ac_write_fail = 0 ||
17825 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17826
bec39cab
AC
17827
17828# configure is writing to config.log, and then calls config.status.
17829# config.status does its own redirection, appending to config.log.
17830# Unfortunately, on DOS this fails, as config.log is still kept open
17831# by configure, so config.status won't be able to write to it; its
17832# output is simply discarded. So we exec the FD to /dev/null,
17833# effectively closing config.log, so it can be properly (re)opened and
17834# appended to by config.status. When coming back to configure, we
17835# need to make the FD available again.
17836if test "$no_create" != yes; then
17837 ac_cs_success=:
17838 ac_config_status_args=
17839 test "$silent" = yes &&
17840 ac_config_status_args="$ac_config_status_args --quiet"
17841 exec 5>/dev/null
17842 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17843 exec 5>>config.log
17844 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17845 # would make configure fail if this is the last instruction.
81ecdfbb 17846 $ac_cs_success || as_fn_exit $?
bec39cab 17847fi
c906108c 17848
bec39cab 17849#
81ecdfbb 17850# CONFIG_SUBDIRS section.
bec39cab 17851#
c906108c
SS
17852if test "$no_recursion" != yes; then
17853
81ecdfbb
RW
17854 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17855 # so they do not pile up.
c906108c
SS
17856 ac_sub_configure_args=
17857 ac_prev=
fdc59709
PB
17858 eval "set x $ac_configure_args"
17859 shift
17860 for ac_arg
17861 do
c906108c
SS
17862 if test -n "$ac_prev"; then
17863 ac_prev=
17864 continue
17865 fi
bec39cab 17866 case $ac_arg in
c906108c
SS
17867 -cache-file | --cache-file | --cache-fil | --cache-fi \
17868 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17869 ac_prev=cache_file ;;
17870 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17871 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17872 | --c=*)
17873 ;;
17874 --config-cache | -C)
c906108c
SS
17875 ;;
17876 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17877 ac_prev=srcdir ;;
17878 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17879 ;;
bec39cab
AC
17880 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17881 ac_prev=prefix ;;
17882 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17883 ;;
81ecdfbb
RW
17884 --disable-option-checking)
17885 ;;
fdc59709
PB
17886 *)
17887 case $ac_arg in
81ecdfbb 17888 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17889 esac
81ecdfbb 17890 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17891 esac
17892 done
17893
bec39cab
AC
17894 # Always prepend --prefix to ensure using the same prefix
17895 # in subdir configurations.
fdc59709
PB
17896 ac_arg="--prefix=$prefix"
17897 case $ac_arg in
81ecdfbb 17898 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17899 esac
81ecdfbb
RW
17900 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17901
17902 # Pass --silent
17903 if test "$silent" = yes; then
17904 ac_sub_configure_args="--silent $ac_sub_configure_args"
17905 fi
17906
17907 # Always prepend --disable-option-checking to silence warnings, since
17908 # different subdirs can have different --enable and --with options.
17909 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17910
b4e70030 17911 ac_popdir=`pwd`
bec39cab 17912 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17913
17914 # Do not complain, so a configure script can configure whichever
17915 # parts of a large source tree are present.
fdc59709 17916 test -d "$srcdir/$ac_dir" || continue
c906108c 17917
81ecdfbb
RW
17918 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17919 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17920 $as_echo "$ac_msg" >&6
17921 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17922 ac_builddir=.
17923
81ecdfbb
RW
17924case "$ac_dir" in
17925.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17926*)
17927 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17928 # A ".." for each directory in $ac_dir_suffix.
17929 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17930 case $ac_top_builddir_sub in
17931 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17932 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17933 esac ;;
17934esac
17935ac_abs_top_builddir=$ac_pwd
17936ac_abs_builddir=$ac_pwd$ac_dir_suffix
17937# for backward compatibility:
17938ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17939
17940case $srcdir in
81ecdfbb 17941 .) # We are building in place.
bec39cab 17942 ac_srcdir=.
81ecdfbb
RW
17943 ac_top_srcdir=$ac_top_builddir_sub
17944 ac_abs_top_srcdir=$ac_pwd ;;
17945 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17946 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17947 ac_top_srcdir=$srcdir
17948 ac_abs_top_srcdir=$srcdir ;;
17949 *) # Relative name.
17950 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17951 ac_top_srcdir=$ac_top_build_prefix$srcdir
17952 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17953esac
81ecdfbb 17954ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17955
c906108c 17956
fdc59709 17957 cd "$ac_dir"
c906108c
SS
17958
17959 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17960 if test -f "$ac_srcdir/configure.gnu"; then
17961 ac_sub_configure=$ac_srcdir/configure.gnu
17962 elif test -f "$ac_srcdir/configure"; then
17963 ac_sub_configure=$ac_srcdir/configure
17964 elif test -f "$ac_srcdir/configure.in"; then
17965 # This should be Cygnus configure.
17966 ac_sub_configure=$ac_aux_dir/configure
c906108c 17967 else
81ecdfbb
RW
17968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17969$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17970 ac_sub_configure=
17971 fi
17972
17973 # The recursion is here.
17974 if test -n "$ac_sub_configure"; then
c906108c 17975 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17976 case $cache_file in
17977 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17978 *) # Relative name.
17979 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17980 esac
c906108c 17981
81ecdfbb
RW
17982 { $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
17983$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17984 # The eval makes quoting arguments work.
fdc59709
PB
17985 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17986 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17987 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17988 fi
17989
fdc59709 17990 cd "$ac_popdir"
c906108c
SS
17991 done
17992fi
81ecdfbb
RW
17993if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17995$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17996fi
c906108c
SS
17997
17998
17999exit 0
This page took 2.279046 seconds and 4 git commands to generate.