2011-10-31 Pedro Alves <pedro@codesourcery.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
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
ac534cba
JB
662PYTHON_LIBS
663PYTHON_CPPFLAGS
81ecdfbb 664PYTHON_CFLAGS
ec685c5e 665python_prog_path
81ecdfbb
RW
666LTLIBEXPAT
667LIBEXPAT
668HAVE_LIBEXPAT
39037522 669READLINE_TEXI_INCFLAG
81ecdfbb
RW
670READLINE_CFLAGS
671READLINE_DEPS
672READLINE
673MIG
674WINDRES
675DLLTOOL
676AR
677YFLAGS
678YACC
679LN_S
680REPORT_BUGS_TEXI
681REPORT_BUGS_TO
682PKGVERSION
683TARGET_OBS
684subdirs
685GDB_DATADIR
686DEBUGDIR
687am__fastdepCC_FALSE
688am__fastdepCC_TRUE
689AMDEPBACKSLASH
690AMDEP_FALSE
691AMDEP_TRUE
692am__quote
693am__include
694am__untar
695am__tar
696AMTAR
697AWK
698mkdir_p
699MKDIR_P
700INSTALL_STRIP_PROGRAM
701STRIP
702install_sh
81ecdfbb
RW
703AUTOHEADER
704AUTOMAKE
705AUTOCONF
706ACLOCAL
707VERSION
708CYGPATH_W
709am__isrc
710INSTALL_DATA
711INSTALL_SCRIPT
712INSTALL_PROGRAM
5048e516
JK
713MAKEINFO_EXTRA_FLAGS
714MAKEINFOFLAGS
715MAKEINFO
81ecdfbb
RW
716PACKAGE
717GNULIB_STDINT_H
718LIBGNU_LTLIBDEPS
719LIBGNU_LIBDEPS
f434ba03
PA
720gltests_WITNESS
721HAVE_WINT_T
81ecdfbb 722HAVE_WCHAR_H
f434ba03
PA
723NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
724NEXT_WCHAR_H
81ecdfbb 725REPLACE_WCWIDTH
f434ba03
PA
726REPLACE_WCSNRTOMBS
727REPLACE_WCSRTOMBS
728REPLACE_WCRTOMB
729REPLACE_MBSNRTOWCS
730REPLACE_MBSRTOWCS
731REPLACE_MBRLEN
732REPLACE_MBRTOWC
733REPLACE_MBSINIT
734REPLACE_WCTOB
735REPLACE_BTOWC
736REPLACE_MBSTATE_T
81ecdfbb 737HAVE_DECL_WCWIDTH
f434ba03
PA
738HAVE_DECL_WCTOB
739HAVE_WCSNRTOMBS
740HAVE_WCSRTOMBS
741HAVE_WCRTOMB
742HAVE_MBSNRTOWCS
743HAVE_MBSRTOWCS
744HAVE_MBRLEN
745HAVE_MBRTOWC
746HAVE_MBSINIT
747HAVE_BTOWC
81ecdfbb 748GNULIB_WCWIDTH
f434ba03
PA
749GNULIB_WCSNRTOMBS
750GNULIB_WCSRTOMBS
751GNULIB_WCRTOMB
752GNULIB_MBSNRTOWCS
753GNULIB_MBSRTOWCS
754GNULIB_MBRLEN
755GNULIB_MBRTOWC
756GNULIB_MBSINIT
757GNULIB_WCTOB
758GNULIB_BTOWC
759NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
760NEXT_STRING_H
761STDINT_H
762WINT_T_SUFFIX
763WCHAR_T_SUFFIX
81ecdfbb 764SIG_ATOMIC_T_SUFFIX
f434ba03 765SIZE_T_SUFFIX
81ecdfbb
RW
766PTRDIFF_T_SUFFIX
767HAVE_SIGNED_WINT_T
768HAVE_SIGNED_WCHAR_T
769HAVE_SIGNED_SIG_ATOMIC_T
770BITSIZEOF_WINT_T
771BITSIZEOF_WCHAR_T
81ecdfbb 772BITSIZEOF_SIG_ATOMIC_T
f434ba03 773BITSIZEOF_SIZE_T
81ecdfbb
RW
774BITSIZEOF_PTRDIFF_T
775HAVE_SYS_BITYPES_H
776HAVE_SYS_INTTYPES_H
777HAVE_STDINT_H
f434ba03 778NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 779NEXT_STDINT_H
81ecdfbb
RW
780HAVE_SYS_TYPES_H
781HAVE_INTTYPES_H
782HAVE_UNSIGNED_LONG_LONG_INT
783HAVE_LONG_LONG_INT
f434ba03
PA
784NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
785NEXT_STDDEF_H
786PRAGMA_SYSTEM_HEADER
787INCLUDE_NEXT_AS_FIRST_DIRECTIVE
788INCLUDE_NEXT
789STDDEF_H
790HAVE_WCHAR_T
791REPLACE_NULL
792APPLE_UNIVERSAL_BUILD
793UNDEFINE_STRTOK_R
794REPLACE_STRTOK_R
81ecdfbb 795REPLACE_STRSIGNAL
f434ba03
PA
796REPLACE_STRNLEN
797REPLACE_STRNDUP
798REPLACE_STRNCAT
81ecdfbb 799REPLACE_STRERROR
f434ba03
PA
800REPLACE_STRCASESTR
801REPLACE_STRSTR
802REPLACE_STRDUP
803REPLACE_STPNCPY
804REPLACE_MEMMEM
805REPLACE_MEMCHR
806HAVE_STRVERSCMP
81ecdfbb 807HAVE_DECL_STRSIGNAL
81ecdfbb
RW
808HAVE_DECL_STRTOK_R
809HAVE_STRCASESTR
810HAVE_STRSEP
811HAVE_STRPBRK
812HAVE_DECL_STRNLEN
813HAVE_DECL_STRNDUP
81ecdfbb
RW
814HAVE_DECL_STRDUP
815HAVE_STRCHRNUL
816HAVE_STPNCPY
817HAVE_STPCPY
f434ba03 818HAVE_RAWMEMCHR
81ecdfbb
RW
819HAVE_DECL_MEMRCHR
820HAVE_MEMPCPY
821HAVE_DECL_MEMMEM
f434ba03
PA
822HAVE_MEMCHR
823HAVE_MBSLEN
824GNULIB_STRVERSCMP
81ecdfbb
RW
825GNULIB_STRSIGNAL
826GNULIB_STRERROR
827GNULIB_MBSTOK_R
828GNULIB_MBSSEP
829GNULIB_MBSSPN
830GNULIB_MBSPBRK
831GNULIB_MBSCSPN
832GNULIB_MBSCASESTR
833GNULIB_MBSPCASECMP
834GNULIB_MBSNCASECMP
835GNULIB_MBSCASECMP
836GNULIB_MBSSTR
837GNULIB_MBSRCHR
838GNULIB_MBSCHR
839GNULIB_MBSNLEN
840GNULIB_MBSLEN
841GNULIB_STRTOK_R
842GNULIB_STRCASESTR
843GNULIB_STRSTR
844GNULIB_STRSEP
845GNULIB_STRPBRK
846GNULIB_STRNLEN
847GNULIB_STRNDUP
f434ba03 848GNULIB_STRNCAT
81ecdfbb
RW
849GNULIB_STRDUP
850GNULIB_STRCHRNUL
851GNULIB_STPNCPY
852GNULIB_STPCPY
f434ba03 853GNULIB_RAWMEMCHR
81ecdfbb
RW
854GNULIB_MEMRCHR
855GNULIB_MEMPCPY
856GNULIB_MEMMEM
f434ba03 857GNULIB_MEMCHR
81ecdfbb
RW
858GL_COND_LIBTOOL_FALSE
859GL_COND_LIBTOOL_TRUE
860CATOBJEXT
861GENCAT
862INSTOBJEXT
863DATADIRNAME
864CATALOGS
865POSUB
866GMSGFMT
867XGETTEXT
868INCINTL
869LIBINTL_DEP
870LIBINTL
871USE_NLS
872SET_MAKE
873GMAKE_FALSE
874GMAKE_TRUE
875MAKE
876CCDEPMODE
877DEPDIR
878am__leading_dot
879target_os
880target_vendor
881target_cpu
882target
f434ba03
PA
883RANLIB
884EGREP
885GREP
886CPP
81ecdfbb
RW
887host_os
888host_vendor
889host_cpu
890host
891build_os
892build_vendor
893build_cpu
894build
81ecdfbb
RW
895OBJEXT
896EXEEXT
897ac_ct_CC
898CPPFLAGS
899LDFLAGS
900CFLAGS
901CC
902MAINT
903MAINTAINER_MODE_FALSE
904MAINTAINER_MODE_TRUE
905target_alias
906host_alias
907build_alias
908LIBS
909ECHO_T
910ECHO_N
911ECHO_C
912DEFS
913mandir
914localedir
915libdir
916psdir
917pdfdir
918dvidir
919htmldir
920infodir
921docdir
922oldincludedir
923includedir
924localstatedir
925sharedstatedir
926sysconfdir
927datadir
928datarootdir
929libexecdir
930sbindir
931bindir
932program_transform_name
933prefix
934exec_prefix
935PACKAGE_URL
936PACKAGE_BUGREPORT
937PACKAGE_STRING
938PACKAGE_VERSION
939PACKAGE_TARNAME
940PACKAGE_NAME
941PATH_SEPARATOR
942SHELL'
a4ce5b0d 943ac_subst_files='host_makefile_frag'
81ecdfbb
RW
944ac_user_opts='
945enable_option_checking
946enable_maintainer_mode
da2f07f1
JK
947enable_plugins
948enable_largefile
81ecdfbb
RW
949enable_dependency_tracking
950with_separate_debug_dir
951with_gdb_datadir
952with_relocated_sources
953enable_targets
954enable_64_bit_bfd
955enable_gdbcli
956enable_gdbmi
957enable_tui
958enable_gdbtk
959with_libunwind
960with_curses
961enable_profiling
962with_pkgversion
963with_bugurl
b040ad30 964with_zlib
81ecdfbb 965with_libiconv_prefix
478aac75 966with_iconv_bin
81ecdfbb
RW
967with_system_readline
968with_expat
969with_gnu_ld
970enable_rpath
971with_libexpat_prefix
972with_python
973with_included_regex
974with_sysroot
975with_system_gdbinit
976enable_werror
977enable_build_warnings
978enable_gdb_build_warnings
979with_tcl
980with_tk
981with_x
982enable_sim
983enable_multi_ice
496c0e1b 984enable_gdbserver
81ecdfbb
RW
985'
986 ac_precious_vars='build_alias
987host_alias
988target_alias
989CC
990CFLAGS
991LDFLAGS
992LIBS
993CPPFLAGS
994CPP
995YACC
996YFLAGS
997XMKMF'
5ae98d25 998ac_subdirs_all='testsuite
81ecdfbb
RW
999gdbtk
1000multi-ice
1001gdbserver'
c906108c
SS
1002
1003# Initialize some variables set by options.
bec39cab
AC
1004ac_init_help=
1005ac_init_version=false
81ecdfbb
RW
1006ac_unrecognized_opts=
1007ac_unrecognized_sep=
c906108c
SS
1008# The variables have the same names as the options, with
1009# dashes changed to underlines.
bec39cab 1010cache_file=/dev/null
c906108c 1011exec_prefix=NONE
c906108c 1012no_create=
c906108c
SS
1013no_recursion=
1014prefix=NONE
1015program_prefix=NONE
1016program_suffix=NONE
1017program_transform_name=s,x,x,
1018silent=
1019site=
1020srcdir=
c906108c
SS
1021verbose=
1022x_includes=NONE
1023x_libraries=NONE
bec39cab
AC
1024
1025# Installation directory options.
1026# These are left unexpanded so users can "make install exec_prefix=/foo"
1027# and all the variables that are supposed to be based on exec_prefix
1028# by default will actually change.
1029# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1030# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1031bindir='${exec_prefix}/bin'
1032sbindir='${exec_prefix}/sbin'
1033libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1034datarootdir='${prefix}/share'
1035datadir='${datarootdir}'
c906108c
SS
1036sysconfdir='${prefix}/etc'
1037sharedstatedir='${prefix}/com'
1038localstatedir='${prefix}/var'
c906108c
SS
1039includedir='${prefix}/include'
1040oldincludedir='/usr/include'
81ecdfbb
RW
1041docdir='${datarootdir}/doc/${PACKAGE}'
1042infodir='${datarootdir}/info'
1043htmldir='${docdir}'
1044dvidir='${docdir}'
1045pdfdir='${docdir}'
1046psdir='${docdir}'
1047libdir='${exec_prefix}/lib'
1048localedir='${datarootdir}/locale'
1049mandir='${datarootdir}/man'
c906108c 1050
c906108c 1051ac_prev=
81ecdfbb 1052ac_dashdash=
c906108c
SS
1053for ac_option
1054do
c906108c
SS
1055 # If the previous option needs an argument, assign it.
1056 if test -n "$ac_prev"; then
81ecdfbb 1057 eval $ac_prev=\$ac_option
c906108c
SS
1058 ac_prev=
1059 continue
1060 fi
1061
81ecdfbb
RW
1062 case $ac_option in
1063 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1064 *) ac_optarg=yes ;;
1065 esac
c906108c
SS
1066
1067 # Accept the important Cygnus configure options, so we can diagnose typos.
1068
81ecdfbb
RW
1069 case $ac_dashdash$ac_option in
1070 --)
1071 ac_dashdash=yes ;;
c906108c
SS
1072
1073 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1074 ac_prev=bindir ;;
1075 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1076 bindir=$ac_optarg ;;
c906108c
SS
1077
1078 -build | --build | --buil | --bui | --bu)
bec39cab 1079 ac_prev=build_alias ;;
c906108c 1080 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1081 build_alias=$ac_optarg ;;
c906108c
SS
1082
1083 -cache-file | --cache-file | --cache-fil | --cache-fi \
1084 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1085 ac_prev=cache_file ;;
1086 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1087 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1088 cache_file=$ac_optarg ;;
1089
1090 --config-cache | -C)
1091 cache_file=config.cache ;;
c906108c 1092
81ecdfbb 1093 -datadir | --datadir | --datadi | --datad)
c906108c 1094 ac_prev=datadir ;;
81ecdfbb 1095 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1096 datadir=$ac_optarg ;;
c906108c 1097
81ecdfbb
RW
1098 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1099 | --dataroo | --dataro | --datar)
1100 ac_prev=datarootdir ;;
1101 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1102 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1103 datarootdir=$ac_optarg ;;
1104
c906108c 1105 -disable-* | --disable-*)
81ecdfbb 1106 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1107 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1108 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1109 as_fn_error "invalid feature name: $ac_useropt"
1110 ac_useropt_orig=$ac_useropt
1111 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1112 case $ac_user_opts in
1113 *"
1114"enable_$ac_useropt"
1115"*) ;;
1116 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1117 ac_unrecognized_sep=', ';;
1118 esac
1119 eval enable_$ac_useropt=no ;;
1120
1121 -docdir | --docdir | --docdi | --doc | --do)
1122 ac_prev=docdir ;;
1123 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1124 docdir=$ac_optarg ;;
1125
1126 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1127 ac_prev=dvidir ;;
1128 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1129 dvidir=$ac_optarg ;;
c906108c
SS
1130
1131 -enable-* | --enable-*)
81ecdfbb 1132 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1133 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1134 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1135 as_fn_error "invalid feature name: $ac_useropt"
1136 ac_useropt_orig=$ac_useropt
1137 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1138 case $ac_user_opts in
1139 *"
1140"enable_$ac_useropt"
1141"*) ;;
1142 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1143 ac_unrecognized_sep=', ';;
b4e70030 1144 esac
81ecdfbb 1145 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1146
1147 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1148 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1149 | --exec | --exe | --ex)
1150 ac_prev=exec_prefix ;;
1151 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1152 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1153 | --exec=* | --exe=* | --ex=*)
bec39cab 1154 exec_prefix=$ac_optarg ;;
c906108c
SS
1155
1156 -gas | --gas | --ga | --g)
1157 # Obsolete; use --with-gas.
1158 with_gas=yes ;;
1159
bec39cab
AC
1160 -help | --help | --hel | --he | -h)
1161 ac_init_help=long ;;
1162 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1163 ac_init_help=recursive ;;
1164 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1165 ac_init_help=short ;;
c906108c
SS
1166
1167 -host | --host | --hos | --ho)
bec39cab 1168 ac_prev=host_alias ;;
c906108c 1169 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1170 host_alias=$ac_optarg ;;
c906108c 1171
81ecdfbb
RW
1172 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1173 ac_prev=htmldir ;;
1174 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1175 | --ht=*)
1176 htmldir=$ac_optarg ;;
1177
c906108c
SS
1178 -includedir | --includedir | --includedi | --included | --include \
1179 | --includ | --inclu | --incl | --inc)
1180 ac_prev=includedir ;;
1181 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1182 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1183 includedir=$ac_optarg ;;
c906108c
SS
1184
1185 -infodir | --infodir | --infodi | --infod | --info | --inf)
1186 ac_prev=infodir ;;
1187 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1188 infodir=$ac_optarg ;;
c906108c
SS
1189
1190 -libdir | --libdir | --libdi | --libd)
1191 ac_prev=libdir ;;
1192 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1193 libdir=$ac_optarg ;;
c906108c
SS
1194
1195 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1196 | --libexe | --libex | --libe)
1197 ac_prev=libexecdir ;;
1198 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1199 | --libexe=* | --libex=* | --libe=*)
bec39cab 1200 libexecdir=$ac_optarg ;;
c906108c 1201
81ecdfbb
RW
1202 -localedir | --localedir | --localedi | --localed | --locale)
1203 ac_prev=localedir ;;
1204 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1205 localedir=$ac_optarg ;;
1206
c906108c 1207 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1208 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1209 ac_prev=localstatedir ;;
1210 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1211 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1212 localstatedir=$ac_optarg ;;
c906108c
SS
1213
1214 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1215 ac_prev=mandir ;;
1216 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1217 mandir=$ac_optarg ;;
c906108c
SS
1218
1219 -nfp | --nfp | --nf)
1220 # Obsolete; use --without-fp.
1221 with_fp=no ;;
1222
1223 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1224 | --no-cr | --no-c | -n)
c906108c
SS
1225 no_create=yes ;;
1226
1227 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1228 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1229 no_recursion=yes ;;
1230
1231 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1232 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1233 | --oldin | --oldi | --old | --ol | --o)
1234 ac_prev=oldincludedir ;;
1235 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1236 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1237 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1238 oldincludedir=$ac_optarg ;;
c906108c
SS
1239
1240 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1241 ac_prev=prefix ;;
1242 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1243 prefix=$ac_optarg ;;
c906108c
SS
1244
1245 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1246 | --program-pre | --program-pr | --program-p)
1247 ac_prev=program_prefix ;;
1248 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1249 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1250 program_prefix=$ac_optarg ;;
c906108c
SS
1251
1252 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1253 | --program-suf | --program-su | --program-s)
1254 ac_prev=program_suffix ;;
1255 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1256 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1257 program_suffix=$ac_optarg ;;
c906108c
SS
1258
1259 -program-transform-name | --program-transform-name \
1260 | --program-transform-nam | --program-transform-na \
1261 | --program-transform-n | --program-transform- \
1262 | --program-transform | --program-transfor \
1263 | --program-transfo | --program-transf \
1264 | --program-trans | --program-tran \
1265 | --progr-tra | --program-tr | --program-t)
1266 ac_prev=program_transform_name ;;
1267 -program-transform-name=* | --program-transform-name=* \
1268 | --program-transform-nam=* | --program-transform-na=* \
1269 | --program-transform-n=* | --program-transform-=* \
1270 | --program-transform=* | --program-transfor=* \
1271 | --program-transfo=* | --program-transf=* \
1272 | --program-trans=* | --program-tran=* \
1273 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1274 program_transform_name=$ac_optarg ;;
c906108c 1275
81ecdfbb
RW
1276 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1277 ac_prev=pdfdir ;;
1278 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1279 pdfdir=$ac_optarg ;;
1280
1281 -psdir | --psdir | --psdi | --psd | --ps)
1282 ac_prev=psdir ;;
1283 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1284 psdir=$ac_optarg ;;
1285
c906108c
SS
1286 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1287 | -silent | --silent | --silen | --sile | --sil)
1288 silent=yes ;;
1289
1290 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1291 ac_prev=sbindir ;;
1292 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1293 | --sbi=* | --sb=*)
bec39cab 1294 sbindir=$ac_optarg ;;
c906108c
SS
1295
1296 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1297 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1298 | --sharedst | --shareds | --shared | --share | --shar \
1299 | --sha | --sh)
1300 ac_prev=sharedstatedir ;;
1301 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1302 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1303 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1304 | --sha=* | --sh=*)
bec39cab 1305 sharedstatedir=$ac_optarg ;;
c906108c
SS
1306
1307 -site | --site | --sit)
1308 ac_prev=site ;;
1309 -site=* | --site=* | --sit=*)
bec39cab 1310 site=$ac_optarg ;;
3ace7edb 1311
c906108c
SS
1312 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1313 ac_prev=srcdir ;;
1314 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1315 srcdir=$ac_optarg ;;
c906108c
SS
1316
1317 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1318 | --syscon | --sysco | --sysc | --sys | --sy)
1319 ac_prev=sysconfdir ;;
1320 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1321 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1322 sysconfdir=$ac_optarg ;;
c906108c
SS
1323
1324 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1325 ac_prev=target_alias ;;
c906108c 1326 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1327 target_alias=$ac_optarg ;;
c906108c
SS
1328
1329 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1330 verbose=yes ;;
1331
bec39cab
AC
1332 -version | --version | --versio | --versi | --vers | -V)
1333 ac_init_version=: ;;
c906108c
SS
1334
1335 -with-* | --with-*)
81ecdfbb 1336 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1337 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1338 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1339 as_fn_error "invalid package name: $ac_useropt"
1340 ac_useropt_orig=$ac_useropt
1341 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1342 case $ac_user_opts in
1343 *"
1344"with_$ac_useropt"
1345"*) ;;
1346 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1347 ac_unrecognized_sep=', ';;
b4e70030 1348 esac
81ecdfbb 1349 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1350
1351 -without-* | --without-*)
81ecdfbb 1352 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1353 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1354 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355 as_fn_error "invalid package name: $ac_useropt"
1356 ac_useropt_orig=$ac_useropt
1357 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358 case $ac_user_opts in
1359 *"
1360"with_$ac_useropt"
1361"*) ;;
1362 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1363 ac_unrecognized_sep=', ';;
1364 esac
1365 eval with_$ac_useropt=no ;;
c906108c
SS
1366
1367 --x)
1368 # Obsolete; use --with-x.
1369 with_x=yes ;;
1370
1371 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1372 | --x-incl | --x-inc | --x-in | --x-i)
1373 ac_prev=x_includes ;;
1374 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1375 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1376 x_includes=$ac_optarg ;;
c906108c
SS
1377
1378 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1379 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1380 ac_prev=x_libraries ;;
1381 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1382 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1383 x_libraries=$ac_optarg ;;
c906108c 1384
81ecdfbb
RW
1385 -*) as_fn_error "unrecognized option: \`$ac_option'
1386Try \`$0 --help' for more information."
c906108c
SS
1387 ;;
1388
bec39cab
AC
1389 *=*)
1390 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1391 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1392 case $ac_envvar in #(
1393 '' | [0-9]* | *[!_$as_cr_alnum]* )
1394 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1395 esac
1396 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1397 export $ac_envvar ;;
1398
c906108c 1399 *)
bec39cab 1400 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1401 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1402 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1403 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1404 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1405 ;;
1406
1407 esac
1408done
1409
1410if test -n "$ac_prev"; then
bec39cab 1411 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1412 as_fn_error "missing argument to $ac_option"
c906108c 1413fi
c906108c 1414
81ecdfbb
RW
1415if test -n "$ac_unrecognized_opts"; then
1416 case $enable_option_checking in
1417 no) ;;
1418 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1419 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1420 esac
81ecdfbb 1421fi
b4e70030 1422
81ecdfbb
RW
1423# Check all directory arguments for consistency.
1424for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1425 datadir sysconfdir sharedstatedir localstatedir includedir \
1426 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1427 libdir localedir mandir
b4e70030 1428do
81ecdfbb
RW
1429 eval ac_val=\$$ac_var
1430 # Remove trailing slashes.
1431 case $ac_val in
1432 */ )
1433 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1434 eval $ac_var=\$ac_val;;
1435 esac
1436 # Be sure to have absolute directory names.
b4e70030 1437 case $ac_val in
81ecdfbb
RW
1438 [\\/$]* | ?:[\\/]* ) continue;;
1439 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1440 esac
81ecdfbb 1441 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1442done
1443
bec39cab
AC
1444# There might be people who depend on the old broken behavior: `$host'
1445# used to hold the argument of --host etc.
1446# FIXME: To remove some day.
1447build=$build_alias
1448host=$host_alias
1449target=$target_alias
1450
1451# FIXME: To remove some day.
1452if test "x$host_alias" != x; then
1453 if test "x$build_alias" = x; then
1454 cross_compiling=maybe
81ecdfbb 1455 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1456 If a cross compiler is detected then cross compile mode will be used." >&2
1457 elif test "x$build_alias" != "x$host_alias"; then
1458 cross_compiling=yes
1459 fi
1460fi
c906108c 1461
bec39cab
AC
1462ac_tool_prefix=
1463test -n "$host_alias" && ac_tool_prefix=$host_alias-
1464
1465test "$silent" = yes && exec 6>/dev/null
c906108c 1466
c906108c 1467
81ecdfbb
RW
1468ac_pwd=`pwd` && test -n "$ac_pwd" &&
1469ac_ls_di=`ls -di .` &&
1470ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1471 as_fn_error "working directory cannot be determined"
1472test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1473 as_fn_error "pwd does not report name of working directory"
1474
1475
c906108c
SS
1476# Find the source files, if location was not specified.
1477if test -z "$srcdir"; then
1478 ac_srcdir_defaulted=yes
81ecdfbb
RW
1479 # Try the directory containing this script, then the parent directory.
1480 ac_confdir=`$as_dirname -- "$as_myself" ||
1481$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1482 X"$as_myself" : 'X\(//\)[^/]' \| \
1483 X"$as_myself" : 'X\(//\)$' \| \
1484 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1485$as_echo X"$as_myself" |
1486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1487 s//\1/
1488 q
1489 }
1490 /^X\(\/\/\)[^/].*/{
1491 s//\1/
1492 q
1493 }
1494 /^X\(\/\/\)$/{
1495 s//\1/
1496 q
1497 }
1498 /^X\(\/\).*/{
1499 s//\1/
1500 q
1501 }
1502 s/.*/./; q'`
c906108c 1503 srcdir=$ac_confdir
81ecdfbb 1504 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1505 srcdir=..
1506 fi
1507else
1508 ac_srcdir_defaulted=no
1509fi
81ecdfbb
RW
1510if test ! -r "$srcdir/$ac_unique_file"; then
1511 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1512 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1513fi
1514ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1515ac_abs_confdir=`(
1516 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1517 pwd)`
1518# When building in place, set srcdir=.
1519if test "$ac_abs_confdir" = "$ac_pwd"; then
1520 srcdir=.
1521fi
1522# Remove unnecessary trailing slashes from srcdir.
1523# Double slashes in file names in object file debugging info
1524# mess up M-x gdb in Emacs.
1525case $srcdir in
1526*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1527esac
1528for ac_var in $ac_precious_vars; do
1529 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1530 eval ac_env_${ac_var}_value=\$${ac_var}
1531 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1532 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1533done
c906108c 1534
bec39cab
AC
1535#
1536# Report the --help message.
1537#
1538if test "$ac_init_help" = "long"; then
1539 # Omit some internal or obsolete options to make the list less imposing.
1540 # This message is too long to be a string in the A/UX 3.1 sh.
1541 cat <<_ACEOF
1542\`configure' configures this package to adapt to many kinds of systems.
1543
1544Usage: $0 [OPTION]... [VAR=VALUE]...
1545
1546To assign environment variables (e.g., CC, CFLAGS...), specify them as
1547VAR=VALUE. See below for descriptions of some of the useful variables.
1548
1549Defaults for the options are specified in brackets.
1550
1551Configuration:
1552 -h, --help display this help and exit
1553 --help=short display options specific to this package
1554 --help=recursive display the short help of all the included packages
1555 -V, --version display version information and exit
1556 -q, --quiet, --silent do not print \`checking...' messages
1557 --cache-file=FILE cache test results in FILE [disabled]
1558 -C, --config-cache alias for \`--cache-file=config.cache'
1559 -n, --no-create do not create output files
1560 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1561
bec39cab
AC
1562Installation directories:
1563 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1564 [$ac_default_prefix]
bec39cab 1565 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1566 [PREFIX]
bec39cab
AC
1567
1568By default, \`make install' will install all the files in
1569\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1570an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1571for instance \`--prefix=\$HOME'.
1572
1573For better control, use the options below.
1574
1575Fine tuning of the installation directories:
81ecdfbb
RW
1576 --bindir=DIR user executables [EPREFIX/bin]
1577 --sbindir=DIR system admin executables [EPREFIX/sbin]
1578 --libexecdir=DIR program executables [EPREFIX/libexec]
1579 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1580 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1581 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1582 --libdir=DIR object code libraries [EPREFIX/lib]
1583 --includedir=DIR C header files [PREFIX/include]
1584 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1585 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1586 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1587 --infodir=DIR info documentation [DATAROOTDIR/info]
1588 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1589 --mandir=DIR man documentation [DATAROOTDIR/man]
1590 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1591 --htmldir=DIR html documentation [DOCDIR]
1592 --dvidir=DIR dvi documentation [DOCDIR]
1593 --pdfdir=DIR pdf documentation [DOCDIR]
1594 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1595_ACEOF
1596
1597 cat <<\_ACEOF
1598
1599Program names:
1600 --program-prefix=PREFIX prepend PREFIX to installed program names
1601 --program-suffix=SUFFIX append SUFFIX to installed program names
1602 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1603
1604X features:
1605 --x-includes=DIR X include files are in DIR
1606 --x-libraries=DIR X library files are in DIR
1607
1608System types:
1609 --build=BUILD configure for building on BUILD [guessed]
1610 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1611 --target=TARGET configure for building compilers for TARGET [HOST]
1612_ACEOF
1613fi
1614
1615if test -n "$ac_init_help"; then
1616
1617 cat <<\_ACEOF
1618
1619Optional Features:
81ecdfbb 1620 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1621 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1622 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1623 --enable-maintainer-mode enable make rules and dependencies not useful
1624 (and sometimes confusing) to the casual installer
da2f07f1
JK
1625 --enable-plugins Enable support for plugins (defaults no)
1626 --disable-largefile omit support for large files
e28b3332
DJ
1627 --disable-dependency-tracking speeds up one-time build
1628 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1629 --enable-targets=TARGETS
1630 alternative target configurations
c0993dbe 1631 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1632 --disable-gdbcli disable command-line interface (CLI)
1633 --disable-gdbmi disable machine-interface (MI)
1634 --enable-tui enable full-screen terminal user interface (TUI)
1635 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1636 --enable-profiling enable profiling of GDB
3841debe 1637 --disable-rpath do not hardcode runtime library paths
a1220294 1638 --enable-werror treat compile warnings as errors
32c1c914 1639 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1640 --enable-gdb-build-warnings
32c1c914 1641 enable GDB specific build-time compiler warnings if
a1220294 1642 gcc is used
32c1c914 1643 --enable-sim link gdb with simulator
bec39cab 1644 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1645 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1646 is auto)
bec39cab
AC
1647
1648Optional Packages:
1649 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1650 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1651 --with-separate-debug-dir=PATH
32c1c914 1652 look for global separate debug info in this path
62e4f60c 1653 [LIBDIR/debug]
b14b1491
TT
1654 --with-gdb-datadir=PATH look for global separate data files in this path
1655 [DATADIR/gdb]
29b0e8a2 1656 --with-relocated-sources=PATH
32c1c914
TT
1657 automatically relocate this path for source files
1658 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1659 --with-curses use the curses library instead of the termcap
1660 library
c16158bc
JM
1661 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1662 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1663 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1664 --with-libiconv-prefix=DIR
1665 search for libiconv in DIR/include and DIR/lib
478aac75 1666 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1667 --with-system-readline use installed readline library
5c39566f 1668 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1669 --with-gnu-ld assume the C compiler uses GNU ld default=no
1670 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1671 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1672 --with-python[=PYTHON] include python support
1673 (auto/yes/no/<python-program>)
a1220294
TT
1674 --without-included-regex
1675 don't use included regex; this is the default on
1676 systems with version 2 of the GNU C library (use
1677 with caution on other system)
81ecdfbb 1678 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1679 --with-system-gdbinit=PATH
32c1c914 1680 automatically load a system-wide gdbinit file
5062cc19
KS
1681 --with-tcl directory containing tcl configuration (tclConfig.sh)
1682 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1683 --with-x use the X Window System
bec39cab
AC
1684
1685Some influential environment variables:
1686 CC C compiler command
1687 CFLAGS C compiler flags
1688 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1689 nonstandard directory <lib dir>
81ecdfbb
RW
1690 LIBS libraries to pass to the linker, e.g. -l<library>
1691 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1692 you have headers in a nonstandard directory <include dir>
bec39cab 1693 CPP C preprocessor
81ecdfbb
RW
1694 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1695 the first program found out of: `bison -y', `byacc', `yacc'.
1696 YFLAGS The list of arguments that will be passed by default to $YACC.
1697 This script will default YFLAGS to the empty string to avoid a
1698 default value of `-d' given by some make applications.
1699 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1700
1701Use these variables to override the choices made by `configure' or to help
1702it to find libraries and programs with nonstandard names/locations.
1703
81ecdfbb 1704Report bugs to the package provider.
bec39cab 1705_ACEOF
81ecdfbb 1706ac_status=$?
bec39cab
AC
1707fi
1708
1709if test "$ac_init_help" = "recursive"; then
1710 # If there are subdirs, report their specific --help.
bec39cab 1711 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1712 test -d "$ac_dir" ||
1713 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1714 continue
bec39cab
AC
1715 ac_builddir=.
1716
81ecdfbb
RW
1717case "$ac_dir" in
1718.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1719*)
1720 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1721 # A ".." for each directory in $ac_dir_suffix.
1722 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1723 case $ac_top_builddir_sub in
1724 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1725 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1726 esac ;;
1727esac
1728ac_abs_top_builddir=$ac_pwd
1729ac_abs_builddir=$ac_pwd$ac_dir_suffix
1730# for backward compatibility:
1731ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1732
1733case $srcdir in
81ecdfbb 1734 .) # We are building in place.
bec39cab 1735 ac_srcdir=.
81ecdfbb
RW
1736 ac_top_srcdir=$ac_top_builddir_sub
1737 ac_abs_top_srcdir=$ac_pwd ;;
1738 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1739 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1740 ac_top_srcdir=$srcdir
1741 ac_abs_top_srcdir=$srcdir ;;
1742 *) # Relative name.
1743 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1744 ac_top_srcdir=$ac_top_build_prefix$srcdir
1745 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1746esac
81ecdfbb 1747ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1748
81ecdfbb
RW
1749 cd "$ac_dir" || { ac_status=$?; continue; }
1750 # Check for guested configure.
1751 if test -f "$ac_srcdir/configure.gnu"; then
1752 echo &&
1753 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1754 elif test -f "$ac_srcdir/configure"; then
1755 echo &&
1756 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1757 else
81ecdfbb
RW
1758 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1759 fi || ac_status=$?
1760 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1761 done
1762fi
1763
81ecdfbb 1764test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1765if $ac_init_version; then
1766 cat <<\_ACEOF
81ecdfbb
RW
1767configure
1768generated by GNU Autoconf 2.64
bec39cab 1769
81ecdfbb 1770Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1771This configure script is free software; the Free Software Foundation
1772gives unlimited permission to copy, distribute and modify it.
1773_ACEOF
81ecdfbb 1774 exit
bec39cab 1775fi
bec39cab 1776
81ecdfbb
RW
1777## ------------------------ ##
1778## Autoconf initialization. ##
1779## ------------------------ ##
bec39cab 1780
81ecdfbb
RW
1781# ac_fn_c_try_compile LINENO
1782# --------------------------
1783# Try to compile conftest.$ac_ext, and return whether this succeeded.
1784ac_fn_c_try_compile ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 rm -f conftest.$ac_objext
1788 if { { ac_try="$ac_compile"
1789case "(($ac_try" in
1790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1791 *) ac_try_echo=$ac_try;;
1792esac
1793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1794$as_echo "$ac_try_echo"; } >&5
1795 (eval "$ac_compile") 2>conftest.err
1796 ac_status=$?
1797 if test -s conftest.err; then
1798 grep -v '^ *+' conftest.err >conftest.er1
1799 cat conftest.er1 >&5
1800 mv -f conftest.er1 conftest.err
1801 fi
1802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1803 test $ac_status = 0; } && {
1804 test -z "$ac_c_werror_flag" ||
1805 test ! -s conftest.err
1806 } && test -s conftest.$ac_objext; then :
1807 ac_retval=0
1808else
1809 $as_echo "$as_me: failed program was:" >&5
1810sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1811
81ecdfbb
RW
1812 ac_retval=1
1813fi
1814 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1815 return $ac_retval
1816
1817} # ac_fn_c_try_compile
1818
1819# ac_fn_c_try_cpp LINENO
1820# ----------------------
1821# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1822ac_fn_c_try_cpp ()
bec39cab 1823{
81ecdfbb
RW
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 if { { ac_try="$ac_cpp conftest.$ac_ext"
1826case "(($ac_try" in
1827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1828 *) ac_try_echo=$ac_try;;
1829esac
1830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1831$as_echo "$ac_try_echo"; } >&5
1832 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1833 ac_status=$?
1834 if test -s conftest.err; then
1835 grep -v '^ *+' conftest.err >conftest.er1
1836 cat conftest.er1 >&5
1837 mv -f conftest.er1 conftest.err
1838 fi
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; } >/dev/null && {
1841 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1842 test ! -s conftest.err
1843 }; then :
1844 ac_retval=0
1845else
1846 $as_echo "$as_me: failed program was:" >&5
1847sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1848
81ecdfbb
RW
1849 ac_retval=1
1850fi
1851 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1852 return $ac_retval
bec39cab 1853
81ecdfbb 1854} # ac_fn_c_try_cpp
bec39cab 1855
81ecdfbb
RW
1856# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1857# -------------------------------------------------------
1858# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1859# the include files in INCLUDES and setting the cache variable VAR
1860# accordingly.
1861ac_fn_c_check_header_mongrel ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1866$as_echo_n "checking for $2... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869fi
1870eval ac_res=\$$3
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1872$as_echo "$ac_res" >&6; }
1873else
1874 # Is the header compilable?
1875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1876$as_echo_n "checking $2 usability... " >&6; }
1877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880#include <$2>
1881_ACEOF
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 ac_header_compiler=yes
1884else
1885 ac_header_compiler=no
1886fi
1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1889$as_echo "$ac_header_compiler" >&6; }
bec39cab 1890
81ecdfbb
RW
1891# Is the header present?
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1893$as_echo_n "checking $2 presence... " >&6; }
1894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895/* end confdefs.h. */
1896#include <$2>
1897_ACEOF
1898if ac_fn_c_try_cpp "$LINENO"; then :
1899 ac_header_preproc=yes
1900else
1901 ac_header_preproc=no
1902fi
1903rm -f conftest.err conftest.$ac_ext
1904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1905$as_echo "$ac_header_preproc" >&6; }
bec39cab 1906
81ecdfbb
RW
1907# So? What about this header?
1908case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1909 yes:no: )
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1911$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ;;
1915 no:yes:* )
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1917$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1919$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1921$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1923$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1925$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1926 ;;
1927esac
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1929$as_echo_n "checking for $2... " >&6; }
1930if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1931 $as_echo_n "(cached) " >&6
1932else
1933 eval "$3=\$ac_header_compiler"
1934fi
1935eval ac_res=\$$3
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937$as_echo "$ac_res" >&6; }
1938fi
1939 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1940
81ecdfbb 1941} # ac_fn_c_check_header_mongrel
bec39cab 1942
81ecdfbb
RW
1943# ac_fn_c_try_run LINENO
1944# ----------------------
1945# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1946# that executables *can* be run.
1947ac_fn_c_try_run ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 if { { ac_try="$ac_link"
1951case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957 (eval "$ac_link") 2>&5
1958 ac_status=$?
1959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1961 { { case "(($ac_try" in
1962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1963 *) ac_try_echo=$ac_try;;
1964esac
1965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1966$as_echo "$ac_try_echo"; } >&5
1967 (eval "$ac_try") 2>&5
1968 ac_status=$?
1969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1970 test $ac_status = 0; }; }; then :
1971 ac_retval=0
1972else
1973 $as_echo "$as_me: program exited with status $ac_status" >&5
1974 $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1976
81ecdfbb
RW
1977 ac_retval=$ac_status
1978fi
1979 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1980 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1981 return $ac_retval
bec39cab 1982
81ecdfbb 1983} # ac_fn_c_try_run
bec39cab 1984
81ecdfbb
RW
1985# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1986# -------------------------------------------------------
1987# Tests whether HEADER exists and can be compiled using the include files in
1988# INCLUDES, setting the cache variable VAR accordingly.
1989ac_fn_c_check_header_compile ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1993$as_echo_n "checking for $2... " >&6; }
1994if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1995 $as_echo_n "(cached) " >&6
1996else
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000#include <$2>
bec39cab 2001_ACEOF
81ecdfbb
RW
2002if ac_fn_c_try_compile "$LINENO"; then :
2003 eval "$3=yes"
2004else
2005 eval "$3=no"
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
2012 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2013
81ecdfbb 2014} # ac_fn_c_check_header_compile
bec39cab 2015
81ecdfbb
RW
2016# ac_fn_c_try_link LINENO
2017# -----------------------
2018# Try to link conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_c_try_link ()
b4e70030 2020{
81ecdfbb
RW
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 rm -f conftest.$ac_objext conftest$ac_exeext
2023 if { { ac_try="$ac_link"
2024case "(($ac_try" in
2025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026 *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030 (eval "$ac_link") 2>conftest.err
2031 ac_status=$?
2032 if test -s conftest.err; then
2033 grep -v '^ *+' conftest.err >conftest.er1
2034 cat conftest.er1 >&5
2035 mv -f conftest.er1 conftest.err
2036 fi
2037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038 test $ac_status = 0; } && {
2039 test -z "$ac_c_werror_flag" ||
2040 test ! -s conftest.err
2041 } && test -s conftest$ac_exeext && {
2042 test "$cross_compiling" = yes ||
2043 $as_test_x conftest$ac_exeext
2044 }; then :
2045 ac_retval=0
2046else
2047 $as_echo "$as_me: failed program was:" >&5
2048sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2049
81ecdfbb
RW
2050 ac_retval=1
2051fi
2052 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2053 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2054 # interfere with the next link command; also delete a directory that is
2055 # left behind by Apple's compiler. We do this before executing the actions.
2056 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2057 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058 return $ac_retval
bec39cab 2059
81ecdfbb 2060} # ac_fn_c_try_link
bec39cab 2061
81ecdfbb
RW
2062# ac_fn_c_check_func LINENO FUNC VAR
2063# ----------------------------------
2064# Tests whether FUNC exists, setting the cache variable VAR accordingly
2065ac_fn_c_check_func ()
2066{
2067 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2069$as_echo_n "checking for $2... " >&6; }
2070if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2071 $as_echo_n "(cached) " >&6
2072else
2073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h. */
2075/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2076 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2077#define $2 innocuous_$2
bec39cab 2078
81ecdfbb
RW
2079/* System header to define __stub macros and hopefully few prototypes,
2080 which can conflict with char $2 (); below.
2081 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2082 <limits.h> exists even on freestanding compilers. */
bec39cab 2083
81ecdfbb
RW
2084#ifdef __STDC__
2085# include <limits.h>
2086#else
2087# include <assert.h>
2088#endif
bec39cab 2089
81ecdfbb 2090#undef $2
bec39cab 2091
81ecdfbb
RW
2092/* Override any GCC internal prototype to avoid an error.
2093 Use char because int might match the return type of a GCC
2094 builtin and then its argument prototype would still apply. */
2095#ifdef __cplusplus
2096extern "C"
2097#endif
2098char $2 ();
2099/* The GNU C library defines this for functions which it implements
2100 to always fail with ENOSYS. Some functions are actually named
2101 something starting with __ and the normal name is an alias. */
2102#if defined __stub_$2 || defined __stub___$2
2103choke me
2104#endif
bec39cab 2105
81ecdfbb
RW
2106int
2107main ()
2108{
2109return $2 ();
2110 ;
2111 return 0;
2112}
bec39cab 2113_ACEOF
81ecdfbb
RW
2114if ac_fn_c_try_link "$LINENO"; then :
2115 eval "$3=yes"
2116else
2117 eval "$3=no"
2118fi
2119rm -f core conftest.err conftest.$ac_objext \
2120 conftest$ac_exeext conftest.$ac_ext
2121fi
2122eval ac_res=\$$3
2123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124$as_echo "$ac_res" >&6; }
2125 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2126
81ecdfbb 2127} # ac_fn_c_check_func
bec39cab 2128
81ecdfbb
RW
2129# ac_fn_c_check_decl LINENO SYMBOL VAR
2130# ------------------------------------
2131# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2132ac_fn_c_check_decl ()
2133{
2134 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2135 as_decl_name=`echo $2|sed 's/ *(.*//'`
2136 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2138$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2139if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2140 $as_echo_n "(cached) " >&6
2141else
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
e7a30f46
DE
2148#ifndef $as_decl_name
2149#ifdef __cplusplus
2150 (void) $as_decl_use;
2151#else
2152 (void) $as_decl_name;
2153#endif
81ecdfbb 2154#endif
bec39cab 2155
81ecdfbb
RW
2156 ;
2157 return 0;
2158}
bec39cab 2159_ACEOF
81ecdfbb
RW
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 eval "$3=yes"
2162else
2163 eval "$3=no"
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166fi
2167eval ac_res=\$$3
2168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2169$as_echo "$ac_res" >&6; }
2170 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2171
81ecdfbb 2172} # ac_fn_c_check_decl
bec39cab 2173
81ecdfbb
RW
2174# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2175# --------------------------------------------
2176# Tries to find the compile-time value of EXPR in a program that includes
2177# INCLUDES, setting VAR accordingly. Returns whether the value could be
2178# computed
2179ac_fn_c_compute_int ()
2180{
2181 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182 if test "$cross_compiling" = yes; then
2183 # Depending upon the size, compute the lo and hi bounds.
2184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187int
2188main ()
2189{
2190static int test_array [1 - 2 * !(($2) >= 0)];
2191test_array [0] = 0
bec39cab 2192
81ecdfbb
RW
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_lo=0 ac_mid=0
2199 while :; do
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h. */
2202$4
2203int
2204main ()
2205{
2206static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2207test_array [0] = 0
bec39cab 2208
81ecdfbb
RW
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_compile "$LINENO"; then :
2214 ac_hi=$ac_mid; break
2215else
2216 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2217 if test $ac_lo -le $ac_mid; then
2218 ac_lo= ac_hi=
2219 break
2220 fi
2221 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2222fi
81ecdfbb
RW
2223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2224 done
c906108c 2225else
81ecdfbb
RW
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) < 0)];
2233test_array [0] = 0
bec39cab 2234
81ecdfbb
RW
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_compile "$LINENO"; then :
2240 ac_hi=-1 ac_mid=-1
2241 while :; do
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h. */
2244$4
2245int
2246main ()
2247{
2248static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2249test_array [0] = 0
bec39cab 2250
81ecdfbb
RW
2251 ;
2252 return 0;
2253}
2254_ACEOF
2255if ac_fn_c_try_compile "$LINENO"; then :
2256 ac_lo=$ac_mid; break
2257else
2258 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2259 if test $ac_mid -le $ac_hi; then
2260 ac_lo= ac_hi=
2261 break
2262 fi
2263 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266 done
2267else
2268 ac_lo= ac_hi=
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273# Binary search between lo and hi bounds.
2274while test "x$ac_lo" != "x$ac_hi"; do
2275 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$4
2279int
2280main ()
2281{
2282static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2283test_array [0] = 0
bec39cab 2284
81ecdfbb
RW
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_compile "$LINENO"; then :
2290 ac_hi=$ac_mid
2291else
2292 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295done
2296case $ac_lo in #((
2297?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2298'') ac_retval=1 ;;
2299esac
2300 else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304static long int longval () { return $2; }
2305static unsigned long int ulongval () { return $2; }
2306#include <stdio.h>
2307#include <stdlib.h>
2308int
2309main ()
2310{
bec39cab 2311
81ecdfbb
RW
2312 FILE *f = fopen ("conftest.val", "w");
2313 if (! f)
2314 return 1;
2315 if (($2) < 0)
2316 {
2317 long int i = longval ();
2318 if (i != ($2))
2319 return 1;
2320 fprintf (f, "%ld", i);
2321 }
2322 else
2323 {
2324 unsigned long int i = ulongval ();
2325 if (i != ($2))
2326 return 1;
2327 fprintf (f, "%lu", i);
2328 }
2329 /* Do not output a trailing newline, as this causes \r\n confusion
2330 on some platforms. */
2331 return ferror (f) || fclose (f) != 0;
bec39cab 2332
81ecdfbb
RW
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_run "$LINENO"; then :
2338 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2339else
2340 ac_retval=1
2341fi
2342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2343 conftest.$ac_objext conftest.beam conftest.$ac_ext
2344rm -f conftest.val
bec39cab 2345
81ecdfbb
RW
2346 fi
2347 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2348 return $ac_retval
bec39cab 2349
81ecdfbb 2350} # ac_fn_c_compute_int
bec39cab 2351
81ecdfbb
RW
2352# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2353# ----------------------------------------------------
2354# Tries to find if the field MEMBER exists in type AGGR, after including
2355# INCLUDES, setting cache variable VAR accordingly.
2356ac_fn_c_check_member ()
2357{
2358 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2360$as_echo_n "checking for $2.$3... " >&6; }
2361if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2362 $as_echo_n "(cached) " >&6
2363else
2364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
2368main ()
2369{
2370static $2 ac_aggr;
2371if (ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$4=yes"
2379else
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$5
2383int
2384main ()
2385{
2386static $2 ac_aggr;
2387if (sizeof ac_aggr.$3)
2388return 0;
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393if ac_fn_c_try_compile "$LINENO"; then :
2394 eval "$4=yes"
2395else
2396 eval "$4=no"
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402eval ac_res=\$$4
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404$as_echo "$ac_res" >&6; }
2405 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2406
81ecdfbb 2407} # ac_fn_c_check_member
bec39cab 2408
81ecdfbb
RW
2409# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2410# -------------------------------------------
2411# Tests whether TYPE exists after having included INCLUDES, setting cache
2412# variable VAR accordingly.
2413ac_fn_c_check_type ()
2414{
2415 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2417$as_echo_n "checking for $2... " >&6; }
2418if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2419 $as_echo_n "(cached) " >&6
2420else
2421 eval "$3=no"
2422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2423/* end confdefs.h. */
2424$4
2425int
2426main ()
2427{
2428if (sizeof ($2))
2429 return 0;
2430 ;
2431 return 0;
2432}
2433_ACEOF
2434if ac_fn_c_try_compile "$LINENO"; then :
2435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2436/* end confdefs.h. */
2437$4
2438int
2439main ()
2440{
2441if (sizeof (($2)))
2442 return 0;
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2448
81ecdfbb
RW
2449else
2450 eval "$3=yes"
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453fi
2454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2455fi
2456eval ac_res=\$$3
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2458$as_echo "$ac_res" >&6; }
2459 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2460
81ecdfbb
RW
2461} # ac_fn_c_check_type
2462cat >config.log <<_ACEOF
2463This file contains any messages produced by compilers while
2464running configure, to aid debugging if configure makes a mistake.
d5af19ba 2465
81ecdfbb
RW
2466It was created by $as_me, which was
2467generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2468
81ecdfbb 2469 $ $0 $@
413ccac7 2470
81ecdfbb
RW
2471_ACEOF
2472exec 5>>config.log
2473{
2474cat <<_ASUNAME
2475## --------- ##
2476## Platform. ##
2477## --------- ##
413ccac7 2478
81ecdfbb
RW
2479hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2480uname -m = `(uname -m) 2>/dev/null || echo unknown`
2481uname -r = `(uname -r) 2>/dev/null || echo unknown`
2482uname -s = `(uname -s) 2>/dev/null || echo unknown`
2483uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2484
81ecdfbb
RW
2485/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2486/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2487
81ecdfbb
RW
2488/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2489/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2490/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2491/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2492/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2493/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2494/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2495
81ecdfbb 2496_ASUNAME
bec39cab 2497
bec39cab
AC
2498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2499for as_dir in $PATH
2500do
2501 IFS=$as_save_IFS
2502 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2503 $as_echo "PATH: $as_dir"
2504 done
2505IFS=$as_save_IFS
bec39cab 2506
81ecdfbb 2507} >&5
bec39cab 2508
81ecdfbb 2509cat >&5 <<_ACEOF
bec39cab 2510
bec39cab 2511
81ecdfbb
RW
2512## ----------- ##
2513## Core tests. ##
2514## ----------- ##
2515
2516_ACEOF
2517
2518
2519# Keep a trace of the command line.
2520# Strip out --no-create and --no-recursion so they do not pile up.
2521# Strip out --silent because we don't want to record it for future runs.
2522# Also quote any args containing shell meta-characters.
2523# Make two passes to allow for proper duplicate-argument suppression.
2524ac_configure_args=
2525ac_configure_args0=
2526ac_configure_args1=
2527ac_must_keep_next=false
2528for ac_pass in 1 2
2529do
2530 for ac_arg
2531 do
2532 case $ac_arg in
2533 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2534 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2535 | -silent | --silent | --silen | --sile | --sil)
2536 continue ;;
2537 *\'*)
2538 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2539 esac
2540 case $ac_pass in
2541 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2542 2)
2543 as_fn_append ac_configure_args1 " '$ac_arg'"
2544 if test $ac_must_keep_next = true; then
2545 ac_must_keep_next=false # Got value, back to normal.
2546 else
2547 case $ac_arg in
2548 *=* | --config-cache | -C | -disable-* | --disable-* \
2549 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2550 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2551 | -with-* | --with-* | -without-* | --without-* | --x)
2552 case "$ac_configure_args0 " in
2553 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2554 esac
2555 ;;
2556 -* ) ac_must_keep_next=true ;;
2557 esac
2558 fi
2559 as_fn_append ac_configure_args " '$ac_arg'"
2560 ;;
2561 esac
2562 done
2563done
2564{ ac_configure_args0=; unset ac_configure_args0;}
2565{ ac_configure_args1=; unset ac_configure_args1;}
2566
2567# When interrupted or exit'd, cleanup temporary files, and complete
2568# config.log. We remove comments because anyway the quotes in there
2569# would cause problems or look ugly.
2570# WARNING: Use '\'' to represent an apostrophe within the trap.
2571# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2572trap 'exit_status=$?
2573 # Save into config.log some information that might help in debugging.
2574 {
2575 echo
2576
2577 cat <<\_ASBOX
2578## ---------------- ##
2579## Cache variables. ##
2580## ---------------- ##
2581_ASBOX
2582 echo
2583 # The following way of writing the cache mishandles newlines in values,
2584(
2585 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2586 eval ac_val=\$$ac_var
2587 case $ac_val in #(
2588 *${as_nl}*)
2589 case $ac_var in #(
2590 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2591$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2592 esac
2593 case $ac_var in #(
2594 _ | IFS | as_nl) ;; #(
2595 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2596 *) { eval $ac_var=; unset $ac_var;} ;;
2597 esac ;;
2598 esac
2599 done
2600 (set) 2>&1 |
2601 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2602 *${as_nl}ac_space=\ *)
2603 sed -n \
2604 "s/'\''/'\''\\\\'\'''\''/g;
2605 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2606 ;; #(
2607 *)
2608 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2609 ;;
2610 esac |
2611 sort
2612)
2613 echo
2614
2615 cat <<\_ASBOX
2616## ----------------- ##
2617## Output variables. ##
2618## ----------------- ##
2619_ASBOX
2620 echo
2621 for ac_var in $ac_subst_vars
2622 do
2623 eval ac_val=\$$ac_var
2624 case $ac_val in
2625 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2626 esac
2627 $as_echo "$ac_var='\''$ac_val'\''"
2628 done | sort
2629 echo
2630
2631 if test -n "$ac_subst_files"; then
2632 cat <<\_ASBOX
2633## ------------------- ##
2634## File substitutions. ##
2635## ------------------- ##
2636_ASBOX
2637 echo
2638 for ac_var in $ac_subst_files
2639 do
2640 eval ac_val=\$$ac_var
2641 case $ac_val in
2642 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2643 esac
2644 $as_echo "$ac_var='\''$ac_val'\''"
2645 done | sort
2646 echo
2647 fi
2648
2649 if test -s confdefs.h; then
2650 cat <<\_ASBOX
2651## ----------- ##
2652## confdefs.h. ##
2653## ----------- ##
2654_ASBOX
2655 echo
2656 cat confdefs.h
2657 echo
2658 fi
2659 test "$ac_signal" != 0 &&
2660 $as_echo "$as_me: caught signal $ac_signal"
2661 $as_echo "$as_me: exit $exit_status"
2662 } >&5
2663 rm -f core *.core core.conftest.* &&
2664 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2665 exit $exit_status
2666' 0
2667for ac_signal in 1 2 13 15; do
2668 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2669done
2670ac_signal=0
2671
2672# confdefs.h avoids OS command line length limits that DEFS can exceed.
2673rm -f -r conftest* confdefs.h
2674
2675$as_echo "/* confdefs.h */" > confdefs.h
2676
2677# Predefined preprocessor variables.
2678
2679cat >>confdefs.h <<_ACEOF
2680#define PACKAGE_NAME "$PACKAGE_NAME"
2681_ACEOF
2682
2683cat >>confdefs.h <<_ACEOF
2684#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2685_ACEOF
2686
2687cat >>confdefs.h <<_ACEOF
2688#define PACKAGE_VERSION "$PACKAGE_VERSION"
2689_ACEOF
2690
2691cat >>confdefs.h <<_ACEOF
2692#define PACKAGE_STRING "$PACKAGE_STRING"
2693_ACEOF
2694
2695cat >>confdefs.h <<_ACEOF
2696#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2697_ACEOF
2698
2699cat >>confdefs.h <<_ACEOF
2700#define PACKAGE_URL "$PACKAGE_URL"
2701_ACEOF
2702
2703
2704# Let the site file select an alternate cache file if it wants to.
2705# Prefer an explicitly selected file to automatically selected ones.
2706ac_site_file1=NONE
2707ac_site_file2=NONE
2708if test -n "$CONFIG_SITE"; then
2709 ac_site_file1=$CONFIG_SITE
2710elif test "x$prefix" != xNONE; then
2711 ac_site_file1=$prefix/share/config.site
2712 ac_site_file2=$prefix/etc/config.site
2713else
2714 ac_site_file1=$ac_default_prefix/share/config.site
2715 ac_site_file2=$ac_default_prefix/etc/config.site
2716fi
2717for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2718do
2719 test "x$ac_site_file" = xNONE && continue
2720 if test -r "$ac_site_file"; then
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2722$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2723 sed 's/^/| /' "$ac_site_file" >&5
2724 . "$ac_site_file"
2725 fi
2726done
2727
2728if test -r "$cache_file"; then
2729 # Some versions of bash will fail to source /dev/null (special
2730 # files actually), so we avoid doing that.
2731 if test -f "$cache_file"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2733$as_echo "$as_me: loading cache $cache_file" >&6;}
2734 case $cache_file in
2735 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2736 *) . "./$cache_file";;
2737 esac
2738 fi
2739else
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2741$as_echo "$as_me: creating cache $cache_file" >&6;}
2742 >$cache_file
bec39cab
AC
2743fi
2744
f434ba03
PA
2745gl_header_list="$gl_header_list sys/mman.h"
2746gl_func_list="$gl_func_list mprotect"
2747gl_func_list="$gl_func_list memchr"
2748gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2749gl_header_list="$gl_header_list stdint.h"
2750gl_header_list="$gl_header_list wchar.h"
2751gl_header_list="$gl_header_list string.h"
2752# Check that the precious variables saved in the cache have kept the same
2753# value.
2754ac_cache_corrupted=false
2755for ac_var in $ac_precious_vars; do
2756 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2757 eval ac_new_set=\$ac_env_${ac_var}_set
2758 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2759 eval ac_new_val=\$ac_env_${ac_var}_value
2760 case $ac_old_set,$ac_new_set in
2761 set,)
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2763$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2764 ac_cache_corrupted=: ;;
2765 ,set)
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2767$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2768 ac_cache_corrupted=: ;;
2769 ,);;
2770 *)
2771 if test "x$ac_old_val" != "x$ac_new_val"; then
2772 # differences in whitespace do not lead to failure.
2773 ac_old_val_w=`echo x $ac_old_val`
2774 ac_new_val_w=`echo x $ac_new_val`
2775 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2777$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2778 ac_cache_corrupted=:
2779 else
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2781$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2782 eval $ac_var=\$ac_old_val
2783 fi
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2785$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2787$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2788 fi;;
2789 esac
2790 # Pass precious variables to config.status.
2791 if test "$ac_new_set" = set; then
2792 case $ac_new_val in
2793 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2794 *) ac_arg=$ac_var=$ac_new_val ;;
2795 esac
2796 case " $ac_configure_args " in
2797 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2798 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2799 esac
2800 fi
2801done
2802if $ac_cache_corrupted; then
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2806$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2807 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2808fi
2809## -------------------- ##
2810## Main body of script. ##
2811## -------------------- ##
2812
2813ac_ext=c
2814ac_cpp='$CPP $CPPFLAGS'
2815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2817ac_compiler_gnu=$ac_cv_c_compiler_gnu
2818
2819
2820
2821
2822
2823ac_config_headers="$ac_config_headers config.h:config.in"
2824
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2827$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2828 # Check whether --enable-maintainer-mode was given.
2829if test "${enable_maintainer_mode+set}" = set; then :
2830 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2831else
2832 USE_MAINTAINER_MODE=no
2833fi
2834
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2836$as_echo "$USE_MAINTAINER_MODE" >&6; }
2837 if test $USE_MAINTAINER_MODE = yes; then
2838 MAINTAINER_MODE_TRUE=
2839 MAINTAINER_MODE_FALSE='#'
2840else
2841 MAINTAINER_MODE_TRUE='#'
2842 MAINTAINER_MODE_FALSE=
2843fi
2844
2845 MAINT=$MAINTAINER_MODE_TRUE
2846
2847
2848
2849ac_ext=c
2850ac_cpp='$CPP $CPPFLAGS'
2851ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2852ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2853ac_compiler_gnu=$ac_cv_c_compiler_gnu
2854if test -n "$ac_tool_prefix"; then
2855 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2856set dummy ${ac_tool_prefix}gcc; ac_word=$2
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2858$as_echo_n "checking for $ac_word... " >&6; }
2859if test "${ac_cv_prog_CC+set}" = set; then :
2860 $as_echo_n "(cached) " >&6
c906108c
SS
2861else
2862 if test -n "$CC"; then
2863 ac_cv_prog_CC="$CC" # Let the user override the test.
2864else
bec39cab
AC
2865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2866for as_dir in $PATH
2867do
2868 IFS=$as_save_IFS
2869 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2870 for ac_exec_ext in '' $ac_executable_extensions; do
2871 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2872 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2874 break 2
2875 fi
2876done
81ecdfbb
RW
2877 done
2878IFS=$as_save_IFS
bec39cab 2879
c906108c
SS
2880fi
2881fi
bec39cab 2882CC=$ac_cv_prog_CC
c906108c 2883if test -n "$CC"; then
81ecdfbb
RW
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2885$as_echo "$CC" >&6; }
c906108c 2886else
81ecdfbb
RW
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2888$as_echo "no" >&6; }
c906108c
SS
2889fi
2890
81ecdfbb 2891
b4e70030
JB
2892fi
2893if test -z "$ac_cv_prog_CC"; then
2894 ac_ct_CC=$CC
81ecdfbb
RW
2895 # Extract the first word of "gcc", so it can be a program name with args.
2896set dummy gcc; ac_word=$2
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2898$as_echo_n "checking for $ac_word... " >&6; }
2899if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2900 $as_echo_n "(cached) " >&6
b4e70030
JB
2901else
2902 if test -n "$ac_ct_CC"; then
2903 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2904else
2905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2906for as_dir in $PATH
2907do
2908 IFS=$as_save_IFS
2909 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2910 for ac_exec_ext in '' $ac_executable_extensions; do
2911 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2912 ac_cv_prog_ac_ct_CC="gcc"
2913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2914 break 2
4e8d927d 2915 fi
b4e70030 2916done
81ecdfbb
RW
2917 done
2918IFS=$as_save_IFS
b4e70030
JB
2919
2920fi
2921fi
2922ac_ct_CC=$ac_cv_prog_ac_ct_CC
2923if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2925$as_echo "$ac_ct_CC" >&6; }
b4e70030 2926else
81ecdfbb
RW
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2928$as_echo "no" >&6; }
b4e70030
JB
2929fi
2930
81ecdfbb
RW
2931 if test "x$ac_ct_CC" = x; then
2932 CC=""
2933 else
2934 case $cross_compiling:$ac_tool_warned in
2935yes:)
2936{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2937$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2938ac_tool_warned=yes ;;
2939esac
2940 CC=$ac_ct_CC
2941 fi
b4e70030
JB
2942else
2943 CC="$ac_cv_prog_CC"
2944fi
2945
c906108c 2946if test -z "$CC"; then
81ecdfbb
RW
2947 if test -n "$ac_tool_prefix"; then
2948 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2949set dummy ${ac_tool_prefix}cc; ac_word=$2
2950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2951$as_echo_n "checking for $ac_word... " >&6; }
2952if test "${ac_cv_prog_CC+set}" = set; then :
2953 $as_echo_n "(cached) " >&6
c906108c
SS
2954else
2955 if test -n "$CC"; then
2956 ac_cv_prog_CC="$CC" # Let the user override the test.
2957else
bec39cab
AC
2958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2959for as_dir in $PATH
2960do
2961 IFS=$as_save_IFS
2962 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2963 for ac_exec_ext in '' $ac_executable_extensions; do
2964 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2965 ac_cv_prog_CC="${ac_tool_prefix}cc"
2966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2967 break 2
2968 fi
2969done
81ecdfbb
RW
2970 done
2971IFS=$as_save_IFS
2972
2973fi
2974fi
2975CC=$ac_cv_prog_CC
2976if test -n "$CC"; then
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2978$as_echo "$CC" >&6; }
2979else
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2981$as_echo "no" >&6; }
2982fi
2983
2984
2985 fi
2986fi
2987if test -z "$CC"; then
2988 # Extract the first word of "cc", so it can be a program name with args.
2989set dummy cc; ac_word=$2
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991$as_echo_n "checking for $ac_word... " >&6; }
2992if test "${ac_cv_prog_CC+set}" = set; then :
2993 $as_echo_n "(cached) " >&6
2994else
2995 if test -n "$CC"; then
2996 ac_cv_prog_CC="$CC" # Let the user override the test.
2997else
2998 ac_prog_rejected=no
2999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3000for as_dir in $PATH
3001do
3002 IFS=$as_save_IFS
3003 test -z "$as_dir" && as_dir=.
3004 for ac_exec_ext in '' $ac_executable_extensions; do
3005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3006 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3007 ac_prog_rejected=yes
3008 continue
3009 fi
3010 ac_cv_prog_CC="cc"
3011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3012 break 2
3013 fi
3014done
3015 done
3016IFS=$as_save_IFS
bec39cab 3017
c906108c
SS
3018if test $ac_prog_rejected = yes; then
3019 # We found a bogon in the path, so make sure we never use it.
3020 set dummy $ac_cv_prog_CC
3021 shift
bec39cab 3022 if test $# != 0; then
c906108c
SS
3023 # We chose a different compiler from the bogus one.
3024 # However, it has the same basename, so the bogon will be chosen
3025 # first if we set CC to just the basename; use the full file name.
3026 shift
bec39cab 3027 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3028 fi
3029fi
3030fi
3031fi
bec39cab 3032CC=$ac_cv_prog_CC
c906108c 3033if test -n "$CC"; then
81ecdfbb
RW
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3035$as_echo "$CC" >&6; }
c906108c 3036else
81ecdfbb
RW
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3038$as_echo "no" >&6; }
c906108c
SS
3039fi
3040
81ecdfbb 3041
bec39cab
AC
3042fi
3043if test -z "$CC"; then
3044 if test -n "$ac_tool_prefix"; then
81ecdfbb 3045 for ac_prog in cl.exe
bec39cab
AC
3046 do
3047 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3050$as_echo_n "checking for $ac_word... " >&6; }
3051if test "${ac_cv_prog_CC+set}" = set; then :
3052 $as_echo_n "(cached) " >&6
c906108c
SS
3053else
3054 if test -n "$CC"; then
3055 ac_cv_prog_CC="$CC" # Let the user override the test.
3056else
bec39cab
AC
3057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3058for as_dir in $PATH
3059do
3060 IFS=$as_save_IFS
3061 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3062 for ac_exec_ext in '' $ac_executable_extensions; do
3063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3064 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3066 break 2
3067 fi
3068done
81ecdfbb
RW
3069 done
3070IFS=$as_save_IFS
bec39cab 3071
c906108c
SS
3072fi
3073fi
bec39cab 3074CC=$ac_cv_prog_CC
c906108c 3075if test -n "$CC"; then
81ecdfbb
RW
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3077$as_echo "$CC" >&6; }
c906108c 3078else
81ecdfbb
RW
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
c906108c 3081fi
bec39cab 3082
81ecdfbb 3083
bec39cab
AC
3084 test -n "$CC" && break
3085 done
3086fi
3087if test -z "$CC"; then
3088 ac_ct_CC=$CC
81ecdfbb 3089 for ac_prog in cl.exe
bec39cab
AC
3090do
3091 # Extract the first word of "$ac_prog", so it can be a program name with args.
3092set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3094$as_echo_n "checking for $ac_word... " >&6; }
3095if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3096 $as_echo_n "(cached) " >&6
bec39cab
AC
3097else
3098 if test -n "$ac_ct_CC"; then
3099 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3100else
3101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3102for as_dir in $PATH
3103do
3104 IFS=$as_save_IFS
3105 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3106 for ac_exec_ext in '' $ac_executable_extensions; do
3107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3108 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3110 break 2
c906108c 3111 fi
bec39cab 3112done
81ecdfbb
RW
3113 done
3114IFS=$as_save_IFS
bec39cab
AC
3115
3116fi
3117fi
3118ac_ct_CC=$ac_cv_prog_ac_ct_CC
3119if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3121$as_echo "$ac_ct_CC" >&6; }
bec39cab 3122else
81ecdfbb
RW
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124$as_echo "no" >&6; }
c906108c
SS
3125fi
3126
81ecdfbb 3127
bec39cab
AC
3128 test -n "$ac_ct_CC" && break
3129done
c906108c 3130
81ecdfbb
RW
3131 if test "x$ac_ct_CC" = x; then
3132 CC=""
3133 else
3134 case $cross_compiling:$ac_tool_warned in
3135yes:)
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3138ac_tool_warned=yes ;;
3139esac
3140 CC=$ac_ct_CC
3141 fi
bec39cab
AC
3142fi
3143
3144fi
3145
3146
81ecdfbb
RW
3147test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3149as_fn_error "no acceptable C compiler found in \$PATH
3150See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3151
3152# Provide some information about the compiler.
81ecdfbb
RW
3153$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3154set X $ac_compile
3155ac_compiler=$2
3156for ac_option in --version -v -V -qversion; do
3157 { { ac_try="$ac_compiler $ac_option >&5"
3158case "(($ac_try" in
3159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160 *) ac_try_echo=$ac_try;;
3161esac
3162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3163$as_echo "$ac_try_echo"; } >&5
3164 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3165 ac_status=$?
81ecdfbb
RW
3166 if test -s conftest.err; then
3167 sed '10a\
3168... rest of stderr output deleted ...
3169 10q' conftest.err >conftest.er1
3170 cat conftest.er1 >&5
3171 rm -f conftest.er1 conftest.err
3172 fi
3173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3174 test $ac_status = 0; }
3175done
bec39cab 3176
81ecdfbb 3177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3178/* end confdefs.h. */
3179
3180int
3181main ()
3182{
3183
3184 ;
3185 return 0;
3186}
3187_ACEOF
3188ac_clean_files_save=$ac_clean_files
81ecdfbb 3189ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3190# Try to create an executable without -o first, disregard a.out.
3191# It will help us diagnose broken compilers, and finding out an intuition
3192# of exeext.
81ecdfbb
RW
3193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3194$as_echo_n "checking for C compiler default output file name... " >&6; }
3195ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3196
3197# The possible output files:
3198ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3199
3200ac_rmfiles=
3201for ac_file in $ac_files
3202do
3203 case $ac_file in
3204 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3205 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3206 esac
3207done
3208rm -f $ac_rmfiles
3209
3210if { { ac_try="$ac_link_default"
3211case "(($ac_try" in
3212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3213 *) ac_try_echo=$ac_try;;
3214esac
3215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3216$as_echo "$ac_try_echo"; } >&5
3217 (eval "$ac_link_default") 2>&5
3218 ac_status=$?
3219 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3220 test $ac_status = 0; }; then :
3221 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3222# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3223# in a Makefile. We should not override ac_cv_exeext if it was cached,
3224# so that the user can short-circuit this test for compilers unknown to
3225# Autoconf.
3226for ac_file in $ac_files ''
bec39cab
AC
3227do
3228 test -f "$ac_file" || continue
3229 case $ac_file in
81ecdfbb 3230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3231 ;;
3232 [ab].out )
3233 # We found the default executable, but exeext='' is most
3234 # certainly right.
3235 break;;
3236 *.* )
81ecdfbb
RW
3237 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3238 then :; else
3239 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3240 fi
3241 # We set ac_cv_exeext here because the later test for it is not
3242 # safe: cross compilers may not add the suffix if given an `-o'
3243 # argument, so we may need to know it at that point already.
3244 # Even if this section looks crufty: it has the advantage of
3245 # actually working.
b4e70030
JB
3246 break;;
3247 * )
3248 break;;
bec39cab
AC
3249 esac
3250done
81ecdfbb
RW
3251test "$ac_cv_exeext" = no && ac_cv_exeext=
3252
bec39cab 3253else
81ecdfbb
RW
3254 ac_file=''
3255fi
3256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3257$as_echo "$ac_file" >&6; }
3258if test -z "$ac_file"; then :
3259 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3260sed 's/^/| /' conftest.$ac_ext >&5
3261
81ecdfbb
RW
3262{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3264{ as_fn_set_status 77
3265as_fn_error "C compiler cannot create executables
3266See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3267fi
b4e70030 3268ac_exeext=$ac_cv_exeext
b4e70030 3269
81ecdfbb 3270# Check that the compiler produces executables we can run. If not, either
bec39cab 3271# the compiler is broken, or we cross compile.
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3273$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3274# If not cross compiling, check that we can run a simple program.
3275if test "$cross_compiling" != yes; then
3276 if { ac_try='./$ac_file'
81ecdfbb
RW
3277 { { case "(($ac_try" in
3278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3279 *) ac_try_echo=$ac_try;;
3280esac
3281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3282$as_echo "$ac_try_echo"; } >&5
3283 (eval "$ac_try") 2>&5
bec39cab 3284 ac_status=$?
81ecdfbb
RW
3285 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3286 test $ac_status = 0; }; }; then
bec39cab 3287 cross_compiling=no
c906108c 3288 else
bec39cab
AC
3289 if test "$cross_compiling" = maybe; then
3290 cross_compiling=yes
3291 else
81ecdfbb
RW
3292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3294as_fn_error "cannot run C compiled programs.
bec39cab 3295If you meant to cross compile, use \`--host'.
81ecdfbb 3296See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3297 fi
c906108c 3298 fi
bec39cab 3299fi
81ecdfbb
RW
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3301$as_echo "yes" >&6; }
bec39cab 3302
81ecdfbb 3303rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3304ac_clean_files=$ac_clean_files_save
81ecdfbb 3305# Check that the compiler produces executables we can run. If not, either
b4e70030 3306# the compiler is broken, or we cross compile.
81ecdfbb
RW
3307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3308$as_echo_n "checking whether we are cross compiling... " >&6; }
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3310$as_echo "$cross_compiling" >&6; }
3311
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3313$as_echo_n "checking for suffix of executables... " >&6; }
3314if { { ac_try="$ac_link"
3315case "(($ac_try" in
3316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3317 *) ac_try_echo=$ac_try;;
3318esac
3319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3320$as_echo "$ac_try_echo"; } >&5
3321 (eval "$ac_link") 2>&5
bec39cab 3322 ac_status=$?
81ecdfbb
RW
3323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3324 test $ac_status = 0; }; then :
b4e70030
JB
3325 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3326# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3327# work properly (i.e., refer to `conftest.exe'), while it won't with
3328# `rm'.
3329for ac_file in conftest.exe conftest conftest.*; do
3330 test -f "$ac_file" || continue
3331 case $ac_file in
81ecdfbb 3332 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3333 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3334 break;;
3335 * ) break;;
3336 esac
3337done
c906108c 3338else
81ecdfbb
RW
3339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error "cannot compute suffix of executables: cannot compile and link
3342See \`config.log' for more details." "$LINENO" 5; }
c906108c 3343fi
b4e70030 3344rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3346$as_echo "$ac_cv_exeext" >&6; }
c906108c 3347
b4e70030 3348rm -f conftest.$ac_ext
bec39cab
AC
3349EXEEXT=$ac_cv_exeext
3350ac_exeext=$EXEEXT
81ecdfbb
RW
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3352$as_echo_n "checking for suffix of object files... " >&6; }
3353if test "${ac_cv_objext+set}" = set; then :
3354 $as_echo_n "(cached) " >&6
bec39cab 3355else
81ecdfbb 3356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3357/* end confdefs.h. */
3358
3359int
3360main ()
3361{
3362
3363 ;
3364 return 0;
3365}
3366_ACEOF
3367rm -f conftest.o conftest.obj
81ecdfbb
RW
3368if { { ac_try="$ac_compile"
3369case "(($ac_try" in
3370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3371 *) ac_try_echo=$ac_try;;
3372esac
3373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3374$as_echo "$ac_try_echo"; } >&5
3375 (eval "$ac_compile") 2>&5
3376 ac_status=$?
3377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3378 test $ac_status = 0; }; then :
3379 for ac_file in conftest.o conftest.obj conftest.*; do
3380 test -f "$ac_file" || continue;
bec39cab 3381 case $ac_file in
81ecdfbb 3382 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3383 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3384 break;;
3385 esac
3386done
c906108c 3387else
81ecdfbb 3388 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3389sed 's/^/| /' conftest.$ac_ext >&5
3390
81ecdfbb
RW
3391{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3393as_fn_error "cannot compute suffix of object files: cannot compile
3394See \`config.log' for more details." "$LINENO" 5; }
c906108c 3395fi
b4e70030 3396rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3397fi
81ecdfbb
RW
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3399$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3400OBJEXT=$ac_cv_objext
3401ac_objext=$OBJEXT
81ecdfbb
RW
3402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3403$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3404if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3405 $as_echo_n "(cached) " >&6
c906108c 3406else
81ecdfbb 3407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3408/* end confdefs.h. */
3409
3410int
3411main ()
3412{
3413#ifndef __GNUC__
3414 choke me
3415#endif
3416
3417 ;
3418 return 0;
3419}
3420_ACEOF
81ecdfbb 3421if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3422 ac_compiler_gnu=yes
3423else
81ecdfbb 3424 ac_compiler_gnu=no
bec39cab 3425fi
81ecdfbb 3426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3427ac_cv_c_compiler_gnu=$ac_compiler_gnu
3428
3429fi
81ecdfbb
RW
3430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3431$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3432if test $ac_compiler_gnu = yes; then
3433 GCC=yes
3434else
3435 GCC=
3436fi
bec39cab
AC
3437ac_test_CFLAGS=${CFLAGS+set}
3438ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3440$as_echo_n "checking whether $CC accepts -g... " >&6; }
3441if test "${ac_cv_prog_cc_g+set}" = set; then :
3442 $as_echo_n "(cached) " >&6
bec39cab 3443else
81ecdfbb
RW
3444 ac_save_c_werror_flag=$ac_c_werror_flag
3445 ac_c_werror_flag=yes
3446 ac_cv_prog_cc_g=no
3447 CFLAGS="-g"
3448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3449/* end confdefs.h. */
3450
3451int
3452main ()
3453{
3454
3455 ;
3456 return 0;
3457}
3458_ACEOF
81ecdfbb 3459if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3460 ac_cv_prog_cc_g=yes
3461else
81ecdfbb
RW
3462 CFLAGS=""
3463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3464/* end confdefs.h. */
3465
3466int
3467main ()
3468{
3469
3470 ;
3471 return 0;
3472}
3473_ACEOF
3474if ac_fn_c_try_compile "$LINENO"; then :
3475
3476else
3477 ac_c_werror_flag=$ac_save_c_werror_flag
3478 CFLAGS="-g"
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480/* end confdefs.h. */
3481
3482int
3483main ()
3484{
c906108c 3485
81ecdfbb
RW
3486 ;
3487 return 0;
3488}
3489_ACEOF
3490if ac_fn_c_try_compile "$LINENO"; then :
3491 ac_cv_prog_cc_g=yes
3492fi
3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3494fi
3495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3496fi
81ecdfbb
RW
3497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3498 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3501$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3502if test "$ac_test_CFLAGS" = set; then
bec39cab 3503 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3504elif test $ac_cv_prog_cc_g = yes; then
3505 if test "$GCC" = yes; then
3506 CFLAGS="-g -O2"
3507 else
3508 CFLAGS="-g"
3509 fi
3510else
3511 if test "$GCC" = yes; then
3512 CFLAGS="-O2"
3513 else
3514 CFLAGS=
3515 fi
3516fi
81ecdfbb
RW
3517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3518$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3519if test "${ac_cv_prog_cc_c89+set}" = set; then :
3520 $as_echo_n "(cached) " >&6
bec39cab 3521else
81ecdfbb 3522 ac_cv_prog_cc_c89=no
bec39cab 3523ac_save_CC=$CC
81ecdfbb 3524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3525/* end confdefs.h. */
c906108c
SS
3526#include <stdarg.h>
3527#include <stdio.h>
3528#include <sys/types.h>
3529#include <sys/stat.h>
3530/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3531struct buf { int x; };
3532FILE * (*rcsopen) (struct buf *, struct stat *, int);
3533static char *e (p, i)
3534 char **p;
3535 int i;
3536{
3537 return p[i];
3538}
3539static char *f (char * (*g) (char **, int), char **p, ...)
3540{
3541 char *s;
3542 va_list v;
3543 va_start (v,p);
3544 s = g (p, va_arg (v,int));
3545 va_end (v);
3546 return s;
3547}
bec39cab
AC
3548
3549/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3550 function prototypes and stuff, but not '\xHH' hex character constants.
3551 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3552 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3553 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3554 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3555 that's true only with -std. */
bec39cab
AC
3556int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3557
81ecdfbb
RW
3558/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3559 inside strings and character constants. */
3560#define FOO(x) 'x'
3561int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3562
c906108c
SS
3563int test (int i, double x);
3564struct s1 {int (*f) (int a);};
3565struct s2 {int (*f) (double a);};
3566int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3567int argc;
3568char **argv;
bec39cab
AC
3569int
3570main ()
3571{
c906108c 3572return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3573 ;
3574 return 0;
3575}
3576_ACEOF
81ecdfbb
RW
3577for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3578 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3579do
3580 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3581 if ac_fn_c_try_compile "$LINENO"; then :
3582 ac_cv_prog_cc_c89=$ac_arg
c906108c 3583fi
81ecdfbb
RW
3584rm -f core conftest.err conftest.$ac_objext
3585 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3586done
81ecdfbb 3587rm -f conftest.$ac_ext
bec39cab 3588CC=$ac_save_CC
c906108c
SS
3589
3590fi
81ecdfbb
RW
3591# AC_CACHE_VAL
3592case "x$ac_cv_prog_cc_c89" in
3593 x)
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3595$as_echo "none needed" >&6; } ;;
3596 xno)
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3598$as_echo "unsupported" >&6; } ;;
bec39cab 3599 *)
81ecdfbb
RW
3600 CC="$CC $ac_cv_prog_cc_c89"
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3602$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3603esac
81ecdfbb 3604if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3605
b4e70030
JB
3606fi
3607
bec39cab
AC
3608ac_ext=c
3609ac_cpp='$CPP $CPPFLAGS'
3610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3612ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3613
f434ba03
PA
3614ac_aux_dir=
3615for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3616 for ac_t in install-sh install.sh shtool; do
3617 if test -f "$ac_dir/$ac_t"; then
3618 ac_aux_dir=$ac_dir
3619 ac_install_sh="$ac_aux_dir/$ac_t -c"
3620 break 2
3621 fi
3622 done
3623done
3624if test -z "$ac_aux_dir"; then
3625 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3626fi
3627
3628# These three variables are undocumented and unsupported,
3629# and are intended to be withdrawn in a future Autoconf release.
3630# They can cause serious problems if a builder's source tree is in a directory
3631# whose full name contains unusual characters.
3632ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3633ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3634ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3635
3636
3637# Make sure we can run config.sub.
3638$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3639 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3640
3641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3642$as_echo_n "checking build system type... " >&6; }
3643if test "${ac_cv_build+set}" = set; then :
3644 $as_echo_n "(cached) " >&6
3645else
3646 ac_build_alias=$build_alias
3647test "x$ac_build_alias" = x &&
3648 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3649test "x$ac_build_alias" = x &&
3650 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3651ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3652 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3653
3654fi
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3656$as_echo "$ac_cv_build" >&6; }
3657case $ac_cv_build in
3658*-*-*) ;;
3659*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3660esac
3661build=$ac_cv_build
3662ac_save_IFS=$IFS; IFS='-'
3663set x $ac_cv_build
3664shift
3665build_cpu=$1
3666build_vendor=$2
3667shift; shift
3668# Remember, the first character of IFS is used to create $*,
3669# except with old shells:
3670build_os=$*
3671IFS=$ac_save_IFS
3672case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3673
3674
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3676$as_echo_n "checking host system type... " >&6; }
3677if test "${ac_cv_host+set}" = set; then :
3678 $as_echo_n "(cached) " >&6
3679else
3680 if test "x$host_alias" = x; then
3681 ac_cv_host=$ac_cv_build
3682else
3683 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3684 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3685fi
3686
3687fi
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3689$as_echo "$ac_cv_host" >&6; }
3690case $ac_cv_host in
3691*-*-*) ;;
3692*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3693esac
3694host=$ac_cv_host
3695ac_save_IFS=$IFS; IFS='-'
3696set x $ac_cv_host
3697shift
3698host_cpu=$1
3699host_vendor=$2
3700shift; shift
3701# Remember, the first character of IFS is used to create $*,
3702# except with old shells:
3703host_os=$*
3704IFS=$ac_save_IFS
3705case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3706
3707
60ca704f 3708
bec39cab
AC
3709ac_ext=c
3710ac_cpp='$CPP $CPPFLAGS'
3711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3713ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3715$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3716# On Suns, sometimes $CPP names a directory.
3717if test -n "$CPP" && test -d "$CPP"; then
3718 CPP=
8bb2c122 3719fi
bec39cab 3720if test -z "$CPP"; then
81ecdfbb
RW
3721 if test "${ac_cv_prog_CPP+set}" = set; then :
3722 $as_echo_n "(cached) " >&6
bec39cab
AC
3723else
3724 # Double quotes because CPP needs to be expanded
3725 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3726 do
3727 ac_preproc_ok=false
3728for ac_c_preproc_warn_flag in '' yes
3729do
3730 # Use a header file that comes with gcc, so configuring glibc
3731 # with a fresh cross-compiler works.
3732 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3733 # <limits.h> exists even on freestanding compilers.
3734 # On the NeXT, cc -E runs the code through the compiler's parser,
3735 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3737/* end confdefs.h. */
3738#ifdef __STDC__
3739# include <limits.h>
3740#else
3741# include <assert.h>
3742#endif
3743 Syntax error
3744_ACEOF
81ecdfbb 3745if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3746
81ecdfbb 3747else
bec39cab
AC
3748 # Broken: fails on valid input.
3749continue
3750fi
3751rm -f conftest.err conftest.$ac_ext
3752
81ecdfbb 3753 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3754 # can be detected and how.
81ecdfbb 3755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3756/* end confdefs.h. */
3757#include <ac_nonexistent.h>
3758_ACEOF
81ecdfbb 3759if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3760 # Broken: success on invalid input.
3761continue
8bb2c122 3762else
bec39cab
AC
3763 # Passes both tests.
3764ac_preproc_ok=:
3765break
8bb2c122 3766fi
bec39cab 3767rm -f conftest.err conftest.$ac_ext
8bb2c122 3768
bec39cab
AC
3769done
3770# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3771rm -f conftest.err conftest.$ac_ext
81ecdfbb 3772if $ac_preproc_ok; then :
bec39cab
AC
3773 break
3774fi
8bb2c122 3775
bec39cab
AC
3776 done
3777 ac_cv_prog_CPP=$CPP
ddc9cd0f 3778
c906108c 3779fi
bec39cab
AC
3780 CPP=$ac_cv_prog_CPP
3781else
3782 ac_cv_prog_CPP=$CPP
c906108c 3783fi
81ecdfbb
RW
3784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3785$as_echo "$CPP" >&6; }
bec39cab
AC
3786ac_preproc_ok=false
3787for ac_c_preproc_warn_flag in '' yes
3788do
3789 # Use a header file that comes with gcc, so configuring glibc
3790 # with a fresh cross-compiler works.
3791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3792 # <limits.h> exists even on freestanding compilers.
3793 # On the NeXT, cc -E runs the code through the compiler's parser,
3794 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3796/* end confdefs.h. */
3797#ifdef __STDC__
3798# include <limits.h>
3799#else
3800# include <assert.h>
3801#endif
3802 Syntax error
3803_ACEOF
81ecdfbb 3804if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3805
81ecdfbb 3806else
bec39cab
AC
3807 # Broken: fails on valid input.
3808continue
3809fi
3810rm -f conftest.err conftest.$ac_ext
3811
81ecdfbb 3812 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3813 # can be detected and how.
81ecdfbb 3814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3815/* end confdefs.h. */
3816#include <ac_nonexistent.h>
3817_ACEOF
81ecdfbb 3818if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3819 # Broken: success on invalid input.
3820continue
c906108c 3821else
bec39cab
AC
3822 # Passes both tests.
3823ac_preproc_ok=:
3824break
c906108c 3825fi
bec39cab 3826rm -f conftest.err conftest.$ac_ext
c906108c 3827
bec39cab
AC
3828done
3829# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3830rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3831if $ac_preproc_ok; then :
3832
c906108c 3833else
81ecdfbb
RW
3834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3836as_fn_error "C preprocessor \"$CPP\" fails sanity check
3837See \`config.log' for more details." "$LINENO" 5; }
c906108c 3838fi
c906108c 3839
bec39cab
AC
3840ac_ext=c
3841ac_cpp='$CPP $CPPFLAGS'
3842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3844ac_compiler_gnu=$ac_cv_c_compiler_gnu
3845
3846
81ecdfbb
RW
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3848$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3849if test "${ac_cv_path_GREP+set}" = set; then :
3850 $as_echo_n "(cached) " >&6
4e8d927d 3851else
81ecdfbb
RW
3852 if test -z "$GREP"; then
3853 ac_path_GREP_found=false
3854 # Loop through the user's path and test for each of PROGNAME-LIST
3855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
3860 for ac_prog in grep ggrep; do
3861 for ac_exec_ext in '' $ac_executable_extensions; do
3862 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3863 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3864# Check for GNU ac_path_GREP and select it if it is found.
3865 # Check for GNU $ac_path_GREP
3866case `"$ac_path_GREP" --version 2>&1` in
3867*GNU*)
3868 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3869*)
3870 ac_count=0
3871 $as_echo_n 0123456789 >"conftest.in"
3872 while :
3873 do
3874 cat "conftest.in" "conftest.in" >"conftest.tmp"
3875 mv "conftest.tmp" "conftest.in"
3876 cp "conftest.in" "conftest.nl"
3877 $as_echo 'GREP' >> "conftest.nl"
3878 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3879 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3880 as_fn_arith $ac_count + 1 && ac_count=$as_val
3881 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3882 # Best one so far, save it but keep looking for a better one
3883 ac_cv_path_GREP="$ac_path_GREP"
3884 ac_path_GREP_max=$ac_count
bec39cab 3885 fi
81ecdfbb
RW
3886 # 10*(2^10) chars as input seems more than enough
3887 test $ac_count -gt 10 && break
3888 done
3889 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3890esac
bec39cab 3891
81ecdfbb
RW
3892 $ac_path_GREP_found && break 3
3893 done
3894 done
3895 done
3896IFS=$as_save_IFS
3897 if test -z "$ac_cv_path_GREP"; then
3898 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3899 fi
c906108c 3900else
81ecdfbb 3901 ac_cv_path_GREP=$GREP
c906108c 3902fi
c906108c 3903
81ecdfbb
RW
3904fi
3905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3906$as_echo "$ac_cv_path_GREP" >&6; }
3907 GREP="$ac_cv_path_GREP"
c906108c 3908
c906108c 3909
81ecdfbb
RW
3910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3911$as_echo_n "checking for egrep... " >&6; }
3912if test "${ac_cv_path_EGREP+set}" = set; then :
3913 $as_echo_n "(cached) " >&6
783e057b 3914else
81ecdfbb
RW
3915 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3916 then ac_cv_path_EGREP="$GREP -E"
3917 else
3918 if test -z "$EGREP"; then
3919 ac_path_EGREP_found=false
3920 # Loop through the user's path and test for each of PROGNAME-LIST
3921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3923do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3926 for ac_prog in egrep; do
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3929 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3930# Check for GNU ac_path_EGREP and select it if it is found.
3931 # Check for GNU $ac_path_EGREP
3932case `"$ac_path_EGREP" --version 2>&1` in
3933*GNU*)
3934 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3935*)
3936 ac_count=0
3937 $as_echo_n 0123456789 >"conftest.in"
3938 while :
3939 do
3940 cat "conftest.in" "conftest.in" >"conftest.tmp"
3941 mv "conftest.tmp" "conftest.in"
3942 cp "conftest.in" "conftest.nl"
3943 $as_echo 'EGREP' >> "conftest.nl"
3944 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3945 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3946 as_fn_arith $ac_count + 1 && ac_count=$as_val
3947 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3948 # Best one so far, save it but keep looking for a better one
3949 ac_cv_path_EGREP="$ac_path_EGREP"
3950 ac_path_EGREP_max=$ac_count
3951 fi
3952 # 10*(2^10) chars as input seems more than enough
3953 test $ac_count -gt 10 && break
3954 done
3955 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3956esac
bec39cab 3957
81ecdfbb
RW
3958 $ac_path_EGREP_found && break 3
3959 done
3960 done
3961 done
3962IFS=$as_save_IFS
3963 if test -z "$ac_cv_path_EGREP"; then
3964 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3965 fi
783e057b 3966else
81ecdfbb 3967 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3968fi
3969
81ecdfbb 3970 fi
783e057b 3971fi
81ecdfbb
RW
3972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3973$as_echo "$ac_cv_path_EGREP" >&6; }
3974 EGREP="$ac_cv_path_EGREP"
3975
783e057b 3976
81ecdfbb
RW
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3978$as_echo_n "checking for ANSI C header files... " >&6; }
3979if test "${ac_cv_header_stdc+set}" = set; then :
3980 $as_echo_n "(cached) " >&6
783e057b 3981else
81ecdfbb 3982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3983/* end confdefs.h. */
783e057b 3984#include <stdlib.h>
bec39cab 3985#include <stdarg.h>
783e057b
DJ
3986#include <string.h>
3987#include <float.h>
c906108c 3988
bec39cab
AC
3989int
3990main ()
3991{
c906108c 3992
bec39cab
AC
3993 ;
3994 return 0;
3995}
3996_ACEOF
81ecdfbb 3997if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3998 ac_cv_header_stdc=yes
c906108c 3999else
81ecdfbb 4000 ac_cv_header_stdc=no
c906108c 4001fi
81ecdfbb 4002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4003
783e057b
DJ
4004if test $ac_cv_header_stdc = yes; then
4005 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4007/* end confdefs.h. */
4008#include <string.h>
c906108c 4009
783e057b
DJ
4010_ACEOF
4011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4012 $EGREP "memchr" >/dev/null 2>&1; then :
4013
c906108c 4014else
783e057b 4015 ac_cv_header_stdc=no
c906108c 4016fi
783e057b 4017rm -f conftest*
c906108c
SS
4018
4019fi
4020
783e057b
DJ
4021if test $ac_cv_header_stdc = yes; then
4022 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4024/* end confdefs.h. */
4025#include <stdlib.h>
bec39cab 4026
783e057b
DJ
4027_ACEOF
4028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4029 $EGREP "free" >/dev/null 2>&1; then :
4030
bec39cab 4031else
783e057b 4032 ac_cv_header_stdc=no
bec39cab 4033fi
783e057b 4034rm -f conftest*
bec39cab
AC
4035
4036fi
bec39cab 4037
783e057b
DJ
4038if test $ac_cv_header_stdc = yes; then
4039 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4040 if test "$cross_compiling" = yes; then :
783e057b 4041 :
bec39cab 4042else
81ecdfbb 4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4044/* end confdefs.h. */
4045#include <ctype.h>
81ecdfbb 4046#include <stdlib.h>
783e057b
DJ
4047#if ((' ' & 0x0FF) == 0x020)
4048# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4049# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4050#else
4051# define ISLOWER(c) \
4052 (('a' <= (c) && (c) <= 'i') \
4053 || ('j' <= (c) && (c) <= 'r') \
4054 || ('s' <= (c) && (c) <= 'z'))
4055# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4056#endif
4057
4058#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4059int
4060main ()
4061{
4062 int i;
4063 for (i = 0; i < 256; i++)
4064 if (XOR (islower (i), ISLOWER (i))
4065 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4066 return 2;
4067 return 0;
783e057b
DJ
4068}
4069_ACEOF
81ecdfbb 4070if ac_fn_c_try_run "$LINENO"; then :
783e057b 4071
81ecdfbb
RW
4072else
4073 ac_cv_header_stdc=no
783e057b 4074fi
81ecdfbb
RW
4075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4076 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4077fi
81ecdfbb 4078
783e057b
DJ
4079fi
4080fi
81ecdfbb
RW
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4082$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4083if test $ac_cv_header_stdc = yes; then
4084
81ecdfbb 4085$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4086
4087fi
4088
4089# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4090for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4091 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4092do :
4093 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4094ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4095"
4096eval as_val=\$$as_ac_Header
4097 if test "x$as_val" = x""yes; then :
783e057b 4098 cat >>confdefs.h <<_ACEOF
81ecdfbb 4099#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4100_ACEOF
4101
4102fi
4103
4104done
4105
4106
4107
f434ba03
PA
4108
4109
81ecdfbb
RW
4110 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4111if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4112 MINIX=yes
4113else
4114 MINIX=
4115fi
4116
4117
4118 if test "$MINIX" = yes; then
4119
81ecdfbb 4120$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4121
4122
81ecdfbb 4123$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4124
4125
81ecdfbb 4126$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4127
4128 fi
4129
f434ba03
PA
4130 case "$host_os" in
4131 hpux*)
4132
4133$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4134
4135 ;;
4136 esac
4137
783e057b 4138
81ecdfbb
RW
4139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4140$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4141if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4142 $as_echo_n "(cached) " >&6
783e057b 4143else
81ecdfbb 4144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4145/* end confdefs.h. */
4146
f434ba03
PA
4147# define __EXTENSIONS__ 1
4148 $ac_includes_default
783e057b
DJ
4149int
4150main ()
4151{
4152
4153 ;
4154 return 0;
4155}
4156_ACEOF
81ecdfbb 4157if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4158 ac_cv_safe_to_define___extensions__=yes
4159else
81ecdfbb 4160 ac_cv_safe_to_define___extensions__=no
783e057b 4161fi
81ecdfbb 4162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4163fi
81ecdfbb
RW
4164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4165$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4166 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4167 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4168
81ecdfbb 4169 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4170
81ecdfbb 4171 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4172
81ecdfbb 4173 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4174
81ecdfbb 4175 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4176
4177
81ecdfbb
RW
4178if test -n "$ac_tool_prefix"; then
4179 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4180set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4182$as_echo_n "checking for $ac_word... " >&6; }
4183if test "${ac_cv_prog_RANLIB+set}" = set; then :
4184 $as_echo_n "(cached) " >&6
4185else
4186 if test -n "$RANLIB"; then
4187 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4188else
4189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4190for as_dir in $PATH
4191do
4192 IFS=$as_save_IFS
4193 test -z "$as_dir" && as_dir=.
4194 for ac_exec_ext in '' $ac_executable_extensions; do
4195 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4196 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4198 break 2
4199 fi
4200done
4201 done
4202IFS=$as_save_IFS
783e057b 4203
81ecdfbb
RW
4204fi
4205fi
4206RANLIB=$ac_cv_prog_RANLIB
4207if test -n "$RANLIB"; then
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4209$as_echo "$RANLIB" >&6; }
4210else
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4212$as_echo "no" >&6; }
4213fi
783e057b
DJ
4214
4215
81ecdfbb
RW
4216fi
4217if test -z "$ac_cv_prog_RANLIB"; then
4218 ac_ct_RANLIB=$RANLIB
4219 # Extract the first word of "ranlib", so it can be a program name with args.
4220set dummy ranlib; ac_word=$2
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4222$as_echo_n "checking for $ac_word... " >&6; }
4223if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4224 $as_echo_n "(cached) " >&6
783e057b 4225else
81ecdfbb
RW
4226 if test -n "$ac_ct_RANLIB"; then
4227 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4228else
4229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4230for as_dir in $PATH
4231do
4232 IFS=$as_save_IFS
4233 test -z "$as_dir" && as_dir=.
4234 for ac_exec_ext in '' $ac_executable_extensions; do
4235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4236 ac_cv_prog_ac_ct_RANLIB="ranlib"
4237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4238 break 2
4239 fi
4240done
4241 done
4242IFS=$as_save_IFS
4243
4244fi
4245fi
4246ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4247if test -n "$ac_ct_RANLIB"; then
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4249$as_echo "$ac_ct_RANLIB" >&6; }
4250else
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252$as_echo "no" >&6; }
4253fi
4254
4255 if test "x$ac_ct_RANLIB" = x; then
4256 RANLIB=":"
4257 else
4258 case $cross_compiling:$ac_tool_warned in
4259yes:)
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4262ac_tool_warned=yes ;;
4263esac
4264 RANLIB=$ac_ct_RANLIB
4265 fi
4266else
4267 RANLIB="$ac_cv_prog_RANLIB"
4268fi
4269
4270
4271
4272
4273
4274
3388710e
JM
4275
4276
3388710e 4277
f434ba03
PA
4278 # Code from module arg-nonnull:
4279 # Code from module c++defs:
4280 # Code from module extensions:
3388710e 4281
f434ba03
PA
4282 # Code from module include_next:
4283 # Code from module memchr:
4284 # Code from module memmem:
4285 # Code from module memmem-simple:
4286 # Code from module multiarch:
4287 # Code from module stddef:
4288 # Code from module stdint:
4289 # Code from module string:
4290 # Code from module warn-on-use:
4291 # Code from module wchar:
3388710e
JM
4292
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4294$as_echo_n "checking target system type... " >&6; }
4295if test "${ac_cv_target+set}" = set; then :
4296 $as_echo_n "(cached) " >&6
4297else
4298 if test "x$target_alias" = x; then
4299 ac_cv_target=$ac_cv_host
4300else
4301 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4302 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4303fi
4304
4305fi
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4307$as_echo "$ac_cv_target" >&6; }
4308case $ac_cv_target in
4309*-*-*) ;;
4310*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4311esac
4312target=$ac_cv_target
4313ac_save_IFS=$IFS; IFS='-'
4314set x $ac_cv_target
4315shift
4316target_cpu=$1
4317target_vendor=$2
4318shift; shift
4319# Remember, the first character of IFS is used to create $*,
4320# except with old shells:
4321target_os=$*
4322IFS=$ac_save_IFS
4323case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4324
4325
4326# The aliases save the names the user supplied, while $host etc.
4327# will get canonicalized.
4328test -n "$target_alias" &&
4329 test "$program_prefix$program_suffix$program_transform_name" = \
4330 NONENONEs,x,x, &&
4331 program_prefix=${target_alias}-
4332
4333# The tests for host and target for $enable_largefile require
4334# canonical names.
4335
4336
81ecdfbb 4337
da2f07f1
JK
4338# As the $enable_largefile decision depends on --enable-plugins we must set it
4339# even in directories otherwise not depending on the $plugins option.
4340
4341
4342# Check whether --enable-plugins was given.
4343if test "${enable_plugins+set}" = set; then :
4344 enableval=$enable_plugins; case "${enableval}" in
4345 yes | "") plugins=yes ;;
4346 no) plugins=no ;;
4347 *) plugins=yes ;;
4348 esac
4349else
4350 plugins=no
4351fi
4352
4353
4354
4355case "${host}" in
4356 sparc-*-solaris*|i[3-7]86-*-solaris*)
4357 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4358 # are mutually exclusive; and without procfs support, the bfd/ elf module
4359 # cannot provide certain routines such as elfcore_write_prpsinfo
4360 # or elfcore_write_prstatus. So unless the user explicitly requested
4361 # large-file support through the --enable-largefile switch, disable
4362 # large-file support in favor of procfs support.
4363 test "${target}" = "${host}" -a "x$plugins" = xno \
4364 && : ${enable_largefile="no"}
4365 ;;
4366esac
4367
4368# Check whether --enable-largefile was given.
4369if test "${enable_largefile+set}" = set; then :
4370 enableval=$enable_largefile;
4371fi
4372
4373if test "$enable_largefile" != no; then
4374
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4376$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4377if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4378 $as_echo_n "(cached) " >&6
4379else
4380 ac_cv_sys_largefile_CC=no
4381 if test "$GCC" != yes; then
4382 ac_save_CC=$CC
4383 while :; do
4384 # IRIX 6.2 and later do not support large files by default,
4385 # so use the C compiler's -n32 option if that helps.
4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387/* end confdefs.h. */
4388#include <sys/types.h>
4389 /* Check that off_t can represent 2**63 - 1 correctly.
4390 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4391 since some C++ compilers masquerading as C compilers
4392 incorrectly reject 9223372036854775807. */
4393#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4394 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4395 && LARGE_OFF_T % 2147483647 == 1)
4396 ? 1 : -1];
4397int
4398main ()
4399{
4400
4401 ;
4402 return 0;
4403}
4404_ACEOF
4405 if ac_fn_c_try_compile "$LINENO"; then :
4406 break
4407fi
4408rm -f core conftest.err conftest.$ac_objext
4409 CC="$CC -n32"
4410 if ac_fn_c_try_compile "$LINENO"; then :
4411 ac_cv_sys_largefile_CC=' -n32'; break
4412fi
4413rm -f core conftest.err conftest.$ac_objext
4414 break
4415 done
4416 CC=$ac_save_CC
4417 rm -f conftest.$ac_ext
4418 fi
4419fi
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4421$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4422 if test "$ac_cv_sys_largefile_CC" != no; then
4423 CC=$CC$ac_cv_sys_largefile_CC
4424 fi
4425
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4427$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4428if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4429 $as_echo_n "(cached) " >&6
4430else
4431 while :; do
4432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4433/* end confdefs.h. */
4434#include <sys/types.h>
4435 /* Check that off_t can represent 2**63 - 1 correctly.
4436 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4437 since some C++ compilers masquerading as C compilers
4438 incorrectly reject 9223372036854775807. */
4439#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4440 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4441 && LARGE_OFF_T % 2147483647 == 1)
4442 ? 1 : -1];
4443int
4444main ()
4445{
4446
4447 ;
4448 return 0;
4449}
4450_ACEOF
4451if ac_fn_c_try_compile "$LINENO"; then :
4452 ac_cv_sys_file_offset_bits=no; break
4453fi
4454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456/* end confdefs.h. */
4457#define _FILE_OFFSET_BITS 64
4458#include <sys/types.h>
4459 /* Check that off_t can represent 2**63 - 1 correctly.
4460 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4461 since some C++ compilers masquerading as C compilers
4462 incorrectly reject 9223372036854775807. */
4463#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4464 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4465 && LARGE_OFF_T % 2147483647 == 1)
4466 ? 1 : -1];
4467int
4468main ()
4469{
4470
4471 ;
4472 return 0;
4473}
4474_ACEOF
4475if ac_fn_c_try_compile "$LINENO"; then :
4476 ac_cv_sys_file_offset_bits=64; break
4477fi
4478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4479 ac_cv_sys_file_offset_bits=unknown
4480 break
4481done
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4484$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4485case $ac_cv_sys_file_offset_bits in #(
4486 no | unknown) ;;
4487 *)
4488cat >>confdefs.h <<_ACEOF
4489#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4490_ACEOF
4491;;
4492esac
4493rm -rf conftest*
4494 if test $ac_cv_sys_file_offset_bits = unknown; then
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4496$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4497if test "${ac_cv_sys_large_files+set}" = set; then :
4498 $as_echo_n "(cached) " >&6
4499else
4500 while :; do
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4502/* end confdefs.h. */
4503#include <sys/types.h>
4504 /* Check that off_t can represent 2**63 - 1 correctly.
4505 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4506 since some C++ compilers masquerading as C compilers
4507 incorrectly reject 9223372036854775807. */
4508#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4509 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4510 && LARGE_OFF_T % 2147483647 == 1)
4511 ? 1 : -1];
4512int
4513main ()
4514{
4515
4516 ;
4517 return 0;
4518}
4519_ACEOF
4520if ac_fn_c_try_compile "$LINENO"; then :
4521 ac_cv_sys_large_files=no; break
4522fi
4523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#define _LARGE_FILES 1
4527#include <sys/types.h>
4528 /* Check that off_t can represent 2**63 - 1 correctly.
4529 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4530 since some C++ compilers masquerading as C compilers
4531 incorrectly reject 9223372036854775807. */
4532#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4533 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4534 && LARGE_OFF_T % 2147483647 == 1)
4535 ? 1 : -1];
4536int
4537main ()
4538{
4539
4540 ;
4541 return 0;
4542}
4543_ACEOF
4544if ac_fn_c_try_compile "$LINENO"; then :
4545 ac_cv_sys_large_files=1; break
4546fi
4547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4548 ac_cv_sys_large_files=unknown
4549 break
4550done
4551fi
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4553$as_echo "$ac_cv_sys_large_files" >&6; }
4554case $ac_cv_sys_large_files in #(
4555 no | unknown) ;;
4556 *)
4557cat >>confdefs.h <<_ACEOF
4558#define _LARGE_FILES $ac_cv_sys_large_files
4559_ACEOF
4560;;
4561esac
4562rm -rf conftest*
4563 fi
4564fi
4565
4566
4567
81ecdfbb
RW
4568
4569
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4571$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4572if test "${am_cv_prog_cc_stdc+set}" = set; then :
4573 $as_echo_n "(cached) " >&6
4574else
4575 am_cv_prog_cc_stdc=no
4576ac_save_CC="$CC"
4577# Don't try gcc -ansi; that turns off useful extensions and
4578# breaks some systems' header files.
4579# AIX -qlanglvl=ansi
4580# Ultrix and OSF/1 -std1
4581# HP-UX 10.20 and later -Ae
4582# HP-UX older versions -Aa -D_HPUX_SOURCE
4583# SVR4 -Xc -D__EXTENSIONS__
4584for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4585do
783e057b 4586 CC="$ac_save_CC $ac_arg"
81ecdfbb 4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4588/* end confdefs.h. */
4589#include <stdarg.h>
4590#include <stdio.h>
4591#include <sys/types.h>
4592#include <sys/stat.h>
4593/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4594struct buf { int x; };
4595FILE * (*rcsopen) (struct buf *, struct stat *, int);
4596static char *e (p, i)
4597 char **p;
4598 int i;
4599{
4600 return p[i];
4601}
4602static char *f (char * (*g) (char **, int), char **p, ...)
4603{
4604 char *s;
4605 va_list v;
4606 va_start (v,p);
4607 s = g (p, va_arg (v,int));
4608 va_end (v);
4609 return s;
4610}
4611int test (int i, double x);
4612struct s1 {int (*f) (int a);};
4613struct s2 {int (*f) (double a);};
4614int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4615int argc;
4616char **argv;
4617
4618int
4619main ()
4620{
4621
4622return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4623
4624 ;
4625 return 0;
4626}
4627_ACEOF
81ecdfbb 4628if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4629 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4630fi
81ecdfbb 4631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4632done
4633CC="$ac_save_CC"
4634
4635fi
4636
4637if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4639$as_echo "none needed" >&6; }
783e057b 4640else
81ecdfbb
RW
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4642$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4643fi
4644case "x$am_cv_prog_cc_stdc" in
4645 x|xno) ;;
4646 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4647esac
4648
4649
4650ac_aux_dir=
81ecdfbb
RW
4651for ac_dir in .. "$srcdir"/..; do
4652 for ac_t in install-sh install.sh shtool; do
4653 if test -f "$ac_dir/$ac_t"; then
4654 ac_aux_dir=$ac_dir
4655 ac_install_sh="$ac_aux_dir/$ac_t -c"
4656 break 2
4657 fi
4658 done
783e057b
DJ
4659done
4660if test -z "$ac_aux_dir"; then
81ecdfbb 4661 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4662fi
81ecdfbb
RW
4663
4664# These three variables are undocumented and unsupported,
4665# and are intended to be withdrawn in a future Autoconf release.
4666# They can cause serious problems if a builder's source tree is in a directory
4667# whose full name contains unusual characters.
4668ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4669ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4670ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4671
783e057b 4672
783e057b 4673
81ecdfbb 4674
a417dc56
RW
4675# Dependency checking.
4676rm -rf .tst 2>/dev/null
4677mkdir .tst 2>/dev/null
4678if test -d .tst; then
4679 am__leading_dot=.
4680else
4681 am__leading_dot=_
4682fi
4683rmdir .tst 2>/dev/null
4684
4685DEPDIR="${am__leading_dot}deps"
4686
81ecdfbb 4687ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4688
4689
4690depcc="$CC" am_compiler_list=
4691
4692am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4694$as_echo_n "checking dependency style of $depcc... " >&6; }
4695if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4696 $as_echo_n "(cached) " >&6
a417dc56
RW
4697else
4698 if test -f "$am_depcomp"; then
4699 # We make a subdir and do the tests there. Otherwise we can end up
4700 # making bogus files that we don't know about and never remove. For
4701 # instance it was reported that on HP-UX the gcc test will end up
4702 # making a dummy file named `D' -- because `-MD' means `put the output
4703 # in D'.
4704 mkdir conftest.dir
4705 # Copy depcomp to subdir because otherwise we won't find it if we're
4706 # using a relative directory.
4707 cp "$am_depcomp" conftest.dir
4708 cd conftest.dir
4709 # We will build objects and dependencies in a subdirectory because
4710 # it helps to detect inapplicable dependency modes. For instance
4711 # both Tru64's cc and ICC support -MD to output dependencies as a
4712 # side effect of compilation, but ICC will put the dependencies in
4713 # the current directory while Tru64 will put them in the object
4714 # directory.
4715 mkdir sub
4716
4717 am_cv_CC_dependencies_compiler_type=none
4718 if test "$am_compiler_list" = ""; then
4719 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4720 fi
4721 for depmode in $am_compiler_list; do
4722 if test $depmode = none; then break; fi
4723
81ecdfbb 4724 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4725 # Setup a source with many dependencies, because some compilers
4726 # like to wrap large dependency lists on column 80 (with \), and
4727 # we should not choose a depcomp mode which is confused by this.
4728 #
4729 # We need to recreate these files for each test, as the compiler may
4730 # overwrite some of them when testing with obscure command lines.
4731 # This happens at least with the AIX C compiler.
4732 : > sub/conftest.c
4733 for i in 1 2 3 4 5 6; do
4734 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4735 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4736 # Solaris 8's {/usr,}/bin/sh.
4737 touch sub/conftst$i.h
4738 done
4739 echo "include sub/conftest.Po" > confmf
4740
4741 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4742 # mode. It turns out that the SunPro C++ compiler does not properly
4743 # handle `-M -o', and we need to detect this.
4744 depcmd="depmode=$depmode \
4745 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4746 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4747 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4748 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4749 if env $depcmd > conftest.err 2>&1 &&
4750 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4751 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4752 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4753 # icc doesn't choke on unknown options, it will just issue warnings
4754 # or remarks (even with -Werror). So we grep stderr for any message
4755 # that says an option was ignored or not supported.
4756 # When given -MP, icc 7.0 and 7.1 complain thusly:
4757 # icc: Command line warning: ignoring option '-M'; no argument required
4758 # The diagnosis changed in icc 8.0:
4759 # icc: Command line remark: option '-MP' not supported
4760 if (grep 'ignoring option' conftest.err ||
4761 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4762 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4763 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4764 break
4765 fi
4766 fi
81ecdfbb 4767 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4768 sed -e 's/^/| /' < conftest.err >&5
4769 done
4770
4771 cd ..
4772 rm -rf conftest.dir
4773else
4774 am_cv_CC_dependencies_compiler_type=none
4775fi
4776
4777fi
81ecdfbb
RW
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4779$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4780if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4781then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4782else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4783
4784fi
4785
4786
4787# Check for the 'make' the user wants to use.
4788for ac_prog in make
4789do
4790 # Extract the first word of "$ac_prog", so it can be a program name with args.
4791set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793$as_echo_n "checking for $ac_word... " >&6; }
4794if test "${ac_cv_prog_MAKE+set}" = set; then :
4795 $as_echo_n "(cached) " >&6
a417dc56
RW
4796else
4797 if test -n "$MAKE"; then
4798 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4799else
4800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4801for as_dir in $PATH
4802do
4803 IFS=$as_save_IFS
4804 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4805 for ac_exec_ext in '' $ac_executable_extensions; do
4806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4807 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4809 break 2
4810 fi
4811done
81ecdfbb
RW
4812 done
4813IFS=$as_save_IFS
a417dc56
RW
4814
4815fi
4816fi
4817MAKE=$ac_cv_prog_MAKE
4818if test -n "$MAKE"; then
81ecdfbb
RW
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4820$as_echo "$MAKE" >&6; }
a417dc56 4821else
81ecdfbb
RW
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
a417dc56
RW
4824fi
4825
81ecdfbb 4826
a417dc56
RW
4827 test -n "$MAKE" && break
4828done
4829
4830MAKE_IS_GNU=
4831case "`$MAKE --version 2>&1 | sed 1q`" in
4832 *GNU*)
4833 MAKE_IS_GNU=yes
4834 ;;
4835esac
81ecdfbb 4836 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4837 GMAKE_TRUE=
4838 GMAKE_FALSE='#'
4839else
4840 GMAKE_TRUE='#'
4841 GMAKE_FALSE=
4842fi
4843
81ecdfbb
RW
4844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4845$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4846set x ${MAKE-make}
4847ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4848if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4849 $as_echo_n "(cached) " >&6
a417dc56
RW
4850else
4851 cat >conftest.make <<\_ACEOF
81ecdfbb 4852SHELL = /bin/sh
a417dc56 4853all:
81ecdfbb 4854 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4855_ACEOF
4856# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4857case `${MAKE-make} -f conftest.make 2>/dev/null` in
4858 *@@@%%%=?*=@@@%%%*)
4859 eval ac_cv_prog_make_${ac_make}_set=yes;;
4860 *)
4861 eval ac_cv_prog_make_${ac_make}_set=no;;
4862esac
a417dc56
RW
4863rm -f conftest.make
4864fi
81ecdfbb
RW
4865if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4867$as_echo "yes" >&6; }
a417dc56
RW
4868 SET_MAKE=
4869else
81ecdfbb
RW
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871$as_echo "no" >&6; }
a417dc56
RW
4872 SET_MAKE="MAKE=${MAKE-make}"
4873fi
4874
4875
783e057b
DJ
4876
4877CONFIG_OBS=
4878CONFIG_DEPS=
4879CONFIG_SRCS=
4880ENABLE_CFLAGS=
4881
4882CONFIG_ALL=
4883CONFIG_CLEAN=
4884CONFIG_INSTALL=
4885CONFIG_UNINSTALL=
4886
4887# If we haven't got the data from the intl directory,
4888# assume NLS is disabled.
4889USE_NLS=no
4890LIBINTL=
4891LIBINTL_DEP=
4892INCINTL=
4893XGETTEXT=
4894GMSGFMT=
4895POSUB=
4896
4897if test -f ../intl/config.intl; then
4898 . ../intl/config.intl
4899fi
81ecdfbb
RW
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4901$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4902if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
783e057b 4905else
81ecdfbb
RW
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4907$as_echo "yes" >&6; }
783e057b 4908
81ecdfbb 4909$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4910
4911
81ecdfbb
RW
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4913$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4914 # Look for .po and .gmo files in the source directory.
4915 CATALOGS=
4916 XLINGUAS=
4917 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4918 # If there aren't any .gmo files the shell will give us the
4919 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4920 # weeded out.
4921 case "$cat" in *\**)
4922 continue;;
4923 esac
4924 # The quadruple backslash is collapsed to a double backslash
4925 # by the backticks, then collapsed again by the double quotes,
4926 # leaving us with one backslash in the sed expression (right
4927 # before the dot that mustn't act as a wildcard).
4928 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4929 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4930 # The user is allowed to set LINGUAS to a list of languages to
4931 # install catalogs for. If it's empty that means "all of them."
4932 if test "x$LINGUAS" = x; then
4933 CATALOGS="$CATALOGS $cat"
4934 XLINGUAS="$XLINGUAS $lang"
4935 else
4936 case "$LINGUAS" in *$lang*)
4937 CATALOGS="$CATALOGS $cat"
4938 XLINGUAS="$XLINGUAS $lang"
4939 ;;
4940 esac
4941 fi
4942 done
4943 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4945$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4946
4947
4948 DATADIRNAME=share
4949
4950 INSTOBJEXT=.mo
4951
4952 GENCAT=gencat
4953
4954 CATOBJEXT=.gmo
4955
4956fi
4957
4958localedir='${datadir}/locale'
4959
4960
4961if test x"$USE_NLS" = xyes; then
4962 CONFIG_ALL="$CONFIG_ALL all-po"
4963 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4964 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4965 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4966fi
4967
4968
f434ba03
PA
4969
4970
4971
4972 LIBC_FATAL_STDERR_=1
4973 export LIBC_FATAL_STDERR_
4974
4975
4976
4977
4978
4979 for ac_header in $gl_header_list
4980do :
4981 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4982ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4983eval as_val=\$$as_ac_Header
4984 if test "x$as_val" = x""yes; then :
4985 cat >>confdefs.h <<_ACEOF
4986#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4987_ACEOF
4988
4989fi
4990
4991done
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001 for ac_func in $gl_func_list
5002do :
5003 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5004ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5005eval as_val=\$$as_ac_var
5006 if test "x$as_val" = x""yes; then :
5007 cat >>confdefs.h <<_ACEOF
5008#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5009_ACEOF
5010
5011fi
5012done
5013
5014
5015
5016
5017
5018
5019 GNULIB_MEMCHR=0;
5020 GNULIB_MEMMEM=0;
5021 GNULIB_MEMPCPY=0;
5022 GNULIB_MEMRCHR=0;
5023 GNULIB_RAWMEMCHR=0;
5024 GNULIB_STPCPY=0;
5025 GNULIB_STPNCPY=0;
5026 GNULIB_STRCHRNUL=0;
5027 GNULIB_STRDUP=0;
5028 GNULIB_STRNCAT=0;
5029 GNULIB_STRNDUP=0;
5030 GNULIB_STRNLEN=0;
5031 GNULIB_STRPBRK=0;
5032 GNULIB_STRSEP=0;
5033 GNULIB_STRSTR=0;
5034 GNULIB_STRCASESTR=0;
5035 GNULIB_STRTOK_R=0;
5036 GNULIB_MBSLEN=0;
5037 GNULIB_MBSNLEN=0;
5038 GNULIB_MBSCHR=0;
5039 GNULIB_MBSRCHR=0;
5040 GNULIB_MBSSTR=0;
5041 GNULIB_MBSCASECMP=0;
5042 GNULIB_MBSNCASECMP=0;
5043 GNULIB_MBSPCASECMP=0;
5044 GNULIB_MBSCASESTR=0;
5045 GNULIB_MBSCSPN=0;
5046 GNULIB_MBSPBRK=0;
5047 GNULIB_MBSSPN=0;
5048 GNULIB_MBSSEP=0;
5049 GNULIB_MBSTOK_R=0;
5050 GNULIB_STRERROR=0;
5051 GNULIB_STRSIGNAL=0;
5052 GNULIB_STRVERSCMP=0;
5053 HAVE_MBSLEN=0;
5054 HAVE_MEMCHR=1;
5055 HAVE_DECL_MEMMEM=1;
5056 HAVE_MEMPCPY=1;
5057 HAVE_DECL_MEMRCHR=1;
5058 HAVE_RAWMEMCHR=1;
5059 HAVE_STPCPY=1;
5060 HAVE_STPNCPY=1;
5061 HAVE_STRCHRNUL=1;
5062 HAVE_DECL_STRDUP=1;
5063 HAVE_DECL_STRNDUP=1;
5064 HAVE_DECL_STRNLEN=1;
5065 HAVE_STRPBRK=1;
5066 HAVE_STRSEP=1;
5067 HAVE_STRCASESTR=1;
5068 HAVE_DECL_STRTOK_R=1;
5069 HAVE_DECL_STRSIGNAL=1;
5070 HAVE_STRVERSCMP=1;
5071 REPLACE_MEMCHR=0;
783e057b 5072 REPLACE_MEMMEM=0;
f434ba03
PA
5073 REPLACE_STPNCPY=0;
5074 REPLACE_STRDUP=0;
783e057b 5075 REPLACE_STRSTR=0;
f434ba03
PA
5076 REPLACE_STRCASESTR=0;
5077 REPLACE_STRERROR=0;
5078 REPLACE_STRNCAT=0;
5079 REPLACE_STRNDUP=0;
5080 REPLACE_STRNLEN=0;
5081 REPLACE_STRSIGNAL=0;
5082 REPLACE_STRTOK_R=0;
5083 UNDEFINE_STRTOK_R=0;
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5098 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5099 # irrelevant for anonymous mappings.
5100 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5101if test "x$ac_cv_func_mmap" = x""yes; then :
5102 gl_have_mmap=yes
5103else
5104 gl_have_mmap=no
5105fi
5106
5107
5108 # Try to allow MAP_ANONYMOUS.
5109 gl_have_mmap_anonymous=no
5110 if test $gl_have_mmap = yes; then
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5112$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5114/* end confdefs.h. */
5115
5116#include <sys/mman.h>
5117#ifdef MAP_ANONYMOUS
5118 I cant identify this map.
5119#endif
5120
5121_ACEOF
5122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5123 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5124 gl_have_mmap_anonymous=yes
5125fi
5126rm -f conftest*
5127
5128 if test $gl_have_mmap_anonymous != yes; then
5129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5130/* end confdefs.h. */
5131
5132#include <sys/mman.h>
5133#ifdef MAP_ANON
5134 I cant identify this map.
5135#endif
5136
5137_ACEOF
5138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5139 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5140
5141$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5142
5143 gl_have_mmap_anonymous=yes
5144fi
5145rm -f conftest*
5146
5147 fi
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5149$as_echo "$gl_have_mmap_anonymous" >&6; }
5150 if test $gl_have_mmap_anonymous = yes; then
5151
5152$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5153
5154 fi
5155 fi
5156
5157
5158 :
5159
5160
5161
5162
5163
5164
5165 :
5166
5167
5168
5169
5170
5171
5172
5173
5174 :
5175
5176
5177
5178
5179
5180 if test $ac_cv_func_memchr = yes; then
5181 # Detect platform-specific bugs in some versions of glibc:
5182 # memchr should not dereference anything with length 0
5183 # http://bugzilla.redhat.com/499689
5184 # memchr should not dereference overestimated length after a match
5185 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5186 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5187 # Assume that memchr works on platforms that lack mprotect.
5188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5189$as_echo_n "checking whether memchr works... " >&6; }
5190if test "${gl_cv_func_memchr_works+set}" = set; then :
5191 $as_echo_n "(cached) " >&6
5192else
5193 if test "$cross_compiling" = yes; then :
5194 gl_cv_func_memchr_works="guessing no"
5195else
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198
5199#include <string.h>
5200#if HAVE_SYS_MMAN_H
5201# include <fcntl.h>
5202# include <unistd.h>
5203# include <sys/types.h>
5204# include <sys/mman.h>
5205# ifndef MAP_FILE
5206# define MAP_FILE 0
5207# endif
5208#endif
5209
5210int
5211main ()
5212{
5213
5214 char *fence = NULL;
5215#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5216# if HAVE_MAP_ANONYMOUS
5217 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5218 const int fd = -1;
5219# else /* !HAVE_MAP_ANONYMOUS */
5220 const int flags = MAP_FILE | MAP_PRIVATE;
5221 int fd = open ("/dev/zero", O_RDONLY, 0666);
5222 if (fd >= 0)
5223# endif
5224 {
5225 int pagesize = getpagesize ();
5226 char *two_pages =
5227 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5228 flags, fd, 0);
5229 if (two_pages != (char *)(-1)
5230 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5231 fence = two_pages + pagesize;
5232 }
5233#endif
5234 if (fence)
5235 {
5236 if (memchr (fence, 0, 0))
5237 return 1;
5238 strcpy (fence - 9, "12345678");
5239 if (memchr (fence - 9, 0, 79) != fence - 1)
5240 return 2;
5241 }
5242 return 0;
5243
5244 ;
5245 return 0;
5246}
5247_ACEOF
5248if ac_fn_c_try_run "$LINENO"; then :
5249 gl_cv_func_memchr_works=yes
5250else
5251 gl_cv_func_memchr_works=no
5252fi
5253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5254 conftest.$ac_objext conftest.beam conftest.$ac_ext
5255fi
5256
5257fi
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5259$as_echo "$gl_cv_func_memchr_works" >&6; }
5260 if test "$gl_cv_func_memchr_works" != yes; then
5261 REPLACE_MEMCHR=1
5262 fi
5263 else
5264 HAVE_MEMCHR=0
5265 fi
5266 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5267
5268
5269
5270
5271
5272
5273
5274
5275 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5276
5277
5278 for ac_header in bp-sym.h
5279do :
5280 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5281if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5282 cat >>confdefs.h <<_ACEOF
5283#define HAVE_BP_SYM_H 1
5284_ACEOF
5285
5286fi
5287
5288done
5289
5290
5291 fi
783e057b
DJ
5292
5293
81ecdfbb
RW
5294 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5295if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5296 ac_have_decl=1
783e057b 5297else
81ecdfbb 5298 ac_have_decl=0
783e057b 5299fi
783e057b
DJ
5300
5301cat >>confdefs.h <<_ACEOF
81ecdfbb 5302#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5303_ACEOF
5304
5305
783e057b
DJ
5306
5307
5308
5309
5310
5311
5312
5313
783e057b 5314
783e057b 5315
783e057b 5316
f434ba03 5317
81ecdfbb
RW
5318 for ac_func in memmem
5319do :
5320 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5321if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5322 cat >>confdefs.h <<_ACEOF
81ecdfbb 5323#define HAVE_MEMMEM 1
783e057b
DJ
5324_ACEOF
5325
5326else
5327
5328 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5329
5330fi
5331done
5332
5333
5334
5335 :
5336
5337
5338
5339
5340
5341 if test $ac_cv_have_decl_memmem = no; then
5342 HAVE_DECL_MEMMEM=0
5343 fi
5344 :
5345
5346
f434ba03
PA
5347 gl_cv_c_multiarch=no
5348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5349/* end confdefs.h. */
5350#ifndef __APPLE_CC__
5351 not a universal capable compiler
5352 #endif
5353 typedef int dummy;
5354
5355_ACEOF
5356if ac_fn_c_try_compile "$LINENO"; then :
5357
5358 arch=
5359 prev=
5360 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5361 if test -n "$prev"; then
5362 case $word in
5363 i?86 | x86_64 | ppc | ppc64)
5364 if test -z "$arch" || test "$arch" = "$word"; then
5365 arch="$word"
5366 else
5367 gl_cv_c_multiarch=yes
5368 fi
5369 ;;
5370 esac
5371 prev=
5372 else
5373 if test "x$word" = "x-arch"; then
5374 prev=arch
5375 fi
5376 fi
5377 done
5378
5379fi
5380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5381 if test $gl_cv_c_multiarch = yes; then
5382
5383$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5384
5385 APPLE_UNIVERSAL_BUILD=1
5386 else
5387 APPLE_UNIVERSAL_BUILD=0
5388 fi
5389
5390
5391
5392 REPLACE_NULL=0;
5393 HAVE_WCHAR_T=1;
5394 STDDEF_H='';
5395
5396
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5398$as_echo_n "checking for wchar_t... " >&6; }
5399if test "${gt_cv_c_wchar_t+set}" = set; then :
5400 $as_echo_n "(cached) " >&6
5401else
5402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5403/* end confdefs.h. */
5404#include <stddef.h>
5405 wchar_t foo = (wchar_t)'\0';
5406int
5407main ()
5408{
5409
5410 ;
5411 return 0;
5412}
5413_ACEOF
5414if ac_fn_c_try_compile "$LINENO"; then :
5415 gt_cv_c_wchar_t=yes
5416else
5417 gt_cv_c_wchar_t=no
5418fi
5419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5420fi
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5422$as_echo "$gt_cv_c_wchar_t" >&6; }
5423 if test $gt_cv_c_wchar_t = yes; then
5424
5425$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5426
5427 fi
5428
5429
5430
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5432$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5433if test "${gl_cv_have_include_next+set}" = set; then :
5434 $as_echo_n "(cached) " >&6
5435else
5436 rm -rf conftestd1a conftestd1b conftestd2
5437 mkdir conftestd1a conftestd1b conftestd2
5438 cat <<EOF > conftestd1a/conftest.h
5439#define DEFINED_IN_CONFTESTD1
5440#include_next <conftest.h>
5441#ifdef DEFINED_IN_CONFTESTD2
5442int foo;
5443#else
5444#error "include_next doesn't work"
5445#endif
5446EOF
5447 cat <<EOF > conftestd1b/conftest.h
5448#define DEFINED_IN_CONFTESTD1
5449#include <stdio.h>
5450#include_next <conftest.h>
5451#ifdef DEFINED_IN_CONFTESTD2
5452int foo;
5453#else
5454#error "include_next doesn't work"
5455#endif
5456EOF
5457 cat <<EOF > conftestd2/conftest.h
5458#ifndef DEFINED_IN_CONFTESTD1
5459#error "include_next test doesn't work"
5460#endif
5461#define DEFINED_IN_CONFTESTD2
5462EOF
5463 gl_save_CPPFLAGS="$CPPFLAGS"
5464 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h. */
5467#include <conftest.h>
5468_ACEOF
5469if ac_fn_c_try_compile "$LINENO"; then :
5470 gl_cv_have_include_next=yes
5471else
5472 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <conftest.h>
5476_ACEOF
5477if ac_fn_c_try_compile "$LINENO"; then :
5478 gl_cv_have_include_next=buggy
5479else
5480 gl_cv_have_include_next=no
5481fi
5482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486 CPPFLAGS="$gl_save_CPPFLAGS"
5487 rm -rf conftestd1a conftestd1b conftestd2
5488
5489fi
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5491$as_echo "$gl_cv_have_include_next" >&6; }
5492 PRAGMA_SYSTEM_HEADER=
5493 if test $gl_cv_have_include_next = yes; then
5494 INCLUDE_NEXT=include_next
5495 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5496 if test -n "$GCC"; then
5497 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5498 fi
5499 else
5500 if test $gl_cv_have_include_next = buggy; then
5501 INCLUDE_NEXT=include
5502 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5503 else
5504 INCLUDE_NEXT=include
5505 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5506 fi
5507 fi
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
81ecdfbb
RW
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5519$as_echo_n "checking for long long int... " >&6; }
5520if test "${ac_cv_type_long_long_int+set}" = set; then :
5521 $as_echo_n "(cached) " >&6
783e057b 5522else
81ecdfbb 5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5524/* end confdefs.h. */
81ecdfbb
RW
5525
5526 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5527 implementations with broken preprocessors. Perhaps this can
5528 be revisited in 2012. In the meantime, code should not expect
5529 #if to work with literals wider than 32 bits. */
783e057b
DJ
5530 /* Test literals. */
5531 long long int ll = 9223372036854775807ll;
5532 long long int nll = -9223372036854775807LL;
5533 unsigned long long int ull = 18446744073709551615ULL;
5534 /* Test constant expressions. */
5535 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5536 ? 1 : -1)];
783e057b 5537 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5538 ? 1 : -1)];
783e057b
DJ
5539 int i = 63;
5540int
5541main ()
5542{
5543/* Test availability of runtime routines for shift and division. */
5544 long long int llmax = 9223372036854775807ll;
5545 unsigned long long int ullmax = 18446744073709551615ull;
5546 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5547 | (llmax / ll) | (llmax % ll)
5548 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5549 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5550 ;
5551 return 0;
5552}
5553
5554_ACEOF
81ecdfbb 5555if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5556 if test "$cross_compiling" = yes; then :
783e057b
DJ
5557 ac_cv_type_long_long_int=yes
5558else
81ecdfbb 5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5560/* end confdefs.h. */
5561#include <limits.h>
f434ba03
PA
5562 #ifndef LLONG_MAX
5563 # define HALF \
5564 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5565 # define LLONG_MAX (HALF - 1 + HALF)
5566 #endif
783e057b
DJ
5567int
5568main ()
5569{
5570long long int n = 1;
f434ba03
PA
5571 int i;
5572 for (i = 0; ; i++)
5573 {
5574 long long int m = n << i;
5575 if (m >> i != n)
5576 return 1;
5577 if (LLONG_MAX / 2 < m)
5578 break;
5579 }
5580 return 0;
783e057b
DJ
5581 ;
5582 return 0;
5583}
5584_ACEOF
81ecdfbb 5585if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5586 ac_cv_type_long_long_int=yes
5587else
81ecdfbb 5588 ac_cv_type_long_long_int=no
783e057b 5589fi
81ecdfbb
RW
5590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5591 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5592fi
783e057b 5593
81ecdfbb
RW
5594else
5595 ac_cv_type_long_long_int=no
783e057b 5596fi
81ecdfbb
RW
5597rm -f core conftest.err conftest.$ac_objext \
5598 conftest$ac_exeext conftest.$ac_ext
783e057b 5599fi
81ecdfbb
RW
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5601$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5602 if test $ac_cv_type_long_long_int = yes; then
5603
81ecdfbb 5604$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5605
5606 fi
5607
5608
81ecdfbb
RW
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5610$as_echo_n "checking for unsigned long long int... " >&6; }
5611if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5612 $as_echo_n "(cached) " >&6
783e057b 5613else
81ecdfbb 5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5615/* end confdefs.h. */
81ecdfbb
RW
5616
5617 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5618 implementations with broken preprocessors. Perhaps this can
5619 be revisited in 2012. In the meantime, code should not expect
5620 #if to work with literals wider than 32 bits. */
783e057b
DJ
5621 /* Test literals. */
5622 long long int ll = 9223372036854775807ll;
5623 long long int nll = -9223372036854775807LL;
5624 unsigned long long int ull = 18446744073709551615ULL;
5625 /* Test constant expressions. */
5626 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5627 ? 1 : -1)];
783e057b 5628 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5629 ? 1 : -1)];
783e057b
DJ
5630 int i = 63;
5631int
5632main ()
5633{
5634/* Test availability of runtime routines for shift and division. */
5635 long long int llmax = 9223372036854775807ll;
5636 unsigned long long int ullmax = 18446744073709551615ull;
5637 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5638 | (llmax / ll) | (llmax % ll)
5639 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5640 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5641 ;
5642 return 0;
5643}
5644
5645_ACEOF
81ecdfbb 5646if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5647 ac_cv_type_unsigned_long_long_int=yes
5648else
81ecdfbb 5649 ac_cv_type_unsigned_long_long_int=no
783e057b 5650fi
81ecdfbb
RW
5651rm -f core conftest.err conftest.$ac_objext \
5652 conftest$ac_exeext conftest.$ac_ext
783e057b 5653fi
81ecdfbb
RW
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5655$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5656 if test $ac_cv_type_unsigned_long_long_int = yes; then
5657
81ecdfbb 5658$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5659
5660 fi
5661
5662
5663
783e057b
DJ
5664
5665
5666
5667
5668
5669
5670
5671
81ecdfbb
RW
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5673$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5674if test "${ac_cv_c_restrict+set}" = set; then :
5675 $as_echo_n "(cached) " >&6
783e057b
DJ
5676else
5677 ac_cv_c_restrict=no
5678 # The order here caters to the fact that C++ does not require restrict.
5679 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5681/* end confdefs.h. */
5682typedef int * int_ptr;
5683 int foo (int_ptr $ac_kw ip) {
5684 return ip[0];
5685 }
5686int
5687main ()
5688{
5689int s[1];
5690 int * $ac_kw t = s;
5691 t[0] = 0;
5692 return foo(t)
5693 ;
5694 return 0;
5695}
5696_ACEOF
81ecdfbb 5697if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5698 ac_cv_c_restrict=$ac_kw
783e057b 5699fi
81ecdfbb 5700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5701 test "$ac_cv_c_restrict" != no && break
5702 done
5703
5704fi
81ecdfbb
RW
5705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5706$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5707
5708 case $ac_cv_c_restrict in
5709 restrict) ;;
81ecdfbb 5710 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5711 ;;
5712 *) cat >>confdefs.h <<_ACEOF
5713#define restrict $ac_cv_c_restrict
5714_ACEOF
5715 ;;
5716 esac
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
f434ba03 5729
783e057b
DJ
5730 :
5731
5732
5733
5734
5735
5736
5737
f434ba03
PA
5738 if test $gl_cv_have_include_next = yes; then
5739 gl_cv_next_string_h='<'string.h'>'
5740 else
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5742$as_echo_n "checking absolute name of <string.h>... " >&6; }
5743if test "${gl_cv_next_string_h+set}" = set; then :
5744 $as_echo_n "(cached) " >&6
5745else
5746
5747 if test $ac_cv_header_string_h = yes; then
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749/* end confdefs.h. */
5750#include <string.h>
5751
5752_ACEOF
5753 case "$host_os" in
5754 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5755 *) gl_absname_cpp="$ac_cpp" ;;
5756 esac
5757 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5758 sed -n '\#/string.h#{
5759 s#.*"\(.*/string.h\)".*#\1#
5760 s#^/[^/]#//&#
5761 p
5762 q
5763 }'`'"'
5764 else
5765 gl_cv_next_string_h='<'string.h'>'
5766 fi
5767
5768fi
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5770$as_echo "$gl_cv_next_string_h" >&6; }
5771 fi
5772 NEXT_STRING_H=$gl_cv_next_string_h
5773
5774 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5775 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5776 gl_next_as_first_directive='<'string.h'>'
5777 else
5778 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5779 gl_next_as_first_directive=$gl_cv_next_string_h
5780 fi
5781 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5782
5783
5784
5785
5786
5787 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5788 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5790$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5791if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5792 $as_echo_n "(cached) " >&6
5793else
5794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5795/* end confdefs.h. */
5796#include <string.h>
5797
5798int
5799main ()
5800{
5801#undef $gl_func
5802 (void) $gl_func;
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807if ac_fn_c_try_compile "$LINENO"; then :
5808 eval "$as_gl_Symbol=yes"
5809else
5810 eval "$as_gl_Symbol=no"
5811fi
5812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5813fi
5814eval ac_res=\$$as_gl_Symbol
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5816$as_echo "$ac_res" >&6; }
5817 eval as_val=\$$as_gl_Symbol
5818 if test "x$as_val" = x""yes; then :
5819 cat >>confdefs.h <<_ACEOF
5820#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5821_ACEOF
5822
5823 eval ac_cv_have_decl_$gl_func=yes
5824fi
5825 done
5826
5827
5828
5829 GNULIB_BTOWC=0;
5830 GNULIB_WCTOB=0;
5831 GNULIB_MBSINIT=0;
5832 GNULIB_MBRTOWC=0;
5833 GNULIB_MBRLEN=0;
5834 GNULIB_MBSRTOWCS=0;
5835 GNULIB_MBSNRTOWCS=0;
5836 GNULIB_WCRTOMB=0;
5837 GNULIB_WCSRTOMBS=0;
5838 GNULIB_WCSNRTOMBS=0;
5839 GNULIB_WCWIDTH=0;
5840 HAVE_BTOWC=1;
5841 HAVE_MBSINIT=1;
5842 HAVE_MBRTOWC=1;
5843 HAVE_MBRLEN=1;
5844 HAVE_MBSRTOWCS=1;
5845 HAVE_MBSNRTOWCS=1;
5846 HAVE_WCRTOMB=1;
5847 HAVE_WCSRTOMBS=1;
5848 HAVE_WCSNRTOMBS=1;
5849 HAVE_DECL_WCTOB=1;
5850 HAVE_DECL_WCWIDTH=1;
5851 REPLACE_MBSTATE_T=0;
5852 REPLACE_BTOWC=0;
5853 REPLACE_WCTOB=0;
5854 REPLACE_MBSINIT=0;
5855 REPLACE_MBRTOWC=0;
5856 REPLACE_MBRLEN=0;
5857 REPLACE_MBSRTOWCS=0;
5858 REPLACE_MBSNRTOWCS=0;
5859 REPLACE_WCRTOMB=0;
5860 REPLACE_WCSRTOMBS=0;
5861 REPLACE_WCSNRTOMBS=0;
5862 REPLACE_WCWIDTH=0;
5863
5864
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5866$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5867if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5868 $as_echo_n "(cached) " >&6
783e057b 5869else
f434ba03
PA
5870 gl_cv_header_wchar_h_correct_inline=yes
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872/* end confdefs.h. */
783e057b 5873
f434ba03
PA
5874 #define wcstod renamed_wcstod
5875#include <wchar.h>
5876extern int zero (void);
5877int main () { return zero(); }
5878
5879_ACEOF
5880 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5881 (eval $ac_compile) 2>&5
5882 ac_status=$?
5883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5884 test $ac_status = 0; }; then
5885 mv conftest.$ac_objext conftest1.$ac_objext
5886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5887/* end confdefs.h. */
f434ba03
PA
5888
5889 #define wcstod renamed_wcstod
5890#include <wchar.h>
5891int zero (void) { return 0; }
783e057b
DJ
5892
5893_ACEOF
f434ba03
PA
5894 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5895 (eval $ac_compile) 2>&5
5896 ac_status=$?
5897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5898 test $ac_status = 0; }; then
5899 mv conftest.$ac_objext conftest2.$ac_objext
5900 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5901 :
5902 else
5903 gl_cv_header_wchar_h_correct_inline=no
5904 fi
5905 fi
5906 fi
5907 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5908
5909fi
f434ba03
PA
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5911$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5912 if test $gl_cv_header_wchar_h_correct_inline = no; then
5913 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5914This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5915C99 mode. You have four options:
5916 - Add the flag -fgnu89-inline to CC and reconfigure, or
5917 - Fix your include files, using parts of
5918 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5919 - Use a gcc version older than 4.3, or
5920 - Don't use the flags -std=c99 or -std=gnu99.
5921Configuration aborted." "$LINENO" 5
5922 fi
783e057b
DJ
5923
5924
f434ba03
PA
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5926$as_echo_n "checking for wint_t... " >&6; }
5927if test "${gt_cv_c_wint_t+set}" = set; then :
5928 $as_echo_n "(cached) " >&6
5929else
5930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5931/* end confdefs.h. */
783e057b 5932
f434ba03
PA
5933/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5934 <wchar.h>.
5935 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5936 before <wchar.h>. */
5937#include <stddef.h>
5938#include <stdio.h>
5939#include <time.h>
5940#include <wchar.h>
5941 wint_t foo = (wchar_t)'\0';
5942int
5943main ()
5944{
783e057b 5945
f434ba03
PA
5946 ;
5947 return 0;
5948}
5949_ACEOF
5950if ac_fn_c_try_compile "$LINENO"; then :
5951 gt_cv_c_wint_t=yes
5952else
5953 gt_cv_c_wint_t=no
5954fi
5955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5956fi
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5958$as_echo "$gt_cv_c_wint_t" >&6; }
5959 if test $gt_cv_c_wint_t = yes; then
783e057b 5960
f434ba03 5961$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5962
f434ba03 5963 fi
783e057b
DJ
5964
5965
81ecdfbb 5966 if false; then
783e057b
DJ
5967 GL_COND_LIBTOOL_TRUE=
5968 GL_COND_LIBTOOL_FALSE='#'
5969else
5970 GL_COND_LIBTOOL_TRUE='#'
5971 GL_COND_LIBTOOL_FALSE=
5972fi
5973
5974 gl_cond_libtool=false
5975 gl_libdeps=
5976 gl_ltlibdeps=
f434ba03 5977 gl_m4_base='gnulib/m4'
783e057b
DJ
5978
5979
5980
783e057b
DJ
5981
5982
5983
5984
5985
5986
f434ba03
PA
5987 gl_source_base='gnulib'
5988 # Code from module arg-nonnull:
5989 # Code from module c++defs:
5990 # Code from module extensions:
5991 # Code from module include_next:
5992 # Code from module memchr:
783e057b 5993
783e057b 5994
783e057b 5995
783e057b 5996
f434ba03 5997 GNULIB_MEMCHR=1
783e057b 5998
783e057b 5999
783e057b 6000
f434ba03 6001$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6002
783e057b
DJ
6003
6004
f434ba03 6005 # Code from module memmem:
783e057b
DJ
6006
6007
f434ba03
PA
6008 if test $ac_cv_have_decl_memmem = yes; then
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6010$as_echo_n "checking whether memmem works in linear time... " >&6; }
6011if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6012 $as_echo_n "(cached) " >&6
783e057b 6013else
81ecdfbb 6014 if test "$cross_compiling" = yes; then :
f434ba03 6015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6016/* end confdefs.h. */
783e057b 6017
f434ba03
PA
6018#include <features.h>
6019#ifdef __GNU_LIBRARY__
6020 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6021 Lucky user
6022 #endif
6023#endif
6024#ifdef __CYGWIN__
6025 #include <cygwin/version.h>
6026 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6027 Lucky user
6028 #endif
6029#endif
783e057b 6030
783e057b 6031_ACEOF
f434ba03
PA
6032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6033 $EGREP "Lucky user" >/dev/null 2>&1; then :
6034 gl_cv_func_memmem_works=yes
783e057b 6035else
f434ba03 6036 gl_cv_func_memmem_works="guessing no"
783e057b 6037fi
f434ba03 6038rm -f conftest*
783e057b
DJ
6039
6040
783e057b 6041else
81ecdfbb 6042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6043/* end confdefs.h. */
6044
f434ba03 6045#include <signal.h> /* for signal */
783e057b
DJ
6046#include <string.h> /* for memmem */
6047#include <stdlib.h> /* for malloc */
6048#include <unistd.h> /* for alarm */
6049
6050int
6051main ()
6052{
6053size_t m = 1000000;
6054 char *haystack = (char *) malloc (2 * m + 1);
6055 char *needle = (char *) malloc (m + 1);
6056 void *result = 0;
6057 /* Failure to compile this test due to missing alarm is okay,
6058 since all such platforms (mingw) also lack memmem. */
f434ba03 6059 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6060 alarm (5);
6061 /* Check for quadratic performance. */
6062 if (haystack && needle)
6063 {
f434ba03
PA
6064 memset (haystack, 'A', 2 * m);
6065 haystack[2 * m] = 'B';
6066 memset (needle, 'A', m);
6067 needle[m] = 'B';
6068 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6069 }
6070 /* Check for empty needle behavior. */
6071 return !result || !memmem ("a", 1, 0, 0);
6072 ;
6073 return 0;
6074}
6075_ACEOF
81ecdfbb 6076if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6077 gl_cv_func_memmem_works=yes
6078else
81ecdfbb 6079 gl_cv_func_memmem_works=no
783e057b 6080fi
81ecdfbb
RW
6081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6082 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6083fi
81ecdfbb 6084
f434ba03 6085
783e057b 6086fi
81ecdfbb
RW
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6088$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6089 if test "$gl_cv_func_memmem_works" != yes; then
6090 REPLACE_MEMMEM=1
6091
6092
6093
6094
6095
6096
6097
f434ba03 6098
783e057b
DJ
6099 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6100
6101 fi
6102 fi
6103
f434ba03
PA
6104 # Code from module memmem-simple:
6105
783e057b
DJ
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
81ecdfbb
RW
6117 for ac_func in memmem
6118do :
6119 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6120if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6121 cat >>confdefs.h <<_ACEOF
81ecdfbb 6122#define HAVE_MEMMEM 1
783e057b
DJ
6123_ACEOF
6124
6125else
6126
6127 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6128
6129fi
6130done
6131
6132
6133
6134 :
6135
6136
6137
6138
6139
6140 if test $ac_cv_have_decl_memmem = no; then
6141 HAVE_DECL_MEMMEM=0
6142 fi
6143 :
6144
6145
6146
f434ba03 6147
783e057b
DJ
6148 GNULIB_MEMMEM=1
6149
6150
6151
f434ba03
PA
6152$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6153
6154
6155
6156 # Code from module multiarch:
6157
6158 # Code from module stddef:
6159
6160
6161
6162 if test $gt_cv_c_wchar_t = no; then
6163 HAVE_WCHAR_T=0
6164 STDDEF_H=stddef.h
6165 fi
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6167$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6168if test "${gl_cv_decl_null_works+set}" = set; then :
6169 $as_echo_n "(cached) " >&6
6170else
6171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6172/* end confdefs.h. */
6173#include <stddef.h>
6174 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6175
6176int
6177main ()
6178{
6179
6180 ;
6181 return 0;
6182}
6183_ACEOF
6184if ac_fn_c_try_compile "$LINENO"; then :
6185 gl_cv_decl_null_works=yes
6186else
6187 gl_cv_decl_null_works=no
6188fi
6189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6190fi
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6192$as_echo "$gl_cv_decl_null_works" >&6; }
6193 if test $gl_cv_decl_null_works = no; then
6194 REPLACE_NULL=1
6195 STDDEF_H=stddef.h
6196 fi
6197 if test -n "$STDDEF_H"; then
6198
6199
6200
6201
6202 :
6203
6204
6205
6206
6207
6208
6209
6210 if test $gl_cv_have_include_next = yes; then
6211 gl_cv_next_stddef_h='<'stddef.h'>'
6212 else
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6214$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6215if test "${gl_cv_next_stddef_h+set}" = set; then :
6216 $as_echo_n "(cached) " >&6
6217else
6218
6219 if test $ac_cv_header_stddef_h = yes; then
6220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6221/* end confdefs.h. */
6222#include <stddef.h>
6223
6224_ACEOF
6225 case "$host_os" in
6226 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6227 *) gl_absname_cpp="$ac_cpp" ;;
6228 esac
6229 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6230 sed -n '\#/stddef.h#{
6231 s#.*"\(.*/stddef.h\)".*#\1#
6232 s#^/[^/]#//&#
6233 p
6234 q
6235 }'`'"'
6236 else
6237 gl_cv_next_stddef_h='<'stddef.h'>'
6238 fi
6239
6240fi
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6242$as_echo "$gl_cv_next_stddef_h" >&6; }
6243 fi
6244 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6245
6246 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6247 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6248 gl_next_as_first_directive='<'stddef.h'>'
6249 else
6250 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6251 gl_next_as_first_directive=$gl_cv_next_stddef_h
6252 fi
6253 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6254
6255
6256
6257 fi
6258
6259 # Code from module stdint:
6260
6261
783e057b
DJ
6262
6263 if test $ac_cv_type_long_long_int = yes; then
6264 HAVE_LONG_LONG_INT=1
6265 else
6266 HAVE_LONG_LONG_INT=0
6267 fi
6268
6269
6270 if test $ac_cv_type_unsigned_long_long_int = yes; then
6271 HAVE_UNSIGNED_LONG_LONG_INT=1
6272 else
6273 HAVE_UNSIGNED_LONG_LONG_INT=0
6274 fi
6275
6276
6277 if test $ac_cv_header_inttypes_h = yes; then
6278 HAVE_INTTYPES_H=1
6279 else
6280 HAVE_INTTYPES_H=0
6281 fi
6282
6283
6284 if test $ac_cv_header_sys_types_h = yes; then
6285 HAVE_SYS_TYPES_H=1
6286 else
6287 HAVE_SYS_TYPES_H=0
6288 fi
6289
6290
6291
6292
6293
f434ba03 6294
783e057b
DJ
6295 :
6296
6297
6298
6299
6300
6301
6302
6303 if test $gl_cv_have_include_next = yes; then
6304 gl_cv_next_stdint_h='<'stdint.h'>'
6305 else
81ecdfbb
RW
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6307$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6308if test "${gl_cv_next_stdint_h+set}" = set; then :
6309 $as_echo_n "(cached) " >&6
783e057b
DJ
6310else
6311
f434ba03
PA
6312 if test $ac_cv_header_stdint_h = yes; then
6313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6314/* end confdefs.h. */
6315#include <stdint.h>
6316
6317_ACEOF
f434ba03
PA
6318 case "$host_os" in
6319 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6320 *) gl_absname_cpp="$ac_cpp" ;;
6321 esac
6322 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6323 sed -n '\#/stdint.h#{
6324 s#.*"\(.*/stdint.h\)".*#\1#
6325 s#^/[^/]#//&#
6326 p
6327 q
6328 }'`'"'
6329 else
6330 gl_cv_next_stdint_h='<'stdint.h'>'
6331 fi
783e057b
DJ
6332
6333fi
81ecdfbb
RW
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6335$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6336 fi
6337 NEXT_STDINT_H=$gl_cv_next_stdint_h
6338
f434ba03
PA
6339 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6340 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6341 gl_next_as_first_directive='<'stdint.h'>'
6342 else
6343 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6344 gl_next_as_first_directive=$gl_cv_next_stdint_h
6345 fi
6346 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6347
783e057b
DJ
6348
6349
6350 if test $ac_cv_header_stdint_h = yes; then
6351 HAVE_STDINT_H=1
6352 else
6353 HAVE_STDINT_H=0
6354 fi
6355
6356
6357 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6359$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6360if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6361 $as_echo_n "(cached) " >&6
783e057b
DJ
6362else
6363 gl_cv_header_working_stdint_h=no
81ecdfbb 6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6365/* end confdefs.h. */
6366
81ecdfbb 6367
783e057b
DJ
6368#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6369#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6370#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6371#include <stdint.h>
6372/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6373#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6374#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6375#endif
6376
6377
6378 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6379 included before <wchar.h>. */
6380 #include <stddef.h>
6381 #include <signal.h>
6382 #if HAVE_WCHAR_H
6383 # include <stdio.h>
6384 # include <time.h>
6385 # include <wchar.h>
6386 #endif
6387
6388
6389#ifdef INT8_MAX
6390int8_t a1 = INT8_MAX;
6391int8_t a1min = INT8_MIN;
6392#endif
6393#ifdef INT16_MAX
6394int16_t a2 = INT16_MAX;
6395int16_t a2min = INT16_MIN;
6396#endif
6397#ifdef INT32_MAX
6398int32_t a3 = INT32_MAX;
6399int32_t a3min = INT32_MIN;
6400#endif
6401#ifdef INT64_MAX
6402int64_t a4 = INT64_MAX;
6403int64_t a4min = INT64_MIN;
6404#endif
6405#ifdef UINT8_MAX
6406uint8_t b1 = UINT8_MAX;
6407#else
6408typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6409#endif
6410#ifdef UINT16_MAX
6411uint16_t b2 = UINT16_MAX;
6412#endif
6413#ifdef UINT32_MAX
6414uint32_t b3 = UINT32_MAX;
6415#endif
6416#ifdef UINT64_MAX
6417uint64_t b4 = UINT64_MAX;
6418#endif
6419int_least8_t c1 = INT8_C (0x7f);
6420int_least8_t c1max = INT_LEAST8_MAX;
6421int_least8_t c1min = INT_LEAST8_MIN;
6422int_least16_t c2 = INT16_C (0x7fff);
6423int_least16_t c2max = INT_LEAST16_MAX;
6424int_least16_t c2min = INT_LEAST16_MIN;
6425int_least32_t c3 = INT32_C (0x7fffffff);
6426int_least32_t c3max = INT_LEAST32_MAX;
6427int_least32_t c3min = INT_LEAST32_MIN;
6428int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6429int_least64_t c4max = INT_LEAST64_MAX;
6430int_least64_t c4min = INT_LEAST64_MIN;
6431uint_least8_t d1 = UINT8_C (0xff);
6432uint_least8_t d1max = UINT_LEAST8_MAX;
6433uint_least16_t d2 = UINT16_C (0xffff);
6434uint_least16_t d2max = UINT_LEAST16_MAX;
6435uint_least32_t d3 = UINT32_C (0xffffffff);
6436uint_least32_t d3max = UINT_LEAST32_MAX;
6437uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6438uint_least64_t d4max = UINT_LEAST64_MAX;
6439int_fast8_t e1 = INT_FAST8_MAX;
6440int_fast8_t e1min = INT_FAST8_MIN;
6441int_fast16_t e2 = INT_FAST16_MAX;
6442int_fast16_t e2min = INT_FAST16_MIN;
6443int_fast32_t e3 = INT_FAST32_MAX;
6444int_fast32_t e3min = INT_FAST32_MIN;
6445int_fast64_t e4 = INT_FAST64_MAX;
6446int_fast64_t e4min = INT_FAST64_MIN;
6447uint_fast8_t f1 = UINT_FAST8_MAX;
6448uint_fast16_t f2 = UINT_FAST16_MAX;
6449uint_fast32_t f3 = UINT_FAST32_MAX;
6450uint_fast64_t f4 = UINT_FAST64_MAX;
6451#ifdef INTPTR_MAX
6452intptr_t g = INTPTR_MAX;
6453intptr_t gmin = INTPTR_MIN;
6454#endif
6455#ifdef UINTPTR_MAX
6456uintptr_t h = UINTPTR_MAX;
6457#endif
6458intmax_t i = INTMAX_MAX;
6459uintmax_t j = UINTMAX_MAX;
6460
6461#include <limits.h> /* for CHAR_BIT */
6462#define TYPE_MINIMUM(t) \
6463 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6464#define TYPE_MAXIMUM(t) \
6465 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6466struct s {
6467 int check_PTRDIFF:
6468 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6469 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6470 ? 1 : -1;
6471 /* Detect bug in FreeBSD 6.0 / ia64. */
6472 int check_SIG_ATOMIC:
6473 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6474 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6475 ? 1 : -1;
6476 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6477 int check_WCHAR:
6478 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6479 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6480 ? 1 : -1;
6481 /* Detect bug in mingw. */
6482 int check_WINT:
6483 WINT_MIN == TYPE_MINIMUM (wint_t)
6484 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6485 ? 1 : -1;
6486
f434ba03
PA
6487 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6488 int check_UINT8_C:
6489 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6490 int check_UINT16_C:
6491 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6492
6493 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6494#ifdef UINT8_MAX
6495 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6496#endif
6497#ifdef UINT16_MAX
6498 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6499#endif
6500#ifdef UINT32_MAX
6501 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6502#endif
6503#ifdef UINT64_MAX
6504 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6505#endif
6506 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6507 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6508 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6509 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6510 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6511 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6512 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6513 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6514 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6515 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6516 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6517};
6518
6519int
6520main ()
6521{
6522
6523 ;
6524 return 0;
6525}
6526_ACEOF
6527if ac_fn_c_try_compile "$LINENO"; then :
6528 if test "$cross_compiling" = yes; then :
6529 gl_cv_header_working_stdint_h=yes
6530
6531else
6532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6533/* end confdefs.h. */
6534
6535
6536#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6537#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6538#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6539#include <stdint.h>
6540
783e057b 6541
f434ba03
PA
6542 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6543 included before <wchar.h>. */
6544 #include <stddef.h>
6545 #include <signal.h>
6546 #if HAVE_WCHAR_H
6547 # include <stdio.h>
6548 # include <time.h>
6549 # include <wchar.h>
6550 #endif
6551
6552
6553#include <stdio.h>
6554#include <string.h>
6555#define MVAL(macro) MVAL1(macro)
6556#define MVAL1(expression) #expression
6557static const char *macro_values[] =
6558 {
6559#ifdef INT8_MAX
6560 MVAL (INT8_MAX),
6561#endif
6562#ifdef INT16_MAX
6563 MVAL (INT16_MAX),
6564#endif
6565#ifdef INT32_MAX
6566 MVAL (INT32_MAX),
6567#endif
6568#ifdef INT64_MAX
6569 MVAL (INT64_MAX),
6570#endif
783e057b 6571#ifdef UINT8_MAX
f434ba03 6572 MVAL (UINT8_MAX),
783e057b
DJ
6573#endif
6574#ifdef UINT16_MAX
f434ba03 6575 MVAL (UINT16_MAX),
783e057b
DJ
6576#endif
6577#ifdef UINT32_MAX
f434ba03 6578 MVAL (UINT32_MAX),
783e057b
DJ
6579#endif
6580#ifdef UINT64_MAX
f434ba03 6581 MVAL (UINT64_MAX),
783e057b 6582#endif
f434ba03
PA
6583 NULL
6584 };
783e057b
DJ
6585
6586int
6587main ()
6588{
6589
f434ba03
PA
6590 const char **mv;
6591 for (mv = macro_values; *mv != NULL; mv++)
6592 {
6593 const char *value = *mv;
6594 /* Test whether it looks like a cast expression. */
6595 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6596 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6597 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6598 || strncmp (value, "((int)"/*)*/, 6) == 0
6599 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6600 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6601 return 1;
6602 }
6603 return 0;
6604
783e057b
DJ
6605 ;
6606 return 0;
6607}
6608_ACEOF
f434ba03 6609if ac_fn_c_try_run "$LINENO"; then :
783e057b 6610 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6611fi
6612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6613 conftest.$ac_objext conftest.beam conftest.$ac_ext
6614fi
6615
6616
783e057b 6617fi
81ecdfbb 6618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6619
783e057b 6620fi
81ecdfbb
RW
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6622$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6623 fi
6624 if test "$gl_cv_header_working_stdint_h" = yes; then
6625 STDINT_H=
6626 else
81ecdfbb
RW
6627 for ac_header in sys/inttypes.h sys/bitypes.h
6628do :
6629 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6630ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6631eval as_val=\$$as_ac_Header
6632 if test "x$as_val" = x""yes; then :
783e057b 6633 cat >>confdefs.h <<_ACEOF
81ecdfbb 6634#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6635_ACEOF
6636
6637fi
6638
6639done
6640
6641 if test $ac_cv_header_sys_inttypes_h = yes; then
6642 HAVE_SYS_INTTYPES_H=1
6643 else
6644 HAVE_SYS_INTTYPES_H=0
6645 fi
6646
6647 if test $ac_cv_header_sys_bitypes_h = yes; then
6648 HAVE_SYS_BITYPES_H=1
6649 else
6650 HAVE_SYS_BITYPES_H=0
6651 fi
6652
6653
6654
6655 :
6656
6657
6658
6659
6660
6661
6662
6663
f434ba03
PA
6664 if test $APPLE_UNIVERSAL_BUILD = 0; then
6665
6666
6667 for gltype in ptrdiff_t size_t ; do
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6669$as_echo_n "checking for bit size of $gltype... " >&6; }
6670if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6671 $as_echo_n "(cached) " >&6
6672else
6673 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6674 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6675 included before <wchar.h>. */
6676 #include <stddef.h>
6677 #include <signal.h>
6678 #if HAVE_WCHAR_H
6679 # include <stdio.h>
6680 # include <time.h>
6681 # include <wchar.h>
6682 #endif
6683
6684#include <limits.h>"; then :
6685
6686else
6687 result=unknown
6688fi
6689
6690 eval gl_cv_bitsizeof_${gltype}=\$result
6691
6692fi
6693eval ac_res=\$gl_cv_bitsizeof_${gltype}
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6695$as_echo "$ac_res" >&6; }
6696 eval result=\$gl_cv_bitsizeof_${gltype}
6697 if test $result = unknown; then
6698 result=0
6699 fi
6700 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6701 cat >>confdefs.h <<_ACEOF
6702#define BITSIZEOF_${GLTYPE} $result
6703_ACEOF
6704
6705 eval BITSIZEOF_${GLTYPE}=\$result
6706 done
6707
6708
6709 fi
6710
783e057b 6711
f434ba03 6712 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6714$as_echo_n "checking for bit size of $gltype... " >&6; }
6715if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6716 $as_echo_n "(cached) " >&6
6717else
6718 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6719 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6720 included before <wchar.h>. */
6721 #include <stddef.h>
6722 #include <signal.h>
6723 #if HAVE_WCHAR_H
6724 # include <stdio.h>
6725 # include <time.h>
6726 # include <wchar.h>
6727 #endif
6728
6729#include <limits.h>"; then :
6730
6731else
6732 result=unknown
6733fi
6734
6735 eval gl_cv_bitsizeof_${gltype}=\$result
6736
6737fi
6738eval ac_res=\$gl_cv_bitsizeof_${gltype}
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6740$as_echo "$ac_res" >&6; }
6741 eval result=\$gl_cv_bitsizeof_${gltype}
6742 if test $result = unknown; then
6743 result=0
6744 fi
6745 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6746 cat >>confdefs.h <<_ACEOF
6747#define BITSIZEOF_${GLTYPE} $result
6748_ACEOF
783e057b 6749
81ecdfbb
RW
6750 eval BITSIZEOF_${GLTYPE}=\$result
6751 done
783e057b
DJ
6752
6753
6754
6755
81ecdfbb
RW
6756 for gltype in sig_atomic_t wchar_t wint_t ; do
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6758$as_echo_n "checking whether $gltype is signed... " >&6; }
6759if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6760 $as_echo_n "(cached) " >&6
783e057b 6761else
81ecdfbb 6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6763/* end confdefs.h. */
6764
6765 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6766 included before <wchar.h>. */
6767 #include <stddef.h>
6768 #include <signal.h>
6769 #if HAVE_WCHAR_H
6770 # include <stdio.h>
6771 # include <time.h>
6772 # include <wchar.h>
6773 #endif
6774
6775 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783_ACEOF
81ecdfbb 6784if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6785 result=yes
6786else
81ecdfbb 6787 result=no
20e95c23 6788fi
81ecdfbb 6789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6790 eval gl_cv_type_${gltype}_signed=\$result
6791
6792fi
81ecdfbb
RW
6793eval ac_res=\$gl_cv_type_${gltype}_signed
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6795$as_echo "$ac_res" >&6; }
783e057b
DJ
6796 eval result=\$gl_cv_type_${gltype}_signed
6797 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6798 if test "$result" = yes; then
6799 cat >>confdefs.h <<_ACEOF
6800#define HAVE_SIGNED_${GLTYPE} 1
6801_ACEOF
6802
6803 eval HAVE_SIGNED_${GLTYPE}=1
6804 else
6805 eval HAVE_SIGNED_${GLTYPE}=0
6806 fi
6807 done
6808
6809
6810 gl_cv_type_ptrdiff_t_signed=yes
6811 gl_cv_type_size_t_signed=no
f434ba03 6812 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6813
6814
f434ba03 6815 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6817$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6818if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6819 $as_echo_n "(cached) " >&6
c906108c 6820else
783e057b
DJ
6821 eval gl_cv_type_${gltype}_suffix=no
6822 eval result=\$gl_cv_type_${gltype}_signed
6823 if test "$result" = yes; then
6824 glsufu=
6825 else
6826 glsufu=u
6827 fi
6828 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6829 case $glsuf in
6830 '') gltype1='int';;
f434ba03
PA
6831 l) gltype1='long int';;
6832 ll) gltype1='long long int';;
6833 i64) gltype1='__int64';;
6834 u) gltype1='unsigned int';;
6835 ul) gltype1='unsigned long int';;
6836 ull) gltype1='unsigned long long int';;
783e057b
DJ
6837 ui64)gltype1='unsigned __int64';;
6838 esac
81ecdfbb 6839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6840/* end confdefs.h. */
6841
6842 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6843 included before <wchar.h>. */
6844 #include <stddef.h>
6845 #include <signal.h>
6846 #if HAVE_WCHAR_H
6847 # include <stdio.h>
6848 # include <time.h>
6849 # include <wchar.h>
6850 #endif
6851
6852 extern $gltype foo;
6853 extern $gltype1 foo;
6854int
6855main ()
6856{
6857
6858 ;
6859 return 0;
6860}
6861_ACEOF
81ecdfbb 6862if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6863 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6864fi
81ecdfbb 6865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6866 eval result=\$gl_cv_type_${gltype}_suffix
6867 test "$result" != no && break
6868 done
6869fi
81ecdfbb
RW
6870eval ac_res=\$gl_cv_type_${gltype}_suffix
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6872$as_echo "$ac_res" >&6; }
783e057b
DJ
6873 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6874 eval result=\$gl_cv_type_${gltype}_suffix
6875 test "$result" = no && result=
6876 eval ${GLTYPE}_SUFFIX=\$result
6877 cat >>confdefs.h <<_ACEOF
6878#define ${GLTYPE}_SUFFIX $result
6879_ACEOF
6880
6881 done
6882
6883
783e057b
DJ
6884 fi
6885
6886
f434ba03
PA
6887 for gltype in sig_atomic_t wchar_t wint_t ; do
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6889$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6890if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6891 $as_echo_n "(cached) " >&6
783e057b 6892else
f434ba03
PA
6893 eval gl_cv_type_${gltype}_suffix=no
6894 eval result=\$gl_cv_type_${gltype}_signed
6895 if test "$result" = yes; then
6896 glsufu=
6897 else
6898 glsufu=u
6899 fi
6900 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6901 case $glsuf in
6902 '') gltype1='int';;
6903 l) gltype1='long int';;
6904 ll) gltype1='long long int';;
6905 i64) gltype1='__int64';;
6906 u) gltype1='unsigned int';;
6907 ul) gltype1='unsigned long int';;
6908 ull) gltype1='unsigned long long int';;
6909 ui64)gltype1='unsigned __int64';;
6910 esac
6911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6912/* end confdefs.h. */
f434ba03
PA
6913
6914 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6915 included before <wchar.h>. */
6916 #include <stddef.h>
6917 #include <signal.h>
6918 #if HAVE_WCHAR_H
6919 # include <stdio.h>
6920 # include <time.h>
6921 # include <wchar.h>
6922 #endif
6923
6924 extern $gltype foo;
6925 extern $gltype1 foo;
6926int
6927main ()
6928{
6929
6930 ;
6931 return 0;
6932}
783e057b 6933_ACEOF
81ecdfbb 6934if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6935 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6936fi
81ecdfbb 6937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6938 eval result=\$gl_cv_type_${gltype}_suffix
6939 test "$result" != no && break
6940 done
783e057b 6941fi
f434ba03
PA
6942eval ac_res=\$gl_cv_type_${gltype}_suffix
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6944$as_echo "$ac_res" >&6; }
6945 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6946 eval result=\$gl_cv_type_${gltype}_suffix
6947 test "$result" = no && result=
6948 eval ${GLTYPE}_SUFFIX=\$result
6949 cat >>confdefs.h <<_ACEOF
6950#define ${GLTYPE}_SUFFIX $result
6951_ACEOF
6952
6953 done
6954
6955
6956
6957 STDINT_H=stdint.h
783e057b
DJ
6958 fi
6959
6960
f434ba03
PA
6961 # Code from module string:
6962
6963
6964
6965 # Code from module warn-on-use:
6966 # Code from module wchar:
6967
6968
6969
6970
783e057b
DJ
6971 :
6972
6973
6974
6975
6976
783e057b
DJ
6977
6978
6979
6980
6981 :
6982
6983
6984
6985
6986
6987
6988
6989 if test $gl_cv_have_include_next = yes; then
6990 gl_cv_next_wchar_h='<'wchar.h'>'
6991 else
81ecdfbb
RW
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6993$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6994if test "${gl_cv_next_wchar_h+set}" = set; then :
6995 $as_echo_n "(cached) " >&6
783e057b
DJ
6996else
6997
f434ba03
PA
6998 if test $ac_cv_header_wchar_h = yes; then
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7000/* end confdefs.h. */
7001#include <wchar.h>
7002
7003_ACEOF
f434ba03
PA
7004 case "$host_os" in
7005 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7006 *) gl_absname_cpp="$ac_cpp" ;;
7007 esac
7008 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7009 sed -n '\#/wchar.h#{
7010 s#.*"\(.*/wchar.h\)".*#\1#
7011 s#^/[^/]#//&#
7012 p
7013 q
7014 }'`'"'
7015 else
7016 gl_cv_next_wchar_h='<'wchar.h'>'
7017 fi
783e057b
DJ
7018
7019fi
81ecdfbb
RW
7020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7021$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7022 fi
7023 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7024
f434ba03
PA
7025 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7026 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7027 gl_next_as_first_directive='<'wchar.h'>'
7028 else
7029 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7030 gl_next_as_first_directive=$gl_cv_next_wchar_h
7031 fi
7032 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7033
7034
7035
7036 if test $ac_cv_header_wchar_h = yes; then
7037 HAVE_WCHAR_H=1
7038 else
7039 HAVE_WCHAR_H=0
7040 fi
7041
7042
7043
7044 if test $gt_cv_c_wint_t = yes; then
7045 HAVE_WINT_T=1
7046 else
7047 HAVE_WINT_T=0
7048 fi
7049
7050
7051
7052 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7053 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7055$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7056if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7057 $as_echo_n "(cached) " >&6
7058else
7059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7060/* end confdefs.h. */
7061
7062/* Some systems require additional headers. */
7063#ifndef __GLIBC__
7064# include <stddef.h>
7065# include <stdio.h>
7066# include <time.h>
7067#endif
7068#include <wchar.h>
7069
7070int
7071main ()
7072{
7073#undef $gl_func
7074 (void) $gl_func;
7075 ;
7076 return 0;
7077}
7078_ACEOF
7079if ac_fn_c_try_compile "$LINENO"; then :
7080 eval "$as_gl_Symbol=yes"
7081else
7082 eval "$as_gl_Symbol=no"
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086eval ac_res=\$$as_gl_Symbol
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7088$as_echo "$ac_res" >&6; }
7089 eval as_val=\$$as_gl_Symbol
7090 if test "x$as_val" = x""yes; then :
7091 cat >>confdefs.h <<_ACEOF
7092#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7093_ACEOF
7094
7095 eval ac_cv_have_decl_$gl_func=yes
7096fi
7097 done
7098
7099
7100 # Code from module dummy:
7101 # End of code from modules
7102
7103
c906108c 7104
c906108c 7105
c906108c 7106
c906108c 7107
c906108c 7108
c906108c 7109
c906108c 7110
783e057b
DJ
7111 gltests_libdeps=
7112 gltests_ltlibdeps=
20e95c23 7113
20e95c23 7114
20e95c23 7115
f434ba03
PA
7116
7117
7118
7119
7120
7121
783e057b 7122 gl_source_base='tests'
f434ba03
PA
7123 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
7124
7125 gl_module_indicator_condition=$gltests_WITNESS
7126
7127
7128
7129
7130
c906108c 7131
bec39cab 7132
bec39cab 7133
783e057b
DJ
7134
7135 LIBGNU_LIBDEPS="$gl_libdeps"
7136
7137 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7138
7139
e28b3332 7140
d5af19ba
DJ
7141# For Makefile dependencies.
7142GNULIB_STDINT_H=
7143if test x"$STDINT_H" != x; then
7144 GNULIB_STDINT_H=gnulib/$STDINT_H
7145fi
7146
7147
bec39cab
AC
7148PACKAGE=gdb
7149
7150cat >>confdefs.h <<_ACEOF
7151#define PACKAGE "$PACKAGE"
7152_ACEOF
7153
7154
7155
5048e516
JK
7156# Do we have a single-tree copy of texinfo? Even if we do, we can't
7157# rely on it - libiberty is built before texinfo.
7158# Extract the first word of "makeinfo", so it can be a program name with args.
7159set dummy makeinfo; ac_word=$2
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161$as_echo_n "checking for $ac_word... " >&6; }
7162if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7163 $as_echo_n "(cached) " >&6
7164else
7165 if test -n "$MAKEINFO"; then
7166 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7167else
7168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169for as_dir in $PATH
7170do
7171 IFS=$as_save_IFS
7172 test -z "$as_dir" && as_dir=.
7173 for ac_exec_ext in '' $ac_executable_extensions; do
7174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7175 ac_cv_prog_MAKEINFO="makeinfo"
7176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7177 break 2
7178 fi
7179done
7180 done
7181IFS=$as_save_IFS
7182
7183fi
7184fi
7185MAKEINFO=$ac_cv_prog_MAKEINFO
7186if test -n "$MAKEINFO"; then
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7188$as_echo "$MAKEINFO" >&6; }
7189else
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191$as_echo "no" >&6; }
7192fi
7193
7194
7195if test "x$MAKEINFO" = "x"; then
7196 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7197else
7198 case "$MAKEINFO" in
7199 */missing\ makeinfo*)
7200 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7201 ;;
7202 esac
7203fi
7204
7205
7206# --split-size=5000000 may be already in $MAKEINFO from parent configure.
7207# Re-running configure in gdb/ would lose it so ensure it stays present.
7208MAKEINFOFLAGS=${MAKEINFOFLAGS---split-size=5000000}
7209
7210
7211MAKEINFO_EXTRA_FLAGS=""
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7213$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7214if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7215 $as_echo_n "(cached) " >&6
7216else
7217 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7218 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7219 gdb_cv_have_makeinfo_click=yes
7220 else
7221 gdb_cv_have_makeinfo_click=no
7222 fi
7223fi
7224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7225$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7226if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7227 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7228fi
7229
7230
e28b3332
DJ
7231# GDB does not use automake, but gnulib does. This line lets us
7232# generate its Makefile.in.
81ecdfbb
RW
7233am__api_version='1.11'
7234
e28b3332
DJ
7235# Find a good install program. We prefer a C program (faster),
7236# so one script is as good as another. But avoid the broken or
7237# incompatible versions:
7238# SysV /etc/install, /usr/sbin/install
7239# SunOS /usr/etc/install
7240# IRIX /sbin/install
7241# AIX /bin/install
7242# AmigaOS /C/install, which installs bootblocks on floppy discs
7243# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7244# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7245# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7246# OS/2's system install, which has a completely different semantic
7247# ./install, which can be erroneously created by make from ./install.sh.
85541719 7248# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7250$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7251if test -z "$INSTALL"; then
81ecdfbb
RW
7252if test "${ac_cv_path_install+set}" = set; then :
7253 $as_echo_n "(cached) " >&6
e28b3332
DJ
7254else
7255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7256for as_dir in $PATH
7257do
7258 IFS=$as_save_IFS
7259 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7260 # Account for people who put trailing slashes in PATH elements.
7261case $as_dir/ in #((
7262 ./ | .// | /[cC]/* | \
e28b3332 7263 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7264 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7265 /usr/ucb/* ) ;;
7266 *)
7267 # OSF1 and SCO ODT 3.0 have their own names for install.
7268 # Don't use installbsd from OSF since it installs stuff as root
7269 # by default.
7270 for ac_prog in ginstall scoinst install; do
7271 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7272 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7273 if test $ac_prog = install &&
7274 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7275 # AIX install. It has an incompatible calling convention.
7276 :
7277 elif test $ac_prog = install &&
7278 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7279 # program-specific install script used by HP pwplus--don't use.
7280 :
7281 else
85541719
DE
7282 rm -rf conftest.one conftest.two conftest.dir
7283 echo one > conftest.one
7284 echo two > conftest.two
7285 mkdir conftest.dir
7286 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7287 test -s conftest.one && test -s conftest.two &&
7288 test -s conftest.dir/conftest.one &&
7289 test -s conftest.dir/conftest.two
7290 then
7291 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7292 break 3
7293 fi
e28b3332
DJ
7294 fi
7295 fi
7296 done
7297 done
7298 ;;
7299esac
81ecdfbb
RW
7300
7301 done
7302IFS=$as_save_IFS
e28b3332 7303
85541719 7304rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7305
7306fi
7307 if test "${ac_cv_path_install+set}" = set; then
7308 INSTALL=$ac_cv_path_install
7309 else
85541719
DE
7310 # As a last resort, use the slow shell script. Don't cache a
7311 # value for INSTALL within a source directory, because that will
e28b3332 7312 # break other packages using the cache if that directory is
85541719 7313 # removed, or if the value is a relative name.
e28b3332
DJ
7314 INSTALL=$ac_install_sh
7315 fi
7316fi
81ecdfbb
RW
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7318$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7319
7320# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7321# It thinks the first close brace ends the variable substitution.
7322test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7323
7324test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7325
7326test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7327
81ecdfbb
RW
7328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7329$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7330# Just in case
7331sleep 1
7332echo timestamp > conftest.file
81ecdfbb
RW
7333# Reject unsafe characters in $srcdir or the absolute working directory
7334# name. Accept space and tab only in the latter.
7335am_lf='
7336'
7337case `pwd` in
7338 *[\\\"\#\$\&\'\`$am_lf]*)
7339 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7340esac
7341case $srcdir in
7342 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7343 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7344esac
7345
e28b3332
DJ
7346# Do `set' in a subshell so we don't clobber the current shell's
7347# arguments. Must try -L first in case configure is actually a
7348# symlink; some systems play weird games with the mod time of symlinks
7349# (eg FreeBSD returns the mod time of the symlink's containing
7350# directory).
7351if (
81ecdfbb 7352 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7353 if test "$*" = "X"; then
7354 # -L didn't work.
81ecdfbb 7355 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7356 fi
7357 rm -f conftest.file
7358 if test "$*" != "X $srcdir/configure conftest.file" \
7359 && test "$*" != "X conftest.file $srcdir/configure"; then
7360
7361 # If neither matched, then we have a broken ls. This can happen
7362 # if, for instance, CONFIG_SHELL is bash and it inherits a
7363 # broken ls alias from the environment. This has actually
7364 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7365 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7366alias in your environment" "$LINENO" 5
e28b3332
DJ
7367 fi
7368
7369 test "$2" = conftest.file
7370 )
7371then
7372 # Ok.
7373 :
7374else
81ecdfbb
RW
7375 as_fn_error "newly created file is older than distributed files!
7376Check your system clock" "$LINENO" 5
e28b3332 7377fi
81ecdfbb
RW
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7379$as_echo "yes" >&6; }
e28b3332 7380test "$program_prefix" != NONE &&
81ecdfbb 7381 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7382# Use a double $ so make ignores it.
7383test "$program_suffix" != NONE &&
81ecdfbb
RW
7384 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7385# Double any \ or $.
e28b3332 7386# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7387ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7388program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7389
7390# expand $ac_aux_dir to an absolute path
7391am_aux_dir=`cd $ac_aux_dir && pwd`
7392
81ecdfbb
RW
7393if test x"${MISSING+set}" != xset; then
7394 case $am_aux_dir in
7395 *\ * | *\ *)
7396 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7397 *)
7398 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7399 esac
7400fi
e28b3332
DJ
7401# Use eval to expand $SHELL
7402if eval "$MISSING --run true"; then
7403 am_missing_run="$MISSING --run "
7404else
7405 am_missing_run=
81ecdfbb
RW
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7407$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7408fi
7409
7410if test x"${install_sh}" != xset; then
7411 case $am_aux_dir in
7412 *\ * | *\ *)
7413 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7414 *)
7415 install_sh="\${SHELL} $am_aux_dir/install-sh"
7416 esac
7417fi
7418
7419# Installed binaries are usually stripped using `strip' when the user
7420# run `make install-strip'. However `strip' might not be the right
7421# tool to use in cross-compilation environments, therefore Automake
7422# will honor the `STRIP' environment variable to overrule this program.
7423if test "$cross_compiling" != no; then
7424 if test -n "$ac_tool_prefix"; then
7425 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7426set dummy ${ac_tool_prefix}strip; ac_word=$2
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428$as_echo_n "checking for $ac_word... " >&6; }
7429if test "${ac_cv_prog_STRIP+set}" = set; then :
7430 $as_echo_n "(cached) " >&6
7431else
7432 if test -n "$STRIP"; then
7433 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7434else
7435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436for as_dir in $PATH
7437do
7438 IFS=$as_save_IFS
7439 test -z "$as_dir" && as_dir=.
7440 for ac_exec_ext in '' $ac_executable_extensions; do
7441 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7442 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444 break 2
7445 fi
7446done
7447 done
7448IFS=$as_save_IFS
7449
7450fi
7451fi
7452STRIP=$ac_cv_prog_STRIP
7453if test -n "$STRIP"; then
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7455$as_echo "$STRIP" >&6; }
7456else
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7458$as_echo "no" >&6; }
7459fi
7460
7461
7462fi
7463if test -z "$ac_cv_prog_STRIP"; then
7464 ac_ct_STRIP=$STRIP
7465 # Extract the first word of "strip", so it can be a program name with args.
7466set dummy strip; ac_word=$2
7467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7468$as_echo_n "checking for $ac_word... " >&6; }
7469if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7470 $as_echo_n "(cached) " >&6
7471else
7472 if test -n "$ac_ct_STRIP"; then
7473 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7474else
7475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478 IFS=$as_save_IFS
7479 test -z "$as_dir" && as_dir=.
7480 for ac_exec_ext in '' $ac_executable_extensions; do
7481 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7482 ac_cv_prog_ac_ct_STRIP="strip"
7483 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484 break 2
7485 fi
7486done
7487 done
7488IFS=$as_save_IFS
7489
7490fi
7491fi
7492ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7493if test -n "$ac_ct_STRIP"; then
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7495$as_echo "$ac_ct_STRIP" >&6; }
7496else
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498$as_echo "no" >&6; }
7499fi
7500
7501 if test "x$ac_ct_STRIP" = x; then
7502 STRIP=":"
7503 else
7504 case $cross_compiling:$ac_tool_warned in
7505yes:)
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7508ac_tool_warned=yes ;;
7509esac
7510 STRIP=$ac_ct_STRIP
7511 fi
7512else
7513 STRIP="$ac_cv_prog_STRIP"
7514fi
7515
7516fi
7517INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7518
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7520$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7521if test -z "$MKDIR_P"; then
7522 if test "${ac_cv_path_mkdir+set}" = set; then :
7523 $as_echo_n "(cached) " >&6
7524else
7525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7527do
7528 IFS=$as_save_IFS
7529 test -z "$as_dir" && as_dir=.
7530 for ac_prog in mkdir gmkdir; do
7531 for ac_exec_ext in '' $ac_executable_extensions; do
7532 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7533 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7534 'mkdir (GNU coreutils) '* | \
7535 'mkdir (coreutils) '* | \
7536 'mkdir (fileutils) '4.1*)
7537 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7538 break 3;;
7539 esac
7540 done
7541 done
e28b3332 7542 done
81ecdfbb
RW
7543IFS=$as_save_IFS
7544
7545fi
7546
7547 if test "${ac_cv_path_mkdir+set}" = set; then
7548 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7549 else
81ecdfbb
RW
7550 # As a last resort, use the slow shell script. Don't cache a
7551 # value for MKDIR_P within a source directory, because that will
7552 # break other packages using the cache if that directory is
7553 # removed, or if the value is a relative name.
7554 test -d ./--version && rmdir ./--version
7555 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7556 fi
7557fi
81ecdfbb
RW
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7559$as_echo "$MKDIR_P" >&6; }
7560
f434ba03 7561
81ecdfbb
RW
7562mkdir_p="$MKDIR_P"
7563case $mkdir_p in
7564 [\\/$]* | ?:[\\/]*) ;;
7565 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7566esac
e28b3332
DJ
7567
7568for ac_prog in gawk mawk nawk awk
7569do
7570 # Extract the first word of "$ac_prog", so it can be a program name with args.
7571set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7573$as_echo_n "checking for $ac_word... " >&6; }
7574if test "${ac_cv_prog_AWK+set}" = set; then :
7575 $as_echo_n "(cached) " >&6
e28b3332
DJ
7576else
7577 if test -n "$AWK"; then
7578 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7579else
7580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7581for as_dir in $PATH
7582do
7583 IFS=$as_save_IFS
7584 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7585 for ac_exec_ext in '' $ac_executable_extensions; do
7586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7587 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7589 break 2
7590 fi
7591done
81ecdfbb
RW
7592 done
7593IFS=$as_save_IFS
e28b3332
DJ
7594
7595fi
7596fi
7597AWK=$ac_cv_prog_AWK
7598if test -n "$AWK"; then
81ecdfbb
RW
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7600$as_echo "$AWK" >&6; }
e28b3332 7601else
81ecdfbb
RW
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7603$as_echo "no" >&6; }
e28b3332
DJ
7604fi
7605
81ecdfbb 7606
e28b3332
DJ
7607 test -n "$AWK" && break
7608done
7609
81ecdfbb 7610ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7611
7612
7613am_make=${MAKE-make}
7614cat > confinc << 'END'
7615am__doit:
81ecdfbb 7616 @echo this is the am__doit target
e28b3332
DJ
7617.PHONY: am__doit
7618END
7619# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7621$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7622am__include="#"
7623am__quote=
7624_am_result=none
7625# First try GNU make style include.
7626echo "include confinc" > confmf
81ecdfbb
RW
7627# Ignore all kinds of additional output from `make'.
7628case `$am_make -s -f confmf 2> /dev/null` in #(
7629*the\ am__doit\ target*)
7630 am__include=include
7631 am__quote=
7632 _am_result=GNU
7633 ;;
7634esac
e28b3332
DJ
7635# Now try BSD make style include.
7636if test "$am__include" = "#"; then
7637 echo '.include "confinc"' > confmf
81ecdfbb
RW
7638 case `$am_make -s -f confmf 2> /dev/null` in #(
7639 *the\ am__doit\ target*)
7640 am__include=.include
7641 am__quote="\""
7642 _am_result=BSD
7643 ;;
7644 esac
e28b3332
DJ
7645fi
7646
7647
81ecdfbb
RW
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7649$as_echo "$_am_result" >&6; }
e28b3332
DJ
7650rm -f confinc confmf
7651
81ecdfbb
RW
7652# Check whether --enable-dependency-tracking was given.
7653if test "${enable_dependency_tracking+set}" = set; then :
7654 enableval=$enable_dependency_tracking;
7655fi
e28b3332 7656
e28b3332
DJ
7657if test "x$enable_dependency_tracking" != xno; then
7658 am_depcomp="$ac_aux_dir/depcomp"
7659 AMDEPBACKSLASH='\'
7660fi
81ecdfbb 7661 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7662 AMDEP_TRUE=
7663 AMDEP_FALSE='#'
7664else
7665 AMDEP_TRUE='#'
7666 AMDEP_FALSE=
7667fi
7668
7669
81ecdfbb
RW
7670if test "`cd $srcdir && pwd`" != "`pwd`"; then
7671 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7672 # is not polluted with repeated "-I."
7673 am__isrc=' -I$(srcdir)'
7674 # test to see if srcdir already configured
7675 if test -f $srcdir/config.status; then
7676 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7677 fi
e28b3332
DJ
7678fi
7679
7680# test whether we have cygpath
7681if test -z "$CYGPATH_W"; then
7682 if (cygpath --version) >/dev/null 2>/dev/null; then
7683 CYGPATH_W='cygpath -w'
7684 else
7685 CYGPATH_W=echo
7686 fi
7687fi
7688
7689
7690# Define the identity of the package.
7691 PACKAGE=gdb
7692 VERSION=UNUSED-VERSION
7693
7694
7695# Some tools Automake needs.
7696
7697ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7698
7699
7700AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7701
7702
7703AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7704
7705
7706AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7707
7708
7709MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7710
e28b3332
DJ
7711# We need awk for the "check" target. The system "awk" is bad on
7712# some platforms.
7713# Always define AMTAR for backward compatibility.
7714
7715AMTAR=${AMTAR-"${am_missing_run}tar"}
7716
7717am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7718
7719
7720
7721
7722depcc="$CC" am_compiler_list=
7723
81ecdfbb
RW
7724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7725$as_echo_n "checking dependency style of $depcc... " >&6; }
7726if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7727 $as_echo_n "(cached) " >&6
e28b3332
DJ
7728else
7729 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7730 # We make a subdir and do the tests there. Otherwise we can end up
7731 # making bogus files that we don't know about and never remove. For
7732 # instance it was reported that on HP-UX the gcc test will end up
7733 # making a dummy file named `D' -- because `-MD' means `put the output
7734 # in D'.
7735 mkdir conftest.dir
7736 # Copy depcomp to subdir because otherwise we won't find it if we're
7737 # using a relative directory.
7738 cp "$am_depcomp" conftest.dir
7739 cd conftest.dir
7740 # We will build objects and dependencies in a subdirectory because
7741 # it helps to detect inapplicable dependency modes. For instance
7742 # both Tru64's cc and ICC support -MD to output dependencies as a
7743 # side effect of compilation, but ICC will put the dependencies in
7744 # the current directory while Tru64 will put them in the object
7745 # directory.
7746 mkdir sub
7747
7748 am_cv_CC_dependencies_compiler_type=none
7749 if test "$am_compiler_list" = ""; then
7750 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7751 fi
81ecdfbb
RW
7752 am__universal=false
7753 case " $depcc " in #(
7754 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7755 esac
7756
e28b3332
DJ
7757 for depmode in $am_compiler_list; do
7758 # Setup a source with many dependencies, because some compilers
7759 # like to wrap large dependency lists on column 80 (with \), and
7760 # we should not choose a depcomp mode which is confused by this.
7761 #
7762 # We need to recreate these files for each test, as the compiler may
7763 # overwrite some of them when testing with obscure command lines.
7764 # This happens at least with the AIX C compiler.
7765 : > sub/conftest.c
7766 for i in 1 2 3 4 5 6; do
7767 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7768 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7769 # Solaris 8's {/usr,}/bin/sh.
7770 touch sub/conftst$i.h
7771 done
7772 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7773
81ecdfbb
RW
7774 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7775 # mode. It turns out that the SunPro C++ compiler does not properly
7776 # handle `-M -o', and we need to detect this. Also, some Intel
7777 # versions had trouble with output in subdirs
7778 am__obj=sub/conftest.${OBJEXT-o}
7779 am__minus_obj="-o $am__obj"
e28b3332 7780 case $depmode in
81ecdfbb
RW
7781 gcc)
7782 # This depmode causes a compiler race in universal mode.
7783 test "$am__universal" = false || continue
7784 ;;
e28b3332
DJ
7785 nosideeffect)
7786 # after this tag, mechanisms are not by side-effect, so they'll
7787 # only be used when explicitly requested
7788 if test "x$enable_dependency_tracking" = xyes; then
7789 continue
7790 else
7791 break
7792 fi
7793 ;;
81ecdfbb
RW
7794 msvisualcpp | msvcmsys)
7795 # This compiler won't grok `-c -o', but also, the minuso test has
7796 # not run yet. These depmodes are late enough in the game, and
7797 # so weak that their functioning should not be impacted.
7798 am__obj=conftest.${OBJEXT-o}
7799 am__minus_obj=
7800 ;;
e28b3332
DJ
7801 none) break ;;
7802 esac
e28b3332 7803 if depmode=$depmode \
81ecdfbb 7804 source=sub/conftest.c object=$am__obj \
e28b3332 7805 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7806 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7807 >/dev/null 2>conftest.err &&
81ecdfbb 7808 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7809 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7810 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7811 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7812 # icc doesn't choke on unknown options, it will just issue warnings
7813 # or remarks (even with -Werror). So we grep stderr for any message
7814 # that says an option was ignored or not supported.
7815 # When given -MP, icc 7.0 and 7.1 complain thusly:
7816 # icc: Command line warning: ignoring option '-M'; no argument required
7817 # The diagnosis changed in icc 8.0:
7818 # icc: Command line remark: option '-MP' not supported
7819 if (grep 'ignoring option' conftest.err ||
7820 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7821 am_cv_CC_dependencies_compiler_type=$depmode
7822 break
7823 fi
7824 fi
7825 done
7826
7827 cd ..
7828 rm -rf conftest.dir
7829else
7830 am_cv_CC_dependencies_compiler_type=none
7831fi
7832
7833fi
81ecdfbb
RW
7834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7835$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7836CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7837
81ecdfbb 7838 if
e28b3332
DJ
7839 test "x$enable_dependency_tracking" != xno \
7840 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7841 am__fastdepCC_TRUE=
7842 am__fastdepCC_FALSE='#'
7843else
7844 am__fastdepCC_TRUE='#'
7845 am__fastdepCC_FALSE=
7846fi
7847
7848
7849
7850
bec39cab
AC
7851
7852
81ecdfbb
RW
7853# Check whether --with-separate-debug-dir was given.
7854if test "${with_separate_debug_dir+set}" = set; then :
7855 withval=$with_separate_debug_dir;
b14b1491
TT
7856 DEBUGDIR=$withval
7857else
7858 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7859fi
7860
20e95c23 7861
783e057b
DJ
7862 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7863 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7864 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7865 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7866
783e057b
DJ
7867cat >>confdefs.h <<_ACEOF
7868#define DEBUGDIR "$ac_define_dir"
20e95c23 7869_ACEOF
20e95c23 7870
20e95c23 7871
20e95c23 7872
0c4a4063 7873
b14b1491
TT
7874 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7875 if test "x$prefix" = xNONE; then
7876 test_prefix=/usr/local
7877 else
7878 test_prefix=$prefix
7879 fi
783e057b 7880 else
b14b1491 7881 test_prefix=$exec_prefix
783e057b 7882 fi
b14b1491
TT
7883 value=0
7884 case ${ac_define_dir} in
7885 "${test_prefix}"|"${test_prefix}/"*|\
7886 '${exec_prefix}'|'${exec_prefix}/'*)
7887 value=1
7888 ;;
7889 esac
7890
7891cat >>confdefs.h <<_ACEOF
7892#define DEBUGDIR_RELOCATABLE $value
7893_ACEOF
7894
7895
7896
0c4a4063 7897
b14b1491
TT
7898# GDB's datadir relocation
7899
7900
7901
81ecdfbb
RW
7902# Check whether --with-gdb-datadir was given.
7903if test "${with_gdb_datadir+set}" = set; then :
7904 withval=$with_gdb_datadir;
b14b1491 7905 GDB_DATADIR=$withval
20e95c23 7906else
b14b1491 7907 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7908fi
7909
20e95c23 7910
b14b1491
TT
7911 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7912 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7913 ac_define_dir=`eval echo $GDB_DATADIR`
7914 ac_define_dir=`eval echo $ac_define_dir`
7915
7916cat >>confdefs.h <<_ACEOF
7917#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7918_ACEOF
7919
b14b1491
TT
7920
7921
0c4a4063 7922
b14b1491
TT
7923 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7924 if test "x$prefix" = xNONE; then
7925 test_prefix=/usr/local
7926 else
7927 test_prefix=$prefix
7928 fi
7929 else
7930 test_prefix=$exec_prefix
7931 fi
7932 value=0
7933 case ${ac_define_dir} in
7934 "${test_prefix}"|"${test_prefix}/"*|\
7935 '${exec_prefix}'|'${exec_prefix}/'*)
7936 value=1
7937 ;;
7938 esac
7939
7940cat >>confdefs.h <<_ACEOF
7941#define GDB_DATADIR_RELOCATABLE $value
7942_ACEOF
7943
7944
783e057b 7945
20e95c23 7946
0c4a4063 7947
81ecdfbb
RW
7948# Check whether --with-relocated-sources was given.
7949if test "${with_relocated_sources+set}" = set; then :
7950 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7951
7952 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7953 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7954 ac_define_dir=`eval echo $reloc_srcdir`
7955 ac_define_dir=`eval echo $ac_define_dir`
7956
7957cat >>confdefs.h <<_ACEOF
7958#define RELOC_SRCDIR "$ac_define_dir"
7959_ACEOF
7960
7961
7962
81ecdfbb
RW
7963fi
7964
29b0e8a2
JM
7965
7966
20e95c23 7967
5ae98d25 7968subdirs="$subdirs testsuite"
20e95c23
DJ
7969
7970
783e057b 7971# Check whether to support alternative target configurations
81ecdfbb
RW
7972# Check whether --enable-targets was given.
7973if test "${enable_targets+set}" = set; then :
7974 enableval=$enable_targets; case "${enableval}" in
7975 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7976 ;;
7977 no) enable_targets= ;;
7978 *) enable_targets=$enableval ;;
7979esac
81ecdfbb
RW
7980fi
7981
20e95c23 7982
783e057b 7983# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7984# Check whether --enable-64-bit-bfd was given.
7985if test "${enable_64_bit_bfd+set}" = set; then :
7986 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7987 yes) want64=true ;;
7988 no) want64=false ;;
81ecdfbb 7989 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7990esac
7991else
7992 want64=false
81ecdfbb
RW
7993fi
7994
783e057b
DJ
7995# Provide defaults for some variables set by the per-host and per-target
7996# configuration.
7997gdb_host_obs=posix-hdep.o
20e95c23 7998
783e057b
DJ
7999if test "${target}" = "${host}"; then
8000 gdb_native=yes
8001else
8002 gdb_native=no
8003fi
20e95c23 8004
783e057b 8005. $srcdir/configure.host
20e95c23 8006
783e057b 8007# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 8008
783e057b
DJ
8009TARGET_OBS=
8010all_targets=
20e95c23 8011
783e057b 8012for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 8013do
783e057b
DJ
8014 if test "$targ_alias" = "all"; then
8015 all_targets=true
8016 else
8017 # Canonicalize the secondary target names.
8018 result=`$ac_config_sub $targ_alias 2>/dev/null`
8019 if test -n "$result"; then
8020 targ=$result
8021 else
8022 targ=$targ_alias
8023 fi
20e95c23 8024
783e057b 8025 . ${srcdir}/configure.tgt
20e95c23 8026
bf307134
JB
8027 if test -z "${gdb_target_obs}"; then :
8028 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8029fi
8030
783e057b
DJ
8031 # Target-specific object files
8032 for i in ${gdb_target_obs}; do
8033 case " $TARGET_OBS " in
8034 *" ${i} "*) ;;
8035 *)
8036 TARGET_OBS="$TARGET_OBS ${i}"
8037 ;;
8038 esac
8039 done
20e95c23 8040
783e057b
DJ
8041 # Check whether this target needs 64-bit CORE_ADDR
8042 if test x${want64} = xfalse; then
8043 . ${srcdir}/../bfd/config.bfd
8044 fi
8045 fi
20e95c23
DJ
8046done
8047
783e057b
DJ
8048if test x${all_targets} = xtrue; then
8049
8050 # We want all 64-bit targets if we either:
8051 # - run on a 64-bit host or
8052 # - already require 64-bit support for some other target or
8053 # - the --enable-64-bit-bfd option was supplied
8054 # Otherwise we only support all 32-bit targets.
8055 #
8056 # NOTE: This test must be in sync with the corresponding
8057 # tests in BFD!
20e95c23 8058
783e057b 8059 if test x${want64} = xfalse; then
81ecdfbb
RW
8060 # The cast to long int works around a bug in the HP C Compiler
8061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8063# This bug is HP SR number 8606223364.
8064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8065$as_echo_n "checking size of long... " >&6; }
8066if test "${ac_cv_sizeof_long+set}" = set; then :
8067 $as_echo_n "(cached) " >&6
c0993dbe 8068else
81ecdfbb 8069 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8070
81ecdfbb
RW
8071else
8072 if test "$ac_cv_type_long" = yes; then
8073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8075{ as_fn_set_status 77
8076as_fn_error "cannot compute sizeof (long)
8077See \`config.log' for more details." "$LINENO" 5; }; }
8078 else
8079 ac_cv_sizeof_long=0
8080 fi
c0993dbe 8081fi
81ecdfbb 8082
c0993dbe 8083fi
81ecdfbb
RW
8084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8085$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8086
c0993dbe 8087
c0993dbe 8088
c0993dbe
UW
8089cat >>confdefs.h <<_ACEOF
8090#define SIZEOF_LONG $ac_cv_sizeof_long
8091_ACEOF
8092
8093
8094 if test "x${ac_cv_sizeof_long}" = "x8"; then
8095 want64=true
8096 fi
8097 fi
8098 if test x${want64} = xtrue; then
8099 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8100 else
8101 TARGET_OBS='$(ALL_TARGET_OBS)'
8102 fi
8103fi
8104
8105
8106
8107# For other settings, only the main target counts.
8108gdb_sim=
8109gdb_osabi=
8110build_gdbserver=
8111targ=$target; . ${srcdir}/configure.tgt
8112
8113# Fetch the default architecture and default target vector from BFD.
8114targ=$target; . $srcdir/../bfd/config.bfd
8115
8116# We only want the first architecture, so strip off the others if
8117# there is more than one.
8118targ_archs=`echo $targ_archs | sed 's/ .*//'`
8119
8120if test "x$targ_archs" != x; then
8121
8122cat >>confdefs.h <<_ACEOF
8123#define DEFAULT_BFD_ARCH $targ_archs
8124_ACEOF
8125
8126fi
8127if test "x$targ_defvec" != x; then
8128
8129cat >>confdefs.h <<_ACEOF
8130#define DEFAULT_BFD_VEC $targ_defvec
8131_ACEOF
8132
8133fi
8134
c0993dbe
UW
8135# The CLI cannot be disabled yet, but may be in the future.
8136
8137# Enable CLI.
81ecdfbb
RW
8138# Check whether --enable-gdbcli was given.
8139if test "${enable_gdbcli+set}" = set; then :
8140 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8141 yes)
8142 ;;
8143 no)
81ecdfbb 8144 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8145 *)
81ecdfbb 8146 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8147 esac
8148else
8149 enable_gdbcli=yes
81ecdfbb
RW
8150fi
8151
c0993dbe
UW
8152if test x"$enable_gdbcli" = xyes; then
8153 if test -d $srcdir/cli; then
8154 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8155 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8156 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8157 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8158 fi
8159fi
8160
8161# Enable MI.
81ecdfbb
RW
8162# Check whether --enable-gdbmi was given.
8163if test "${enable_gdbmi+set}" = set; then :
8164 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8165 yes | no)
8166 ;;
8167 *)
81ecdfbb 8168 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8169 esac
8170else
8171 enable_gdbmi=yes
81ecdfbb
RW
8172fi
8173
c0993dbe
UW
8174if test x"$enable_gdbmi" = xyes; then
8175 if test -d $srcdir/mi; then
8176 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8177 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8178 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8179 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8180 fi
8181fi
8182
8183# Enable TUI.
81ecdfbb
RW
8184# Check whether --enable-tui was given.
8185if test "${enable_tui+set}" = set; then :
8186 enableval=$enable_tui; case $enableval in
3ca64bd3 8187 yes | no | auto)
c0993dbe
UW
8188 ;;
8189 *)
81ecdfbb 8190 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8191 esac
8192else
3ca64bd3 8193 enable_tui=auto
81ecdfbb
RW
8194fi
8195
c0993dbe
UW
8196
8197# Enable gdbtk.
81ecdfbb
RW
8198# Check whether --enable-gdbtk was given.
8199if test "${enable_gdbtk+set}" = set; then :
8200 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8201 yes | no)
8202 ;;
8203 *)
81ecdfbb 8204 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8205 esac
8206else
5062cc19 8207 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8208 enable_gdbtk=yes
8209 else
8210 enable_gdbtk=no
8211 fi
81ecdfbb
RW
8212fi
8213
c0993dbe
UW
8214# We unconditionally disable gdbtk tests on selected platforms.
8215case $host_os in
8216 go32* | windows*)
81ecdfbb
RW
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8218$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8219 enable_gdbtk=no ;;
8220esac
8221
8222# Libunwind support.
bec39cab 8223
81ecdfbb
RW
8224# Check whether --with-libunwind was given.
8225if test "${with_libunwind+set}" = set; then :
8226 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8227 yes) enable_libunwind=yes ;;
8228 no) enable_libunwind=no ;;
81ecdfbb 8229 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8230esac
bec39cab 8231else
bec39cab 8232
81ecdfbb
RW
8233 for ac_header in libunwind.h libunwind-ia64.h
8234do :
8235 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8236ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8237eval as_val=\$$as_ac_Header
8238 if test "x$as_val" = x""yes; then :
bec39cab 8239 cat >>confdefs.h <<_ACEOF
81ecdfbb 8240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8241_ACEOF
8242
8243fi
8244
8245done
8246
a9322a30
TT
8247 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8248 enable_libunwind=yes;
8249 fi
8250
bec39cab 8251fi
bec39cab 8252
bec39cab 8253
81ecdfbb
RW
8254if test x"$enable_libunwind" = xyes; then
8255 for ac_header in libunwind.h libunwind-ia64.h
8256do :
8257 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8258ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8259eval as_val=\$$as_ac_Header
8260 if test "x$as_val" = x""yes; then :
bec39cab 8261 cat >>confdefs.h <<_ACEOF
81ecdfbb 8262#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8263_ACEOF
8264
8265fi
8266
8267done
8268
bec39cab 8269
81ecdfbb 8270$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8271
8272 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8273 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8274 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8275fi
8276
cb01cfba
JB
8277opt_curses=no
8278
81ecdfbb
RW
8279# Check whether --with-curses was given.
8280if test "${with_curses+set}" = set; then :
8281 withval=$with_curses; opt_curses=$withval
8282fi
8283
cb01cfba 8284
76a39ba7 8285prefer_curses=no
cb01cfba 8286if test "$opt_curses" = "yes"; then
76a39ba7 8287 prefer_curses=yes
cb01cfba
JB
8288fi
8289
a9322a30 8290# Profiling support.
81ecdfbb
RW
8291# Check whether --enable-profiling was given.
8292if test "${enable_profiling+set}" = set; then :
8293 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8294 yes | no)
8295 ;;
8296 *)
81ecdfbb 8297 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8298 esac
8299else
8300 enable_profiling=no
81ecdfbb 8301fi
bec39cab 8302
a9322a30
TT
8303
8304for ac_func in monstartup _mcleanup
81ecdfbb
RW
8305do :
8306 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8307ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8308eval as_val=\$$as_ac_var
8309 if test "x$as_val" = x""yes; then :
8310 cat >>confdefs.h <<_ACEOF
8311#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8312_ACEOF
a9322a30 8313
81ecdfbb
RW
8314fi
8315done
a9322a30 8316
81ecdfbb
RW
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8318$as_echo_n "checking for _etext... " >&6; }
8319if test "${ac_cv_var__etext+set}" = set; then :
8320 $as_echo_n "(cached) " >&6
8321else
8322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323/* end confdefs.h. */
8324#include <stdlib.h>
8325extern char _etext;
a9322a30
TT
8326
8327int
8328main ()
8329{
8330free (&_etext);
8331 ;
8332 return 0;
8333}
bec39cab 8334_ACEOF
81ecdfbb 8335if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8336 ac_cv_var__etext=yes
bec39cab 8337else
81ecdfbb 8338 ac_cv_var__etext=no
bec39cab 8339fi
81ecdfbb
RW
8340rm -f core conftest.err conftest.$ac_objext \
8341 conftest$ac_exeext conftest.$ac_ext
bec39cab 8342fi
81ecdfbb
RW
8343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8344$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8345if test $ac_cv_var__etext = yes; then
60ca704f 8346
81ecdfbb 8347$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8348
bec39cab 8349fi
81ecdfbb
RW
8350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8351$as_echo_n "checking for etext... " >&6; }
8352if test "${ac_cv_var_etext+set}" = set; then :
8353 $as_echo_n "(cached) " >&6
bec39cab 8354else
81ecdfbb 8355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8356/* end confdefs.h. */
a9322a30
TT
8357#include <stdlib.h>
8358extern char etext;
bec39cab
AC
8359
8360int
8361main ()
8362{
a9322a30 8363free (&etext);
bec39cab
AC
8364 ;
8365 return 0;
8366}
8367_ACEOF
81ecdfbb 8368if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8369 ac_cv_var_etext=yes
bec39cab 8370else
81ecdfbb 8371 ac_cv_var_etext=no
bec39cab 8372fi
81ecdfbb
RW
8373rm -f core conftest.err conftest.$ac_objext \
8374 conftest$ac_exeext conftest.$ac_ext
bec39cab 8375fi
81ecdfbb
RW
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8377$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8378if test $ac_cv_var_etext = yes; then
8379
81ecdfbb 8380$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8381
8382fi
a9322a30
TT
8383if test "$enable_profiling" = yes ; then
8384 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8385 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8386 fi
8387 PROFILE_CFLAGS=-pg
8388 OLD_CFLAGS="$CFLAGS"
8389 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8390
81ecdfbb
RW
8391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8392$as_echo_n "checking whether $CC supports -pg... " >&6; }
8393if test "${ac_cv_cc_supports_pg+set}" = set; then :
8394 $as_echo_n "(cached) " >&6
bec39cab 8395else
81ecdfbb 8396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8397/* end confdefs.h. */
bec39cab
AC
8398
8399int
8400main ()
8401{
a9322a30 8402int x;
bec39cab
AC
8403 ;
8404 return 0;
8405}
8406_ACEOF
81ecdfbb 8407if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8408 ac_cv_cc_supports_pg=yes
bec39cab 8409else
81ecdfbb 8410 ac_cv_cc_supports_pg=no
bec39cab 8411fi
81ecdfbb 8412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8413fi
81ecdfbb
RW
8414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8415$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8416
a9322a30 8417 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8418 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8419 fi
bec39cab 8420
a9322a30 8421 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8422fi
8423
c16158bc
JM
8424
8425
81ecdfbb
RW
8426# Check whether --with-pkgversion was given.
8427if test "${with_pkgversion+set}" = set; then :
8428 withval=$with_pkgversion; case "$withval" in
8429 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8430 no) PKGVERSION= ;;
8431 *) PKGVERSION="($withval) " ;;
8432 esac
8433else
8434 PKGVERSION="(GDB) "
8435
81ecdfbb 8436fi
c16158bc
JM
8437
8438
8439
8440
81ecdfbb
RW
8441
8442# Check whether --with-bugurl was given.
8443if test "${with_bugurl+set}" = set; then :
8444 withval=$with_bugurl; case "$withval" in
8445 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8446 no) BUGURL=
8447 ;;
8448 *) BUGURL="$withval"
8449 ;;
8450 esac
8451else
8452 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8453
81ecdfbb
RW
8454fi
8455
c16158bc
JM
8456 case ${BUGURL} in
8457 "")
8458 REPORT_BUGS_TO=
8459 REPORT_BUGS_TEXI=
8460 ;;
8461 *)
8462 REPORT_BUGS_TO="<$BUGURL>"
8463 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8464 ;;
8465 esac;
8466
8467
8468
8469
8470cat >>confdefs.h <<_ACEOF
8471#define PKGVERSION "$PKGVERSION"
8472_ACEOF
8473
8474
8475cat >>confdefs.h <<_ACEOF
8476#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8477_ACEOF
8478
8479
bec39cab
AC
8480# --------------------- #
8481# Checks for programs. #
8482# --------------------- #
8483
8484for ac_prog in gawk mawk nawk awk
8485do
8486 # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if test "${ac_cv_prog_AWK+set}" = set; then :
8491 $as_echo_n "(cached) " >&6
bec39cab
AC
8492else
8493 if test -n "$AWK"; then
8494 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8495else
8496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8497for as_dir in $PATH
8498do
8499 IFS=$as_save_IFS
8500 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8501 for ac_exec_ext in '' $ac_executable_extensions; do
8502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8503 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8505 break 2
8506 fi
8507done
81ecdfbb
RW
8508 done
8509IFS=$as_save_IFS
bec39cab
AC
8510
8511fi
8512fi
8513AWK=$ac_cv_prog_AWK
8514if test -n "$AWK"; then
81ecdfbb
RW
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8516$as_echo "$AWK" >&6; }
bec39cab 8517else
81ecdfbb
RW
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
bec39cab
AC
8520fi
8521
bec39cab 8522
81ecdfbb 8523 test -n "$AWK" && break
bec39cab
AC
8524done
8525
bec39cab 8526
81ecdfbb
RW
8527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8528$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8529LN_S=$as_ln_s
8530if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8532$as_echo "yes" >&6; }
bec39cab 8533else
81ecdfbb
RW
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8535$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8536fi
8537
8538if test -n "$ac_tool_prefix"; then
8539 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8540set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if test "${ac_cv_prog_RANLIB+set}" = set; then :
8544 $as_echo_n "(cached) " >&6
bec39cab
AC
8545else
8546 if test -n "$RANLIB"; then
8547 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8548else
8549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552 IFS=$as_save_IFS
8553 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8554 for ac_exec_ext in '' $ac_executable_extensions; do
8555 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8556 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8558 break 2
8559 fi
8560done
81ecdfbb
RW
8561 done
8562IFS=$as_save_IFS
bec39cab
AC
8563
8564fi
8565fi
8566RANLIB=$ac_cv_prog_RANLIB
8567if test -n "$RANLIB"; then
81ecdfbb
RW
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8569$as_echo "$RANLIB" >&6; }
bec39cab 8570else
81ecdfbb
RW
8571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8572$as_echo "no" >&6; }
bec39cab
AC
8573fi
8574
81ecdfbb 8575
bec39cab
AC
8576fi
8577if test -z "$ac_cv_prog_RANLIB"; then
8578 ac_ct_RANLIB=$RANLIB
8579 # Extract the first word of "ranlib", so it can be a program name with args.
8580set dummy ranlib; ac_word=$2
81ecdfbb
RW
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8582$as_echo_n "checking for $ac_word... " >&6; }
8583if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8584 $as_echo_n "(cached) " >&6
bec39cab
AC
8585else
8586 if test -n "$ac_ct_RANLIB"; then
8587 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8588else
8589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590for as_dir in $PATH
8591do
8592 IFS=$as_save_IFS
8593 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8594 for ac_exec_ext in '' $ac_executable_extensions; do
8595 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8596 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8598 break 2
8599 fi
8600done
81ecdfbb
RW
8601 done
8602IFS=$as_save_IFS
bec39cab 8603
bec39cab
AC
8604fi
8605fi
8606ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8607if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8609$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8610else
81ecdfbb
RW
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
bec39cab
AC
8613fi
8614
81ecdfbb
RW
8615 if test "x$ac_ct_RANLIB" = x; then
8616 RANLIB=":"
8617 else
8618 case $cross_compiling:$ac_tool_warned in
8619yes:)
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8622ac_tool_warned=yes ;;
8623esac
8624 RANLIB=$ac_ct_RANLIB
8625 fi
bec39cab
AC
8626else
8627 RANLIB="$ac_cv_prog_RANLIB"
8628fi
8629
8630for ac_prog in 'bison -y' byacc
8631do
8632 # Extract the first word of "$ac_prog", so it can be a program name with args.
8633set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if test "${ac_cv_prog_YACC+set}" = set; then :
8637 $as_echo_n "(cached) " >&6
bec39cab
AC
8638else
8639 if test -n "$YACC"; then
8640 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8641else
8642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645 IFS=$as_save_IFS
8646 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8647 for ac_exec_ext in '' $ac_executable_extensions; do
8648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8649 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8651 break 2
8652 fi
8653done
81ecdfbb
RW
8654 done
8655IFS=$as_save_IFS
bec39cab
AC
8656
8657fi
8658fi
8659YACC=$ac_cv_prog_YACC
8660if test -n "$YACC"; then
81ecdfbb
RW
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8662$as_echo "$YACC" >&6; }
bec39cab 8663else
81ecdfbb
RW
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8665$as_echo "no" >&6; }
bec39cab
AC
8666fi
8667
81ecdfbb 8668
bec39cab
AC
8669 test -n "$YACC" && break
8670done
8671test -n "$YACC" || YACC="yacc"
8672
8673
8674if test -n "$ac_tool_prefix"; then
8675 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8676set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if test "${ac_cv_prog_AR+set}" = set; then :
8680 $as_echo_n "(cached) " >&6
bec39cab
AC
8681else
8682 if test -n "$AR"; then
8683 ac_cv_prog_AR="$AR" # Let the user override the test.
8684else
8685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688 IFS=$as_save_IFS
8689 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8690 for ac_exec_ext in '' $ac_executable_extensions; do
8691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8692 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8694 break 2
8695 fi
8696done
81ecdfbb
RW
8697 done
8698IFS=$as_save_IFS
bec39cab
AC
8699
8700fi
8701fi
8702AR=$ac_cv_prog_AR
8703if test -n "$AR"; then
81ecdfbb
RW
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8705$as_echo "$AR" >&6; }
bec39cab 8706else
81ecdfbb
RW
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
bec39cab
AC
8709fi
8710
81ecdfbb 8711
bec39cab
AC
8712fi
8713if test -z "$ac_cv_prog_AR"; then
8714 ac_ct_AR=$AR
8715 # Extract the first word of "ar", so it can be a program name with args.
8716set dummy ar; ac_word=$2
81ecdfbb
RW
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718$as_echo_n "checking for $ac_word... " >&6; }
8719if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8720 $as_echo_n "(cached) " >&6
bec39cab
AC
8721else
8722 if test -n "$ac_ct_AR"; then
8723 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8724else
8725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8726for as_dir in $PATH
8727do
8728 IFS=$as_save_IFS
8729 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8730 for ac_exec_ext in '' $ac_executable_extensions; do
8731 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8732 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8734 break 2
8735 fi
8736done
81ecdfbb
RW
8737 done
8738IFS=$as_save_IFS
bec39cab
AC
8739
8740fi
8741fi
8742ac_ct_AR=$ac_cv_prog_ac_ct_AR
8743if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8745$as_echo "$ac_ct_AR" >&6; }
bec39cab 8746else
81ecdfbb
RW
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748$as_echo "no" >&6; }
bec39cab
AC
8749fi
8750
81ecdfbb
RW
8751 if test "x$ac_ct_AR" = x; then
8752 AR=""
8753 else
8754 case $cross_compiling:$ac_tool_warned in
8755yes:)
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8758ac_tool_warned=yes ;;
8759esac
8760 AR=$ac_ct_AR
8761 fi
bec39cab
AC
8762else
8763 AR="$ac_cv_prog_AR"
8764fi
8765
8766if test -n "$ac_tool_prefix"; then
8767 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8768set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8772 $as_echo_n "(cached) " >&6
bec39cab
AC
8773else
8774 if test -n "$DLLTOOL"; then
8775 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8776else
8777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8778for as_dir in $PATH
8779do
8780 IFS=$as_save_IFS
8781 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8782 for ac_exec_ext in '' $ac_executable_extensions; do
8783 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8784 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8786 break 2
8787 fi
8788done
81ecdfbb
RW
8789 done
8790IFS=$as_save_IFS
bec39cab
AC
8791
8792fi
8793fi
8794DLLTOOL=$ac_cv_prog_DLLTOOL
8795if test -n "$DLLTOOL"; then
81ecdfbb
RW
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8797$as_echo "$DLLTOOL" >&6; }
bec39cab 8798else
81ecdfbb
RW
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800$as_echo "no" >&6; }
bec39cab
AC
8801fi
8802
81ecdfbb 8803
bec39cab
AC
8804fi
8805if test -z "$ac_cv_prog_DLLTOOL"; then
8806 ac_ct_DLLTOOL=$DLLTOOL
8807 # Extract the first word of "dlltool", so it can be a program name with args.
8808set dummy dlltool; ac_word=$2
81ecdfbb
RW
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8810$as_echo_n "checking for $ac_word... " >&6; }
8811if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8812 $as_echo_n "(cached) " >&6
bec39cab
AC
8813else
8814 if test -n "$ac_ct_DLLTOOL"; then
8815 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8816else
8817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8818for as_dir in $PATH
8819do
8820 IFS=$as_save_IFS
8821 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8822 for ac_exec_ext in '' $ac_executable_extensions; do
8823 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8824 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8826 break 2
8827 fi
8828done
81ecdfbb
RW
8829 done
8830IFS=$as_save_IFS
bec39cab
AC
8831
8832fi
8833fi
8834ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8835if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8837$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8838else
81ecdfbb
RW
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8840$as_echo "no" >&6; }
bec39cab
AC
8841fi
8842
81ecdfbb
RW
8843 if test "x$ac_ct_DLLTOOL" = x; then
8844 DLLTOOL=""
8845 else
8846 case $cross_compiling:$ac_tool_warned in
8847yes:)
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8850ac_tool_warned=yes ;;
8851esac
8852 DLLTOOL=$ac_ct_DLLTOOL
8853 fi
bec39cab
AC
8854else
8855 DLLTOOL="$ac_cv_prog_DLLTOOL"
8856fi
8857
8858if test -n "$ac_tool_prefix"; then
8859 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8860set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862$as_echo_n "checking for $ac_word... " >&6; }
8863if test "${ac_cv_prog_WINDRES+set}" = set; then :
8864 $as_echo_n "(cached) " >&6
bec39cab
AC
8865else
8866 if test -n "$WINDRES"; then
8867 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8868else
8869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872 IFS=$as_save_IFS
8873 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8874 for ac_exec_ext in '' $ac_executable_extensions; do
8875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8876 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8878 break 2
8879 fi
8880done
81ecdfbb
RW
8881 done
8882IFS=$as_save_IFS
bec39cab
AC
8883
8884fi
8885fi
8886WINDRES=$ac_cv_prog_WINDRES
8887if test -n "$WINDRES"; then
81ecdfbb
RW
8888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8889$as_echo "$WINDRES" >&6; }
bec39cab 8890else
81ecdfbb
RW
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8892$as_echo "no" >&6; }
bec39cab
AC
8893fi
8894
81ecdfbb 8895
bec39cab
AC
8896fi
8897if test -z "$ac_cv_prog_WINDRES"; then
8898 ac_ct_WINDRES=$WINDRES
8899 # Extract the first word of "windres", so it can be a program name with args.
8900set dummy windres; ac_word=$2
81ecdfbb
RW
8901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8902$as_echo_n "checking for $ac_word... " >&6; }
8903if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8904 $as_echo_n "(cached) " >&6
bec39cab
AC
8905else
8906 if test -n "$ac_ct_WINDRES"; then
8907 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8908else
8909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8910for as_dir in $PATH
8911do
8912 IFS=$as_save_IFS
8913 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8914 for ac_exec_ext in '' $ac_executable_extensions; do
8915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8916 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8918 break 2
8919 fi
8920done
81ecdfbb
RW
8921 done
8922IFS=$as_save_IFS
bec39cab
AC
8923
8924fi
8925fi
8926ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8927if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8929$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8930else
81ecdfbb
RW
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
c906108c 8933fi
bec39cab 8934
81ecdfbb
RW
8935 if test "x$ac_ct_WINDRES" = x; then
8936 WINDRES=""
8937 else
8938 case $cross_compiling:$ac_tool_warned in
8939yes:)
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8942ac_tool_warned=yes ;;
8943esac
8944 WINDRES=$ac_ct_WINDRES
8945 fi
c906108c 8946else
bec39cab 8947 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8948fi
8949
bec39cab
AC
8950
8951# Needed for GNU/Hurd.
8952if test -n "$ac_tool_prefix"; then
8953 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8954set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8956$as_echo_n "checking for $ac_word... " >&6; }
8957if test "${ac_cv_prog_MIG+set}" = set; then :
8958 $as_echo_n "(cached) " >&6
c906108c 8959else
bec39cab
AC
8960 if test -n "$MIG"; then
8961 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8962else
8963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8964for as_dir in $PATH
8965do
8966 IFS=$as_save_IFS
8967 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8968 for ac_exec_ext in '' $ac_executable_extensions; do
8969 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8970 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8972 break 2
8973 fi
8974done
81ecdfbb
RW
8975 done
8976IFS=$as_save_IFS
bec39cab 8977
c906108c 8978fi
bec39cab
AC
8979fi
8980MIG=$ac_cv_prog_MIG
8981if test -n "$MIG"; then
81ecdfbb
RW
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8983$as_echo "$MIG" >&6; }
c906108c 8984else
81ecdfbb
RW
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
c906108c
SS
8987fi
8988
81ecdfbb 8989
bec39cab
AC
8990fi
8991if test -z "$ac_cv_prog_MIG"; then
8992 ac_ct_MIG=$MIG
8993 # Extract the first word of "mig", so it can be a program name with args.
8994set dummy mig; ac_word=$2
81ecdfbb
RW
8995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8996$as_echo_n "checking for $ac_word... " >&6; }
8997if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8998 $as_echo_n "(cached) " >&6
bec39cab
AC
8999else
9000 if test -n "$ac_ct_MIG"; then
9001 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9002else
9003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9004for as_dir in $PATH
9005do
9006 IFS=$as_save_IFS
9007 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9008 for ac_exec_ext in '' $ac_executable_extensions; do
9009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9010 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 9011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9012 break 2
9013 fi
9014done
81ecdfbb
RW
9015 done
9016IFS=$as_save_IFS
c906108c 9017
bec39cab
AC
9018fi
9019fi
9020ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9021if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9023$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9024else
81ecdfbb
RW
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9026$as_echo "no" >&6; }
bec39cab 9027fi
c906108c 9028
81ecdfbb
RW
9029 if test "x$ac_ct_MIG" = x; then
9030 MIG=""
9031 else
9032 case $cross_compiling:$ac_tool_warned in
9033yes:)
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9036ac_tool_warned=yes ;;
9037esac
9038 MIG=$ac_ct_MIG
9039 fi
bec39cab
AC
9040else
9041 MIG="$ac_cv_prog_MIG"
9042fi
c906108c 9043
c906108c 9044
bec39cab
AC
9045# ---------------------- #
9046# Checks for libraries. #
9047# ---------------------- #
c906108c 9048
bec39cab 9049# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9051$as_echo_n "checking for main in -lm... " >&6; }
9052if test "${ac_cv_lib_m_main+set}" = set; then :
9053 $as_echo_n "(cached) " >&6
bec39cab
AC
9054else
9055 ac_check_lib_save_LIBS=$LIBS
9056LIBS="-lm $LIBS"
81ecdfbb 9057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9058/* end confdefs.h. */
c906108c 9059
c906108c 9060
bec39cab
AC
9061int
9062main ()
9063{
81ecdfbb 9064return main ();
bec39cab
AC
9065 ;
9066 return 0;
9067}
9068_ACEOF
81ecdfbb 9069if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9070 ac_cv_lib_m_main=yes
9071else
81ecdfbb 9072 ac_cv_lib_m_main=no
bec39cab 9073fi
81ecdfbb
RW
9074rm -f core conftest.err conftest.$ac_objext \
9075 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9076LIBS=$ac_check_lib_save_LIBS
9077fi
81ecdfbb
RW
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9079$as_echo "$ac_cv_lib_m_main" >&6; }
9080if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9081 cat >>confdefs.h <<_ACEOF
9082#define HAVE_LIBM 1
9083_ACEOF
9084
9085 LIBS="-lm $LIBS"
c906108c 9086
c906108c 9087fi
bec39cab
AC
9088
9089
9090# We need to link with -lw to get `wctype' on Solaris before Solaris
9091# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9092# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9093# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9094ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9095if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9096
c906108c 9097else
81ecdfbb
RW
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9099$as_echo_n "checking for wctype in -lw... " >&6; }
9100if test "${ac_cv_lib_w_wctype+set}" = set; then :
9101 $as_echo_n "(cached) " >&6
bec39cab
AC
9102else
9103 ac_check_lib_save_LIBS=$LIBS
9104LIBS="-lw $LIBS"
81ecdfbb 9105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9106/* end confdefs.h. */
c906108c 9107
81ecdfbb
RW
9108/* Override any GCC internal prototype to avoid an error.
9109 Use char because int might match the return type of a GCC
9110 builtin and then its argument prototype would still apply. */
bec39cab
AC
9111#ifdef __cplusplus
9112extern "C"
9113#endif
bec39cab
AC
9114char wctype ();
9115int
9116main ()
9117{
81ecdfbb 9118return wctype ();
bec39cab
AC
9119 ;
9120 return 0;
9121}
9122_ACEOF
81ecdfbb 9123if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9124 ac_cv_lib_w_wctype=yes
9125else
81ecdfbb 9126 ac_cv_lib_w_wctype=no
bec39cab 9127fi
81ecdfbb
RW
9128rm -f core conftest.err conftest.$ac_objext \
9129 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9130LIBS=$ac_check_lib_save_LIBS
9131fi
81ecdfbb
RW
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9133$as_echo "$ac_cv_lib_w_wctype" >&6; }
9134if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9135 cat >>confdefs.h <<_ACEOF
9136#define HAVE_LIBW 1
9137_ACEOF
c906108c 9138
bec39cab 9139 LIBS="-lw $LIBS"
c906108c 9140
bec39cab 9141fi
c906108c 9142
bec39cab 9143fi
c906108c 9144
ddc9cd0f 9145
bec39cab 9146# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9148$as_echo_n "checking for library containing gethostbyname... " >&6; }
9149if test "${ac_cv_search_gethostbyname+set}" = set; then :
9150 $as_echo_n "(cached) " >&6
bec39cab
AC
9151else
9152 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9154/* end confdefs.h. */
ddc9cd0f 9155
81ecdfbb
RW
9156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
bec39cab
AC
9159#ifdef __cplusplus
9160extern "C"
9161#endif
bec39cab
AC
9162char gethostbyname ();
9163int
9164main ()
9165{
81ecdfbb 9166return gethostbyname ();
bec39cab
AC
9167 ;
9168 return 0;
9169}
9170_ACEOF
81ecdfbb
RW
9171for ac_lib in '' nsl; do
9172 if test -z "$ac_lib"; then
9173 ac_res="none required"
9174 else
9175 ac_res=-l$ac_lib
b4e70030 9176 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9177 fi
9178 if ac_fn_c_try_link "$LINENO"; then :
9179 ac_cv_search_gethostbyname=$ac_res
9180fi
9181rm -f core conftest.err conftest.$ac_objext \
9182 conftest$ac_exeext
9183 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9184 break
9185fi
9186done
9187if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9188
bec39cab 9189else
81ecdfbb 9190 ac_cv_search_gethostbyname=no
bec39cab 9191fi
81ecdfbb 9192rm conftest.$ac_ext
bec39cab
AC
9193LIBS=$ac_func_search_save_LIBS
9194fi
81ecdfbb
RW
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9196$as_echo "$ac_cv_search_gethostbyname" >&6; }
9197ac_res=$ac_cv_search_gethostbyname
9198if test "$ac_res" != no; then :
9199 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9200
bec39cab 9201fi
96baa820 9202
c906108c 9203
b4e70030 9204# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9206$as_echo_n "checking for library containing socketpair... " >&6; }
9207if test "${ac_cv_search_socketpair+set}" = set; then :
9208 $as_echo_n "(cached) " >&6
b4e70030
JB
9209else
9210 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9212/* end confdefs.h. */
9213
81ecdfbb
RW
9214/* Override any GCC internal prototype to avoid an error.
9215 Use char because int might match the return type of a GCC
9216 builtin and then its argument prototype would still apply. */
b4e70030
JB
9217#ifdef __cplusplus
9218extern "C"
9219#endif
b4e70030
JB
9220char socketpair ();
9221int
9222main ()
9223{
81ecdfbb 9224return socketpair ();
b4e70030
JB
9225 ;
9226 return 0;
9227}
9228_ACEOF
81ecdfbb
RW
9229for ac_lib in '' socket; do
9230 if test -z "$ac_lib"; then
9231 ac_res="none required"
9232 else
9233 ac_res=-l$ac_lib
b4e70030 9234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9235 fi
9236 if ac_fn_c_try_link "$LINENO"; then :
9237 ac_cv_search_socketpair=$ac_res
9238fi
9239rm -f core conftest.err conftest.$ac_objext \
9240 conftest$ac_exeext
9241 if test "${ac_cv_search_socketpair+set}" = set; then :
9242 break
9243fi
9244done
9245if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9246
b4e70030 9247else
81ecdfbb 9248 ac_cv_search_socketpair=no
b4e70030 9249fi
81ecdfbb 9250rm conftest.$ac_ext
b4e70030
JB
9251LIBS=$ac_func_search_save_LIBS
9252fi
81ecdfbb
RW
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9254$as_echo "$ac_cv_search_socketpair" >&6; }
9255ac_res=$ac_cv_search_socketpair
9256if test "$ac_res" != no; then :
9257 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9258
9259fi
9260
9261
233a11ab 9262# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9263
9264 # See if the user specified whether he wants zlib support or not.
9265
9266# Check whether --with-zlib was given.
9267if test "${with_zlib+set}" = set; then :
9268 withval=$with_zlib;
9269else
9270 with_zlib=auto
9271fi
9272
9273
9274 if test "$with_zlib" != "no"; then
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9276$as_echo_n "checking for library containing zlibVersion... " >&6; }
9277if test "${ac_cv_search_zlibVersion+set}" = set; then :
9278 $as_echo_n "(cached) " >&6
233a11ab
CS
9279else
9280 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9282/* end confdefs.h. */
9283
81ecdfbb
RW
9284/* Override any GCC internal prototype to avoid an error.
9285 Use char because int might match the return type of a GCC
233a11ab 9286 builtin and then its argument prototype would still apply. */
233a11ab
CS
9287#ifdef __cplusplus
9288extern "C"
9289#endif
233a11ab
CS
9290char zlibVersion ();
9291int
9292main ()
9293{
81ecdfbb 9294return zlibVersion ();
233a11ab
CS
9295 ;
9296 return 0;
9297}
9298_ACEOF
81ecdfbb
RW
9299for ac_lib in '' z; do
9300 if test -z "$ac_lib"; then
9301 ac_res="none required"
233a11ab 9302 else
81ecdfbb
RW
9303 ac_res=-l$ac_lib
9304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9305 fi
81ecdfbb
RW
9306 if ac_fn_c_try_link "$LINENO"; then :
9307 ac_cv_search_zlibVersion=$ac_res
233a11ab 9308fi
81ecdfbb
RW
9309rm -f core conftest.err conftest.$ac_objext \
9310 conftest$ac_exeext
9311 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9312 break
233a11ab 9313fi
81ecdfbb
RW
9314done
9315if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9316
233a11ab 9317else
81ecdfbb 9318 ac_cv_search_zlibVersion=no
233a11ab 9319fi
81ecdfbb
RW
9320rm conftest.$ac_ext
9321LIBS=$ac_func_search_save_LIBS
233a11ab 9322fi
81ecdfbb
RW
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9324$as_echo "$ac_cv_search_zlibVersion" >&6; }
9325ac_res=$ac_cv_search_zlibVersion
9326if test "$ac_res" != no; then :
9327 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9328 for ac_header in zlib.h
9329do :
9330 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9331if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9332 cat >>confdefs.h <<_ACEOF
81ecdfbb 9333#define HAVE_ZLIB_H 1
233a11ab
CS
9334_ACEOF
9335
9336fi
9337
9338done
9339
9340fi
9341
b040ad30
JB
9342 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9343 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9344 fi
9345 fi
9346
233a11ab 9347
77f120bf 9348# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9350$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9351if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9352 $as_echo_n "(cached) " >&6
bec39cab
AC
9353else
9354 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9356/* end confdefs.h. */
c906108c 9357
81ecdfbb
RW
9358/* Override any GCC internal prototype to avoid an error.
9359 Use char because int might match the return type of a GCC
9360 builtin and then its argument prototype would still apply. */
bec39cab
AC
9361#ifdef __cplusplus
9362extern "C"
9363#endif
77f120bf 9364char dlgetmodinfo ();
bec39cab
AC
9365int
9366main ()
9367{
81ecdfbb 9368return dlgetmodinfo ();
bec39cab
AC
9369 ;
9370 return 0;
9371}
9372_ACEOF
81ecdfbb
RW
9373for ac_lib in '' dl xpdl; do
9374 if test -z "$ac_lib"; then
9375 ac_res="none required"
9376 else
9377 ac_res=-l$ac_lib
b4e70030 9378 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9379 fi
9380 if ac_fn_c_try_link "$LINENO"; then :
9381 ac_cv_search_dlgetmodinfo=$ac_res
9382fi
9383rm -f core conftest.err conftest.$ac_objext \
9384 conftest$ac_exeext
9385 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9386 break
9387fi
9388done
9389if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9390
4e8d927d 9391else
81ecdfbb 9392 ac_cv_search_dlgetmodinfo=no
1ba607ad 9393fi
81ecdfbb 9394rm conftest.$ac_ext
bec39cab
AC
9395LIBS=$ac_func_search_save_LIBS
9396fi
81ecdfbb
RW
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9398$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9399ac_res=$ac_cv_search_dlgetmodinfo
9400if test "$ac_res" != no; then :
9401 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9402
8bb2c122 9403fi
8bb2c122 9404
8bb2c122 9405
77f120bf 9406
77f120bf 9407
6c7a06a3 9408
81ecdfbb
RW
9409# Check whether --with-libiconv-prefix was given.
9410if test "${with_libiconv_prefix+set}" = set; then :
9411 withval=$with_libiconv_prefix;
6c7a06a3 9412 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9413 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9414 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9415 done
9416
81ecdfbb
RW
9417fi
9418
6c7a06a3 9419
f18c4681 9420 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9421 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9422
81ecdfbb
RW
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9424$as_echo_n "checking for iconv... " >&6; }
9425if test "${am_cv_func_iconv+set}" = set; then :
9426 $as_echo_n "(cached) " >&6
d542061a 9427else
6c7a06a3
TT
9428
9429 am_cv_func_iconv="no, consider installing GNU libiconv"
9430 am_cv_lib_iconv=no
9431 am_cv_use_build_libiconv=no
f0f20949 9432 am_cv_build_libiconv_path=
4edb1e84
JB
9433
9434 # If libiconv is part of the build tree, then try using it over
9435 # any system iconv.
9436 if test -d ../libiconv; then
f18c4681
JB
9437 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9438 am_save_LIBS="$LIBS"
9439 am_save_CPPFLAGS="$CPPFLAGS"
9440 LIBS="$LIBS $lib_dir/libiconv.a"
9441 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9443/* end confdefs.h. */
6c7a06a3
TT
9444#include <stdlib.h>
9445#include <iconv.h>
d542061a
UW
9446int
9447main ()
9448{
6c7a06a3 9449iconv_t cd = iconv_open("","");
f18c4681
JB
9450 iconv(cd,NULL,NULL,NULL,NULL);
9451 iconv_close(cd);
d542061a
UW
9452 ;
9453 return 0;
9454}
9455_ACEOF
81ecdfbb 9456if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9457 am_cv_use_build_libiconv=yes
f0f20949 9458 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9459 am_cv_lib_iconv=yes
9460 am_cv_func_iconv=yes
d542061a 9461fi
81ecdfbb
RW
9462rm -f core conftest.err conftest.$ac_objext \
9463 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9464 LIBS="$am_save_LIBS"
9465 CPPFLAGS="$am_save_CPPFLAGS"
9466 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9467 break
9468 fi
9469 done
4edb1e84 9470 fi
94ae1714 9471
4edb1e84 9472 # Next, try to find iconv in libc.
6c7a06a3 9473 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9475/* end confdefs.h. */
6c7a06a3
TT
9476#include <stdlib.h>
9477#include <iconv.h>
d542061a
UW
9478int
9479main ()
9480{
6c7a06a3
TT
9481iconv_t cd = iconv_open("","");
9482 iconv(cd,NULL,NULL,NULL,NULL);
9483 iconv_close(cd);
d542061a
UW
9484 ;
9485 return 0;
9486}
9487_ACEOF
81ecdfbb 9488if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9489 am_cv_func_iconv=yes
d542061a 9490fi
81ecdfbb
RW
9491rm -f core conftest.err conftest.$ac_objext \
9492 conftest$ac_exeext conftest.$ac_ext
77f120bf 9493 fi
94ae1714 9494
4edb1e84
JB
9495 # If iconv was not in libc, try -liconv. In this case, arrange to
9496 # look in the libiconv prefix, if it was specified by the user.
9497 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9498 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9499 am_save_LIBS="$LIBS"
9500 if test -n "$LIBICONV_INCLUDE"; then
9501 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9502 LIBS="$LIBS $LIBICONV_LIBDIR"
9503 fi
9504 LIBS="$LIBS -liconv"
81ecdfbb 9505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9506/* end confdefs.h. */
6c7a06a3
TT
9507#include <stdlib.h>
9508#include <iconv.h>
bec39cab
AC
9509int
9510main ()
9511{
6c7a06a3
TT
9512iconv_t cd = iconv_open("","");
9513 iconv(cd,NULL,NULL,NULL,NULL);
9514 iconv_close(cd);
bec39cab
AC
9515 ;
9516 return 0;
9517}
9518_ACEOF
81ecdfbb 9519if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9520 am_cv_lib_iconv=yes
6c7a06a3 9521 am_cv_func_iconv=yes
627af7ea 9522fi
81ecdfbb
RW
9523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9525 LIBS="$am_save_LIBS"
fc3b640d 9526 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9527 fi
9528
9529fi
81ecdfbb
RW
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9531$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9532
9533 # Set the various flags based on the cache variables. We can't rely
9534 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9535 LIBICONV=
9536 if test "$am_cv_lib_iconv" = yes; then
9537 LIBICONV="-liconv"
94ae1714
TT
9538 else
9539 LIBICONV_LIBDIR=
9540 LIBICONV_INCLUDE=
fc3b640d
TT
9541 fi
9542 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9543 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9544 LIBICONV_LIBDIR=""
fc3b640d
TT
9545 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9546 fi
9547 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9548 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9549
6c7a06a3
TT
9550 if test "$am_cv_func_iconv" = yes; then
9551
81ecdfbb 9552$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9553
81ecdfbb
RW
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9555$as_echo_n "checking for iconv declaration... " >&6; }
9556 if test "${am_cv_proto_iconv+set}" = set; then :
9557 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9558else
9559
81ecdfbb 9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9561/* end confdefs.h. */
9562
6c7a06a3
TT
9563#include <stdlib.h>
9564#include <iconv.h>
9565extern
b4e70030 9566#ifdef __cplusplus
6c7a06a3 9567"C"
b4e70030 9568#endif
6c7a06a3
TT
9569#if defined(__STDC__) || defined(__cplusplus)
9570size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9571#else
9572size_t iconv();
9573#endif
9574
b4e70030
JB
9575int
9576main ()
9577{
6c7a06a3 9578
b4e70030
JB
9579 ;
9580 return 0;
9581}
9582_ACEOF
81ecdfbb 9583if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9584 am_cv_proto_iconv_arg1=""
4e8d927d 9585else
81ecdfbb 9586 am_cv_proto_iconv_arg1="const"
b4e70030 9587fi
81ecdfbb 9588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9589 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);"
9590fi
9591
9592 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9594 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9595$as_echo "${ac_t:-
9596 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9597
9598cat >>confdefs.h <<_ACEOF
9599#define ICONV_CONST $am_cv_proto_iconv_arg1
9600_ACEOF
9601
9602 fi
6c7a06a3
TT
9603
9604
478aac75
DE
9605# GDB may fork/exec the iconv program to get the list of supported character
9606# sets. Allow the user to specify where to find it.
9607# There are several factors affecting the choice of option name:
9608# - There is already --with-libiconv-prefix but we can't use it, it specifies
9609# the build-time location of libiconv files.
9610# - The program we need to find is iconv, which comes with glibc. The user
9611# doesn't necessarily have libiconv installed. Therefore naming this
9612# --with-libiconv-foo feels wrong.
9613# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9614# defined to work on directories not files (though it really doesn't know
9615# the difference).
9616# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9617# with --with-libiconv-prefix.
9618# Putting these together is why the option name is --with-iconv-bin.
9619
9620
9621# Check whether --with-iconv-bin was given.
9622if test "${with_iconv_bin+set}" = set; then :
9623 withval=$with_iconv_bin; iconv_bin="${withval}"
9624
9625cat >>confdefs.h <<_ACEOF
9626#define ICONV_BIN "${iconv_bin}"
9627_ACEOF
9628
9629
9630 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9631 if test "x$prefix" = xNONE; then
9632 test_prefix=/usr/local
9633 else
9634 test_prefix=$prefix
9635 fi
9636 else
9637 test_prefix=$exec_prefix
9638 fi
9639 value=0
9640 case ${iconv_bin} in
9641 "${test_prefix}"|"${test_prefix}/"*|\
9642 '${exec_prefix}'|'${exec_prefix}/'*)
9643 value=1
9644 ;;
9645 esac
9646
9647cat >>confdefs.h <<_ACEOF
9648#define ICONV_BIN_RELOCATABLE $value
9649_ACEOF
9650
9651
9652
9653fi
9654
9655
6c7a06a3
TT
9656# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9657# There is a very specific comment in /usr/include/curses.h explaining that
9658# termcap routines built into libcurses must not be used.
9659#
9660# The symptoms we observed so far is GDB unexpectedly changing
9661# the terminal settings when tgetent is called - this is particularly
9662# visible as the output is missing carriage returns, and so rapidly
9663# becomes very hard to read.
9664#
9665# The readline configure script has already decided that libtermcap
9666# was enough for its purposes, and so decided to build readline using
9667# libtermcap. Since the TUI mode requires curses, building GDB with
9668# TUI enabled results in both libraries to be used at the same time,
9669# which is not allowed. This basically means that GDB with TUI is
9670# broken on alpha-osf.
9671
9672case $host_os in
6bcc772d
RO
9673 osf* )
9674 if test x"$enable_tui" = xyes; then
81ecdfbb 9675 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9676 fi
6bcc772d 9677 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9678 enable_tui=no
9679 fi
9680 ;;
9681esac
9682
cb01cfba 9683# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9684if test x"$enable_tui" != xno; then
cb01cfba
JB
9685 prefer_curses=yes
9686fi
9687
9688curses_found=no
9689if test x"$prefer_curses" = xyes; then
9690 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9691 # curses library because the latter might not provide all the
9692 # functionality we need. However, this leads to problems on systems
9693 # where the linker searches /usr/local/lib, but the compiler doesn't
9694 # search /usr/local/include, if ncurses is installed in /usr/local. A
9695 # default installation of ncurses on alpha*-dec-osf* will lead to such
9696 # a situation.
81ecdfbb
RW
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9698$as_echo_n "checking for library containing waddstr... " >&6; }
9699if test "${ac_cv_search_waddstr+set}" = set; then :
9700 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9701else
9702 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9704/* end confdefs.h. */
9705
81ecdfbb
RW
9706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9709#ifdef __cplusplus
9710extern "C"
9711#endif
6c7a06a3
TT
9712char waddstr ();
9713int
9714main ()
9715{
81ecdfbb 9716return waddstr ();
6c7a06a3
TT
9717 ;
9718 return 0;
9719}
9720_ACEOF
81ecdfbb
RW
9721for ac_lib in '' ncurses cursesX curses; do
9722 if test -z "$ac_lib"; then
9723 ac_res="none required"
9724 else
9725 ac_res=-l$ac_lib
9726 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9727 fi
9728 if ac_fn_c_try_link "$LINENO"; then :
9729 ac_cv_search_waddstr=$ac_res
9730fi
9731rm -f core conftest.err conftest.$ac_objext \
9732 conftest$ac_exeext
9733 if test "${ac_cv_search_waddstr+set}" = set; then :
9734 break
9735fi
9736done
9737if test "${ac_cv_search_waddstr+set}" = set; then :
9738
6c7a06a3 9739else
81ecdfbb
RW
9740 ac_cv_search_waddstr=no
9741fi
9742rm conftest.$ac_ext
9743LIBS=$ac_func_search_save_LIBS
9744fi
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9746$as_echo "$ac_cv_search_waddstr" >&6; }
9747ac_res=$ac_cv_search_waddstr
9748if test "$ac_res" != no; then :
9749 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9750
9751fi
9752
9753
cb01cfba
JB
9754 if test "$ac_cv_search_waddstr" != no; then
9755 curses_found=yes
9756 fi
9757fi
9758
9759# Check whether we should enable the TUI, but only do so if we really
9760# can.
9761if test x"$enable_tui" != xno; then
9762 if test -d $srcdir/tui; then
9763 if test "$curses_found" != no; then
6c7a06a3
TT
9764 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9765 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9766 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9767 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9768 CONFIG_ALL="${CONFIG_ALL} all-tui"
9769 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9770 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9771 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9772 else
9773 if test x"$enable_tui" = xyes; then
81ecdfbb 9774 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9775 else
81ecdfbb
RW
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9777$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9778 fi
9779 fi
9780 fi
9781fi
9782
9783# Since GDB uses Readline, we need termcap functionality. In many
9784# cases this will be provided by the curses library, but some systems
9785# have a seperate termcap library, or no curses library at all.
9786
9787case $host_os in
9788 cygwin*)
9789 if test -d $srcdir/libtermcap; then
9790 LIBS="../libtermcap/libtermcap.a $LIBS"
9791 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9792 fi ;;
9793 go32* | *djgpp*)
9794 ac_cv_search_tgetent="none required"
9795 ;;
9796 *mingw32*)
9797 ac_cv_search_tgetent="none required"
9798 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9799 ;;
9800esac
9801
9802# These are the libraries checked by Readline.
81ecdfbb
RW
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9804$as_echo_n "checking for library containing tgetent... " >&6; }
9805if test "${ac_cv_search_tgetent+set}" = set; then :
9806 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9807else
9808 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9810/* end confdefs.h. */
9811
81ecdfbb
RW
9812/* Override any GCC internal prototype to avoid an error.
9813 Use char because int might match the return type of a GCC
9814 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9815#ifdef __cplusplus
9816extern "C"
9817#endif
6c7a06a3
TT
9818char tgetent ();
9819int
9820main ()
9821{
81ecdfbb 9822return tgetent ();
6c7a06a3
TT
9823 ;
9824 return 0;
9825}
9826_ACEOF
81ecdfbb
RW
9827for ac_lib in '' termcap tinfo curses ncurses; do
9828 if test -z "$ac_lib"; then
9829 ac_res="none required"
9830 else
9831 ac_res=-l$ac_lib
6c7a06a3 9832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9833 fi
9834 if ac_fn_c_try_link "$LINENO"; then :
9835 ac_cv_search_tgetent=$ac_res
9836fi
9837rm -f core conftest.err conftest.$ac_objext \
9838 conftest$ac_exeext
9839 if test "${ac_cv_search_tgetent+set}" = set; then :
9840 break
9841fi
9842done
9843if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9844
6c7a06a3 9845else
81ecdfbb 9846 ac_cv_search_tgetent=no
6c7a06a3 9847fi
81ecdfbb 9848rm conftest.$ac_ext
6c7a06a3
TT
9849LIBS=$ac_func_search_save_LIBS
9850fi
81ecdfbb
RW
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9852$as_echo "$ac_cv_search_tgetent" >&6; }
9853ac_res=$ac_cv_search_tgetent
9854if test "$ac_res" != no; then :
9855 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9856
06825bd1
MK
9857fi
9858
06825bd1 9859
bec39cab 9860if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9861 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9862fi
9863
3841debe 9864
81ecdfbb
RW
9865# Check whether --with-system-readline was given.
9866if test "${with_system_readline+set}" = set; then :
9867 withval=$with_system_readline;
9868fi
6a30b0a5 9869
6a30b0a5
AS
9870
9871if test "$with_system_readline" = yes; then
9872 READLINE=-lreadline
9873 READLINE_DEPS=
9874 READLINE_CFLAGS=
39037522 9875 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9876else
9877 READLINE='$(READLINE_DIR)/libreadline.a'
9878 READLINE_DEPS='$(READLINE)'
9879 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9880 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9881fi
9882
9883
9884
9885
9886
39037522 9887
81ecdfbb
RW
9888# Check whether --with-expat was given.
9889if test "${with_expat+set}" = set; then :
9890 withval=$with_expat;
5c39566f
DJ
9891else
9892 with_expat=auto
81ecdfbb
RW
9893fi
9894
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9896$as_echo_n "checking whether to use expat... " >&6; }
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9898$as_echo "$with_expat" >&6; }
5c39566f
DJ
9899
9900if test "${with_expat}" = no; then
81ecdfbb
RW
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9902$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9903 HAVE_LIBEXPAT=no
9904else
9905
3841debe
DJ
9906 if test "X$prefix" = "XNONE"; then
9907 acl_final_prefix="$ac_default_prefix"
9908 else
9909 acl_final_prefix="$prefix"
9910 fi
9911 if test "X$exec_prefix" = "XNONE"; then
9912 acl_final_exec_prefix='${prefix}'
9913 else
9914 acl_final_exec_prefix="$exec_prefix"
9915 fi
9916 acl_save_prefix="$prefix"
9917 prefix="$acl_final_prefix"
9918 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9919 prefix="$acl_save_prefix"
9920
9921
81ecdfbb
RW
9922# Check whether --with-gnu-ld was given.
9923if test "${with_gnu_ld+set}" = set; then :
9924 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9925else
9926 with_gnu_ld=no
81ecdfbb
RW
9927fi
9928
3841debe
DJ
9929# Prepare PATH_SEPARATOR.
9930# The user is always right.
9931if test "${PATH_SEPARATOR+set}" != set; then
9932 echo "#! /bin/sh" >conf$$.sh
9933 echo "exit 0" >>conf$$.sh
9934 chmod +x conf$$.sh
9935 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9936 PATH_SEPARATOR=';'
9937 else
9938 PATH_SEPARATOR=:
9939 fi
9940 rm -f conf$$.sh
9941fi
9942ac_prog=ld
9943if test "$GCC" = yes; then
9944 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9946$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9947 case $host in
9948 *-*-mingw*)
9949 # gcc leaves a trailing carriage return which upsets mingw
9950 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9951 *)
9952 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9953 esac
9954 case $ac_prog in
9955 # Accept absolute paths.
9956 [\\/]* | [A-Za-z]:[\\/]*)
9957 re_direlt='/[^/][^/]*/\.\./'
9958 # Canonicalize the path of ld
9959 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9960 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9961 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9962 done
9963 test -z "$LD" && LD="$ac_prog"
9964 ;;
9965 "")
9966 # If it fails, then pretend we aren't using GCC.
9967 ac_prog=ld
9968 ;;
9969 *)
9970 # If it is relative, then search for the first ld in PATH.
9971 with_gnu_ld=unknown
9972 ;;
9973 esac
9974elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9976$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9977else
81ecdfbb
RW
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9979$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9980fi
81ecdfbb
RW
9981if test "${acl_cv_path_LD+set}" = set; then :
9982 $as_echo_n "(cached) " >&6
3841debe
DJ
9983else
9984 if test -z "$LD"; then
9985 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9986 for ac_dir in $PATH; do
9987 test -z "$ac_dir" && ac_dir=.
9988 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9989 acl_cv_path_LD="$ac_dir/$ac_prog"
9990 # Check to see if the program is GNU ld. I'd rather use --version,
9991 # but apparently some GNU ld's only accept -v.
9992 # Break only if it was the GNU/non-GNU ld that we prefer.
9993 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9994 test "$with_gnu_ld" != no && break
9995 else
9996 test "$with_gnu_ld" != yes && break
9997 fi
9998 fi
9999 done
10000 IFS="$ac_save_ifs"
10001else
10002 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10003fi
10004fi
10005
10006LD="$acl_cv_path_LD"
10007if test -n "$LD"; then
81ecdfbb
RW
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10009$as_echo "$LD" >&6; }
3841debe 10010else
81ecdfbb
RW
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
3841debe 10013fi
81ecdfbb
RW
10014test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10016$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10017if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10018 $as_echo_n "(cached) " >&6
3841debe
DJ
10019else
10020 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10021if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10022 acl_cv_prog_gnu_ld=yes
10023else
10024 acl_cv_prog_gnu_ld=no
10025fi
10026fi
81ecdfbb
RW
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10028$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10029with_gnu_ld=$acl_cv_prog_gnu_ld
10030
10031
10032
81ecdfbb
RW
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10034$as_echo_n "checking for shared library run path origin... " >&6; }
10035if test "${acl_cv_rpath+set}" = set; then :
10036 $as_echo_n "(cached) " >&6
3841debe
DJ
10037else
10038
10039 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10040 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10041 . ./conftest.sh
10042 rm -f ./conftest.sh
10043 acl_cv_rpath=done
10044
10045fi
81ecdfbb
RW
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10047$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10048 wl="$acl_cv_wl"
10049 libext="$acl_cv_libext"
10050 shlibext="$acl_cv_shlibext"
10051 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10052 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10053 hardcode_direct="$acl_cv_hardcode_direct"
10054 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10055 # Check whether --enable-rpath was given.
10056if test "${enable_rpath+set}" = set; then :
10057 enableval=$enable_rpath; :
3841debe
DJ
10058else
10059 enable_rpath=yes
81ecdfbb
RW
10060fi
10061
3841debe
DJ
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071 use_additional=yes
10072
10073 acl_save_prefix="$prefix"
10074 prefix="$acl_final_prefix"
10075 acl_save_exec_prefix="$exec_prefix"
10076 exec_prefix="$acl_final_exec_prefix"
10077
10078 eval additional_includedir=\"$includedir\"
10079 eval additional_libdir=\"$libdir\"
10080
10081 exec_prefix="$acl_save_exec_prefix"
10082 prefix="$acl_save_prefix"
10083
10084
81ecdfbb
RW
10085# Check whether --with-libexpat-prefix was given.
10086if test "${with_libexpat_prefix+set}" = set; then :
10087 withval=$with_libexpat_prefix;
3841debe
DJ
10088 if test "X$withval" = "Xno"; then
10089 use_additional=no
10090 else
10091 if test "X$withval" = "X"; then
10092
10093 acl_save_prefix="$prefix"
10094 prefix="$acl_final_prefix"
10095 acl_save_exec_prefix="$exec_prefix"
10096 exec_prefix="$acl_final_exec_prefix"
10097
10098 eval additional_includedir=\"$includedir\"
10099 eval additional_libdir=\"$libdir\"
10100
10101 exec_prefix="$acl_save_exec_prefix"
10102 prefix="$acl_save_prefix"
10103
10104 else
10105 additional_includedir="$withval/include"
10106 additional_libdir="$withval/lib"
10107 fi
10108 fi
10109
81ecdfbb
RW
10110fi
10111
3841debe
DJ
10112 LIBEXPAT=
10113 LTLIBEXPAT=
10114 INCEXPAT=
10115 rpathdirs=
10116 ltrpathdirs=
10117 names_already_handled=
10118 names_next_round='expat '
10119 while test -n "$names_next_round"; do
10120 names_this_round="$names_next_round"
10121 names_next_round=
10122 for name in $names_this_round; do
10123 already_handled=
10124 for n in $names_already_handled; do
10125 if test "$n" = "$name"; then
10126 already_handled=yes
10127 break
10128 fi
10129 done
10130 if test -z "$already_handled"; then
10131 names_already_handled="$names_already_handled $name"
10132 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10133 eval value=\"\$HAVE_LIB$uppername\"
10134 if test -n "$value"; then
10135 if test "$value" = yes; then
10136 eval value=\"\$LIB$uppername\"
10137 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10138 eval value=\"\$LTLIB$uppername\"
10139 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10140 else
10141 :
10142 fi
10143 else
10144 found_dir=
10145 found_la=
10146 found_so=
10147 found_a=
10148 if test $use_additional = yes; then
10149 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10150 found_dir="$additional_libdir"
10151 found_so="$additional_libdir/lib$name.$shlibext"
10152 if test -f "$additional_libdir/lib$name.la"; then
10153 found_la="$additional_libdir/lib$name.la"
10154 fi
10155 else
10156 if test -f "$additional_libdir/lib$name.$libext"; then
10157 found_dir="$additional_libdir"
10158 found_a="$additional_libdir/lib$name.$libext"
10159 if test -f "$additional_libdir/lib$name.la"; then
10160 found_la="$additional_libdir/lib$name.la"
10161 fi
10162 fi
10163 fi
10164 fi
10165 if test "X$found_dir" = "X"; then
10166 for x in $LDFLAGS $LTLIBEXPAT; do
10167
10168 acl_save_prefix="$prefix"
10169 prefix="$acl_final_prefix"
10170 acl_save_exec_prefix="$exec_prefix"
10171 exec_prefix="$acl_final_exec_prefix"
10172 eval x=\"$x\"
10173 exec_prefix="$acl_save_exec_prefix"
10174 prefix="$acl_save_prefix"
10175
10176 case "$x" in
10177 -L*)
10178 dir=`echo "X$x" | sed -e 's/^X-L//'`
10179 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10180 found_dir="$dir"
10181 found_so="$dir/lib$name.$shlibext"
10182 if test -f "$dir/lib$name.la"; then
10183 found_la="$dir/lib$name.la"
10184 fi
10185 else
10186 if test -f "$dir/lib$name.$libext"; then
10187 found_dir="$dir"
10188 found_a="$dir/lib$name.$libext"
10189 if test -f "$dir/lib$name.la"; then
10190 found_la="$dir/lib$name.la"
10191 fi
10192 fi
10193 fi
10194 ;;
10195 esac
10196 if test "X$found_dir" != "X"; then
10197 break
10198 fi
10199 done
10200 fi
10201 if test "X$found_dir" != "X"; then
10202 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10203 if test "X$found_so" != "X"; then
10204 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10205 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10206 else
10207 haveit=
10208 for x in $ltrpathdirs; do
10209 if test "X$x" = "X$found_dir"; then
10210 haveit=yes
10211 break
10212 fi
10213 done
10214 if test -z "$haveit"; then
10215 ltrpathdirs="$ltrpathdirs $found_dir"
10216 fi
10217 if test "$hardcode_direct" = yes; then
10218 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10219 else
10220 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10221 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10222 haveit=
10223 for x in $rpathdirs; do
10224 if test "X$x" = "X$found_dir"; then
10225 haveit=yes
10226 break
10227 fi
10228 done
10229 if test -z "$haveit"; then
10230 rpathdirs="$rpathdirs $found_dir"
10231 fi
10232 else
10233 haveit=
10234 for x in $LDFLAGS $LIBEXPAT; do
10235
10236 acl_save_prefix="$prefix"
10237 prefix="$acl_final_prefix"
10238 acl_save_exec_prefix="$exec_prefix"
10239 exec_prefix="$acl_final_exec_prefix"
10240 eval x=\"$x\"
10241 exec_prefix="$acl_save_exec_prefix"
10242 prefix="$acl_save_prefix"
10243
10244 if test "X$x" = "X-L$found_dir"; then
10245 haveit=yes
10246 break
10247 fi
10248 done
10249 if test -z "$haveit"; then
10250 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10251 fi
10252 if test "$hardcode_minus_L" != no; then
10253 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10254 else
10255 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10256 fi
10257 fi
10258 fi
10259 fi
10260 else
10261 if test "X$found_a" != "X"; then
10262 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10263 else
10264 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10265 fi
10266 fi
10267 additional_includedir=
10268 case "$found_dir" in
10269 */lib | */lib/)
10270 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10271 additional_includedir="$basedir/include"
10272 ;;
10273 esac
10274 if test "X$additional_includedir" != "X"; then
10275 if test "X$additional_includedir" != "X/usr/include"; then
10276 haveit=
10277 if test "X$additional_includedir" = "X/usr/local/include"; then
10278 if test -n "$GCC"; then
10279 case $host_os in
10280 linux*) haveit=yes;;
10281 esac
10282 fi
10283 fi
10284 if test -z "$haveit"; then
10285 for x in $CPPFLAGS $INCEXPAT; do
10286
10287 acl_save_prefix="$prefix"
10288 prefix="$acl_final_prefix"
10289 acl_save_exec_prefix="$exec_prefix"
10290 exec_prefix="$acl_final_exec_prefix"
10291 eval x=\"$x\"
10292 exec_prefix="$acl_save_exec_prefix"
10293 prefix="$acl_save_prefix"
10294
10295 if test "X$x" = "X-I$additional_includedir"; then
10296 haveit=yes
10297 break
10298 fi
10299 done
10300 if test -z "$haveit"; then
10301 if test -d "$additional_includedir"; then
10302 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10303 fi
10304 fi
10305 fi
10306 fi
10307 fi
10308 if test -n "$found_la"; then
10309 save_libdir="$libdir"
10310 case "$found_la" in
10311 */* | *\\*) . "$found_la" ;;
10312 *) . "./$found_la" ;;
10313 esac
10314 libdir="$save_libdir"
10315 for dep in $dependency_libs; do
10316 case "$dep" in
10317 -L*)
10318 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10319 if test "X$additional_libdir" != "X/usr/lib"; then
10320 haveit=
10321 if test "X$additional_libdir" = "X/usr/local/lib"; then
10322 if test -n "$GCC"; then
10323 case $host_os in
10324 linux*) haveit=yes;;
10325 esac
10326 fi
10327 fi
10328 if test -z "$haveit"; then
10329 haveit=
10330 for x in $LDFLAGS $LIBEXPAT; do
10331
10332 acl_save_prefix="$prefix"
10333 prefix="$acl_final_prefix"
10334 acl_save_exec_prefix="$exec_prefix"
10335 exec_prefix="$acl_final_exec_prefix"
10336 eval x=\"$x\"
10337 exec_prefix="$acl_save_exec_prefix"
10338 prefix="$acl_save_prefix"
10339
10340 if test "X$x" = "X-L$additional_libdir"; then
10341 haveit=yes
10342 break
10343 fi
10344 done
10345 if test -z "$haveit"; then
10346 if test -d "$additional_libdir"; then
10347 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10348 fi
10349 fi
10350 haveit=
10351 for x in $LDFLAGS $LTLIBEXPAT; do
10352
10353 acl_save_prefix="$prefix"
10354 prefix="$acl_final_prefix"
10355 acl_save_exec_prefix="$exec_prefix"
10356 exec_prefix="$acl_final_exec_prefix"
10357 eval x=\"$x\"
10358 exec_prefix="$acl_save_exec_prefix"
10359 prefix="$acl_save_prefix"
10360
10361 if test "X$x" = "X-L$additional_libdir"; then
10362 haveit=yes
10363 break
10364 fi
10365 done
10366 if test -z "$haveit"; then
10367 if test -d "$additional_libdir"; then
10368 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10369 fi
10370 fi
10371 fi
10372 fi
10373 ;;
10374 -R*)
10375 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10376 if test "$enable_rpath" != no; then
10377 haveit=
10378 for x in $rpathdirs; do
10379 if test "X$x" = "X$dir"; then
10380 haveit=yes
10381 break
10382 fi
10383 done
10384 if test -z "$haveit"; then
10385 rpathdirs="$rpathdirs $dir"
10386 fi
10387 haveit=
10388 for x in $ltrpathdirs; do
10389 if test "X$x" = "X$dir"; then
10390 haveit=yes
10391 break
10392 fi
10393 done
10394 if test -z "$haveit"; then
10395 ltrpathdirs="$ltrpathdirs $dir"
10396 fi
10397 fi
10398 ;;
10399 -l*)
10400 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10401 ;;
10402 *.la)
10403 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10404 ;;
10405 *)
10406 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10407 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10408 ;;
81ecdfbb
RW
10409 esac
10410 done
10411 fi
10412 else
10413 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10414 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10415 fi
10416 fi
10417 fi
10418 done
10419 done
10420 if test "X$rpathdirs" != "X"; then
10421 if test -n "$hardcode_libdir_separator"; then
10422 alldirs=
10423 for found_dir in $rpathdirs; do
10424 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10425 done
10426 acl_save_libdir="$libdir"
10427 libdir="$alldirs"
10428 eval flag=\"$hardcode_libdir_flag_spec\"
10429 libdir="$acl_save_libdir"
10430 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10431 else
10432 for found_dir in $rpathdirs; do
10433 acl_save_libdir="$libdir"
10434 libdir="$found_dir"
10435 eval flag=\"$hardcode_libdir_flag_spec\"
10436 libdir="$acl_save_libdir"
10437 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10438 done
10439 fi
10440 fi
10441 if test "X$ltrpathdirs" != "X"; then
10442 for found_dir in $ltrpathdirs; do
10443 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10444 done
10445 fi
a9322a30
TT
10446
10447
81ecdfbb 10448 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10449
81ecdfbb
RW
10450 for element in $INCEXPAT; do
10451 haveit=
10452 for x in $CPPFLAGS; do
a9322a30 10453
81ecdfbb
RW
10454 acl_save_prefix="$prefix"
10455 prefix="$acl_final_prefix"
10456 acl_save_exec_prefix="$exec_prefix"
10457 exec_prefix="$acl_final_exec_prefix"
10458 eval x=\"$x\"
10459 exec_prefix="$acl_save_exec_prefix"
10460 prefix="$acl_save_prefix"
a8111142 10461
81ecdfbb
RW
10462 if test "X$x" = "X$element"; then
10463 haveit=yes
10464 break
10465 fi
10466 done
10467 if test -z "$haveit"; then
10468 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10469 fi
10470 done
a9322a30
TT
10471
10472
81ecdfbb
RW
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10474$as_echo_n "checking for libexpat... " >&6; }
10475if test "${ac_cv_libexpat+set}" = set; then :
10476 $as_echo_n "(cached) " >&6
bec39cab 10477else
bec39cab 10478
81ecdfbb
RW
10479 ac_save_LIBS="$LIBS"
10480 LIBS="$LIBS $LIBEXPAT"
10481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10482/* end confdefs.h. */
81ecdfbb
RW
10483#include "expat.h"
10484int
10485main ()
10486{
10487XML_Parser p = XML_ParserCreate (0);
10488 ;
10489 return 0;
10490}
bec39cab 10491_ACEOF
81ecdfbb
RW
10492if ac_fn_c_try_link "$LINENO"; then :
10493 ac_cv_libexpat=yes
c906108c 10494else
81ecdfbb 10495 ac_cv_libexpat=no
bec39cab 10496fi
81ecdfbb
RW
10497rm -f core conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
10499 LIBS="$ac_save_LIBS"
c906108c 10500
95ca63c4 10501fi
81ecdfbb
RW
10502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10503$as_echo "$ac_cv_libexpat" >&6; }
10504 if test "$ac_cv_libexpat" = yes; then
10505 HAVE_LIBEXPAT=yes
bec39cab 10506
81ecdfbb 10507$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10508
81ecdfbb
RW
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10510$as_echo_n "checking how to link with libexpat... " >&6; }
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10512$as_echo "$LIBEXPAT" >&6; }
10513 else
10514 HAVE_LIBEXPAT=no
10515 CPPFLAGS="$ac_save_CPPFLAGS"
10516 LIBEXPAT=
10517 LTLIBEXPAT=
10518 fi
95ca63c4
CF
10519
10520
10521
7cb9022a
MK
10522
10523
bec39cab 10524
81ecdfbb
RW
10525 if test "$HAVE_LIBEXPAT" != yes; then
10526 if test "$with_expat" = yes; then
10527 as_fn_error "expat is missing or unusable" "$LINENO" 5
10528 else
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10530$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10531 fi
10532 else
10533 save_LIBS=$LIBS
10534 LIBS="$LIBS $LIBEXPAT"
10535 for ac_func in XML_StopParser
10536do :
10537 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10538if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10539 cat >>confdefs.h <<_ACEOF
81ecdfbb 10540#define HAVE_XML_STOPPARSER 1
bec39cab 10541_ACEOF
95ca63c4 10542
bec39cab 10543fi
bec39cab 10544done
95ca63c4 10545
81ecdfbb
RW
10546 LIBS=$save_LIBS
10547 fi
a9322a30
TT
10548fi
10549
a9322a30 10550
a9322a30
TT
10551
10552
ec685c5e 10553
0c4a4063 10554
81ecdfbb
RW
10555# Check whether --with-python was given.
10556if test "${with_python+set}" = set; then :
10557 withval=$with_python;
bec39cab 10558else
81ecdfbb 10559 with_python=auto
bec39cab 10560fi
bec39cab 10561
81ecdfbb
RW
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10563$as_echo_n "checking whether to use python... " >&6; }
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10565$as_echo "$with_python" >&6; }
9a156167 10566
81ecdfbb
RW
10567if test "${with_python}" = no; then
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10569$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10570 have_libpython=no
bec39cab 10571else
81ecdfbb 10572 case "${with_python}" in
81ecdfbb 10573 /*)
ec685c5e
DE
10574 if test -d ${with_python}; then
10575 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10576 python_prog="${with_python}/bin/python"
0c4a4063 10577 python_prefix=
9c4ea6c5
JB
10578 # If python does not exit ${with_python}/bin, then try in
10579 # ${with_python}. On Windows/MinGW, this is where the Python
10580 # executable is.
10581 if test ! -x "${python_prog}"; then
10582 python_prog="${with_python}/python"
10583 python_prefix=
10584 fi
e7a30f46 10585 if test ! -x "${python_prog}"; then
ec685c5e
DE
10586 # Fall back to gdb 7.0/7.1 behaviour.
10587 python_prog=missing
0c4a4063 10588 python_prefix=${with_python}
ec685c5e 10589 fi
e7a30f46 10590 elif test -x "${with_python}"; then
ec685c5e
DE
10591 # While we can't run python compiled for $host (unless host == build),
10592 # the user could write a script that provides the needed information,
10593 # so we support that.
ec685c5e 10594 python_prog=${with_python}
0c4a4063 10595 python_prefix=
ec685c5e
DE
10596 else
10597 as_fn_error "invalid value for --with-python" "$LINENO" 5
10598 fi
81ecdfbb 10599 ;;
ec685c5e
DE
10600 */*)
10601 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10602 as_fn_error "invalid value for --with-python" "$LINENO" 5
10603 ;;
ec685c5e
DE
10604 *)
10605 # The user has either specified auto, yes, or the name of the python
10606 # program assumed to be in $PATH.
10607 python_prefix=
10608 case "${with_python}" in
10609 yes | auto)
10610 if test ${build} = ${host}; then
10611 # Extract the first word of "python", so it can be a program name with args.
10612set dummy python; ac_word=$2
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10614$as_echo_n "checking for $ac_word... " >&6; }
10615if test "${ac_cv_path_python_prog_path+set}" = set; then :
10616 $as_echo_n "(cached) " >&6
10617else
10618 case $python_prog_path in
10619 [\\/]* | ?:[\\/]*)
10620 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10621 ;;
10622 *)
10623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10624for as_dir in $PATH
10625do
10626 IFS=$as_save_IFS
10627 test -z "$as_dir" && as_dir=.
10628 for ac_exec_ext in '' $ac_executable_extensions; do
10629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10630 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10632 break 2
10633 fi
10634done
10635 done
10636IFS=$as_save_IFS
10637
10638 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10639 ;;
10640esac
10641fi
10642python_prog_path=$ac_cv_path_python_prog_path
10643if test -n "$python_prog_path"; then
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10645$as_echo "$python_prog_path" >&6; }
10646else
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
10649fi
10650
10651
10652 if test "${python_prog_path}" = missing; then
10653 python_prog=missing
10654 else
10655 python_prog=${python_prog_path}
10656 fi
10657 else
10658 # Not much we can do except assume the cross-compiler will find the
10659 # right files.
10660 python_prog=missing
10661 fi
10662 ;;
10663 *)
10664 # While we can't run python compiled for $host (unless host == build),
10665 # the user could write a script that provides the needed information,
10666 # so we support that.
10667 python_prog="${with_python}"
10668 # Extract the first word of "${python_prog}", so it can be a program name with args.
10669set dummy ${python_prog}; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if test "${ac_cv_path_python_prog_path+set}" = set; then :
10673 $as_echo_n "(cached) " >&6
10674else
10675 case $python_prog_path in
10676 [\\/]* | ?:[\\/]*)
10677 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10678 ;;
10679 *)
10680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683 IFS=$as_save_IFS
10684 test -z "$as_dir" && as_dir=.
10685 for ac_exec_ext in '' $ac_executable_extensions; do
10686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10687 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689 break 2
10690 fi
10691done
10692 done
10693IFS=$as_save_IFS
10694
10695 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10696 ;;
10697esac
10698fi
10699python_prog_path=$ac_cv_path_python_prog_path
10700if test -n "$python_prog_path"; then
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10702$as_echo "$python_prog_path" >&6; }
10703else
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10705$as_echo "no" >&6; }
10706fi
10707
10708
10709 if test "${python_prog_path}" = missing; then
10710 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10711 fi
10712 ;;
10713 esac
81ecdfbb
RW
10714 esac
10715
ec685c5e 10716 if test "${python_prog}" != missing; then
e7a30f46
DE
10717 # We have a python program to use, but it may be too old.
10718 # Don't flag an error for --with-python=auto (the default).
10719 have_python_config=yes
ec685c5e
DE
10720 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10721 if test $? != 0; then
e7a30f46
DE
10722 have_python_config=failed
10723 if test "${with_python}" != auto; then
10724 as_fn_error "failure running python-config --includes" "$LINENO" 5
10725 fi
ec685c5e
DE
10726 fi
10727 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10728 if test $? != 0; then
e7a30f46
DE
10729 have_python_config=failed
10730 if test "${with_python}" != auto; then
10731 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10732 fi
ec685c5e 10733 fi
0c4a4063
DE
10734 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10735 if test $? != 0; then
e7a30f46
DE
10736 have_python_config=failed
10737 if test "${with_python}" != auto; then
10738 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10739 fi
0c4a4063 10740 fi
ec685c5e 10741 else
ac534cba
JB
10742 # We do not have a python executable we can use to determine where
10743 # to find the Python headers and libs. We cannot guess the include
10744 # path from the python_prefix either, because that include path
10745 # depends on the Python version. So, there is nothing much we can
10746 # do except assume that the compiler will be able to find those files.
10747 python_includes=
10748 python_libs=
0c4a4063 10749 have_python_config=no
ec685c5e 10750 fi
bec39cab 10751
ec685c5e
DE
10752 # If we have python-config, only try the configuration it provides.
10753 # Otherwise fallback on the old way of trying different versions of
10754 # python in turn.
81ecdfbb 10755
ec685c5e
DE
10756 have_libpython=no
10757 if test "${have_python_config}" = yes; then
c1039e3c
JB
10758 # Determine the Python version by extracting "-lpython<version>"
10759 # part of the python_libs. <version> is usually X.Y with X and Y
10760 # being decimal numbers, but can also be XY (seen on Windows).
10761 #
10762 # The extraction is performed using sed with a regular expression.
10763 # Initially, the regexp used was using the '?' quantifier to make
10764 # the dot in the version number optional. Unfortunately, this
10765 # does not work with non-GNU versions of sed because, because of
10766 # what looks like a limitation (the '?' quantifier does not work
10767 # with back-references). We work around this limitation by using
10768 # the '*' quantifier instead. It means that, in theory, we might
10769 # match unexpected version strings such as "-lpython2..7", but
10770 # this seems unlikely in practice. And even if that happens,
10771 # an error will be triggered later on, when checking that version
10772 # number.
ec685c5e 10773 python_version=`echo " ${python_libs} " \
c1039e3c 10774 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10775 case "${python_version}" in
10776 python*)
ec685c5e
DE
10777
10778 version=${python_version}
10779
10780 new_CPPFLAGS=${python_includes}
10781 new_LIBS=${python_libs}
81ecdfbb
RW
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10783$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10784 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10785 save_LIBS=$LIBS
ec685c5e
DE
10786 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10787 LIBS="$LIBS $new_LIBS"
10788 found_usable_python=no
81ecdfbb 10789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10790/* end confdefs.h. */
ac534cba 10791#include "Python.h"
81ecdfbb
RW
10792int
10793main ()
10794{
10795Py_Initialize ();
10796 ;
10797 return 0;
10798}
bec39cab 10799_ACEOF
81ecdfbb 10800if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10801 have_libpython=${version}
10802 found_usable_python=yes
ac534cba
JB
10803 PYTHON_CPPFLAGS=$new_CPPFLAGS
10804 PYTHON_LIBS=$new_LIBS
9a156167 10805fi
81ecdfbb
RW
10806rm -f core conftest.err conftest.$ac_objext \
10807 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10808 CPPFLAGS=$save_CPPFLAGS
10809 LIBS=$save_LIBS
ec685c5e
DE
10810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10811$as_echo "${found_usable_python}" >&6; }
9a156167 10812
0c4a4063
DE
10813 ;;
10814 *)
ec685c5e 10815 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10816 ;;
10817 esac
e7a30f46 10818 elif test "${have_python_config}" != failed; then
ec685c5e 10819 if test "${have_libpython}" = no; then
9a156167 10820
420697bb
TT
10821 version=python2.7
10822
10823 new_CPPFLAGS=${python_includes}
10824 new_LIBS="${python_libs} -lpython2.7"
10825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10826$as_echo_n "checking for ${version}... " >&6; }
10827 save_CPPFLAGS=$CPPFLAGS
10828 save_LIBS=$LIBS
10829 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10830 LIBS="$LIBS $new_LIBS"
10831 found_usable_python=no
10832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833/* end confdefs.h. */
ac534cba 10834#include "Python.h"
420697bb
TT
10835int
10836main ()
10837{
10838Py_Initialize ();
10839 ;
10840 return 0;
10841}
10842_ACEOF
10843if ac_fn_c_try_link "$LINENO"; then :
10844 have_libpython=${version}
10845 found_usable_python=yes
ac534cba
JB
10846 PYTHON_CPPFLAGS=$new_CPPFLAGS
10847 PYTHON_LIBS=$new_LIBS
420697bb
TT
10848fi
10849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10851 CPPFLAGS=$save_CPPFLAGS
10852 LIBS=$save_LIBS
420697bb
TT
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10854$as_echo "${found_usable_python}" >&6; }
10855
10856 fi
10857 if test "${have_libpython}" = no; then
10858
ec685c5e
DE
10859 version=python2.6
10860
10861 new_CPPFLAGS=${python_includes}
10862 new_LIBS="${python_libs} -lpython2.6"
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10864$as_echo_n "checking for ${version}... " >&6; }
10865 save_CPPFLAGS=$CPPFLAGS
10866 save_LIBS=$LIBS
10867 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10868 LIBS="$LIBS $new_LIBS"
10869 found_usable_python=no
10870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10871/* end confdefs.h. */
ac534cba 10872#include "Python.h"
ec685c5e
DE
10873int
10874main ()
10875{
10876Py_Initialize ();
10877 ;
10878 return 0;
10879}
10880_ACEOF
10881if ac_fn_c_try_link "$LINENO"; then :
10882 have_libpython=${version}
10883 found_usable_python=yes
ac534cba
JB
10884 PYTHON_CPPFLAGS=$new_CPPFLAGS
10885 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10886fi
10887rm -f core conftest.err conftest.$ac_objext \
10888 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10889 CPPFLAGS=$save_CPPFLAGS
10890 LIBS=$save_LIBS
ec685c5e
DE
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10892$as_echo "${found_usable_python}" >&6; }
9a156167 10893
81ecdfbb 10894 fi
ec685c5e 10895 if test ${have_libpython} = no; then
9a156167 10896
81ecdfbb 10897 version=python2.5
9a156167 10898
ec685c5e
DE
10899 new_CPPFLAGS=${python_includes}
10900 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10902$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10903 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10904 save_LIBS=$LIBS
ec685c5e
DE
10905 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10906 LIBS="$LIBS $new_LIBS"
10907 found_usable_python=no
81ecdfbb 10908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10909/* end confdefs.h. */
ac534cba 10910#include "Python.h"
81ecdfbb
RW
10911int
10912main ()
10913{
10914Py_Initialize ();
10915 ;
10916 return 0;
10917}
436868fb 10918_ACEOF
81ecdfbb 10919if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10920 have_libpython=${version}
10921 found_usable_python=yes
ac534cba
JB
10922 PYTHON_CPPFLAGS=$new_CPPFLAGS
10923 PYTHON_LIBS=$new_LIBS
436868fb 10924fi
81ecdfbb
RW
10925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10927 CPPFLAGS=$save_CPPFLAGS
10928 LIBS=$save_LIBS
ec685c5e
DE
10929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10930$as_echo "${found_usable_python}" >&6; }
a9322a30 10931
81ecdfbb 10932 fi
ec685c5e 10933 if test ${have_libpython} = no; then
a9322a30 10934
81ecdfbb 10935 version=python2.4
a9322a30 10936
ec685c5e
DE
10937 new_CPPFLAGS=${python_includes}
10938 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10940$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10941 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10942 save_LIBS=$LIBS
ec685c5e
DE
10943 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10944 LIBS="$LIBS $new_LIBS"
10945 found_usable_python=no
81ecdfbb 10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10947/* end confdefs.h. */
ac534cba 10948#include "Python.h"
a9322a30
TT
10949int
10950main ()
10951{
81ecdfbb 10952Py_Initialize ();
a9322a30
TT
10953 ;
10954 return 0;
10955}
436868fb 10956_ACEOF
81ecdfbb 10957if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10958 have_libpython=${version}
10959 found_usable_python=yes
ac534cba
JB
10960 PYTHON_CPPFLAGS=$new_CPPFLAGS
10961 PYTHON_LIBS=$new_LIBS
436868fb 10962fi
81ecdfbb
RW
10963rm -f core conftest.err conftest.$ac_objext \
10964 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10965 CPPFLAGS=$save_CPPFLAGS
10966 LIBS=$save_LIBS
ec685c5e
DE
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10968$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10969
ec685c5e
DE
10970 fi
10971 fi
9c4ea6c5 10972 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10973
10974$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10975
9c4ea6c5 10976 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10977
10978$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10979
9c4ea6c5 10980 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10981
10982$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10983
9c4ea6c5 10984 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10985
10986$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10987
81ecdfbb 10988 fi
ec685c5e
DE
10989
10990 if test "${have_libpython}" = no; then
81ecdfbb
RW
10991 case "${with_python}" in
10992 yes)
10993 as_fn_error "python is missing or unusable" "$LINENO" 5
10994 ;;
10995 auto)
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10997$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10998 ;;
10999 *)
11000 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11001 ;;
11002 esac
0c4a4063
DE
11003 else
11004 if test -n "${python_prefix}"; then
11005
11006cat >>confdefs.h <<_ACEOF
11007#define WITH_PYTHON_PATH "${python_prefix}"
11008_ACEOF
11009
11010
11011 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11012 if test "x$prefix" = xNONE; then
11013 test_prefix=/usr/local
11014 else
11015 test_prefix=$prefix
11016 fi
11017 else
11018 test_prefix=$exec_prefix
11019 fi
11020 value=0
11021 case ${python_prefix} in
11022 "${test_prefix}"|"${test_prefix}/"*|\
11023 '${exec_prefix}'|'${exec_prefix}/'*)
11024 value=1
11025 ;;
11026 esac
11027
11028cat >>confdefs.h <<_ACEOF
11029#define PYTHON_PATH_RELOCATABLE $value
11030_ACEOF
11031
11032
11033 fi
81ecdfbb 11034 fi
436868fb 11035fi
436868fb 11036
ec685c5e 11037if test "${have_libpython}" != no; then
436868fb 11038
81ecdfbb 11039$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11040
81ecdfbb
RW
11041 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11042 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11043 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11044 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11045 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11046
81ecdfbb
RW
11047 # Flags needed to compile Python code (taken from python-config --cflags).
11048 # We cannot call python-config directly because it will output whatever was
11049 # used when compiling the Python interpreter itself, including flags which
11050 # would make the python-related objects be compiled differently from the
11051 # rest of GDB (e.g., -O2 and -fPIC).
11052 if test "${GCC}" = yes; then
11053 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11054 fi
436868fb 11055
81ecdfbb
RW
11056 if test "x${tentative_python_cflags}" != x; then
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11058$as_echo_n "checking compiler flags for python code... " >&6; }
11059 for flag in ${tentative_python_cflags}; do
11060 # Check that the compiler accepts it
11061 saved_CFLAGS="$CFLAGS"
11062 CFLAGS="$CFLAGS $flag"
11063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11064/* end confdefs.h. */
81ecdfbb 11065
a9322a30
TT
11066int
11067main ()
11068{
a9322a30
TT
11069
11070 ;
11071 return 0;
11072}
bec39cab 11073_ACEOF
81ecdfbb
RW
11074if ac_fn_c_try_compile "$LINENO"; then :
11075 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11076fi
81ecdfbb
RW
11077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11078 CFLAGS="$saved_CFLAGS"
11079 done
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11081$as_echo "${PYTHON_CFLAGS}" >&6; }
11082 fi
043b6510
JB
11083
11084 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11085 # #if _SGIAPI
11086 # #define siginfo __siginfo
11087 # #endif
11088 # The problem is that including Python causes some XOPEN macros to be
11089 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11090 # to false. So, we work around this issue by defining siginfo ourself
11091 # though the command-line.
11092 case "$gdb_host" in
11093 irix*) if test "${GCC}" = yes; then
11094 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11095 fi
11096 ;;
11097 esac
81ecdfbb
RW
11098else
11099 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11100 # included.
11101 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11102 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11103 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11104fi
9a156167 11105
9a156167 11106
ac534cba
JB
11107
11108
81ecdfbb
RW
11109# ------------------------- #
11110# Checks for header files. #
11111# ------------------------- #
c890192f 11112
81ecdfbb
RW
11113ac_header_dirent=no
11114for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11115 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11117$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11118if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11119 $as_echo_n "(cached) " >&6
bec39cab 11120else
81ecdfbb 11121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11122/* end confdefs.h. */
81ecdfbb
RW
11123#include <sys/types.h>
11124#include <$ac_hdr>
11125
a9322a30
TT
11126int
11127main ()
11128{
81ecdfbb
RW
11129if ((DIR *) 0)
11130return 0;
a9322a30
TT
11131 ;
11132 return 0;
11133}
bec39cab 11134_ACEOF
81ecdfbb
RW
11135if ac_fn_c_try_compile "$LINENO"; then :
11136 eval "$as_ac_Header=yes"
bec39cab 11137else
81ecdfbb 11138 eval "$as_ac_Header=no"
bec39cab 11139fi
81ecdfbb 11140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11141fi
81ecdfbb
RW
11142eval ac_res=\$$as_ac_Header
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11144$as_echo "$ac_res" >&6; }
11145eval as_val=\$$as_ac_Header
11146 if test "x$as_val" = x""yes; then :
11147 cat >>confdefs.h <<_ACEOF
11148#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11149_ACEOF
bec39cab 11150
81ecdfbb
RW
11151ac_header_dirent=$ac_hdr; break
11152fi
bec39cab 11153
81ecdfbb
RW
11154done
11155# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11156if test $ac_header_dirent = dirent.h; then
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11158$as_echo_n "checking for library containing opendir... " >&6; }
11159if test "${ac_cv_search_opendir+set}" = set; then :
11160 $as_echo_n "(cached) " >&6
c890192f 11161else
81ecdfbb
RW
11162 ac_func_search_save_LIBS=$LIBS
11163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11164/* end confdefs.h. */
11165
11166/* Override any GCC internal prototype to avoid an error.
11167 Use char because int might match the return type of a GCC
11168 builtin and then its argument prototype would still apply. */
11169#ifdef __cplusplus
11170extern "C"
11171#endif
11172char opendir ();
11173int
11174main ()
11175{
11176return opendir ();
11177 ;
11178 return 0;
11179}
bec39cab 11180_ACEOF
81ecdfbb
RW
11181for ac_lib in '' dir; do
11182 if test -z "$ac_lib"; then
11183 ac_res="none required"
11184 else
11185 ac_res=-l$ac_lib
11186 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11187 fi
11188 if ac_fn_c_try_link "$LINENO"; then :
11189 ac_cv_search_opendir=$ac_res
11190fi
11191rm -f core conftest.err conftest.$ac_objext \
11192 conftest$ac_exeext
11193 if test "${ac_cv_search_opendir+set}" = set; then :
11194 break
11195fi
11196done
11197if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11198
81ecdfbb
RW
11199else
11200 ac_cv_search_opendir=no
11201fi
11202rm conftest.$ac_ext
11203LIBS=$ac_func_search_save_LIBS
11204fi
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11206$as_echo "$ac_cv_search_opendir" >&6; }
11207ac_res=$ac_cv_search_opendir
11208if test "$ac_res" != no; then :
11209 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11210
bec39cab 11211fi
81ecdfbb 11212
bec39cab 11213else
81ecdfbb
RW
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11215$as_echo_n "checking for library containing opendir... " >&6; }
11216if test "${ac_cv_search_opendir+set}" = set; then :
11217 $as_echo_n "(cached) " >&6
11218else
11219 ac_func_search_save_LIBS=$LIBS
11220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11221/* end confdefs.h. */
81ecdfbb
RW
11222
11223/* Override any GCC internal prototype to avoid an error.
11224 Use char because int might match the return type of a GCC
11225 builtin and then its argument prototype would still apply. */
11226#ifdef __cplusplus
11227extern "C"
11228#endif
11229char opendir ();
a9322a30
TT
11230int
11231main ()
11232{
81ecdfbb 11233return opendir ();
a9322a30
TT
11234 ;
11235 return 0;
11236}
bec39cab 11237_ACEOF
81ecdfbb
RW
11238for ac_lib in '' x; do
11239 if test -z "$ac_lib"; then
11240 ac_res="none required"
11241 else
11242 ac_res=-l$ac_lib
11243 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11244 fi
11245 if ac_fn_c_try_link "$LINENO"; then :
11246 ac_cv_search_opendir=$ac_res
11247fi
11248rm -f core conftest.err conftest.$ac_objext \
11249 conftest$ac_exeext
11250 if test "${ac_cv_search_opendir+set}" = set; then :
11251 break
11252fi
11253done
11254if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11255
81ecdfbb
RW
11256else
11257 ac_cv_search_opendir=no
bec39cab 11258fi
81ecdfbb
RW
11259rm conftest.$ac_ext
11260LIBS=$ac_func_search_save_LIBS
a9322a30 11261fi
81ecdfbb
RW
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11263$as_echo "$ac_cv_search_opendir" >&6; }
11264ac_res=$ac_cv_search_opendir
11265if test "$ac_res" != no; then :
11266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11267
81ecdfbb 11268fi
bec39cab 11269
81ecdfbb 11270fi
bec39cab 11271
81ecdfbb
RW
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11273$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11274if test "${ac_cv_header_stat_broken+set}" = set; then :
11275 $as_echo_n "(cached) " >&6
9a156167 11276else
81ecdfbb
RW
11277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11278/* end confdefs.h. */
11279#include <sys/types.h>
11280#include <sys/stat.h>
11281
11282#if defined S_ISBLK && defined S_IFDIR
11283extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11284#endif
11285
11286#if defined S_ISBLK && defined S_IFCHR
11287extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11288#endif
11289
11290#if defined S_ISLNK && defined S_IFREG
11291extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11292#endif
11293
11294#if defined S_ISSOCK && defined S_IFREG
11295extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11296#endif
11297
bec39cab 11298_ACEOF
81ecdfbb
RW
11299if ac_fn_c_try_compile "$LINENO"; then :
11300 ac_cv_header_stat_broken=no
11301else
11302 ac_cv_header_stat_broken=yes
11303fi
11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11305fi
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11307$as_echo "$ac_cv_header_stat_broken" >&6; }
11308if test $ac_cv_header_stat_broken = yes; then
9a156167 11309
81ecdfbb 11310$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11311
bec39cab 11312fi
81ecdfbb
RW
11313
11314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11315$as_echo_n "checking for ANSI C header files... " >&6; }
11316if test "${ac_cv_header_stdc+set}" = set; then :
11317 $as_echo_n "(cached) " >&6
bec39cab 11318else
81ecdfbb 11319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11320/* end confdefs.h. */
81ecdfbb
RW
11321#include <stdlib.h>
11322#include <stdarg.h>
11323#include <string.h>
11324#include <float.h>
11325
a9322a30
TT
11326int
11327main ()
11328{
a9322a30
TT
11329
11330 ;
11331 return 0;
11332}
bec39cab 11333_ACEOF
81ecdfbb
RW
11334if ac_fn_c_try_compile "$LINENO"; then :
11335 ac_cv_header_stdc=yes
bec39cab 11336else
81ecdfbb 11337 ac_cv_header_stdc=no
a9322a30 11338fi
81ecdfbb 11339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11340
81ecdfbb
RW
11341if test $ac_cv_header_stdc = yes; then
11342 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11344/* end confdefs.h. */
11345#include <string.h>
bec39cab 11346
81ecdfbb
RW
11347_ACEOF
11348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11349 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11350
bec39cab 11351else
81ecdfbb
RW
11352 ac_cv_header_stdc=no
11353fi
11354rm -f conftest*
11355
11356fi
11357
11358if test $ac_cv_header_stdc = yes; then
11359 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11361/* end confdefs.h. */
11362#include <stdlib.h>
11363
bec39cab 11364_ACEOF
81ecdfbb
RW
11365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11366 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11367
81ecdfbb
RW
11368else
11369 ac_cv_header_stdc=no
11370fi
11371rm -f conftest*
bec39cab 11372
bec39cab 11373fi
81ecdfbb
RW
11374
11375if test $ac_cv_header_stdc = yes; then
11376 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11377 if test "$cross_compiling" = yes; then :
11378 :
bec39cab 11379else
81ecdfbb 11380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11381/* end confdefs.h. */
81ecdfbb
RW
11382#include <ctype.h>
11383#include <stdlib.h>
11384#if ((' ' & 0x0FF) == 0x020)
11385# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11386# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11387#else
11388# define ISLOWER(c) \
11389 (('a' <= (c) && (c) <= 'i') \
11390 || ('j' <= (c) && (c) <= 'r') \
11391 || ('s' <= (c) && (c) <= 'z'))
11392# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11393#endif
11394
11395#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11396int
11397main ()
11398{
81ecdfbb
RW
11399 int i;
11400 for (i = 0; i < 256; i++)
11401 if (XOR (islower (i), ISLOWER (i))
11402 || toupper (i) != TOUPPER (i))
11403 return 2;
a9322a30
TT
11404 return 0;
11405}
bec39cab 11406_ACEOF
81ecdfbb
RW
11407if ac_fn_c_try_run "$LINENO"; then :
11408
bec39cab 11409else
81ecdfbb
RW
11410 ac_cv_header_stdc=no
11411fi
11412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11413 conftest.$ac_objext conftest.beam conftest.$ac_ext
11414fi
bec39cab 11415
bec39cab 11416fi
a9322a30 11417fi
81ecdfbb
RW
11418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11419$as_echo "$ac_cv_header_stdc" >&6; }
11420if test $ac_cv_header_stdc = yes; then
bec39cab 11421
81ecdfbb 11422$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11423
81ecdfbb 11424fi
bec39cab 11425
81ecdfbb
RW
11426# elf_hp.h is for HP/UX 64-bit shared library support.
11427# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11428# unconditionally, so what's the point in checking these?
11429for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11430 thread_db.h gnu/libc-version.h signal.h stddef.h \
11431 stdlib.h string.h memory.h strings.h sys/fault.h \
11432 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11433 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11434 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11435 sys/types.h sys/wait.h wait.h termios.h termio.h \
11436 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11437do :
11438 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11439ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11440eval as_val=\$$as_ac_Header
11441 if test "x$as_val" = x""yes; then :
bec39cab 11442 cat >>confdefs.h <<_ACEOF
81ecdfbb 11443#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11444_ACEOF
c906108c 11445
bec39cab 11446fi
81ecdfbb
RW
11447
11448done
11449
11450for ac_header in link.h
11451do :
11452 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11453# include <sys/types.h>
11454#endif
11455#if HAVE_NLIST_H
11456# include <nlist.h>
a9322a30
TT
11457#endif
11458
81ecdfbb
RW
11459"
11460if test "x$ac_cv_header_link_h" = x""yes; then :
11461 cat >>confdefs.h <<_ACEOF
11462#define HAVE_LINK_H 1
bec39cab 11463_ACEOF
bec39cab 11464
a9322a30 11465fi
bec39cab 11466
81ecdfbb 11467done
c906108c 11468
81ecdfbb
RW
11469for ac_header in sys/proc.h
11470do :
11471 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11472# include <sys/param.h>
11473#endif
c906108c 11474
81ecdfbb
RW
11475"
11476if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11477 cat >>confdefs.h <<_ACEOF
81ecdfbb 11478#define HAVE_SYS_PROC_H 1
bec39cab 11479_ACEOF
5ee754fc 11480
bec39cab 11481fi
81ecdfbb
RW
11482
11483done
11484
11485for ac_header in sys/user.h
11486do :
11487 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11488# include <sys/param.h>
a9322a30
TT
11489#endif
11490
81ecdfbb
RW
11491"
11492if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11493 cat >>confdefs.h <<_ACEOF
11494#define HAVE_SYS_USER_H 1
bec39cab 11495_ACEOF
bec39cab 11496
a9322a30 11497fi
bec39cab 11498
81ecdfbb 11499done
5ee754fc 11500
5ee754fc 11501
81ecdfbb
RW
11502# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11503# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11504# think that we don't have <curses.h> if we're using GCC.
11505case $host_os in
11506 solaris2.[789])
11507 if test "$GCC" = yes; then
11508
11509$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11510
11511 fi ;;
11512esac
11513for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11514do :
11515 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11516ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11517eval as_val=\$$as_ac_Header
11518 if test "x$as_val" = x""yes; then :
bec39cab 11519 cat >>confdefs.h <<_ACEOF
81ecdfbb 11520#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11521_ACEOF
5ee754fc
MK
11522
11523fi
11524
81ecdfbb 11525done
bec39cab 11526
81ecdfbb
RW
11527for ac_header in term.h
11528do :
11529 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11530# include <curses.h>
11531#endif
bec39cab 11532
81ecdfbb
RW
11533"
11534if test "x$ac_cv_header_term_h" = x""yes; then :
11535 cat >>confdefs.h <<_ACEOF
11536#define HAVE_TERM_H 1
a8111142 11537_ACEOF
a8111142 11538
a8111142 11539fi
a8111142 11540
81ecdfbb 11541done
a8111142
TT
11542
11543
81ecdfbb
RW
11544# ------------------------- #
11545# Checks for declarations. #
11546# ------------------------- #
a9322a30 11547
81ecdfbb
RW
11548ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11549if test "x$ac_cv_have_decl_free" = x""yes; then :
11550 ac_have_decl=1
bec39cab 11551else
81ecdfbb
RW
11552 ac_have_decl=0
11553fi
11554
11555cat >>confdefs.h <<_ACEOF
11556#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11557_ACEOF
81ecdfbb
RW
11558ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11559if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11560 ac_have_decl=1
11561else
11562 ac_have_decl=0
11563fi
11564
11565cat >>confdefs.h <<_ACEOF
11566#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11567_ACEOF
81ecdfbb
RW
11568ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11569if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11570 ac_have_decl=1
bec39cab 11571else
81ecdfbb
RW
11572 ac_have_decl=0
11573fi
bec39cab 11574
81ecdfbb
RW
11575cat >>confdefs.h <<_ACEOF
11576#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11577_ACEOF
81ecdfbb
RW
11578ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11579if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11580 ac_have_decl=1
11581else
11582 ac_have_decl=0
11583fi
11584
11585cat >>confdefs.h <<_ACEOF
11586#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11587_ACEOF
81ecdfbb
RW
11588ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11589if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11590 ac_have_decl=1
bec39cab 11591else
81ecdfbb
RW
11592 ac_have_decl=0
11593fi
5ee754fc 11594
81ecdfbb
RW
11595cat >>confdefs.h <<_ACEOF
11596#define HAVE_DECL_STRSTR $ac_have_decl
11597_ACEOF
11598ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11599if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11600 ac_have_decl=1
11601else
11602 ac_have_decl=0
5ee754fc 11603fi
81ecdfbb
RW
11604
11605cat >>confdefs.h <<_ACEOF
11606#define HAVE_DECL_GETOPT $ac_have_decl
11607_ACEOF
11608ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11609if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11610 ac_have_decl=1
11611else
11612 ac_have_decl=0
5ee754fc 11613fi
81ecdfbb
RW
11614
11615cat >>confdefs.h <<_ACEOF
11616#define HAVE_DECL_SNPRINTF $ac_have_decl
11617_ACEOF
11618ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11619if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11620 ac_have_decl=1
11621else
11622 ac_have_decl=0
5ee754fc
MK
11623fi
11624
a9322a30 11625cat >>confdefs.h <<_ACEOF
81ecdfbb 11626#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11627_ACEOF
5ee754fc 11628
5ee754fc 11629
81ecdfbb
RW
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11631$as_echo_n "checking for LC_MESSAGES... " >&6; }
11632if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11633 $as_echo_n "(cached) " >&6
bec39cab 11634else
81ecdfbb 11635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11636/* end confdefs.h. */
81ecdfbb 11637#include <locale.h>
a9322a30
TT
11638int
11639main ()
11640{
81ecdfbb 11641return LC_MESSAGES
a9322a30
TT
11642 ;
11643 return 0;
11644}
bec39cab 11645_ACEOF
81ecdfbb
RW
11646if ac_fn_c_try_link "$LINENO"; then :
11647 am_cv_val_LC_MESSAGES=yes
bec39cab 11648else
81ecdfbb
RW
11649 am_cv_val_LC_MESSAGES=no
11650fi
11651rm -f core conftest.err conftest.$ac_objext \
11652 conftest$ac_exeext conftest.$ac_ext
11653fi
11654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11655$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11656 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11657
81ecdfbb
RW
11658$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11659
11660 fi
11661
11662
11663# ----------------------- #
11664# Checks for structures. #
11665# ----------------------- #
11666
11667ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11668if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11669
11670cat >>confdefs.h <<_ACEOF
11671#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11672_ACEOF
7eb368b3 11673
81ecdfbb 11674
7eb368b3 11675fi
81ecdfbb
RW
11676ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11677if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11678
a9322a30
TT
11679cat >>confdefs.h <<_ACEOF
11680#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11681_ACEOF
11682
a9322a30 11683
7eb368b3
NR
11684fi
11685
7eb368b3 11686
a9322a30
TT
11687# ------------------ #
11688# Checks for types. #
11689# ------------------ #
7eb368b3 11690
81ecdfbb
RW
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11692$as_echo_n "checking return type of signal handlers... " >&6; }
11693if test "${ac_cv_type_signal+set}" = set; then :
11694 $as_echo_n "(cached) " >&6
bec39cab 11695else
81ecdfbb 11696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11697/* end confdefs.h. */
a9322a30
TT
11698#include <sys/types.h>
11699#include <signal.h>
7cb9022a 11700
a9322a30
TT
11701int
11702main ()
11703{
81ecdfbb 11704return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11705 ;
11706 return 0;
11707}
bec39cab 11708_ACEOF
81ecdfbb
RW
11709if ac_fn_c_try_compile "$LINENO"; then :
11710 ac_cv_type_signal=int
bec39cab 11711else
81ecdfbb 11712 ac_cv_type_signal=void
bec39cab 11713fi
81ecdfbb 11714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11715fi
81ecdfbb
RW
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11717$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11718
a9322a30
TT
11719cat >>confdefs.h <<_ACEOF
11720#define RETSIGTYPE $ac_cv_type_signal
11721_ACEOF
5ee754fc 11722
bec39cab 11723
81ecdfbb 11724ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11725#include <sys/socket.h>
11726
81ecdfbb
RW
11727"
11728if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11729
a9322a30
TT
11730cat >>confdefs.h <<_ACEOF
11731#define HAVE_SOCKLEN_T 1
11732_ACEOF
11733
11734
11735fi
11736
11737
11738# ------------------------------------- #
11739# Checks for compiler characteristics. #
11740# ------------------------------------- #
11741
81ecdfbb
RW
11742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11743$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11744if test "${ac_cv_c_const+set}" = set; then :
11745 $as_echo_n "(cached) " >&6
a9322a30 11746else
81ecdfbb 11747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11748/* end confdefs.h. */
a9322a30
TT
11749
11750int
11751main ()
11752{
11753/* FIXME: Include the comments suggested by Paul. */
11754#ifndef __cplusplus
11755 /* Ultrix mips cc rejects this. */
11756 typedef int charset[2];
81ecdfbb 11757 const charset cs;
a9322a30 11758 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11759 char const *const *pcpcc;
11760 char **ppc;
a9322a30
TT
11761 /* NEC SVR4.0.2 mips cc rejects this. */
11762 struct point {int x, y;};
11763 static struct point const zero = {0,0};
11764 /* AIX XL C 1.02.0.0 rejects this.
11765 It does not let you subtract one const X* pointer from another in
11766 an arm of an if-expression whose if-part is not a constant
11767 expression */
11768 const char *g = "string";
81ecdfbb 11769 pcpcc = &g + (g ? g-g : 0);
a9322a30 11770 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11771 ++pcpcc;
11772 ppc = (char**) pcpcc;
11773 pcpcc = (char const *const *) ppc;
a9322a30
TT
11774 { /* SCO 3.2v4 cc rejects this. */
11775 char *t;
11776 char const *s = 0 ? (char *) 0 : (char const *) 0;
11777
11778 *t++ = 0;
81ecdfbb 11779 if (s) return 0;
a9322a30
TT
11780 }
11781 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11782 int x[] = {25, 17};
11783 const int *foo = &x[0];
11784 ++foo;
11785 }
11786 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11787 typedef const int *iptr;
11788 iptr p = 0;
11789 ++p;
11790 }
11791 { /* AIX XL C 1.02.0.0 rejects this saying
11792 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11793 struct s { int j; const int *ap[3]; };
11794 struct s *b; b->j = 5;
11795 }
11796 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11797 const int foo = 10;
81ecdfbb 11798 if (!foo) return 0;
a9322a30 11799 }
81ecdfbb 11800 return !cs[0] && !zero.x;
a9322a30
TT
11801#endif
11802
11803 ;
11804 return 0;
11805}
bec39cab 11806_ACEOF
81ecdfbb 11807if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11808 ac_cv_c_const=yes
5ee754fc 11809else
81ecdfbb 11810 ac_cv_c_const=no
5ee754fc 11811fi
81ecdfbb 11812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11813fi
81ecdfbb
RW
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11815$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11816if test $ac_cv_c_const = no; then
bec39cab 11817
81ecdfbb 11818$as_echo "#define const /**/" >>confdefs.h
bec39cab 11819
5ee754fc 11820fi
bec39cab 11821
81ecdfbb
RW
11822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11823$as_echo_n "checking for inline... " >&6; }
11824if test "${ac_cv_c_inline+set}" = set; then :
11825 $as_echo_n "(cached) " >&6
bec39cab 11826else
a9322a30
TT
11827 ac_cv_c_inline=no
11828for ac_kw in inline __inline__ __inline; do
81ecdfbb 11829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11830/* end confdefs.h. */
a9322a30
TT
11831#ifndef __cplusplus
11832typedef int foo_t;
11833static $ac_kw foo_t static_foo () {return 0; }
11834$ac_kw foo_t foo () {return 0; }
11835#endif
11836
bec39cab 11837_ACEOF
81ecdfbb
RW
11838if ac_fn_c_try_compile "$LINENO"; then :
11839 ac_cv_c_inline=$ac_kw
bec39cab 11840fi
81ecdfbb
RW
11841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11842 test "$ac_cv_c_inline" != no && break
a9322a30 11843done
bec39cab 11844
5ee754fc 11845fi
81ecdfbb
RW
11846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11847$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11848
a9322a30
TT
11849case $ac_cv_c_inline in
11850 inline | yes) ;;
11851 *)
11852 case $ac_cv_c_inline in
11853 no) ac_val=;;
11854 *) ac_val=$ac_cv_c_inline;;
11855 esac
11856 cat >>confdefs.h <<_ACEOF
11857#ifndef __cplusplus
11858#define inline $ac_val
11859#endif
11860_ACEOF
bec39cab
AC
11861 ;;
11862esac
bec39cab 11863
81ecdfbb
RW
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11865$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11866if test "${ac_cv_c_bigendian+set}" = set; then :
11867 $as_echo_n "(cached) " >&6
bec39cab 11868else
81ecdfbb
RW
11869 ac_cv_c_bigendian=unknown
11870 # See if we're dealing with a universal compiler.
11871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11872/* end confdefs.h. */
11873#ifndef __APPLE_CC__
11874 not a universal capable compiler
11875 #endif
11876 typedef int dummy;
11877
11878_ACEOF
11879if ac_fn_c_try_compile "$LINENO"; then :
11880
11881 # Check for potential -arch flags. It is not universal unless
11882 # there are at least two -arch flags with different values.
11883 ac_arch=
11884 ac_prev=
11885 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11886 if test -n "$ac_prev"; then
11887 case $ac_word in
11888 i?86 | x86_64 | ppc | ppc64)
11889 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11890 ac_arch=$ac_word
11891 else
11892 ac_cv_c_bigendian=universal
11893 break
11894 fi
11895 ;;
11896 esac
11897 ac_prev=
11898 elif test "x$ac_word" = "x-arch"; then
11899 ac_prev=arch
11900 fi
11901 done
11902fi
11903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11904 if test $ac_cv_c_bigendian = unknown; then
11905 # See if sys/param.h defines the BYTE_ORDER macro.
11906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11907/* end confdefs.h. */
a9322a30 11908#include <sys/types.h>
81ecdfbb 11909 #include <sys/param.h>
a9322a30
TT
11910
11911int
11912main ()
11913{
81ecdfbb
RW
11914#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11915 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11916 && LITTLE_ENDIAN)
11917 bogus endian macros
11918 #endif
a9322a30
TT
11919
11920 ;
11921 return 0;
11922}
bec39cab 11923_ACEOF
81ecdfbb 11924if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11925 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11927/* end confdefs.h. */
a9322a30 11928#include <sys/types.h>
81ecdfbb 11929 #include <sys/param.h>
a9322a30
TT
11930
11931int
11932main ()
11933{
11934#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11935 not big endian
11936 #endif
a9322a30
TT
11937
11938 ;
11939 return 0;
11940}
bec39cab 11941_ACEOF
81ecdfbb 11942if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11943 ac_cv_c_bigendian=yes
5ee754fc 11944else
81ecdfbb 11945 ac_cv_c_bigendian=no
5ee754fc 11946fi
81ecdfbb
RW
11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948fi
11949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11950 fi
11951 if test $ac_cv_c_bigendian = unknown; then
11952 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954/* end confdefs.h. */
11955#include <limits.h>
bec39cab 11956
81ecdfbb
RW
11957int
11958main ()
11959{
11960#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11961 bogus endian macros
11962 #endif
11963
11964 ;
11965 return 0;
11966}
7eb368b3 11967_ACEOF
81ecdfbb
RW
11968if ac_fn_c_try_compile "$LINENO"; then :
11969 # It does; now see whether it defined to _BIG_ENDIAN or not.
11970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11971/* end confdefs.h. */
81ecdfbb
RW
11972#include <limits.h>
11973
7eb368b3
NR
11974int
11975main ()
11976{
81ecdfbb
RW
11977#ifndef _BIG_ENDIAN
11978 not big endian
11979 #endif
11980
7eb368b3
NR
11981 ;
11982 return 0;
11983}
11984_ACEOF
81ecdfbb 11985if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11986 ac_cv_c_bigendian=yes
81ecdfbb
RW
11987else
11988 ac_cv_c_bigendian=no
a9322a30 11989fi
81ecdfbb 11990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11991fi
81ecdfbb
RW
11992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11993 fi
11994 if test $ac_cv_c_bigendian = unknown; then
11995 # Compile a test program.
11996 if test "$cross_compiling" = yes; then :
11997 # Try to guess by grepping values from an object file.
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11999/* end confdefs.h. */
12000short int ascii_mm[] =
12001 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12002 short int ascii_ii[] =
12003 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12004 int use_ascii (int i) {
12005 return ascii_mm[i] + ascii_ii[i];
12006 }
12007 short int ebcdic_ii[] =
12008 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12009 short int ebcdic_mm[] =
12010 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12011 int use_ebcdic (int i) {
12012 return ebcdic_mm[i] + ebcdic_ii[i];
12013 }
12014 extern int foo;
7eb368b3 12015
81ecdfbb
RW
12016int
12017main ()
12018{
12019return use_ascii (foo) == use_ebcdic (foo);
12020 ;
12021 return 0;
12022}
12023_ACEOF
12024if ac_fn_c_try_compile "$LINENO"; then :
12025 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12026 ac_cv_c_bigendian=yes
12027 fi
12028 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12029 if test "$ac_cv_c_bigendian" = unknown; then
12030 ac_cv_c_bigendian=no
12031 else
12032 # finding both strings is unlikely to happen, but who knows?
12033 ac_cv_c_bigendian=unknown
12034 fi
12035 fi
7eb368b3 12036fi
81ecdfbb 12037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12038else
81ecdfbb 12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12040/* end confdefs.h. */
81ecdfbb 12041$ac_includes_default
d3ea6809
MM
12042int
12043main ()
12044{
81ecdfbb
RW
12045
12046 /* Are we little or big endian? From Harbison&Steele. */
12047 union
12048 {
12049 long int l;
12050 char c[sizeof (long int)];
12051 } u;
12052 u.l = 1;
12053 return u.c[sizeof (long int) - 1] == 1;
12054
12055 ;
12056 return 0;
d3ea6809
MM
12057}
12058_ACEOF
81ecdfbb 12059if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12060 ac_cv_c_bigendian=no
d3ea6809 12061else
81ecdfbb 12062 ac_cv_c_bigendian=yes
d3ea6809 12063fi
81ecdfbb
RW
12064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12065 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12066fi
a9322a30 12067
81ecdfbb
RW
12068 fi
12069fi
12070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12071$as_echo "$ac_cv_c_bigendian" >&6; }
12072 case $ac_cv_c_bigendian in #(
12073 yes)
12074 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12075;; #(
12076 no)
12077 ;; #(
12078 universal)
12079
12080$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12081
12082 ;; #(
12083 *)
12084 as_fn_error "unknown endianness
12085 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12086 esac
d3ea6809
MM
12087
12088
a9322a30
TT
12089# ------------------------------ #
12090# Checks for library functions. #
12091# ------------------------------ #
d3ea6809 12092
a9322a30
TT
12093# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12094# for constant arguments. Useless!
81ecdfbb
RW
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12096$as_echo_n "checking for working alloca.h... " >&6; }
12097if test "${ac_cv_working_alloca_h+set}" = set; then :
12098 $as_echo_n "(cached) " >&6
d3ea6809 12099else
81ecdfbb 12100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12101/* end confdefs.h. */
a9322a30 12102#include <alloca.h>
bec39cab
AC
12103int
12104main ()
12105{
a9322a30 12106char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12107 if (p) return 0;
bec39cab
AC
12108 ;
12109 return 0;
12110}
12111_ACEOF
81ecdfbb 12112if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12113 ac_cv_working_alloca_h=yes
bec39cab 12114else
81ecdfbb 12115 ac_cv_working_alloca_h=no
bec39cab 12116fi
81ecdfbb
RW
12117rm -f core conftest.err conftest.$ac_objext \
12118 conftest$ac_exeext conftest.$ac_ext
bec39cab 12119fi
81ecdfbb
RW
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12121$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12122if test $ac_cv_working_alloca_h = yes; then
12123
81ecdfbb 12124$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12125
c906108c 12126fi
bec39cab 12127
81ecdfbb
RW
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12129$as_echo_n "checking for alloca... " >&6; }
12130if test "${ac_cv_func_alloca_works+set}" = set; then :
12131 $as_echo_n "(cached) " >&6
bec39cab 12132else
81ecdfbb 12133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12134/* end confdefs.h. */
a9322a30
TT
12135#ifdef __GNUC__
12136# define alloca __builtin_alloca
b4e70030 12137#else
a9322a30
TT
12138# ifdef _MSC_VER
12139# include <malloc.h>
12140# define alloca _alloca
12141# else
81ecdfbb 12142# ifdef HAVE_ALLOCA_H
a9322a30
TT
12143# include <alloca.h>
12144# else
12145# ifdef _AIX
12146 #pragma alloca
12147# else
12148# ifndef alloca /* predefined by HP cc +Olibcalls */
12149char *alloca ();
12150# endif
12151# endif
12152# endif
12153# endif
c906108c 12154#endif
97bf5e38 12155
bec39cab
AC
12156int
12157main ()
12158{
a9322a30 12159char *p = (char *) alloca (1);
81ecdfbb 12160 if (p) return 0;
bec39cab
AC
12161 ;
12162 return 0;
12163}
12164_ACEOF
81ecdfbb 12165if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12166 ac_cv_func_alloca_works=yes
bec39cab 12167else
81ecdfbb 12168 ac_cv_func_alloca_works=no
bec39cab 12169fi
81ecdfbb
RW
12170rm -f core conftest.err conftest.$ac_objext \
12171 conftest$ac_exeext conftest.$ac_ext
bec39cab 12172fi
81ecdfbb
RW
12173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12174$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12175
12176if test $ac_cv_func_alloca_works = yes; then
12177
81ecdfbb 12178$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12179
a9322a30
TT
12180else
12181 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12182# that cause trouble. Some versions do not even contain alloca or
12183# contain a buggy version. If you still want to use their alloca,
12184# use ar to extract alloca.o from them instead of compiling alloca.c.
12185
81ecdfbb 12186ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12187
81ecdfbb 12188$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12189
bec39cab 12190
81ecdfbb
RW
12191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12192$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12193if test "${ac_cv_os_cray+set}" = set; then :
12194 $as_echo_n "(cached) " >&6
a9322a30 12195else
81ecdfbb 12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12197/* end confdefs.h. */
81ecdfbb 12198#if defined CRAY && ! defined CRAY2
a9322a30
TT
12199webecray
12200#else
12201wenotbecray
12202#endif
12203
12204_ACEOF
12205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12206 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12207 ac_cv_os_cray=yes
12208else
81ecdfbb 12209 ac_cv_os_cray=no
bec39cab 12210fi
81ecdfbb
RW
12211rm -f conftest*
12212
bec39cab 12213fi
81ecdfbb
RW
12214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12215$as_echo "$ac_cv_os_cray" >&6; }
12216if test $ac_cv_os_cray = yes; then
12217 for ac_func in _getb67 GETB67 getb67; do
12218 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12219ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12220eval as_val=\$$as_ac_var
12221 if test "x$as_val" = x""yes; then :
a9322a30
TT
12222
12223cat >>confdefs.h <<_ACEOF
12224#define CRAY_STACKSEG_END $ac_func
bec39cab 12225_ACEOF
c906108c 12226
a9322a30 12227 break
c906108c
SS
12228fi
12229
a9322a30
TT
12230 done
12231fi
bec39cab 12232
81ecdfbb
RW
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12234$as_echo_n "checking stack direction for C alloca... " >&6; }
12235if test "${ac_cv_c_stack_direction+set}" = set; then :
12236 $as_echo_n "(cached) " >&6
a9322a30 12237else
81ecdfbb 12238 if test "$cross_compiling" = yes; then :
a9322a30 12239 ac_cv_c_stack_direction=0
bec39cab 12240else
81ecdfbb 12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12242/* end confdefs.h. */
81ecdfbb 12243$ac_includes_default
a9322a30
TT
12244int
12245find_stack_direction ()
b4e70030 12246{
a9322a30
TT
12247 static char *addr = 0;
12248 auto char dummy;
12249 if (addr == 0)
12250 {
12251 addr = &dummy;
12252 return find_stack_direction ();
12253 }
12254 else
12255 return (&dummy > addr) ? 1 : -1;
b4e70030 12256}
b757528f 12257
bec39cab
AC
12258int
12259main ()
12260{
81ecdfbb 12261 return find_stack_direction () < 0;
bec39cab
AC
12262}
12263_ACEOF
81ecdfbb 12264if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12265 ac_cv_c_stack_direction=1
12266else
81ecdfbb 12267 ac_cv_c_stack_direction=-1
a9322a30 12268fi
81ecdfbb
RW
12269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12270 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12271fi
a9322a30 12272
81ecdfbb
RW
12273fi
12274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12275$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12276cat >>confdefs.h <<_ACEOF
12277#define STACK_DIRECTION $ac_cv_c_stack_direction
12278_ACEOF
12279
12280
12281fi
12282
a9322a30 12283for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12284do :
12285 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12286ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12287eval as_val=\$$as_ac_Header
12288 if test "x$as_val" = x""yes; then :
bec39cab 12289 cat >>confdefs.h <<_ACEOF
81ecdfbb 12290#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12291_ACEOF
b757528f 12292
b757528f 12293fi
bec39cab 12294
a9322a30 12295done
a3828db0 12296
a9322a30 12297for ac_func in getpagesize
81ecdfbb
RW
12298do :
12299 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12300if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12301 cat >>confdefs.h <<_ACEOF
81ecdfbb 12302#define HAVE_GETPAGESIZE 1
bec39cab 12303_ACEOF
bcb3dc3d 12304
bcb3dc3d
MK
12305fi
12306done
12307
81ecdfbb
RW
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12309$as_echo_n "checking for working mmap... " >&6; }
12310if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12311 $as_echo_n "(cached) " >&6
a9322a30 12312else
81ecdfbb 12313 if test "$cross_compiling" = yes; then :
a9322a30 12314 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12315else
81ecdfbb 12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12317/* end confdefs.h. */
a9322a30
TT
12318$ac_includes_default
12319/* malloc might have been renamed as rpl_malloc. */
12320#undef malloc
bec39cab 12321
a9322a30
TT
12322/* Thanks to Mike Haertel and Jim Avera for this test.
12323 Here is a matrix of mmap possibilities:
12324 mmap private not fixed
12325 mmap private fixed at somewhere currently unmapped
12326 mmap private fixed at somewhere already mapped
12327 mmap shared not fixed
12328 mmap shared fixed at somewhere currently unmapped
12329 mmap shared fixed at somewhere already mapped
12330 For private mappings, we should verify that changes cannot be read()
12331 back from the file, nor mmap's back from the file at a different
12332 address. (There have been systems where private was not correctly
12333 implemented like the infamous i386 svr4.0, and systems where the
12334 VM page cache was not coherent with the file system buffer cache
12335 like early versions of FreeBSD and possibly contemporary NetBSD.)
12336 For shared mappings, we should conversely verify that changes get
12337 propagated back to all the places they're supposed to be.
bec39cab 12338
a9322a30
TT
12339 Grep wants private fixed already mapped.
12340 The main things grep needs to know about mmap are:
12341 * does it exist and is it safe to write into the mmap'd area
12342 * how to use it (BSD variants) */
8b9cf735 12343
a9322a30
TT
12344#include <fcntl.h>
12345#include <sys/mman.h>
8b9cf735 12346
81ecdfbb 12347#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12348char *malloc ();
a3828db0
MK
12349#endif
12350
a9322a30 12351/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12352#ifndef HAVE_GETPAGESIZE
a9322a30 12353/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12354# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12355# define HAVE_SYS_PARAM_H 1
12356# endif
12357
12358# ifdef _SC_PAGESIZE
12359# define getpagesize() sysconf(_SC_PAGESIZE)
12360# else /* no _SC_PAGESIZE */
81ecdfbb 12361# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12362# include <sys/param.h>
12363# ifdef EXEC_PAGESIZE
12364# define getpagesize() EXEC_PAGESIZE
12365# else /* no EXEC_PAGESIZE */
12366# ifdef NBPG
12367# define getpagesize() NBPG * CLSIZE
12368# ifndef CLSIZE
12369# define CLSIZE 1
12370# endif /* no CLSIZE */
12371# else /* no NBPG */
12372# ifdef NBPC
12373# define getpagesize() NBPC
12374# else /* no NBPC */
12375# ifdef PAGESIZE
12376# define getpagesize() PAGESIZE
12377# endif /* PAGESIZE */
12378# endif /* no NBPC */
12379# endif /* no NBPG */
12380# endif /* no EXEC_PAGESIZE */
12381# else /* no HAVE_SYS_PARAM_H */
12382# define getpagesize() 8192 /* punt totally */
12383# endif /* no HAVE_SYS_PARAM_H */
12384# endif /* no _SC_PAGESIZE */
12385
12386#endif /* no HAVE_GETPAGESIZE */
12387
bec39cab
AC
12388int
12389main ()
12390{
a9322a30
TT
12391 char *data, *data2, *data3;
12392 int i, pagesize;
12393 int fd;
12394
12395 pagesize = getpagesize ();
12396
12397 /* First, make a file with some known garbage in it. */
12398 data = (char *) malloc (pagesize);
12399 if (!data)
81ecdfbb 12400 return 1;
a9322a30
TT
12401 for (i = 0; i < pagesize; ++i)
12402 *(data + i) = rand ();
12403 umask (0);
12404 fd = creat ("conftest.mmap", 0600);
12405 if (fd < 0)
81ecdfbb 12406 return 1;
a9322a30 12407 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12408 return 1;
a9322a30
TT
12409 close (fd);
12410
12411 /* Next, try to mmap the file at a fixed address which already has
12412 something else allocated at it. If we can, also make sure that
12413 we see the same garbage. */
12414 fd = open ("conftest.mmap", O_RDWR);
12415 if (fd < 0)
81ecdfbb 12416 return 1;
a9322a30
TT
12417 data2 = (char *) malloc (2 * pagesize);
12418 if (!data2)
81ecdfbb
RW
12419 return 1;
12420 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12421 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12422 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12423 return 1;
a9322a30
TT
12424 for (i = 0; i < pagesize; ++i)
12425 if (*(data + i) != *(data2 + i))
81ecdfbb 12426 return 1;
a9322a30
TT
12427
12428 /* Finally, make sure that changes to the mapped area do not
12429 percolate back to the file as seen by read(). (This is a bug on
12430 some variants of i386 svr4.0.) */
12431 for (i = 0; i < pagesize; ++i)
12432 *(data2 + i) = *(data2 + i) + 1;
12433 data3 = (char *) malloc (pagesize);
12434 if (!data3)
81ecdfbb 12435 return 1;
a9322a30 12436 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12437 return 1;
a9322a30
TT
12438 for (i = 0; i < pagesize; ++i)
12439 if (*(data + i) != *(data3 + i))
81ecdfbb 12440 return 1;
a9322a30 12441 close (fd);
81ecdfbb 12442 return 0;
bec39cab
AC
12443}
12444_ACEOF
81ecdfbb 12445if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12446 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12447else
81ecdfbb 12448 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12449fi
81ecdfbb
RW
12450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12451 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12452fi
81ecdfbb 12453
a9322a30 12454fi
81ecdfbb
RW
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12456$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12457if test $ac_cv_func_mmap_fixed_mapped = yes; then
12458
81ecdfbb 12459$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12460
086ec9eb 12461fi
a9322a30 12462rm -f conftest.mmap
a3828db0 12463
81ecdfbb
RW
12464ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12465if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12466
a9322a30
TT
12467else
12468
12469cat >>confdefs.h <<_ACEOF
12470#define pid_t int
bec39cab 12471_ACEOF
086ec9eb
MK
12472
12473fi
12474
81ecdfbb
RW
12475for ac_header in vfork.h
12476do :
12477 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12478if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12479 cat >>confdefs.h <<_ACEOF
81ecdfbb 12480#define HAVE_VFORK_H 1
bec39cab 12481_ACEOF
c906108c
SS
12482
12483fi
a9322a30 12484
a3828db0 12485done
c906108c 12486
a9322a30 12487for ac_func in fork vfork
81ecdfbb
RW
12488do :
12489 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12490ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12491eval as_val=\$$as_ac_var
12492 if test "x$as_val" = x""yes; then :
a3828db0 12493 cat >>confdefs.h <<_ACEOF
81ecdfbb 12494#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12495_ACEOF
b83266a0 12496
97bf5e38 12497fi
a3828db0 12498done
b83266a0 12499
a9322a30 12500if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12502$as_echo_n "checking for working fork... " >&6; }
12503if test "${ac_cv_func_fork_works+set}" = set; then :
12504 $as_echo_n "(cached) " >&6
a9322a30 12505else
81ecdfbb 12506 if test "$cross_compiling" = yes; then :
a9322a30
TT
12507 ac_cv_func_fork_works=cross
12508else
81ecdfbb
RW
12509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510/* end confdefs.h. */
12511$ac_includes_default
12512int
12513main ()
12514{
12515
12516 /* By Ruediger Kuhlmann. */
12517 return fork () < 0;
12518
12519 ;
12520 return 0;
12521}
a9322a30 12522_ACEOF
81ecdfbb 12523if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12524 ac_cv_func_fork_works=yes
12525else
81ecdfbb 12526 ac_cv_func_fork_works=no
a9322a30 12527fi
81ecdfbb
RW
12528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12529 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12530fi
81ecdfbb 12531
a9322a30 12532fi
81ecdfbb
RW
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12534$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12535
12536else
12537 ac_cv_func_fork_works=$ac_cv_func_fork
12538fi
12539if test "x$ac_cv_func_fork_works" = xcross; then
12540 case $host in
12541 *-*-amigaos* | *-*-msdosdjgpp*)
12542 # Override, as these systems have only a dummy fork() stub
12543 ac_cv_func_fork_works=no
12544 ;;
12545 *)
12546 ac_cv_func_fork_works=yes
12547 ;;
12548 esac
81ecdfbb
RW
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12550$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12551fi
12552ac_cv_func_vfork_works=$ac_cv_func_vfork
12553if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12555$as_echo_n "checking for working vfork... " >&6; }
12556if test "${ac_cv_func_vfork_works+set}" = set; then :
12557 $as_echo_n "(cached) " >&6
a9322a30 12558else
81ecdfbb 12559 if test "$cross_compiling" = yes; then :
a9322a30
TT
12560 ac_cv_func_vfork_works=cross
12561else
81ecdfbb 12562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12563/* end confdefs.h. */
12564/* Thanks to Paul Eggert for this test. */
81ecdfbb 12565$ac_includes_default
a9322a30 12566#include <sys/wait.h>
81ecdfbb 12567#ifdef HAVE_VFORK_H
a9322a30
TT
12568# include <vfork.h>
12569#endif
12570/* On some sparc systems, changes by the child to local and incoming
12571 argument registers are propagated back to the parent. The compiler
12572 is told about this with #include <vfork.h>, but some compilers
12573 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12574 static variable whose address is put into a register that is
12575 clobbered by the vfork. */
12576static void
12577#ifdef __cplusplus
12578sparc_address_test (int arg)
12579# else
12580sparc_address_test (arg) int arg;
12581#endif
12582{
12583 static pid_t child;
12584 if (!child) {
12585 child = vfork ();
12586 if (child < 0) {
12587 perror ("vfork");
12588 _exit(2);
12589 }
12590 if (!child) {
12591 arg = getpid();
12592 write(-1, "", 0);
12593 _exit (arg);
12594 }
12595 }
12596}
12597
12598int
12599main ()
12600{
12601 pid_t parent = getpid ();
12602 pid_t child;
12603
12604 sparc_address_test (0);
12605
12606 child = vfork ();
12607
12608 if (child == 0) {
12609 /* Here is another test for sparc vfork register problems. This
12610 test uses lots of local variables, at least as many local
12611 variables as main has allocated so far including compiler
12612 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12613 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12614 reuse the register of parent for one of the local variables,
12615 since it will think that parent can't possibly be used any more
12616 in this routine. Assigning to the local variable will thus
12617 munge parent in the parent process. */
12618 pid_t
12619 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12620 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12621 /* Convince the compiler that p..p7 are live; otherwise, it might
12622 use the same hardware register for all 8 local variables. */
12623 if (p != p1 || p != p2 || p != p3 || p != p4
12624 || p != p5 || p != p6 || p != p7)
12625 _exit(1);
12626
12627 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12628 from child file descriptors. If the child closes a descriptor
12629 before it execs or exits, this munges the parent's descriptor
12630 as well. Test for this by closing stdout in the child. */
12631 _exit(close(fileno(stdout)) != 0);
12632 } else {
12633 int status;
12634 struct stat st;
12635
12636 while (wait(&status) != child)
12637 ;
81ecdfbb 12638 return (
a9322a30
TT
12639 /* Was there some problem with vforking? */
12640 child < 0
12641
12642 /* Did the child fail? (This shouldn't happen.) */
12643 || status
12644
12645 /* Did the vfork/compiler bug occur? */
12646 || parent != getpid()
12647
12648 /* Did the file descriptor bug occur? */
12649 || fstat(fileno(stdout), &st) != 0
12650 );
12651 }
12652}
12653_ACEOF
81ecdfbb 12654if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12655 ac_cv_func_vfork_works=yes
12656else
81ecdfbb 12657 ac_cv_func_vfork_works=no
a9322a30 12658fi
81ecdfbb
RW
12659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12660 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12661fi
81ecdfbb 12662
a9322a30 12663fi
81ecdfbb
RW
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12665$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12666
12667fi;
12668if test "x$ac_cv_func_fork_works" = xcross; then
12669 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12671$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12672fi
12673
12674if test "x$ac_cv_func_vfork_works" = xyes; then
12675
81ecdfbb 12676$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12677
12678else
12679
81ecdfbb 12680$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12681
12682fi
12683if test "x$ac_cv_func_fork_works" = xyes; then
12684
81ecdfbb 12685$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12686
12687fi
12688
a9322a30 12689for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12690 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12691 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12692 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12693 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12694do :
12695 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12696ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12697eval as_val=\$$as_ac_var
12698 if test "x$as_val" = x""yes; then :
6c7a06a3 12699 cat >>confdefs.h <<_ACEOF
81ecdfbb 12700#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12701_ACEOF
12702
12703fi
12704done
12705
12706
81ecdfbb
RW
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12708$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12709if test "${am_cv_langinfo_codeset+set}" = set; then :
12710 $as_echo_n "(cached) " >&6
6c7a06a3 12711else
81ecdfbb 12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12713/* end confdefs.h. */
12714#include <langinfo.h>
12715int
12716main ()
12717{
12718char* cs = nl_langinfo(CODESET);
bec39cab
AC
12719 ;
12720 return 0;
12721}
12722_ACEOF
81ecdfbb 12723if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12724 am_cv_langinfo_codeset=yes
a4db0f07 12725else
81ecdfbb 12726 am_cv_langinfo_codeset=no
a4db0f07 12727fi
81ecdfbb
RW
12728rm -f core conftest.err conftest.$ac_objext \
12729 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12730
a4db0f07 12731fi
81ecdfbb
RW
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12733$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12734 if test $am_cv_langinfo_codeset = yes; then
12735
81ecdfbb 12736$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12737
6c7a06a3 12738 fi
c906108c 12739
06825bd1 12740
a3828db0
MK
12741# Check the return and argument types of ptrace. No canned test for
12742# this, so roll our own.
12743gdb_ptrace_headers='
12744#if HAVE_SYS_TYPES_H
12745# include <sys/types.h>
12746#endif
12747#if HAVE_SYS_PTRACE_H
12748# include <sys/ptrace.h>
12749#endif
12750#if HAVE_UNISTD_H
12751# include <unistd.h>
12752#endif
12753'
12754# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12755ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12756"
12757if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12758 ac_have_decl=1
06825bd1 12759else
81ecdfbb 12760 ac_have_decl=0
06825bd1 12761fi
06825bd1 12762
a3828db0 12763cat >>confdefs.h <<_ACEOF
81ecdfbb 12764#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12765_ACEOF
81ecdfbb 12766if test $ac_have_decl = 1; then :
bec39cab 12767
a3828db0 12768else
a3828db0
MK
12769
12770 : ${gdb_cv_func_ptrace_ret='int'}
12771 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12772
06825bd1
MK
12773fi
12774
064ef605
DJ
12775# Check return type. Varargs (used on GNU/Linux) conflict with the
12776# empty argument list, so check for that explicitly.
81ecdfbb
RW
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12778$as_echo_n "checking return type of ptrace... " >&6; }
12779if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12780 $as_echo_n "(cached) " >&6
bec39cab 12781else
81ecdfbb 12782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12783/* end confdefs.h. */
a3828db0 12784$gdb_ptrace_headers
bec39cab
AC
12785int
12786main ()
12787{
064ef605
DJ
12788extern long ptrace (enum __ptrace_request, ...);
12789 ;
12790 return 0;
12791}
12792_ACEOF
81ecdfbb 12793if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12794 gdb_cv_func_ptrace_ret='long'
12795else
81ecdfbb 12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12797/* end confdefs.h. */
12798$gdb_ptrace_headers
12799int
12800main ()
12801{
a3828db0 12802extern int ptrace ();
bec39cab
AC
12803 ;
12804 return 0;
12805}
12806_ACEOF
81ecdfbb 12807if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12808 gdb_cv_func_ptrace_ret='int'
70f9f479 12809else
81ecdfbb 12810 gdb_cv_func_ptrace_ret='long'
70f9f479 12811fi
81ecdfbb 12812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12813fi
81ecdfbb 12814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12815fi
81ecdfbb
RW
12816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12817$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12818
a3828db0
MK
12819cat >>confdefs.h <<_ACEOF
12820#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12821_ACEOF
70f9f479 12822
a3828db0 12823# Check argument types.
81ecdfbb
RW
12824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12825$as_echo_n "checking types of arguments for ptrace... " >&6; }
12826if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12827 $as_echo_n "(cached) " >&6
bec39cab 12828else
a3828db0 12829
81ecdfbb 12830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12831/* end confdefs.h. */
12832$gdb_ptrace_headers
12833int
12834main ()
12835{
12836extern long ptrace (enum __ptrace_request, ...);
12837 ;
12838 return 0;
12839}
12840_ACEOF
81ecdfbb 12841if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12842 gdb_cv_func_ptrace_args='int,int,long,long'
12843else
064ef605 12844
a3828db0
MK
12845for gdb_arg1 in 'int' 'long'; do
12846 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12847 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12848 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12850/* end confdefs.h. */
a3828db0 12851$gdb_ptrace_headers
bec39cab
AC
12852int
12853main ()
12854{
a3828db0
MK
12855
12856extern $gdb_cv_func_ptrace_ret
12857 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12858
bec39cab
AC
12859 ;
12860 return 0;
12861}
12862_ACEOF
81ecdfbb 12863if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12864 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12865 break 4;
5c7f2947 12866fi
81ecdfbb 12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12868 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12870/* end confdefs.h. */
a3828db0 12871$gdb_ptrace_headers
bec39cab
AC
12872int
12873main ()
12874{
a3828db0
MK
12875
12876extern $gdb_cv_func_ptrace_ret
12877 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12878
bec39cab
AC
12879 ;
12880 return 0;
12881}
12882_ACEOF
81ecdfbb 12883if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12884
12885gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12886 break 5;
78434e59 12887fi
81ecdfbb 12888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12889 done
12890 done
12891 done
12892 done
12893done
12894# Provide a safe default value.
12895: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12896
064ef605 12897fi
81ecdfbb 12898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12899fi
81ecdfbb
RW
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12901$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12902ac_save_IFS=$IFS; IFS=','
12903set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12904IFS=$ac_save_IFS
12905shift
bec39cab 12906
a3828db0
MK
12907cat >>confdefs.h <<_ACEOF
12908#define PTRACE_TYPE_ARG3 $3
12909_ACEOF
12910
12911if test -n "$5"; then
12912
12913cat >>confdefs.h <<_ACEOF
12914#define PTRACE_TYPE_ARG5 $5
bec39cab 12915_ACEOF
78434e59
MK
12916
12917fi
12918
a3828db0 12919if test "$cross_compiling" = no; then
81ecdfbb
RW
12920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12921$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12922if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12923 $as_echo_n "(cached) " >&6
a3828db0 12924else
81ecdfbb
RW
12925 if test "$cross_compiling" = yes; then :
12926 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12927else
81ecdfbb 12928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12929/* end confdefs.h. */
81ecdfbb 12930$ac_includes_default
bec39cab
AC
12931int
12932main ()
12933{
a3828db0
MK
12934/* If this system has a BSD-style setpgrp which takes arguments,
12935 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12936 exit successfully. */
81ecdfbb 12937 return setpgrp (1,1) != -1;
bec39cab
AC
12938 ;
12939 return 0;
12940}
12941_ACEOF
81ecdfbb 12942if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12943 ac_cv_func_setpgrp_void=no
c906108c 12944else
81ecdfbb 12945 ac_cv_func_setpgrp_void=yes
c906108c 12946fi
81ecdfbb
RW
12947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12948 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12949fi
81ecdfbb 12950
a3828db0 12951fi
81ecdfbb
RW
12952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12953$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12954if test $ac_cv_func_setpgrp_void = yes; then
12955
81ecdfbb 12956$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12957
12958fi
a3828db0
MK
12959
12960else
81ecdfbb
RW
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12962$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12963if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12964 $as_echo_n "(cached) " >&6
97bf5e38 12965else
81ecdfbb 12966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12967/* end confdefs.h. */
a3828db0
MK
12968
12969#include <unistd.h>
12970
bec39cab
AC
12971int
12972main ()
12973{
a3828db0
MK
12974
12975 if (setpgrp(1,1) == -1)
12976 exit (0);
12977 else
12978 exit (1);
12979
bec39cab
AC
12980 ;
12981 return 0;
12982}
12983_ACEOF
81ecdfbb 12984if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12985 ac_cv_func_setpgrp_void=no
c906108c 12986else
81ecdfbb 12987 ac_cv_func_setpgrp_void=yes
c906108c 12988fi
81ecdfbb 12989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12990fi
81ecdfbb
RW
12991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12992$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12993if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12994 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12995
a3828db0 12996fi
c906108c
SS
12997fi
12998
a3828db0
MK
12999# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13000# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13002$as_echo_n "checking for sigsetjmp... " >&6; }
13003if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13004 $as_echo_n "(cached) " >&6
bec39cab 13005else
81ecdfbb 13006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13007/* end confdefs.h. */
a3828db0
MK
13008
13009#include <setjmp.h>
13010
bec39cab
AC
13011int
13012main ()
13013{
a3828db0 13014sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13015 ;
13016 return 0;
13017}
13018_ACEOF
81ecdfbb 13019if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13020 gdb_cv_func_sigsetjmp=yes
c906108c 13021else
81ecdfbb 13022 gdb_cv_func_sigsetjmp=no
c906108c 13023fi
81ecdfbb 13024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13025fi
81ecdfbb
RW
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13027$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13028if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13029
81ecdfbb 13030$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13031
97bf5e38 13032fi
c906108c 13033
a3828db0
MK
13034# Assume we'll default to using the included libiberty regex.
13035gdb_use_included_regex=yes
13036
13037# However, if the system regex is GNU regex, then default to *not*
13038# using the included regex.
81ecdfbb
RW
13039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13040$as_echo_n "checking for GNU regex... " >&6; }
13041if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13042 $as_echo_n "(cached) " >&6
bec39cab 13043else
81ecdfbb 13044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13045/* end confdefs.h. */
a3828db0 13046#include <gnu-versions.h>
bec39cab
AC
13047int
13048main ()
13049{
81ecdfbb
RW
13050#define REGEX_INTERFACE_VERSION 1
13051#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13052# error "Version mismatch"
13053#endif
5c45e068
MK
13054 ;
13055 return 0;
13056}
13057_ACEOF
81ecdfbb
RW
13058if ac_fn_c_try_compile "$LINENO"; then :
13059 gdb_cv_have_gnu_regex=yes
5c45e068 13060else
81ecdfbb
RW
13061 gdb_cv_have_gnu_regex=no
13062fi
13063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13064fi
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13066$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13067if test $gdb_cv_have_gnu_regex = yes; then
13068 gdb_use_included_regex=no
5c45e068 13069fi
81ecdfbb
RW
13070
13071
13072# Check whether --with-included-regex was given.
13073if test "${with_included_regex+set}" = set; then :
13074 withval=$with_included_regex; gdb_with_regex=$withval
13075else
13076 gdb_with_regex=$gdb_use_included_regex
c906108c 13077fi
81ecdfbb
RW
13078
13079if test "$gdb_with_regex" = yes; then
13080
13081$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13082
c906108c 13083fi
81ecdfbb
RW
13084
13085# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13086ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13087#include <sys/proc.h>
13088
13089"
13090if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13091
5c45e068 13092cat >>confdefs.h <<_ACEOF
a3828db0 13093#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13094_ACEOF
c906108c 13095
5c45e068 13096
97bf5e38 13097fi
c906108c 13098
5c45e068 13099
a3828db0 13100# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13102$as_echo_n "checking for struct lwp... " >&6; }
13103if test "${gdb_cv_struct_lwp+set}" = set; then :
13104 $as_echo_n "(cached) " >&6
bec39cab 13105else
81ecdfbb 13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13107/* end confdefs.h. */
a3828db0
MK
13108#include <sys/param.h>
13109#include <sys/lwp.h>
bec39cab
AC
13110int
13111main ()
13112{
a3828db0 13113struct lwp l;
bec39cab
AC
13114 ;
13115 return 0;
13116}
13117_ACEOF
81ecdfbb 13118if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13119 gdb_cv_struct_lwp=yes
c906108c 13120else
81ecdfbb 13121 gdb_cv_struct_lwp=no
c906108c 13122fi
81ecdfbb 13123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13124fi
81ecdfbb
RW
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13126$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13127if test $gdb_cv_struct_lwp = yes; then
c906108c 13128
81ecdfbb 13129$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13130
97bf5e38 13131fi
c906108c 13132
a3828db0 13133# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13135$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13136if test "${gdb_cv_struct_reg+set}" = set; then :
13137 $as_echo_n "(cached) " >&6
bec39cab 13138else
81ecdfbb 13139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13140/* end confdefs.h. */
a3828db0
MK
13141#include <sys/types.h>
13142#include <machine/reg.h>
bec39cab
AC
13143int
13144main ()
13145{
a3828db0 13146struct reg r;
bec39cab
AC
13147 ;
13148 return 0;
13149}
13150_ACEOF
81ecdfbb 13151if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13152 gdb_cv_struct_reg=yes
27ca5dad 13153else
81ecdfbb 13154 gdb_cv_struct_reg=no
27ca5dad 13155fi
81ecdfbb 13156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13157fi
81ecdfbb
RW
13158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13159$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13160if test $gdb_cv_struct_reg = yes; then
bec39cab 13161
81ecdfbb 13162$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13163
13164fi
97bf5e38 13165
a3828db0
MK
13166# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13167# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13168ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13169"
13170if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13171
13172cat >>confdefs.h <<_ACEOF
a3828db0 13173#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13174_ACEOF
3862412b 13175
5c45e068 13176
97bf5e38 13177fi
81ecdfbb
RW
13178ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13179"
13180if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13181
13182cat >>confdefs.h <<_ACEOF
a3828db0 13183#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13184_ACEOF
3862412b 13185
5c45e068 13186
97bf5e38 13187fi
3862412b 13188
5c45e068 13189
a3828db0 13190# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13192$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13193if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13194 $as_echo_n "(cached) " >&6
451928c5 13195else
81ecdfbb 13196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13197/* end confdefs.h. */
a3828db0 13198#include <sys/ptrace.h>
bec39cab
AC
13199int
13200main ()
13201{
a3828db0 13202PTRACE_GETREGS;
bec39cab
AC
13203 ;
13204 return 0;
13205}
13206_ACEOF
81ecdfbb 13207if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13208 gdb_cv_have_ptrace_getregs=yes
451928c5 13209else
81ecdfbb 13210 gdb_cv_have_ptrace_getregs=no
451928c5 13211fi
81ecdfbb 13212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13213fi
13214
81ecdfbb
RW
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13216$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13217if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13218
81ecdfbb 13219$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13220
97bf5e38 13221fi
451928c5 13222
a3828db0 13223# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13225$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13226if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13227 $as_echo_n "(cached) " >&6
451928c5 13228else
81ecdfbb 13229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13230/* end confdefs.h. */
a3828db0 13231#include <sys/ptrace.h>
bec39cab
AC
13232int
13233main ()
13234{
a3828db0 13235PTRACE_GETFPXREGS;
bec39cab
AC
13236 ;
13237 return 0;
13238}
13239_ACEOF
81ecdfbb 13240if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13241 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13242else
81ecdfbb 13243 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13244fi
81ecdfbb 13245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13246fi
13247
81ecdfbb
RW
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13249$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13250if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13251
81ecdfbb 13252$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13253
97bf5e38 13254fi
451928c5 13255
a3828db0 13256# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13258$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13259if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13260 $as_echo_n "(cached) " >&6
3862412b 13261else
81ecdfbb 13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13263/* end confdefs.h. */
a3828db0
MK
13264#include <sys/types.h>
13265#include <sys/ptrace.h>
bec39cab
AC
13266int
13267main ()
13268{
a3828db0 13269PT_GETDBREGS;
bec39cab
AC
13270 ;
13271 return 0;
13272}
13273_ACEOF
81ecdfbb 13274if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13275 gdb_cv_have_pt_getdbregs=yes
3862412b 13276else
81ecdfbb 13277 gdb_cv_have_pt_getdbregs=no
3862412b 13278fi
81ecdfbb 13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13280fi
13281
81ecdfbb
RW
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13283$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13284if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13285
81ecdfbb 13286$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13287
97bf5e38 13288fi
3862412b 13289
a3828db0 13290# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13292$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13293if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13294 $as_echo_n "(cached) " >&6
3862412b 13295else
81ecdfbb 13296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13297/* end confdefs.h. */
a3828db0
MK
13298#include <sys/types.h>
13299#include <sys/ptrace.h>
bec39cab
AC
13300int
13301main ()
13302{
a3828db0 13303PT_GETXMMREGS;
bec39cab
AC
13304 ;
13305 return 0;
13306}
13307_ACEOF
81ecdfbb 13308if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13309 gdb_cv_have_pt_getxmmregs=yes
3862412b 13310else
81ecdfbb 13311 gdb_cv_have_pt_getxmmregs=no
3862412b 13312fi
81ecdfbb 13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13314fi
13315
81ecdfbb
RW
13316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13317$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13318if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13319
81ecdfbb 13320$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13321
97bf5e38 13322fi
3862412b 13323
eb368090 13324# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13325
13326if test "${target}" = "${host}"; then
13327 case "${host}" in
97bf5e38 13328 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13329
81ecdfbb 13330$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13331
13332 ;;
c162e8c9 13333 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13334
81ecdfbb 13335$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13336
13337 ;;
13338 mips-sgi-irix5*)
13339 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13340
81ecdfbb 13341$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13342
13343 ;;
13344 esac
13345fi
13346
13347if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13349$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13350 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13351 $as_echo_n "(cached) " >&6
bec39cab 13352else
81ecdfbb 13353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13354/* end confdefs.h. */
596c9d4b
KB
13355
13356#define _SYSCALL32
d30c5336
JK
13357/* Needed for new procfs interface on sparc-solaris. */
13358#define _STRUCTURED_PROC 1
596c9d4b 13359#include <sys/procfs.h>
bec39cab
AC
13360int
13361main ()
13362{
97bf5e38 13363pstatus_t avar
bec39cab
AC
13364 ;
13365 return 0;
13366}
13367_ACEOF
81ecdfbb 13368if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13369 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13370else
81ecdfbb 13371 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13372
596c9d4b 13373fi
81ecdfbb 13374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13375fi
13376
97bf5e38 13377 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13378
81ecdfbb 13379$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13380
13381 fi
81ecdfbb
RW
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13383$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13384
81ecdfbb
RW
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13386$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13387 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13388 $as_echo_n "(cached) " >&6
596c9d4b 13389else
81ecdfbb 13390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13391/* end confdefs.h. */
596c9d4b
KB
13392
13393#define _SYSCALL32
d30c5336
JK
13394/* Needed for new procfs interface on sparc-solaris. */
13395#define _STRUCTURED_PROC 1
596c9d4b 13396#include <sys/procfs.h>
bec39cab
AC
13397int
13398main ()
13399{
97bf5e38 13400prrun_t avar
bec39cab
AC
13401 ;
13402 return 0;
13403}
13404_ACEOF
81ecdfbb 13405if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13406 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13407else
81ecdfbb 13408 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13409
596c9d4b 13410fi
81ecdfbb 13411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13412fi
13413
97bf5e38 13414 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13415
81ecdfbb 13416$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13417
13418 fi
81ecdfbb
RW
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13420$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13421
81ecdfbb
RW
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13423$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13424 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13425 $as_echo_n "(cached) " >&6
596c9d4b 13426else
81ecdfbb 13427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13428/* end confdefs.h. */
596c9d4b
KB
13429
13430#define _SYSCALL32
d30c5336
JK
13431/* Needed for new procfs interface on sparc-solaris. */
13432#define _STRUCTURED_PROC 1
596c9d4b 13433#include <sys/procfs.h>
bec39cab
AC
13434int
13435main ()
13436{
97bf5e38 13437gregset_t avar
bec39cab
AC
13438 ;
13439 return 0;
13440}
13441_ACEOF
81ecdfbb 13442if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13443 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13444else
81ecdfbb 13445 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13446
596c9d4b 13447fi
81ecdfbb 13448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13449fi
13450
97bf5e38 13451 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13452
81ecdfbb 13453$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13454
13455 fi
81ecdfbb
RW
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13457$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13458
81ecdfbb
RW
13459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13460$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13461 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13462 $as_echo_n "(cached) " >&6
d84dd0c5 13463else
81ecdfbb 13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13465/* end confdefs.h. */
97bf5e38
MK
13466
13467#define _SYSCALL32
d30c5336
JK
13468/* Needed for new procfs interface on sparc-solaris. */
13469#define _STRUCTURED_PROC 1
d84dd0c5 13470#include <sys/procfs.h>
bec39cab
AC
13471int
13472main ()
13473{
97bf5e38 13474fpregset_t avar
bec39cab
AC
13475 ;
13476 return 0;
13477}
13478_ACEOF
81ecdfbb 13479if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13480 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13481else
81ecdfbb 13482 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13483
d84dd0c5 13484fi
81ecdfbb 13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13486fi
13487
97bf5e38 13488 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13489
81ecdfbb 13490$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13491
97bf5e38 13492 fi
81ecdfbb
RW
13493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13494$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13495
81ecdfbb
RW
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13497$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13498 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13499 $as_echo_n "(cached) " >&6
c906108c 13500else
81ecdfbb 13501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13502/* end confdefs.h. */
c906108c 13503
97bf5e38 13504#define _SYSCALL32
d30c5336
JK
13505/* Needed for new procfs interface on sparc-solaris. */
13506#define _STRUCTURED_PROC 1
97bf5e38 13507#include <sys/procfs.h>
bec39cab
AC
13508int
13509main ()
13510{
97bf5e38 13511prgregset_t avar
bec39cab
AC
13512 ;
13513 return 0;
13514}
13515_ACEOF
81ecdfbb 13516if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13517 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13518else
81ecdfbb 13519 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13520
c906108c 13521fi
81ecdfbb 13522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13523fi
13524
97bf5e38 13525 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13526
81ecdfbb 13527$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13528
97bf5e38 13529 fi
81ecdfbb
RW
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13531$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13532
81ecdfbb
RW
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13534$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13535 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13536 $as_echo_n "(cached) " >&6
d45fe813 13537else
81ecdfbb 13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13539/* end confdefs.h. */
97bf5e38
MK
13540
13541#define _SYSCALL32
d30c5336
JK
13542/* Needed for new procfs interface on sparc-solaris. */
13543#define _STRUCTURED_PROC 1
97bf5e38 13544#include <sys/procfs.h>
bec39cab
AC
13545int
13546main ()
13547{
97bf5e38 13548prfpregset_t avar
bec39cab
AC
13549 ;
13550 return 0;
13551}
13552_ACEOF
81ecdfbb 13553if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13554 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13555else
81ecdfbb 13556 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13557
d45fe813 13558fi
81ecdfbb 13559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13560fi
13561
97bf5e38 13562 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13563
81ecdfbb 13564$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13565
97bf5e38 13566 fi
81ecdfbb
RW
13567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13568$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13569
81ecdfbb
RW
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13571$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13572 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13573 $as_echo_n "(cached) " >&6
d45fe813 13574else
81ecdfbb 13575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13576/* end confdefs.h. */
97bf5e38
MK
13577
13578#define _SYSCALL32
d30c5336
JK
13579/* Needed for new procfs interface on sparc-solaris. */
13580#define _STRUCTURED_PROC 1
97bf5e38 13581#include <sys/procfs.h>
bec39cab
AC
13582int
13583main ()
13584{
97bf5e38 13585prgregset32_t avar
bec39cab
AC
13586 ;
13587 return 0;
13588}
13589_ACEOF
81ecdfbb 13590if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13591 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13592else
81ecdfbb 13593 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13594
d45fe813 13595fi
81ecdfbb 13596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13597fi
13598
97bf5e38 13599 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13600
81ecdfbb 13601$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13602
97bf5e38 13603 fi
81ecdfbb
RW
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13605$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13606
81ecdfbb
RW
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13608$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13609 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13610 $as_echo_n "(cached) " >&6
d45fe813 13611else
81ecdfbb 13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13613/* end confdefs.h. */
97bf5e38
MK
13614
13615#define _SYSCALL32
d30c5336
JK
13616/* Needed for new procfs interface on sparc-solaris. */
13617#define _STRUCTURED_PROC 1
97bf5e38 13618#include <sys/procfs.h>
bec39cab
AC
13619int
13620main ()
13621{
97bf5e38 13622prfpregset32_t avar
bec39cab
AC
13623 ;
13624 return 0;
13625}
13626_ACEOF
81ecdfbb 13627if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13628 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13629else
81ecdfbb 13630 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13631
d45fe813 13632fi
81ecdfbb 13633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13634fi
13635
97bf5e38 13636 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13637
81ecdfbb 13638$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13639
97bf5e38 13640 fi
81ecdfbb
RW
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13642$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13643
81ecdfbb
RW
13644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13645$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13646 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13647 $as_echo_n "(cached) " >&6
d45fe813 13648else
81ecdfbb 13649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13650/* end confdefs.h. */
97bf5e38 13651
d45fe813 13652#define _SYSCALL32
d30c5336
JK
13653/* Needed for new procfs interface on sparc-solaris. */
13654#define _STRUCTURED_PROC 1
97bf5e38 13655#include <sys/procfs.h>
bec39cab
AC
13656int
13657main ()
13658{
97bf5e38 13659lwpid_t avar
bec39cab
AC
13660 ;
13661 return 0;
13662}
13663_ACEOF
81ecdfbb 13664if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13665 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13666else
81ecdfbb 13667 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13668
d45fe813 13669fi
81ecdfbb 13670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13671fi
13672
97bf5e38 13673 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13674
81ecdfbb 13675$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13676
97bf5e38 13677 fi
81ecdfbb
RW
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13679$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13680
81ecdfbb
RW
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13682$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13683 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13684 $as_echo_n "(cached) " >&6
c906108c 13685else
81ecdfbb 13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13687/* end confdefs.h. */
c906108c 13688
97bf5e38 13689#define _SYSCALL32
d30c5336
JK
13690/* Needed for new procfs interface on sparc-solaris. */
13691#define _STRUCTURED_PROC 1
97bf5e38 13692#include <sys/procfs.h>
bec39cab
AC
13693int
13694main ()
13695{
97bf5e38 13696psaddr_t avar
bec39cab
AC
13697 ;
13698 return 0;
13699}
13700_ACEOF
81ecdfbb 13701if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13702 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13703else
81ecdfbb 13704 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13705
c906108c 13706fi
81ecdfbb 13707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13708fi
13709
97bf5e38 13710 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13711
81ecdfbb 13712$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13713
97bf5e38 13714 fi
81ecdfbb
RW
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13716$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13717
81ecdfbb
RW
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13719$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13720 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13721 $as_echo_n "(cached) " >&6
c906108c 13722else
81ecdfbb 13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13724/* end confdefs.h. */
c906108c 13725
97bf5e38 13726#define _SYSCALL32
d30c5336
JK
13727/* Needed for new procfs interface on sparc-solaris. */
13728#define _STRUCTURED_PROC 1
97bf5e38 13729#include <sys/procfs.h>
bec39cab
AC
13730int
13731main ()
13732{
97bf5e38 13733prsysent_t avar
bec39cab
AC
13734 ;
13735 return 0;
13736}
13737_ACEOF
81ecdfbb 13738if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13739 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13740else
81ecdfbb 13741 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13742
c906108c 13743fi
81ecdfbb 13744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13745fi
13746
97bf5e38 13747 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13748
81ecdfbb 13749$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13750
97bf5e38 13751 fi
81ecdfbb
RW
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13753$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13754
81ecdfbb
RW
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13756$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13757 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13758 $as_echo_n "(cached) " >&6
c906108c 13759else
81ecdfbb 13760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13761/* end confdefs.h. */
c906108c 13762
97bf5e38 13763#define _SYSCALL32
d30c5336
JK
13764/* Needed for new procfs interface on sparc-solaris. */
13765#define _STRUCTURED_PROC 1
97bf5e38 13766#include <sys/procfs.h>
bec39cab
AC
13767int
13768main ()
13769{
97bf5e38 13770pr_sigset_t avar
bec39cab
AC
13771 ;
13772 return 0;
13773}
13774_ACEOF
81ecdfbb 13775if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13776 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13777else
81ecdfbb 13778 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13779
c906108c 13780fi
81ecdfbb 13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13782fi
13783
97bf5e38 13784 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13785
81ecdfbb 13786$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13787
97bf5e38 13788 fi
81ecdfbb
RW
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13790$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13791
81ecdfbb
RW
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13793$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13794 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13795 $as_echo_n "(cached) " >&6
c906108c 13796else
81ecdfbb 13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13798/* end confdefs.h. */
c906108c 13799
97bf5e38 13800#define _SYSCALL32
d30c5336
JK
13801/* Needed for new procfs interface on sparc-solaris. */
13802#define _STRUCTURED_PROC 1
97bf5e38 13803#include <sys/procfs.h>
bec39cab
AC
13804int
13805main ()
13806{
97bf5e38 13807pr_sigaction64_t avar
bec39cab
AC
13808 ;
13809 return 0;
13810}
13811_ACEOF
81ecdfbb 13812if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13813 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13814else
81ecdfbb 13815 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13816
c906108c 13817fi
81ecdfbb 13818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13819fi
13820
97bf5e38 13821 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13822
81ecdfbb 13823$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13824
97bf5e38 13825 fi
81ecdfbb
RW
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13827$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13828
81ecdfbb
RW
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13830$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13831 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13832 $as_echo_n "(cached) " >&6
97bf5e38 13833else
81ecdfbb 13834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13835/* end confdefs.h. */
97bf5e38
MK
13836
13837#define _SYSCALL32
d30c5336
JK
13838/* Needed for new procfs interface on sparc-solaris. */
13839#define _STRUCTURED_PROC 1
97bf5e38 13840#include <sys/procfs.h>
bec39cab
AC
13841int
13842main ()
13843{
97bf5e38 13844pr_siginfo64_t avar
bec39cab
AC
13845 ;
13846 return 0;
13847}
13848_ACEOF
81ecdfbb 13849if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13850 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13851else
81ecdfbb 13852 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13853
97bf5e38 13854fi
81ecdfbb 13855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13856fi
c906108c 13857
97bf5e38 13858 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13859
81ecdfbb 13860$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13861
97bf5e38 13862 fi
81ecdfbb
RW
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13864$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13865
13866
97bf5e38
MK
13867
13868
13869
97bf5e38 13870 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13872$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13873 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13874 $as_echo_n "(cached) " >&6
c906108c 13875else
81ecdfbb 13876 if test "$cross_compiling" = yes; then :
97bf5e38 13877 gdb_cv_prfpregset_t_broken=yes
c906108c 13878else
81ecdfbb 13879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13880/* end confdefs.h. */
97bf5e38
MK
13881#include <sys/procfs.h>
13882 int main ()
13883 {
13884 if (sizeof (prfpregset_t) == sizeof (void *))
13885 return 1;
13886 return 0;
13887 }
bec39cab 13888_ACEOF
81ecdfbb 13889if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13890 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13891else
13892 gdb_cv_prfpregset_t_broken=yes
c906108c 13893fi
81ecdfbb
RW
13894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13896fi
81ecdfbb 13897
c906108c
SS
13898fi
13899
81ecdfbb
RW
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13901$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13902 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13903
81ecdfbb 13904$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13905
97bf5e38
MK
13906 fi
13907 fi
c906108c 13908
bec39cab 13909
81ecdfbb
RW
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13911$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13912 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
13913 $as_echo_n "(cached) " >&6
c906108c 13914else
81ecdfbb 13915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13916/* end confdefs.h. */
97bf5e38
MK
13917#include <unistd.h>
13918#include <sys/types.h>
13919#include <sys/procfs.h>
13920
bec39cab
AC
13921int
13922main ()
13923{
97bf5e38
MK
13924
13925 int dummy;;
13926 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13927
13928 ;
13929 return 0;
13930}
13931_ACEOF
81ecdfbb 13932if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13933 gdb_cv_have_procfs_piocset=yes
c906108c 13934else
81ecdfbb 13935 gdb_cv_have_procfs_piocset=no
c906108c 13936fi
81ecdfbb 13937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13938fi
97bf5e38 13939
81ecdfbb
RW
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13941$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13942 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13943
81ecdfbb 13944$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13945
13946 fi
c906108c 13947fi
c906108c 13948
97bf5e38 13949if test ${host} = ${target} ; then
bec39cab 13950
81ecdfbb
RW
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13952$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13953 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13954 $as_echo_n "(cached) " >&6
bec39cab 13955else
81ecdfbb 13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13957/* end confdefs.h. */
97bf5e38 13958#include <link.h>
bec39cab
AC
13959int
13960main ()
13961{
97bf5e38 13962struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13963 ;
13964 return 0;
13965}
13966_ACEOF
81ecdfbb 13967if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13968 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13969else
81ecdfbb 13970 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13971fi
81ecdfbb 13972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13973fi
13974
81ecdfbb
RW
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13976$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13977 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13978
81ecdfbb 13979$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13980
13981 fi
13982
bec39cab 13983
81ecdfbb
RW
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13985$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13986 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13987 $as_echo_n "(cached) " >&6
c906108c 13988else
81ecdfbb 13989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13990/* end confdefs.h. */
97bf5e38
MK
13991#include <sys/types.h>
13992#include <link.h>
bec39cab
AC
13993int
13994main ()
13995{
97bf5e38 13996struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13997 ;
13998 return 0;
13999}
14000_ACEOF
81ecdfbb 14001if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14002 gdb_cv_have_struct_link_map_with_lm_members=yes
14003else
81ecdfbb 14004 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14005fi
81ecdfbb 14006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14007fi
c906108c 14008
81ecdfbb
RW
14009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14010$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14011 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14012
81ecdfbb 14013$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14014
14015 fi
14016
bec39cab 14017
81ecdfbb
RW
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14019$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14020 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14021 $as_echo_n "(cached) " >&6
c906108c 14022else
81ecdfbb 14023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14024/* end confdefs.h. */
97bf5e38
MK
14025#include <sys/types.h>
14026#ifdef HAVE_NLIST_H
14027#include <nlist.h>
14028#endif
14029#include <link.h>
bec39cab
AC
14030int
14031main ()
14032{
97bf5e38 14033struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14034 ;
14035 return 0;
14036}
14037_ACEOF
81ecdfbb 14038if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14039 gdb_cv_have_struct_so_map_with_som_members=yes
14040else
81ecdfbb 14041 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14042fi
81ecdfbb 14043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14044fi
c906108c 14045
81ecdfbb
RW
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14047$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14048 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14049
81ecdfbb 14050$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14051
97bf5e38 14052 fi
c906108c 14053
bec39cab 14054
81ecdfbb
RW
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14056$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14057 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14058 $as_echo_n "(cached) " >&6
97bf5e38 14059else
81ecdfbb 14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14061/* end confdefs.h. */
97bf5e38
MK
14062#define _SYSCALL32
14063#include <sys/link.h>
bec39cab
AC
14064int
14065main ()
14066{
97bf5e38 14067struct link_map32 l;
bec39cab
AC
14068 ;
14069 return 0;
14070}
14071_ACEOF
81ecdfbb 14072if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14073 gdb_cv_have_struct_link_map32=yes
14074else
81ecdfbb 14075 gdb_cv_have_struct_link_map32=no
97bf5e38 14076fi
81ecdfbb 14077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14078fi
c906108c 14079
81ecdfbb
RW
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14081$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14082 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14083
81ecdfbb 14084$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14085
60ca704f 14086
81ecdfbb 14087$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14088
97bf5e38
MK
14089 fi
14090fi
c906108c 14091
bc8bcb4b 14092# Check if the compiler supports the `long long' type.
c906108c 14093
81ecdfbb
RW
14094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14095$as_echo_n "checking for long long support in compiler... " >&6; }
14096if test "${gdb_cv_c_long_long+set}" = set; then :
14097 $as_echo_n "(cached) " >&6
97bf5e38 14098else
81ecdfbb 14099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14100/* end confdefs.h. */
bc8bcb4b 14101extern long long foo;
bec39cab
AC
14102int
14103main ()
14104{
bc8bcb4b 14105switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14106 ;
14107 return 0;
14108}
14109_ACEOF
81ecdfbb 14110if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14111 gdb_cv_c_long_long=yes
14112else
81ecdfbb 14113 gdb_cv_c_long_long=no
97bf5e38 14114fi
81ecdfbb 14115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14116fi
81ecdfbb
RW
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14118$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14119if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14120
81ecdfbb 14121$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14122
14123fi
14124
bc8bcb4b 14125# Check if the compiler and runtime support printing long longs.
97bf5e38 14126
81ecdfbb
RW
14127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14128$as_echo_n "checking for long long support in printf... " >&6; }
14129if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14130 $as_echo_n "(cached) " >&6
97bf5e38 14131else
81ecdfbb 14132 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14133 gdb_cv_printf_has_long_long=no
14134else
81ecdfbb 14135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14136/* end confdefs.h. */
bc8bcb4b
MK
14137$ac_includes_default
14138int
14139main ()
14140{
14141char buf[32];
97bf5e38
MK
14142 long long l = 0;
14143 l = (l << 16) + 0x0123;
14144 l = (l << 16) + 0x4567;
14145 l = (l << 16) + 0x89ab;
14146 l = (l << 16) + 0xcdef;
14147 sprintf (buf, "0x%016llx", l);
14148 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14149 ;
14150 return 0;
c906108c 14151}
bec39cab 14152_ACEOF
81ecdfbb 14153if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14154 gdb_cv_printf_has_long_long=yes
14155else
81ecdfbb 14156 gdb_cv_printf_has_long_long=no
97bf5e38 14157fi
81ecdfbb
RW
14158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14159 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14160fi
81ecdfbb 14161
97bf5e38 14162fi
81ecdfbb
RW
14163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14164$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14165if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14166
81ecdfbb 14167$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14168
14169fi
97bf5e38 14170
1a619819
LM
14171# Check if the compiler and runtime support printing decfloats.
14172
81ecdfbb
RW
14173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14174$as_echo_n "checking for decfloat support in printf... " >&6; }
14175if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14176 $as_echo_n "(cached) " >&6
1a619819 14177else
81ecdfbb 14178 if test "$cross_compiling" = yes; then :
1a619819
LM
14179 gdb_cv_printf_has_decfloat=no
14180else
81ecdfbb 14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14182/* end confdefs.h. */
14183$ac_includes_default
14184int
14185main ()
14186{
14187char buf[64];
14188 _Decimal32 d32 = 1.2345df;
14189 _Decimal64 d64 = 1.2345dd;
14190 _Decimal128 d128 = 1.2345dl;
14191 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14192 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14193 ;
14194 return 0;
14195}
14196_ACEOF
81ecdfbb 14197if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14198 gdb_cv_printf_has_decfloat=yes
14199else
81ecdfbb 14200 gdb_cv_printf_has_decfloat=no
1a619819 14201fi
81ecdfbb
RW
14202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14203 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14204fi
81ecdfbb 14205
1a619819 14206fi
81ecdfbb
RW
14207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14208$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14209if test $gdb_cv_printf_has_decfloat = yes; then
14210
81ecdfbb 14211$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14212
14213fi
14214
bc8bcb4b
MK
14215# Check if the compiler supports the `long double' type. We can't use
14216# AC_C_LONG_DOUBLE because that one does additional checks on the
14217# constants defined in <float.h> that fail on some systems,
14218# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14219
81ecdfbb
RW
14220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14221$as_echo_n "checking for long double support in compiler... " >&6; }
14222if test "${gdb_cv_c_long_double+set}" = set; then :
14223 $as_echo_n "(cached) " >&6
97bf5e38 14224else
81ecdfbb 14225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14226/* end confdefs.h. */
97bf5e38 14227long double foo;
bec39cab 14228_ACEOF
81ecdfbb 14229if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14230 gdb_cv_c_long_double=yes
97bf5e38 14231else
81ecdfbb 14232 gdb_cv_c_long_double=no
97bf5e38 14233fi
81ecdfbb 14234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14235fi
81ecdfbb
RW
14236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14237$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14238if test $gdb_cv_c_long_double = yes; then
c906108c 14239
81ecdfbb 14240$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14241
14242fi
14243
bc8bcb4b 14244# Check if the compiler and runtime support printing long doubles.
97bf5e38 14245
81ecdfbb
RW
14246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14247$as_echo_n "checking for long double support in printf... " >&6; }
14248if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14249 $as_echo_n "(cached) " >&6
97bf5e38 14250else
81ecdfbb 14251 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14252 gdb_cv_printf_has_long_double=no
14253else
81ecdfbb 14254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14255/* end confdefs.h. */
bc8bcb4b
MK
14256$ac_includes_default
14257int
14258main ()
14259{
14260char buf[16];
97bf5e38
MK
14261 long double f = 3.141592653;
14262 sprintf (buf, "%Lg", f);
14263 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14264 ;
14265 return 0;
97bf5e38 14266}
bec39cab 14267_ACEOF
81ecdfbb 14268if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14269 gdb_cv_printf_has_long_double=yes
c906108c 14270else
81ecdfbb 14271 gdb_cv_printf_has_long_double=no
c906108c 14272fi
81ecdfbb
RW
14273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14274 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14275fi
81ecdfbb 14276
c906108c 14277fi
81ecdfbb
RW
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14279$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14280if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14281
81ecdfbb 14282$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14283
14284fi
97bf5e38 14285
bc8bcb4b 14286# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14287
81ecdfbb
RW
14288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14289$as_echo_n "checking for long double support in scanf... " >&6; }
14290if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14291 $as_echo_n "(cached) " >&6
97bf5e38 14292else
81ecdfbb 14293 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14294 gdb_cv_scanf_has_long_double=no
14295else
81ecdfbb 14296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14297/* end confdefs.h. */
bc8bcb4b
MK
14298#include <stdio.h>
14299int
14300main ()
14301{
14302char *buf = "3.141592653";
97bf5e38
MK
14303 long double f = 0;
14304 sscanf (buf, "%Lg", &f);
14305 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14306 ;
14307 return 0;
97bf5e38 14308}
bec39cab 14309_ACEOF
81ecdfbb 14310if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14311 gdb_cv_scanf_has_long_double=yes
14312else
81ecdfbb 14313 gdb_cv_scanf_has_long_double=no
97bf5e38 14314fi
81ecdfbb
RW
14315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14316 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14317fi
81ecdfbb 14318
c906108c 14319fi
81ecdfbb
RW
14320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14321$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14322if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14323
81ecdfbb 14324$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14325
14326fi
c906108c 14327
438013df
AO
14328case ${host_os} in
14329aix*)
81ecdfbb
RW
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14331$as_echo_n "checking for -bbigtoc option... " >&6; }
14332if test "${gdb_cv_bigtoc+set}" = set; then :
14333 $as_echo_n "(cached) " >&6
438013df 14334else
bec39cab 14335
438013df
AO
14336 SAVE_LDFLAGS=$LDFLAGS
14337
14338 case $GCC in
14339 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14340 *) gdb_cv_bigtoc=-bbigtoc ;;
14341 esac
14342
14343 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14345/* end confdefs.h. */
438013df 14346
bec39cab
AC
14347int
14348main ()
14349{
438013df 14350int i;
bec39cab
AC
14351 ;
14352 return 0;
14353}
14354_ACEOF
81ecdfbb 14355if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14356
81ecdfbb
RW
14357else
14358 gdb_cv_bigtoc=
438013df 14359fi
81ecdfbb
RW
14360rm -f core conftest.err conftest.$ac_objext \
14361 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14362 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14363
bec39cab 14364fi
81ecdfbb
RW
14365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14366$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14367 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14368 ;;
14369esac
14370
38f6b338 14371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14372$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14373dynamic_list=false
14374if test "${gdb_native}" = yes; then
14375 # The dynamically loaded libthread_db needs access to symbols in the gdb
14376 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14377 # may not be supported there.
14378 old_LDFLAGS="$LDFLAGS"
14379 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14380 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14381 LDFLAGS="$LDFLAGS $RDYNAMIC"
14382 if test "${have_libpython}" = no; then
14383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14384/* end confdefs.h. */
14385
14386int
14387main ()
14388{
14389
14390 ;
14391 return 0;
14392}
14393_ACEOF
14394if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14395 dynamic_list=true
14396fi
14397rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14399 else
14400 # Workaround http://bugs.python.org/issue4434 where static
14401 # libpythonX.Y.a would get its symbols required for
14402 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14403 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14404 old_CFLAGS="$CFLAGS"
14405 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14406 if test "$cross_compiling" = yes; then :
3bebe2f2 14407 true
f6528abd 14408else
3bebe2f2
JK
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410/* end confdefs.h. */
14411#include "${have_libpython}/Python.h"
14412int
14413main ()
14414{
14415int err;
38f6b338
JK
14416 Py_Initialize ();
14417 err = PyRun_SimpleString ("import itertools\n");
14418 Py_Finalize ();
14419 return err == 0 ? 0 : 1;
3bebe2f2
JK
14420 ;
14421 return 0;
14422}
14423_ACEOF
14424if ac_fn_c_try_run "$LINENO"; then :
14425 dynamic_list=true
14426fi
14427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14428 conftest.$ac_objext conftest.beam conftest.$ac_ext
14429fi
14430
38f6b338
JK
14431 CFLAGS="$old_CFLAGS"
14432 fi
14433 LDFLAGS="$old_LDFLAGS"
14434fi
14435if $dynamic_list; then
14436 found="-Wl,--dynamic-list"
14437 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14438else
38f6b338
JK
14439 found="-rdynamic"
14440 RDYNAMIC="-rdynamic"
f6528abd 14441fi
f6528abd 14442
38f6b338 14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14444$as_echo "$found" >&6; }
0407b3f1 14445
f6528abd 14446
0407b3f1 14447if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14448 case ${host_os} in
c906108c 14449 solaris*)
d92419e5
JB
14450 # See if thread_db library is around for Solaris thread debugging.
14451 # Note that we must explicitly test for version 1 of the library
14452 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14453 # the same API.
81ecdfbb
RW
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14455$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14456 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14458$as_echo "yes" >&6; }
60ca704f 14459
81ecdfbb 14460$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14461
3483b318 14462 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14463 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14465$as_echo_n "checking for dlopen in -ldl... " >&6; }
14466if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14467 $as_echo_n "(cached) " >&6
c906108c 14468else
bec39cab 14469 ac_check_lib_save_LIBS=$LIBS
c906108c 14470LIBS="-ldl $LIBS"
81ecdfbb 14471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14472/* end confdefs.h. */
14473
81ecdfbb
RW
14474/* Override any GCC internal prototype to avoid an error.
14475 Use char because int might match the return type of a GCC
14476 builtin and then its argument prototype would still apply. */
bec39cab
AC
14477#ifdef __cplusplus
14478extern "C"
14479#endif
bec39cab
AC
14480char dlopen ();
14481int
14482main ()
14483{
81ecdfbb 14484return dlopen ();
bec39cab
AC
14485 ;
14486 return 0;
14487}
14488_ACEOF
81ecdfbb 14489if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14490 ac_cv_lib_dl_dlopen=yes
14491else
81ecdfbb 14492 ac_cv_lib_dl_dlopen=no
bec39cab 14493fi
81ecdfbb
RW
14494rm -f core conftest.err conftest.$ac_objext \
14495 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14496LIBS=$ac_check_lib_save_LIBS
14497fi
81ecdfbb
RW
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14499$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14500if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14501 cat >>confdefs.h <<_ACEOF
14502#define HAVE_LIBDL 1
14503_ACEOF
c906108c
SS
14504
14505 LIBS="-ldl $LIBS"
14506
c906108c
SS
14507fi
14508
f6528abd 14509 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14510 # Sun randomly tweaked the prototypes in <proc_service.h>
14511 # at one point.
81ecdfbb
RW
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14513$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14514 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14515 $as_echo_n "(cached) " >&6
c906108c 14516else
bec39cab 14517
81ecdfbb 14518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14519/* end confdefs.h. */
c906108c
SS
14520
14521 #include <proc_service.h>
14522 ps_err_e ps_pdwrite
14523 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14524
bec39cab
AC
14525int
14526main ()
14527{
14528
14529 ;
14530 return 0;
14531}
14532_ACEOF
81ecdfbb 14533if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14534 gdb_cv_proc_service_is_old=no
14535else
81ecdfbb 14536 gdb_cv_proc_service_is_old=yes
c906108c 14537fi
81ecdfbb 14538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14539
c906108c
SS
14540fi
14541
81ecdfbb
RW
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14543$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14544 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14545
81ecdfbb 14546$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14547
14548 fi
14549 else
81ecdfbb
RW
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14551$as_echo "no" >&6; }
c906108c
SS
14552 fi
14553 ;;
d92419e5 14554 aix*)
81ecdfbb
RW
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14556$as_echo_n "checking for AiX thread debugging library... " >&6; }
14557 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14558 $as_echo_n "(cached) " >&6
bec39cab 14559else
81ecdfbb 14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14561/* end confdefs.h. */
d92419e5 14562#include <sys/pthdebug.h>
bec39cab
AC
14563int
14564main ()
14565{
d92419e5
JB
14566#ifndef PTHDB_VERSION_3
14567 #error
14568 #endif
bec39cab
AC
14569 ;
14570 return 0;
14571}
14572_ACEOF
81ecdfbb 14573if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14574 gdb_cv_have_aix_thread_debug=yes
14575else
81ecdfbb 14576 gdb_cv_have_aix_thread_debug=no
d92419e5 14577fi
81ecdfbb 14578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14579fi
14580
81ecdfbb
RW
14581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14582$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14583 if test $gdb_cv_have_aix_thread_debug = yes; then
14584 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14585 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14586 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14587
14588 # Older versions of AIX do not provide the declaration for
14589 # the getthrds function (it appears that it was introduced
14590 # with AIX 6.x).
14591 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14592"
14593if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14594 ac_have_decl=1
14595else
14596 ac_have_decl=0
14597fi
14598
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_DECL_GETTHRDS $ac_have_decl
14601_ACEOF
14602
d92419e5
JB
14603 fi
14604 ;;
c906108c 14605 esac
bec39cab 14606
c906108c
SS
14607fi
14608
3f47be5c 14609if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14611$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14612if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14613 $as_echo_n "(cached) " >&6
bec39cab 14614else
81ecdfbb 14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14616/* end confdefs.h. */
3f47be5c 14617#include <thread_db.h>
bec39cab
AC
14618int
14619main ()
14620{
3f47be5c 14621int i = TD_NOTALLOC;
bec39cab
AC
14622 ;
14623 return 0;
14624}
14625_ACEOF
81ecdfbb 14626if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14627 gdb_cv_thread_db_h_has_td_notalloc=yes
14628else
81ecdfbb 14629 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14630
3f47be5c 14631fi
81ecdfbb 14632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14633
bec39cab 14634fi
81ecdfbb
RW
14635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14636$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14638$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14639if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14640 $as_echo_n "(cached) " >&6
59f80f10 14641else
81ecdfbb 14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14643/* end confdefs.h. */
14644#include <thread_db.h>
14645int
14646main ()
14647{
14648int i = TD_VERSION;
14649 ;
14650 return 0;
14651}
14652_ACEOF
81ecdfbb 14653if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14654 gdb_cv_thread_db_h_has_td_version=yes
14655else
81ecdfbb 14656 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14657
14658fi
81ecdfbb 14659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14660
14661fi
81ecdfbb
RW
14662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14663$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14665$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14666if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14667 $as_echo_n "(cached) " >&6
59f80f10 14668else
81ecdfbb 14669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14670/* end confdefs.h. */
14671#include <thread_db.h>
14672int
14673main ()
14674{
14675int i = TD_NOTLS;
14676 ;
14677 return 0;
14678}
14679_ACEOF
81ecdfbb 14680if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14681 gdb_cv_thread_db_h_has_td_notls=yes
14682else
81ecdfbb 14683 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14684
14685fi
81ecdfbb 14686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14687
14688fi
81ecdfbb
RW
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14690$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14691fi
14692if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14693
81ecdfbb 14694$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14695
59f80f10
DJ
14696fi
14697if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14698
81ecdfbb 14699$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14700
14701fi
14702if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14703
81ecdfbb 14704$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14705
3f47be5c
EZ
14706fi
14707
b757528f 14708if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14710$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14711if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14712 $as_echo_n "(cached) " >&6
bec39cab 14713else
81ecdfbb 14714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14715/* end confdefs.h. */
b757528f 14716#include <sys/syscall.h>
bec39cab
AC
14717int
14718main ()
14719{
b757528f 14720int i = __NR_tkill;
bec39cab
AC
14721 ;
14722 return 0;
14723}
14724_ACEOF
81ecdfbb 14725if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14726 gdb_cv_sys_syscall_h_has_tkill=yes
14727else
81ecdfbb 14728 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14729
b757528f 14730fi
81ecdfbb 14731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14732
bec39cab 14733fi
81ecdfbb
RW
14734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14735$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14736fi
14737if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14738
81ecdfbb 14739$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14740
14741fi
14742
81ecdfbb
RW
14743ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14744"
14745if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14746 ac_have_decl=1
10568435 14747else
81ecdfbb 14748 ac_have_decl=0
10568435 14749fi
10568435
JK
14750
14751cat >>confdefs.h <<_ACEOF
81ecdfbb 14752#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14753_ACEOF
14754
14755
81ecdfbb
RW
14756if test "$cross_compiling" = yes; then :
14757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14758/* end confdefs.h. */
14759#include <sys/personality.h>
14760int
14761main ()
14762{
14763
14764# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14765# define ADDR_NO_RANDOMIZE 0x0040000
14766# endif
14767 /* Test the flag could be set and stays set. */
14768 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14769 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14770 return 1
14771 ;
14772 return 0;
14773}
14774_ACEOF
81ecdfbb 14775if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14776 have_personality=true
14777else
81ecdfbb 14778 have_personality=false
10568435 14779fi
81ecdfbb
RW
14780rm -f core conftest.err conftest.$ac_objext \
14781 conftest$ac_exeext conftest.$ac_ext
10568435 14782else
81ecdfbb 14783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14784/* end confdefs.h. */
14785#include <sys/personality.h>
14786int
14787main ()
14788{
14789
14790# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14791# define ADDR_NO_RANDOMIZE 0x0040000
14792# endif
14793 /* Test the flag could be set and stays set. */
14794 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14795 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14796 return 1
14797 ;
14798 return 0;
14799}
14800_ACEOF
81ecdfbb 14801if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14802 have_personality=true
14803else
81ecdfbb 14804 have_personality=false
10568435 14805fi
81ecdfbb
RW
14806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14807 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14808fi
81ecdfbb 14809
10568435
JK
14810if $have_personality
14811then
14812
81ecdfbb 14813$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14814
14815fi
14816
fb40c209 14817
b14b1491 14818target_sysroot_reloc=0
bec39cab 14819
81ecdfbb
RW
14820# Check whether --with-sysroot was given.
14821if test "${with_sysroot+set}" = set; then :
14822 withval=$with_sysroot;
030292b7 14823 case ${with_sysroot} in
715d1656 14824 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14825 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14826 esac
14827
14828 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14829
07abfebf
RS
14830 if test "x$prefix" = xNONE; then
14831 test_prefix=/usr/local
14832 else
14833 test_prefix=$prefix
14834 fi
aa28a74e 14835 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14836 test_exec_prefix=$test_prefix
030292b7 14837 else
07abfebf 14838 test_exec_prefix=$exec_prefix
030292b7
DJ
14839 fi
14840 case ${TARGET_SYSTEM_ROOT} in
715d1656 14841 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14842 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14843 '${prefix}'|'${prefix}/'*|\
715d1656 14844 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14845 target_sysroot_reloc=1
030292b7
DJ
14846 ;;
14847 esac
14848
14849else
bec39cab 14850
030292b7
DJ
14851 TARGET_SYSTEM_ROOT=
14852 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14853
81ecdfbb 14854fi
b14b1491 14855
81ecdfbb 14856TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14857
14858
14859
16e7150e 14860
16e7150e 14861
81ecdfbb
RW
14862# Check whether --with-system-gdbinit was given.
14863if test "${with_system_gdbinit+set}" = set; then :
14864 withval=$with_system_gdbinit;
b14b1491
TT
14865 SYSTEM_GDBINIT=$withval
14866else
14867 SYSTEM_GDBINIT=
81ecdfbb
RW
14868fi
14869
16e7150e
JG
14870
14871 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14872 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14873 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14874 ac_define_dir=`eval echo $ac_define_dir`
14875
14876cat >>confdefs.h <<_ACEOF
14877#define SYSTEM_GDBINIT "$ac_define_dir"
14878_ACEOF
14879
14880
14881
0c4a4063 14882
b14b1491
TT
14883 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14884 if test "x$prefix" = xNONE; then
14885 test_prefix=/usr/local
14886 else
14887 test_prefix=$prefix
14888 fi
14889 else
14890 test_prefix=$exec_prefix
14891 fi
14892 value=0
14893 case ${ac_define_dir} in
14894 "${test_prefix}"|"${test_prefix}/"*|\
14895 '${exec_prefix}'|'${exec_prefix}/'*)
14896 value=1
14897 ;;
14898 esac
16e7150e 14899
b14b1491
TT
14900cat >>confdefs.h <<_ACEOF
14901#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14902_ACEOF
14903
b14b1491 14904
16e7150e 14905
0c4a4063 14906
81ecdfbb
RW
14907# Check whether --enable-werror was given.
14908if test "${enable_werror+set}" = set; then :
14909 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14910 yes | y) ERROR_ON_WARNING="yes" ;;
14911 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14912 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14913 esac
81ecdfbb
RW
14914fi
14915
094a342e
MK
14916
14917# Enable -Werror by default when using gcc
14918if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14919 ERROR_ON_WARNING=yes
14920fi
14921
14922WERROR_CFLAGS=""
14923if test "${ERROR_ON_WARNING}" = yes ; then
14924 WERROR_CFLAGS="-Werror"
14925fi
14926
aa79a185
DJ
14927# The entries after -Wno-pointer-sign are disabled warnings which may
14928# be enabled in the future, which can not currently be used to build
14929# GDB.
14930# NOTE: If you change this list, remember to update
3b851bce 14931# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14932build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14933-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14934-Wno-unused -Wunused-value -Wunused-function \
14935-Wno-switch -Wno-char-subscripts"
a3b362c4 14936
3526781e
DJ
14937# Enable -Wno-format by default when using gcc on mingw since many
14938# GCC versions complain about %I64.
14939case "${host}" in
14940 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14941esac
14942
81ecdfbb
RW
14943# Check whether --enable-build-warnings was given.
14944if test "${enable_build_warnings+set}" = set; then :
14945 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14946 yes) ;;
14947 no) build_warnings="-w";;
14948 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14949 build_warnings="${build_warnings} ${t}";;
14950 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14951 build_warnings="${t} ${build_warnings}";;
14952 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14953esac
d4f3574e 14954if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14955 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14956fi
81ecdfbb
RW
14957fi
14958# Check whether --enable-gdb-build-warnings was given.
14959if test "${enable_gdb_build_warnings+set}" = set; then :
14960 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14961 yes) ;;
14962 no) build_warnings="-w";;
14963 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14964 build_warnings="${build_warnings} ${t}";;
14965 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14966 build_warnings="${t} ${build_warnings}";;
14967 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14968esac
14969if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14970 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14971fi
81ecdfbb
RW
14972fi
14973WARN_CFLAGS=""
c906108c
SS
14974if test "x${build_warnings}" != x -a "x$GCC" = xyes
14975then
81ecdfbb
RW
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14977$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14978 # Separate out the -Werror flag as some files just cannot be
14979 # compiled with it enabled.
14980 for w in ${build_warnings}; do
14981 case $w in
14982 -Werr*) WERROR_CFLAGS=-Werror ;;
14983 *) # Check that GCC accepts it
4536bbc6
AC
14984 saved_CFLAGS="$CFLAGS"
14985 CFLAGS="$CFLAGS $w"
81ecdfbb 14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14987/* end confdefs.h. */
4536bbc6 14988
bec39cab
AC
14989int
14990main ()
14991{
4536bbc6 14992
bec39cab
AC
14993 ;
14994 return 0;
14995}
14996_ACEOF
81ecdfbb 14997if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14998 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14999fi
81ecdfbb 15000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15001 CFLAGS="$saved_CFLAGS"
746a987d
AC
15002 esac
15003 done
81ecdfbb
RW
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15005$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15006fi
15007
15008
104c1213 15009
7a292a7a 15010# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15012$as_echo_n "checking for cygwin... " >&6; }
15013if test "${gdb_cv_os_cygwin+set}" = set; then :
15014 $as_echo_n "(cached) " >&6
bec39cab 15015else
81ecdfbb 15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15017/* end confdefs.h. */
7a292a7a
SS
15018
15019#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15020lose
15021#endif
bec39cab 15022_ACEOF
7a292a7a 15023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15024 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15025 gdb_cv_os_cygwin=yes
15026else
7a292a7a
SS
15027 gdb_cv_os_cygwin=no
15028fi
15029rm -f conftest*
15030
15031fi
81ecdfbb
RW
15032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15033$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15034
aff38e61 15035
3eb25fda 15036SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15037case ${host} in
95cbc983
AC
15038 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15039 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15040 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15041esac
15042
15043
cd0fc7c3
SS
15044# libreadline needs libuser32.a in a cygwin environment
15045WIN32LIBS=
15046if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15047 WIN32LIBS="-luser32"
15048 case "${target}" in
15049 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15050 ;;
15051 esac
cd0fc7c3 15052fi
c906108c 15053
b4505029
MM
15054# The ser-tcp.c module requires sockets.
15055case ${host} in
15056 *mingw32*)
15057
81ecdfbb 15058$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15059
15060 WIN32LIBS="$WIN32LIBS -lws2_32"
15061 ;;
15062esac
15063
7a292a7a 15064
31d99776
DJ
15065# Add ELF support to GDB, but only if BFD includes ELF support.
15066OLD_CFLAGS=$CFLAGS
15067OLD_LDFLAGS=$LDFLAGS
15068OLD_LIBS=$LIBS
cab58a69 15069CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 15070LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 15071intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15072# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15073if test "$plugins" = "yes"; then
15074 LIBS="-ldl $LIBS"
15075fi
0f72fb1c 15076LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15078$as_echo_n "checking for ELF support in BFD... " >&6; }
15079if test "${gdb_cv_var_elf+set}" = set; then :
15080 $as_echo_n "(cached) " >&6
31d99776 15081else
81ecdfbb 15082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15083/* end confdefs.h. */
15084#include <stdlib.h>
15085#include "bfd.h"
15086#include "elf-bfd.h"
15087
15088int
15089main ()
15090{
15091bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15092 ;
15093 return 0;
15094}
15095_ACEOF
81ecdfbb 15096if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15097 gdb_cv_var_elf=yes
15098else
81ecdfbb 15099 gdb_cv_var_elf=no
31d99776 15100fi
81ecdfbb
RW
15101rm -f core conftest.err conftest.$ac_objext \
15102 conftest$ac_exeext conftest.$ac_ext
31d99776 15103fi
81ecdfbb
RW
15104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15105$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15106if test $gdb_cv_var_elf = yes; then
15107 CONFIG_OBS="$CONFIG_OBS elfread.o"
15108
81ecdfbb 15109$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15110
075ff26d
JK
15111 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15112 if test "$plugins" = "yes"; then
15113 OLD_LIBS="-ldl $OLD_LIBS"
15114 fi
31d99776
DJ
15115fi
15116CFLAGS=$OLD_CFLAGS
15117LDFLAGS=$OLD_LDFLAGS
15118LIBS=$OLD_LIBS
15119
121ce6e5
DJ
15120# Add any host-specific objects to GDB.
15121CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15122
3fc11d3e
JM
15123LIBGUI="../libgui/src/libgui.a"
15124GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15125
15126
7a292a7a 15127
3fc11d3e
JM
15128WIN32LDAPP=
15129
15130
15131
d91670b9 15132case "${host}" in
686a5eed 15133*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15134 configdir="win"
15135 ;;
15136*)
15137 configdir="unix"
15138 ;;
15139esac
3fc11d3e
JM
15140
15141GDBTKLIBS=
15142if test "${enable_gdbtk}" = "yes"; then
15143
d1c3b63a
KS
15144 # Gdbtk must have an absolute path to srcdir in order to run
15145 # properly when not installed.
15146 here=`pwd`
15147 cd ${srcdir}
15148 GDBTK_SRC_DIR=`pwd`
15149 cd $here
15150
bec39cab 15151
5062cc19
KS
15152 #
15153 # Ok, lets find the tcl configuration
15154 # First, look for one uninstalled.
15155 # the alternative search directory is invoked by --with-tcl
15156 #
3fc11d3e 15157
5062cc19
KS
15158 if test x"${no_tcl}" = x ; then
15159 # we reset no_tcl in case something fails here
15160 no_tcl=true
bec39cab 15161
81ecdfbb
RW
15162# Check whether --with-tcl was given.
15163if test "${with_tcl+set}" = set; then :
15164 withval=$with_tcl; with_tclconfig=${withval}
15165fi
15166
15167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15168$as_echo_n "checking for Tcl configuration... " >&6; }
15169 if test "${ac_cv_c_tclconfig+set}" = set; then :
15170 $as_echo_n "(cached) " >&6
3fc11d3e 15171else
bec39cab 15172
3fc11d3e 15173
5062cc19
KS
15174 # First check to see if --with-tcl was specified.
15175 case "${host}" in
15176 *-*-cygwin*) platDir="win" ;;
15177 *) platDir="unix" ;;
15178 esac
15179 if test x"${with_tclconfig}" != x ; then
15180 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15181 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15182 else
81ecdfbb 15183 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15184 fi
15185 fi
15186
15187 # then check for a private Tcl installation
15188 if test x"${ac_cv_c_tclconfig}" = x ; then
15189 for i in \
15190 ../tcl \
15191 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15192 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15193 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15194 ../../tcl \
15195 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15196 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15197 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15198 ../../../tcl \
15199 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15200 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15201 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15202 if test -f "$i/$platDir/tclConfig.sh" ; then
15203 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15204 break
15205 fi
15206 done
15207 fi
15208
15209 # on Darwin, check in Framework installation locations
15210 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15211 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15212 `ls -d /Library/Frameworks 2>/dev/null` \
15213 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15214 `ls -d /System/Library/Frameworks 2>/dev/null` \
15215 ; do
15216 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15217 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15218 break
15219 fi
15220 done
15221 fi
15222
15223 # check in a few common install locations
15224 if test x"${ac_cv_c_tclconfig}" = x ; then
15225 for i in `ls -d ${libdir} 2>/dev/null` \
15226 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15227 `ls -d ${prefix}/lib 2>/dev/null` \
15228 `ls -d /usr/local/lib 2>/dev/null` \
15229 `ls -d /usr/contrib/lib 2>/dev/null` \
15230 `ls -d /usr/lib 2>/dev/null` \
15231 ; do
15232 if test -f "$i/tclConfig.sh" ; then
15233 ac_cv_c_tclconfig=`(cd $i; pwd)`
15234 break
15235 fi
15236 done
15237 fi
3fc11d3e 15238
5062cc19
KS
15239 # check in a few other private locations
15240 if test x"${ac_cv_c_tclconfig}" = x ; then
15241 for i in \
15242 ${srcdir}/../tcl \
15243 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15244 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15245 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15246 if test -f "$i/$platDir/tclConfig.sh" ; then
15247 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15248 break
15249 fi
15250 done
15251 fi
bec39cab 15252
3fc11d3e
JM
15253fi
15254
5062cc19
KS
15255
15256 if test x"${ac_cv_c_tclconfig}" = x ; then
15257 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15259$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15260 else
15261 no_tcl=
15262 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15264$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15265 fi
15266 fi
3fc11d3e 15267
bec39cab 15268
85541719
DE
15269 # If $no_tk is nonempty, then we can't do Tk, and there is no
15270 # point to doing Tcl.
bec39cab 15271
5062cc19
KS
15272 #
15273 # Ok, lets find the tk configuration
15274 # First, look for one uninstalled.
15275 # the alternative search directory is invoked by --with-tk
15276 #
3fc11d3e 15277
5062cc19
KS
15278 if test x"${no_tk}" = x ; then
15279 # we reset no_tk in case something fails here
15280 no_tk=true
bec39cab 15281
81ecdfbb
RW
15282# Check whether --with-tk was given.
15283if test "${with_tk+set}" = set; then :
15284 withval=$with_tk; with_tkconfig=${withval}
15285fi
15286
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15288$as_echo_n "checking for Tk configuration... " >&6; }
15289 if test "${ac_cv_c_tkconfig+set}" = set; then :
15290 $as_echo_n "(cached) " >&6
bec39cab 15291else
3fc11d3e
JM
15292
15293
5062cc19
KS
15294 # First check to see if --with-tkconfig was specified.
15295 if test x"${with_tkconfig}" != x ; then
15296 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15297 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15298 else
81ecdfbb 15299 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15300 fi
15301 fi
3fc11d3e 15302
5062cc19
KS
15303 # then check for a private Tk library
15304 case "${host}" in
15305 *-*-cygwin*) platDir="win" ;;
15306 *) platDir="unix" ;;
15307 esac
15308 if test x"${ac_cv_c_tkconfig}" = x ; then
15309 for i in \
15310 ../tk \
15311 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15312 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15313 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15314 ../../tk \
15315 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15316 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15317 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15318 ../../../tk \
15319 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15320 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15321 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15322 if test -f "$i/$platDir/tkConfig.sh" ; then
15323 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15324 break
15325 fi
15326 done
15327 fi
15328
15329 # on Darwin, check in Framework installation locations
15330 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15331 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15332 `ls -d /Library/Frameworks 2>/dev/null` \
15333 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15334 `ls -d /System/Library/Frameworks 2>/dev/null` \
15335 ; do
15336 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15337 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15338 break
15339 fi
15340 done
15341 fi
15342
15343 # check in a few common install locations
15344 if test x"${ac_cv_c_tkconfig}" = x ; then
15345 for i in `ls -d ${libdir} 2>/dev/null` \
15346 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15347 `ls -d ${prefix}/lib 2>/dev/null` \
15348 `ls -d /usr/local/lib 2>/dev/null` \
15349 `ls -d /usr/contrib/lib 2>/dev/null` \
15350 `ls -d /usr/lib 2>/dev/null` \
15351 ; do
15352 if test -f "$i/tkConfig.sh" ; then
15353 ac_cv_c_tkconfig=`(cd $i; pwd)`
15354 break
15355 fi
15356 done
15357 fi
15358 # check in a few other private locations
15359 if test x"${ac_cv_c_tkconfig}" = x ; then
15360 for i in \
15361 ${srcdir}/../tk \
15362 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15363 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15364 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15365 if test -f "$i/$platDir/tkConfig.sh" ; then
15366 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15367 break
15368 fi
15369 done
15370 fi
3fc11d3e 15371
3fc11d3e
JM
15372fi
15373
15374
5062cc19
KS
15375 if test x"${ac_cv_c_tkconfig}" = x ; then
15376 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15378$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15379 else
15380 no_tk=
15381 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15383$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15384 fi
3fc11d3e 15385 fi
dd2504ab 15386
dd2504ab 15387
85541719
DE
15388 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15389
81ecdfbb
RW
15390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15391$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15392
15393 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15395$as_echo "loading" >&6; }
85541719
DE
15396 . ${TCL_BIN_DIR}/tclConfig.sh
15397 else
81ecdfbb
RW
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15399$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15400 fi
15401
15402 # eval is required to do the TCL_DBGX substitution
15403 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15404 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15405
15406 # If the TCL_BIN_DIR is the build directory (not the install directory),
15407 # then set the common variable name to the value of the build variables.
15408 # For example, the variable TCL_LIB_SPEC will be set to the value
15409 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15410 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15411 # installed and uninstalled version of Tcl.
15412 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15413 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15414 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15415 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15416 elif test "`uname -s`" = "Darwin"; then
15417 # If Tcl was built as a framework, attempt to use the libraries
15418 # from the framework at the given location so that linking works
15419 # against Tcl.framework installed in an arbitary location.
15420 case ${TCL_DEFS} in
15421 *TCL_FRAMEWORK*)
15422 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15423 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15424 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15425 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15426 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15427 break
15428 fi
15429 done
15430 fi
15431 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15432 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15433 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15434 fi
15435 ;;
15436 esac
15437 fi
15438
15439 # eval is required to do the TCL_DBGX substitution
15440 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15441 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15442 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15443 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459 # Check for in-tree tcl
15460 here=`pwd`
15461 cd ${srcdir}/..
15462 topdir=`pwd`
15463 cd ${here}
15464
15465 intree="no"
15466 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15467 intree="yes"
15468 fi
15469
15470 # Find Tcl private headers
15471 if test x"${intree}" = xno; then
15472
81ecdfbb
RW
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15474$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15475 private_dir=""
15476 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15477 if test -f ${dir}/tclInt.h ; then
15478 private_dir=${dir}
15479 fi
15480
15481 if test x"${private_dir}" = x; then
81ecdfbb 15482 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15483 else
15484 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15486$as_echo "${private_dir}" >&6; }
85541719
DE
15487 fi
15488
15489 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15490 TCL_LIBRARY="${TCL_LIB_SPEC}"
15491 TCL_DEPS=""
15492 else
15493 # If building tcl in the same src tree, private headers
15494 # are not needed, but we need to be sure to use the right
15495 # headers library
15496 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15497 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15498 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15499 fi
15500
15501
15502
15503
15504
81ecdfbb
RW
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15506$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15507
5062cc19 15508 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15510$as_echo "loading" >&6; }
5062cc19 15511 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15512 else
81ecdfbb
RW
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15514$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15515 fi
bec39cab 15516
5062cc19
KS
15517 # eval is required to do the TK_DBGX substitution
15518 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15519 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15520
15521 # If the TK_BIN_DIR is the build directory (not the install directory),
15522 # then set the common variable name to the value of the build variables.
15523 # For example, the variable TK_LIB_SPEC will be set to the value
15524 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15525 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15526 # installed and uninstalled version of Tcl.
85541719 15527 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15528 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15529 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15530 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15531 elif test "`uname -s`" = "Darwin"; then
15532 # If Tk was built as a framework, attempt to use the libraries
15533 # from the framework at the given location so that linking works
15534 # against Tk.framework installed in an arbitary location.
15535 case ${TK_DEFS} in
15536 *TK_FRAMEWORK*)
85541719 15537 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15538 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15539 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15540 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15541 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15542 break
15543 fi
15544 done
15545 fi
85541719 15546 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15547 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15548 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15549 fi
15550 ;;
15551 esac
3fc11d3e
JM
15552 fi
15553
5062cc19
KS
15554 # eval is required to do the TK_DBGX substitution
15555 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15556 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15557 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15558 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15559
3fc11d3e
JM
15560
15561
bec39cab
AC
15562
15563
15564
15565
15566
15567
15568
3fc11d3e 15569
3fc11d3e 15570
bec39cab 15571
bec39cab 15572
85541719
DE
15573 # Check for in-tree Tk
15574 intree="no"
15575 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15576 intree="yes"
15577 fi
3fc11d3e 15578
85541719
DE
15579 # Find Tk private headers
15580 if test x"${intree}" = xno; then
3fc11d3e 15581
81ecdfbb
RW
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15583$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15584 private_dir=""
15585 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15586 if test -f ${dir}/tkInt.h; then
15587 private_dir=${dir}
3fc11d3e 15588 fi
bec39cab 15589
5062cc19 15590 if test x"${private_dir}" = x; then
81ecdfbb 15591 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15592 else
5062cc19 15593 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15595$as_echo "${private_dir}" >&6; }
3fc11d3e 15596 fi
3fc11d3e 15597
85541719
DE
15598 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15599 TK_LIBRARY=${TK_LIB_SPEC}
15600 TK_DEPS=""
15601 else
15602 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15603 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15604 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15605 fi
3fc11d3e
JM
15606
15607
3fc11d3e
JM
15608
15609
3fc11d3e 15610
85541719 15611 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15612
85541719
DE
15613 # Include some libraries that Tcl and Tk want.
15614 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15615 # Yes, the ordering seems wrong here. But it isn't.
15616 # TK_LIBS is the list of libraries that need to be linked
15617 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15618 # were in LIBS then any link tests after this point would
15619 # try to include things like `$(LIBGUI)', which wouldn't work.
15620 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15621
85541719
DE
15622 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15623 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15624 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15625 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15626 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15627 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15628 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15629
85541719
DE
15630 if test x$gdb_cv_os_cygwin = xyes; then
15631 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15632 WIN32LDAPP="-Wl,--subsystem,console"
15633 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15634 fi
ffc6a242 15635
81ecdfbb 15636 subdirs="$subdirs gdbtk"
3ace7edb 15637
85541719 15638 fi
3fc11d3e
JM
15639fi
15640
15641
15642
15643
15644
15645
15646
15647
81ecdfbb
RW
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15649$as_echo_n "checking for X... " >&6; }
bec39cab 15650
c906108c 15651
81ecdfbb
RW
15652# Check whether --with-x was given.
15653if test "${with_x+set}" = set; then :
15654 withval=$with_x;
15655fi
c906108c
SS
15656
15657# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15658if test "x$with_x" = xno; then
15659 # The user explicitly disabled X.
15660 have_x=disabled
15661else
81ecdfbb
RW
15662 case $x_includes,$x_libraries in #(
15663 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15664 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15665 $as_echo_n "(cached) " >&6
c906108c
SS
15666else
15667 # One or both of the vars are not set, and there is no cached value.
bec39cab 15668ac_x_includes=no ac_x_libraries=no
81ecdfbb 15669rm -f -r conftest.dir
bec39cab
AC
15670if mkdir conftest.dir; then
15671 cd conftest.dir
bec39cab 15672 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15673incroot:
15674 @echo incroot='${INCROOT}'
15675usrlibdir:
15676 @echo usrlibdir='${USRLIBDIR}'
15677libdir:
15678 @echo libdir='${LIBDIR}'
15679_ACEOF
15680 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15681 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15682 for ac_var in incroot usrlibdir libdir; do
15683 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15684 done
c906108c 15685 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15686 for ac_extension in a so sl dylib la dll; do
15687 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15688 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15689 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15690 fi
15691 done
15692 # Screen out bogus values from the imake configuration. They are
15693 # bogus both because they are the default anyway, and because
15694 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15695 case $ac_im_incroot in
81ecdfbb 15696 /usr/include) ac_x_includes= ;;
bec39cab 15697 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15698 esac
bec39cab 15699 case $ac_im_usrlibdir in
81ecdfbb 15700 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15701 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15702 esac
15703 fi
15704 cd ..
81ecdfbb 15705 rm -f -r conftest.dir
c906108c
SS
15706fi
15707
bec39cab
AC
15708# Standard set of common directories for X headers.
15709# Check X11 before X11Rn because it is often a symlink to the current release.
15710ac_x_header_dirs='
15711/usr/X11/include
81ecdfbb 15712/usr/X11R7/include
bec39cab
AC
15713/usr/X11R6/include
15714/usr/X11R5/include
15715/usr/X11R4/include
15716
15717/usr/include/X11
81ecdfbb 15718/usr/include/X11R7
bec39cab
AC
15719/usr/include/X11R6
15720/usr/include/X11R5
15721/usr/include/X11R4
15722
15723/usr/local/X11/include
81ecdfbb 15724/usr/local/X11R7/include
bec39cab
AC
15725/usr/local/X11R6/include
15726/usr/local/X11R5/include
15727/usr/local/X11R4/include
15728
15729/usr/local/include/X11
81ecdfbb 15730/usr/local/include/X11R7
bec39cab
AC
15731/usr/local/include/X11R6
15732/usr/local/include/X11R5
15733/usr/local/include/X11R4
15734
15735/usr/X386/include
15736/usr/x386/include
15737/usr/XFree86/include/X11
15738
15739/usr/include
15740/usr/local/include
15741/usr/unsupported/include
15742/usr/athena/include
15743/usr/local/x11r5/include
15744/usr/lpp/Xamples/include
15745
15746/usr/openwin/include
15747/usr/openwin/share/include'
15748
15749if test "$ac_x_includes" = no; then
81ecdfbb 15750 # Guess where to find include files, by looking for Xlib.h.
c906108c 15751 # First, try using that file with no special directory specified.
81ecdfbb 15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15753/* end confdefs.h. */
81ecdfbb 15754#include <X11/Xlib.h>
bec39cab 15755_ACEOF
81ecdfbb 15756if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15757 # We can compile using X headers with no special include directory.
15758ac_x_includes=
15759else
bec39cab 15760 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15761 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15762 ac_x_includes=$ac_dir
15763 break
15764 fi
15765done
c906108c 15766fi
bec39cab
AC
15767rm -f conftest.err conftest.$ac_ext
15768fi # $ac_x_includes = no
c906108c 15769
bec39cab 15770if test "$ac_x_libraries" = no; then
c906108c 15771 # Check for the libraries.
c906108c
SS
15772 # See if we find them without any special options.
15773 # Don't add to $LIBS permanently.
bec39cab 15774 ac_save_LIBS=$LIBS
81ecdfbb
RW
15775 LIBS="-lX11 $LIBS"
15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15777/* end confdefs.h. */
81ecdfbb 15778#include <X11/Xlib.h>
bec39cab
AC
15779int
15780main ()
15781{
81ecdfbb 15782XrmInitialize ()
bec39cab
AC
15783 ;
15784 return 0;
15785}
15786_ACEOF
81ecdfbb 15787if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15788 LIBS=$ac_save_LIBS
c906108c
SS
15789# We can link X programs with no special library path.
15790ac_x_libraries=
15791else
81ecdfbb
RW
15792 LIBS=$ac_save_LIBS
15793for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15794do
bec39cab 15795 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15796 for ac_extension in a so sl dylib la dll; do
15797 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15798 ac_x_libraries=$ac_dir
15799 break 2
15800 fi
15801 done
15802done
15803fi
81ecdfbb
RW
15804rm -f core conftest.err conftest.$ac_objext \
15805 conftest$ac_exeext conftest.$ac_ext
bec39cab 15806fi # $ac_x_libraries = no
c906108c 15807
81ecdfbb
RW
15808case $ac_x_includes,$ac_x_libraries in #(
15809 no,* | *,no | *\'*)
15810 # Didn't find X, or a directory has "'" in its name.
15811 ac_cv_have_x="have_x=no";; #(
15812 *)
15813 # Record where we found X for the cache.
15814 ac_cv_have_x="have_x=yes\
15815 ac_x_includes='$ac_x_includes'\
15816 ac_x_libraries='$ac_x_libraries'"
15817esac
c906108c 15818fi
81ecdfbb
RW
15819;; #(
15820 *) have_x=yes;;
15821 esac
c906108c
SS
15822 eval "$ac_cv_have_x"
15823fi # $with_x != no
15824
15825if test "$have_x" != yes; then
81ecdfbb
RW
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15827$as_echo "$have_x" >&6; }
c906108c
SS
15828 no_x=yes
15829else
15830 # If each of the values was on the command line, it overrides each guess.
15831 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15832 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15833 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15834 ac_cv_have_x="have_x=yes\
15835 ac_x_includes='$x_includes'\
15836 ac_x_libraries='$x_libraries'"
15837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15838$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15839fi
15840
15841
bec39cab 15842# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15843# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15844# This code just checks for a few cases where we'd like to ignore those
15845# definitions, even when they're present in the '.mt' file. These cases
15846# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15847# not part of the source tree.
7a292a7a 15848#
81ecdfbb
RW
15849# Check whether --enable-sim was given.
15850if test "${enable_sim+set}" = set; then :
15851 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15852 echo "enableval = ${enableval}";
15853 case "${enableval}" in
15854 yes) ignore_sim=false ;;
15855 no) ignore_sim=true ;;
15856 *) ignore_sim=false ;;
15857 esac
15858else
15859 ignore_sim=false
81ecdfbb
RW
15860fi
15861
7a292a7a
SS
15862
15863if test ! -d "${srcdir}/../sim"; then
15864 ignore_sim=true
15865fi
15866
9b624dbe
UW
15867SIM=
15868SIM_OBS=
15869if test "${ignore_sim}" = "false"; then
15870 if test x"${gdb_sim}" != x ; then
15871 SIM="${gdb_sim}"
15872 SIM_OBS="remote-sim.o"
60ca704f 15873
81ecdfbb 15874$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15875
9b624dbe 15876 fi
7a292a7a
SS
15877fi
15878
15879
15880
c906108c
SS
15881
15882
15883
15884
15885
15886
dfcd3bfb 15887
e56ac5c3
AC
15888
15889
b3a90332
AC
15890
15891
c35f4ffc 15892# List of host floatformats.
bec39cab
AC
15893
15894cat >>confdefs.h <<_ACEOF
c35f4ffc 15895#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15896_ACEOF
c35f4ffc 15897
bec39cab
AC
15898
15899cat >>confdefs.h <<_ACEOF
c35f4ffc 15900#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15901_ACEOF
15902
c35f4ffc 15903
bec39cab 15904cat >>confdefs.h <<_ACEOF
c35f4ffc 15905#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15906_ACEOF
c35f4ffc
AC
15907
15908
c906108c
SS
15909# target_subdir is used by the testsuite to find the target libraries.
15910target_subdir=
15911if test "${host}" != "${target}"; then
15912 target_subdir="${target_alias}/"
15913fi
15914
15915
15916frags=
771b4502 15917if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15918 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15919 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15920 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15921 fi
15922 frags="$frags $host_makefile_frag"
15923else
15924 host_makefile_frag=/dev/null
c906108c 15925fi
c906108c 15926
c906108c
SS
15927
15928
15929
771b4502 15930if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15931# We pick this up from the host configuration file (.mh) because we
15932# do not have a native configuration Makefile fragment.
c906108c
SS
15933nativefile=`sed -n '
15934s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15935' ${host_makefile_frag}`
c906108c
SS
15936fi
15937
15938
b00a8037 15939if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15940
15941cat >>confdefs.h <<_ACEOF
b00a8037 15942#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15943_ACEOF
b00a8037
DJ
15944
15945fi
15946
8dcde887 15947# Enable multi-ice-gdb-server.
81ecdfbb
RW
15948# Check whether --enable-multi-ice was given.
15949if test "${enable_multi_ice+set}" = set; then :
15950 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15951 yes | no)
15952 ;;
81ecdfbb 15953 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15954 esac
81ecdfbb 15955fi
b4e70030 15956
81ecdfbb
RW
15957if test "x$enable_multi_ice" = xyes; then
15958 subdirs="$subdirs multi-ice"
3ace7edb 15959
a85f51e7
DJ
15960fi
15961
496c0e1b
JB
15962# Check whether --enable-gdbserver was given.
15963if test "${enable_gdbserver+set}" = set; then :
15964 enableval=$enable_gdbserver; case "${enableval}" in
15965 yes| no|auto) ;;
15966 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15967esac
15968else
15969 enable_gdbserver=auto
15970fi
15971
15972
15973# We only build gdbserver automatically in a native configuration, and
15974# only if the user did not explicitly disable its build.
15975if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15977$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15978 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15980$as_echo "yes" >&6; }
15981 subdirs="$subdirs gdbserver"
3ace7edb 15982
496c0e1b 15983 gdbserver_build_enabled=yes
8dcde887 15984 else
81ecdfbb
RW
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15986$as_echo "no" >&6; }
8dcde887
MK
15987 fi
15988fi
15989
496c0e1b
JB
15990# If the user explicitly request the gdbserver to be built, verify that
15991# we were in fact able to enable it.
15992if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15993 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15994fi
15995
db985757 15996# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15997# to an empty version.
c906108c
SS
15998
15999files=
16000links=
5a2402b8 16001
c906108c
SS
16002rm -f nm.h
16003if test "${nativefile}" != ""; then
0f475e27
AC
16004 case "${nativefile}" in
16005 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16006 * ) GDB_NM_FILE="${nativefile}"
16007 esac
5a2402b8
AC
16008 files="${files} ${GDB_NM_FILE}"
16009 links="${links} nm.h"
60ca704f
SE
16010
16011cat >>confdefs.h <<_ACEOF
b78960be 16012#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16013_ACEOF
5a2402b8 16014
c906108c 16015fi
5a2402b8
AC
16016
16017
bec39cab
AC
16018ac_sources="$files"
16019ac_dests="$links"
16020while test -n "$ac_sources"; do
16021 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16022 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16023 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16024done
81ecdfbb 16025ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16026
16027
c906108c
SS
16028
16029
c906108c 16030
81ecdfbb 16031$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16032
bec39cab 16033
5ae98d25 16034ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16035
16036ac_config_commands="$ac_config_commands default"
89a34d1b 16037
bec39cab
AC
16038cat >confcache <<\_ACEOF
16039# This file is a shell script that caches the results of configure
16040# tests run on this system so they can be shared between configure
16041# scripts and configure runs, see configure's option --config-cache.
16042# It is not useful on other systems. If it contains results you don't
16043# want to keep, you may remove or edit it.
16044#
16045# config.status only pays attention to the cache file if you give it
16046# the --recheck option to rerun configure.
16047#
16048# `ac_cv_env_foo' variables (set or unset) will be overridden when
16049# loading this file, other *unset* `ac_cv_foo' will be assigned the
16050# following values.
16051
16052_ACEOF
16053
16054# The following way of writing the cache mishandles newlines in values,
16055# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16056# So, we kill variables containing newlines.
bec39cab
AC
16057# Ultrix sh set writes to stderr and can't be redirected directly,
16058# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16059(
16060 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16061 eval ac_val=\$$ac_var
16062 case $ac_val in #(
16063 *${as_nl}*)
16064 case $ac_var in #(
16065 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16066$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16067 esac
16068 case $ac_var in #(
16069 _ | IFS | as_nl) ;; #(
16070 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16071 *) { eval $ac_var=; unset $ac_var;} ;;
16072 esac ;;
16073 esac
16074 done
16075
bec39cab 16076 (set) 2>&1 |
81ecdfbb
RW
16077 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16078 *${as_nl}ac_space=\ *)
16079 # `set' does not quote correctly, so add quotes: double-quote
16080 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16081 sed -n \
16082 "s/'/'\\\\''/g;
16083 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16084 ;; #(
bec39cab
AC
16085 *)
16086 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16087 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16088 ;;
81ecdfbb
RW
16089 esac |
16090 sort
16091) |
bec39cab 16092 sed '
81ecdfbb 16093 /^ac_cv_env_/b end
bec39cab 16094 t clear
81ecdfbb 16095 :clear
bec39cab
AC
16096 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16097 t end
81ecdfbb
RW
16098 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16099 :end' >>confcache
16100if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16101 if test -w "$cache_file"; then
16102 test "x$cache_file" != "x/dev/null" &&
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16104$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16105 cat confcache >$cache_file
16106 else
81ecdfbb
RW
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16108$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16109 fi
16110fi
16111rm -f confcache
16112
16113test "x$prefix" = xNONE && prefix=$ac_default_prefix
16114# Let make expand exec_prefix.
16115test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16116
bec39cab
AC
16117DEFS=-DHAVE_CONFIG_H
16118
16119ac_libobjs=
16120ac_ltlibobjs=
16121for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16122 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16123 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16124 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16125 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16126 # will be set to the directory where LIBOBJS objects are built.
16127 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16128 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16129done
16130LIBOBJS=$ac_libobjs
16131
16132LTLIBOBJS=$ac_ltlibobjs
16133
16134
85981d60 16135if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16136 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16137Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16138fi
a417dc56 16139if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16140 as_fn_error "conditional \"GMAKE\" was never defined.
16141Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16142fi
783e057b 16143if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16144 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16145Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16146fi
16147
16148 gl_libobjs=
16149 gl_ltlibobjs=
16150 if test -n "$gl_LIBOBJS"; then
16151 # Remove the extension.
16152 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16153 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16154 gl_libobjs="$gl_libobjs $i.$ac_objext"
16155 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16156 done
16157 fi
16158 gl_LIBOBJS=$gl_libobjs
16159
16160 gl_LTLIBOBJS=$gl_ltlibobjs
16161
16162
16163
16164 gltests_libobjs=
16165 gltests_ltlibobjs=
16166 if test -n "$gltests_LIBOBJS"; then
16167 # Remove the extension.
16168 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16169 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16170 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16171 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16172 done
16173 fi
16174 gltests_LIBOBJS=$gltests_libobjs
16175
16176 gltests_LTLIBOBJS=$gltests_ltlibobjs
16177
16178
e28b3332 16179if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16180 as_fn_error "conditional \"AMDEP\" was never defined.
16181Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16182fi
16183if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16184 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16185Usually this means the macro was only invoked conditionally." "$LINENO" 5
16186fi
16187 if test -n "$EXEEXT"; then
16188 am__EXEEXT_TRUE=
16189 am__EXEEXT_FALSE='#'
16190else
16191 am__EXEEXT_TRUE='#'
16192 am__EXEEXT_FALSE=
e28b3332 16193fi
bec39cab 16194
81ecdfbb
RW
16195
16196
bec39cab 16197: ${CONFIG_STATUS=./config.status}
81ecdfbb 16198ac_write_fail=0
bec39cab
AC
16199ac_clean_files_save=$ac_clean_files
16200ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16201{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16202$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16203as_write_fail=0
16204cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16205#! $SHELL
16206# Generated by $as_me.
16207# Run this file to recreate the current configuration.
16208# Compiler output produced by configure, useful for debugging
16209# configure, is in config.log if it exists.
16210
16211debug=false
16212ac_cs_recheck=false
16213ac_cs_silent=false
bec39cab 16214
81ecdfbb
RW
16215SHELL=\${CONFIG_SHELL-$SHELL}
16216export SHELL
16217_ASEOF
16218cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16219## -------------------- ##
16220## M4sh Initialization. ##
16221## -------------------- ##
16222
16223# Be more Bourne compatible
16224DUALCASE=1; export DUALCASE # for MKS sh
16225if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16226 emulate sh
16227 NULLCMD=:
81ecdfbb 16228 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16229 # is contrary to our usage. Disable this feature.
16230 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16231 setopt NO_GLOB_SUBST
16232else
16233 case `(set -o) 2>/dev/null` in #(
16234 *posix*) :
16235 set -o posix ;; #(
16236 *) :
16237 ;;
16238esac
bec39cab 16239fi
bec39cab 16240
81ecdfbb
RW
16241
16242as_nl='
16243'
16244export as_nl
16245# Printing a long string crashes Solaris 7 /usr/bin/printf.
16246as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16247as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16248as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16249# Prefer a ksh shell builtin over an external printf program on Solaris,
16250# but without wasting forks for bash or zsh.
16251if test -z "$BASH_VERSION$ZSH_VERSION" \
16252 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16253 as_echo='print -r --'
16254 as_echo_n='print -rn --'
16255elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16256 as_echo='printf %s\n'
16257 as_echo_n='printf %s'
16258else
16259 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16260 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16261 as_echo_n='/usr/ucb/echo -n'
16262 else
16263 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16264 as_echo_n_body='eval
16265 arg=$1;
16266 case $arg in #(
16267 *"$as_nl"*)
16268 expr "X$arg" : "X\\(.*\\)$as_nl";
16269 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16270 esac;
16271 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16272 '
16273 export as_echo_n_body
16274 as_echo_n='sh -c $as_echo_n_body as_echo'
16275 fi
16276 export as_echo_body
16277 as_echo='sh -c $as_echo_body as_echo'
16278fi
16279
16280# The user is always right.
16281if test "${PATH_SEPARATOR+set}" != set; then
16282 PATH_SEPARATOR=:
16283 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16284 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16285 PATH_SEPARATOR=';'
16286 }
bec39cab
AC
16287fi
16288
16289
81ecdfbb
RW
16290# IFS
16291# We need space, tab and new line, in precisely that order. Quoting is
16292# there to prevent editors from complaining about space-tab.
16293# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16294# splitting by setting IFS to empty value.)
16295IFS=" "" $as_nl"
16296
16297# Find who we are. Look in the path if we contain no directory separator.
16298case $0 in #((
16299 *[\\/]* ) as_myself=$0 ;;
16300 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16301for as_dir in $PATH
16302do
16303 IFS=$as_save_IFS
16304 test -z "$as_dir" && as_dir=.
16305 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16306 done
16307IFS=$as_save_IFS
16308
16309 ;;
16310esac
16311# We did not find ourselves, most probably we were run as `sh COMMAND'
16312# in which case we are not to be found in the path.
16313if test "x$as_myself" = x; then
16314 as_myself=$0
16315fi
16316if test ! -f "$as_myself"; then
16317 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16318 exit 1
16319fi
16320
16321# Unset variables that we do not need and which cause bugs (e.g. in
16322# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16323# suppresses any "Segmentation fault" message there. '((' could
16324# trigger a bug in pdksh 5.2.14.
16325for as_var in BASH_ENV ENV MAIL MAILPATH
16326do eval test x\${$as_var+set} = xset \
16327 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16328done
bec39cab
AC
16329PS1='$ '
16330PS2='> '
16331PS4='+ '
16332
16333# NLS nuisances.
81ecdfbb
RW
16334LC_ALL=C
16335export LC_ALL
16336LANGUAGE=C
16337export LANGUAGE
16338
16339# CDPATH.
16340(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16341
16342
16343# as_fn_error ERROR [LINENO LOG_FD]
16344# ---------------------------------
16345# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16346# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16347# script with status $?, using 1 if that was 0.
16348as_fn_error ()
16349{
16350 as_status=$?; test $as_status -eq 0 && as_status=1
16351 if test "$3"; then
16352 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16353 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16354 fi
16355 $as_echo "$as_me: error: $1" >&2
16356 as_fn_exit $as_status
16357} # as_fn_error
16358
16359
16360# as_fn_set_status STATUS
16361# -----------------------
16362# Set $? to STATUS, without forking.
16363as_fn_set_status ()
16364{
16365 return $1
16366} # as_fn_set_status
16367
16368# as_fn_exit STATUS
16369# -----------------
16370# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16371as_fn_exit ()
16372{
16373 set +e
16374 as_fn_set_status $1
16375 exit $1
16376} # as_fn_exit
16377
16378# as_fn_unset VAR
16379# ---------------
16380# Portably unset VAR.
16381as_fn_unset ()
16382{
16383 { eval $1=; unset $1;}
16384}
16385as_unset=as_fn_unset
16386# as_fn_append VAR VALUE
16387# ----------------------
16388# Append the text in VALUE to the end of the definition contained in VAR. Take
16389# advantage of any shell optimizations that allow amortized linear growth over
16390# repeated appends, instead of the typical quadratic growth present in naive
16391# implementations.
16392if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16393 eval 'as_fn_append ()
16394 {
16395 eval $1+=\$2
16396 }'
16397else
16398 as_fn_append ()
16399 {
16400 eval $1=\$$1\$2
16401 }
16402fi # as_fn_append
16403
16404# as_fn_arith ARG...
16405# ------------------
16406# Perform arithmetic evaluation on the ARGs, and store the result in the
16407# global $as_val. Take advantage of shells that can avoid forks. The arguments
16408# must be portable across $(()) and expr.
16409if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16410 eval 'as_fn_arith ()
16411 {
16412 as_val=$(( $* ))
16413 }'
16414else
16415 as_fn_arith ()
16416 {
16417 as_val=`expr "$@" || test $? -eq 1`
16418 }
16419fi # as_fn_arith
bec39cab 16420
81ecdfbb
RW
16421
16422if expr a : '\(a\)' >/dev/null 2>&1 &&
16423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16424 as_expr=expr
16425else
16426 as_expr=false
16427fi
16428
81ecdfbb 16429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16430 as_basename=basename
16431else
16432 as_basename=false
16433fi
16434
81ecdfbb
RW
16435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16436 as_dirname=dirname
16437else
16438 as_dirname=false
16439fi
bec39cab 16440
81ecdfbb 16441as_me=`$as_basename -- "$0" ||
bec39cab
AC
16442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16443 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16445$as_echo X/"$0" |
16446 sed '/^.*\/\([^/][^/]*\)\/*$/{
16447 s//\1/
16448 q
16449 }
16450 /^X\/\(\/\/\)$/{
16451 s//\1/
16452 q
16453 }
16454 /^X\/\(\/\).*/{
16455 s//\1/
16456 q
16457 }
16458 s/.*/./; q'`
b4e70030 16459
b4e70030
JB
16460# Avoid depending upon Character Ranges.
16461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16464as_cr_digits='0123456789'
16465as_cr_alnum=$as_cr_Letters$as_cr_digits
16466
81ecdfbb
RW
16467ECHO_C= ECHO_N= ECHO_T=
16468case `echo -n x` in #(((((
16469-n*)
16470 case `echo 'xy\c'` in
16471 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16472 xy) ECHO_C='\c';;
16473 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16474 ECHO_T=' ';;
16475 esac;;
16476*)
16477 ECHO_N='-n';;
bec39cab
AC
16478esac
16479
81ecdfbb
RW
16480rm -f conf$$ conf$$.exe conf$$.file
16481if test -d conf$$.dir; then
16482 rm -f conf$$.dir/conf$$.file
bec39cab 16483else
81ecdfbb
RW
16484 rm -f conf$$.dir
16485 mkdir conf$$.dir 2>/dev/null
bec39cab 16486fi
81ecdfbb
RW
16487if (echo >conf$$.file) 2>/dev/null; then
16488 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16489 as_ln_s='ln -s'
81ecdfbb
RW
16490 # ... but there are two gotchas:
16491 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16492 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16493 # In both cases, we have to default to `cp -p'.
16494 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16495 as_ln_s='cp -p'
16496 elif ln conf$$.file conf$$ 2>/dev/null; then
16497 as_ln_s=ln
16498 else
16499 as_ln_s='cp -p'
b4e70030 16500 fi
bec39cab
AC
16501else
16502 as_ln_s='cp -p'
16503fi
81ecdfbb
RW
16504rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16505rmdir conf$$.dir 2>/dev/null
16506
16507
16508# as_fn_mkdir_p
16509# -------------
16510# Create "$as_dir" as a directory, including parents if necessary.
16511as_fn_mkdir_p ()
16512{
16513
16514 case $as_dir in #(
16515 -*) as_dir=./$as_dir;;
16516 esac
16517 test -d "$as_dir" || eval $as_mkdir_p || {
16518 as_dirs=
16519 while :; do
16520 case $as_dir in #(
16521 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16522 *) as_qdir=$as_dir;;
16523 esac
16524 as_dirs="'$as_qdir' $as_dirs"
16525 as_dir=`$as_dirname -- "$as_dir" ||
16526$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16527 X"$as_dir" : 'X\(//\)[^/]' \| \
16528 X"$as_dir" : 'X\(//\)$' \| \
16529 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16530$as_echo X"$as_dir" |
16531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16532 s//\1/
16533 q
16534 }
16535 /^X\(\/\/\)[^/].*/{
16536 s//\1/
16537 q
16538 }
16539 /^X\(\/\/\)$/{
16540 s//\1/
16541 q
16542 }
16543 /^X\(\/\).*/{
16544 s//\1/
16545 q
16546 }
16547 s/.*/./; q'`
16548 test -d "$as_dir" && break
16549 done
16550 test -z "$as_dirs" || eval "mkdir $as_dirs"
16551 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16552
bec39cab 16553
81ecdfbb 16554} # as_fn_mkdir_p
bec39cab 16555if mkdir -p . 2>/dev/null; then
81ecdfbb 16556 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16557else
16558 test -d ./-p && rmdir ./-p
16559 as_mkdir_p=false
16560fi
16561
81ecdfbb
RW
16562if test -x / >/dev/null 2>&1; then
16563 as_test_x='test -x'
16564else
16565 if ls -dL / >/dev/null 2>&1; then
16566 as_ls_L_option=L
16567 else
16568 as_ls_L_option=
16569 fi
16570 as_test_x='
16571 eval sh -c '\''
16572 if test -d "$1"; then
16573 test -d "$1/.";
16574 else
16575 case $1 in #(
16576 -*)set "./$1";;
16577 esac;
16578 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16579 ???[sx]*):;;*)false;;esac;fi
16580 '\'' sh
16581 '
16582fi
16583as_executable_p=$as_test_x
bec39cab
AC
16584
16585# Sed expression to map a string onto a valid CPP name.
16586as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16587
16588# Sed expression to map a string onto a valid variable name.
16589as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16590
16591
bec39cab 16592exec 6>&1
81ecdfbb
RW
16593## ----------------------------------- ##
16594## Main body of $CONFIG_STATUS script. ##
16595## ----------------------------------- ##
16596_ASEOF
16597test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16598
16599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16600# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16601# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16602# values after options handling.
16603ac_log="
bec39cab 16604This file was extended by $as_me, which was
81ecdfbb 16605generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16606
16607 CONFIG_FILES = $CONFIG_FILES
16608 CONFIG_HEADERS = $CONFIG_HEADERS
16609 CONFIG_LINKS = $CONFIG_LINKS
16610 CONFIG_COMMANDS = $CONFIG_COMMANDS
16611 $ $0 $@
16612
81ecdfbb
RW
16613on `(hostname || uname -n) 2>/dev/null | sed 1q`
16614"
16615
bec39cab
AC
16616_ACEOF
16617
81ecdfbb
RW
16618case $ac_config_files in *"
16619"*) set x $ac_config_files; shift; ac_config_files=$*;;
16620esac
234b45d4 16621
81ecdfbb
RW
16622case $ac_config_headers in *"
16623"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16624esac
b4e70030 16625
b4e70030 16626
81ecdfbb
RW
16627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16628# Files that config.status was made for.
16629config_files="$ac_config_files"
16630config_headers="$ac_config_headers"
16631config_links="$ac_config_links"
16632config_commands="$ac_config_commands"
234b45d4 16633
81ecdfbb 16634_ACEOF
b4e70030 16635
81ecdfbb 16636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16637ac_cs_usage="\
81ecdfbb
RW
16638\`$as_me' instantiates files and other configuration actions
16639from templates according to the current configuration. Unless the files
16640and actions are specified as TAGs, all are instantiated by default.
234b45d4 16641
81ecdfbb 16642Usage: $0 [OPTION]... [TAG]...
234b45d4 16643
bec39cab 16644 -h, --help print this help, then exit
81ecdfbb
RW
16645 -V, --version print version number and configuration settings, then exit
16646 -q, --quiet, --silent
16647 do not print progress messages
bec39cab
AC
16648 -d, --debug don't remove temporary files
16649 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16650 --file=FILE[:TEMPLATE]
16651 instantiate the configuration file FILE
16652 --header=FILE[:TEMPLATE]
16653 instantiate the configuration header FILE
234b45d4 16654
bec39cab
AC
16655Configuration files:
16656$config_files
234b45d4 16657
bec39cab
AC
16658Configuration headers:
16659$config_headers
234b45d4 16660
bec39cab
AC
16661Configuration links:
16662$config_links
234b45d4 16663
bec39cab
AC
16664Configuration commands:
16665$config_commands
16666
81ecdfbb 16667Report bugs to the package provider."
b4e70030 16668
81ecdfbb
RW
16669_ACEOF
16670cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16671ac_cs_version="\\
16672config.status
81ecdfbb
RW
16673configured by $0, generated by GNU Autoconf 2.64,
16674 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16675
81ecdfbb 16676Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16677This config.status script is free software; the Free Software Foundation
16678gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16679
16680ac_pwd='$ac_pwd'
16681srcdir='$srcdir'
16682INSTALL='$INSTALL'
16683MKDIR_P='$MKDIR_P'
16684AWK='$AWK'
16685test -n "\$AWK" || AWK=awk
bec39cab
AC
16686_ACEOF
16687
81ecdfbb
RW
16688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16689# The default lists apply if the user does not specify any file.
bec39cab
AC
16690ac_need_defaults=:
16691while test $# != 0
16692do
16693 case $1 in
16694 --*=*)
81ecdfbb
RW
16695 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16696 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16697 ac_shift=:
c906108c 16698 ;;
81ecdfbb 16699 *)
bec39cab
AC
16700 ac_option=$1
16701 ac_optarg=$2
16702 ac_shift=shift
c906108c 16703 ;;
bec39cab 16704 esac
c906108c 16705
bec39cab
AC
16706 case $ac_option in
16707 # Handling of the options.
bec39cab
AC
16708 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16709 ac_cs_recheck=: ;;
81ecdfbb
RW
16710 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16711 $as_echo "$ac_cs_version"; exit ;;
16712 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16713 debug=: ;;
16714 --file | --fil | --fi | --f )
16715 $ac_shift
81ecdfbb
RW
16716 case $ac_optarg in
16717 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16718 esac
16719 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16720 ac_need_defaults=false;;
16721 --header | --heade | --head | --hea )
16722 $ac_shift
81ecdfbb
RW
16723 case $ac_optarg in
16724 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16725 esac
16726 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16727 ac_need_defaults=false;;
81ecdfbb
RW
16728 --he | --h)
16729 # Conflict between --help and --header
16730 as_fn_error "ambiguous option: \`$1'
16731Try \`$0 --help' for more information.";;
16732 --help | --hel | -h )
16733 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16734 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16735 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16736 ac_cs_silent=: ;;
c906108c 16737
bec39cab 16738 # This is an error.
81ecdfbb
RW
16739 -*) as_fn_error "unrecognized option: \`$1'
16740Try \`$0 --help' for more information." ;;
c906108c 16741
81ecdfbb
RW
16742 *) as_fn_append ac_config_targets " $1"
16743 ac_need_defaults=false ;;
c906108c 16744
bec39cab
AC
16745 esac
16746 shift
16747done
c906108c 16748
bec39cab 16749ac_configure_extra_args=
c906108c 16750
bec39cab
AC
16751if $ac_cs_silent; then
16752 exec 6>/dev/null
16753 ac_configure_extra_args="$ac_configure_extra_args --silent"
16754fi
c906108c 16755
bec39cab 16756_ACEOF
81ecdfbb 16757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16758if \$ac_cs_recheck; then
81ecdfbb
RW
16759 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16760 shift
16761 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16762 CONFIG_SHELL='$SHELL'
16763 export CONFIG_SHELL
16764 exec "\$@"
bec39cab
AC
16765fi
16766
16767_ACEOF
81ecdfbb
RW
16768cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16769exec 5>>config.log
16770{
16771 echo
16772 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16773## Running $as_me. ##
16774_ASBOX
16775 $as_echo "$ac_log"
16776} >&5
bec39cab 16777
81ecdfbb
RW
16778_ACEOF
16779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16780#
81ecdfbb 16781# INIT-COMMANDS
c906108c 16782#
a417dc56 16783ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16784AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16785
bec39cab
AC
16786_ACEOF
16787
81ecdfbb 16788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16789
81ecdfbb 16790# Handling of arguments.
bec39cab 16791for ac_config_target in $ac_config_targets
c906108c 16792do
81ecdfbb
RW
16793 case $ac_config_target in
16794 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16795 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16796 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16797 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16798 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16799 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16800 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16801 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16802 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16803 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16804
16805 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16806 esac
16807done
16808
81ecdfbb 16809
bec39cab
AC
16810# If the user did not use the arguments to specify the items to instantiate,
16811# then the envvar interface is used. Set only those that are not.
16812# We use the long form for the default assignment because of an extremely
16813# bizarre bug on SunOS 4.1.3.
16814if $ac_need_defaults; then
16815 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16816 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16817 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16818 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16819fi
16820
b4e70030 16821# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16822# simply because there is no reason against having it here, and in addition,
b4e70030 16823# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16824# Hook for its removal unless debugging.
16825# Note that there is a small window in which the directory will not be cleaned:
16826# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16827$debug ||
16828{
81ecdfbb
RW
16829 tmp=
16830 trap 'exit_status=$?
16831 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16832' 0
16833 trap 'as_fn_exit 1' 1 2 13 15
16834}
16835# Create a (secure) tmp directory for tmp files.
16836
16837{
16838 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16839 test -n "$tmp" && test -d "$tmp"
16840} ||
16841{
16842 tmp=./conf$$-$RANDOM
16843 (umask 077 && mkdir "$tmp")
16844} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16845
16846# Set up the scripts for CONFIG_FILES section.
16847# No need to generate them if there are no CONFIG_FILES.
16848# This happens for instance with `./config.status config.h'.
16849if test -n "$CONFIG_FILES"; then
16850
16851if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16852 ac_cs_awk_getline=:
16853 ac_cs_awk_pipe_init=
16854 ac_cs_awk_read_file='
16855 while ((getline aline < (F[key])) > 0)
16856 print(aline)
16857 close(F[key])'
16858 ac_cs_awk_pipe_fini=
16859else
16860 ac_cs_awk_getline=false
16861 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16862 ac_cs_awk_read_file='
16863 print "|#_!!_#|"
16864 print "cat " F[key] " &&"
16865 '$ac_cs_awk_pipe_init
16866 # The final `:' finishes the AND list.
16867 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16868fi
16869ac_cr=`echo X | tr X '\015'`
16870# On cygwin, bash can eat \r inside `` if the user requested igncr.
16871# But we know of no other shell where ac_cr would be empty at this
16872# point, so we can use a bashism as a fallback.
16873if test "x$ac_cr" = x; then
16874 eval ac_cr=\$\'\\r\'
16875fi
16876ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16877if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16878 ac_cs_awk_cr='\r'
16879else
16880 ac_cs_awk_cr=$ac_cr
16881fi
16882
16883echo 'BEGIN {' >"$tmp/subs1.awk" &&
16884_ACEOF
16885
16886# Create commands to substitute file output variables.
16887{
16888 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16889 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16890 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16891 echo "_ACAWK" &&
16892 echo "_ACEOF"
16893} >conf$$files.sh &&
16894. ./conf$$files.sh ||
16895 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16896rm -f conf$$files.sh
16897
16898{
16899 echo "cat >conf$$subs.awk <<_ACEOF" &&
16900 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16901 echo "_ACEOF"
16902} >conf$$subs.sh ||
16903 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16904ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16905ac_delim='%!_!# '
16906for ac_last_try in false false false false false :; do
16907 . ./conf$$subs.sh ||
16908 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16909
16910 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16911 if test $ac_delim_n = $ac_delim_num; then
16912 break
16913 elif $ac_last_try; then
16914 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16915 else
16916 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16917 fi
16918done
16919rm -f conf$$subs.sh
16920
16921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16922cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16923_ACEOF
16924sed -n '
16925h
16926s/^/S["/; s/!.*/"]=/
16927p
16928g
16929s/^[^!]*!//
16930:repl
16931t repl
16932s/'"$ac_delim"'$//
16933t delim
16934:nl
16935h
16936s/\(.\{148\}\).*/\1/
16937t more1
16938s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16939p
16940n
16941b repl
16942:more1
16943s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16944p
16945g
16946s/.\{148\}//
16947t nl
16948:delim
16949h
16950s/\(.\{148\}\).*/\1/
16951t more2
16952s/["\\]/\\&/g; s/^/"/; s/$/"/
16953p
16954b
16955:more2
16956s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16957p
16958g
16959s/.\{148\}//
16960t delim
16961' <conf$$subs.awk | sed '
16962/^[^""]/{
16963 N
16964 s/\n//
16965}
16966' >>$CONFIG_STATUS || ac_write_fail=1
16967rm -f conf$$subs.awk
16968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16969_ACAWK
16970cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16971 for (key in S) S_is_set[key] = 1
16972 FS = "\a"
16973 \$ac_cs_awk_pipe_init
16974}
16975{
16976 line = $ 0
16977 nfields = split(line, field, "@")
16978 substed = 0
16979 len = length(field[1])
16980 for (i = 2; i < nfields; i++) {
16981 key = field[i]
16982 keylen = length(key)
16983 if (S_is_set[key]) {
16984 value = S[key]
16985 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16986 len += length(value) + length(field[++i])
16987 substed = 1
16988 } else
16989 len += 1 + keylen
16990 }
16991 if (nfields == 3 && !substed) {
16992 key = field[2]
16993 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16994 \$ac_cs_awk_read_file
16995 next
16996 }
16997 }
16998 print line
b4e70030 16999}
81ecdfbb
RW
17000\$ac_cs_awk_pipe_fini
17001_ACAWK
17002_ACEOF
17003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17004if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17005 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17006else
17007 cat
17008fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17009 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17010_ACEOF
17011
17012# VPATH may cause trouble with some makes, so we remove $(srcdir),
17013# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17014# trailing colons and then remove the whole line if VPATH becomes empty
17015# (actually we leave an empty line to preserve line numbers).
17016if test "x$srcdir" = x.; then
17017 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17018s/:*\$(srcdir):*/:/
17019s/:*\${srcdir}:*/:/
17020s/:*@srcdir@:*/:/
17021s/^\([^=]*=[ ]*\):*/\1/
17022s/:*$//
17023s/^[^=]*=[ ]*$//
17024}'
17025fi
17026
17027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17028fi # test -n "$CONFIG_FILES"
17029
17030# Set up the scripts for CONFIG_HEADERS section.
17031# No need to generate them if there are no CONFIG_HEADERS.
17032# This happens for instance with `./config.status Makefile'.
17033if test -n "$CONFIG_HEADERS"; then
17034cat >"$tmp/defines.awk" <<\_ACAWK ||
17035BEGIN {
17036_ACEOF
17037
17038# Transform confdefs.h into an awk script `defines.awk', embedded as
17039# here-document in config.status, that substitutes the proper values into
17040# config.h.in to produce config.h.
4e8d927d 17041
81ecdfbb
RW
17042# Create a delimiter string that does not exist in confdefs.h, to ease
17043# handling of long lines.
17044ac_delim='%!_!# '
17045for ac_last_try in false false :; do
17046 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17047 if test -z "$ac_t"; then
17048 break
17049 elif $ac_last_try; then
17050 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17051 else
17052 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17053 fi
17054done
4e8d927d 17055
81ecdfbb
RW
17056# For the awk script, D is an array of macro values keyed by name,
17057# likewise P contains macro parameters if any. Preserve backslash
17058# newline sequences.
17059
17060ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17061sed -n '
17062s/.\{148\}/&'"$ac_delim"'/g
17063t rset
17064:rset
17065s/^[ ]*#[ ]*define[ ][ ]*/ /
17066t def
17067d
17068:def
17069s/\\$//
17070t bsnl
17071s/["\\]/\\&/g
17072s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17073D["\1"]=" \3"/p
17074s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17075d
17076:bsnl
17077s/["\\]/\\&/g
17078s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17079D["\1"]=" \3\\\\\\n"\\/p
17080t cont
17081s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17082t cont
17083d
17084:cont
17085n
17086s/.\{148\}/&'"$ac_delim"'/g
17087t clear
17088:clear
17089s/\\$//
17090t bsnlc
17091s/["\\]/\\&/g; s/^/"/; s/$/"/p
17092d
17093:bsnlc
17094s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17095b cont
17096' <confdefs.h | sed '
17097s/'"$ac_delim"'/"\\\
17098"/g' >>$CONFIG_STATUS || ac_write_fail=1
17099
17100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17101 for (key in D) D_is_set[key] = 1
17102 FS = "\a"
17103}
17104/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17105 line = \$ 0
17106 split(line, arg, " ")
17107 if (arg[1] == "#") {
17108 defundef = arg[2]
17109 mac1 = arg[3]
17110 } else {
17111 defundef = substr(arg[1], 2)
17112 mac1 = arg[2]
17113 }
17114 split(mac1, mac2, "(") #)
17115 macro = mac2[1]
17116 prefix = substr(line, 1, index(line, defundef) - 1)
17117 if (D_is_set[macro]) {
17118 # Preserve the white space surrounding the "#".
17119 print prefix "define", macro P[macro] D[macro]
17120 next
17121 } else {
17122 # Replace #undef with comments. This is necessary, for example,
17123 # in the case of _POSIX_SOURCE, which is predefined and required
17124 # on some systems where configure will not decide to define it.
17125 if (defundef == "undef") {
17126 print "/*", prefix defundef, macro, "*/"
17127 next
17128 }
17129 }
b4e70030 17130}
81ecdfbb
RW
17131{ print }
17132_ACAWK
b4e70030 17133_ACEOF
81ecdfbb
RW
17134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17135 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17136fi # test -n "$CONFIG_HEADERS"
4e8d927d 17137
4e8d927d 17138
81ecdfbb
RW
17139eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17140shift
17141for ac_tag
17142do
17143 case $ac_tag in
17144 :[FHLC]) ac_mode=$ac_tag; continue;;
17145 esac
17146 case $ac_mode$ac_tag in
17147 :[FHL]*:*);;
17148 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17149 :[FH]-) ac_tag=-:-;;
17150 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17151 esac
17152 ac_save_IFS=$IFS
17153 IFS=:
17154 set x $ac_tag
17155 IFS=$ac_save_IFS
17156 shift
17157 ac_file=$1
17158 shift
4e8d927d 17159
81ecdfbb
RW
17160 case $ac_mode in
17161 :L) ac_source=$1;;
17162 :[FH])
17163 ac_file_inputs=
17164 for ac_f
17165 do
17166 case $ac_f in
17167 -) ac_f="$tmp/stdin";;
17168 *) # Look for the file first in the build tree, then in the source tree
17169 # (if the path is not absolute). The absolute path cannot be DOS-style,
17170 # because $ac_f cannot contain `:'.
17171 test -f "$ac_f" ||
17172 case $ac_f in
17173 [\\/$]*) false;;
17174 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17175 esac ||
17176 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17177 esac
17178 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17179 as_fn_append ac_file_inputs " '$ac_f'"
17180 done
17181
17182 # Let's still pretend it is `configure' which instantiates (i.e., don't
17183 # use $as_me), people would be surprised to read:
17184 # /* config.h. Generated by config.status. */
17185 configure_input='Generated from '`
17186 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17187 `' by configure.'
17188 if test x"$ac_file" != x-; then
17189 configure_input="$ac_file. $configure_input"
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17191$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17192 fi
81ecdfbb
RW
17193 # Neutralize special characters interpreted by sed in replacement strings.
17194 case $configure_input in #(
17195 *\&* | *\|* | *\\* )
17196 ac_sed_conf_input=`$as_echo "$configure_input" |
17197 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17198 *) ac_sed_conf_input=$configure_input;;
17199 esac
4e8d927d 17200
81ecdfbb
RW
17201 case $ac_tag in
17202 *:-:* | *:-) cat >"$tmp/stdin" \
17203 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17204 esac
17205 ;;
c906108c
SS
17206 esac
17207
81ecdfbb 17208 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17209$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17210 X"$ac_file" : 'X\(//\)[^/]' \| \
17211 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17212 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17213$as_echo X"$ac_file" |
17214 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17215 s//\1/
17216 q
17217 }
17218 /^X\(\/\/\)[^/].*/{
17219 s//\1/
17220 q
17221 }
17222 /^X\(\/\/\)$/{
17223 s//\1/
17224 q
17225 }
17226 /^X\(\/\).*/{
17227 s//\1/
17228 q
17229 }
17230 s/.*/./; q'`
17231 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17232 ac_builddir=.
17233
81ecdfbb
RW
17234case "$ac_dir" in
17235.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17236*)
17237 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17238 # A ".." for each directory in $ac_dir_suffix.
17239 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17240 case $ac_top_builddir_sub in
17241 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17242 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17243 esac ;;
17244esac
17245ac_abs_top_builddir=$ac_pwd
17246ac_abs_builddir=$ac_pwd$ac_dir_suffix
17247# for backward compatibility:
17248ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17249
17250case $srcdir in
81ecdfbb 17251 .) # We are building in place.
bec39cab 17252 ac_srcdir=.
81ecdfbb
RW
17253 ac_top_srcdir=$ac_top_builddir_sub
17254 ac_abs_top_srcdir=$ac_pwd ;;
17255 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17256 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17257 ac_top_srcdir=$srcdir
17258 ac_abs_top_srcdir=$srcdir ;;
17259 *) # Relative name.
17260 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17261 ac_top_srcdir=$ac_top_build_prefix$srcdir
17262 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17263esac
81ecdfbb 17264ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17265
c906108c 17266
81ecdfbb
RW
17267 case $ac_mode in
17268 :F)
17269 #
17270 # CONFIG_FILE
17271 #
c906108c 17272
bec39cab
AC
17273 case $INSTALL in
17274 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17275 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17276 esac
81ecdfbb
RW
17277 ac_MKDIR_P=$MKDIR_P
17278 case $MKDIR_P in
17279 [\\/$]* | ?:[\\/]* ) ;;
17280 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17281 esac
17282_ACEOF
121ce6e5 17283
81ecdfbb
RW
17284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17285# If the template does not know about datarootdir, expand it.
17286# FIXME: This hack should be removed a few years after 2.60.
17287ac_datarootdir_hack=; ac_datarootdir_seen=
17288ac_sed_dataroot='
17289/datarootdir/ {
17290 p
17291 q
17292}
17293/@datadir@/p
17294/@docdir@/p
17295/@infodir@/p
17296/@localedir@/p
17297/@mandir@/p'
17298case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17299*datarootdir*) ac_datarootdir_seen=yes;;
17300*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17302$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17303_ACEOF
17304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17305 ac_datarootdir_hack='
17306 s&@datadir@&$datadir&g
17307 s&@docdir@&$docdir&g
17308 s&@infodir@&$infodir&g
17309 s&@localedir@&$localedir&g
17310 s&@mandir@&$mandir&g
17311 s&\\\${datarootdir}&$datarootdir&g' ;;
17312esac
4e8d927d 17313_ACEOF
81ecdfbb
RW
17314
17315# Neutralize VPATH when `$srcdir' = `.'.
17316# Shell code in configure.ac might set extrasub.
17317# FIXME: do we really want to maintain this feature?
17318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17319ac_sed_extra="$ac_vpsub
bec39cab
AC
17320$extrasub
17321_ACEOF
81ecdfbb 17322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17323:t
17324/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17325s|@configure_input@|$ac_sed_conf_input|;t t
17326s&@top_builddir@&$ac_top_builddir_sub&;t t
17327s&@top_build_prefix@&$ac_top_build_prefix&;t t
17328s&@srcdir@&$ac_srcdir&;t t
17329s&@abs_srcdir@&$ac_abs_srcdir&;t t
17330s&@top_srcdir@&$ac_top_srcdir&;t t
17331s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17332s&@builddir@&$ac_builddir&;t t
17333s&@abs_builddir@&$ac_abs_builddir&;t t
17334s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17335s&@INSTALL@&$ac_INSTALL&;t t
17336s&@MKDIR_P@&$ac_MKDIR_P&;t t
17337$ac_datarootdir_hack
17338"
17339eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17340if $ac_cs_awk_getline; then
17341 $AWK -f "$tmp/subs.awk"
17342else
17343 $AWK -f "$tmp/subs.awk" | $SHELL
17344fi >$tmp/out \
17345 || as_fn_error "could not create $ac_file" "$LINENO" 5
17346
17347test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17348 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17349 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17351which seems to be undefined. Please make sure it is defined." >&5
17352$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17353which seems to be undefined. Please make sure it is defined." >&2;}
17354
17355 rm -f "$tmp/stdin"
bec39cab 17356 case $ac_file in
81ecdfbb
RW
17357 -) cat "$tmp/out" && rm -f "$tmp/out";;
17358 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17359 esac \
17360 || as_fn_error "could not create $ac_file" "$LINENO" 5
17361 ;;
17362 :H)
17363 #
17364 # CONFIG_HEADER
17365 #
bec39cab 17366 if test x"$ac_file" != x-; then
81ecdfbb
RW
17367 {
17368 $as_echo "/* $configure_input */" \
17369 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17370 } >"$tmp/config.h" \
17371 || as_fn_error "could not create $ac_file" "$LINENO" 5
17372 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17373 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17374$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17375 else
81ecdfbb
RW
17376 rm -f "$ac_file"
17377 mv "$tmp/config.h" "$ac_file" \
17378 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17379 fi
17380 else
81ecdfbb
RW
17381 $as_echo "/* $configure_input */" \
17382 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17383 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17384 fi
81ecdfbb
RW
17385# Compute "$ac_file"'s index in $config_headers.
17386_am_arg="$ac_file"
e28b3332
DJ
17387_am_stamp_count=1
17388for _am_header in $config_headers :; do
17389 case $_am_header in
81ecdfbb 17390 $_am_arg | $_am_arg:* )
e28b3332
DJ
17391 break ;;
17392 * )
17393 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17394 esac
17395done
81ecdfbb
RW
17396echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17397$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17398 X"$_am_arg" : 'X\(//\)[^/]' \| \
17399 X"$_am_arg" : 'X\(//\)$' \| \
17400 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17401$as_echo X"$_am_arg" |
17402 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17403 s//\1/
17404 q
17405 }
17406 /^X\(\/\/\)[^/].*/{
17407 s//\1/
17408 q
17409 }
17410 /^X\(\/\/\)$/{
17411 s//\1/
17412 q
17413 }
17414 /^X\(\/\).*/{
17415 s//\1/
17416 q
17417 }
17418 s/.*/./; q'`/stamp-h$_am_stamp_count
17419 ;;
17420 :L)
17421 #
17422 # CONFIG_LINK
17423 #
c906108c 17424
81ecdfbb
RW
17425 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17426 :
b4e70030 17427 else
81ecdfbb
RW
17428 # Prefer the file from the source tree if names are identical.
17429 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17430 ac_source=$srcdir/$ac_source
17431 fi
b4e70030 17432
81ecdfbb
RW
17433 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17434$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17435
81ecdfbb
RW
17436 if test ! -r "$ac_source"; then
17437 as_fn_error "$ac_source: file not found" "$LINENO" 5
17438 fi
17439 rm -f "$ac_file"
bec39cab 17440
81ecdfbb
RW
17441 # Try a relative symlink, then a hard link, then a copy.
17442 case $srcdir in
17443 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17444 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17445 esac
17446 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17447 ln "$ac_source" "$ac_file" 2>/dev/null ||
17448 cp -p "$ac_source" "$ac_file" ||
17449 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17450 fi
17451 ;;
17452 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17453$as_echo "$as_me: executing $ac_file commands" >&6;}
17454 ;;
c906108c 17455 esac
b4e70030 17456
bec39cab 17457
81ecdfbb
RW
17458 case $ac_file$ac_mode in
17459 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17460 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17461 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17462 # are listed without --file. Let's play safe and only enable the eval
17463 # if we detect the quoting.
17464 case $CONFIG_FILES in
17465 *\'*) eval set x "$CONFIG_FILES" ;;
17466 *) set x $CONFIG_FILES ;;
17467 esac
17468 shift
17469 for mf
17470 do
17471 # Strip MF so we end up with the name of the file.
17472 mf=`echo "$mf" | sed -e 's/:.*$//'`
17473 # Check whether this is an Automake generated Makefile or not.
17474 # We used to match only the files named `Makefile.in', but
17475 # some people rename them; so instead we look at the file content.
17476 # Grep'ing the first line is not enough: some people post-process
17477 # each Makefile.in and add a new line on top of each file to say so.
17478 # Grep'ing the whole file is not good either: AIX grep has a line
17479 # limit of 2048, but all sed's we know have understand at least 4000.
17480 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17481 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17482$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17483 X"$mf" : 'X\(//\)[^/]' \| \
17484 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17485 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17486$as_echo X"$mf" |
17487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17488 s//\1/
17489 q
17490 }
17491 /^X\(\/\/\)[^/].*/{
17492 s//\1/
17493 q
17494 }
17495 /^X\(\/\/\)$/{
17496 s//\1/
17497 q
17498 }
17499 /^X\(\/\).*/{
17500 s//\1/
17501 q
17502 }
17503 s/.*/./; q'`
17504 else
17505 continue
17506 fi
17507 # Extract the definition of DEPDIR, am__include, and am__quote
17508 # from the Makefile without running `make'.
17509 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17510 test -z "$DEPDIR" && continue
17511 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17512 test -z "am__include" && continue
17513 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17514 # When using ansi2knr, U may be empty or an underscore; expand it
17515 U=`sed -n 's/^U = //p' < "$mf"`
17516 # Find all dependency output files, they are included files with
17517 # $(DEPDIR) in their names. We invoke sed twice because it is the
17518 # simplest approach to changing $(DEPDIR) to its actual value in the
17519 # expansion.
17520 for file in `sed -n "
17521 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17522 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17523 # Make sure the directory exists.
17524 test -f "$dirpart/$file" && continue
17525 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17526$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17527 X"$file" : 'X\(//\)[^/]' \| \
17528 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17529 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17530$as_echo X"$file" |
17531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17532 s//\1/
17533 q
17534 }
17535 /^X\(\/\/\)[^/].*/{
17536 s//\1/
17537 q
17538 }
17539 /^X\(\/\/\)$/{
17540 s//\1/
17541 q
17542 }
17543 /^X\(\/\).*/{
17544 s//\1/
17545 q
17546 }
17547 s/.*/./; q'`
17548 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17549 # echo "creating $dirpart/$file"
17550 echo '# dummy' > "$dirpart/$file"
e28b3332 17551 done
e28b3332 17552 done
81ecdfbb 17553}
4e8d927d 17554 ;;
81ecdfbb 17555 "default":C)
c906108c
SS
17556case x$CONFIG_HEADERS in
17557xconfig.h:config.in)
17558echo > stamp-h ;;
17559esac
bec39cab 17560 ;;
81ecdfbb 17561
bec39cab 17562 esac
81ecdfbb 17563done # for ac_tag
c906108c 17564
bec39cab 17565
81ecdfbb 17566as_fn_exit 0
bec39cab 17567_ACEOF
bec39cab
AC
17568ac_clean_files=$ac_clean_files_save
17569
81ecdfbb
RW
17570test $ac_write_fail = 0 ||
17571 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17572
bec39cab
AC
17573
17574# configure is writing to config.log, and then calls config.status.
17575# config.status does its own redirection, appending to config.log.
17576# Unfortunately, on DOS this fails, as config.log is still kept open
17577# by configure, so config.status won't be able to write to it; its
17578# output is simply discarded. So we exec the FD to /dev/null,
17579# effectively closing config.log, so it can be properly (re)opened and
17580# appended to by config.status. When coming back to configure, we
17581# need to make the FD available again.
17582if test "$no_create" != yes; then
17583 ac_cs_success=:
17584 ac_config_status_args=
17585 test "$silent" = yes &&
17586 ac_config_status_args="$ac_config_status_args --quiet"
17587 exec 5>/dev/null
17588 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17589 exec 5>>config.log
17590 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17591 # would make configure fail if this is the last instruction.
81ecdfbb 17592 $ac_cs_success || as_fn_exit $?
bec39cab 17593fi
c906108c 17594
bec39cab 17595#
81ecdfbb 17596# CONFIG_SUBDIRS section.
bec39cab 17597#
c906108c
SS
17598if test "$no_recursion" != yes; then
17599
81ecdfbb
RW
17600 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17601 # so they do not pile up.
c906108c
SS
17602 ac_sub_configure_args=
17603 ac_prev=
fdc59709
PB
17604 eval "set x $ac_configure_args"
17605 shift
17606 for ac_arg
17607 do
c906108c
SS
17608 if test -n "$ac_prev"; then
17609 ac_prev=
17610 continue
17611 fi
bec39cab 17612 case $ac_arg in
c906108c
SS
17613 -cache-file | --cache-file | --cache-fil | --cache-fi \
17614 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17615 ac_prev=cache_file ;;
17616 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17617 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17618 | --c=*)
17619 ;;
17620 --config-cache | -C)
c906108c
SS
17621 ;;
17622 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17623 ac_prev=srcdir ;;
17624 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17625 ;;
bec39cab
AC
17626 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17627 ac_prev=prefix ;;
17628 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17629 ;;
81ecdfbb
RW
17630 --disable-option-checking)
17631 ;;
fdc59709
PB
17632 *)
17633 case $ac_arg in
81ecdfbb 17634 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17635 esac
81ecdfbb 17636 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17637 esac
17638 done
17639
bec39cab
AC
17640 # Always prepend --prefix to ensure using the same prefix
17641 # in subdir configurations.
fdc59709
PB
17642 ac_arg="--prefix=$prefix"
17643 case $ac_arg in
81ecdfbb 17644 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17645 esac
81ecdfbb
RW
17646 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17647
17648 # Pass --silent
17649 if test "$silent" = yes; then
17650 ac_sub_configure_args="--silent $ac_sub_configure_args"
17651 fi
17652
17653 # Always prepend --disable-option-checking to silence warnings, since
17654 # different subdirs can have different --enable and --with options.
17655 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17656
b4e70030 17657 ac_popdir=`pwd`
bec39cab 17658 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17659
17660 # Do not complain, so a configure script can configure whichever
17661 # parts of a large source tree are present.
fdc59709 17662 test -d "$srcdir/$ac_dir" || continue
c906108c 17663
81ecdfbb
RW
17664 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17665 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17666 $as_echo "$ac_msg" >&6
17667 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17668 ac_builddir=.
17669
81ecdfbb
RW
17670case "$ac_dir" in
17671.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17672*)
17673 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17674 # A ".." for each directory in $ac_dir_suffix.
17675 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17676 case $ac_top_builddir_sub in
17677 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17678 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17679 esac ;;
17680esac
17681ac_abs_top_builddir=$ac_pwd
17682ac_abs_builddir=$ac_pwd$ac_dir_suffix
17683# for backward compatibility:
17684ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17685
17686case $srcdir in
81ecdfbb 17687 .) # We are building in place.
bec39cab 17688 ac_srcdir=.
81ecdfbb
RW
17689 ac_top_srcdir=$ac_top_builddir_sub
17690 ac_abs_top_srcdir=$ac_pwd ;;
17691 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17692 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17693 ac_top_srcdir=$srcdir
17694 ac_abs_top_srcdir=$srcdir ;;
17695 *) # Relative name.
17696 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17697 ac_top_srcdir=$ac_top_build_prefix$srcdir
17698 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17699esac
81ecdfbb 17700ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17701
c906108c 17702
fdc59709 17703 cd "$ac_dir"
c906108c
SS
17704
17705 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17706 if test -f "$ac_srcdir/configure.gnu"; then
17707 ac_sub_configure=$ac_srcdir/configure.gnu
17708 elif test -f "$ac_srcdir/configure"; then
17709 ac_sub_configure=$ac_srcdir/configure
17710 elif test -f "$ac_srcdir/configure.in"; then
17711 # This should be Cygnus configure.
17712 ac_sub_configure=$ac_aux_dir/configure
c906108c 17713 else
81ecdfbb
RW
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17715$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17716 ac_sub_configure=
17717 fi
17718
17719 # The recursion is here.
17720 if test -n "$ac_sub_configure"; then
c906108c 17721 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17722 case $cache_file in
17723 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17724 *) # Relative name.
17725 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17726 esac
c906108c 17727
81ecdfbb
RW
17728 { $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
17729$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17730 # The eval makes quoting arguments work.
fdc59709
PB
17731 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17732 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17733 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17734 fi
17735
fdc59709 17736 cd "$ac_popdir"
c906108c
SS
17737 done
17738fi
81ecdfbb
RW
17739if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17741$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17742fi
c906108c
SS
17743
17744
17745exit 0
This page took 2.55595 seconds and 4 git commands to generate.