gdb/
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
ac534cba
JB
662PYTHON_LIBS
663PYTHON_CPPFLAGS
81ecdfbb 664PYTHON_CFLAGS
ec685c5e 665python_prog_path
81ecdfbb
RW
666LTLIBEXPAT
667LIBEXPAT
668HAVE_LIBEXPAT
b8e0a31c 669JIT_READER_DIR
f997c383 670TARGET_PTR
39037522 671READLINE_TEXI_INCFLAG
81ecdfbb
RW
672READLINE_CFLAGS
673READLINE_DEPS
674READLINE
675MIG
676WINDRES
677DLLTOOL
678AR
679YFLAGS
680YACC
681LN_S
682REPORT_BUGS_TEXI
683REPORT_BUGS_TO
684PKGVERSION
685TARGET_OBS
686subdirs
687GDB_DATADIR
688DEBUGDIR
689am__fastdepCC_FALSE
690am__fastdepCC_TRUE
691AMDEPBACKSLASH
692AMDEP_FALSE
693AMDEP_TRUE
694am__quote
695am__include
696am__untar
697am__tar
698AMTAR
699AWK
700mkdir_p
701MKDIR_P
702INSTALL_STRIP_PROGRAM
703STRIP
704install_sh
81ecdfbb
RW
705AUTOHEADER
706AUTOMAKE
707AUTOCONF
708ACLOCAL
709VERSION
710CYGPATH_W
711am__isrc
712INSTALL_DATA
713INSTALL_SCRIPT
714INSTALL_PROGRAM
5048e516
JK
715MAKEINFO_EXTRA_FLAGS
716MAKEINFOFLAGS
717MAKEINFO
81ecdfbb
RW
718PACKAGE
719GNULIB_STDINT_H
720LIBGNU_LTLIBDEPS
721LIBGNU_LIBDEPS
f434ba03
PA
722gltests_WITNESS
723HAVE_WINT_T
81ecdfbb 724HAVE_WCHAR_H
f434ba03
PA
725NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
726NEXT_WCHAR_H
81ecdfbb 727REPLACE_WCWIDTH
f434ba03
PA
728REPLACE_WCSNRTOMBS
729REPLACE_WCSRTOMBS
730REPLACE_WCRTOMB
731REPLACE_MBSNRTOWCS
732REPLACE_MBSRTOWCS
733REPLACE_MBRLEN
734REPLACE_MBRTOWC
735REPLACE_MBSINIT
736REPLACE_WCTOB
737REPLACE_BTOWC
738REPLACE_MBSTATE_T
81ecdfbb 739HAVE_DECL_WCWIDTH
f434ba03
PA
740HAVE_DECL_WCTOB
741HAVE_WCSNRTOMBS
742HAVE_WCSRTOMBS
743HAVE_WCRTOMB
744HAVE_MBSNRTOWCS
745HAVE_MBSRTOWCS
746HAVE_MBRLEN
747HAVE_MBRTOWC
748HAVE_MBSINIT
749HAVE_BTOWC
81ecdfbb 750GNULIB_WCWIDTH
f434ba03
PA
751GNULIB_WCSNRTOMBS
752GNULIB_WCSRTOMBS
753GNULIB_WCRTOMB
754GNULIB_MBSNRTOWCS
755GNULIB_MBSRTOWCS
756GNULIB_MBRLEN
757GNULIB_MBRTOWC
758GNULIB_MBSINIT
759GNULIB_WCTOB
760GNULIB_BTOWC
761NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
762NEXT_STRING_H
763STDINT_H
764WINT_T_SUFFIX
765WCHAR_T_SUFFIX
81ecdfbb 766SIG_ATOMIC_T_SUFFIX
f434ba03 767SIZE_T_SUFFIX
81ecdfbb
RW
768PTRDIFF_T_SUFFIX
769HAVE_SIGNED_WINT_T
770HAVE_SIGNED_WCHAR_T
771HAVE_SIGNED_SIG_ATOMIC_T
772BITSIZEOF_WINT_T
773BITSIZEOF_WCHAR_T
81ecdfbb 774BITSIZEOF_SIG_ATOMIC_T
f434ba03 775BITSIZEOF_SIZE_T
81ecdfbb
RW
776BITSIZEOF_PTRDIFF_T
777HAVE_SYS_BITYPES_H
778HAVE_SYS_INTTYPES_H
779HAVE_STDINT_H
f434ba03 780NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 781NEXT_STDINT_H
81ecdfbb
RW
782HAVE_SYS_TYPES_H
783HAVE_INTTYPES_H
784HAVE_UNSIGNED_LONG_LONG_INT
785HAVE_LONG_LONG_INT
f434ba03
PA
786NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
787NEXT_STDDEF_H
788PRAGMA_SYSTEM_HEADER
789INCLUDE_NEXT_AS_FIRST_DIRECTIVE
790INCLUDE_NEXT
791STDDEF_H
792HAVE_WCHAR_T
793REPLACE_NULL
794APPLE_UNIVERSAL_BUILD
795UNDEFINE_STRTOK_R
796REPLACE_STRTOK_R
81ecdfbb 797REPLACE_STRSIGNAL
f434ba03
PA
798REPLACE_STRNLEN
799REPLACE_STRNDUP
800REPLACE_STRNCAT
81ecdfbb 801REPLACE_STRERROR
f434ba03
PA
802REPLACE_STRCASESTR
803REPLACE_STRSTR
804REPLACE_STRDUP
805REPLACE_STPNCPY
806REPLACE_MEMMEM
807REPLACE_MEMCHR
808HAVE_STRVERSCMP
81ecdfbb 809HAVE_DECL_STRSIGNAL
81ecdfbb
RW
810HAVE_DECL_STRTOK_R
811HAVE_STRCASESTR
812HAVE_STRSEP
813HAVE_STRPBRK
814HAVE_DECL_STRNLEN
815HAVE_DECL_STRNDUP
81ecdfbb
RW
816HAVE_DECL_STRDUP
817HAVE_STRCHRNUL
818HAVE_STPNCPY
819HAVE_STPCPY
f434ba03 820HAVE_RAWMEMCHR
81ecdfbb
RW
821HAVE_DECL_MEMRCHR
822HAVE_MEMPCPY
823HAVE_DECL_MEMMEM
f434ba03
PA
824HAVE_MEMCHR
825HAVE_MBSLEN
826GNULIB_STRVERSCMP
81ecdfbb
RW
827GNULIB_STRSIGNAL
828GNULIB_STRERROR
829GNULIB_MBSTOK_R
830GNULIB_MBSSEP
831GNULIB_MBSSPN
832GNULIB_MBSPBRK
833GNULIB_MBSCSPN
834GNULIB_MBSCASESTR
835GNULIB_MBSPCASECMP
836GNULIB_MBSNCASECMP
837GNULIB_MBSCASECMP
838GNULIB_MBSSTR
839GNULIB_MBSRCHR
840GNULIB_MBSCHR
841GNULIB_MBSNLEN
842GNULIB_MBSLEN
843GNULIB_STRTOK_R
844GNULIB_STRCASESTR
845GNULIB_STRSTR
846GNULIB_STRSEP
847GNULIB_STRPBRK
848GNULIB_STRNLEN
849GNULIB_STRNDUP
f434ba03 850GNULIB_STRNCAT
81ecdfbb
RW
851GNULIB_STRDUP
852GNULIB_STRCHRNUL
853GNULIB_STPNCPY
854GNULIB_STPCPY
f434ba03 855GNULIB_RAWMEMCHR
81ecdfbb
RW
856GNULIB_MEMRCHR
857GNULIB_MEMPCPY
858GNULIB_MEMMEM
f434ba03 859GNULIB_MEMCHR
81ecdfbb
RW
860GL_COND_LIBTOOL_FALSE
861GL_COND_LIBTOOL_TRUE
862CATOBJEXT
863GENCAT
864INSTOBJEXT
865DATADIRNAME
866CATALOGS
867POSUB
868GMSGFMT
869XGETTEXT
870INCINTL
871LIBINTL_DEP
872LIBINTL
873USE_NLS
874SET_MAKE
875GMAKE_FALSE
876GMAKE_TRUE
877MAKE
878CCDEPMODE
879DEPDIR
880am__leading_dot
881target_os
882target_vendor
883target_cpu
884target
f434ba03
PA
885RANLIB
886EGREP
887GREP
888CPP
81ecdfbb
RW
889host_os
890host_vendor
891host_cpu
892host
893build_os
894build_vendor
895build_cpu
896build
81ecdfbb
RW
897OBJEXT
898EXEEXT
899ac_ct_CC
900CPPFLAGS
901LDFLAGS
902CFLAGS
903CC
904MAINT
905MAINTAINER_MODE_FALSE
906MAINTAINER_MODE_TRUE
907target_alias
908host_alias
909build_alias
910LIBS
911ECHO_T
912ECHO_N
913ECHO_C
914DEFS
915mandir
916localedir
917libdir
918psdir
919pdfdir
920dvidir
921htmldir
922infodir
923docdir
924oldincludedir
925includedir
926localstatedir
927sharedstatedir
928sysconfdir
929datadir
930datarootdir
931libexecdir
932sbindir
933bindir
934program_transform_name
935prefix
936exec_prefix
937PACKAGE_URL
938PACKAGE_BUGREPORT
939PACKAGE_STRING
940PACKAGE_VERSION
941PACKAGE_TARNAME
942PACKAGE_NAME
943PATH_SEPARATOR
944SHELL'
a4ce5b0d 945ac_subst_files='host_makefile_frag'
81ecdfbb
RW
946ac_user_opts='
947enable_option_checking
948enable_maintainer_mode
da2f07f1
JK
949enable_plugins
950enable_largefile
81ecdfbb
RW
951enable_dependency_tracking
952with_separate_debug_dir
953with_gdb_datadir
954with_relocated_sources
955enable_targets
956enable_64_bit_bfd
957enable_gdbcli
958enable_gdbmi
959enable_tui
960enable_gdbtk
961with_libunwind
962with_curses
963enable_profiling
964with_pkgversion
965with_bugurl
b040ad30 966with_zlib
81ecdfbb 967with_libiconv_prefix
478aac75 968with_iconv_bin
81ecdfbb 969with_system_readline
b8e0a31c 970with_jit_reader_dir
81ecdfbb
RW
971with_expat
972with_gnu_ld
973enable_rpath
974with_libexpat_prefix
975with_python
976with_included_regex
977with_sysroot
978with_system_gdbinit
979enable_werror
980enable_build_warnings
981enable_gdb_build_warnings
982with_tcl
983with_tk
984with_x
985enable_sim
986enable_multi_ice
496c0e1b 987enable_gdbserver
81ecdfbb
RW
988'
989 ac_precious_vars='build_alias
990host_alias
991target_alias
992CC
993CFLAGS
994LDFLAGS
995LIBS
996CPPFLAGS
997CPP
998YACC
999YFLAGS
1000XMKMF'
5ae98d25 1001ac_subdirs_all='testsuite
81ecdfbb
RW
1002gdbtk
1003multi-ice
1004gdbserver'
c906108c
SS
1005
1006# Initialize some variables set by options.
bec39cab
AC
1007ac_init_help=
1008ac_init_version=false
81ecdfbb
RW
1009ac_unrecognized_opts=
1010ac_unrecognized_sep=
c906108c
SS
1011# The variables have the same names as the options, with
1012# dashes changed to underlines.
bec39cab 1013cache_file=/dev/null
c906108c 1014exec_prefix=NONE
c906108c 1015no_create=
c906108c
SS
1016no_recursion=
1017prefix=NONE
1018program_prefix=NONE
1019program_suffix=NONE
1020program_transform_name=s,x,x,
1021silent=
1022site=
1023srcdir=
c906108c
SS
1024verbose=
1025x_includes=NONE
1026x_libraries=NONE
bec39cab
AC
1027
1028# Installation directory options.
1029# These are left unexpanded so users can "make install exec_prefix=/foo"
1030# and all the variables that are supposed to be based on exec_prefix
1031# by default will actually change.
1032# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1033# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1034bindir='${exec_prefix}/bin'
1035sbindir='${exec_prefix}/sbin'
1036libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1037datarootdir='${prefix}/share'
1038datadir='${datarootdir}'
c906108c
SS
1039sysconfdir='${prefix}/etc'
1040sharedstatedir='${prefix}/com'
1041localstatedir='${prefix}/var'
c906108c
SS
1042includedir='${prefix}/include'
1043oldincludedir='/usr/include'
81ecdfbb
RW
1044docdir='${datarootdir}/doc/${PACKAGE}'
1045infodir='${datarootdir}/info'
1046htmldir='${docdir}'
1047dvidir='${docdir}'
1048pdfdir='${docdir}'
1049psdir='${docdir}'
1050libdir='${exec_prefix}/lib'
1051localedir='${datarootdir}/locale'
1052mandir='${datarootdir}/man'
c906108c 1053
c906108c 1054ac_prev=
81ecdfbb 1055ac_dashdash=
c906108c
SS
1056for ac_option
1057do
c906108c
SS
1058 # If the previous option needs an argument, assign it.
1059 if test -n "$ac_prev"; then
81ecdfbb 1060 eval $ac_prev=\$ac_option
c906108c
SS
1061 ac_prev=
1062 continue
1063 fi
1064
81ecdfbb
RW
1065 case $ac_option in
1066 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1067 *) ac_optarg=yes ;;
1068 esac
c906108c
SS
1069
1070 # Accept the important Cygnus configure options, so we can diagnose typos.
1071
81ecdfbb
RW
1072 case $ac_dashdash$ac_option in
1073 --)
1074 ac_dashdash=yes ;;
c906108c
SS
1075
1076 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1077 ac_prev=bindir ;;
1078 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1079 bindir=$ac_optarg ;;
c906108c
SS
1080
1081 -build | --build | --buil | --bui | --bu)
bec39cab 1082 ac_prev=build_alias ;;
c906108c 1083 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1084 build_alias=$ac_optarg ;;
c906108c
SS
1085
1086 -cache-file | --cache-file | --cache-fil | --cache-fi \
1087 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1088 ac_prev=cache_file ;;
1089 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1090 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1091 cache_file=$ac_optarg ;;
1092
1093 --config-cache | -C)
1094 cache_file=config.cache ;;
c906108c 1095
81ecdfbb 1096 -datadir | --datadir | --datadi | --datad)
c906108c 1097 ac_prev=datadir ;;
81ecdfbb 1098 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1099 datadir=$ac_optarg ;;
c906108c 1100
81ecdfbb
RW
1101 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1102 | --dataroo | --dataro | --datar)
1103 ac_prev=datarootdir ;;
1104 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1105 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1106 datarootdir=$ac_optarg ;;
1107
c906108c 1108 -disable-* | --disable-*)
81ecdfbb 1109 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1110 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1112 as_fn_error "invalid feature name: $ac_useropt"
1113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"enable_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval enable_$ac_useropt=no ;;
1123
1124 -docdir | --docdir | --docdi | --doc | --do)
1125 ac_prev=docdir ;;
1126 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1127 docdir=$ac_optarg ;;
1128
1129 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1130 ac_prev=dvidir ;;
1131 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1132 dvidir=$ac_optarg ;;
c906108c
SS
1133
1134 -enable-* | --enable-*)
81ecdfbb 1135 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1136 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1137 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138 as_fn_error "invalid feature name: $ac_useropt"
1139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143"enable_$ac_useropt"
1144"*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
b4e70030 1147 esac
81ecdfbb 1148 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1149
1150 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1151 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1152 | --exec | --exe | --ex)
1153 ac_prev=exec_prefix ;;
1154 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1155 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1156 | --exec=* | --exe=* | --ex=*)
bec39cab 1157 exec_prefix=$ac_optarg ;;
c906108c
SS
1158
1159 -gas | --gas | --ga | --g)
1160 # Obsolete; use --with-gas.
1161 with_gas=yes ;;
1162
bec39cab
AC
1163 -help | --help | --hel | --he | -h)
1164 ac_init_help=long ;;
1165 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1166 ac_init_help=recursive ;;
1167 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1168 ac_init_help=short ;;
c906108c
SS
1169
1170 -host | --host | --hos | --ho)
bec39cab 1171 ac_prev=host_alias ;;
c906108c 1172 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1173 host_alias=$ac_optarg ;;
c906108c 1174
81ecdfbb
RW
1175 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1176 ac_prev=htmldir ;;
1177 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1178 | --ht=*)
1179 htmldir=$ac_optarg ;;
1180
c906108c
SS
1181 -includedir | --includedir | --includedi | --included | --include \
1182 | --includ | --inclu | --incl | --inc)
1183 ac_prev=includedir ;;
1184 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1185 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1186 includedir=$ac_optarg ;;
c906108c
SS
1187
1188 -infodir | --infodir | --infodi | --infod | --info | --inf)
1189 ac_prev=infodir ;;
1190 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1191 infodir=$ac_optarg ;;
c906108c
SS
1192
1193 -libdir | --libdir | --libdi | --libd)
1194 ac_prev=libdir ;;
1195 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1196 libdir=$ac_optarg ;;
c906108c
SS
1197
1198 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1199 | --libexe | --libex | --libe)
1200 ac_prev=libexecdir ;;
1201 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1202 | --libexe=* | --libex=* | --libe=*)
bec39cab 1203 libexecdir=$ac_optarg ;;
c906108c 1204
81ecdfbb
RW
1205 -localedir | --localedir | --localedi | --localed | --locale)
1206 ac_prev=localedir ;;
1207 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1208 localedir=$ac_optarg ;;
1209
c906108c 1210 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1211 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1212 ac_prev=localstatedir ;;
1213 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1214 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1215 localstatedir=$ac_optarg ;;
c906108c
SS
1216
1217 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1218 ac_prev=mandir ;;
1219 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1220 mandir=$ac_optarg ;;
c906108c
SS
1221
1222 -nfp | --nfp | --nf)
1223 # Obsolete; use --without-fp.
1224 with_fp=no ;;
1225
1226 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1227 | --no-cr | --no-c | -n)
c906108c
SS
1228 no_create=yes ;;
1229
1230 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1231 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1232 no_recursion=yes ;;
1233
1234 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1235 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1236 | --oldin | --oldi | --old | --ol | --o)
1237 ac_prev=oldincludedir ;;
1238 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1239 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1240 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1241 oldincludedir=$ac_optarg ;;
c906108c
SS
1242
1243 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1244 ac_prev=prefix ;;
1245 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1246 prefix=$ac_optarg ;;
c906108c
SS
1247
1248 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1249 | --program-pre | --program-pr | --program-p)
1250 ac_prev=program_prefix ;;
1251 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1252 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1253 program_prefix=$ac_optarg ;;
c906108c
SS
1254
1255 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1256 | --program-suf | --program-su | --program-s)
1257 ac_prev=program_suffix ;;
1258 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1259 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1260 program_suffix=$ac_optarg ;;
c906108c
SS
1261
1262 -program-transform-name | --program-transform-name \
1263 | --program-transform-nam | --program-transform-na \
1264 | --program-transform-n | --program-transform- \
1265 | --program-transform | --program-transfor \
1266 | --program-transfo | --program-transf \
1267 | --program-trans | --program-tran \
1268 | --progr-tra | --program-tr | --program-t)
1269 ac_prev=program_transform_name ;;
1270 -program-transform-name=* | --program-transform-name=* \
1271 | --program-transform-nam=* | --program-transform-na=* \
1272 | --program-transform-n=* | --program-transform-=* \
1273 | --program-transform=* | --program-transfor=* \
1274 | --program-transfo=* | --program-transf=* \
1275 | --program-trans=* | --program-tran=* \
1276 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1277 program_transform_name=$ac_optarg ;;
c906108c 1278
81ecdfbb
RW
1279 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1280 ac_prev=pdfdir ;;
1281 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1282 pdfdir=$ac_optarg ;;
1283
1284 -psdir | --psdir | --psdi | --psd | --ps)
1285 ac_prev=psdir ;;
1286 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1287 psdir=$ac_optarg ;;
1288
c906108c
SS
1289 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1290 | -silent | --silent | --silen | --sile | --sil)
1291 silent=yes ;;
1292
1293 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1294 ac_prev=sbindir ;;
1295 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1296 | --sbi=* | --sb=*)
bec39cab 1297 sbindir=$ac_optarg ;;
c906108c
SS
1298
1299 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1300 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1301 | --sharedst | --shareds | --shared | --share | --shar \
1302 | --sha | --sh)
1303 ac_prev=sharedstatedir ;;
1304 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1305 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1306 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1307 | --sha=* | --sh=*)
bec39cab 1308 sharedstatedir=$ac_optarg ;;
c906108c
SS
1309
1310 -site | --site | --sit)
1311 ac_prev=site ;;
1312 -site=* | --site=* | --sit=*)
bec39cab 1313 site=$ac_optarg ;;
3ace7edb 1314
c906108c
SS
1315 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1316 ac_prev=srcdir ;;
1317 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1318 srcdir=$ac_optarg ;;
c906108c
SS
1319
1320 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1321 | --syscon | --sysco | --sysc | --sys | --sy)
1322 ac_prev=sysconfdir ;;
1323 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1324 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1325 sysconfdir=$ac_optarg ;;
c906108c
SS
1326
1327 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1328 ac_prev=target_alias ;;
c906108c 1329 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1330 target_alias=$ac_optarg ;;
c906108c
SS
1331
1332 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1333 verbose=yes ;;
1334
bec39cab
AC
1335 -version | --version | --versio | --versi | --vers | -V)
1336 ac_init_version=: ;;
c906108c
SS
1337
1338 -with-* | --with-*)
81ecdfbb 1339 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1340 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1341 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1342 as_fn_error "invalid package name: $ac_useropt"
1343 ac_useropt_orig=$ac_useropt
1344 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1345 case $ac_user_opts in
1346 *"
1347"with_$ac_useropt"
1348"*) ;;
1349 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1350 ac_unrecognized_sep=', ';;
b4e70030 1351 esac
81ecdfbb 1352 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1353
1354 -without-* | --without-*)
81ecdfbb 1355 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1356 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1357 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358 as_fn_error "invalid package name: $ac_useropt"
1359 ac_useropt_orig=$ac_useropt
1360 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361 case $ac_user_opts in
1362 *"
1363"with_$ac_useropt"
1364"*) ;;
1365 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1366 ac_unrecognized_sep=', ';;
1367 esac
1368 eval with_$ac_useropt=no ;;
c906108c
SS
1369
1370 --x)
1371 # Obsolete; use --with-x.
1372 with_x=yes ;;
1373
1374 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1375 | --x-incl | --x-inc | --x-in | --x-i)
1376 ac_prev=x_includes ;;
1377 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1378 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1379 x_includes=$ac_optarg ;;
c906108c
SS
1380
1381 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1382 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1383 ac_prev=x_libraries ;;
1384 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1385 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1386 x_libraries=$ac_optarg ;;
c906108c 1387
81ecdfbb
RW
1388 -*) as_fn_error "unrecognized option: \`$ac_option'
1389Try \`$0 --help' for more information."
c906108c
SS
1390 ;;
1391
bec39cab
AC
1392 *=*)
1393 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1394 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1395 case $ac_envvar in #(
1396 '' | [0-9]* | *[!_$as_cr_alnum]* )
1397 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1398 esac
1399 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1400 export $ac_envvar ;;
1401
c906108c 1402 *)
bec39cab 1403 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1404 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1405 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1406 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1407 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1408 ;;
1409
1410 esac
1411done
1412
1413if test -n "$ac_prev"; then
bec39cab 1414 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1415 as_fn_error "missing argument to $ac_option"
c906108c 1416fi
c906108c 1417
81ecdfbb
RW
1418if test -n "$ac_unrecognized_opts"; then
1419 case $enable_option_checking in
1420 no) ;;
1421 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1422 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1423 esac
81ecdfbb 1424fi
b4e70030 1425
81ecdfbb
RW
1426# Check all directory arguments for consistency.
1427for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1428 datadir sysconfdir sharedstatedir localstatedir includedir \
1429 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1430 libdir localedir mandir
b4e70030 1431do
81ecdfbb
RW
1432 eval ac_val=\$$ac_var
1433 # Remove trailing slashes.
1434 case $ac_val in
1435 */ )
1436 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1437 eval $ac_var=\$ac_val;;
1438 esac
1439 # Be sure to have absolute directory names.
b4e70030 1440 case $ac_val in
81ecdfbb
RW
1441 [\\/$]* | ?:[\\/]* ) continue;;
1442 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1443 esac
81ecdfbb 1444 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1445done
1446
bec39cab
AC
1447# There might be people who depend on the old broken behavior: `$host'
1448# used to hold the argument of --host etc.
1449# FIXME: To remove some day.
1450build=$build_alias
1451host=$host_alias
1452target=$target_alias
1453
1454# FIXME: To remove some day.
1455if test "x$host_alias" != x; then
1456 if test "x$build_alias" = x; then
1457 cross_compiling=maybe
81ecdfbb 1458 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1459 If a cross compiler is detected then cross compile mode will be used." >&2
1460 elif test "x$build_alias" != "x$host_alias"; then
1461 cross_compiling=yes
1462 fi
1463fi
c906108c 1464
bec39cab
AC
1465ac_tool_prefix=
1466test -n "$host_alias" && ac_tool_prefix=$host_alias-
1467
1468test "$silent" = yes && exec 6>/dev/null
c906108c 1469
c906108c 1470
81ecdfbb
RW
1471ac_pwd=`pwd` && test -n "$ac_pwd" &&
1472ac_ls_di=`ls -di .` &&
1473ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1474 as_fn_error "working directory cannot be determined"
1475test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1476 as_fn_error "pwd does not report name of working directory"
1477
1478
c906108c
SS
1479# Find the source files, if location was not specified.
1480if test -z "$srcdir"; then
1481 ac_srcdir_defaulted=yes
81ecdfbb
RW
1482 # Try the directory containing this script, then the parent directory.
1483 ac_confdir=`$as_dirname -- "$as_myself" ||
1484$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1485 X"$as_myself" : 'X\(//\)[^/]' \| \
1486 X"$as_myself" : 'X\(//\)$' \| \
1487 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1488$as_echo X"$as_myself" |
1489 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1490 s//\1/
1491 q
1492 }
1493 /^X\(\/\/\)[^/].*/{
1494 s//\1/
1495 q
1496 }
1497 /^X\(\/\/\)$/{
1498 s//\1/
1499 q
1500 }
1501 /^X\(\/\).*/{
1502 s//\1/
1503 q
1504 }
1505 s/.*/./; q'`
c906108c 1506 srcdir=$ac_confdir
81ecdfbb 1507 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1508 srcdir=..
1509 fi
1510else
1511 ac_srcdir_defaulted=no
1512fi
81ecdfbb
RW
1513if test ! -r "$srcdir/$ac_unique_file"; then
1514 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1515 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1516fi
1517ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1518ac_abs_confdir=`(
1519 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1520 pwd)`
1521# When building in place, set srcdir=.
1522if test "$ac_abs_confdir" = "$ac_pwd"; then
1523 srcdir=.
1524fi
1525# Remove unnecessary trailing slashes from srcdir.
1526# Double slashes in file names in object file debugging info
1527# mess up M-x gdb in Emacs.
1528case $srcdir in
1529*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1530esac
1531for ac_var in $ac_precious_vars; do
1532 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1533 eval ac_env_${ac_var}_value=\$${ac_var}
1534 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1535 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1536done
c906108c 1537
bec39cab
AC
1538#
1539# Report the --help message.
1540#
1541if test "$ac_init_help" = "long"; then
1542 # Omit some internal or obsolete options to make the list less imposing.
1543 # This message is too long to be a string in the A/UX 3.1 sh.
1544 cat <<_ACEOF
1545\`configure' configures this package to adapt to many kinds of systems.
1546
1547Usage: $0 [OPTION]... [VAR=VALUE]...
1548
1549To assign environment variables (e.g., CC, CFLAGS...), specify them as
1550VAR=VALUE. See below for descriptions of some of the useful variables.
1551
1552Defaults for the options are specified in brackets.
1553
1554Configuration:
1555 -h, --help display this help and exit
1556 --help=short display options specific to this package
1557 --help=recursive display the short help of all the included packages
1558 -V, --version display version information and exit
1559 -q, --quiet, --silent do not print \`checking...' messages
1560 --cache-file=FILE cache test results in FILE [disabled]
1561 -C, --config-cache alias for \`--cache-file=config.cache'
1562 -n, --no-create do not create output files
1563 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1564
bec39cab
AC
1565Installation directories:
1566 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1567 [$ac_default_prefix]
bec39cab 1568 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1569 [PREFIX]
bec39cab
AC
1570
1571By default, \`make install' will install all the files in
1572\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1573an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1574for instance \`--prefix=\$HOME'.
1575
1576For better control, use the options below.
1577
1578Fine tuning of the installation directories:
81ecdfbb
RW
1579 --bindir=DIR user executables [EPREFIX/bin]
1580 --sbindir=DIR system admin executables [EPREFIX/sbin]
1581 --libexecdir=DIR program executables [EPREFIX/libexec]
1582 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1583 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1584 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1585 --libdir=DIR object code libraries [EPREFIX/lib]
1586 --includedir=DIR C header files [PREFIX/include]
1587 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1588 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1589 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1590 --infodir=DIR info documentation [DATAROOTDIR/info]
1591 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1592 --mandir=DIR man documentation [DATAROOTDIR/man]
1593 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1594 --htmldir=DIR html documentation [DOCDIR]
1595 --dvidir=DIR dvi documentation [DOCDIR]
1596 --pdfdir=DIR pdf documentation [DOCDIR]
1597 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1598_ACEOF
1599
1600 cat <<\_ACEOF
1601
1602Program names:
1603 --program-prefix=PREFIX prepend PREFIX to installed program names
1604 --program-suffix=SUFFIX append SUFFIX to installed program names
1605 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1606
1607X features:
1608 --x-includes=DIR X include files are in DIR
1609 --x-libraries=DIR X library files are in DIR
1610
1611System types:
1612 --build=BUILD configure for building on BUILD [guessed]
1613 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1614 --target=TARGET configure for building compilers for TARGET [HOST]
1615_ACEOF
1616fi
1617
1618if test -n "$ac_init_help"; then
1619
1620 cat <<\_ACEOF
1621
1622Optional Features:
81ecdfbb 1623 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1624 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1625 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1626 --enable-maintainer-mode enable make rules and dependencies not useful
1627 (and sometimes confusing) to the casual installer
da2f07f1
JK
1628 --enable-plugins Enable support for plugins (defaults no)
1629 --disable-largefile omit support for large files
e28b3332
DJ
1630 --disable-dependency-tracking speeds up one-time build
1631 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1632 --enable-targets=TARGETS
1633 alternative target configurations
c0993dbe 1634 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1635 --disable-gdbcli disable command-line interface (CLI)
1636 --disable-gdbmi disable machine-interface (MI)
1637 --enable-tui enable full-screen terminal user interface (TUI)
1638 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1639 --enable-profiling enable profiling of GDB
3841debe 1640 --disable-rpath do not hardcode runtime library paths
a1220294 1641 --enable-werror treat compile warnings as errors
32c1c914 1642 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1643 --enable-gdb-build-warnings
32c1c914 1644 enable GDB specific build-time compiler warnings if
a1220294 1645 gcc is used
32c1c914 1646 --enable-sim link gdb with simulator
bec39cab 1647 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1648 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1649 is auto)
bec39cab
AC
1650
1651Optional Packages:
1652 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1653 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1654 --with-separate-debug-dir=PATH
32c1c914 1655 look for global separate debug info in this path
62e4f60c 1656 [LIBDIR/debug]
b14b1491
TT
1657 --with-gdb-datadir=PATH look for global separate data files in this path
1658 [DATADIR/gdb]
29b0e8a2 1659 --with-relocated-sources=PATH
32c1c914
TT
1660 automatically relocate this path for source files
1661 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1662 --with-curses use the curses library instead of the termcap
1663 library
c16158bc
JM
1664 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1665 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1666 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1667 --with-libiconv-prefix=DIR
1668 search for libiconv in DIR/include and DIR/lib
478aac75 1669 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1670 --with-system-readline use installed readline library
b8e0a31c
SD
1671 --with-jit-reader-dir=PATH
1672 directory to load the JIT readers from
5c39566f 1673 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1674 --with-gnu-ld assume the C compiler uses GNU ld default=no
1675 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1676 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1677 --with-python[=PYTHON] include python support
1678 (auto/yes/no/<python-program>)
a1220294
TT
1679 --without-included-regex
1680 don't use included regex; this is the default on
1681 systems with version 2 of the GNU C library (use
1682 with caution on other system)
81ecdfbb 1683 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1684 --with-system-gdbinit=PATH
32c1c914 1685 automatically load a system-wide gdbinit file
5062cc19
KS
1686 --with-tcl directory containing tcl configuration (tclConfig.sh)
1687 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1688 --with-x use the X Window System
bec39cab
AC
1689
1690Some influential environment variables:
1691 CC C compiler command
1692 CFLAGS C compiler flags
1693 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1694 nonstandard directory <lib dir>
81ecdfbb
RW
1695 LIBS libraries to pass to the linker, e.g. -l<library>
1696 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1697 you have headers in a nonstandard directory <include dir>
bec39cab 1698 CPP C preprocessor
81ecdfbb
RW
1699 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1700 the first program found out of: `bison -y', `byacc', `yacc'.
1701 YFLAGS The list of arguments that will be passed by default to $YACC.
1702 This script will default YFLAGS to the empty string to avoid a
1703 default value of `-d' given by some make applications.
1704 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1705
1706Use these variables to override the choices made by `configure' or to help
1707it to find libraries and programs with nonstandard names/locations.
1708
81ecdfbb 1709Report bugs to the package provider.
bec39cab 1710_ACEOF
81ecdfbb 1711ac_status=$?
bec39cab
AC
1712fi
1713
1714if test "$ac_init_help" = "recursive"; then
1715 # If there are subdirs, report their specific --help.
bec39cab 1716 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1717 test -d "$ac_dir" ||
1718 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1719 continue
bec39cab
AC
1720 ac_builddir=.
1721
81ecdfbb
RW
1722case "$ac_dir" in
1723.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1724*)
1725 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1726 # A ".." for each directory in $ac_dir_suffix.
1727 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1728 case $ac_top_builddir_sub in
1729 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1730 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1731 esac ;;
1732esac
1733ac_abs_top_builddir=$ac_pwd
1734ac_abs_builddir=$ac_pwd$ac_dir_suffix
1735# for backward compatibility:
1736ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1737
1738case $srcdir in
81ecdfbb 1739 .) # We are building in place.
bec39cab 1740 ac_srcdir=.
81ecdfbb
RW
1741 ac_top_srcdir=$ac_top_builddir_sub
1742 ac_abs_top_srcdir=$ac_pwd ;;
1743 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1744 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1745 ac_top_srcdir=$srcdir
1746 ac_abs_top_srcdir=$srcdir ;;
1747 *) # Relative name.
1748 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1749 ac_top_srcdir=$ac_top_build_prefix$srcdir
1750 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1751esac
81ecdfbb 1752ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1753
81ecdfbb
RW
1754 cd "$ac_dir" || { ac_status=$?; continue; }
1755 # Check for guested configure.
1756 if test -f "$ac_srcdir/configure.gnu"; then
1757 echo &&
1758 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1759 elif test -f "$ac_srcdir/configure"; then
1760 echo &&
1761 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1762 else
81ecdfbb
RW
1763 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1764 fi || ac_status=$?
1765 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1766 done
1767fi
1768
81ecdfbb 1769test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1770if $ac_init_version; then
1771 cat <<\_ACEOF
81ecdfbb
RW
1772configure
1773generated by GNU Autoconf 2.64
bec39cab 1774
81ecdfbb 1775Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1776This configure script is free software; the Free Software Foundation
1777gives unlimited permission to copy, distribute and modify it.
1778_ACEOF
81ecdfbb 1779 exit
bec39cab 1780fi
bec39cab 1781
81ecdfbb
RW
1782## ------------------------ ##
1783## Autoconf initialization. ##
1784## ------------------------ ##
bec39cab 1785
81ecdfbb
RW
1786# ac_fn_c_try_compile LINENO
1787# --------------------------
1788# Try to compile conftest.$ac_ext, and return whether this succeeded.
1789ac_fn_c_try_compile ()
1790{
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext
1793 if { { ac_try="$ac_compile"
1794case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797esac
1798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799$as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_compile") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1806 fi
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_c_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest.$ac_objext; then :
1812 ac_retval=0
1813else
1814 $as_echo "$as_me: failed program was:" >&5
1815sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1816
81ecdfbb
RW
1817 ac_retval=1
1818fi
1819 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1820 return $ac_retval
1821
1822} # ac_fn_c_try_compile
1823
1824# ac_fn_c_try_cpp LINENO
1825# ----------------------
1826# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1827ac_fn_c_try_cpp ()
bec39cab 1828{
81ecdfbb
RW
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_cpp conftest.$ac_ext"
1831case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1838 ac_status=$?
1839 if test -s conftest.err; then
1840 grep -v '^ *+' conftest.err >conftest.er1
1841 cat conftest.er1 >&5
1842 mv -f conftest.er1 conftest.err
1843 fi
1844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845 test $ac_status = 0; } >/dev/null && {
1846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1847 test ! -s conftest.err
1848 }; then :
1849 ac_retval=0
1850else
1851 $as_echo "$as_me: failed program was:" >&5
1852sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1853
81ecdfbb
RW
1854 ac_retval=1
1855fi
1856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1857 return $ac_retval
bec39cab 1858
81ecdfbb 1859} # ac_fn_c_try_cpp
bec39cab 1860
81ecdfbb
RW
1861# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1862# -------------------------------------------------------
1863# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1864# the include files in INCLUDES and setting the cache variable VAR
1865# accordingly.
1866ac_fn_c_check_header_mongrel ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
1872if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 $as_echo_n "(cached) " >&6
1874fi
1875eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877$as_echo "$ac_res" >&6; }
1878else
1879 # Is the header compilable?
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1881$as_echo_n "checking $2 usability... " >&6; }
1882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$4
1885#include <$2>
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 ac_header_compiler=yes
1889else
1890 ac_header_compiler=no
1891fi
1892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1894$as_echo "$ac_header_compiler" >&6; }
bec39cab 1895
81ecdfbb
RW
1896# Is the header present?
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1898$as_echo_n "checking $2 presence... " >&6; }
1899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901#include <$2>
1902_ACEOF
1903if ac_fn_c_try_cpp "$LINENO"; then :
1904 ac_header_preproc=yes
1905else
1906 ac_header_preproc=no
1907fi
1908rm -f conftest.err conftest.$ac_ext
1909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1910$as_echo "$ac_header_preproc" >&6; }
bec39cab 1911
81ecdfbb
RW
1912# So? What about this header?
1913case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1914 yes:no: )
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1916$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1918$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1919 ;;
1920 no:yes:* )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1922$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1924$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1926$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1928$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1930$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1931 ;;
1932esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=\$ac_header_compiler"
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
1943fi
1944 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1945
81ecdfbb 1946} # ac_fn_c_check_header_mongrel
bec39cab 1947
81ecdfbb
RW
1948# ac_fn_c_try_run LINENO
1949# ----------------------
1950# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951# that executables *can* be run.
1952ac_fn_c_try_run ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1981
81ecdfbb
RW
1982 ac_retval=$ac_status
1983fi
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1986 return $ac_retval
bec39cab 1987
81ecdfbb 1988} # ac_fn_c_try_run
bec39cab 1989
81ecdfbb
RW
1990# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991# -------------------------------------------------------
1992# Tests whether HEADER exists and can be compiled using the include files in
1993# INCLUDES, setting the cache variable VAR accordingly.
1994ac_fn_c_check_header_compile ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998$as_echo_n "checking for $2... " >&6; }
1999if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2000 $as_echo_n "(cached) " >&6
2001else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005#include <$2>
bec39cab 2006_ACEOF
81ecdfbb
RW
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009else
2010 eval "$3=no"
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016$as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2018
81ecdfbb 2019} # ac_fn_c_check_header_compile
bec39cab 2020
81ecdfbb
RW
2021# ac_fn_c_try_link LINENO
2022# -----------------------
2023# Try to link conftest.$ac_ext, and return whether this succeeded.
2024ac_fn_c_try_link ()
b4e70030 2025{
81ecdfbb
RW
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 rm -f conftest.$ac_objext conftest$ac_exeext
2028 if { { ac_try="$ac_link"
2029case "(($ac_try" in
2030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031 *) ac_try_echo=$ac_try;;
2032esac
2033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034$as_echo "$ac_try_echo"; } >&5
2035 (eval "$ac_link") 2>conftest.err
2036 ac_status=$?
2037 if test -s conftest.err; then
2038 grep -v '^ *+' conftest.err >conftest.er1
2039 cat conftest.er1 >&5
2040 mv -f conftest.er1 conftest.err
2041 fi
2042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043 test $ac_status = 0; } && {
2044 test -z "$ac_c_werror_flag" ||
2045 test ! -s conftest.err
2046 } && test -s conftest$ac_exeext && {
2047 test "$cross_compiling" = yes ||
2048 $as_test_x conftest$ac_exeext
2049 }; then :
2050 ac_retval=0
2051else
2052 $as_echo "$as_me: failed program was:" >&5
2053sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2054
81ecdfbb
RW
2055 ac_retval=1
2056fi
2057 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2058 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2059 # interfere with the next link command; also delete a directory that is
2060 # left behind by Apple's compiler. We do this before executing the actions.
2061 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2062 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2063 return $ac_retval
bec39cab 2064
81ecdfbb 2065} # ac_fn_c_try_link
bec39cab 2066
81ecdfbb
RW
2067# ac_fn_c_check_func LINENO FUNC VAR
2068# ----------------------------------
2069# Tests whether FUNC exists, setting the cache variable VAR accordingly
2070ac_fn_c_check_func ()
2071{
2072 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2074$as_echo_n "checking for $2... " >&6; }
2075if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2076 $as_echo_n "(cached) " >&6
2077else
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079/* end confdefs.h. */
2080/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2081 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2082#define $2 innocuous_$2
bec39cab 2083
81ecdfbb
RW
2084/* System header to define __stub macros and hopefully few prototypes,
2085 which can conflict with char $2 (); below.
2086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2087 <limits.h> exists even on freestanding compilers. */
bec39cab 2088
81ecdfbb
RW
2089#ifdef __STDC__
2090# include <limits.h>
2091#else
2092# include <assert.h>
2093#endif
bec39cab 2094
81ecdfbb 2095#undef $2
bec39cab 2096
81ecdfbb
RW
2097/* Override any GCC internal prototype to avoid an error.
2098 Use char because int might match the return type of a GCC
2099 builtin and then its argument prototype would still apply. */
2100#ifdef __cplusplus
2101extern "C"
2102#endif
2103char $2 ();
2104/* The GNU C library defines this for functions which it implements
2105 to always fail with ENOSYS. Some functions are actually named
2106 something starting with __ and the normal name is an alias. */
2107#if defined __stub_$2 || defined __stub___$2
2108choke me
2109#endif
bec39cab 2110
81ecdfbb
RW
2111int
2112main ()
2113{
2114return $2 ();
2115 ;
2116 return 0;
2117}
bec39cab 2118_ACEOF
81ecdfbb
RW
2119if ac_fn_c_try_link "$LINENO"; then :
2120 eval "$3=yes"
2121else
2122 eval "$3=no"
2123fi
2124rm -f core conftest.err conftest.$ac_objext \
2125 conftest$ac_exeext conftest.$ac_ext
2126fi
2127eval ac_res=\$$3
2128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2129$as_echo "$ac_res" >&6; }
2130 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2131
81ecdfbb 2132} # ac_fn_c_check_func
bec39cab 2133
81ecdfbb
RW
2134# ac_fn_c_check_decl LINENO SYMBOL VAR
2135# ------------------------------------
2136# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2137ac_fn_c_check_decl ()
2138{
2139 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2140 as_decl_name=`echo $2|sed 's/ *(.*//'`
2141 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2143$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2144if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2145 $as_echo_n "(cached) " >&6
2146else
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
e7a30f46
DE
2153#ifndef $as_decl_name
2154#ifdef __cplusplus
2155 (void) $as_decl_use;
2156#else
2157 (void) $as_decl_name;
2158#endif
81ecdfbb 2159#endif
bec39cab 2160
81ecdfbb
RW
2161 ;
2162 return 0;
2163}
bec39cab 2164_ACEOF
81ecdfbb
RW
2165if ac_fn_c_try_compile "$LINENO"; then :
2166 eval "$3=yes"
2167else
2168 eval "$3=no"
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171fi
2172eval ac_res=\$$3
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2174$as_echo "$ac_res" >&6; }
2175 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2176
81ecdfbb 2177} # ac_fn_c_check_decl
bec39cab 2178
81ecdfbb
RW
2179# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2180# --------------------------------------------
2181# Tries to find the compile-time value of EXPR in a program that includes
2182# INCLUDES, setting VAR accordingly. Returns whether the value could be
2183# computed
2184ac_fn_c_compute_int ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 if test "$cross_compiling" = yes; then
2188 # Depending upon the size, compute the lo and hi bounds.
2189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) >= 0)];
2196test_array [0] = 0
bec39cab 2197
81ecdfbb
RW
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_lo=0 ac_mid=0
2204 while :; do
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206/* end confdefs.h. */
2207$4
2208int
2209main ()
2210{
2211static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2212test_array [0] = 0
bec39cab 2213
81ecdfbb
RW
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_compile "$LINENO"; then :
2219 ac_hi=$ac_mid; break
2220else
2221 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2222 if test $ac_lo -le $ac_mid; then
2223 ac_lo= ac_hi=
2224 break
2225 fi
2226 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2227fi
81ecdfbb
RW
2228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229 done
c906108c 2230else
81ecdfbb
RW
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$4
2234int
2235main ()
2236{
2237static int test_array [1 - 2 * !(($2) < 0)];
2238test_array [0] = 0
bec39cab 2239
81ecdfbb
RW
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 ac_hi=-1 ac_mid=-1
2246 while :; do
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2254test_array [0] = 0
bec39cab 2255
81ecdfbb
RW
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261 ac_lo=$ac_mid; break
2262else
2263 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2264 if test $ac_mid -le $ac_hi; then
2265 ac_lo= ac_hi=
2266 break
2267 fi
2268 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271 done
2272else
2273 ac_lo= ac_hi=
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278# Binary search between lo and hi bounds.
2279while test "x$ac_lo" != "x$ac_hi"; do
2280 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h. */
2283$4
2284int
2285main ()
2286{
2287static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2288test_array [0] = 0
bec39cab 2289
81ecdfbb
RW
2290 ;
2291 return 0;
2292}
2293_ACEOF
2294if ac_fn_c_try_compile "$LINENO"; then :
2295 ac_hi=$ac_mid
2296else
2297 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300done
2301case $ac_lo in #((
2302?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2303'') ac_retval=1 ;;
2304esac
2305 else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$4
2309static long int longval () { return $2; }
2310static unsigned long int ulongval () { return $2; }
2311#include <stdio.h>
2312#include <stdlib.h>
2313int
2314main ()
2315{
bec39cab 2316
81ecdfbb
RW
2317 FILE *f = fopen ("conftest.val", "w");
2318 if (! f)
2319 return 1;
2320 if (($2) < 0)
2321 {
2322 long int i = longval ();
2323 if (i != ($2))
2324 return 1;
2325 fprintf (f, "%ld", i);
2326 }
2327 else
2328 {
2329 unsigned long int i = ulongval ();
2330 if (i != ($2))
2331 return 1;
2332 fprintf (f, "%lu", i);
2333 }
2334 /* Do not output a trailing newline, as this causes \r\n confusion
2335 on some platforms. */
2336 return ferror (f) || fclose (f) != 0;
bec39cab 2337
81ecdfbb
RW
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_run "$LINENO"; then :
2343 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2344else
2345 ac_retval=1
2346fi
2347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2348 conftest.$ac_objext conftest.beam conftest.$ac_ext
2349rm -f conftest.val
bec39cab 2350
81ecdfbb
RW
2351 fi
2352 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2353 return $ac_retval
bec39cab 2354
81ecdfbb 2355} # ac_fn_c_compute_int
bec39cab 2356
81ecdfbb
RW
2357# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2358# ----------------------------------------------------
2359# Tries to find if the field MEMBER exists in type AGGR, after including
2360# INCLUDES, setting cache variable VAR accordingly.
2361ac_fn_c_check_member ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2365$as_echo_n "checking for $2.$3... " >&6; }
2366if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2367 $as_echo_n "(cached) " >&6
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$5
2388int
2389main ()
2390{
2391static $2 ac_aggr;
2392if (sizeof ac_aggr.$3)
2393return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399 eval "$4=yes"
2400else
2401 eval "$4=no"
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407eval ac_res=\$$4
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409$as_echo "$ac_res" >&6; }
2410 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2411
81ecdfbb 2412} # ac_fn_c_check_member
bec39cab 2413
81ecdfbb
RW
2414# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2415# -------------------------------------------
2416# Tests whether TYPE exists after having included INCLUDES, setting cache
2417# variable VAR accordingly.
2418ac_fn_c_check_type ()
2419{
2420 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2422$as_echo_n "checking for $2... " >&6; }
2423if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2424 $as_echo_n "(cached) " >&6
2425else
2426 eval "$3=no"
2427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h. */
2429$4
2430int
2431main ()
2432{
2433if (sizeof ($2))
2434 return 0;
2435 ;
2436 return 0;
2437}
2438_ACEOF
2439if ac_fn_c_try_compile "$LINENO"; then :
2440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h. */
2442$4
2443int
2444main ()
2445{
2446if (sizeof (($2)))
2447 return 0;
2448 ;
2449 return 0;
2450}
2451_ACEOF
2452if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2453
81ecdfbb
RW
2454else
2455 eval "$3=yes"
2456fi
2457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2458fi
2459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2460fi
2461eval ac_res=\$$3
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2463$as_echo "$ac_res" >&6; }
2464 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2465
81ecdfbb
RW
2466} # ac_fn_c_check_type
2467cat >config.log <<_ACEOF
2468This file contains any messages produced by compilers while
2469running configure, to aid debugging if configure makes a mistake.
d5af19ba 2470
81ecdfbb
RW
2471It was created by $as_me, which was
2472generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2473
81ecdfbb 2474 $ $0 $@
413ccac7 2475
81ecdfbb
RW
2476_ACEOF
2477exec 5>>config.log
2478{
2479cat <<_ASUNAME
2480## --------- ##
2481## Platform. ##
2482## --------- ##
413ccac7 2483
81ecdfbb
RW
2484hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2485uname -m = `(uname -m) 2>/dev/null || echo unknown`
2486uname -r = `(uname -r) 2>/dev/null || echo unknown`
2487uname -s = `(uname -s) 2>/dev/null || echo unknown`
2488uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2489
81ecdfbb
RW
2490/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2491/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2492
81ecdfbb
RW
2493/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2494/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2495/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2496/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2497/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2498/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2499/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2500
81ecdfbb 2501_ASUNAME
bec39cab 2502
bec39cab
AC
2503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2504for as_dir in $PATH
2505do
2506 IFS=$as_save_IFS
2507 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2508 $as_echo "PATH: $as_dir"
2509 done
2510IFS=$as_save_IFS
bec39cab 2511
81ecdfbb 2512} >&5
bec39cab 2513
81ecdfbb 2514cat >&5 <<_ACEOF
bec39cab 2515
bec39cab 2516
81ecdfbb
RW
2517## ----------- ##
2518## Core tests. ##
2519## ----------- ##
2520
2521_ACEOF
2522
2523
2524# Keep a trace of the command line.
2525# Strip out --no-create and --no-recursion so they do not pile up.
2526# Strip out --silent because we don't want to record it for future runs.
2527# Also quote any args containing shell meta-characters.
2528# Make two passes to allow for proper duplicate-argument suppression.
2529ac_configure_args=
2530ac_configure_args0=
2531ac_configure_args1=
2532ac_must_keep_next=false
2533for ac_pass in 1 2
2534do
2535 for ac_arg
2536 do
2537 case $ac_arg in
2538 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2539 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2540 | -silent | --silent | --silen | --sile | --sil)
2541 continue ;;
2542 *\'*)
2543 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2544 esac
2545 case $ac_pass in
2546 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2547 2)
2548 as_fn_append ac_configure_args1 " '$ac_arg'"
2549 if test $ac_must_keep_next = true; then
2550 ac_must_keep_next=false # Got value, back to normal.
2551 else
2552 case $ac_arg in
2553 *=* | --config-cache | -C | -disable-* | --disable-* \
2554 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2555 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2556 | -with-* | --with-* | -without-* | --without-* | --x)
2557 case "$ac_configure_args0 " in
2558 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2559 esac
2560 ;;
2561 -* ) ac_must_keep_next=true ;;
2562 esac
2563 fi
2564 as_fn_append ac_configure_args " '$ac_arg'"
2565 ;;
2566 esac
2567 done
2568done
2569{ ac_configure_args0=; unset ac_configure_args0;}
2570{ ac_configure_args1=; unset ac_configure_args1;}
2571
2572# When interrupted or exit'd, cleanup temporary files, and complete
2573# config.log. We remove comments because anyway the quotes in there
2574# would cause problems or look ugly.
2575# WARNING: Use '\'' to represent an apostrophe within the trap.
2576# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2577trap 'exit_status=$?
2578 # Save into config.log some information that might help in debugging.
2579 {
2580 echo
2581
2582 cat <<\_ASBOX
2583## ---------------- ##
2584## Cache variables. ##
2585## ---------------- ##
2586_ASBOX
2587 echo
2588 # The following way of writing the cache mishandles newlines in values,
2589(
2590 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2591 eval ac_val=\$$ac_var
2592 case $ac_val in #(
2593 *${as_nl}*)
2594 case $ac_var in #(
2595 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2596$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2597 esac
2598 case $ac_var in #(
2599 _ | IFS | as_nl) ;; #(
2600 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2601 *) { eval $ac_var=; unset $ac_var;} ;;
2602 esac ;;
2603 esac
2604 done
2605 (set) 2>&1 |
2606 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2607 *${as_nl}ac_space=\ *)
2608 sed -n \
2609 "s/'\''/'\''\\\\'\'''\''/g;
2610 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2611 ;; #(
2612 *)
2613 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2614 ;;
2615 esac |
2616 sort
2617)
2618 echo
2619
2620 cat <<\_ASBOX
2621## ----------------- ##
2622## Output variables. ##
2623## ----------------- ##
2624_ASBOX
2625 echo
2626 for ac_var in $ac_subst_vars
2627 do
2628 eval ac_val=\$$ac_var
2629 case $ac_val in
2630 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2631 esac
2632 $as_echo "$ac_var='\''$ac_val'\''"
2633 done | sort
2634 echo
2635
2636 if test -n "$ac_subst_files"; then
2637 cat <<\_ASBOX
2638## ------------------- ##
2639## File substitutions. ##
2640## ------------------- ##
2641_ASBOX
2642 echo
2643 for ac_var in $ac_subst_files
2644 do
2645 eval ac_val=\$$ac_var
2646 case $ac_val in
2647 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2648 esac
2649 $as_echo "$ac_var='\''$ac_val'\''"
2650 done | sort
2651 echo
2652 fi
2653
2654 if test -s confdefs.h; then
2655 cat <<\_ASBOX
2656## ----------- ##
2657## confdefs.h. ##
2658## ----------- ##
2659_ASBOX
2660 echo
2661 cat confdefs.h
2662 echo
2663 fi
2664 test "$ac_signal" != 0 &&
2665 $as_echo "$as_me: caught signal $ac_signal"
2666 $as_echo "$as_me: exit $exit_status"
2667 } >&5
2668 rm -f core *.core core.conftest.* &&
2669 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2670 exit $exit_status
2671' 0
2672for ac_signal in 1 2 13 15; do
2673 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2674done
2675ac_signal=0
2676
2677# confdefs.h avoids OS command line length limits that DEFS can exceed.
2678rm -f -r conftest* confdefs.h
2679
2680$as_echo "/* confdefs.h */" > confdefs.h
2681
2682# Predefined preprocessor variables.
2683
2684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_NAME "$PACKAGE_NAME"
2686_ACEOF
2687
2688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2690_ACEOF
2691
2692cat >>confdefs.h <<_ACEOF
2693#define PACKAGE_VERSION "$PACKAGE_VERSION"
2694_ACEOF
2695
2696cat >>confdefs.h <<_ACEOF
2697#define PACKAGE_STRING "$PACKAGE_STRING"
2698_ACEOF
2699
2700cat >>confdefs.h <<_ACEOF
2701#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2702_ACEOF
2703
2704cat >>confdefs.h <<_ACEOF
2705#define PACKAGE_URL "$PACKAGE_URL"
2706_ACEOF
2707
2708
2709# Let the site file select an alternate cache file if it wants to.
2710# Prefer an explicitly selected file to automatically selected ones.
2711ac_site_file1=NONE
2712ac_site_file2=NONE
2713if test -n "$CONFIG_SITE"; then
2714 ac_site_file1=$CONFIG_SITE
2715elif test "x$prefix" != xNONE; then
2716 ac_site_file1=$prefix/share/config.site
2717 ac_site_file2=$prefix/etc/config.site
2718else
2719 ac_site_file1=$ac_default_prefix/share/config.site
2720 ac_site_file2=$ac_default_prefix/etc/config.site
2721fi
2722for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2723do
2724 test "x$ac_site_file" = xNONE && continue
2725 if test -r "$ac_site_file"; then
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2727$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2728 sed 's/^/| /' "$ac_site_file" >&5
2729 . "$ac_site_file"
2730 fi
2731done
2732
2733if test -r "$cache_file"; then
2734 # Some versions of bash will fail to source /dev/null (special
2735 # files actually), so we avoid doing that.
2736 if test -f "$cache_file"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2738$as_echo "$as_me: loading cache $cache_file" >&6;}
2739 case $cache_file in
2740 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2741 *) . "./$cache_file";;
2742 esac
2743 fi
2744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2746$as_echo "$as_me: creating cache $cache_file" >&6;}
2747 >$cache_file
bec39cab
AC
2748fi
2749
f434ba03
PA
2750gl_header_list="$gl_header_list sys/mman.h"
2751gl_func_list="$gl_func_list mprotect"
2752gl_func_list="$gl_func_list memchr"
2753gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2754gl_header_list="$gl_header_list stdint.h"
2755gl_header_list="$gl_header_list wchar.h"
2756gl_header_list="$gl_header_list string.h"
2757# Check that the precious variables saved in the cache have kept the same
2758# value.
2759ac_cache_corrupted=false
2760for ac_var in $ac_precious_vars; do
2761 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2762 eval ac_new_set=\$ac_env_${ac_var}_set
2763 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2764 eval ac_new_val=\$ac_env_${ac_var}_value
2765 case $ac_old_set,$ac_new_set in
2766 set,)
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2768$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2769 ac_cache_corrupted=: ;;
2770 ,set)
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2772$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2773 ac_cache_corrupted=: ;;
2774 ,);;
2775 *)
2776 if test "x$ac_old_val" != "x$ac_new_val"; then
2777 # differences in whitespace do not lead to failure.
2778 ac_old_val_w=`echo x $ac_old_val`
2779 ac_new_val_w=`echo x $ac_new_val`
2780 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2782$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2783 ac_cache_corrupted=:
2784 else
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2786$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2787 eval $ac_var=\$ac_old_val
2788 fi
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2790$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2792$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2793 fi;;
2794 esac
2795 # Pass precious variables to config.status.
2796 if test "$ac_new_set" = set; then
2797 case $ac_new_val in
2798 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2799 *) ac_arg=$ac_var=$ac_new_val ;;
2800 esac
2801 case " $ac_configure_args " in
2802 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2803 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2804 esac
2805 fi
2806done
2807if $ac_cache_corrupted; then
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2811$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2812 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2813fi
2814## -------------------- ##
2815## Main body of script. ##
2816## -------------------- ##
2817
2818ac_ext=c
2819ac_cpp='$CPP $CPPFLAGS'
2820ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2821ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2822ac_compiler_gnu=$ac_cv_c_compiler_gnu
2823
2824
2825
2826
2827
2828ac_config_headers="$ac_config_headers config.h:config.in"
2829
2830
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2832$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2833 # Check whether --enable-maintainer-mode was given.
2834if test "${enable_maintainer_mode+set}" = set; then :
2835 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2836else
2837 USE_MAINTAINER_MODE=no
2838fi
2839
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2841$as_echo "$USE_MAINTAINER_MODE" >&6; }
2842 if test $USE_MAINTAINER_MODE = yes; then
2843 MAINTAINER_MODE_TRUE=
2844 MAINTAINER_MODE_FALSE='#'
2845else
2846 MAINTAINER_MODE_TRUE='#'
2847 MAINTAINER_MODE_FALSE=
2848fi
2849
2850 MAINT=$MAINTAINER_MODE_TRUE
2851
2852
2853
2854ac_ext=c
2855ac_cpp='$CPP $CPPFLAGS'
2856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2858ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859if test -n "$ac_tool_prefix"; then
2860 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2861set dummy ${ac_tool_prefix}gcc; ac_word=$2
2862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2863$as_echo_n "checking for $ac_word... " >&6; }
2864if test "${ac_cv_prog_CC+set}" = set; then :
2865 $as_echo_n "(cached) " >&6
c906108c
SS
2866else
2867 if test -n "$CC"; then
2868 ac_cv_prog_CC="$CC" # Let the user override the test.
2869else
bec39cab
AC
2870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2871for as_dir in $PATH
2872do
2873 IFS=$as_save_IFS
2874 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2875 for ac_exec_ext in '' $ac_executable_extensions; do
2876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2877 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2879 break 2
2880 fi
2881done
81ecdfbb
RW
2882 done
2883IFS=$as_save_IFS
bec39cab 2884
c906108c
SS
2885fi
2886fi
bec39cab 2887CC=$ac_cv_prog_CC
c906108c 2888if test -n "$CC"; then
81ecdfbb
RW
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2890$as_echo "$CC" >&6; }
c906108c 2891else
81ecdfbb
RW
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2893$as_echo "no" >&6; }
c906108c
SS
2894fi
2895
81ecdfbb 2896
b4e70030
JB
2897fi
2898if test -z "$ac_cv_prog_CC"; then
2899 ac_ct_CC=$CC
81ecdfbb
RW
2900 # Extract the first word of "gcc", so it can be a program name with args.
2901set dummy gcc; ac_word=$2
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2903$as_echo_n "checking for $ac_word... " >&6; }
2904if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2905 $as_echo_n "(cached) " >&6
b4e70030
JB
2906else
2907 if test -n "$ac_ct_CC"; then
2908 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2909else
2910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911for as_dir in $PATH
2912do
2913 IFS=$as_save_IFS
2914 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2915 for ac_exec_ext in '' $ac_executable_extensions; do
2916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2917 ac_cv_prog_ac_ct_CC="gcc"
2918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2919 break 2
4e8d927d 2920 fi
b4e70030 2921done
81ecdfbb
RW
2922 done
2923IFS=$as_save_IFS
b4e70030
JB
2924
2925fi
2926fi
2927ac_ct_CC=$ac_cv_prog_ac_ct_CC
2928if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2930$as_echo "$ac_ct_CC" >&6; }
b4e70030 2931else
81ecdfbb
RW
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2933$as_echo "no" >&6; }
b4e70030
JB
2934fi
2935
81ecdfbb
RW
2936 if test "x$ac_ct_CC" = x; then
2937 CC=""
2938 else
2939 case $cross_compiling:$ac_tool_warned in
2940yes:)
2941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2943ac_tool_warned=yes ;;
2944esac
2945 CC=$ac_ct_CC
2946 fi
b4e70030
JB
2947else
2948 CC="$ac_cv_prog_CC"
2949fi
2950
c906108c 2951if test -z "$CC"; then
81ecdfbb
RW
2952 if test -n "$ac_tool_prefix"; then
2953 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2954set dummy ${ac_tool_prefix}cc; ac_word=$2
2955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2956$as_echo_n "checking for $ac_word... " >&6; }
2957if test "${ac_cv_prog_CC+set}" = set; then :
2958 $as_echo_n "(cached) " >&6
c906108c
SS
2959else
2960 if test -n "$CC"; then
2961 ac_cv_prog_CC="$CC" # Let the user override the test.
2962else
bec39cab
AC
2963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2964for as_dir in $PATH
2965do
2966 IFS=$as_save_IFS
2967 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2968 for ac_exec_ext in '' $ac_executable_extensions; do
2969 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2970 ac_cv_prog_CC="${ac_tool_prefix}cc"
2971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2972 break 2
2973 fi
2974done
81ecdfbb
RW
2975 done
2976IFS=$as_save_IFS
2977
2978fi
2979fi
2980CC=$ac_cv_prog_CC
2981if test -n "$CC"; then
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2983$as_echo "$CC" >&6; }
2984else
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2986$as_echo "no" >&6; }
2987fi
2988
2989
2990 fi
2991fi
2992if test -z "$CC"; then
2993 # Extract the first word of "cc", so it can be a program name with args.
2994set dummy cc; ac_word=$2
2995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2996$as_echo_n "checking for $ac_word... " >&6; }
2997if test "${ac_cv_prog_CC+set}" = set; then :
2998 $as_echo_n "(cached) " >&6
2999else
3000 if test -n "$CC"; then
3001 ac_cv_prog_CC="$CC" # Let the user override the test.
3002else
3003 ac_prog_rejected=no
3004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3005for as_dir in $PATH
3006do
3007 IFS=$as_save_IFS
3008 test -z "$as_dir" && as_dir=.
3009 for ac_exec_ext in '' $ac_executable_extensions; do
3010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3011 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3012 ac_prog_rejected=yes
3013 continue
3014 fi
3015 ac_cv_prog_CC="cc"
3016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3017 break 2
3018 fi
3019done
3020 done
3021IFS=$as_save_IFS
bec39cab 3022
c906108c
SS
3023if test $ac_prog_rejected = yes; then
3024 # We found a bogon in the path, so make sure we never use it.
3025 set dummy $ac_cv_prog_CC
3026 shift
bec39cab 3027 if test $# != 0; then
c906108c
SS
3028 # We chose a different compiler from the bogus one.
3029 # However, it has the same basename, so the bogon will be chosen
3030 # first if we set CC to just the basename; use the full file name.
3031 shift
bec39cab 3032 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3033 fi
3034fi
3035fi
3036fi
bec39cab 3037CC=$ac_cv_prog_CC
c906108c 3038if test -n "$CC"; then
81ecdfbb
RW
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3040$as_echo "$CC" >&6; }
c906108c 3041else
81ecdfbb
RW
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3043$as_echo "no" >&6; }
c906108c
SS
3044fi
3045
81ecdfbb 3046
bec39cab
AC
3047fi
3048if test -z "$CC"; then
3049 if test -n "$ac_tool_prefix"; then
81ecdfbb 3050 for ac_prog in cl.exe
bec39cab
AC
3051 do
3052 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3055$as_echo_n "checking for $ac_word... " >&6; }
3056if test "${ac_cv_prog_CC+set}" = set; then :
3057 $as_echo_n "(cached) " >&6
c906108c
SS
3058else
3059 if test -n "$CC"; then
3060 ac_cv_prog_CC="$CC" # Let the user override the test.
3061else
bec39cab
AC
3062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3063for as_dir in $PATH
3064do
3065 IFS=$as_save_IFS
3066 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3067 for ac_exec_ext in '' $ac_executable_extensions; do
3068 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3069 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3071 break 2
3072 fi
3073done
81ecdfbb
RW
3074 done
3075IFS=$as_save_IFS
bec39cab 3076
c906108c
SS
3077fi
3078fi
bec39cab 3079CC=$ac_cv_prog_CC
c906108c 3080if test -n "$CC"; then
81ecdfbb
RW
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3082$as_echo "$CC" >&6; }
c906108c 3083else
81ecdfbb
RW
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
c906108c 3086fi
bec39cab 3087
81ecdfbb 3088
bec39cab
AC
3089 test -n "$CC" && break
3090 done
3091fi
3092if test -z "$CC"; then
3093 ac_ct_CC=$CC
81ecdfbb 3094 for ac_prog in cl.exe
bec39cab
AC
3095do
3096 # Extract the first word of "$ac_prog", so it can be a program name with args.
3097set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3099$as_echo_n "checking for $ac_word... " >&6; }
3100if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3101 $as_echo_n "(cached) " >&6
bec39cab
AC
3102else
3103 if test -n "$ac_ct_CC"; then
3104 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3105else
3106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3107for as_dir in $PATH
3108do
3109 IFS=$as_save_IFS
3110 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3111 for ac_exec_ext in '' $ac_executable_extensions; do
3112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3113 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3115 break 2
c906108c 3116 fi
bec39cab 3117done
81ecdfbb
RW
3118 done
3119IFS=$as_save_IFS
bec39cab
AC
3120
3121fi
3122fi
3123ac_ct_CC=$ac_cv_prog_ac_ct_CC
3124if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3126$as_echo "$ac_ct_CC" >&6; }
bec39cab 3127else
81ecdfbb
RW
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3129$as_echo "no" >&6; }
c906108c
SS
3130fi
3131
81ecdfbb 3132
bec39cab
AC
3133 test -n "$ac_ct_CC" && break
3134done
c906108c 3135
81ecdfbb
RW
3136 if test "x$ac_ct_CC" = x; then
3137 CC=""
3138 else
3139 case $cross_compiling:$ac_tool_warned in
3140yes:)
3141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3143ac_tool_warned=yes ;;
3144esac
3145 CC=$ac_ct_CC
3146 fi
bec39cab
AC
3147fi
3148
3149fi
3150
3151
81ecdfbb
RW
3152test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3154as_fn_error "no acceptable C compiler found in \$PATH
3155See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3156
3157# Provide some information about the compiler.
81ecdfbb
RW
3158$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3159set X $ac_compile
3160ac_compiler=$2
3161for ac_option in --version -v -V -qversion; do
3162 { { ac_try="$ac_compiler $ac_option >&5"
3163case "(($ac_try" in
3164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3165 *) ac_try_echo=$ac_try;;
3166esac
3167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3168$as_echo "$ac_try_echo"; } >&5
3169 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3170 ac_status=$?
81ecdfbb
RW
3171 if test -s conftest.err; then
3172 sed '10a\
3173... rest of stderr output deleted ...
3174 10q' conftest.err >conftest.er1
3175 cat conftest.er1 >&5
3176 rm -f conftest.er1 conftest.err
3177 fi
3178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3179 test $ac_status = 0; }
3180done
bec39cab 3181
81ecdfbb 3182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3183/* end confdefs.h. */
3184
3185int
3186main ()
3187{
3188
3189 ;
3190 return 0;
3191}
3192_ACEOF
3193ac_clean_files_save=$ac_clean_files
81ecdfbb 3194ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3195# Try to create an executable without -o first, disregard a.out.
3196# It will help us diagnose broken compilers, and finding out an intuition
3197# of exeext.
81ecdfbb
RW
3198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3199$as_echo_n "checking for C compiler default output file name... " >&6; }
3200ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3201
3202# The possible output files:
3203ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3204
3205ac_rmfiles=
3206for ac_file in $ac_files
3207do
3208 case $ac_file in
3209 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3210 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3211 esac
3212done
3213rm -f $ac_rmfiles
3214
3215if { { ac_try="$ac_link_default"
3216case "(($ac_try" in
3217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3218 *) ac_try_echo=$ac_try;;
3219esac
3220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3221$as_echo "$ac_try_echo"; } >&5
3222 (eval "$ac_link_default") 2>&5
3223 ac_status=$?
3224 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3225 test $ac_status = 0; }; then :
3226 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3227# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3228# in a Makefile. We should not override ac_cv_exeext if it was cached,
3229# so that the user can short-circuit this test for compilers unknown to
3230# Autoconf.
3231for ac_file in $ac_files ''
bec39cab
AC
3232do
3233 test -f "$ac_file" || continue
3234 case $ac_file in
81ecdfbb 3235 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3236 ;;
3237 [ab].out )
3238 # We found the default executable, but exeext='' is most
3239 # certainly right.
3240 break;;
3241 *.* )
81ecdfbb
RW
3242 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3243 then :; else
3244 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3245 fi
3246 # We set ac_cv_exeext here because the later test for it is not
3247 # safe: cross compilers may not add the suffix if given an `-o'
3248 # argument, so we may need to know it at that point already.
3249 # Even if this section looks crufty: it has the advantage of
3250 # actually working.
b4e70030
JB
3251 break;;
3252 * )
3253 break;;
bec39cab
AC
3254 esac
3255done
81ecdfbb
RW
3256test "$ac_cv_exeext" = no && ac_cv_exeext=
3257
bec39cab 3258else
81ecdfbb
RW
3259 ac_file=''
3260fi
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3262$as_echo "$ac_file" >&6; }
3263if test -z "$ac_file"; then :
3264 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3265sed 's/^/| /' conftest.$ac_ext >&5
3266
81ecdfbb
RW
3267{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269{ as_fn_set_status 77
3270as_fn_error "C compiler cannot create executables
3271See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3272fi
b4e70030 3273ac_exeext=$ac_cv_exeext
b4e70030 3274
81ecdfbb 3275# Check that the compiler produces executables we can run. If not, either
bec39cab 3276# the compiler is broken, or we cross compile.
81ecdfbb
RW
3277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3278$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3279# If not cross compiling, check that we can run a simple program.
3280if test "$cross_compiling" != yes; then
3281 if { ac_try='./$ac_file'
81ecdfbb
RW
3282 { { case "(($ac_try" in
3283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284 *) ac_try_echo=$ac_try;;
3285esac
3286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3287$as_echo "$ac_try_echo"; } >&5
3288 (eval "$ac_try") 2>&5
bec39cab 3289 ac_status=$?
81ecdfbb
RW
3290 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3291 test $ac_status = 0; }; }; then
bec39cab 3292 cross_compiling=no
c906108c 3293 else
bec39cab
AC
3294 if test "$cross_compiling" = maybe; then
3295 cross_compiling=yes
3296 else
81ecdfbb
RW
3297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3299as_fn_error "cannot run C compiled programs.
bec39cab 3300If you meant to cross compile, use \`--host'.
81ecdfbb 3301See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3302 fi
c906108c 3303 fi
bec39cab 3304fi
81ecdfbb
RW
3305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3306$as_echo "yes" >&6; }
bec39cab 3307
81ecdfbb 3308rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3309ac_clean_files=$ac_clean_files_save
81ecdfbb 3310# Check that the compiler produces executables we can run. If not, either
b4e70030 3311# the compiler is broken, or we cross compile.
81ecdfbb
RW
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3313$as_echo_n "checking whether we are cross compiling... " >&6; }
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3315$as_echo "$cross_compiling" >&6; }
3316
3317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3318$as_echo_n "checking for suffix of executables... " >&6; }
3319if { { ac_try="$ac_link"
3320case "(($ac_try" in
3321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322 *) ac_try_echo=$ac_try;;
3323esac
3324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3325$as_echo "$ac_try_echo"; } >&5
3326 (eval "$ac_link") 2>&5
bec39cab 3327 ac_status=$?
81ecdfbb
RW
3328 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3329 test $ac_status = 0; }; then :
b4e70030
JB
3330 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3331# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3332# work properly (i.e., refer to `conftest.exe'), while it won't with
3333# `rm'.
3334for ac_file in conftest.exe conftest conftest.*; do
3335 test -f "$ac_file" || continue
3336 case $ac_file in
81ecdfbb 3337 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3338 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3339 break;;
3340 * ) break;;
3341 esac
3342done
c906108c 3343else
81ecdfbb
RW
3344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346as_fn_error "cannot compute suffix of executables: cannot compile and link
3347See \`config.log' for more details." "$LINENO" 5; }
c906108c 3348fi
b4e70030 3349rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3351$as_echo "$ac_cv_exeext" >&6; }
c906108c 3352
b4e70030 3353rm -f conftest.$ac_ext
bec39cab
AC
3354EXEEXT=$ac_cv_exeext
3355ac_exeext=$EXEEXT
81ecdfbb
RW
3356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3357$as_echo_n "checking for suffix of object files... " >&6; }
3358if test "${ac_cv_objext+set}" = set; then :
3359 $as_echo_n "(cached) " >&6
bec39cab 3360else
81ecdfbb 3361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3362/* end confdefs.h. */
3363
3364int
3365main ()
3366{
3367
3368 ;
3369 return 0;
3370}
3371_ACEOF
3372rm -f conftest.o conftest.obj
81ecdfbb
RW
3373if { { ac_try="$ac_compile"
3374case "(($ac_try" in
3375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3376 *) ac_try_echo=$ac_try;;
3377esac
3378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3379$as_echo "$ac_try_echo"; } >&5
3380 (eval "$ac_compile") 2>&5
3381 ac_status=$?
3382 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3383 test $ac_status = 0; }; then :
3384 for ac_file in conftest.o conftest.obj conftest.*; do
3385 test -f "$ac_file" || continue;
bec39cab 3386 case $ac_file in
81ecdfbb 3387 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3388 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3389 break;;
3390 esac
3391done
c906108c 3392else
81ecdfbb 3393 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3394sed 's/^/| /' conftest.$ac_ext >&5
3395
81ecdfbb
RW
3396{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3398as_fn_error "cannot compute suffix of object files: cannot compile
3399See \`config.log' for more details." "$LINENO" 5; }
c906108c 3400fi
b4e70030 3401rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3402fi
81ecdfbb
RW
3403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3404$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3405OBJEXT=$ac_cv_objext
3406ac_objext=$OBJEXT
81ecdfbb
RW
3407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3408$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3409if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3410 $as_echo_n "(cached) " >&6
c906108c 3411else
81ecdfbb 3412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3413/* end confdefs.h. */
3414
3415int
3416main ()
3417{
3418#ifndef __GNUC__
3419 choke me
3420#endif
3421
3422 ;
3423 return 0;
3424}
3425_ACEOF
81ecdfbb 3426if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3427 ac_compiler_gnu=yes
3428else
81ecdfbb 3429 ac_compiler_gnu=no
bec39cab 3430fi
81ecdfbb 3431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3432ac_cv_c_compiler_gnu=$ac_compiler_gnu
3433
3434fi
81ecdfbb
RW
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3436$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3437if test $ac_compiler_gnu = yes; then
3438 GCC=yes
3439else
3440 GCC=
3441fi
bec39cab
AC
3442ac_test_CFLAGS=${CFLAGS+set}
3443ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3445$as_echo_n "checking whether $CC accepts -g... " >&6; }
3446if test "${ac_cv_prog_cc_g+set}" = set; then :
3447 $as_echo_n "(cached) " >&6
bec39cab 3448else
81ecdfbb
RW
3449 ac_save_c_werror_flag=$ac_c_werror_flag
3450 ac_c_werror_flag=yes
3451 ac_cv_prog_cc_g=no
3452 CFLAGS="-g"
3453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3454/* end confdefs.h. */
3455
3456int
3457main ()
3458{
3459
3460 ;
3461 return 0;
3462}
3463_ACEOF
81ecdfbb 3464if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3465 ac_cv_prog_cc_g=yes
3466else
81ecdfbb
RW
3467 CFLAGS=""
3468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3469/* end confdefs.h. */
3470
3471int
3472main ()
3473{
3474
3475 ;
3476 return 0;
3477}
3478_ACEOF
3479if ac_fn_c_try_compile "$LINENO"; then :
3480
3481else
3482 ac_c_werror_flag=$ac_save_c_werror_flag
3483 CFLAGS="-g"
3484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3485/* end confdefs.h. */
3486
3487int
3488main ()
3489{
c906108c 3490
81ecdfbb
RW
3491 ;
3492 return 0;
3493}
3494_ACEOF
3495if ac_fn_c_try_compile "$LINENO"; then :
3496 ac_cv_prog_cc_g=yes
3497fi
3498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3499fi
3500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3501fi
81ecdfbb
RW
3502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3503 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3504fi
81ecdfbb
RW
3505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3506$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3507if test "$ac_test_CFLAGS" = set; then
bec39cab 3508 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3509elif test $ac_cv_prog_cc_g = yes; then
3510 if test "$GCC" = yes; then
3511 CFLAGS="-g -O2"
3512 else
3513 CFLAGS="-g"
3514 fi
3515else
3516 if test "$GCC" = yes; then
3517 CFLAGS="-O2"
3518 else
3519 CFLAGS=
3520 fi
3521fi
81ecdfbb
RW
3522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3523$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3524if test "${ac_cv_prog_cc_c89+set}" = set; then :
3525 $as_echo_n "(cached) " >&6
bec39cab 3526else
81ecdfbb 3527 ac_cv_prog_cc_c89=no
bec39cab 3528ac_save_CC=$CC
81ecdfbb 3529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3530/* end confdefs.h. */
c906108c
SS
3531#include <stdarg.h>
3532#include <stdio.h>
3533#include <sys/types.h>
3534#include <sys/stat.h>
3535/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3536struct buf { int x; };
3537FILE * (*rcsopen) (struct buf *, struct stat *, int);
3538static char *e (p, i)
3539 char **p;
3540 int i;
3541{
3542 return p[i];
3543}
3544static char *f (char * (*g) (char **, int), char **p, ...)
3545{
3546 char *s;
3547 va_list v;
3548 va_start (v,p);
3549 s = g (p, va_arg (v,int));
3550 va_end (v);
3551 return s;
3552}
bec39cab
AC
3553
3554/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3555 function prototypes and stuff, but not '\xHH' hex character constants.
3556 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3557 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3558 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3559 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3560 that's true only with -std. */
bec39cab
AC
3561int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3562
81ecdfbb
RW
3563/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3564 inside strings and character constants. */
3565#define FOO(x) 'x'
3566int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3567
c906108c
SS
3568int test (int i, double x);
3569struct s1 {int (*f) (int a);};
3570struct s2 {int (*f) (double a);};
3571int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3572int argc;
3573char **argv;
bec39cab
AC
3574int
3575main ()
3576{
c906108c 3577return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3578 ;
3579 return 0;
3580}
3581_ACEOF
81ecdfbb
RW
3582for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3583 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3584do
3585 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3586 if ac_fn_c_try_compile "$LINENO"; then :
3587 ac_cv_prog_cc_c89=$ac_arg
c906108c 3588fi
81ecdfbb
RW
3589rm -f core conftest.err conftest.$ac_objext
3590 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3591done
81ecdfbb 3592rm -f conftest.$ac_ext
bec39cab 3593CC=$ac_save_CC
c906108c
SS
3594
3595fi
81ecdfbb
RW
3596# AC_CACHE_VAL
3597case "x$ac_cv_prog_cc_c89" in
3598 x)
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3600$as_echo "none needed" >&6; } ;;
3601 xno)
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3603$as_echo "unsupported" >&6; } ;;
bec39cab 3604 *)
81ecdfbb
RW
3605 CC="$CC $ac_cv_prog_cc_c89"
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3607$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3608esac
81ecdfbb 3609if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3610
b4e70030
JB
3611fi
3612
bec39cab
AC
3613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3618
f434ba03
PA
3619ac_aux_dir=
3620for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3621 for ac_t in install-sh install.sh shtool; do
3622 if test -f "$ac_dir/$ac_t"; then
3623 ac_aux_dir=$ac_dir
3624 ac_install_sh="$ac_aux_dir/$ac_t -c"
3625 break 2
3626 fi
3627 done
3628done
3629if test -z "$ac_aux_dir"; then
3630 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3631fi
3632
3633# These three variables are undocumented and unsupported,
3634# and are intended to be withdrawn in a future Autoconf release.
3635# They can cause serious problems if a builder's source tree is in a directory
3636# whose full name contains unusual characters.
3637ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3638ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3639ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3640
3641
3642# Make sure we can run config.sub.
3643$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3644 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3645
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3647$as_echo_n "checking build system type... " >&6; }
3648if test "${ac_cv_build+set}" = set; then :
3649 $as_echo_n "(cached) " >&6
3650else
3651 ac_build_alias=$build_alias
3652test "x$ac_build_alias" = x &&
3653 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3654test "x$ac_build_alias" = x &&
3655 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3656ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3657 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3658
3659fi
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3661$as_echo "$ac_cv_build" >&6; }
3662case $ac_cv_build in
3663*-*-*) ;;
3664*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3665esac
3666build=$ac_cv_build
3667ac_save_IFS=$IFS; IFS='-'
3668set x $ac_cv_build
3669shift
3670build_cpu=$1
3671build_vendor=$2
3672shift; shift
3673# Remember, the first character of IFS is used to create $*,
3674# except with old shells:
3675build_os=$*
3676IFS=$ac_save_IFS
3677case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3678
3679
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3681$as_echo_n "checking host system type... " >&6; }
3682if test "${ac_cv_host+set}" = set; then :
3683 $as_echo_n "(cached) " >&6
3684else
3685 if test "x$host_alias" = x; then
3686 ac_cv_host=$ac_cv_build
3687else
3688 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3689 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3690fi
3691
3692fi
3693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3694$as_echo "$ac_cv_host" >&6; }
3695case $ac_cv_host in
3696*-*-*) ;;
3697*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3698esac
3699host=$ac_cv_host
3700ac_save_IFS=$IFS; IFS='-'
3701set x $ac_cv_host
3702shift
3703host_cpu=$1
3704host_vendor=$2
3705shift; shift
3706# Remember, the first character of IFS is used to create $*,
3707# except with old shells:
3708host_os=$*
3709IFS=$ac_save_IFS
3710case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3711
3712
60ca704f 3713
bec39cab
AC
3714ac_ext=c
3715ac_cpp='$CPP $CPPFLAGS'
3716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3718ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3720$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3721# On Suns, sometimes $CPP names a directory.
3722if test -n "$CPP" && test -d "$CPP"; then
3723 CPP=
8bb2c122 3724fi
bec39cab 3725if test -z "$CPP"; then
81ecdfbb
RW
3726 if test "${ac_cv_prog_CPP+set}" = set; then :
3727 $as_echo_n "(cached) " >&6
bec39cab
AC
3728else
3729 # Double quotes because CPP needs to be expanded
3730 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3731 do
3732 ac_preproc_ok=false
3733for ac_c_preproc_warn_flag in '' yes
3734do
3735 # Use a header file that comes with gcc, so configuring glibc
3736 # with a fresh cross-compiler works.
3737 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3738 # <limits.h> exists even on freestanding compilers.
3739 # On the NeXT, cc -E runs the code through the compiler's parser,
3740 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3742/* end confdefs.h. */
3743#ifdef __STDC__
3744# include <limits.h>
3745#else
3746# include <assert.h>
3747#endif
3748 Syntax error
3749_ACEOF
81ecdfbb 3750if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3751
81ecdfbb 3752else
bec39cab
AC
3753 # Broken: fails on valid input.
3754continue
3755fi
3756rm -f conftest.err conftest.$ac_ext
3757
81ecdfbb 3758 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3759 # can be detected and how.
81ecdfbb 3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3761/* end confdefs.h. */
3762#include <ac_nonexistent.h>
3763_ACEOF
81ecdfbb 3764if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3765 # Broken: success on invalid input.
3766continue
8bb2c122 3767else
bec39cab
AC
3768 # Passes both tests.
3769ac_preproc_ok=:
3770break
8bb2c122 3771fi
bec39cab 3772rm -f conftest.err conftest.$ac_ext
8bb2c122 3773
bec39cab
AC
3774done
3775# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3776rm -f conftest.err conftest.$ac_ext
81ecdfbb 3777if $ac_preproc_ok; then :
bec39cab
AC
3778 break
3779fi
8bb2c122 3780
bec39cab
AC
3781 done
3782 ac_cv_prog_CPP=$CPP
ddc9cd0f 3783
c906108c 3784fi
bec39cab
AC
3785 CPP=$ac_cv_prog_CPP
3786else
3787 ac_cv_prog_CPP=$CPP
c906108c 3788fi
81ecdfbb
RW
3789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3790$as_echo "$CPP" >&6; }
bec39cab
AC
3791ac_preproc_ok=false
3792for ac_c_preproc_warn_flag in '' yes
3793do
3794 # Use a header file that comes with gcc, so configuring glibc
3795 # with a fresh cross-compiler works.
3796 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3797 # <limits.h> exists even on freestanding compilers.
3798 # On the NeXT, cc -E runs the code through the compiler's parser,
3799 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3801/* end confdefs.h. */
3802#ifdef __STDC__
3803# include <limits.h>
3804#else
3805# include <assert.h>
3806#endif
3807 Syntax error
3808_ACEOF
81ecdfbb 3809if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3810
81ecdfbb 3811else
bec39cab
AC
3812 # Broken: fails on valid input.
3813continue
3814fi
3815rm -f conftest.err conftest.$ac_ext
3816
81ecdfbb 3817 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3818 # can be detected and how.
81ecdfbb 3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3820/* end confdefs.h. */
3821#include <ac_nonexistent.h>
3822_ACEOF
81ecdfbb 3823if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3824 # Broken: success on invalid input.
3825continue
c906108c 3826else
bec39cab
AC
3827 # Passes both tests.
3828ac_preproc_ok=:
3829break
c906108c 3830fi
bec39cab 3831rm -f conftest.err conftest.$ac_ext
c906108c 3832
bec39cab
AC
3833done
3834# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3835rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3836if $ac_preproc_ok; then :
3837
c906108c 3838else
81ecdfbb
RW
3839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3841as_fn_error "C preprocessor \"$CPP\" fails sanity check
3842See \`config.log' for more details." "$LINENO" 5; }
c906108c 3843fi
c906108c 3844
bec39cab
AC
3845ac_ext=c
3846ac_cpp='$CPP $CPPFLAGS'
3847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850
3851
81ecdfbb
RW
3852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3853$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3854if test "${ac_cv_path_GREP+set}" = set; then :
3855 $as_echo_n "(cached) " >&6
4e8d927d 3856else
81ecdfbb
RW
3857 if test -z "$GREP"; then
3858 ac_path_GREP_found=false
3859 # Loop through the user's path and test for each of PROGNAME-LIST
3860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3862do
3863 IFS=$as_save_IFS
3864 test -z "$as_dir" && as_dir=.
3865 for ac_prog in grep ggrep; do
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3868 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3869# Check for GNU ac_path_GREP and select it if it is found.
3870 # Check for GNU $ac_path_GREP
3871case `"$ac_path_GREP" --version 2>&1` in
3872*GNU*)
3873 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3874*)
3875 ac_count=0
3876 $as_echo_n 0123456789 >"conftest.in"
3877 while :
3878 do
3879 cat "conftest.in" "conftest.in" >"conftest.tmp"
3880 mv "conftest.tmp" "conftest.in"
3881 cp "conftest.in" "conftest.nl"
3882 $as_echo 'GREP' >> "conftest.nl"
3883 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3884 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3885 as_fn_arith $ac_count + 1 && ac_count=$as_val
3886 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3887 # Best one so far, save it but keep looking for a better one
3888 ac_cv_path_GREP="$ac_path_GREP"
3889 ac_path_GREP_max=$ac_count
bec39cab 3890 fi
81ecdfbb
RW
3891 # 10*(2^10) chars as input seems more than enough
3892 test $ac_count -gt 10 && break
3893 done
3894 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3895esac
bec39cab 3896
81ecdfbb
RW
3897 $ac_path_GREP_found && break 3
3898 done
3899 done
3900 done
3901IFS=$as_save_IFS
3902 if test -z "$ac_cv_path_GREP"; then
3903 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3904 fi
c906108c 3905else
81ecdfbb 3906 ac_cv_path_GREP=$GREP
c906108c 3907fi
c906108c 3908
81ecdfbb
RW
3909fi
3910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3911$as_echo "$ac_cv_path_GREP" >&6; }
3912 GREP="$ac_cv_path_GREP"
c906108c 3913
c906108c 3914
81ecdfbb
RW
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3916$as_echo_n "checking for egrep... " >&6; }
3917if test "${ac_cv_path_EGREP+set}" = set; then :
3918 $as_echo_n "(cached) " >&6
783e057b 3919else
81ecdfbb
RW
3920 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3921 then ac_cv_path_EGREP="$GREP -E"
3922 else
3923 if test -z "$EGREP"; then
3924 ac_path_EGREP_found=false
3925 # Loop through the user's path and test for each of PROGNAME-LIST
3926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3928do
3929 IFS=$as_save_IFS
3930 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3931 for ac_prog in egrep; do
3932 for ac_exec_ext in '' $ac_executable_extensions; do
3933 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3934 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3935# Check for GNU ac_path_EGREP and select it if it is found.
3936 # Check for GNU $ac_path_EGREP
3937case `"$ac_path_EGREP" --version 2>&1` in
3938*GNU*)
3939 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3940*)
3941 ac_count=0
3942 $as_echo_n 0123456789 >"conftest.in"
3943 while :
3944 do
3945 cat "conftest.in" "conftest.in" >"conftest.tmp"
3946 mv "conftest.tmp" "conftest.in"
3947 cp "conftest.in" "conftest.nl"
3948 $as_echo 'EGREP' >> "conftest.nl"
3949 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3950 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3951 as_fn_arith $ac_count + 1 && ac_count=$as_val
3952 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3953 # Best one so far, save it but keep looking for a better one
3954 ac_cv_path_EGREP="$ac_path_EGREP"
3955 ac_path_EGREP_max=$ac_count
3956 fi
3957 # 10*(2^10) chars as input seems more than enough
3958 test $ac_count -gt 10 && break
3959 done
3960 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3961esac
bec39cab 3962
81ecdfbb
RW
3963 $ac_path_EGREP_found && break 3
3964 done
3965 done
3966 done
3967IFS=$as_save_IFS
3968 if test -z "$ac_cv_path_EGREP"; then
3969 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3970 fi
783e057b 3971else
81ecdfbb 3972 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3973fi
3974
81ecdfbb 3975 fi
783e057b 3976fi
81ecdfbb
RW
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3978$as_echo "$ac_cv_path_EGREP" >&6; }
3979 EGREP="$ac_cv_path_EGREP"
3980
783e057b 3981
81ecdfbb
RW
3982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3983$as_echo_n "checking for ANSI C header files... " >&6; }
3984if test "${ac_cv_header_stdc+set}" = set; then :
3985 $as_echo_n "(cached) " >&6
783e057b 3986else
81ecdfbb 3987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3988/* end confdefs.h. */
783e057b 3989#include <stdlib.h>
bec39cab 3990#include <stdarg.h>
783e057b
DJ
3991#include <string.h>
3992#include <float.h>
c906108c 3993
bec39cab
AC
3994int
3995main ()
3996{
c906108c 3997
bec39cab
AC
3998 ;
3999 return 0;
4000}
4001_ACEOF
81ecdfbb 4002if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4003 ac_cv_header_stdc=yes
c906108c 4004else
81ecdfbb 4005 ac_cv_header_stdc=no
c906108c 4006fi
81ecdfbb 4007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4008
783e057b
DJ
4009if test $ac_cv_header_stdc = yes; then
4010 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4012/* end confdefs.h. */
4013#include <string.h>
c906108c 4014
783e057b
DJ
4015_ACEOF
4016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4017 $EGREP "memchr" >/dev/null 2>&1; then :
4018
c906108c 4019else
783e057b 4020 ac_cv_header_stdc=no
c906108c 4021fi
783e057b 4022rm -f conftest*
c906108c
SS
4023
4024fi
4025
783e057b
DJ
4026if test $ac_cv_header_stdc = yes; then
4027 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4029/* end confdefs.h. */
4030#include <stdlib.h>
bec39cab 4031
783e057b
DJ
4032_ACEOF
4033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4034 $EGREP "free" >/dev/null 2>&1; then :
4035
bec39cab 4036else
783e057b 4037 ac_cv_header_stdc=no
bec39cab 4038fi
783e057b 4039rm -f conftest*
bec39cab
AC
4040
4041fi
bec39cab 4042
783e057b
DJ
4043if test $ac_cv_header_stdc = yes; then
4044 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4045 if test "$cross_compiling" = yes; then :
783e057b 4046 :
bec39cab 4047else
81ecdfbb 4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4049/* end confdefs.h. */
4050#include <ctype.h>
81ecdfbb 4051#include <stdlib.h>
783e057b
DJ
4052#if ((' ' & 0x0FF) == 0x020)
4053# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4054# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4055#else
4056# define ISLOWER(c) \
4057 (('a' <= (c) && (c) <= 'i') \
4058 || ('j' <= (c) && (c) <= 'r') \
4059 || ('s' <= (c) && (c) <= 'z'))
4060# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4061#endif
4062
4063#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4064int
4065main ()
4066{
4067 int i;
4068 for (i = 0; i < 256; i++)
4069 if (XOR (islower (i), ISLOWER (i))
4070 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4071 return 2;
4072 return 0;
783e057b
DJ
4073}
4074_ACEOF
81ecdfbb 4075if ac_fn_c_try_run "$LINENO"; then :
783e057b 4076
81ecdfbb
RW
4077else
4078 ac_cv_header_stdc=no
783e057b 4079fi
81ecdfbb
RW
4080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4081 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4082fi
81ecdfbb 4083
783e057b
DJ
4084fi
4085fi
81ecdfbb
RW
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4087$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4088if test $ac_cv_header_stdc = yes; then
4089
81ecdfbb 4090$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4091
4092fi
4093
4094# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4095for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4096 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4097do :
4098 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4099ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4100"
4101eval as_val=\$$as_ac_Header
4102 if test "x$as_val" = x""yes; then :
783e057b 4103 cat >>confdefs.h <<_ACEOF
81ecdfbb 4104#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4105_ACEOF
4106
4107fi
4108
4109done
4110
4111
4112
f434ba03
PA
4113
4114
81ecdfbb
RW
4115 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4116if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4117 MINIX=yes
4118else
4119 MINIX=
4120fi
4121
4122
4123 if test "$MINIX" = yes; then
4124
81ecdfbb 4125$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4126
4127
81ecdfbb 4128$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4129
4130
81ecdfbb 4131$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4132
4133 fi
4134
f434ba03
PA
4135 case "$host_os" in
4136 hpux*)
4137
4138$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4139
4140 ;;
4141 esac
4142
783e057b 4143
81ecdfbb
RW
4144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4145$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4146if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4147 $as_echo_n "(cached) " >&6
783e057b 4148else
81ecdfbb 4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4150/* end confdefs.h. */
4151
f434ba03
PA
4152# define __EXTENSIONS__ 1
4153 $ac_includes_default
783e057b
DJ
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
81ecdfbb 4162if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4163 ac_cv_safe_to_define___extensions__=yes
4164else
81ecdfbb 4165 ac_cv_safe_to_define___extensions__=no
783e057b 4166fi
81ecdfbb 4167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4168fi
81ecdfbb
RW
4169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4170$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4171 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4172 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4173
81ecdfbb 4174 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4175
81ecdfbb 4176 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4177
81ecdfbb 4178 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4179
81ecdfbb 4180 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4181
4182
81ecdfbb
RW
4183if test -n "$ac_tool_prefix"; then
4184 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4185set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4187$as_echo_n "checking for $ac_word... " >&6; }
4188if test "${ac_cv_prog_RANLIB+set}" = set; then :
4189 $as_echo_n "(cached) " >&6
4190else
4191 if test -n "$RANLIB"; then
4192 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4193else
4194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4195for as_dir in $PATH
4196do
4197 IFS=$as_save_IFS
4198 test -z "$as_dir" && as_dir=.
4199 for ac_exec_ext in '' $ac_executable_extensions; do
4200 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4201 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4203 break 2
4204 fi
4205done
4206 done
4207IFS=$as_save_IFS
783e057b 4208
81ecdfbb
RW
4209fi
4210fi
4211RANLIB=$ac_cv_prog_RANLIB
4212if test -n "$RANLIB"; then
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4214$as_echo "$RANLIB" >&6; }
4215else
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
783e057b
DJ
4219
4220
81ecdfbb
RW
4221fi
4222if test -z "$ac_cv_prog_RANLIB"; then
4223 ac_ct_RANLIB=$RANLIB
4224 # Extract the first word of "ranlib", so it can be a program name with args.
4225set dummy ranlib; ac_word=$2
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4227$as_echo_n "checking for $ac_word... " >&6; }
4228if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4229 $as_echo_n "(cached) " >&6
783e057b 4230else
81ecdfbb
RW
4231 if test -n "$ac_ct_RANLIB"; then
4232 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4233else
4234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4235for as_dir in $PATH
4236do
4237 IFS=$as_save_IFS
4238 test -z "$as_dir" && as_dir=.
4239 for ac_exec_ext in '' $ac_executable_extensions; do
4240 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4241 ac_cv_prog_ac_ct_RANLIB="ranlib"
4242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4243 break 2
4244 fi
4245done
4246 done
4247IFS=$as_save_IFS
4248
4249fi
4250fi
4251ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4252if test -n "$ac_ct_RANLIB"; then
4253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4254$as_echo "$ac_ct_RANLIB" >&6; }
4255else
4256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4257$as_echo "no" >&6; }
4258fi
4259
4260 if test "x$ac_ct_RANLIB" = x; then
4261 RANLIB=":"
4262 else
4263 case $cross_compiling:$ac_tool_warned in
4264yes:)
4265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4267ac_tool_warned=yes ;;
4268esac
4269 RANLIB=$ac_ct_RANLIB
4270 fi
4271else
4272 RANLIB="$ac_cv_prog_RANLIB"
4273fi
4274
4275
4276
4277
4278
4279
3388710e
JM
4280
4281
3388710e 4282
f434ba03
PA
4283 # Code from module arg-nonnull:
4284 # Code from module c++defs:
4285 # Code from module extensions:
3388710e 4286
f434ba03
PA
4287 # Code from module include_next:
4288 # Code from module memchr:
4289 # Code from module memmem:
4290 # Code from module memmem-simple:
4291 # Code from module multiarch:
4292 # Code from module stddef:
4293 # Code from module stdint:
4294 # Code from module string:
4295 # Code from module warn-on-use:
4296 # Code from module wchar:
3388710e
JM
4297
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4299$as_echo_n "checking target system type... " >&6; }
4300if test "${ac_cv_target+set}" = set; then :
4301 $as_echo_n "(cached) " >&6
4302else
4303 if test "x$target_alias" = x; then
4304 ac_cv_target=$ac_cv_host
4305else
4306 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4307 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4308fi
4309
4310fi
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4312$as_echo "$ac_cv_target" >&6; }
4313case $ac_cv_target in
4314*-*-*) ;;
4315*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4316esac
4317target=$ac_cv_target
4318ac_save_IFS=$IFS; IFS='-'
4319set x $ac_cv_target
4320shift
4321target_cpu=$1
4322target_vendor=$2
4323shift; shift
4324# Remember, the first character of IFS is used to create $*,
4325# except with old shells:
4326target_os=$*
4327IFS=$ac_save_IFS
4328case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4329
4330
4331# The aliases save the names the user supplied, while $host etc.
4332# will get canonicalized.
4333test -n "$target_alias" &&
4334 test "$program_prefix$program_suffix$program_transform_name" = \
4335 NONENONEs,x,x, &&
4336 program_prefix=${target_alias}-
4337
4338# The tests for host and target for $enable_largefile require
4339# canonical names.
4340
4341
81ecdfbb 4342
da2f07f1
JK
4343# As the $enable_largefile decision depends on --enable-plugins we must set it
4344# even in directories otherwise not depending on the $plugins option.
4345
4346
4347# Check whether --enable-plugins was given.
4348if test "${enable_plugins+set}" = set; then :
4349 enableval=$enable_plugins; case "${enableval}" in
4350 yes | "") plugins=yes ;;
4351 no) plugins=no ;;
4352 *) plugins=yes ;;
4353 esac
4354else
4355 plugins=no
4356fi
4357
4358
4359
4360case "${host}" in
4361 sparc-*-solaris*|i[3-7]86-*-solaris*)
4362 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4363 # are mutually exclusive; and without procfs support, the bfd/ elf module
4364 # cannot provide certain routines such as elfcore_write_prpsinfo
4365 # or elfcore_write_prstatus. So unless the user explicitly requested
4366 # large-file support through the --enable-largefile switch, disable
4367 # large-file support in favor of procfs support.
4368 test "${target}" = "${host}" -a "x$plugins" = xno \
4369 && : ${enable_largefile="no"}
4370 ;;
4371esac
4372
4373# Check whether --enable-largefile was given.
4374if test "${enable_largefile+set}" = set; then :
4375 enableval=$enable_largefile;
4376fi
4377
4378if test "$enable_largefile" != no; then
4379
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4381$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4382if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4383 $as_echo_n "(cached) " >&6
4384else
4385 ac_cv_sys_largefile_CC=no
4386 if test "$GCC" != yes; then
4387 ac_save_CC=$CC
4388 while :; do
4389 # IRIX 6.2 and later do not support large files by default,
4390 # so use the C compiler's -n32 option if that helps.
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392/* end confdefs.h. */
4393#include <sys/types.h>
4394 /* Check that off_t can represent 2**63 - 1 correctly.
4395 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4396 since some C++ compilers masquerading as C compilers
4397 incorrectly reject 9223372036854775807. */
4398#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4399 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4400 && LARGE_OFF_T % 2147483647 == 1)
4401 ? 1 : -1];
4402int
4403main ()
4404{
4405
4406 ;
4407 return 0;
4408}
4409_ACEOF
4410 if ac_fn_c_try_compile "$LINENO"; then :
4411 break
4412fi
4413rm -f core conftest.err conftest.$ac_objext
4414 CC="$CC -n32"
4415 if ac_fn_c_try_compile "$LINENO"; then :
4416 ac_cv_sys_largefile_CC=' -n32'; break
4417fi
4418rm -f core conftest.err conftest.$ac_objext
4419 break
4420 done
4421 CC=$ac_save_CC
4422 rm -f conftest.$ac_ext
4423 fi
4424fi
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4426$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4427 if test "$ac_cv_sys_largefile_CC" != no; then
4428 CC=$CC$ac_cv_sys_largefile_CC
4429 fi
4430
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4432$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4433if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 while :; do
4437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4438/* end confdefs.h. */
4439#include <sys/types.h>
4440 /* Check that off_t can represent 2**63 - 1 correctly.
4441 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4442 since some C++ compilers masquerading as C compilers
4443 incorrectly reject 9223372036854775807. */
4444#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4445 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4446 && LARGE_OFF_T % 2147483647 == 1)
4447 ? 1 : -1];
4448int
4449main ()
4450{
4451
4452 ;
4453 return 0;
4454}
4455_ACEOF
4456if ac_fn_c_try_compile "$LINENO"; then :
4457 ac_cv_sys_file_offset_bits=no; break
4458fi
4459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4461/* end confdefs.h. */
4462#define _FILE_OFFSET_BITS 64
4463#include <sys/types.h>
4464 /* Check that off_t can represent 2**63 - 1 correctly.
4465 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4466 since some C++ compilers masquerading as C compilers
4467 incorrectly reject 9223372036854775807. */
4468#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4469 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4470 && LARGE_OFF_T % 2147483647 == 1)
4471 ? 1 : -1];
4472int
4473main ()
4474{
4475
4476 ;
4477 return 0;
4478}
4479_ACEOF
4480if ac_fn_c_try_compile "$LINENO"; then :
4481 ac_cv_sys_file_offset_bits=64; break
4482fi
4483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4484 ac_cv_sys_file_offset_bits=unknown
4485 break
4486done
4487fi
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4489$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4490case $ac_cv_sys_file_offset_bits in #(
4491 no | unknown) ;;
4492 *)
4493cat >>confdefs.h <<_ACEOF
4494#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4495_ACEOF
4496;;
4497esac
4498rm -rf conftest*
4499 if test $ac_cv_sys_file_offset_bits = unknown; then
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4501$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4502if test "${ac_cv_sys_large_files+set}" = set; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 while :; do
4506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4507/* end confdefs.h. */
4508#include <sys/types.h>
4509 /* Check that off_t can represent 2**63 - 1 correctly.
4510 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4511 since some C++ compilers masquerading as C compilers
4512 incorrectly reject 9223372036854775807. */
4513#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4514 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4515 && LARGE_OFF_T % 2147483647 == 1)
4516 ? 1 : -1];
4517int
4518main ()
4519{
4520
4521 ;
4522 return 0;
4523}
4524_ACEOF
4525if ac_fn_c_try_compile "$LINENO"; then :
4526 ac_cv_sys_large_files=no; break
4527fi
4528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530/* end confdefs.h. */
4531#define _LARGE_FILES 1
4532#include <sys/types.h>
4533 /* Check that off_t can represent 2**63 - 1 correctly.
4534 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4535 since some C++ compilers masquerading as C compilers
4536 incorrectly reject 9223372036854775807. */
4537#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4538 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4539 && LARGE_OFF_T % 2147483647 == 1)
4540 ? 1 : -1];
4541int
4542main ()
4543{
4544
4545 ;
4546 return 0;
4547}
4548_ACEOF
4549if ac_fn_c_try_compile "$LINENO"; then :
4550 ac_cv_sys_large_files=1; break
4551fi
4552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 ac_cv_sys_large_files=unknown
4554 break
4555done
4556fi
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4558$as_echo "$ac_cv_sys_large_files" >&6; }
4559case $ac_cv_sys_large_files in #(
4560 no | unknown) ;;
4561 *)
4562cat >>confdefs.h <<_ACEOF
4563#define _LARGE_FILES $ac_cv_sys_large_files
4564_ACEOF
4565;;
4566esac
4567rm -rf conftest*
4568 fi
4569fi
4570
4571
4572
81ecdfbb
RW
4573
4574
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4576$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4577if test "${am_cv_prog_cc_stdc+set}" = set; then :
4578 $as_echo_n "(cached) " >&6
4579else
4580 am_cv_prog_cc_stdc=no
4581ac_save_CC="$CC"
4582# Don't try gcc -ansi; that turns off useful extensions and
4583# breaks some systems' header files.
4584# AIX -qlanglvl=ansi
4585# Ultrix and OSF/1 -std1
4586# HP-UX 10.20 and later -Ae
4587# HP-UX older versions -Aa -D_HPUX_SOURCE
4588# SVR4 -Xc -D__EXTENSIONS__
4589for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4590do
783e057b 4591 CC="$ac_save_CC $ac_arg"
81ecdfbb 4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4593/* end confdefs.h. */
4594#include <stdarg.h>
4595#include <stdio.h>
4596#include <sys/types.h>
4597#include <sys/stat.h>
4598/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4599struct buf { int x; };
4600FILE * (*rcsopen) (struct buf *, struct stat *, int);
4601static char *e (p, i)
4602 char **p;
4603 int i;
4604{
4605 return p[i];
4606}
4607static char *f (char * (*g) (char **, int), char **p, ...)
4608{
4609 char *s;
4610 va_list v;
4611 va_start (v,p);
4612 s = g (p, va_arg (v,int));
4613 va_end (v);
4614 return s;
4615}
4616int test (int i, double x);
4617struct s1 {int (*f) (int a);};
4618struct s2 {int (*f) (double a);};
4619int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4620int argc;
4621char **argv;
4622
4623int
4624main ()
4625{
4626
4627return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4628
4629 ;
4630 return 0;
4631}
4632_ACEOF
81ecdfbb 4633if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4634 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4635fi
81ecdfbb 4636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4637done
4638CC="$ac_save_CC"
4639
4640fi
4641
4642if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4644$as_echo "none needed" >&6; }
783e057b 4645else
81ecdfbb
RW
4646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4647$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4648fi
4649case "x$am_cv_prog_cc_stdc" in
4650 x|xno) ;;
4651 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4652esac
4653
4654
4655ac_aux_dir=
81ecdfbb
RW
4656for ac_dir in .. "$srcdir"/..; do
4657 for ac_t in install-sh install.sh shtool; do
4658 if test -f "$ac_dir/$ac_t"; then
4659 ac_aux_dir=$ac_dir
4660 ac_install_sh="$ac_aux_dir/$ac_t -c"
4661 break 2
4662 fi
4663 done
783e057b
DJ
4664done
4665if test -z "$ac_aux_dir"; then
81ecdfbb 4666 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4667fi
81ecdfbb
RW
4668
4669# These three variables are undocumented and unsupported,
4670# and are intended to be withdrawn in a future Autoconf release.
4671# They can cause serious problems if a builder's source tree is in a directory
4672# whose full name contains unusual characters.
4673ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4674ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4675ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4676
783e057b 4677
783e057b 4678
81ecdfbb 4679
a417dc56
RW
4680# Dependency checking.
4681rm -rf .tst 2>/dev/null
4682mkdir .tst 2>/dev/null
4683if test -d .tst; then
4684 am__leading_dot=.
4685else
4686 am__leading_dot=_
4687fi
4688rmdir .tst 2>/dev/null
4689
4690DEPDIR="${am__leading_dot}deps"
4691
81ecdfbb 4692ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4693
4694
4695depcc="$CC" am_compiler_list=
4696
4697am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4699$as_echo_n "checking dependency style of $depcc... " >&6; }
4700if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4701 $as_echo_n "(cached) " >&6
a417dc56
RW
4702else
4703 if test -f "$am_depcomp"; then
4704 # We make a subdir and do the tests there. Otherwise we can end up
4705 # making bogus files that we don't know about and never remove. For
4706 # instance it was reported that on HP-UX the gcc test will end up
4707 # making a dummy file named `D' -- because `-MD' means `put the output
4708 # in D'.
4709 mkdir conftest.dir
4710 # Copy depcomp to subdir because otherwise we won't find it if we're
4711 # using a relative directory.
4712 cp "$am_depcomp" conftest.dir
4713 cd conftest.dir
4714 # We will build objects and dependencies in a subdirectory because
4715 # it helps to detect inapplicable dependency modes. For instance
4716 # both Tru64's cc and ICC support -MD to output dependencies as a
4717 # side effect of compilation, but ICC will put the dependencies in
4718 # the current directory while Tru64 will put them in the object
4719 # directory.
4720 mkdir sub
4721
4722 am_cv_CC_dependencies_compiler_type=none
4723 if test "$am_compiler_list" = ""; then
4724 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4725 fi
4726 for depmode in $am_compiler_list; do
4727 if test $depmode = none; then break; fi
4728
81ecdfbb 4729 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4730 # Setup a source with many dependencies, because some compilers
4731 # like to wrap large dependency lists on column 80 (with \), and
4732 # we should not choose a depcomp mode which is confused by this.
4733 #
4734 # We need to recreate these files for each test, as the compiler may
4735 # overwrite some of them when testing with obscure command lines.
4736 # This happens at least with the AIX C compiler.
4737 : > sub/conftest.c
4738 for i in 1 2 3 4 5 6; do
4739 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4740 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4741 # Solaris 8's {/usr,}/bin/sh.
4742 touch sub/conftst$i.h
4743 done
4744 echo "include sub/conftest.Po" > confmf
4745
4746 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4747 # mode. It turns out that the SunPro C++ compiler does not properly
4748 # handle `-M -o', and we need to detect this.
4749 depcmd="depmode=$depmode \
4750 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4751 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4752 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4753 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4754 if env $depcmd > conftest.err 2>&1 &&
4755 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4756 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4757 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4758 # icc doesn't choke on unknown options, it will just issue warnings
4759 # or remarks (even with -Werror). So we grep stderr for any message
4760 # that says an option was ignored or not supported.
4761 # When given -MP, icc 7.0 and 7.1 complain thusly:
4762 # icc: Command line warning: ignoring option '-M'; no argument required
4763 # The diagnosis changed in icc 8.0:
4764 # icc: Command line remark: option '-MP' not supported
4765 if (grep 'ignoring option' conftest.err ||
4766 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4767 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4768 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4769 break
4770 fi
4771 fi
81ecdfbb 4772 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4773 sed -e 's/^/| /' < conftest.err >&5
4774 done
4775
4776 cd ..
4777 rm -rf conftest.dir
4778else
4779 am_cv_CC_dependencies_compiler_type=none
4780fi
4781
4782fi
81ecdfbb
RW
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4784$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4785if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4786then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4787else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4788
4789fi
4790
4791
4792# Check for the 'make' the user wants to use.
4793for ac_prog in make
4794do
4795 # Extract the first word of "$ac_prog", so it can be a program name with args.
4796set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798$as_echo_n "checking for $ac_word... " >&6; }
4799if test "${ac_cv_prog_MAKE+set}" = set; then :
4800 $as_echo_n "(cached) " >&6
a417dc56
RW
4801else
4802 if test -n "$MAKE"; then
4803 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4804else
4805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in $PATH
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4810 for ac_exec_ext in '' $ac_executable_extensions; do
4811 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4812 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4814 break 2
4815 fi
4816done
81ecdfbb
RW
4817 done
4818IFS=$as_save_IFS
a417dc56
RW
4819
4820fi
4821fi
4822MAKE=$ac_cv_prog_MAKE
4823if test -n "$MAKE"; then
81ecdfbb
RW
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4825$as_echo "$MAKE" >&6; }
a417dc56 4826else
81ecdfbb
RW
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
a417dc56
RW
4829fi
4830
81ecdfbb 4831
a417dc56
RW
4832 test -n "$MAKE" && break
4833done
4834
4835MAKE_IS_GNU=
4836case "`$MAKE --version 2>&1 | sed 1q`" in
4837 *GNU*)
4838 MAKE_IS_GNU=yes
4839 ;;
4840esac
81ecdfbb 4841 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4842 GMAKE_TRUE=
4843 GMAKE_FALSE='#'
4844else
4845 GMAKE_TRUE='#'
4846 GMAKE_FALSE=
4847fi
4848
81ecdfbb
RW
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4850$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4851set x ${MAKE-make}
4852ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4853if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4854 $as_echo_n "(cached) " >&6
a417dc56
RW
4855else
4856 cat >conftest.make <<\_ACEOF
81ecdfbb 4857SHELL = /bin/sh
a417dc56 4858all:
81ecdfbb 4859 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4860_ACEOF
4861# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4862case `${MAKE-make} -f conftest.make 2>/dev/null` in
4863 *@@@%%%=?*=@@@%%%*)
4864 eval ac_cv_prog_make_${ac_make}_set=yes;;
4865 *)
4866 eval ac_cv_prog_make_${ac_make}_set=no;;
4867esac
a417dc56
RW
4868rm -f conftest.make
4869fi
81ecdfbb
RW
4870if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4872$as_echo "yes" >&6; }
a417dc56
RW
4873 SET_MAKE=
4874else
81ecdfbb
RW
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
a417dc56
RW
4877 SET_MAKE="MAKE=${MAKE-make}"
4878fi
4879
4880
783e057b
DJ
4881
4882CONFIG_OBS=
4883CONFIG_DEPS=
4884CONFIG_SRCS=
4885ENABLE_CFLAGS=
4886
4887CONFIG_ALL=
4888CONFIG_CLEAN=
4889CONFIG_INSTALL=
4890CONFIG_UNINSTALL=
4891
4892# If we haven't got the data from the intl directory,
4893# assume NLS is disabled.
4894USE_NLS=no
4895LIBINTL=
4896LIBINTL_DEP=
4897INCINTL=
4898XGETTEXT=
4899GMSGFMT=
4900POSUB=
4901
4902if test -f ../intl/config.intl; then
4903 . ../intl/config.intl
4904fi
81ecdfbb
RW
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4906$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4907if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
783e057b 4910else
81ecdfbb
RW
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4912$as_echo "yes" >&6; }
783e057b 4913
81ecdfbb 4914$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4915
4916
81ecdfbb
RW
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4918$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4919 # Look for .po and .gmo files in the source directory.
4920 CATALOGS=
4921 XLINGUAS=
4922 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4923 # If there aren't any .gmo files the shell will give us the
4924 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4925 # weeded out.
4926 case "$cat" in *\**)
4927 continue;;
4928 esac
4929 # The quadruple backslash is collapsed to a double backslash
4930 # by the backticks, then collapsed again by the double quotes,
4931 # leaving us with one backslash in the sed expression (right
4932 # before the dot that mustn't act as a wildcard).
4933 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4934 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4935 # The user is allowed to set LINGUAS to a list of languages to
4936 # install catalogs for. If it's empty that means "all of them."
4937 if test "x$LINGUAS" = x; then
4938 CATALOGS="$CATALOGS $cat"
4939 XLINGUAS="$XLINGUAS $lang"
4940 else
4941 case "$LINGUAS" in *$lang*)
4942 CATALOGS="$CATALOGS $cat"
4943 XLINGUAS="$XLINGUAS $lang"
4944 ;;
4945 esac
4946 fi
4947 done
4948 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4950$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4951
4952
4953 DATADIRNAME=share
4954
4955 INSTOBJEXT=.mo
4956
4957 GENCAT=gencat
4958
4959 CATOBJEXT=.gmo
4960
4961fi
4962
4963localedir='${datadir}/locale'
4964
4965
4966if test x"$USE_NLS" = xyes; then
4967 CONFIG_ALL="$CONFIG_ALL all-po"
4968 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4969 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4970 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4971fi
4972
4973
f434ba03
PA
4974
4975
4976
4977 LIBC_FATAL_STDERR_=1
4978 export LIBC_FATAL_STDERR_
4979
4980
4981
4982
4983
4984 for ac_header in $gl_header_list
4985do :
4986 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4987ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4988eval as_val=\$$as_ac_Header
4989 if test "x$as_val" = x""yes; then :
4990 cat >>confdefs.h <<_ACEOF
4991#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4992_ACEOF
4993
4994fi
4995
4996done
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006 for ac_func in $gl_func_list
5007do :
5008 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5009ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5010eval as_val=\$$as_ac_var
5011 if test "x$as_val" = x""yes; then :
5012 cat >>confdefs.h <<_ACEOF
5013#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5014_ACEOF
5015
5016fi
5017done
5018
5019
5020
5021
5022
5023
5024 GNULIB_MEMCHR=0;
5025 GNULIB_MEMMEM=0;
5026 GNULIB_MEMPCPY=0;
5027 GNULIB_MEMRCHR=0;
5028 GNULIB_RAWMEMCHR=0;
5029 GNULIB_STPCPY=0;
5030 GNULIB_STPNCPY=0;
5031 GNULIB_STRCHRNUL=0;
5032 GNULIB_STRDUP=0;
5033 GNULIB_STRNCAT=0;
5034 GNULIB_STRNDUP=0;
5035 GNULIB_STRNLEN=0;
5036 GNULIB_STRPBRK=0;
5037 GNULIB_STRSEP=0;
5038 GNULIB_STRSTR=0;
5039 GNULIB_STRCASESTR=0;
5040 GNULIB_STRTOK_R=0;
5041 GNULIB_MBSLEN=0;
5042 GNULIB_MBSNLEN=0;
5043 GNULIB_MBSCHR=0;
5044 GNULIB_MBSRCHR=0;
5045 GNULIB_MBSSTR=0;
5046 GNULIB_MBSCASECMP=0;
5047 GNULIB_MBSNCASECMP=0;
5048 GNULIB_MBSPCASECMP=0;
5049 GNULIB_MBSCASESTR=0;
5050 GNULIB_MBSCSPN=0;
5051 GNULIB_MBSPBRK=0;
5052 GNULIB_MBSSPN=0;
5053 GNULIB_MBSSEP=0;
5054 GNULIB_MBSTOK_R=0;
5055 GNULIB_STRERROR=0;
5056 GNULIB_STRSIGNAL=0;
5057 GNULIB_STRVERSCMP=0;
5058 HAVE_MBSLEN=0;
5059 HAVE_MEMCHR=1;
5060 HAVE_DECL_MEMMEM=1;
5061 HAVE_MEMPCPY=1;
5062 HAVE_DECL_MEMRCHR=1;
5063 HAVE_RAWMEMCHR=1;
5064 HAVE_STPCPY=1;
5065 HAVE_STPNCPY=1;
5066 HAVE_STRCHRNUL=1;
5067 HAVE_DECL_STRDUP=1;
5068 HAVE_DECL_STRNDUP=1;
5069 HAVE_DECL_STRNLEN=1;
5070 HAVE_STRPBRK=1;
5071 HAVE_STRSEP=1;
5072 HAVE_STRCASESTR=1;
5073 HAVE_DECL_STRTOK_R=1;
5074 HAVE_DECL_STRSIGNAL=1;
5075 HAVE_STRVERSCMP=1;
5076 REPLACE_MEMCHR=0;
783e057b 5077 REPLACE_MEMMEM=0;
f434ba03
PA
5078 REPLACE_STPNCPY=0;
5079 REPLACE_STRDUP=0;
783e057b 5080 REPLACE_STRSTR=0;
f434ba03
PA
5081 REPLACE_STRCASESTR=0;
5082 REPLACE_STRERROR=0;
5083 REPLACE_STRNCAT=0;
5084 REPLACE_STRNDUP=0;
5085 REPLACE_STRNLEN=0;
5086 REPLACE_STRSIGNAL=0;
5087 REPLACE_STRTOK_R=0;
5088 UNDEFINE_STRTOK_R=0;
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5103 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5104 # irrelevant for anonymous mappings.
5105 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5106if test "x$ac_cv_func_mmap" = x""yes; then :
5107 gl_have_mmap=yes
5108else
5109 gl_have_mmap=no
5110fi
5111
5112
5113 # Try to allow MAP_ANONYMOUS.
5114 gl_have_mmap_anonymous=no
5115 if test $gl_have_mmap = yes; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5117$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5119/* end confdefs.h. */
5120
5121#include <sys/mman.h>
5122#ifdef MAP_ANONYMOUS
5123 I cant identify this map.
5124#endif
5125
5126_ACEOF
5127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5128 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5129 gl_have_mmap_anonymous=yes
5130fi
5131rm -f conftest*
5132
5133 if test $gl_have_mmap_anonymous != yes; then
5134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5135/* end confdefs.h. */
5136
5137#include <sys/mman.h>
5138#ifdef MAP_ANON
5139 I cant identify this map.
5140#endif
5141
5142_ACEOF
5143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5144 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5145
5146$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5147
5148 gl_have_mmap_anonymous=yes
5149fi
5150rm -f conftest*
5151
5152 fi
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5154$as_echo "$gl_have_mmap_anonymous" >&6; }
5155 if test $gl_have_mmap_anonymous = yes; then
5156
5157$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5158
5159 fi
5160 fi
5161
5162
5163 :
5164
5165
5166
5167
5168
5169
5170 :
5171
5172
5173
5174
5175
5176
5177
5178
5179 :
5180
5181
5182
5183
5184
5185 if test $ac_cv_func_memchr = yes; then
5186 # Detect platform-specific bugs in some versions of glibc:
5187 # memchr should not dereference anything with length 0
5188 # http://bugzilla.redhat.com/499689
5189 # memchr should not dereference overestimated length after a match
5190 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5191 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5192 # Assume that memchr works on platforms that lack mprotect.
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5194$as_echo_n "checking whether memchr works... " >&6; }
5195if test "${gl_cv_func_memchr_works+set}" = set; then :
5196 $as_echo_n "(cached) " >&6
5197else
5198 if test "$cross_compiling" = yes; then :
5199 gl_cv_func_memchr_works="guessing no"
5200else
5201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5202/* end confdefs.h. */
5203
5204#include <string.h>
5205#if HAVE_SYS_MMAN_H
5206# include <fcntl.h>
5207# include <unistd.h>
5208# include <sys/types.h>
5209# include <sys/mman.h>
5210# ifndef MAP_FILE
5211# define MAP_FILE 0
5212# endif
5213#endif
5214
5215int
5216main ()
5217{
5218
5219 char *fence = NULL;
5220#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5221# if HAVE_MAP_ANONYMOUS
5222 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5223 const int fd = -1;
5224# else /* !HAVE_MAP_ANONYMOUS */
5225 const int flags = MAP_FILE | MAP_PRIVATE;
5226 int fd = open ("/dev/zero", O_RDONLY, 0666);
5227 if (fd >= 0)
5228# endif
5229 {
5230 int pagesize = getpagesize ();
5231 char *two_pages =
5232 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5233 flags, fd, 0);
5234 if (two_pages != (char *)(-1)
5235 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5236 fence = two_pages + pagesize;
5237 }
5238#endif
5239 if (fence)
5240 {
5241 if (memchr (fence, 0, 0))
5242 return 1;
5243 strcpy (fence - 9, "12345678");
5244 if (memchr (fence - 9, 0, 79) != fence - 1)
5245 return 2;
5246 }
5247 return 0;
5248
5249 ;
5250 return 0;
5251}
5252_ACEOF
5253if ac_fn_c_try_run "$LINENO"; then :
5254 gl_cv_func_memchr_works=yes
5255else
5256 gl_cv_func_memchr_works=no
5257fi
5258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5259 conftest.$ac_objext conftest.beam conftest.$ac_ext
5260fi
5261
5262fi
5263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5264$as_echo "$gl_cv_func_memchr_works" >&6; }
5265 if test "$gl_cv_func_memchr_works" != yes; then
5266 REPLACE_MEMCHR=1
5267 fi
5268 else
5269 HAVE_MEMCHR=0
5270 fi
5271 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5272
5273
5274
5275
5276
5277
5278
5279
5280 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5281
5282
5283 for ac_header in bp-sym.h
5284do :
5285 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5286if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5287 cat >>confdefs.h <<_ACEOF
5288#define HAVE_BP_SYM_H 1
5289_ACEOF
5290
5291fi
5292
5293done
5294
5295
5296 fi
783e057b
DJ
5297
5298
81ecdfbb
RW
5299 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5300if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5301 ac_have_decl=1
783e057b 5302else
81ecdfbb 5303 ac_have_decl=0
783e057b 5304fi
783e057b
DJ
5305
5306cat >>confdefs.h <<_ACEOF
81ecdfbb 5307#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5308_ACEOF
5309
5310
783e057b
DJ
5311
5312
5313
5314
5315
5316
5317
5318
783e057b 5319
783e057b 5320
783e057b 5321
f434ba03 5322
81ecdfbb
RW
5323 for ac_func in memmem
5324do :
5325 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5326if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5327 cat >>confdefs.h <<_ACEOF
81ecdfbb 5328#define HAVE_MEMMEM 1
783e057b
DJ
5329_ACEOF
5330
5331else
5332
5333 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5334
5335fi
5336done
5337
5338
5339
5340 :
5341
5342
5343
5344
5345
5346 if test $ac_cv_have_decl_memmem = no; then
5347 HAVE_DECL_MEMMEM=0
5348 fi
5349 :
5350
5351
f434ba03
PA
5352 gl_cv_c_multiarch=no
5353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354/* end confdefs.h. */
5355#ifndef __APPLE_CC__
5356 not a universal capable compiler
5357 #endif
5358 typedef int dummy;
5359
5360_ACEOF
5361if ac_fn_c_try_compile "$LINENO"; then :
5362
5363 arch=
5364 prev=
5365 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5366 if test -n "$prev"; then
5367 case $word in
5368 i?86 | x86_64 | ppc | ppc64)
5369 if test -z "$arch" || test "$arch" = "$word"; then
5370 arch="$word"
5371 else
5372 gl_cv_c_multiarch=yes
5373 fi
5374 ;;
5375 esac
5376 prev=
5377 else
5378 if test "x$word" = "x-arch"; then
5379 prev=arch
5380 fi
5381 fi
5382 done
5383
5384fi
5385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5386 if test $gl_cv_c_multiarch = yes; then
5387
5388$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5389
5390 APPLE_UNIVERSAL_BUILD=1
5391 else
5392 APPLE_UNIVERSAL_BUILD=0
5393 fi
5394
5395
5396
5397 REPLACE_NULL=0;
5398 HAVE_WCHAR_T=1;
5399 STDDEF_H='';
5400
5401
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5403$as_echo_n "checking for wchar_t... " >&6; }
5404if test "${gt_cv_c_wchar_t+set}" = set; then :
5405 $as_echo_n "(cached) " >&6
5406else
5407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5408/* end confdefs.h. */
5409#include <stddef.h>
5410 wchar_t foo = (wchar_t)'\0';
5411int
5412main ()
5413{
5414
5415 ;
5416 return 0;
5417}
5418_ACEOF
5419if ac_fn_c_try_compile "$LINENO"; then :
5420 gt_cv_c_wchar_t=yes
5421else
5422 gt_cv_c_wchar_t=no
5423fi
5424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5425fi
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5427$as_echo "$gt_cv_c_wchar_t" >&6; }
5428 if test $gt_cv_c_wchar_t = yes; then
5429
5430$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5431
5432 fi
5433
5434
5435
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5437$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5438if test "${gl_cv_have_include_next+set}" = set; then :
5439 $as_echo_n "(cached) " >&6
5440else
5441 rm -rf conftestd1a conftestd1b conftestd2
5442 mkdir conftestd1a conftestd1b conftestd2
5443 cat <<EOF > conftestd1a/conftest.h
5444#define DEFINED_IN_CONFTESTD1
5445#include_next <conftest.h>
5446#ifdef DEFINED_IN_CONFTESTD2
5447int foo;
5448#else
5449#error "include_next doesn't work"
5450#endif
5451EOF
5452 cat <<EOF > conftestd1b/conftest.h
5453#define DEFINED_IN_CONFTESTD1
5454#include <stdio.h>
5455#include_next <conftest.h>
5456#ifdef DEFINED_IN_CONFTESTD2
5457int foo;
5458#else
5459#error "include_next doesn't work"
5460#endif
5461EOF
5462 cat <<EOF > conftestd2/conftest.h
5463#ifndef DEFINED_IN_CONFTESTD1
5464#error "include_next test doesn't work"
5465#endif
5466#define DEFINED_IN_CONFTESTD2
5467EOF
5468 gl_save_CPPFLAGS="$CPPFLAGS"
5469 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471/* end confdefs.h. */
5472#include <conftest.h>
5473_ACEOF
5474if ac_fn_c_try_compile "$LINENO"; then :
5475 gl_cv_have_include_next=yes
5476else
5477 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <conftest.h>
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 gl_cv_have_include_next=buggy
5484else
5485 gl_cv_have_include_next=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489fi
5490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5491 CPPFLAGS="$gl_save_CPPFLAGS"
5492 rm -rf conftestd1a conftestd1b conftestd2
5493
5494fi
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5496$as_echo "$gl_cv_have_include_next" >&6; }
5497 PRAGMA_SYSTEM_HEADER=
5498 if test $gl_cv_have_include_next = yes; then
5499 INCLUDE_NEXT=include_next
5500 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5501 if test -n "$GCC"; then
5502 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5503 fi
5504 else
5505 if test $gl_cv_have_include_next = buggy; then
5506 INCLUDE_NEXT=include
5507 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5508 else
5509 INCLUDE_NEXT=include
5510 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5511 fi
5512 fi
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
81ecdfbb
RW
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5524$as_echo_n "checking for long long int... " >&6; }
5525if test "${ac_cv_type_long_long_int+set}" = set; then :
5526 $as_echo_n "(cached) " >&6
783e057b 5527else
81ecdfbb 5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5529/* end confdefs.h. */
81ecdfbb
RW
5530
5531 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5532 implementations with broken preprocessors. Perhaps this can
5533 be revisited in 2012. In the meantime, code should not expect
5534 #if to work with literals wider than 32 bits. */
783e057b
DJ
5535 /* Test literals. */
5536 long long int ll = 9223372036854775807ll;
5537 long long int nll = -9223372036854775807LL;
5538 unsigned long long int ull = 18446744073709551615ULL;
5539 /* Test constant expressions. */
5540 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5541 ? 1 : -1)];
783e057b 5542 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5543 ? 1 : -1)];
783e057b
DJ
5544 int i = 63;
5545int
5546main ()
5547{
5548/* Test availability of runtime routines for shift and division. */
5549 long long int llmax = 9223372036854775807ll;
5550 unsigned long long int ullmax = 18446744073709551615ull;
5551 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5552 | (llmax / ll) | (llmax % ll)
5553 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5554 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5555 ;
5556 return 0;
5557}
5558
5559_ACEOF
81ecdfbb 5560if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5561 if test "$cross_compiling" = yes; then :
783e057b
DJ
5562 ac_cv_type_long_long_int=yes
5563else
81ecdfbb 5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5565/* end confdefs.h. */
5566#include <limits.h>
f434ba03
PA
5567 #ifndef LLONG_MAX
5568 # define HALF \
5569 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5570 # define LLONG_MAX (HALF - 1 + HALF)
5571 #endif
783e057b
DJ
5572int
5573main ()
5574{
5575long long int n = 1;
f434ba03
PA
5576 int i;
5577 for (i = 0; ; i++)
5578 {
5579 long long int m = n << i;
5580 if (m >> i != n)
5581 return 1;
5582 if (LLONG_MAX / 2 < m)
5583 break;
5584 }
5585 return 0;
783e057b
DJ
5586 ;
5587 return 0;
5588}
5589_ACEOF
81ecdfbb 5590if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5591 ac_cv_type_long_long_int=yes
5592else
81ecdfbb 5593 ac_cv_type_long_long_int=no
783e057b 5594fi
81ecdfbb
RW
5595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5596 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5597fi
783e057b 5598
81ecdfbb
RW
5599else
5600 ac_cv_type_long_long_int=no
783e057b 5601fi
81ecdfbb
RW
5602rm -f core conftest.err conftest.$ac_objext \
5603 conftest$ac_exeext conftest.$ac_ext
783e057b 5604fi
81ecdfbb
RW
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5606$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5607 if test $ac_cv_type_long_long_int = yes; then
5608
81ecdfbb 5609$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5610
5611 fi
5612
5613
81ecdfbb
RW
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5615$as_echo_n "checking for unsigned long long int... " >&6; }
5616if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5617 $as_echo_n "(cached) " >&6
783e057b 5618else
81ecdfbb 5619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5620/* end confdefs.h. */
81ecdfbb
RW
5621
5622 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5623 implementations with broken preprocessors. Perhaps this can
5624 be revisited in 2012. In the meantime, code should not expect
5625 #if to work with literals wider than 32 bits. */
783e057b
DJ
5626 /* Test literals. */
5627 long long int ll = 9223372036854775807ll;
5628 long long int nll = -9223372036854775807LL;
5629 unsigned long long int ull = 18446744073709551615ULL;
5630 /* Test constant expressions. */
5631 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5632 ? 1 : -1)];
783e057b 5633 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5634 ? 1 : -1)];
783e057b
DJ
5635 int i = 63;
5636int
5637main ()
5638{
5639/* Test availability of runtime routines for shift and division. */
5640 long long int llmax = 9223372036854775807ll;
5641 unsigned long long int ullmax = 18446744073709551615ull;
5642 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5643 | (llmax / ll) | (llmax % ll)
5644 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5645 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5646 ;
5647 return 0;
5648}
5649
5650_ACEOF
81ecdfbb 5651if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5652 ac_cv_type_unsigned_long_long_int=yes
5653else
81ecdfbb 5654 ac_cv_type_unsigned_long_long_int=no
783e057b 5655fi
81ecdfbb
RW
5656rm -f core conftest.err conftest.$ac_objext \
5657 conftest$ac_exeext conftest.$ac_ext
783e057b 5658fi
81ecdfbb
RW
5659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5660$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5661 if test $ac_cv_type_unsigned_long_long_int = yes; then
5662
81ecdfbb 5663$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5664
5665 fi
5666
5667
5668
783e057b
DJ
5669
5670
5671
5672
5673
5674
5675
5676
81ecdfbb
RW
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5678$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5679if test "${ac_cv_c_restrict+set}" = set; then :
5680 $as_echo_n "(cached) " >&6
783e057b
DJ
5681else
5682 ac_cv_c_restrict=no
5683 # The order here caters to the fact that C++ does not require restrict.
5684 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5686/* end confdefs.h. */
5687typedef int * int_ptr;
5688 int foo (int_ptr $ac_kw ip) {
5689 return ip[0];
5690 }
5691int
5692main ()
5693{
5694int s[1];
5695 int * $ac_kw t = s;
5696 t[0] = 0;
5697 return foo(t)
5698 ;
5699 return 0;
5700}
5701_ACEOF
81ecdfbb 5702if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5703 ac_cv_c_restrict=$ac_kw
783e057b 5704fi
81ecdfbb 5705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5706 test "$ac_cv_c_restrict" != no && break
5707 done
5708
5709fi
81ecdfbb
RW
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5711$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5712
5713 case $ac_cv_c_restrict in
5714 restrict) ;;
81ecdfbb 5715 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5716 ;;
5717 *) cat >>confdefs.h <<_ACEOF
5718#define restrict $ac_cv_c_restrict
5719_ACEOF
5720 ;;
5721 esac
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
f434ba03 5734
783e057b
DJ
5735 :
5736
5737
5738
5739
5740
5741
5742
f434ba03
PA
5743 if test $gl_cv_have_include_next = yes; then
5744 gl_cv_next_string_h='<'string.h'>'
5745 else
5746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5747$as_echo_n "checking absolute name of <string.h>... " >&6; }
5748if test "${gl_cv_next_string_h+set}" = set; then :
5749 $as_echo_n "(cached) " >&6
5750else
5751
5752 if test $ac_cv_header_string_h = yes; then
5753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754/* end confdefs.h. */
5755#include <string.h>
5756
5757_ACEOF
5758 case "$host_os" in
5759 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5760 *) gl_absname_cpp="$ac_cpp" ;;
5761 esac
5762 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5763 sed -n '\#/string.h#{
5764 s#.*"\(.*/string.h\)".*#\1#
5765 s#^/[^/]#//&#
5766 p
5767 q
5768 }'`'"'
5769 else
5770 gl_cv_next_string_h='<'string.h'>'
5771 fi
5772
5773fi
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5775$as_echo "$gl_cv_next_string_h" >&6; }
5776 fi
5777 NEXT_STRING_H=$gl_cv_next_string_h
5778
5779 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5780 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5781 gl_next_as_first_directive='<'string.h'>'
5782 else
5783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5784 gl_next_as_first_directive=$gl_cv_next_string_h
5785 fi
5786 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5787
5788
5789
5790
5791
5792 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5793 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5795$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5796if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5797 $as_echo_n "(cached) " >&6
5798else
5799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800/* end confdefs.h. */
5801#include <string.h>
5802
5803int
5804main ()
5805{
5806#undef $gl_func
5807 (void) $gl_func;
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812if ac_fn_c_try_compile "$LINENO"; then :
5813 eval "$as_gl_Symbol=yes"
5814else
5815 eval "$as_gl_Symbol=no"
5816fi
5817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5818fi
5819eval ac_res=\$$as_gl_Symbol
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5821$as_echo "$ac_res" >&6; }
5822 eval as_val=\$$as_gl_Symbol
5823 if test "x$as_val" = x""yes; then :
5824 cat >>confdefs.h <<_ACEOF
5825#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5826_ACEOF
5827
5828 eval ac_cv_have_decl_$gl_func=yes
5829fi
5830 done
5831
5832
5833
5834 GNULIB_BTOWC=0;
5835 GNULIB_WCTOB=0;
5836 GNULIB_MBSINIT=0;
5837 GNULIB_MBRTOWC=0;
5838 GNULIB_MBRLEN=0;
5839 GNULIB_MBSRTOWCS=0;
5840 GNULIB_MBSNRTOWCS=0;
5841 GNULIB_WCRTOMB=0;
5842 GNULIB_WCSRTOMBS=0;
5843 GNULIB_WCSNRTOMBS=0;
5844 GNULIB_WCWIDTH=0;
5845 HAVE_BTOWC=1;
5846 HAVE_MBSINIT=1;
5847 HAVE_MBRTOWC=1;
5848 HAVE_MBRLEN=1;
5849 HAVE_MBSRTOWCS=1;
5850 HAVE_MBSNRTOWCS=1;
5851 HAVE_WCRTOMB=1;
5852 HAVE_WCSRTOMBS=1;
5853 HAVE_WCSNRTOMBS=1;
5854 HAVE_DECL_WCTOB=1;
5855 HAVE_DECL_WCWIDTH=1;
5856 REPLACE_MBSTATE_T=0;
5857 REPLACE_BTOWC=0;
5858 REPLACE_WCTOB=0;
5859 REPLACE_MBSINIT=0;
5860 REPLACE_MBRTOWC=0;
5861 REPLACE_MBRLEN=0;
5862 REPLACE_MBSRTOWCS=0;
5863 REPLACE_MBSNRTOWCS=0;
5864 REPLACE_WCRTOMB=0;
5865 REPLACE_WCSRTOMBS=0;
5866 REPLACE_WCSNRTOMBS=0;
5867 REPLACE_WCWIDTH=0;
5868
5869
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5871$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5872if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5873 $as_echo_n "(cached) " >&6
783e057b 5874else
f434ba03
PA
5875 gl_cv_header_wchar_h_correct_inline=yes
5876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5877/* end confdefs.h. */
783e057b 5878
f434ba03
PA
5879 #define wcstod renamed_wcstod
5880#include <wchar.h>
5881extern int zero (void);
5882int main () { return zero(); }
5883
5884_ACEOF
5885 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5886 (eval $ac_compile) 2>&5
5887 ac_status=$?
5888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5889 test $ac_status = 0; }; then
5890 mv conftest.$ac_objext conftest1.$ac_objext
5891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5892/* end confdefs.h. */
f434ba03
PA
5893
5894 #define wcstod renamed_wcstod
5895#include <wchar.h>
5896int zero (void) { return 0; }
783e057b
DJ
5897
5898_ACEOF
f434ba03
PA
5899 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5900 (eval $ac_compile) 2>&5
5901 ac_status=$?
5902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5903 test $ac_status = 0; }; then
5904 mv conftest.$ac_objext conftest2.$ac_objext
5905 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5906 :
5907 else
5908 gl_cv_header_wchar_h_correct_inline=no
5909 fi
5910 fi
5911 fi
5912 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5913
5914fi
f434ba03
PA
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5916$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5917 if test $gl_cv_header_wchar_h_correct_inline = no; then
5918 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5919This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5920C99 mode. You have four options:
5921 - Add the flag -fgnu89-inline to CC and reconfigure, or
5922 - Fix your include files, using parts of
5923 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5924 - Use a gcc version older than 4.3, or
5925 - Don't use the flags -std=c99 or -std=gnu99.
5926Configuration aborted." "$LINENO" 5
5927 fi
783e057b
DJ
5928
5929
f434ba03
PA
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5931$as_echo_n "checking for wint_t... " >&6; }
5932if test "${gt_cv_c_wint_t+set}" = set; then :
5933 $as_echo_n "(cached) " >&6
5934else
5935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5936/* end confdefs.h. */
783e057b 5937
f434ba03
PA
5938/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5939 <wchar.h>.
5940 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5941 before <wchar.h>. */
5942#include <stddef.h>
5943#include <stdio.h>
5944#include <time.h>
5945#include <wchar.h>
5946 wint_t foo = (wchar_t)'\0';
5947int
5948main ()
5949{
783e057b 5950
f434ba03
PA
5951 ;
5952 return 0;
5953}
5954_ACEOF
5955if ac_fn_c_try_compile "$LINENO"; then :
5956 gt_cv_c_wint_t=yes
5957else
5958 gt_cv_c_wint_t=no
5959fi
5960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5961fi
5962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5963$as_echo "$gt_cv_c_wint_t" >&6; }
5964 if test $gt_cv_c_wint_t = yes; then
783e057b 5965
f434ba03 5966$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5967
f434ba03 5968 fi
783e057b
DJ
5969
5970
81ecdfbb 5971 if false; then
783e057b
DJ
5972 GL_COND_LIBTOOL_TRUE=
5973 GL_COND_LIBTOOL_FALSE='#'
5974else
5975 GL_COND_LIBTOOL_TRUE='#'
5976 GL_COND_LIBTOOL_FALSE=
5977fi
5978
5979 gl_cond_libtool=false
5980 gl_libdeps=
5981 gl_ltlibdeps=
f434ba03 5982 gl_m4_base='gnulib/m4'
783e057b
DJ
5983
5984
5985
783e057b
DJ
5986
5987
5988
5989
5990
5991
f434ba03
PA
5992 gl_source_base='gnulib'
5993 # Code from module arg-nonnull:
5994 # Code from module c++defs:
5995 # Code from module extensions:
5996 # Code from module include_next:
5997 # Code from module memchr:
783e057b 5998
783e057b 5999
783e057b 6000
783e057b 6001
f434ba03 6002 GNULIB_MEMCHR=1
783e057b 6003
783e057b 6004
783e057b 6005
f434ba03 6006$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6007
783e057b
DJ
6008
6009
f434ba03 6010 # Code from module memmem:
783e057b
DJ
6011
6012
f434ba03
PA
6013 if test $ac_cv_have_decl_memmem = yes; then
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6015$as_echo_n "checking whether memmem works in linear time... " >&6; }
6016if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6017 $as_echo_n "(cached) " >&6
783e057b 6018else
81ecdfbb 6019 if test "$cross_compiling" = yes; then :
f434ba03 6020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6021/* end confdefs.h. */
783e057b 6022
f434ba03
PA
6023#include <features.h>
6024#ifdef __GNU_LIBRARY__
6025 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6026 Lucky user
6027 #endif
6028#endif
6029#ifdef __CYGWIN__
6030 #include <cygwin/version.h>
6031 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6032 Lucky user
6033 #endif
6034#endif
783e057b 6035
783e057b 6036_ACEOF
f434ba03
PA
6037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6038 $EGREP "Lucky user" >/dev/null 2>&1; then :
6039 gl_cv_func_memmem_works=yes
783e057b 6040else
f434ba03 6041 gl_cv_func_memmem_works="guessing no"
783e057b 6042fi
f434ba03 6043rm -f conftest*
783e057b
DJ
6044
6045
783e057b 6046else
81ecdfbb 6047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6048/* end confdefs.h. */
6049
f434ba03 6050#include <signal.h> /* for signal */
783e057b
DJ
6051#include <string.h> /* for memmem */
6052#include <stdlib.h> /* for malloc */
6053#include <unistd.h> /* for alarm */
6054
6055int
6056main ()
6057{
6058size_t m = 1000000;
6059 char *haystack = (char *) malloc (2 * m + 1);
6060 char *needle = (char *) malloc (m + 1);
6061 void *result = 0;
6062 /* Failure to compile this test due to missing alarm is okay,
6063 since all such platforms (mingw) also lack memmem. */
f434ba03 6064 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6065 alarm (5);
6066 /* Check for quadratic performance. */
6067 if (haystack && needle)
6068 {
f434ba03
PA
6069 memset (haystack, 'A', 2 * m);
6070 haystack[2 * m] = 'B';
6071 memset (needle, 'A', m);
6072 needle[m] = 'B';
6073 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6074 }
6075 /* Check for empty needle behavior. */
6076 return !result || !memmem ("a", 1, 0, 0);
6077 ;
6078 return 0;
6079}
6080_ACEOF
81ecdfbb 6081if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6082 gl_cv_func_memmem_works=yes
6083else
81ecdfbb 6084 gl_cv_func_memmem_works=no
783e057b 6085fi
81ecdfbb
RW
6086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6087 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6088fi
81ecdfbb 6089
f434ba03 6090
783e057b 6091fi
81ecdfbb
RW
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6093$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6094 if test "$gl_cv_func_memmem_works" != yes; then
6095 REPLACE_MEMMEM=1
6096
6097
6098
6099
6100
6101
6102
f434ba03 6103
783e057b
DJ
6104 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6105
6106 fi
6107 fi
6108
f434ba03
PA
6109 # Code from module memmem-simple:
6110
783e057b
DJ
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
81ecdfbb
RW
6122 for ac_func in memmem
6123do :
6124 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6125if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6126 cat >>confdefs.h <<_ACEOF
81ecdfbb 6127#define HAVE_MEMMEM 1
783e057b
DJ
6128_ACEOF
6129
6130else
6131
6132 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6133
6134fi
6135done
6136
6137
6138
6139 :
6140
6141
6142
6143
6144
6145 if test $ac_cv_have_decl_memmem = no; then
6146 HAVE_DECL_MEMMEM=0
6147 fi
6148 :
6149
6150
6151
f434ba03 6152
783e057b
DJ
6153 GNULIB_MEMMEM=1
6154
6155
6156
f434ba03
PA
6157$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6158
6159
6160
6161 # Code from module multiarch:
6162
6163 # Code from module stddef:
6164
6165
6166
6167 if test $gt_cv_c_wchar_t = no; then
6168 HAVE_WCHAR_T=0
6169 STDDEF_H=stddef.h
6170 fi
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6172$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6173if test "${gl_cv_decl_null_works+set}" = set; then :
6174 $as_echo_n "(cached) " >&6
6175else
6176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6177/* end confdefs.h. */
6178#include <stddef.h>
6179 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6180
6181int
6182main ()
6183{
6184
6185 ;
6186 return 0;
6187}
6188_ACEOF
6189if ac_fn_c_try_compile "$LINENO"; then :
6190 gl_cv_decl_null_works=yes
6191else
6192 gl_cv_decl_null_works=no
6193fi
6194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6195fi
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6197$as_echo "$gl_cv_decl_null_works" >&6; }
6198 if test $gl_cv_decl_null_works = no; then
6199 REPLACE_NULL=1
6200 STDDEF_H=stddef.h
6201 fi
6202 if test -n "$STDDEF_H"; then
6203
6204
6205
6206
6207 :
6208
6209
6210
6211
6212
6213
6214
6215 if test $gl_cv_have_include_next = yes; then
6216 gl_cv_next_stddef_h='<'stddef.h'>'
6217 else
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6219$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6220if test "${gl_cv_next_stddef_h+set}" = set; then :
6221 $as_echo_n "(cached) " >&6
6222else
6223
6224 if test $ac_cv_header_stddef_h = yes; then
6225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226/* end confdefs.h. */
6227#include <stddef.h>
6228
6229_ACEOF
6230 case "$host_os" in
6231 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6232 *) gl_absname_cpp="$ac_cpp" ;;
6233 esac
6234 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6235 sed -n '\#/stddef.h#{
6236 s#.*"\(.*/stddef.h\)".*#\1#
6237 s#^/[^/]#//&#
6238 p
6239 q
6240 }'`'"'
6241 else
6242 gl_cv_next_stddef_h='<'stddef.h'>'
6243 fi
6244
6245fi
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6247$as_echo "$gl_cv_next_stddef_h" >&6; }
6248 fi
6249 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6250
6251 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6253 gl_next_as_first_directive='<'stddef.h'>'
6254 else
6255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6256 gl_next_as_first_directive=$gl_cv_next_stddef_h
6257 fi
6258 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6259
6260
6261
6262 fi
6263
6264 # Code from module stdint:
6265
6266
783e057b
DJ
6267
6268 if test $ac_cv_type_long_long_int = yes; then
6269 HAVE_LONG_LONG_INT=1
6270 else
6271 HAVE_LONG_LONG_INT=0
6272 fi
6273
6274
6275 if test $ac_cv_type_unsigned_long_long_int = yes; then
6276 HAVE_UNSIGNED_LONG_LONG_INT=1
6277 else
6278 HAVE_UNSIGNED_LONG_LONG_INT=0
6279 fi
6280
6281
6282 if test $ac_cv_header_inttypes_h = yes; then
6283 HAVE_INTTYPES_H=1
6284 else
6285 HAVE_INTTYPES_H=0
6286 fi
6287
6288
6289 if test $ac_cv_header_sys_types_h = yes; then
6290 HAVE_SYS_TYPES_H=1
6291 else
6292 HAVE_SYS_TYPES_H=0
6293 fi
6294
6295
6296
6297
6298
f434ba03 6299
783e057b
DJ
6300 :
6301
6302
6303
6304
6305
6306
6307
6308 if test $gl_cv_have_include_next = yes; then
6309 gl_cv_next_stdint_h='<'stdint.h'>'
6310 else
81ecdfbb
RW
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6312$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6313if test "${gl_cv_next_stdint_h+set}" = set; then :
6314 $as_echo_n "(cached) " >&6
783e057b
DJ
6315else
6316
f434ba03
PA
6317 if test $ac_cv_header_stdint_h = yes; then
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6319/* end confdefs.h. */
6320#include <stdint.h>
6321
6322_ACEOF
f434ba03
PA
6323 case "$host_os" in
6324 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6325 *) gl_absname_cpp="$ac_cpp" ;;
6326 esac
6327 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6328 sed -n '\#/stdint.h#{
6329 s#.*"\(.*/stdint.h\)".*#\1#
6330 s#^/[^/]#//&#
6331 p
6332 q
6333 }'`'"'
6334 else
6335 gl_cv_next_stdint_h='<'stdint.h'>'
6336 fi
783e057b
DJ
6337
6338fi
81ecdfbb
RW
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6340$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6341 fi
6342 NEXT_STDINT_H=$gl_cv_next_stdint_h
6343
f434ba03
PA
6344 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6346 gl_next_as_first_directive='<'stdint.h'>'
6347 else
6348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6349 gl_next_as_first_directive=$gl_cv_next_stdint_h
6350 fi
6351 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6352
783e057b
DJ
6353
6354
6355 if test $ac_cv_header_stdint_h = yes; then
6356 HAVE_STDINT_H=1
6357 else
6358 HAVE_STDINT_H=0
6359 fi
6360
6361
6362 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6364$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6365if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6366 $as_echo_n "(cached) " >&6
783e057b
DJ
6367else
6368 gl_cv_header_working_stdint_h=no
81ecdfbb 6369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6370/* end confdefs.h. */
6371
81ecdfbb 6372
783e057b
DJ
6373#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6374#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6375#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6376#include <stdint.h>
6377/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6378#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6379#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6380#endif
6381
6382
6383 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6384 included before <wchar.h>. */
6385 #include <stddef.h>
6386 #include <signal.h>
6387 #if HAVE_WCHAR_H
6388 # include <stdio.h>
6389 # include <time.h>
6390 # include <wchar.h>
6391 #endif
6392
6393
6394#ifdef INT8_MAX
6395int8_t a1 = INT8_MAX;
6396int8_t a1min = INT8_MIN;
6397#endif
6398#ifdef INT16_MAX
6399int16_t a2 = INT16_MAX;
6400int16_t a2min = INT16_MIN;
6401#endif
6402#ifdef INT32_MAX
6403int32_t a3 = INT32_MAX;
6404int32_t a3min = INT32_MIN;
6405#endif
6406#ifdef INT64_MAX
6407int64_t a4 = INT64_MAX;
6408int64_t a4min = INT64_MIN;
6409#endif
6410#ifdef UINT8_MAX
6411uint8_t b1 = UINT8_MAX;
6412#else
6413typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6414#endif
6415#ifdef UINT16_MAX
6416uint16_t b2 = UINT16_MAX;
6417#endif
6418#ifdef UINT32_MAX
6419uint32_t b3 = UINT32_MAX;
6420#endif
6421#ifdef UINT64_MAX
6422uint64_t b4 = UINT64_MAX;
6423#endif
6424int_least8_t c1 = INT8_C (0x7f);
6425int_least8_t c1max = INT_LEAST8_MAX;
6426int_least8_t c1min = INT_LEAST8_MIN;
6427int_least16_t c2 = INT16_C (0x7fff);
6428int_least16_t c2max = INT_LEAST16_MAX;
6429int_least16_t c2min = INT_LEAST16_MIN;
6430int_least32_t c3 = INT32_C (0x7fffffff);
6431int_least32_t c3max = INT_LEAST32_MAX;
6432int_least32_t c3min = INT_LEAST32_MIN;
6433int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6434int_least64_t c4max = INT_LEAST64_MAX;
6435int_least64_t c4min = INT_LEAST64_MIN;
6436uint_least8_t d1 = UINT8_C (0xff);
6437uint_least8_t d1max = UINT_LEAST8_MAX;
6438uint_least16_t d2 = UINT16_C (0xffff);
6439uint_least16_t d2max = UINT_LEAST16_MAX;
6440uint_least32_t d3 = UINT32_C (0xffffffff);
6441uint_least32_t d3max = UINT_LEAST32_MAX;
6442uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6443uint_least64_t d4max = UINT_LEAST64_MAX;
6444int_fast8_t e1 = INT_FAST8_MAX;
6445int_fast8_t e1min = INT_FAST8_MIN;
6446int_fast16_t e2 = INT_FAST16_MAX;
6447int_fast16_t e2min = INT_FAST16_MIN;
6448int_fast32_t e3 = INT_FAST32_MAX;
6449int_fast32_t e3min = INT_FAST32_MIN;
6450int_fast64_t e4 = INT_FAST64_MAX;
6451int_fast64_t e4min = INT_FAST64_MIN;
6452uint_fast8_t f1 = UINT_FAST8_MAX;
6453uint_fast16_t f2 = UINT_FAST16_MAX;
6454uint_fast32_t f3 = UINT_FAST32_MAX;
6455uint_fast64_t f4 = UINT_FAST64_MAX;
6456#ifdef INTPTR_MAX
6457intptr_t g = INTPTR_MAX;
6458intptr_t gmin = INTPTR_MIN;
6459#endif
6460#ifdef UINTPTR_MAX
6461uintptr_t h = UINTPTR_MAX;
6462#endif
6463intmax_t i = INTMAX_MAX;
6464uintmax_t j = UINTMAX_MAX;
6465
6466#include <limits.h> /* for CHAR_BIT */
6467#define TYPE_MINIMUM(t) \
6468 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6469#define TYPE_MAXIMUM(t) \
6470 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6471struct s {
6472 int check_PTRDIFF:
6473 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6474 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6475 ? 1 : -1;
6476 /* Detect bug in FreeBSD 6.0 / ia64. */
6477 int check_SIG_ATOMIC:
6478 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6479 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6480 ? 1 : -1;
6481 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6482 int check_WCHAR:
6483 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6484 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6485 ? 1 : -1;
6486 /* Detect bug in mingw. */
6487 int check_WINT:
6488 WINT_MIN == TYPE_MINIMUM (wint_t)
6489 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6490 ? 1 : -1;
6491
f434ba03
PA
6492 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6493 int check_UINT8_C:
6494 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6495 int check_UINT16_C:
6496 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6497
6498 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6499#ifdef UINT8_MAX
6500 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6501#endif
6502#ifdef UINT16_MAX
6503 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6504#endif
6505#ifdef UINT32_MAX
6506 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6507#endif
6508#ifdef UINT64_MAX
6509 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6510#endif
6511 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6512 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6513 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6514 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6515 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6516 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6517 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6518 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6519 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6520 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6521 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6522};
6523
6524int
6525main ()
6526{
6527
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532if ac_fn_c_try_compile "$LINENO"; then :
6533 if test "$cross_compiling" = yes; then :
6534 gl_cv_header_working_stdint_h=yes
6535
6536else
6537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6538/* end confdefs.h. */
6539
6540
6541#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6542#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6543#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6544#include <stdint.h>
6545
783e057b 6546
f434ba03
PA
6547 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6548 included before <wchar.h>. */
6549 #include <stddef.h>
6550 #include <signal.h>
6551 #if HAVE_WCHAR_H
6552 # include <stdio.h>
6553 # include <time.h>
6554 # include <wchar.h>
6555 #endif
6556
6557
6558#include <stdio.h>
6559#include <string.h>
6560#define MVAL(macro) MVAL1(macro)
6561#define MVAL1(expression) #expression
6562static const char *macro_values[] =
6563 {
6564#ifdef INT8_MAX
6565 MVAL (INT8_MAX),
6566#endif
6567#ifdef INT16_MAX
6568 MVAL (INT16_MAX),
6569#endif
6570#ifdef INT32_MAX
6571 MVAL (INT32_MAX),
6572#endif
6573#ifdef INT64_MAX
6574 MVAL (INT64_MAX),
6575#endif
783e057b 6576#ifdef UINT8_MAX
f434ba03 6577 MVAL (UINT8_MAX),
783e057b
DJ
6578#endif
6579#ifdef UINT16_MAX
f434ba03 6580 MVAL (UINT16_MAX),
783e057b
DJ
6581#endif
6582#ifdef UINT32_MAX
f434ba03 6583 MVAL (UINT32_MAX),
783e057b
DJ
6584#endif
6585#ifdef UINT64_MAX
f434ba03 6586 MVAL (UINT64_MAX),
783e057b 6587#endif
f434ba03
PA
6588 NULL
6589 };
783e057b
DJ
6590
6591int
6592main ()
6593{
6594
f434ba03
PA
6595 const char **mv;
6596 for (mv = macro_values; *mv != NULL; mv++)
6597 {
6598 const char *value = *mv;
6599 /* Test whether it looks like a cast expression. */
6600 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6601 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6602 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6603 || strncmp (value, "((int)"/*)*/, 6) == 0
6604 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6605 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6606 return 1;
6607 }
6608 return 0;
6609
783e057b
DJ
6610 ;
6611 return 0;
6612}
6613_ACEOF
f434ba03 6614if ac_fn_c_try_run "$LINENO"; then :
783e057b 6615 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6616fi
6617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6618 conftest.$ac_objext conftest.beam conftest.$ac_ext
6619fi
6620
6621
783e057b 6622fi
81ecdfbb 6623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6624
783e057b 6625fi
81ecdfbb
RW
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6627$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6628 fi
6629 if test "$gl_cv_header_working_stdint_h" = yes; then
6630 STDINT_H=
6631 else
81ecdfbb
RW
6632 for ac_header in sys/inttypes.h sys/bitypes.h
6633do :
6634 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6635ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6636eval as_val=\$$as_ac_Header
6637 if test "x$as_val" = x""yes; then :
783e057b 6638 cat >>confdefs.h <<_ACEOF
81ecdfbb 6639#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6640_ACEOF
6641
6642fi
6643
6644done
6645
6646 if test $ac_cv_header_sys_inttypes_h = yes; then
6647 HAVE_SYS_INTTYPES_H=1
6648 else
6649 HAVE_SYS_INTTYPES_H=0
6650 fi
6651
6652 if test $ac_cv_header_sys_bitypes_h = yes; then
6653 HAVE_SYS_BITYPES_H=1
6654 else
6655 HAVE_SYS_BITYPES_H=0
6656 fi
6657
6658
6659
6660 :
6661
6662
6663
6664
6665
6666
6667
6668
f434ba03
PA
6669 if test $APPLE_UNIVERSAL_BUILD = 0; then
6670
6671
6672 for gltype in ptrdiff_t size_t ; do
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6674$as_echo_n "checking for bit size of $gltype... " >&6; }
6675if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6679 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6680 included before <wchar.h>. */
6681 #include <stddef.h>
6682 #include <signal.h>
6683 #if HAVE_WCHAR_H
6684 # include <stdio.h>
6685 # include <time.h>
6686 # include <wchar.h>
6687 #endif
6688
6689#include <limits.h>"; then :
6690
6691else
6692 result=unknown
6693fi
6694
6695 eval gl_cv_bitsizeof_${gltype}=\$result
6696
6697fi
6698eval ac_res=\$gl_cv_bitsizeof_${gltype}
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6700$as_echo "$ac_res" >&6; }
6701 eval result=\$gl_cv_bitsizeof_${gltype}
6702 if test $result = unknown; then
6703 result=0
6704 fi
6705 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6706 cat >>confdefs.h <<_ACEOF
6707#define BITSIZEOF_${GLTYPE} $result
6708_ACEOF
6709
6710 eval BITSIZEOF_${GLTYPE}=\$result
6711 done
6712
6713
6714 fi
6715
783e057b 6716
f434ba03 6717 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6719$as_echo_n "checking for bit size of $gltype... " >&6; }
6720if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6721 $as_echo_n "(cached) " >&6
6722else
6723 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6724 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6725 included before <wchar.h>. */
6726 #include <stddef.h>
6727 #include <signal.h>
6728 #if HAVE_WCHAR_H
6729 # include <stdio.h>
6730 # include <time.h>
6731 # include <wchar.h>
6732 #endif
6733
6734#include <limits.h>"; then :
6735
6736else
6737 result=unknown
6738fi
6739
6740 eval gl_cv_bitsizeof_${gltype}=\$result
6741
6742fi
6743eval ac_res=\$gl_cv_bitsizeof_${gltype}
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6745$as_echo "$ac_res" >&6; }
6746 eval result=\$gl_cv_bitsizeof_${gltype}
6747 if test $result = unknown; then
6748 result=0
6749 fi
6750 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6751 cat >>confdefs.h <<_ACEOF
6752#define BITSIZEOF_${GLTYPE} $result
6753_ACEOF
783e057b 6754
81ecdfbb
RW
6755 eval BITSIZEOF_${GLTYPE}=\$result
6756 done
783e057b
DJ
6757
6758
6759
6760
81ecdfbb
RW
6761 for gltype in sig_atomic_t wchar_t wint_t ; do
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6763$as_echo_n "checking whether $gltype is signed... " >&6; }
6764if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6765 $as_echo_n "(cached) " >&6
783e057b 6766else
81ecdfbb 6767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6768/* end confdefs.h. */
6769
6770 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6771 included before <wchar.h>. */
6772 #include <stddef.h>
6773 #include <signal.h>
6774 #if HAVE_WCHAR_H
6775 # include <stdio.h>
6776 # include <time.h>
6777 # include <wchar.h>
6778 #endif
6779
6780 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6781int
6782main ()
6783{
6784
6785 ;
6786 return 0;
6787}
6788_ACEOF
81ecdfbb 6789if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6790 result=yes
6791else
81ecdfbb 6792 result=no
20e95c23 6793fi
81ecdfbb 6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6795 eval gl_cv_type_${gltype}_signed=\$result
6796
6797fi
81ecdfbb
RW
6798eval ac_res=\$gl_cv_type_${gltype}_signed
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6800$as_echo "$ac_res" >&6; }
783e057b
DJ
6801 eval result=\$gl_cv_type_${gltype}_signed
6802 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6803 if test "$result" = yes; then
6804 cat >>confdefs.h <<_ACEOF
6805#define HAVE_SIGNED_${GLTYPE} 1
6806_ACEOF
6807
6808 eval HAVE_SIGNED_${GLTYPE}=1
6809 else
6810 eval HAVE_SIGNED_${GLTYPE}=0
6811 fi
6812 done
6813
6814
6815 gl_cv_type_ptrdiff_t_signed=yes
6816 gl_cv_type_size_t_signed=no
f434ba03 6817 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6818
6819
f434ba03 6820 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6822$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6823if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6824 $as_echo_n "(cached) " >&6
c906108c 6825else
783e057b
DJ
6826 eval gl_cv_type_${gltype}_suffix=no
6827 eval result=\$gl_cv_type_${gltype}_signed
6828 if test "$result" = yes; then
6829 glsufu=
6830 else
6831 glsufu=u
6832 fi
6833 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6834 case $glsuf in
6835 '') gltype1='int';;
f434ba03
PA
6836 l) gltype1='long int';;
6837 ll) gltype1='long long int';;
6838 i64) gltype1='__int64';;
6839 u) gltype1='unsigned int';;
6840 ul) gltype1='unsigned long int';;
6841 ull) gltype1='unsigned long long int';;
783e057b
DJ
6842 ui64)gltype1='unsigned __int64';;
6843 esac
81ecdfbb 6844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6845/* end confdefs.h. */
6846
6847 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6848 included before <wchar.h>. */
6849 #include <stddef.h>
6850 #include <signal.h>
6851 #if HAVE_WCHAR_H
6852 # include <stdio.h>
6853 # include <time.h>
6854 # include <wchar.h>
6855 #endif
6856
6857 extern $gltype foo;
6858 extern $gltype1 foo;
6859int
6860main ()
6861{
6862
6863 ;
6864 return 0;
6865}
6866_ACEOF
81ecdfbb 6867if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6868 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6869fi
81ecdfbb 6870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6871 eval result=\$gl_cv_type_${gltype}_suffix
6872 test "$result" != no && break
6873 done
6874fi
81ecdfbb
RW
6875eval ac_res=\$gl_cv_type_${gltype}_suffix
6876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6877$as_echo "$ac_res" >&6; }
783e057b
DJ
6878 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6879 eval result=\$gl_cv_type_${gltype}_suffix
6880 test "$result" = no && result=
6881 eval ${GLTYPE}_SUFFIX=\$result
6882 cat >>confdefs.h <<_ACEOF
6883#define ${GLTYPE}_SUFFIX $result
6884_ACEOF
6885
6886 done
6887
6888
783e057b
DJ
6889 fi
6890
6891
f434ba03
PA
6892 for gltype in sig_atomic_t wchar_t wint_t ; do
6893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6894$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6895if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6896 $as_echo_n "(cached) " >&6
783e057b 6897else
f434ba03
PA
6898 eval gl_cv_type_${gltype}_suffix=no
6899 eval result=\$gl_cv_type_${gltype}_signed
6900 if test "$result" = yes; then
6901 glsufu=
6902 else
6903 glsufu=u
6904 fi
6905 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6906 case $glsuf in
6907 '') gltype1='int';;
6908 l) gltype1='long int';;
6909 ll) gltype1='long long int';;
6910 i64) gltype1='__int64';;
6911 u) gltype1='unsigned int';;
6912 ul) gltype1='unsigned long int';;
6913 ull) gltype1='unsigned long long int';;
6914 ui64)gltype1='unsigned __int64';;
6915 esac
6916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6917/* end confdefs.h. */
f434ba03
PA
6918
6919 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6920 included before <wchar.h>. */
6921 #include <stddef.h>
6922 #include <signal.h>
6923 #if HAVE_WCHAR_H
6924 # include <stdio.h>
6925 # include <time.h>
6926 # include <wchar.h>
6927 #endif
6928
6929 extern $gltype foo;
6930 extern $gltype1 foo;
6931int
6932main ()
6933{
6934
6935 ;
6936 return 0;
6937}
783e057b 6938_ACEOF
81ecdfbb 6939if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6940 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6941fi
81ecdfbb 6942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6943 eval result=\$gl_cv_type_${gltype}_suffix
6944 test "$result" != no && break
6945 done
783e057b 6946fi
f434ba03
PA
6947eval ac_res=\$gl_cv_type_${gltype}_suffix
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6949$as_echo "$ac_res" >&6; }
6950 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6951 eval result=\$gl_cv_type_${gltype}_suffix
6952 test "$result" = no && result=
6953 eval ${GLTYPE}_SUFFIX=\$result
6954 cat >>confdefs.h <<_ACEOF
6955#define ${GLTYPE}_SUFFIX $result
6956_ACEOF
6957
6958 done
6959
6960
6961
6962 STDINT_H=stdint.h
783e057b
DJ
6963 fi
6964
6965
f434ba03
PA
6966 # Code from module string:
6967
6968
6969
6970 # Code from module warn-on-use:
6971 # Code from module wchar:
6972
6973
6974
6975
783e057b
DJ
6976 :
6977
6978
6979
6980
6981
783e057b
DJ
6982
6983
6984
6985
6986 :
6987
6988
6989
6990
6991
6992
6993
6994 if test $gl_cv_have_include_next = yes; then
6995 gl_cv_next_wchar_h='<'wchar.h'>'
6996 else
81ecdfbb
RW
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6998$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6999if test "${gl_cv_next_wchar_h+set}" = set; then :
7000 $as_echo_n "(cached) " >&6
783e057b
DJ
7001else
7002
f434ba03
PA
7003 if test $ac_cv_header_wchar_h = yes; then
7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7005/* end confdefs.h. */
7006#include <wchar.h>
7007
7008_ACEOF
f434ba03
PA
7009 case "$host_os" in
7010 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7011 *) gl_absname_cpp="$ac_cpp" ;;
7012 esac
7013 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7014 sed -n '\#/wchar.h#{
7015 s#.*"\(.*/wchar.h\)".*#\1#
7016 s#^/[^/]#//&#
7017 p
7018 q
7019 }'`'"'
7020 else
7021 gl_cv_next_wchar_h='<'wchar.h'>'
7022 fi
783e057b
DJ
7023
7024fi
81ecdfbb
RW
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7026$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7027 fi
7028 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7029
f434ba03
PA
7030 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7031 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7032 gl_next_as_first_directive='<'wchar.h'>'
7033 else
7034 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7035 gl_next_as_first_directive=$gl_cv_next_wchar_h
7036 fi
7037 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7038
7039
7040
7041 if test $ac_cv_header_wchar_h = yes; then
7042 HAVE_WCHAR_H=1
7043 else
7044 HAVE_WCHAR_H=0
7045 fi
7046
7047
7048
7049 if test $gt_cv_c_wint_t = yes; then
7050 HAVE_WINT_T=1
7051 else
7052 HAVE_WINT_T=0
7053 fi
7054
7055
7056
7057 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7058 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7060$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7061if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7062 $as_echo_n "(cached) " >&6
7063else
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065/* end confdefs.h. */
7066
7067/* Some systems require additional headers. */
7068#ifndef __GLIBC__
7069# include <stddef.h>
7070# include <stdio.h>
7071# include <time.h>
7072#endif
7073#include <wchar.h>
7074
7075int
7076main ()
7077{
7078#undef $gl_func
7079 (void) $gl_func;
7080 ;
7081 return 0;
7082}
7083_ACEOF
7084if ac_fn_c_try_compile "$LINENO"; then :
7085 eval "$as_gl_Symbol=yes"
7086else
7087 eval "$as_gl_Symbol=no"
7088fi
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090fi
7091eval ac_res=\$$as_gl_Symbol
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7093$as_echo "$ac_res" >&6; }
7094 eval as_val=\$$as_gl_Symbol
7095 if test "x$as_val" = x""yes; then :
7096 cat >>confdefs.h <<_ACEOF
7097#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7098_ACEOF
7099
7100 eval ac_cv_have_decl_$gl_func=yes
7101fi
7102 done
7103
7104
7105 # Code from module dummy:
7106 # End of code from modules
7107
7108
c906108c 7109
c906108c 7110
c906108c 7111
c906108c 7112
c906108c 7113
c906108c 7114
c906108c 7115
783e057b
DJ
7116 gltests_libdeps=
7117 gltests_ltlibdeps=
20e95c23 7118
20e95c23 7119
20e95c23 7120
f434ba03
PA
7121
7122
7123
7124
7125
7126
783e057b 7127 gl_source_base='tests'
f434ba03
PA
7128 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
7129
7130 gl_module_indicator_condition=$gltests_WITNESS
7131
7132
7133
7134
7135
c906108c 7136
bec39cab 7137
bec39cab 7138
783e057b
DJ
7139
7140 LIBGNU_LIBDEPS="$gl_libdeps"
7141
7142 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7143
7144
e28b3332 7145
d5af19ba
DJ
7146# For Makefile dependencies.
7147GNULIB_STDINT_H=
7148if test x"$STDINT_H" != x; then
7149 GNULIB_STDINT_H=gnulib/$STDINT_H
7150fi
7151
7152
bec39cab
AC
7153PACKAGE=gdb
7154
7155cat >>confdefs.h <<_ACEOF
7156#define PACKAGE "$PACKAGE"
7157_ACEOF
7158
7159
7160
5048e516
JK
7161# Do we have a single-tree copy of texinfo? Even if we do, we can't
7162# rely on it - libiberty is built before texinfo.
7163# Extract the first word of "makeinfo", so it can be a program name with args.
7164set dummy makeinfo; ac_word=$2
7165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7166$as_echo_n "checking for $ac_word... " >&6; }
7167if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7168 $as_echo_n "(cached) " >&6
7169else
7170 if test -n "$MAKEINFO"; then
7171 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7172else
7173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7174for as_dir in $PATH
7175do
7176 IFS=$as_save_IFS
7177 test -z "$as_dir" && as_dir=.
7178 for ac_exec_ext in '' $ac_executable_extensions; do
7179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7180 ac_cv_prog_MAKEINFO="makeinfo"
7181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7182 break 2
7183 fi
7184done
7185 done
7186IFS=$as_save_IFS
7187
7188fi
7189fi
7190MAKEINFO=$ac_cv_prog_MAKEINFO
7191if test -n "$MAKEINFO"; then
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7193$as_echo "$MAKEINFO" >&6; }
7194else
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7196$as_echo "no" >&6; }
7197fi
7198
7199
7200if test "x$MAKEINFO" = "x"; then
7201 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7202else
7203 case "$MAKEINFO" in
7204 */missing\ makeinfo*)
7205 as_fn_error "makeinfo is required for compilation" "$LINENO" 5
7206 ;;
7207 esac
7208fi
7209
7210
7211# --split-size=5000000 may be already in $MAKEINFO from parent configure.
7212# Re-running configure in gdb/ would lose it so ensure it stays present.
7213MAKEINFOFLAGS=${MAKEINFOFLAGS---split-size=5000000}
7214
7215
7216MAKEINFO_EXTRA_FLAGS=""
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7218$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7219if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7220 $as_echo_n "(cached) " >&6
7221else
7222 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7223 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7224 gdb_cv_have_makeinfo_click=yes
7225 else
7226 gdb_cv_have_makeinfo_click=no
7227 fi
7228fi
7229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7230$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7231if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7232 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7233fi
7234
7235
e28b3332
DJ
7236# GDB does not use automake, but gnulib does. This line lets us
7237# generate its Makefile.in.
81ecdfbb
RW
7238am__api_version='1.11'
7239
e28b3332
DJ
7240# Find a good install program. We prefer a C program (faster),
7241# so one script is as good as another. But avoid the broken or
7242# incompatible versions:
7243# SysV /etc/install, /usr/sbin/install
7244# SunOS /usr/etc/install
7245# IRIX /sbin/install
7246# AIX /bin/install
7247# AmigaOS /C/install, which installs bootblocks on floppy discs
7248# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7249# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7250# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7251# OS/2's system install, which has a completely different semantic
7252# ./install, which can be erroneously created by make from ./install.sh.
85541719 7253# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7255$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7256if test -z "$INSTALL"; then
81ecdfbb
RW
7257if test "${ac_cv_path_install+set}" = set; then :
7258 $as_echo_n "(cached) " >&6
e28b3332
DJ
7259else
7260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261for as_dir in $PATH
7262do
7263 IFS=$as_save_IFS
7264 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7265 # Account for people who put trailing slashes in PATH elements.
7266case $as_dir/ in #((
7267 ./ | .// | /[cC]/* | \
e28b3332 7268 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7269 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7270 /usr/ucb/* ) ;;
7271 *)
7272 # OSF1 and SCO ODT 3.0 have their own names for install.
7273 # Don't use installbsd from OSF since it installs stuff as root
7274 # by default.
7275 for ac_prog in ginstall scoinst install; do
7276 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7277 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7278 if test $ac_prog = install &&
7279 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7280 # AIX install. It has an incompatible calling convention.
7281 :
7282 elif test $ac_prog = install &&
7283 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7284 # program-specific install script used by HP pwplus--don't use.
7285 :
7286 else
85541719
DE
7287 rm -rf conftest.one conftest.two conftest.dir
7288 echo one > conftest.one
7289 echo two > conftest.two
7290 mkdir conftest.dir
7291 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7292 test -s conftest.one && test -s conftest.two &&
7293 test -s conftest.dir/conftest.one &&
7294 test -s conftest.dir/conftest.two
7295 then
7296 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7297 break 3
7298 fi
e28b3332
DJ
7299 fi
7300 fi
7301 done
7302 done
7303 ;;
7304esac
81ecdfbb
RW
7305
7306 done
7307IFS=$as_save_IFS
e28b3332 7308
85541719 7309rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7310
7311fi
7312 if test "${ac_cv_path_install+set}" = set; then
7313 INSTALL=$ac_cv_path_install
7314 else
85541719
DE
7315 # As a last resort, use the slow shell script. Don't cache a
7316 # value for INSTALL within a source directory, because that will
e28b3332 7317 # break other packages using the cache if that directory is
85541719 7318 # removed, or if the value is a relative name.
e28b3332
DJ
7319 INSTALL=$ac_install_sh
7320 fi
7321fi
81ecdfbb
RW
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7323$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7324
7325# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7326# It thinks the first close brace ends the variable substitution.
7327test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7328
7329test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7330
7331test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7332
81ecdfbb
RW
7333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7334$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7335# Just in case
7336sleep 1
7337echo timestamp > conftest.file
81ecdfbb
RW
7338# Reject unsafe characters in $srcdir or the absolute working directory
7339# name. Accept space and tab only in the latter.
7340am_lf='
7341'
7342case `pwd` in
7343 *[\\\"\#\$\&\'\`$am_lf]*)
7344 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7345esac
7346case $srcdir in
7347 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7348 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7349esac
7350
e28b3332
DJ
7351# Do `set' in a subshell so we don't clobber the current shell's
7352# arguments. Must try -L first in case configure is actually a
7353# symlink; some systems play weird games with the mod time of symlinks
7354# (eg FreeBSD returns the mod time of the symlink's containing
7355# directory).
7356if (
81ecdfbb 7357 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7358 if test "$*" = "X"; then
7359 # -L didn't work.
81ecdfbb 7360 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7361 fi
7362 rm -f conftest.file
7363 if test "$*" != "X $srcdir/configure conftest.file" \
7364 && test "$*" != "X conftest.file $srcdir/configure"; then
7365
7366 # If neither matched, then we have a broken ls. This can happen
7367 # if, for instance, CONFIG_SHELL is bash and it inherits a
7368 # broken ls alias from the environment. This has actually
7369 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7370 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7371alias in your environment" "$LINENO" 5
e28b3332
DJ
7372 fi
7373
7374 test "$2" = conftest.file
7375 )
7376then
7377 # Ok.
7378 :
7379else
81ecdfbb
RW
7380 as_fn_error "newly created file is older than distributed files!
7381Check your system clock" "$LINENO" 5
e28b3332 7382fi
81ecdfbb
RW
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7384$as_echo "yes" >&6; }
e28b3332 7385test "$program_prefix" != NONE &&
81ecdfbb 7386 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7387# Use a double $ so make ignores it.
7388test "$program_suffix" != NONE &&
81ecdfbb
RW
7389 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7390# Double any \ or $.
e28b3332 7391# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7392ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7393program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7394
7395# expand $ac_aux_dir to an absolute path
7396am_aux_dir=`cd $ac_aux_dir && pwd`
7397
81ecdfbb
RW
7398if test x"${MISSING+set}" != xset; then
7399 case $am_aux_dir in
7400 *\ * | *\ *)
7401 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7402 *)
7403 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7404 esac
7405fi
e28b3332
DJ
7406# Use eval to expand $SHELL
7407if eval "$MISSING --run true"; then
7408 am_missing_run="$MISSING --run "
7409else
7410 am_missing_run=
81ecdfbb
RW
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7412$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7413fi
7414
7415if test x"${install_sh}" != xset; then
7416 case $am_aux_dir in
7417 *\ * | *\ *)
7418 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7419 *)
7420 install_sh="\${SHELL} $am_aux_dir/install-sh"
7421 esac
7422fi
7423
7424# Installed binaries are usually stripped using `strip' when the user
7425# run `make install-strip'. However `strip' might not be the right
7426# tool to use in cross-compilation environments, therefore Automake
7427# will honor the `STRIP' environment variable to overrule this program.
7428if test "$cross_compiling" != no; then
7429 if test -n "$ac_tool_prefix"; then
7430 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7431set dummy ${ac_tool_prefix}strip; ac_word=$2
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433$as_echo_n "checking for $ac_word... " >&6; }
7434if test "${ac_cv_prog_STRIP+set}" = set; then :
7435 $as_echo_n "(cached) " >&6
7436else
7437 if test -n "$STRIP"; then
7438 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7439else
7440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441for as_dir in $PATH
7442do
7443 IFS=$as_save_IFS
7444 test -z "$as_dir" && as_dir=.
7445 for ac_exec_ext in '' $ac_executable_extensions; do
7446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7447 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7449 break 2
7450 fi
7451done
7452 done
7453IFS=$as_save_IFS
7454
7455fi
7456fi
7457STRIP=$ac_cv_prog_STRIP
7458if test -n "$STRIP"; then
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7460$as_echo "$STRIP" >&6; }
7461else
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463$as_echo "no" >&6; }
7464fi
7465
7466
7467fi
7468if test -z "$ac_cv_prog_STRIP"; then
7469 ac_ct_STRIP=$STRIP
7470 # Extract the first word of "strip", so it can be a program name with args.
7471set dummy strip; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7475 $as_echo_n "(cached) " >&6
7476else
7477 if test -n "$ac_ct_STRIP"; then
7478 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7479else
7480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483 IFS=$as_save_IFS
7484 test -z "$as_dir" && as_dir=.
7485 for ac_exec_ext in '' $ac_executable_extensions; do
7486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7487 ac_cv_prog_ac_ct_STRIP="strip"
7488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489 break 2
7490 fi
7491done
7492 done
7493IFS=$as_save_IFS
7494
7495fi
7496fi
7497ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7498if test -n "$ac_ct_STRIP"; then
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7500$as_echo "$ac_ct_STRIP" >&6; }
7501else
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506 if test "x$ac_ct_STRIP" = x; then
7507 STRIP=":"
7508 else
7509 case $cross_compiling:$ac_tool_warned in
7510yes:)
7511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7513ac_tool_warned=yes ;;
7514esac
7515 STRIP=$ac_ct_STRIP
7516 fi
7517else
7518 STRIP="$ac_cv_prog_STRIP"
7519fi
7520
7521fi
7522INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7523
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7525$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7526if test -z "$MKDIR_P"; then
7527 if test "${ac_cv_path_mkdir+set}" = set; then :
7528 $as_echo_n "(cached) " >&6
7529else
7530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7532do
7533 IFS=$as_save_IFS
7534 test -z "$as_dir" && as_dir=.
7535 for ac_prog in mkdir gmkdir; do
7536 for ac_exec_ext in '' $ac_executable_extensions; do
7537 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7538 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7539 'mkdir (GNU coreutils) '* | \
7540 'mkdir (coreutils) '* | \
7541 'mkdir (fileutils) '4.1*)
7542 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7543 break 3;;
7544 esac
7545 done
7546 done
e28b3332 7547 done
81ecdfbb
RW
7548IFS=$as_save_IFS
7549
7550fi
7551
7552 if test "${ac_cv_path_mkdir+set}" = set; then
7553 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7554 else
81ecdfbb
RW
7555 # As a last resort, use the slow shell script. Don't cache a
7556 # value for MKDIR_P within a source directory, because that will
7557 # break other packages using the cache if that directory is
7558 # removed, or if the value is a relative name.
7559 test -d ./--version && rmdir ./--version
7560 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7561 fi
7562fi
81ecdfbb
RW
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7564$as_echo "$MKDIR_P" >&6; }
7565
f434ba03 7566
81ecdfbb
RW
7567mkdir_p="$MKDIR_P"
7568case $mkdir_p in
7569 [\\/$]* | ?:[\\/]*) ;;
7570 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7571esac
e28b3332
DJ
7572
7573for ac_prog in gawk mawk nawk awk
7574do
7575 # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if test "${ac_cv_prog_AWK+set}" = set; then :
7580 $as_echo_n "(cached) " >&6
e28b3332
DJ
7581else
7582 if test -n "$AWK"; then
7583 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7584else
7585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588 IFS=$as_save_IFS
7589 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7590 for ac_exec_ext in '' $ac_executable_extensions; do
7591 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7592 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7594 break 2
7595 fi
7596done
81ecdfbb
RW
7597 done
7598IFS=$as_save_IFS
e28b3332
DJ
7599
7600fi
7601fi
7602AWK=$ac_cv_prog_AWK
7603if test -n "$AWK"; then
81ecdfbb
RW
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7605$as_echo "$AWK" >&6; }
e28b3332 7606else
81ecdfbb
RW
7607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
e28b3332
DJ
7609fi
7610
81ecdfbb 7611
e28b3332
DJ
7612 test -n "$AWK" && break
7613done
7614
81ecdfbb 7615ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7616
7617
7618am_make=${MAKE-make}
7619cat > confinc << 'END'
7620am__doit:
81ecdfbb 7621 @echo this is the am__doit target
e28b3332
DJ
7622.PHONY: am__doit
7623END
7624# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7626$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7627am__include="#"
7628am__quote=
7629_am_result=none
7630# First try GNU make style include.
7631echo "include confinc" > confmf
81ecdfbb
RW
7632# Ignore all kinds of additional output from `make'.
7633case `$am_make -s -f confmf 2> /dev/null` in #(
7634*the\ am__doit\ target*)
7635 am__include=include
7636 am__quote=
7637 _am_result=GNU
7638 ;;
7639esac
e28b3332
DJ
7640# Now try BSD make style include.
7641if test "$am__include" = "#"; then
7642 echo '.include "confinc"' > confmf
81ecdfbb
RW
7643 case `$am_make -s -f confmf 2> /dev/null` in #(
7644 *the\ am__doit\ target*)
7645 am__include=.include
7646 am__quote="\""
7647 _am_result=BSD
7648 ;;
7649 esac
e28b3332
DJ
7650fi
7651
7652
81ecdfbb
RW
7653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7654$as_echo "$_am_result" >&6; }
e28b3332
DJ
7655rm -f confinc confmf
7656
81ecdfbb
RW
7657# Check whether --enable-dependency-tracking was given.
7658if test "${enable_dependency_tracking+set}" = set; then :
7659 enableval=$enable_dependency_tracking;
7660fi
e28b3332 7661
e28b3332
DJ
7662if test "x$enable_dependency_tracking" != xno; then
7663 am_depcomp="$ac_aux_dir/depcomp"
7664 AMDEPBACKSLASH='\'
7665fi
81ecdfbb 7666 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7667 AMDEP_TRUE=
7668 AMDEP_FALSE='#'
7669else
7670 AMDEP_TRUE='#'
7671 AMDEP_FALSE=
7672fi
7673
7674
81ecdfbb
RW
7675if test "`cd $srcdir && pwd`" != "`pwd`"; then
7676 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7677 # is not polluted with repeated "-I."
7678 am__isrc=' -I$(srcdir)'
7679 # test to see if srcdir already configured
7680 if test -f $srcdir/config.status; then
7681 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7682 fi
e28b3332
DJ
7683fi
7684
7685# test whether we have cygpath
7686if test -z "$CYGPATH_W"; then
7687 if (cygpath --version) >/dev/null 2>/dev/null; then
7688 CYGPATH_W='cygpath -w'
7689 else
7690 CYGPATH_W=echo
7691 fi
7692fi
7693
7694
7695# Define the identity of the package.
7696 PACKAGE=gdb
7697 VERSION=UNUSED-VERSION
7698
7699
7700# Some tools Automake needs.
7701
7702ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7703
7704
7705AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7706
7707
7708AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7709
7710
7711AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7712
7713
7714MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7715
e28b3332
DJ
7716# We need awk for the "check" target. The system "awk" is bad on
7717# some platforms.
7718# Always define AMTAR for backward compatibility.
7719
7720AMTAR=${AMTAR-"${am_missing_run}tar"}
7721
7722am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7723
7724
7725
7726
7727depcc="$CC" am_compiler_list=
7728
81ecdfbb
RW
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7730$as_echo_n "checking dependency style of $depcc... " >&6; }
7731if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7732 $as_echo_n "(cached) " >&6
e28b3332
DJ
7733else
7734 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7735 # We make a subdir and do the tests there. Otherwise we can end up
7736 # making bogus files that we don't know about and never remove. For
7737 # instance it was reported that on HP-UX the gcc test will end up
7738 # making a dummy file named `D' -- because `-MD' means `put the output
7739 # in D'.
7740 mkdir conftest.dir
7741 # Copy depcomp to subdir because otherwise we won't find it if we're
7742 # using a relative directory.
7743 cp "$am_depcomp" conftest.dir
7744 cd conftest.dir
7745 # We will build objects and dependencies in a subdirectory because
7746 # it helps to detect inapplicable dependency modes. For instance
7747 # both Tru64's cc and ICC support -MD to output dependencies as a
7748 # side effect of compilation, but ICC will put the dependencies in
7749 # the current directory while Tru64 will put them in the object
7750 # directory.
7751 mkdir sub
7752
7753 am_cv_CC_dependencies_compiler_type=none
7754 if test "$am_compiler_list" = ""; then
7755 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7756 fi
81ecdfbb
RW
7757 am__universal=false
7758 case " $depcc " in #(
7759 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7760 esac
7761
e28b3332
DJ
7762 for depmode in $am_compiler_list; do
7763 # Setup a source with many dependencies, because some compilers
7764 # like to wrap large dependency lists on column 80 (with \), and
7765 # we should not choose a depcomp mode which is confused by this.
7766 #
7767 # We need to recreate these files for each test, as the compiler may
7768 # overwrite some of them when testing with obscure command lines.
7769 # This happens at least with the AIX C compiler.
7770 : > sub/conftest.c
7771 for i in 1 2 3 4 5 6; do
7772 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7773 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7774 # Solaris 8's {/usr,}/bin/sh.
7775 touch sub/conftst$i.h
7776 done
7777 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7778
81ecdfbb
RW
7779 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7780 # mode. It turns out that the SunPro C++ compiler does not properly
7781 # handle `-M -o', and we need to detect this. Also, some Intel
7782 # versions had trouble with output in subdirs
7783 am__obj=sub/conftest.${OBJEXT-o}
7784 am__minus_obj="-o $am__obj"
e28b3332 7785 case $depmode in
81ecdfbb
RW
7786 gcc)
7787 # This depmode causes a compiler race in universal mode.
7788 test "$am__universal" = false || continue
7789 ;;
e28b3332
DJ
7790 nosideeffect)
7791 # after this tag, mechanisms are not by side-effect, so they'll
7792 # only be used when explicitly requested
7793 if test "x$enable_dependency_tracking" = xyes; then
7794 continue
7795 else
7796 break
7797 fi
7798 ;;
81ecdfbb
RW
7799 msvisualcpp | msvcmsys)
7800 # This compiler won't grok `-c -o', but also, the minuso test has
7801 # not run yet. These depmodes are late enough in the game, and
7802 # so weak that their functioning should not be impacted.
7803 am__obj=conftest.${OBJEXT-o}
7804 am__minus_obj=
7805 ;;
e28b3332
DJ
7806 none) break ;;
7807 esac
e28b3332 7808 if depmode=$depmode \
81ecdfbb 7809 source=sub/conftest.c object=$am__obj \
e28b3332 7810 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7811 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7812 >/dev/null 2>conftest.err &&
81ecdfbb 7813 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7814 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7815 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7816 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7817 # icc doesn't choke on unknown options, it will just issue warnings
7818 # or remarks (even with -Werror). So we grep stderr for any message
7819 # that says an option was ignored or not supported.
7820 # When given -MP, icc 7.0 and 7.1 complain thusly:
7821 # icc: Command line warning: ignoring option '-M'; no argument required
7822 # The diagnosis changed in icc 8.0:
7823 # icc: Command line remark: option '-MP' not supported
7824 if (grep 'ignoring option' conftest.err ||
7825 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7826 am_cv_CC_dependencies_compiler_type=$depmode
7827 break
7828 fi
7829 fi
7830 done
7831
7832 cd ..
7833 rm -rf conftest.dir
7834else
7835 am_cv_CC_dependencies_compiler_type=none
7836fi
7837
7838fi
81ecdfbb
RW
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7840$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7841CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7842
81ecdfbb 7843 if
e28b3332
DJ
7844 test "x$enable_dependency_tracking" != xno \
7845 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7846 am__fastdepCC_TRUE=
7847 am__fastdepCC_FALSE='#'
7848else
7849 am__fastdepCC_TRUE='#'
7850 am__fastdepCC_FALSE=
7851fi
7852
7853
7854
7855
bec39cab
AC
7856
7857
81ecdfbb
RW
7858# Check whether --with-separate-debug-dir was given.
7859if test "${with_separate_debug_dir+set}" = set; then :
7860 withval=$with_separate_debug_dir;
b14b1491
TT
7861 DEBUGDIR=$withval
7862else
7863 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7864fi
7865
20e95c23 7866
783e057b
DJ
7867 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7869 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7870 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7871
783e057b
DJ
7872cat >>confdefs.h <<_ACEOF
7873#define DEBUGDIR "$ac_define_dir"
20e95c23 7874_ACEOF
20e95c23 7875
20e95c23 7876
20e95c23 7877
0c4a4063 7878
b14b1491
TT
7879 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7880 if test "x$prefix" = xNONE; then
7881 test_prefix=/usr/local
7882 else
7883 test_prefix=$prefix
7884 fi
783e057b 7885 else
b14b1491 7886 test_prefix=$exec_prefix
783e057b 7887 fi
b14b1491
TT
7888 value=0
7889 case ${ac_define_dir} in
7890 "${test_prefix}"|"${test_prefix}/"*|\
7891 '${exec_prefix}'|'${exec_prefix}/'*)
7892 value=1
7893 ;;
7894 esac
7895
7896cat >>confdefs.h <<_ACEOF
7897#define DEBUGDIR_RELOCATABLE $value
7898_ACEOF
7899
7900
7901
0c4a4063 7902
b14b1491
TT
7903# GDB's datadir relocation
7904
7905
7906
81ecdfbb
RW
7907# Check whether --with-gdb-datadir was given.
7908if test "${with_gdb_datadir+set}" = set; then :
7909 withval=$with_gdb_datadir;
b14b1491 7910 GDB_DATADIR=$withval
20e95c23 7911else
b14b1491 7912 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7913fi
7914
20e95c23 7915
b14b1491
TT
7916 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7917 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7918 ac_define_dir=`eval echo $GDB_DATADIR`
7919 ac_define_dir=`eval echo $ac_define_dir`
7920
7921cat >>confdefs.h <<_ACEOF
7922#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7923_ACEOF
7924
b14b1491
TT
7925
7926
0c4a4063 7927
b14b1491
TT
7928 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7929 if test "x$prefix" = xNONE; then
7930 test_prefix=/usr/local
7931 else
7932 test_prefix=$prefix
7933 fi
7934 else
7935 test_prefix=$exec_prefix
7936 fi
7937 value=0
7938 case ${ac_define_dir} in
7939 "${test_prefix}"|"${test_prefix}/"*|\
7940 '${exec_prefix}'|'${exec_prefix}/'*)
7941 value=1
7942 ;;
7943 esac
7944
7945cat >>confdefs.h <<_ACEOF
7946#define GDB_DATADIR_RELOCATABLE $value
7947_ACEOF
7948
7949
783e057b 7950
20e95c23 7951
0c4a4063 7952
81ecdfbb
RW
7953# Check whether --with-relocated-sources was given.
7954if test "${with_relocated_sources+set}" = set; then :
7955 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7956
7957 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7958 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7959 ac_define_dir=`eval echo $reloc_srcdir`
7960 ac_define_dir=`eval echo $ac_define_dir`
7961
7962cat >>confdefs.h <<_ACEOF
7963#define RELOC_SRCDIR "$ac_define_dir"
7964_ACEOF
7965
7966
7967
81ecdfbb
RW
7968fi
7969
29b0e8a2
JM
7970
7971
20e95c23 7972
5ae98d25 7973subdirs="$subdirs testsuite"
20e95c23
DJ
7974
7975
783e057b 7976# Check whether to support alternative target configurations
81ecdfbb
RW
7977# Check whether --enable-targets was given.
7978if test "${enable_targets+set}" = set; then :
7979 enableval=$enable_targets; case "${enableval}" in
7980 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7981 ;;
7982 no) enable_targets= ;;
7983 *) enable_targets=$enableval ;;
7984esac
81ecdfbb
RW
7985fi
7986
20e95c23 7987
783e057b 7988# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7989# Check whether --enable-64-bit-bfd was given.
7990if test "${enable_64_bit_bfd+set}" = set; then :
7991 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7992 yes) want64=true ;;
7993 no) want64=false ;;
81ecdfbb 7994 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7995esac
7996else
7997 want64=false
81ecdfbb
RW
7998fi
7999
783e057b
DJ
8000# Provide defaults for some variables set by the per-host and per-target
8001# configuration.
8002gdb_host_obs=posix-hdep.o
20e95c23 8003
783e057b
DJ
8004if test "${target}" = "${host}"; then
8005 gdb_native=yes
8006else
8007 gdb_native=no
8008fi
20e95c23 8009
783e057b 8010. $srcdir/configure.host
20e95c23 8011
783e057b 8012# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 8013
783e057b
DJ
8014TARGET_OBS=
8015all_targets=
20e95c23 8016
783e057b 8017for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 8018do
783e057b
DJ
8019 if test "$targ_alias" = "all"; then
8020 all_targets=true
8021 else
8022 # Canonicalize the secondary target names.
8023 result=`$ac_config_sub $targ_alias 2>/dev/null`
8024 if test -n "$result"; then
8025 targ=$result
8026 else
8027 targ=$targ_alias
8028 fi
20e95c23 8029
783e057b 8030 . ${srcdir}/configure.tgt
20e95c23 8031
bf307134
JB
8032 if test -z "${gdb_target_obs}"; then :
8033 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8034fi
8035
783e057b
DJ
8036 # Target-specific object files
8037 for i in ${gdb_target_obs}; do
8038 case " $TARGET_OBS " in
8039 *" ${i} "*) ;;
8040 *)
8041 TARGET_OBS="$TARGET_OBS ${i}"
8042 ;;
8043 esac
8044 done
20e95c23 8045
783e057b
DJ
8046 # Check whether this target needs 64-bit CORE_ADDR
8047 if test x${want64} = xfalse; then
8048 . ${srcdir}/../bfd/config.bfd
8049 fi
8050 fi
20e95c23
DJ
8051done
8052
783e057b
DJ
8053if test x${all_targets} = xtrue; then
8054
8055 # We want all 64-bit targets if we either:
8056 # - run on a 64-bit host or
8057 # - already require 64-bit support for some other target or
8058 # - the --enable-64-bit-bfd option was supplied
8059 # Otherwise we only support all 32-bit targets.
8060 #
8061 # NOTE: This test must be in sync with the corresponding
8062 # tests in BFD!
20e95c23 8063
783e057b 8064 if test x${want64} = xfalse; then
81ecdfbb
RW
8065 # The cast to long int works around a bug in the HP C Compiler
8066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8068# This bug is HP SR number 8606223364.
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8070$as_echo_n "checking size of long... " >&6; }
8071if test "${ac_cv_sizeof_long+set}" = set; then :
8072 $as_echo_n "(cached) " >&6
c0993dbe 8073else
81ecdfbb 8074 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8075
81ecdfbb
RW
8076else
8077 if test "$ac_cv_type_long" = yes; then
8078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8080{ as_fn_set_status 77
8081as_fn_error "cannot compute sizeof (long)
8082See \`config.log' for more details." "$LINENO" 5; }; }
8083 else
8084 ac_cv_sizeof_long=0
8085 fi
c0993dbe 8086fi
81ecdfbb 8087
c0993dbe 8088fi
81ecdfbb
RW
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8090$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8091
c0993dbe 8092
c0993dbe 8093
c0993dbe
UW
8094cat >>confdefs.h <<_ACEOF
8095#define SIZEOF_LONG $ac_cv_sizeof_long
8096_ACEOF
8097
8098
8099 if test "x${ac_cv_sizeof_long}" = "x8"; then
8100 want64=true
8101 fi
8102 fi
8103 if test x${want64} = xtrue; then
8104 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8105 else
8106 TARGET_OBS='$(ALL_TARGET_OBS)'
8107 fi
8108fi
8109
8110
8111
8112# For other settings, only the main target counts.
8113gdb_sim=
8114gdb_osabi=
8115build_gdbserver=
8116targ=$target; . ${srcdir}/configure.tgt
8117
8118# Fetch the default architecture and default target vector from BFD.
8119targ=$target; . $srcdir/../bfd/config.bfd
8120
8121# We only want the first architecture, so strip off the others if
8122# there is more than one.
8123targ_archs=`echo $targ_archs | sed 's/ .*//'`
8124
8125if test "x$targ_archs" != x; then
8126
8127cat >>confdefs.h <<_ACEOF
8128#define DEFAULT_BFD_ARCH $targ_archs
8129_ACEOF
8130
8131fi
8132if test "x$targ_defvec" != x; then
8133
8134cat >>confdefs.h <<_ACEOF
8135#define DEFAULT_BFD_VEC $targ_defvec
8136_ACEOF
8137
8138fi
8139
c0993dbe
UW
8140# The CLI cannot be disabled yet, but may be in the future.
8141
8142# Enable CLI.
81ecdfbb
RW
8143# Check whether --enable-gdbcli was given.
8144if test "${enable_gdbcli+set}" = set; then :
8145 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8146 yes)
8147 ;;
8148 no)
81ecdfbb 8149 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8150 *)
81ecdfbb 8151 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8152 esac
8153else
8154 enable_gdbcli=yes
81ecdfbb
RW
8155fi
8156
c0993dbe
UW
8157if test x"$enable_gdbcli" = xyes; then
8158 if test -d $srcdir/cli; then
8159 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8160 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8161 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8162 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8163 fi
8164fi
8165
8166# Enable MI.
81ecdfbb
RW
8167# Check whether --enable-gdbmi was given.
8168if test "${enable_gdbmi+set}" = set; then :
8169 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8170 yes | no)
8171 ;;
8172 *)
81ecdfbb 8173 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8174 esac
8175else
8176 enable_gdbmi=yes
81ecdfbb
RW
8177fi
8178
c0993dbe
UW
8179if test x"$enable_gdbmi" = xyes; then
8180 if test -d $srcdir/mi; then
8181 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8182 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8183 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8184 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8185 fi
8186fi
8187
8188# Enable TUI.
81ecdfbb
RW
8189# Check whether --enable-tui was given.
8190if test "${enable_tui+set}" = set; then :
8191 enableval=$enable_tui; case $enableval in
3ca64bd3 8192 yes | no | auto)
c0993dbe
UW
8193 ;;
8194 *)
81ecdfbb 8195 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8196 esac
8197else
3ca64bd3 8198 enable_tui=auto
81ecdfbb
RW
8199fi
8200
c0993dbe
UW
8201
8202# Enable gdbtk.
81ecdfbb
RW
8203# Check whether --enable-gdbtk was given.
8204if test "${enable_gdbtk+set}" = set; then :
8205 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8206 yes | no)
8207 ;;
8208 *)
81ecdfbb 8209 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8210 esac
8211else
5062cc19 8212 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8213 enable_gdbtk=yes
8214 else
8215 enable_gdbtk=no
8216 fi
81ecdfbb
RW
8217fi
8218
c0993dbe
UW
8219# We unconditionally disable gdbtk tests on selected platforms.
8220case $host_os in
8221 go32* | windows*)
81ecdfbb
RW
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8223$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8224 enable_gdbtk=no ;;
8225esac
8226
8227# Libunwind support.
bec39cab 8228
81ecdfbb
RW
8229# Check whether --with-libunwind was given.
8230if test "${with_libunwind+set}" = set; then :
8231 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8232 yes) enable_libunwind=yes ;;
8233 no) enable_libunwind=no ;;
81ecdfbb 8234 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8235esac
bec39cab 8236else
bec39cab 8237
81ecdfbb
RW
8238 for ac_header in libunwind.h libunwind-ia64.h
8239do :
8240 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8241ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8242eval as_val=\$$as_ac_Header
8243 if test "x$as_val" = x""yes; then :
bec39cab 8244 cat >>confdefs.h <<_ACEOF
81ecdfbb 8245#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8246_ACEOF
8247
8248fi
8249
8250done
8251
a9322a30
TT
8252 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8253 enable_libunwind=yes;
8254 fi
8255
bec39cab 8256fi
bec39cab 8257
bec39cab 8258
81ecdfbb
RW
8259if test x"$enable_libunwind" = xyes; then
8260 for ac_header in libunwind.h libunwind-ia64.h
8261do :
8262 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8263ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8264eval as_val=\$$as_ac_Header
8265 if test "x$as_val" = x""yes; then :
bec39cab 8266 cat >>confdefs.h <<_ACEOF
81ecdfbb 8267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8268_ACEOF
8269
8270fi
8271
8272done
8273
bec39cab 8274
81ecdfbb 8275$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8276
8277 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8278 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8279 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8280fi
8281
cb01cfba
JB
8282opt_curses=no
8283
81ecdfbb
RW
8284# Check whether --with-curses was given.
8285if test "${with_curses+set}" = set; then :
8286 withval=$with_curses; opt_curses=$withval
8287fi
8288
cb01cfba 8289
76a39ba7 8290prefer_curses=no
cb01cfba 8291if test "$opt_curses" = "yes"; then
76a39ba7 8292 prefer_curses=yes
cb01cfba
JB
8293fi
8294
a9322a30 8295# Profiling support.
81ecdfbb
RW
8296# Check whether --enable-profiling was given.
8297if test "${enable_profiling+set}" = set; then :
8298 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8299 yes | no)
8300 ;;
8301 *)
81ecdfbb 8302 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8303 esac
8304else
8305 enable_profiling=no
81ecdfbb 8306fi
bec39cab 8307
a9322a30
TT
8308
8309for ac_func in monstartup _mcleanup
81ecdfbb
RW
8310do :
8311 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8312ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8313eval as_val=\$$as_ac_var
8314 if test "x$as_val" = x""yes; then :
8315 cat >>confdefs.h <<_ACEOF
8316#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8317_ACEOF
a9322a30 8318
81ecdfbb
RW
8319fi
8320done
a9322a30 8321
81ecdfbb
RW
8322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8323$as_echo_n "checking for _etext... " >&6; }
8324if test "${ac_cv_var__etext+set}" = set; then :
8325 $as_echo_n "(cached) " >&6
8326else
8327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8328/* end confdefs.h. */
8329#include <stdlib.h>
8330extern char _etext;
a9322a30
TT
8331
8332int
8333main ()
8334{
8335free (&_etext);
8336 ;
8337 return 0;
8338}
bec39cab 8339_ACEOF
81ecdfbb 8340if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8341 ac_cv_var__etext=yes
bec39cab 8342else
81ecdfbb 8343 ac_cv_var__etext=no
bec39cab 8344fi
81ecdfbb
RW
8345rm -f core conftest.err conftest.$ac_objext \
8346 conftest$ac_exeext conftest.$ac_ext
bec39cab 8347fi
81ecdfbb
RW
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8349$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8350if test $ac_cv_var__etext = yes; then
60ca704f 8351
81ecdfbb 8352$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8353
bec39cab 8354fi
81ecdfbb
RW
8355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8356$as_echo_n "checking for etext... " >&6; }
8357if test "${ac_cv_var_etext+set}" = set; then :
8358 $as_echo_n "(cached) " >&6
bec39cab 8359else
81ecdfbb 8360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8361/* end confdefs.h. */
a9322a30
TT
8362#include <stdlib.h>
8363extern char etext;
bec39cab
AC
8364
8365int
8366main ()
8367{
a9322a30 8368free (&etext);
bec39cab
AC
8369 ;
8370 return 0;
8371}
8372_ACEOF
81ecdfbb 8373if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8374 ac_cv_var_etext=yes
bec39cab 8375else
81ecdfbb 8376 ac_cv_var_etext=no
bec39cab 8377fi
81ecdfbb
RW
8378rm -f core conftest.err conftest.$ac_objext \
8379 conftest$ac_exeext conftest.$ac_ext
bec39cab 8380fi
81ecdfbb
RW
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8382$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8383if test $ac_cv_var_etext = yes; then
8384
81ecdfbb 8385$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8386
8387fi
a9322a30
TT
8388if test "$enable_profiling" = yes ; then
8389 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8390 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8391 fi
8392 PROFILE_CFLAGS=-pg
8393 OLD_CFLAGS="$CFLAGS"
8394 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8395
81ecdfbb
RW
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8397$as_echo_n "checking whether $CC supports -pg... " >&6; }
8398if test "${ac_cv_cc_supports_pg+set}" = set; then :
8399 $as_echo_n "(cached) " >&6
bec39cab 8400else
81ecdfbb 8401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8402/* end confdefs.h. */
bec39cab
AC
8403
8404int
8405main ()
8406{
a9322a30 8407int x;
bec39cab
AC
8408 ;
8409 return 0;
8410}
8411_ACEOF
81ecdfbb 8412if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8413 ac_cv_cc_supports_pg=yes
bec39cab 8414else
81ecdfbb 8415 ac_cv_cc_supports_pg=no
bec39cab 8416fi
81ecdfbb 8417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8418fi
81ecdfbb
RW
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8420$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8421
a9322a30 8422 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8423 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8424 fi
bec39cab 8425
a9322a30 8426 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8427fi
8428
c16158bc
JM
8429
8430
81ecdfbb
RW
8431# Check whether --with-pkgversion was given.
8432if test "${with_pkgversion+set}" = set; then :
8433 withval=$with_pkgversion; case "$withval" in
8434 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8435 no) PKGVERSION= ;;
8436 *) PKGVERSION="($withval) " ;;
8437 esac
8438else
8439 PKGVERSION="(GDB) "
8440
81ecdfbb 8441fi
c16158bc
JM
8442
8443
8444
8445
81ecdfbb
RW
8446
8447# Check whether --with-bugurl was given.
8448if test "${with_bugurl+set}" = set; then :
8449 withval=$with_bugurl; case "$withval" in
8450 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8451 no) BUGURL=
8452 ;;
8453 *) BUGURL="$withval"
8454 ;;
8455 esac
8456else
8457 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8458
81ecdfbb
RW
8459fi
8460
c16158bc
JM
8461 case ${BUGURL} in
8462 "")
8463 REPORT_BUGS_TO=
8464 REPORT_BUGS_TEXI=
8465 ;;
8466 *)
8467 REPORT_BUGS_TO="<$BUGURL>"
8468 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8469 ;;
8470 esac;
8471
8472
8473
8474
8475cat >>confdefs.h <<_ACEOF
8476#define PKGVERSION "$PKGVERSION"
8477_ACEOF
8478
8479
8480cat >>confdefs.h <<_ACEOF
8481#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8482_ACEOF
8483
8484
bec39cab
AC
8485# --------------------- #
8486# Checks for programs. #
8487# --------------------- #
8488
8489for ac_prog in gawk mawk nawk awk
8490do
8491 # Extract the first word of "$ac_prog", so it can be a program name with args.
8492set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8494$as_echo_n "checking for $ac_word... " >&6; }
8495if test "${ac_cv_prog_AWK+set}" = set; then :
8496 $as_echo_n "(cached) " >&6
bec39cab
AC
8497else
8498 if test -n "$AWK"; then
8499 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8500else
8501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8502for as_dir in $PATH
8503do
8504 IFS=$as_save_IFS
8505 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8506 for ac_exec_ext in '' $ac_executable_extensions; do
8507 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8508 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8510 break 2
8511 fi
8512done
81ecdfbb
RW
8513 done
8514IFS=$as_save_IFS
bec39cab
AC
8515
8516fi
8517fi
8518AWK=$ac_cv_prog_AWK
8519if test -n "$AWK"; then
81ecdfbb
RW
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8521$as_echo "$AWK" >&6; }
bec39cab 8522else
81ecdfbb
RW
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
bec39cab
AC
8525fi
8526
bec39cab 8527
81ecdfbb 8528 test -n "$AWK" && break
bec39cab
AC
8529done
8530
bec39cab 8531
81ecdfbb
RW
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8533$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8534LN_S=$as_ln_s
8535if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8537$as_echo "yes" >&6; }
bec39cab 8538else
81ecdfbb
RW
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8540$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8541fi
8542
8543if test -n "$ac_tool_prefix"; then
8544 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8545set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if test "${ac_cv_prog_RANLIB+set}" = set; then :
8549 $as_echo_n "(cached) " >&6
bec39cab
AC
8550else
8551 if test -n "$RANLIB"; then
8552 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8553else
8554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8555for as_dir in $PATH
8556do
8557 IFS=$as_save_IFS
8558 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8559 for ac_exec_ext in '' $ac_executable_extensions; do
8560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8561 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8563 break 2
8564 fi
8565done
81ecdfbb
RW
8566 done
8567IFS=$as_save_IFS
bec39cab
AC
8568
8569fi
8570fi
8571RANLIB=$ac_cv_prog_RANLIB
8572if test -n "$RANLIB"; then
81ecdfbb
RW
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8574$as_echo "$RANLIB" >&6; }
bec39cab 8575else
81ecdfbb
RW
8576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
bec39cab
AC
8578fi
8579
81ecdfbb 8580
bec39cab
AC
8581fi
8582if test -z "$ac_cv_prog_RANLIB"; then
8583 ac_ct_RANLIB=$RANLIB
8584 # Extract the first word of "ranlib", so it can be a program name with args.
8585set dummy ranlib; ac_word=$2
81ecdfbb
RW
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587$as_echo_n "checking for $ac_word... " >&6; }
8588if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8589 $as_echo_n "(cached) " >&6
bec39cab
AC
8590else
8591 if test -n "$ac_ct_RANLIB"; then
8592 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8593else
8594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595for as_dir in $PATH
8596do
8597 IFS=$as_save_IFS
8598 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8599 for ac_exec_ext in '' $ac_executable_extensions; do
8600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8601 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8603 break 2
8604 fi
8605done
81ecdfbb
RW
8606 done
8607IFS=$as_save_IFS
bec39cab 8608
bec39cab
AC
8609fi
8610fi
8611ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8612if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8614$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8615else
81ecdfbb
RW
8616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617$as_echo "no" >&6; }
bec39cab
AC
8618fi
8619
81ecdfbb
RW
8620 if test "x$ac_ct_RANLIB" = x; then
8621 RANLIB=":"
8622 else
8623 case $cross_compiling:$ac_tool_warned in
8624yes:)
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8627ac_tool_warned=yes ;;
8628esac
8629 RANLIB=$ac_ct_RANLIB
8630 fi
bec39cab
AC
8631else
8632 RANLIB="$ac_cv_prog_RANLIB"
8633fi
8634
8635for ac_prog in 'bison -y' byacc
8636do
8637 # Extract the first word of "$ac_prog", so it can be a program name with args.
8638set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640$as_echo_n "checking for $ac_word... " >&6; }
8641if test "${ac_cv_prog_YACC+set}" = set; then :
8642 $as_echo_n "(cached) " >&6
bec39cab
AC
8643else
8644 if test -n "$YACC"; then
8645 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8646else
8647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8648for as_dir in $PATH
8649do
8650 IFS=$as_save_IFS
8651 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8652 for ac_exec_ext in '' $ac_executable_extensions; do
8653 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8654 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8656 break 2
8657 fi
8658done
81ecdfbb
RW
8659 done
8660IFS=$as_save_IFS
bec39cab
AC
8661
8662fi
8663fi
8664YACC=$ac_cv_prog_YACC
8665if test -n "$YACC"; then
81ecdfbb
RW
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8667$as_echo "$YACC" >&6; }
bec39cab 8668else
81ecdfbb
RW
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
bec39cab
AC
8671fi
8672
81ecdfbb 8673
bec39cab
AC
8674 test -n "$YACC" && break
8675done
8676test -n "$YACC" || YACC="yacc"
8677
8678
8679if test -n "$ac_tool_prefix"; then
8680 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8681set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8683$as_echo_n "checking for $ac_word... " >&6; }
8684if test "${ac_cv_prog_AR+set}" = set; then :
8685 $as_echo_n "(cached) " >&6
bec39cab
AC
8686else
8687 if test -n "$AR"; then
8688 ac_cv_prog_AR="$AR" # Let the user override the test.
8689else
8690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691for as_dir in $PATH
8692do
8693 IFS=$as_save_IFS
8694 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8695 for ac_exec_ext in '' $ac_executable_extensions; do
8696 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8697 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8699 break 2
8700 fi
8701done
81ecdfbb
RW
8702 done
8703IFS=$as_save_IFS
bec39cab
AC
8704
8705fi
8706fi
8707AR=$ac_cv_prog_AR
8708if test -n "$AR"; then
81ecdfbb
RW
8709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8710$as_echo "$AR" >&6; }
bec39cab 8711else
81ecdfbb
RW
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8713$as_echo "no" >&6; }
bec39cab
AC
8714fi
8715
81ecdfbb 8716
bec39cab
AC
8717fi
8718if test -z "$ac_cv_prog_AR"; then
8719 ac_ct_AR=$AR
8720 # Extract the first word of "ar", so it can be a program name with args.
8721set dummy ar; ac_word=$2
81ecdfbb
RW
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723$as_echo_n "checking for $ac_word... " >&6; }
8724if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8725 $as_echo_n "(cached) " >&6
bec39cab
AC
8726else
8727 if test -n "$ac_ct_AR"; then
8728 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8729else
8730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8731for as_dir in $PATH
8732do
8733 IFS=$as_save_IFS
8734 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8735 for ac_exec_ext in '' $ac_executable_extensions; do
8736 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8737 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8739 break 2
8740 fi
8741done
81ecdfbb
RW
8742 done
8743IFS=$as_save_IFS
bec39cab
AC
8744
8745fi
8746fi
8747ac_ct_AR=$ac_cv_prog_ac_ct_AR
8748if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8750$as_echo "$ac_ct_AR" >&6; }
bec39cab 8751else
81ecdfbb
RW
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8753$as_echo "no" >&6; }
bec39cab
AC
8754fi
8755
81ecdfbb
RW
8756 if test "x$ac_ct_AR" = x; then
8757 AR=""
8758 else
8759 case $cross_compiling:$ac_tool_warned in
8760yes:)
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8763ac_tool_warned=yes ;;
8764esac
8765 AR=$ac_ct_AR
8766 fi
bec39cab
AC
8767else
8768 AR="$ac_cv_prog_AR"
8769fi
8770
8771if test -n "$ac_tool_prefix"; then
8772 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8773set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8775$as_echo_n "checking for $ac_word... " >&6; }
8776if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8777 $as_echo_n "(cached) " >&6
bec39cab
AC
8778else
8779 if test -n "$DLLTOOL"; then
8780 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8781else
8782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8783for as_dir in $PATH
8784do
8785 IFS=$as_save_IFS
8786 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8787 for ac_exec_ext in '' $ac_executable_extensions; do
8788 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8789 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8791 break 2
8792 fi
8793done
81ecdfbb
RW
8794 done
8795IFS=$as_save_IFS
bec39cab
AC
8796
8797fi
8798fi
8799DLLTOOL=$ac_cv_prog_DLLTOOL
8800if test -n "$DLLTOOL"; then
81ecdfbb
RW
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8802$as_echo "$DLLTOOL" >&6; }
bec39cab 8803else
81ecdfbb
RW
8804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8805$as_echo "no" >&6; }
bec39cab
AC
8806fi
8807
81ecdfbb 8808
bec39cab
AC
8809fi
8810if test -z "$ac_cv_prog_DLLTOOL"; then
8811 ac_ct_DLLTOOL=$DLLTOOL
8812 # Extract the first word of "dlltool", so it can be a program name with args.
8813set dummy dlltool; ac_word=$2
81ecdfbb
RW
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8817 $as_echo_n "(cached) " >&6
bec39cab
AC
8818else
8819 if test -n "$ac_ct_DLLTOOL"; then
8820 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8821else
8822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8823for as_dir in $PATH
8824do
8825 IFS=$as_save_IFS
8826 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8827 for ac_exec_ext in '' $ac_executable_extensions; do
8828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8829 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8831 break 2
8832 fi
8833done
81ecdfbb
RW
8834 done
8835IFS=$as_save_IFS
bec39cab
AC
8836
8837fi
8838fi
8839ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8840if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8842$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8843else
81ecdfbb
RW
8844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
bec39cab
AC
8846fi
8847
81ecdfbb
RW
8848 if test "x$ac_ct_DLLTOOL" = x; then
8849 DLLTOOL=""
8850 else
8851 case $cross_compiling:$ac_tool_warned in
8852yes:)
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8855ac_tool_warned=yes ;;
8856esac
8857 DLLTOOL=$ac_ct_DLLTOOL
8858 fi
bec39cab
AC
8859else
8860 DLLTOOL="$ac_cv_prog_DLLTOOL"
8861fi
8862
8863if test -n "$ac_tool_prefix"; then
8864 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8865set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if test "${ac_cv_prog_WINDRES+set}" = set; then :
8869 $as_echo_n "(cached) " >&6
bec39cab
AC
8870else
8871 if test -n "$WINDRES"; then
8872 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8873else
8874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8875for as_dir in $PATH
8876do
8877 IFS=$as_save_IFS
8878 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8879 for ac_exec_ext in '' $ac_executable_extensions; do
8880 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8881 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8883 break 2
8884 fi
8885done
81ecdfbb
RW
8886 done
8887IFS=$as_save_IFS
bec39cab
AC
8888
8889fi
8890fi
8891WINDRES=$ac_cv_prog_WINDRES
8892if test -n "$WINDRES"; then
81ecdfbb
RW
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8894$as_echo "$WINDRES" >&6; }
bec39cab 8895else
81ecdfbb
RW
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8897$as_echo "no" >&6; }
bec39cab
AC
8898fi
8899
81ecdfbb 8900
bec39cab
AC
8901fi
8902if test -z "$ac_cv_prog_WINDRES"; then
8903 ac_ct_WINDRES=$WINDRES
8904 # Extract the first word of "windres", so it can be a program name with args.
8905set dummy windres; ac_word=$2
81ecdfbb
RW
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8909 $as_echo_n "(cached) " >&6
bec39cab
AC
8910else
8911 if test -n "$ac_ct_WINDRES"; then
8912 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8913else
8914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917 IFS=$as_save_IFS
8918 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8919 for ac_exec_ext in '' $ac_executable_extensions; do
8920 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8921 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8923 break 2
8924 fi
8925done
81ecdfbb
RW
8926 done
8927IFS=$as_save_IFS
bec39cab
AC
8928
8929fi
8930fi
8931ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8932if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8934$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8935else
81ecdfbb
RW
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8937$as_echo "no" >&6; }
c906108c 8938fi
bec39cab 8939
81ecdfbb
RW
8940 if test "x$ac_ct_WINDRES" = x; then
8941 WINDRES=""
8942 else
8943 case $cross_compiling:$ac_tool_warned in
8944yes:)
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8947ac_tool_warned=yes ;;
8948esac
8949 WINDRES=$ac_ct_WINDRES
8950 fi
c906108c 8951else
bec39cab 8952 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8953fi
8954
bec39cab
AC
8955
8956# Needed for GNU/Hurd.
8957if test -n "$ac_tool_prefix"; then
8958 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8959set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961$as_echo_n "checking for $ac_word... " >&6; }
8962if test "${ac_cv_prog_MIG+set}" = set; then :
8963 $as_echo_n "(cached) " >&6
c906108c 8964else
bec39cab
AC
8965 if test -n "$MIG"; then
8966 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8967else
8968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969for as_dir in $PATH
8970do
8971 IFS=$as_save_IFS
8972 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8973 for ac_exec_ext in '' $ac_executable_extensions; do
8974 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8975 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8977 break 2
8978 fi
8979done
81ecdfbb
RW
8980 done
8981IFS=$as_save_IFS
bec39cab 8982
c906108c 8983fi
bec39cab
AC
8984fi
8985MIG=$ac_cv_prog_MIG
8986if test -n "$MIG"; then
81ecdfbb
RW
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8988$as_echo "$MIG" >&6; }
c906108c 8989else
81ecdfbb
RW
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
c906108c
SS
8992fi
8993
81ecdfbb 8994
bec39cab
AC
8995fi
8996if test -z "$ac_cv_prog_MIG"; then
8997 ac_ct_MIG=$MIG
8998 # Extract the first word of "mig", so it can be a program name with args.
8999set dummy mig; ac_word=$2
81ecdfbb
RW
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9001$as_echo_n "checking for $ac_word... " >&6; }
9002if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
9003 $as_echo_n "(cached) " >&6
bec39cab
AC
9004else
9005 if test -n "$ac_ct_MIG"; then
9006 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9007else
9008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9009for as_dir in $PATH
9010do
9011 IFS=$as_save_IFS
9012 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
9013 for ac_exec_ext in '' $ac_executable_extensions; do
9014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 9015 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 9016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
9017 break 2
9018 fi
9019done
81ecdfbb
RW
9020 done
9021IFS=$as_save_IFS
c906108c 9022
bec39cab
AC
9023fi
9024fi
9025ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9026if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9028$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9029else
81ecdfbb
RW
9030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
bec39cab 9032fi
c906108c 9033
81ecdfbb
RW
9034 if test "x$ac_ct_MIG" = x; then
9035 MIG=""
9036 else
9037 case $cross_compiling:$ac_tool_warned in
9038yes:)
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9041ac_tool_warned=yes ;;
9042esac
9043 MIG=$ac_ct_MIG
9044 fi
bec39cab
AC
9045else
9046 MIG="$ac_cv_prog_MIG"
9047fi
c906108c 9048
c906108c 9049
bec39cab
AC
9050# ---------------------- #
9051# Checks for libraries. #
9052# ---------------------- #
c906108c 9053
bec39cab 9054# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9056$as_echo_n "checking for main in -lm... " >&6; }
9057if test "${ac_cv_lib_m_main+set}" = set; then :
9058 $as_echo_n "(cached) " >&6
bec39cab
AC
9059else
9060 ac_check_lib_save_LIBS=$LIBS
9061LIBS="-lm $LIBS"
81ecdfbb 9062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9063/* end confdefs.h. */
c906108c 9064
c906108c 9065
bec39cab
AC
9066int
9067main ()
9068{
81ecdfbb 9069return main ();
bec39cab
AC
9070 ;
9071 return 0;
9072}
9073_ACEOF
81ecdfbb 9074if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9075 ac_cv_lib_m_main=yes
9076else
81ecdfbb 9077 ac_cv_lib_m_main=no
bec39cab 9078fi
81ecdfbb
RW
9079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9081LIBS=$ac_check_lib_save_LIBS
9082fi
81ecdfbb
RW
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9084$as_echo "$ac_cv_lib_m_main" >&6; }
9085if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9086 cat >>confdefs.h <<_ACEOF
9087#define HAVE_LIBM 1
9088_ACEOF
9089
9090 LIBS="-lm $LIBS"
c906108c 9091
c906108c 9092fi
bec39cab
AC
9093
9094
9095# We need to link with -lw to get `wctype' on Solaris before Solaris
9096# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9097# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9098# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9099ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9100if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9101
c906108c 9102else
81ecdfbb
RW
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9104$as_echo_n "checking for wctype in -lw... " >&6; }
9105if test "${ac_cv_lib_w_wctype+set}" = set; then :
9106 $as_echo_n "(cached) " >&6
bec39cab
AC
9107else
9108 ac_check_lib_save_LIBS=$LIBS
9109LIBS="-lw $LIBS"
81ecdfbb 9110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9111/* end confdefs.h. */
c906108c 9112
81ecdfbb
RW
9113/* Override any GCC internal prototype to avoid an error.
9114 Use char because int might match the return type of a GCC
9115 builtin and then its argument prototype would still apply. */
bec39cab
AC
9116#ifdef __cplusplus
9117extern "C"
9118#endif
bec39cab
AC
9119char wctype ();
9120int
9121main ()
9122{
81ecdfbb 9123return wctype ();
bec39cab
AC
9124 ;
9125 return 0;
9126}
9127_ACEOF
81ecdfbb 9128if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9129 ac_cv_lib_w_wctype=yes
9130else
81ecdfbb 9131 ac_cv_lib_w_wctype=no
bec39cab 9132fi
81ecdfbb
RW
9133rm -f core conftest.err conftest.$ac_objext \
9134 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9135LIBS=$ac_check_lib_save_LIBS
9136fi
81ecdfbb
RW
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9138$as_echo "$ac_cv_lib_w_wctype" >&6; }
9139if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9140 cat >>confdefs.h <<_ACEOF
9141#define HAVE_LIBW 1
9142_ACEOF
c906108c 9143
bec39cab 9144 LIBS="-lw $LIBS"
c906108c 9145
bec39cab 9146fi
c906108c 9147
bec39cab 9148fi
c906108c 9149
ddc9cd0f 9150
bec39cab 9151# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9153$as_echo_n "checking for library containing gethostbyname... " >&6; }
9154if test "${ac_cv_search_gethostbyname+set}" = set; then :
9155 $as_echo_n "(cached) " >&6
bec39cab
AC
9156else
9157 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9159/* end confdefs.h. */
ddc9cd0f 9160
81ecdfbb
RW
9161/* Override any GCC internal prototype to avoid an error.
9162 Use char because int might match the return type of a GCC
9163 builtin and then its argument prototype would still apply. */
bec39cab
AC
9164#ifdef __cplusplus
9165extern "C"
9166#endif
bec39cab
AC
9167char gethostbyname ();
9168int
9169main ()
9170{
81ecdfbb 9171return gethostbyname ();
bec39cab
AC
9172 ;
9173 return 0;
9174}
9175_ACEOF
81ecdfbb
RW
9176for ac_lib in '' nsl; do
9177 if test -z "$ac_lib"; then
9178 ac_res="none required"
9179 else
9180 ac_res=-l$ac_lib
b4e70030 9181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9182 fi
9183 if ac_fn_c_try_link "$LINENO"; then :
9184 ac_cv_search_gethostbyname=$ac_res
9185fi
9186rm -f core conftest.err conftest.$ac_objext \
9187 conftest$ac_exeext
9188 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9189 break
9190fi
9191done
9192if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9193
bec39cab 9194else
81ecdfbb 9195 ac_cv_search_gethostbyname=no
bec39cab 9196fi
81ecdfbb 9197rm conftest.$ac_ext
bec39cab
AC
9198LIBS=$ac_func_search_save_LIBS
9199fi
81ecdfbb
RW
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9201$as_echo "$ac_cv_search_gethostbyname" >&6; }
9202ac_res=$ac_cv_search_gethostbyname
9203if test "$ac_res" != no; then :
9204 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9205
bec39cab 9206fi
96baa820 9207
c906108c 9208
b4e70030 9209# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9211$as_echo_n "checking for library containing socketpair... " >&6; }
9212if test "${ac_cv_search_socketpair+set}" = set; then :
9213 $as_echo_n "(cached) " >&6
b4e70030
JB
9214else
9215 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9217/* end confdefs.h. */
9218
81ecdfbb
RW
9219/* Override any GCC internal prototype to avoid an error.
9220 Use char because int might match the return type of a GCC
9221 builtin and then its argument prototype would still apply. */
b4e70030
JB
9222#ifdef __cplusplus
9223extern "C"
9224#endif
b4e70030
JB
9225char socketpair ();
9226int
9227main ()
9228{
81ecdfbb 9229return socketpair ();
b4e70030
JB
9230 ;
9231 return 0;
9232}
9233_ACEOF
81ecdfbb
RW
9234for ac_lib in '' socket; do
9235 if test -z "$ac_lib"; then
9236 ac_res="none required"
9237 else
9238 ac_res=-l$ac_lib
b4e70030 9239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9240 fi
9241 if ac_fn_c_try_link "$LINENO"; then :
9242 ac_cv_search_socketpair=$ac_res
9243fi
9244rm -f core conftest.err conftest.$ac_objext \
9245 conftest$ac_exeext
9246 if test "${ac_cv_search_socketpair+set}" = set; then :
9247 break
9248fi
9249done
9250if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9251
b4e70030 9252else
81ecdfbb 9253 ac_cv_search_socketpair=no
b4e70030 9254fi
81ecdfbb 9255rm conftest.$ac_ext
b4e70030
JB
9256LIBS=$ac_func_search_save_LIBS
9257fi
81ecdfbb
RW
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9259$as_echo "$ac_cv_search_socketpair" >&6; }
9260ac_res=$ac_cv_search_socketpair
9261if test "$ac_res" != no; then :
9262 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9263
9264fi
9265
9266
233a11ab 9267# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9268
9269 # See if the user specified whether he wants zlib support or not.
9270
9271# Check whether --with-zlib was given.
9272if test "${with_zlib+set}" = set; then :
9273 withval=$with_zlib;
9274else
9275 with_zlib=auto
9276fi
9277
9278
9279 if test "$with_zlib" != "no"; then
9280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9281$as_echo_n "checking for library containing zlibVersion... " >&6; }
9282if test "${ac_cv_search_zlibVersion+set}" = set; then :
9283 $as_echo_n "(cached) " >&6
233a11ab
CS
9284else
9285 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9287/* end confdefs.h. */
9288
81ecdfbb
RW
9289/* Override any GCC internal prototype to avoid an error.
9290 Use char because int might match the return type of a GCC
233a11ab 9291 builtin and then its argument prototype would still apply. */
233a11ab
CS
9292#ifdef __cplusplus
9293extern "C"
9294#endif
233a11ab
CS
9295char zlibVersion ();
9296int
9297main ()
9298{
81ecdfbb 9299return zlibVersion ();
233a11ab
CS
9300 ;
9301 return 0;
9302}
9303_ACEOF
81ecdfbb
RW
9304for ac_lib in '' z; do
9305 if test -z "$ac_lib"; then
9306 ac_res="none required"
233a11ab 9307 else
81ecdfbb
RW
9308 ac_res=-l$ac_lib
9309 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9310 fi
81ecdfbb
RW
9311 if ac_fn_c_try_link "$LINENO"; then :
9312 ac_cv_search_zlibVersion=$ac_res
233a11ab 9313fi
81ecdfbb
RW
9314rm -f core conftest.err conftest.$ac_objext \
9315 conftest$ac_exeext
9316 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9317 break
233a11ab 9318fi
81ecdfbb
RW
9319done
9320if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9321
233a11ab 9322else
81ecdfbb 9323 ac_cv_search_zlibVersion=no
233a11ab 9324fi
81ecdfbb
RW
9325rm conftest.$ac_ext
9326LIBS=$ac_func_search_save_LIBS
233a11ab 9327fi
81ecdfbb
RW
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9329$as_echo "$ac_cv_search_zlibVersion" >&6; }
9330ac_res=$ac_cv_search_zlibVersion
9331if test "$ac_res" != no; then :
9332 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9333 for ac_header in zlib.h
9334do :
9335 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9336if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9337 cat >>confdefs.h <<_ACEOF
81ecdfbb 9338#define HAVE_ZLIB_H 1
233a11ab
CS
9339_ACEOF
9340
9341fi
9342
9343done
9344
9345fi
9346
b040ad30
JB
9347 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9348 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9349 fi
9350 fi
9351
233a11ab 9352
77f120bf 9353# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9355$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9356if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9357 $as_echo_n "(cached) " >&6
bec39cab
AC
9358else
9359 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9361/* end confdefs.h. */
c906108c 9362
81ecdfbb
RW
9363/* Override any GCC internal prototype to avoid an error.
9364 Use char because int might match the return type of a GCC
9365 builtin and then its argument prototype would still apply. */
bec39cab
AC
9366#ifdef __cplusplus
9367extern "C"
9368#endif
77f120bf 9369char dlgetmodinfo ();
bec39cab
AC
9370int
9371main ()
9372{
81ecdfbb 9373return dlgetmodinfo ();
bec39cab
AC
9374 ;
9375 return 0;
9376}
9377_ACEOF
81ecdfbb
RW
9378for ac_lib in '' dl xpdl; do
9379 if test -z "$ac_lib"; then
9380 ac_res="none required"
9381 else
9382 ac_res=-l$ac_lib
b4e70030 9383 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9384 fi
9385 if ac_fn_c_try_link "$LINENO"; then :
9386 ac_cv_search_dlgetmodinfo=$ac_res
9387fi
9388rm -f core conftest.err conftest.$ac_objext \
9389 conftest$ac_exeext
9390 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9391 break
9392fi
9393done
9394if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9395
4e8d927d 9396else
81ecdfbb 9397 ac_cv_search_dlgetmodinfo=no
1ba607ad 9398fi
81ecdfbb 9399rm conftest.$ac_ext
bec39cab
AC
9400LIBS=$ac_func_search_save_LIBS
9401fi
81ecdfbb
RW
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9403$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9404ac_res=$ac_cv_search_dlgetmodinfo
9405if test "$ac_res" != no; then :
9406 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9407
8bb2c122 9408fi
8bb2c122 9409
8bb2c122 9410
77f120bf 9411
77f120bf 9412
6c7a06a3 9413
81ecdfbb
RW
9414# Check whether --with-libiconv-prefix was given.
9415if test "${with_libiconv_prefix+set}" = set; then :
9416 withval=$with_libiconv_prefix;
6c7a06a3 9417 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9418 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9419 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9420 done
9421
81ecdfbb
RW
9422fi
9423
6c7a06a3 9424
f18c4681 9425 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9426 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9427
81ecdfbb
RW
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9429$as_echo_n "checking for iconv... " >&6; }
9430if test "${am_cv_func_iconv+set}" = set; then :
9431 $as_echo_n "(cached) " >&6
d542061a 9432else
6c7a06a3
TT
9433
9434 am_cv_func_iconv="no, consider installing GNU libiconv"
9435 am_cv_lib_iconv=no
9436 am_cv_use_build_libiconv=no
f0f20949 9437 am_cv_build_libiconv_path=
4edb1e84
JB
9438
9439 # If libiconv is part of the build tree, then try using it over
9440 # any system iconv.
9441 if test -d ../libiconv; then
f18c4681
JB
9442 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9443 am_save_LIBS="$LIBS"
9444 am_save_CPPFLAGS="$CPPFLAGS"
9445 LIBS="$LIBS $lib_dir/libiconv.a"
9446 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9448/* end confdefs.h. */
6c7a06a3
TT
9449#include <stdlib.h>
9450#include <iconv.h>
d542061a
UW
9451int
9452main ()
9453{
6c7a06a3 9454iconv_t cd = iconv_open("","");
f18c4681
JB
9455 iconv(cd,NULL,NULL,NULL,NULL);
9456 iconv_close(cd);
d542061a
UW
9457 ;
9458 return 0;
9459}
9460_ACEOF
81ecdfbb 9461if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9462 am_cv_use_build_libiconv=yes
f0f20949 9463 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9464 am_cv_lib_iconv=yes
9465 am_cv_func_iconv=yes
d542061a 9466fi
81ecdfbb
RW
9467rm -f core conftest.err conftest.$ac_objext \
9468 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9469 LIBS="$am_save_LIBS"
9470 CPPFLAGS="$am_save_CPPFLAGS"
9471 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9472 break
9473 fi
9474 done
4edb1e84 9475 fi
94ae1714 9476
4edb1e84 9477 # Next, try to find iconv in libc.
6c7a06a3 9478 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9480/* end confdefs.h. */
6c7a06a3
TT
9481#include <stdlib.h>
9482#include <iconv.h>
d542061a
UW
9483int
9484main ()
9485{
6c7a06a3
TT
9486iconv_t cd = iconv_open("","");
9487 iconv(cd,NULL,NULL,NULL,NULL);
9488 iconv_close(cd);
d542061a
UW
9489 ;
9490 return 0;
9491}
9492_ACEOF
81ecdfbb 9493if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9494 am_cv_func_iconv=yes
d542061a 9495fi
81ecdfbb
RW
9496rm -f core conftest.err conftest.$ac_objext \
9497 conftest$ac_exeext conftest.$ac_ext
77f120bf 9498 fi
94ae1714 9499
4edb1e84
JB
9500 # If iconv was not in libc, try -liconv. In this case, arrange to
9501 # look in the libiconv prefix, if it was specified by the user.
9502 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9503 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9504 am_save_LIBS="$LIBS"
9505 if test -n "$LIBICONV_INCLUDE"; then
9506 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9507 LIBS="$LIBS $LIBICONV_LIBDIR"
9508 fi
9509 LIBS="$LIBS -liconv"
81ecdfbb 9510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9511/* end confdefs.h. */
6c7a06a3
TT
9512#include <stdlib.h>
9513#include <iconv.h>
bec39cab
AC
9514int
9515main ()
9516{
6c7a06a3
TT
9517iconv_t cd = iconv_open("","");
9518 iconv(cd,NULL,NULL,NULL,NULL);
9519 iconv_close(cd);
bec39cab
AC
9520 ;
9521 return 0;
9522}
9523_ACEOF
81ecdfbb 9524if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9525 am_cv_lib_iconv=yes
6c7a06a3 9526 am_cv_func_iconv=yes
627af7ea 9527fi
81ecdfbb
RW
9528rm -f core conftest.err conftest.$ac_objext \
9529 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9530 LIBS="$am_save_LIBS"
fc3b640d 9531 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9532 fi
9533
9534fi
81ecdfbb
RW
9535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9536$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9537
9538 # Set the various flags based on the cache variables. We can't rely
9539 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9540 LIBICONV=
9541 if test "$am_cv_lib_iconv" = yes; then
9542 LIBICONV="-liconv"
94ae1714
TT
9543 else
9544 LIBICONV_LIBDIR=
9545 LIBICONV_INCLUDE=
fc3b640d
TT
9546 fi
9547 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9548 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9549 LIBICONV_LIBDIR=""
fc3b640d
TT
9550 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9551 fi
9552 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9553 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9554
6c7a06a3
TT
9555 if test "$am_cv_func_iconv" = yes; then
9556
81ecdfbb 9557$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9558
81ecdfbb
RW
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9560$as_echo_n "checking for iconv declaration... " >&6; }
9561 if test "${am_cv_proto_iconv+set}" = set; then :
9562 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9563else
9564
81ecdfbb 9565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9566/* end confdefs.h. */
9567
6c7a06a3
TT
9568#include <stdlib.h>
9569#include <iconv.h>
9570extern
b4e70030 9571#ifdef __cplusplus
6c7a06a3 9572"C"
b4e70030 9573#endif
6c7a06a3
TT
9574#if defined(__STDC__) || defined(__cplusplus)
9575size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9576#else
9577size_t iconv();
9578#endif
9579
b4e70030
JB
9580int
9581main ()
9582{
6c7a06a3 9583
b4e70030
JB
9584 ;
9585 return 0;
9586}
9587_ACEOF
81ecdfbb 9588if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9589 am_cv_proto_iconv_arg1=""
4e8d927d 9590else
81ecdfbb 9591 am_cv_proto_iconv_arg1="const"
b4e70030 9592fi
81ecdfbb 9593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9594 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);"
9595fi
9596
9597 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9599 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9600$as_echo "${ac_t:-
9601 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9602
9603cat >>confdefs.h <<_ACEOF
9604#define ICONV_CONST $am_cv_proto_iconv_arg1
9605_ACEOF
9606
9607 fi
6c7a06a3
TT
9608
9609
478aac75
DE
9610# GDB may fork/exec the iconv program to get the list of supported character
9611# sets. Allow the user to specify where to find it.
9612# There are several factors affecting the choice of option name:
9613# - There is already --with-libiconv-prefix but we can't use it, it specifies
9614# the build-time location of libiconv files.
9615# - The program we need to find is iconv, which comes with glibc. The user
9616# doesn't necessarily have libiconv installed. Therefore naming this
9617# --with-libiconv-foo feels wrong.
9618# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9619# defined to work on directories not files (though it really doesn't know
9620# the difference).
9621# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9622# with --with-libiconv-prefix.
9623# Putting these together is why the option name is --with-iconv-bin.
9624
9625
9626# Check whether --with-iconv-bin was given.
9627if test "${with_iconv_bin+set}" = set; then :
9628 withval=$with_iconv_bin; iconv_bin="${withval}"
9629
9630cat >>confdefs.h <<_ACEOF
9631#define ICONV_BIN "${iconv_bin}"
9632_ACEOF
9633
9634
9635 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9636 if test "x$prefix" = xNONE; then
9637 test_prefix=/usr/local
9638 else
9639 test_prefix=$prefix
9640 fi
9641 else
9642 test_prefix=$exec_prefix
9643 fi
9644 value=0
9645 case ${iconv_bin} in
9646 "${test_prefix}"|"${test_prefix}/"*|\
9647 '${exec_prefix}'|'${exec_prefix}/'*)
9648 value=1
9649 ;;
9650 esac
9651
9652cat >>confdefs.h <<_ACEOF
9653#define ICONV_BIN_RELOCATABLE $value
9654_ACEOF
9655
9656
9657
9658fi
9659
9660
6c7a06a3
TT
9661# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9662# There is a very specific comment in /usr/include/curses.h explaining that
9663# termcap routines built into libcurses must not be used.
9664#
9665# The symptoms we observed so far is GDB unexpectedly changing
9666# the terminal settings when tgetent is called - this is particularly
9667# visible as the output is missing carriage returns, and so rapidly
9668# becomes very hard to read.
9669#
9670# The readline configure script has already decided that libtermcap
9671# was enough for its purposes, and so decided to build readline using
9672# libtermcap. Since the TUI mode requires curses, building GDB with
9673# TUI enabled results in both libraries to be used at the same time,
9674# which is not allowed. This basically means that GDB with TUI is
9675# broken on alpha-osf.
9676
9677case $host_os in
6bcc772d
RO
9678 osf* )
9679 if test x"$enable_tui" = xyes; then
81ecdfbb 9680 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9681 fi
6bcc772d 9682 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9683 enable_tui=no
9684 fi
9685 ;;
9686esac
9687
cb01cfba 9688# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9689if test x"$enable_tui" != xno; then
cb01cfba
JB
9690 prefer_curses=yes
9691fi
9692
9693curses_found=no
9694if test x"$prefer_curses" = xyes; then
9695 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9696 # curses library because the latter might not provide all the
9697 # functionality we need. However, this leads to problems on systems
9698 # where the linker searches /usr/local/lib, but the compiler doesn't
9699 # search /usr/local/include, if ncurses is installed in /usr/local. A
9700 # default installation of ncurses on alpha*-dec-osf* will lead to such
9701 # a situation.
81ecdfbb
RW
9702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9703$as_echo_n "checking for library containing waddstr... " >&6; }
9704if test "${ac_cv_search_waddstr+set}" = set; then :
9705 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9706else
9707 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9709/* end confdefs.h. */
9710
81ecdfbb
RW
9711/* Override any GCC internal prototype to avoid an error.
9712 Use char because int might match the return type of a GCC
9713 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9714#ifdef __cplusplus
9715extern "C"
9716#endif
6c7a06a3
TT
9717char waddstr ();
9718int
9719main ()
9720{
81ecdfbb 9721return waddstr ();
6c7a06a3
TT
9722 ;
9723 return 0;
9724}
9725_ACEOF
81ecdfbb
RW
9726for ac_lib in '' ncurses cursesX curses; do
9727 if test -z "$ac_lib"; then
9728 ac_res="none required"
9729 else
9730 ac_res=-l$ac_lib
9731 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9732 fi
9733 if ac_fn_c_try_link "$LINENO"; then :
9734 ac_cv_search_waddstr=$ac_res
9735fi
9736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext
9738 if test "${ac_cv_search_waddstr+set}" = set; then :
9739 break
9740fi
9741done
9742if test "${ac_cv_search_waddstr+set}" = set; then :
9743
6c7a06a3 9744else
81ecdfbb
RW
9745 ac_cv_search_waddstr=no
9746fi
9747rm conftest.$ac_ext
9748LIBS=$ac_func_search_save_LIBS
9749fi
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9751$as_echo "$ac_cv_search_waddstr" >&6; }
9752ac_res=$ac_cv_search_waddstr
9753if test "$ac_res" != no; then :
9754 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9755
9756fi
9757
9758
cb01cfba
JB
9759 if test "$ac_cv_search_waddstr" != no; then
9760 curses_found=yes
9761 fi
9762fi
9763
9764# Check whether we should enable the TUI, but only do so if we really
9765# can.
9766if test x"$enable_tui" != xno; then
9767 if test -d $srcdir/tui; then
9768 if test "$curses_found" != no; then
6c7a06a3
TT
9769 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9770 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9771 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9772 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9773 CONFIG_ALL="${CONFIG_ALL} all-tui"
9774 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9775 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9776 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9777 else
9778 if test x"$enable_tui" = xyes; then
81ecdfbb 9779 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9780 else
81ecdfbb
RW
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9782$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9783 fi
9784 fi
9785 fi
9786fi
9787
9788# Since GDB uses Readline, we need termcap functionality. In many
9789# cases this will be provided by the curses library, but some systems
9790# have a seperate termcap library, or no curses library at all.
9791
9792case $host_os in
9793 cygwin*)
9794 if test -d $srcdir/libtermcap; then
9795 LIBS="../libtermcap/libtermcap.a $LIBS"
9796 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9797 fi ;;
9798 go32* | *djgpp*)
9799 ac_cv_search_tgetent="none required"
9800 ;;
9801 *mingw32*)
9802 ac_cv_search_tgetent="none required"
9803 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9804 ;;
9805esac
9806
9807# These are the libraries checked by Readline.
81ecdfbb
RW
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9809$as_echo_n "checking for library containing tgetent... " >&6; }
9810if test "${ac_cv_search_tgetent+set}" = set; then :
9811 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9812else
9813 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9815/* end confdefs.h. */
9816
81ecdfbb
RW
9817/* Override any GCC internal prototype to avoid an error.
9818 Use char because int might match the return type of a GCC
9819 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9820#ifdef __cplusplus
9821extern "C"
9822#endif
6c7a06a3
TT
9823char tgetent ();
9824int
9825main ()
9826{
81ecdfbb 9827return tgetent ();
6c7a06a3
TT
9828 ;
9829 return 0;
9830}
9831_ACEOF
81ecdfbb
RW
9832for ac_lib in '' termcap tinfo curses ncurses; do
9833 if test -z "$ac_lib"; then
9834 ac_res="none required"
9835 else
9836 ac_res=-l$ac_lib
6c7a06a3 9837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9838 fi
9839 if ac_fn_c_try_link "$LINENO"; then :
9840 ac_cv_search_tgetent=$ac_res
9841fi
9842rm -f core conftest.err conftest.$ac_objext \
9843 conftest$ac_exeext
9844 if test "${ac_cv_search_tgetent+set}" = set; then :
9845 break
9846fi
9847done
9848if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9849
6c7a06a3 9850else
81ecdfbb 9851 ac_cv_search_tgetent=no
6c7a06a3 9852fi
81ecdfbb 9853rm conftest.$ac_ext
6c7a06a3
TT
9854LIBS=$ac_func_search_save_LIBS
9855fi
81ecdfbb
RW
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9857$as_echo "$ac_cv_search_tgetent" >&6; }
9858ac_res=$ac_cv_search_tgetent
9859if test "$ac_res" != no; then :
9860 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9861
06825bd1
MK
9862fi
9863
06825bd1 9864
bec39cab 9865if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9866 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9867fi
9868
3841debe 9869
81ecdfbb
RW
9870# Check whether --with-system-readline was given.
9871if test "${with_system_readline+set}" = set; then :
9872 withval=$with_system_readline;
9873fi
6a30b0a5 9874
6a30b0a5
AS
9875
9876if test "$with_system_readline" = yes; then
9877 READLINE=-lreadline
9878 READLINE_DEPS=
9879 READLINE_CFLAGS=
39037522 9880 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9881else
9882 READLINE='$(READLINE_DIR)/libreadline.a'
9883 READLINE_DEPS='$(READLINE)'
9884 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9885 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9886fi
9887
9888
9889
9890
9891
f997c383
SD
9892# Generate jit-reader.h
9893
9894# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9895TARGET_PTR=
9896
9897# The cast to long int works around a bug in the HP C Compiler
9898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9900# This bug is HP SR number 8606223364.
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9902$as_echo_n "checking size of unsigned long long... " >&6; }
9903if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9904 $as_echo_n "(cached) " >&6
9905else
9906 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9907
9908else
9909 if test "$ac_cv_type_unsigned_long_long" = yes; then
9910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9912{ as_fn_set_status 77
9913as_fn_error "cannot compute sizeof (unsigned long long)
9914See \`config.log' for more details." "$LINENO" 5; }; }
9915 else
9916 ac_cv_sizeof_unsigned_long_long=0
9917 fi
9918fi
9919
9920fi
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9922$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9923
9924
9925
9926cat >>confdefs.h <<_ACEOF
9927#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9928_ACEOF
9929
9930
9931# The cast to long int works around a bug in the HP C Compiler
9932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9934# This bug is HP SR number 8606223364.
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9936$as_echo_n "checking size of unsigned long... " >&6; }
9937if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9938 $as_echo_n "(cached) " >&6
9939else
9940 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9941
9942else
9943 if test "$ac_cv_type_unsigned_long" = yes; then
9944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9946{ as_fn_set_status 77
9947as_fn_error "cannot compute sizeof (unsigned long)
9948See \`config.log' for more details." "$LINENO" 5; }; }
9949 else
9950 ac_cv_sizeof_unsigned_long=0
9951 fi
9952fi
9953
9954fi
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9956$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9957
9958
9959
9960cat >>confdefs.h <<_ACEOF
9961#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9962_ACEOF
9963
9964
9965# The cast to long int works around a bug in the HP C Compiler
9966# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9967# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9968# This bug is HP SR number 8606223364.
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9970$as_echo_n "checking size of unsigned __int128... " >&6; }
9971if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9972 $as_echo_n "(cached) " >&6
9973else
9974 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9975
9976else
9977 if test "$ac_cv_type_unsigned___int128" = yes; then
9978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9980{ as_fn_set_status 77
9981as_fn_error "cannot compute sizeof (unsigned __int128)
9982See \`config.log' for more details." "$LINENO" 5; }; }
9983 else
9984 ac_cv_sizeof_unsigned___int128=0
9985 fi
9986fi
9987
9988fi
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9990$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9991
9992
9993
9994cat >>confdefs.h <<_ACEOF
9995#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9996_ACEOF
9997
9998
9999
10000if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
10001 TARGET_PTR="unsigned long"
10002elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
10003 TARGET_PTR="unsigned long long"
10004elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
10005 TARGET_PTR="unsigned __int128"
10006else
10007 TARGET_PTR="unsigned long"
10008fi
10009
10010
10011ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
10012
10013
39037522 10014
b8e0a31c
SD
10015
10016# Check whether --with-jit-reader-dir was given.
10017if test "${with_jit_reader_dir+set}" = set; then :
10018 withval=$with_jit_reader_dir;
10019 JIT_READER_DIR=$withval
10020else
10021 JIT_READER_DIR=${libdir}/gdb
10022fi
10023
10024
10025 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10026 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10027 ac_define_dir=`eval echo $JIT_READER_DIR`
10028 ac_define_dir=`eval echo $ac_define_dir`
10029
10030cat >>confdefs.h <<_ACEOF
10031#define JIT_READER_DIR "$ac_define_dir"
10032_ACEOF
10033
10034
10035
10036
10037 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10038 if test "x$prefix" = xNONE; then
10039 test_prefix=/usr/local
10040 else
10041 test_prefix=$prefix
10042 fi
10043 else
10044 test_prefix=$exec_prefix
10045 fi
10046 value=0
10047 case ${ac_define_dir} in
10048 "${test_prefix}"|"${test_prefix}/"*|\
10049 '${exec_prefix}'|'${exec_prefix}/'*)
10050 value=1
10051 ;;
10052 esac
10053
10054cat >>confdefs.h <<_ACEOF
10055#define JIT_READER_DIR_RELOCATABLE $value
10056_ACEOF
10057
10058
10059
10060
10061
81ecdfbb
RW
10062# Check whether --with-expat was given.
10063if test "${with_expat+set}" = set; then :
10064 withval=$with_expat;
5c39566f
DJ
10065else
10066 with_expat=auto
81ecdfbb
RW
10067fi
10068
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
10070$as_echo_n "checking whether to use expat... " >&6; }
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
10072$as_echo "$with_expat" >&6; }
5c39566f
DJ
10073
10074if test "${with_expat}" = no; then
81ecdfbb
RW
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
10076$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
10077 HAVE_LIBEXPAT=no
10078else
10079
3841debe
DJ
10080 if test "X$prefix" = "XNONE"; then
10081 acl_final_prefix="$ac_default_prefix"
10082 else
10083 acl_final_prefix="$prefix"
10084 fi
10085 if test "X$exec_prefix" = "XNONE"; then
10086 acl_final_exec_prefix='${prefix}'
10087 else
10088 acl_final_exec_prefix="$exec_prefix"
10089 fi
10090 acl_save_prefix="$prefix"
10091 prefix="$acl_final_prefix"
10092 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10093 prefix="$acl_save_prefix"
10094
10095
81ecdfbb
RW
10096# Check whether --with-gnu-ld was given.
10097if test "${with_gnu_ld+set}" = set; then :
10098 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
10099else
10100 with_gnu_ld=no
81ecdfbb
RW
10101fi
10102
3841debe
DJ
10103# Prepare PATH_SEPARATOR.
10104# The user is always right.
10105if test "${PATH_SEPARATOR+set}" != set; then
10106 echo "#! /bin/sh" >conf$$.sh
10107 echo "exit 0" >>conf$$.sh
10108 chmod +x conf$$.sh
10109 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10110 PATH_SEPARATOR=';'
10111 else
10112 PATH_SEPARATOR=:
10113 fi
10114 rm -f conf$$.sh
10115fi
10116ac_prog=ld
10117if test "$GCC" = yes; then
10118 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
10120$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
10121 case $host in
10122 *-*-mingw*)
10123 # gcc leaves a trailing carriage return which upsets mingw
10124 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10125 *)
10126 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10127 esac
10128 case $ac_prog in
10129 # Accept absolute paths.
10130 [\\/]* | [A-Za-z]:[\\/]*)
10131 re_direlt='/[^/][^/]*/\.\./'
10132 # Canonicalize the path of ld
10133 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10134 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10135 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10136 done
10137 test -z "$LD" && LD="$ac_prog"
10138 ;;
10139 "")
10140 # If it fails, then pretend we aren't using GCC.
10141 ac_prog=ld
10142 ;;
10143 *)
10144 # If it is relative, then search for the first ld in PATH.
10145 with_gnu_ld=unknown
10146 ;;
10147 esac
10148elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10150$as_echo_n "checking for GNU ld... " >&6; }
3841debe 10151else
81ecdfbb
RW
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10153$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 10154fi
81ecdfbb
RW
10155if test "${acl_cv_path_LD+set}" = set; then :
10156 $as_echo_n "(cached) " >&6
3841debe
DJ
10157else
10158 if test -z "$LD"; then
10159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10160 for ac_dir in $PATH; do
10161 test -z "$ac_dir" && ac_dir=.
10162 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10163 acl_cv_path_LD="$ac_dir/$ac_prog"
10164 # Check to see if the program is GNU ld. I'd rather use --version,
10165 # but apparently some GNU ld's only accept -v.
10166 # Break only if it was the GNU/non-GNU ld that we prefer.
10167 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10168 test "$with_gnu_ld" != no && break
10169 else
10170 test "$with_gnu_ld" != yes && break
10171 fi
10172 fi
10173 done
10174 IFS="$ac_save_ifs"
10175else
10176 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10177fi
10178fi
10179
10180LD="$acl_cv_path_LD"
10181if test -n "$LD"; then
81ecdfbb
RW
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10183$as_echo "$LD" >&6; }
3841debe 10184else
81ecdfbb
RW
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
3841debe 10187fi
81ecdfbb
RW
10188test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10190$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10191if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10192 $as_echo_n "(cached) " >&6
3841debe
DJ
10193else
10194 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10195if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10196 acl_cv_prog_gnu_ld=yes
10197else
10198 acl_cv_prog_gnu_ld=no
10199fi
10200fi
81ecdfbb
RW
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10202$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10203with_gnu_ld=$acl_cv_prog_gnu_ld
10204
10205
10206
81ecdfbb
RW
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10208$as_echo_n "checking for shared library run path origin... " >&6; }
10209if test "${acl_cv_rpath+set}" = set; then :
10210 $as_echo_n "(cached) " >&6
3841debe
DJ
10211else
10212
10213 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10214 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10215 . ./conftest.sh
10216 rm -f ./conftest.sh
10217 acl_cv_rpath=done
10218
10219fi
81ecdfbb
RW
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10221$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10222 wl="$acl_cv_wl"
10223 libext="$acl_cv_libext"
10224 shlibext="$acl_cv_shlibext"
10225 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10226 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10227 hardcode_direct="$acl_cv_hardcode_direct"
10228 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10229 # Check whether --enable-rpath was given.
10230if test "${enable_rpath+set}" = set; then :
10231 enableval=$enable_rpath; :
3841debe
DJ
10232else
10233 enable_rpath=yes
81ecdfbb
RW
10234fi
10235
3841debe
DJ
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245 use_additional=yes
10246
10247 acl_save_prefix="$prefix"
10248 prefix="$acl_final_prefix"
10249 acl_save_exec_prefix="$exec_prefix"
10250 exec_prefix="$acl_final_exec_prefix"
10251
10252 eval additional_includedir=\"$includedir\"
10253 eval additional_libdir=\"$libdir\"
10254
10255 exec_prefix="$acl_save_exec_prefix"
10256 prefix="$acl_save_prefix"
10257
10258
81ecdfbb
RW
10259# Check whether --with-libexpat-prefix was given.
10260if test "${with_libexpat_prefix+set}" = set; then :
10261 withval=$with_libexpat_prefix;
3841debe
DJ
10262 if test "X$withval" = "Xno"; then
10263 use_additional=no
10264 else
10265 if test "X$withval" = "X"; then
10266
10267 acl_save_prefix="$prefix"
10268 prefix="$acl_final_prefix"
10269 acl_save_exec_prefix="$exec_prefix"
10270 exec_prefix="$acl_final_exec_prefix"
10271
10272 eval additional_includedir=\"$includedir\"
10273 eval additional_libdir=\"$libdir\"
10274
10275 exec_prefix="$acl_save_exec_prefix"
10276 prefix="$acl_save_prefix"
10277
10278 else
10279 additional_includedir="$withval/include"
10280 additional_libdir="$withval/lib"
10281 fi
10282 fi
10283
81ecdfbb
RW
10284fi
10285
3841debe
DJ
10286 LIBEXPAT=
10287 LTLIBEXPAT=
10288 INCEXPAT=
10289 rpathdirs=
10290 ltrpathdirs=
10291 names_already_handled=
10292 names_next_round='expat '
10293 while test -n "$names_next_round"; do
10294 names_this_round="$names_next_round"
10295 names_next_round=
10296 for name in $names_this_round; do
10297 already_handled=
10298 for n in $names_already_handled; do
10299 if test "$n" = "$name"; then
10300 already_handled=yes
10301 break
10302 fi
10303 done
10304 if test -z "$already_handled"; then
10305 names_already_handled="$names_already_handled $name"
10306 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10307 eval value=\"\$HAVE_LIB$uppername\"
10308 if test -n "$value"; then
10309 if test "$value" = yes; then
10310 eval value=\"\$LIB$uppername\"
10311 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10312 eval value=\"\$LTLIB$uppername\"
10313 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10314 else
10315 :
10316 fi
10317 else
10318 found_dir=
10319 found_la=
10320 found_so=
10321 found_a=
10322 if test $use_additional = yes; then
10323 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10324 found_dir="$additional_libdir"
10325 found_so="$additional_libdir/lib$name.$shlibext"
10326 if test -f "$additional_libdir/lib$name.la"; then
10327 found_la="$additional_libdir/lib$name.la"
10328 fi
10329 else
10330 if test -f "$additional_libdir/lib$name.$libext"; then
10331 found_dir="$additional_libdir"
10332 found_a="$additional_libdir/lib$name.$libext"
10333 if test -f "$additional_libdir/lib$name.la"; then
10334 found_la="$additional_libdir/lib$name.la"
10335 fi
10336 fi
10337 fi
10338 fi
10339 if test "X$found_dir" = "X"; then
10340 for x in $LDFLAGS $LTLIBEXPAT; do
10341
10342 acl_save_prefix="$prefix"
10343 prefix="$acl_final_prefix"
10344 acl_save_exec_prefix="$exec_prefix"
10345 exec_prefix="$acl_final_exec_prefix"
10346 eval x=\"$x\"
10347 exec_prefix="$acl_save_exec_prefix"
10348 prefix="$acl_save_prefix"
10349
10350 case "$x" in
10351 -L*)
10352 dir=`echo "X$x" | sed -e 's/^X-L//'`
10353 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10354 found_dir="$dir"
10355 found_so="$dir/lib$name.$shlibext"
10356 if test -f "$dir/lib$name.la"; then
10357 found_la="$dir/lib$name.la"
10358 fi
10359 else
10360 if test -f "$dir/lib$name.$libext"; then
10361 found_dir="$dir"
10362 found_a="$dir/lib$name.$libext"
10363 if test -f "$dir/lib$name.la"; then
10364 found_la="$dir/lib$name.la"
10365 fi
10366 fi
10367 fi
10368 ;;
10369 esac
10370 if test "X$found_dir" != "X"; then
10371 break
10372 fi
10373 done
10374 fi
10375 if test "X$found_dir" != "X"; then
10376 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10377 if test "X$found_so" != "X"; then
10378 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10379 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10380 else
10381 haveit=
10382 for x in $ltrpathdirs; do
10383 if test "X$x" = "X$found_dir"; then
10384 haveit=yes
10385 break
10386 fi
10387 done
10388 if test -z "$haveit"; then
10389 ltrpathdirs="$ltrpathdirs $found_dir"
10390 fi
10391 if test "$hardcode_direct" = yes; then
10392 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10393 else
10394 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10395 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10396 haveit=
10397 for x in $rpathdirs; do
10398 if test "X$x" = "X$found_dir"; then
10399 haveit=yes
10400 break
10401 fi
10402 done
10403 if test -z "$haveit"; then
10404 rpathdirs="$rpathdirs $found_dir"
10405 fi
10406 else
10407 haveit=
10408 for x in $LDFLAGS $LIBEXPAT; do
10409
10410 acl_save_prefix="$prefix"
10411 prefix="$acl_final_prefix"
10412 acl_save_exec_prefix="$exec_prefix"
10413 exec_prefix="$acl_final_exec_prefix"
10414 eval x=\"$x\"
10415 exec_prefix="$acl_save_exec_prefix"
10416 prefix="$acl_save_prefix"
10417
10418 if test "X$x" = "X-L$found_dir"; then
10419 haveit=yes
10420 break
10421 fi
10422 done
10423 if test -z "$haveit"; then
10424 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10425 fi
10426 if test "$hardcode_minus_L" != no; then
10427 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10428 else
10429 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10430 fi
10431 fi
10432 fi
10433 fi
10434 else
10435 if test "X$found_a" != "X"; then
10436 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10437 else
10438 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10439 fi
10440 fi
10441 additional_includedir=
10442 case "$found_dir" in
10443 */lib | */lib/)
10444 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10445 additional_includedir="$basedir/include"
10446 ;;
10447 esac
10448 if test "X$additional_includedir" != "X"; then
10449 if test "X$additional_includedir" != "X/usr/include"; then
10450 haveit=
10451 if test "X$additional_includedir" = "X/usr/local/include"; then
10452 if test -n "$GCC"; then
10453 case $host_os in
10454 linux*) haveit=yes;;
10455 esac
10456 fi
10457 fi
10458 if test -z "$haveit"; then
10459 for x in $CPPFLAGS $INCEXPAT; do
10460
10461 acl_save_prefix="$prefix"
10462 prefix="$acl_final_prefix"
10463 acl_save_exec_prefix="$exec_prefix"
10464 exec_prefix="$acl_final_exec_prefix"
10465 eval x=\"$x\"
10466 exec_prefix="$acl_save_exec_prefix"
10467 prefix="$acl_save_prefix"
10468
10469 if test "X$x" = "X-I$additional_includedir"; then
10470 haveit=yes
10471 break
10472 fi
10473 done
10474 if test -z "$haveit"; then
10475 if test -d "$additional_includedir"; then
10476 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10477 fi
10478 fi
10479 fi
10480 fi
10481 fi
10482 if test -n "$found_la"; then
10483 save_libdir="$libdir"
10484 case "$found_la" in
10485 */* | *\\*) . "$found_la" ;;
10486 *) . "./$found_la" ;;
10487 esac
10488 libdir="$save_libdir"
10489 for dep in $dependency_libs; do
10490 case "$dep" in
10491 -L*)
10492 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10493 if test "X$additional_libdir" != "X/usr/lib"; then
10494 haveit=
10495 if test "X$additional_libdir" = "X/usr/local/lib"; then
10496 if test -n "$GCC"; then
10497 case $host_os in
10498 linux*) haveit=yes;;
10499 esac
10500 fi
10501 fi
10502 if test -z "$haveit"; then
10503 haveit=
10504 for x in $LDFLAGS $LIBEXPAT; do
10505
10506 acl_save_prefix="$prefix"
10507 prefix="$acl_final_prefix"
10508 acl_save_exec_prefix="$exec_prefix"
10509 exec_prefix="$acl_final_exec_prefix"
10510 eval x=\"$x\"
10511 exec_prefix="$acl_save_exec_prefix"
10512 prefix="$acl_save_prefix"
10513
10514 if test "X$x" = "X-L$additional_libdir"; then
10515 haveit=yes
10516 break
10517 fi
10518 done
10519 if test -z "$haveit"; then
10520 if test -d "$additional_libdir"; then
10521 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10522 fi
10523 fi
10524 haveit=
10525 for x in $LDFLAGS $LTLIBEXPAT; do
10526
10527 acl_save_prefix="$prefix"
10528 prefix="$acl_final_prefix"
10529 acl_save_exec_prefix="$exec_prefix"
10530 exec_prefix="$acl_final_exec_prefix"
10531 eval x=\"$x\"
10532 exec_prefix="$acl_save_exec_prefix"
10533 prefix="$acl_save_prefix"
10534
10535 if test "X$x" = "X-L$additional_libdir"; then
10536 haveit=yes
10537 break
10538 fi
10539 done
10540 if test -z "$haveit"; then
10541 if test -d "$additional_libdir"; then
10542 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10543 fi
10544 fi
10545 fi
10546 fi
10547 ;;
10548 -R*)
10549 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10550 if test "$enable_rpath" != no; then
10551 haveit=
10552 for x in $rpathdirs; do
10553 if test "X$x" = "X$dir"; then
10554 haveit=yes
10555 break
10556 fi
10557 done
10558 if test -z "$haveit"; then
10559 rpathdirs="$rpathdirs $dir"
10560 fi
10561 haveit=
10562 for x in $ltrpathdirs; do
10563 if test "X$x" = "X$dir"; then
10564 haveit=yes
10565 break
10566 fi
10567 done
10568 if test -z "$haveit"; then
10569 ltrpathdirs="$ltrpathdirs $dir"
10570 fi
10571 fi
10572 ;;
10573 -l*)
10574 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10575 ;;
10576 *.la)
10577 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10578 ;;
10579 *)
10580 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10581 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10582 ;;
81ecdfbb
RW
10583 esac
10584 done
10585 fi
10586 else
10587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10588 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10589 fi
10590 fi
10591 fi
10592 done
10593 done
10594 if test "X$rpathdirs" != "X"; then
10595 if test -n "$hardcode_libdir_separator"; then
10596 alldirs=
10597 for found_dir in $rpathdirs; do
10598 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10599 done
10600 acl_save_libdir="$libdir"
10601 libdir="$alldirs"
10602 eval flag=\"$hardcode_libdir_flag_spec\"
10603 libdir="$acl_save_libdir"
10604 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10605 else
10606 for found_dir in $rpathdirs; do
10607 acl_save_libdir="$libdir"
10608 libdir="$found_dir"
10609 eval flag=\"$hardcode_libdir_flag_spec\"
10610 libdir="$acl_save_libdir"
10611 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10612 done
10613 fi
10614 fi
10615 if test "X$ltrpathdirs" != "X"; then
10616 for found_dir in $ltrpathdirs; do
10617 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10618 done
10619 fi
a9322a30
TT
10620
10621
81ecdfbb 10622 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10623
81ecdfbb
RW
10624 for element in $INCEXPAT; do
10625 haveit=
10626 for x in $CPPFLAGS; do
a9322a30 10627
81ecdfbb
RW
10628 acl_save_prefix="$prefix"
10629 prefix="$acl_final_prefix"
10630 acl_save_exec_prefix="$exec_prefix"
10631 exec_prefix="$acl_final_exec_prefix"
10632 eval x=\"$x\"
10633 exec_prefix="$acl_save_exec_prefix"
10634 prefix="$acl_save_prefix"
a8111142 10635
81ecdfbb
RW
10636 if test "X$x" = "X$element"; then
10637 haveit=yes
10638 break
10639 fi
10640 done
10641 if test -z "$haveit"; then
10642 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10643 fi
10644 done
a9322a30
TT
10645
10646
81ecdfbb
RW
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10648$as_echo_n "checking for libexpat... " >&6; }
10649if test "${ac_cv_libexpat+set}" = set; then :
10650 $as_echo_n "(cached) " >&6
bec39cab 10651else
bec39cab 10652
81ecdfbb
RW
10653 ac_save_LIBS="$LIBS"
10654 LIBS="$LIBS $LIBEXPAT"
10655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10656/* end confdefs.h. */
81ecdfbb
RW
10657#include "expat.h"
10658int
10659main ()
10660{
10661XML_Parser p = XML_ParserCreate (0);
10662 ;
10663 return 0;
10664}
bec39cab 10665_ACEOF
81ecdfbb
RW
10666if ac_fn_c_try_link "$LINENO"; then :
10667 ac_cv_libexpat=yes
c906108c 10668else
81ecdfbb 10669 ac_cv_libexpat=no
bec39cab 10670fi
81ecdfbb
RW
10671rm -f core conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
10673 LIBS="$ac_save_LIBS"
c906108c 10674
95ca63c4 10675fi
81ecdfbb
RW
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10677$as_echo "$ac_cv_libexpat" >&6; }
10678 if test "$ac_cv_libexpat" = yes; then
10679 HAVE_LIBEXPAT=yes
bec39cab 10680
81ecdfbb 10681$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10682
81ecdfbb
RW
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10684$as_echo_n "checking how to link with libexpat... " >&6; }
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10686$as_echo "$LIBEXPAT" >&6; }
10687 else
10688 HAVE_LIBEXPAT=no
10689 CPPFLAGS="$ac_save_CPPFLAGS"
10690 LIBEXPAT=
10691 LTLIBEXPAT=
10692 fi
95ca63c4
CF
10693
10694
10695
7cb9022a
MK
10696
10697
bec39cab 10698
81ecdfbb
RW
10699 if test "$HAVE_LIBEXPAT" != yes; then
10700 if test "$with_expat" = yes; then
10701 as_fn_error "expat is missing or unusable" "$LINENO" 5
10702 else
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10704$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10705 fi
10706 else
10707 save_LIBS=$LIBS
10708 LIBS="$LIBS $LIBEXPAT"
10709 for ac_func in XML_StopParser
10710do :
10711 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10712if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10713 cat >>confdefs.h <<_ACEOF
81ecdfbb 10714#define HAVE_XML_STOPPARSER 1
bec39cab 10715_ACEOF
95ca63c4 10716
bec39cab 10717fi
bec39cab 10718done
95ca63c4 10719
81ecdfbb
RW
10720 LIBS=$save_LIBS
10721 fi
a9322a30
TT
10722fi
10723
a9322a30 10724
a9322a30
TT
10725
10726
ec685c5e 10727
0c4a4063 10728
81ecdfbb
RW
10729# Check whether --with-python was given.
10730if test "${with_python+set}" = set; then :
10731 withval=$with_python;
bec39cab 10732else
81ecdfbb 10733 with_python=auto
bec39cab 10734fi
bec39cab 10735
81ecdfbb
RW
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10737$as_echo_n "checking whether to use python... " >&6; }
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10739$as_echo "$with_python" >&6; }
9a156167 10740
81ecdfbb
RW
10741if test "${with_python}" = no; then
10742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10743$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10744 have_libpython=no
bec39cab 10745else
81ecdfbb 10746 case "${with_python}" in
81ecdfbb 10747 /*)
ec685c5e
DE
10748 if test -d ${with_python}; then
10749 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10750 python_prog="${with_python}/bin/python"
0c4a4063 10751 python_prefix=
9c4ea6c5
JB
10752 # If python does not exit ${with_python}/bin, then try in
10753 # ${with_python}. On Windows/MinGW, this is where the Python
10754 # executable is.
10755 if test ! -x "${python_prog}"; then
10756 python_prog="${with_python}/python"
10757 python_prefix=
10758 fi
e7a30f46 10759 if test ! -x "${python_prog}"; then
ec685c5e
DE
10760 # Fall back to gdb 7.0/7.1 behaviour.
10761 python_prog=missing
0c4a4063 10762 python_prefix=${with_python}
ec685c5e 10763 fi
e7a30f46 10764 elif test -x "${with_python}"; then
ec685c5e
DE
10765 # While we can't run python compiled for $host (unless host == build),
10766 # the user could write a script that provides the needed information,
10767 # so we support that.
ec685c5e 10768 python_prog=${with_python}
0c4a4063 10769 python_prefix=
ec685c5e
DE
10770 else
10771 as_fn_error "invalid value for --with-python" "$LINENO" 5
10772 fi
81ecdfbb 10773 ;;
ec685c5e
DE
10774 */*)
10775 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10776 as_fn_error "invalid value for --with-python" "$LINENO" 5
10777 ;;
ec685c5e
DE
10778 *)
10779 # The user has either specified auto, yes, or the name of the python
10780 # program assumed to be in $PATH.
10781 python_prefix=
10782 case "${with_python}" in
10783 yes | auto)
10784 if test ${build} = ${host}; then
10785 # Extract the first word of "python", so it can be a program name with args.
10786set dummy python; ac_word=$2
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10788$as_echo_n "checking for $ac_word... " >&6; }
10789if test "${ac_cv_path_python_prog_path+set}" = set; then :
10790 $as_echo_n "(cached) " >&6
10791else
10792 case $python_prog_path in
10793 [\\/]* | ?:[\\/]*)
10794 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10795 ;;
10796 *)
10797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10798for as_dir in $PATH
10799do
10800 IFS=$as_save_IFS
10801 test -z "$as_dir" && as_dir=.
10802 for ac_exec_ext in '' $ac_executable_extensions; do
10803 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10804 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10806 break 2
10807 fi
10808done
10809 done
10810IFS=$as_save_IFS
10811
10812 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10813 ;;
10814esac
10815fi
10816python_prog_path=$ac_cv_path_python_prog_path
10817if test -n "$python_prog_path"; then
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10819$as_echo "$python_prog_path" >&6; }
10820else
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
10823fi
10824
10825
10826 if test "${python_prog_path}" = missing; then
10827 python_prog=missing
10828 else
10829 python_prog=${python_prog_path}
10830 fi
10831 else
10832 # Not much we can do except assume the cross-compiler will find the
10833 # right files.
10834 python_prog=missing
10835 fi
10836 ;;
10837 *)
10838 # While we can't run python compiled for $host (unless host == build),
10839 # the user could write a script that provides the needed information,
10840 # so we support that.
10841 python_prog="${with_python}"
10842 # Extract the first word of "${python_prog}", so it can be a program name with args.
10843set dummy ${python_prog}; ac_word=$2
10844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10845$as_echo_n "checking for $ac_word... " >&6; }
10846if test "${ac_cv_path_python_prog_path+set}" = set; then :
10847 $as_echo_n "(cached) " >&6
10848else
10849 case $python_prog_path in
10850 [\\/]* | ?:[\\/]*)
10851 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10852 ;;
10853 *)
10854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10855for as_dir in $PATH
10856do
10857 IFS=$as_save_IFS
10858 test -z "$as_dir" && as_dir=.
10859 for ac_exec_ext in '' $ac_executable_extensions; do
10860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10861 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10863 break 2
10864 fi
10865done
10866 done
10867IFS=$as_save_IFS
10868
10869 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10870 ;;
10871esac
10872fi
10873python_prog_path=$ac_cv_path_python_prog_path
10874if test -n "$python_prog_path"; then
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10876$as_echo "$python_prog_path" >&6; }
10877else
10878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879$as_echo "no" >&6; }
10880fi
10881
10882
10883 if test "${python_prog_path}" = missing; then
10884 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10885 fi
10886 ;;
10887 esac
81ecdfbb
RW
10888 esac
10889
ec685c5e 10890 if test "${python_prog}" != missing; then
e7a30f46
DE
10891 # We have a python program to use, but it may be too old.
10892 # Don't flag an error for --with-python=auto (the default).
10893 have_python_config=yes
ec685c5e
DE
10894 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10895 if test $? != 0; then
e7a30f46
DE
10896 have_python_config=failed
10897 if test "${with_python}" != auto; then
10898 as_fn_error "failure running python-config --includes" "$LINENO" 5
10899 fi
ec685c5e
DE
10900 fi
10901 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10902 if test $? != 0; then
e7a30f46
DE
10903 have_python_config=failed
10904 if test "${with_python}" != auto; then
10905 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10906 fi
ec685c5e 10907 fi
0c4a4063
DE
10908 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10909 if test $? != 0; then
e7a30f46
DE
10910 have_python_config=failed
10911 if test "${with_python}" != auto; then
10912 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10913 fi
0c4a4063 10914 fi
ec685c5e 10915 else
ac534cba
JB
10916 # We do not have a python executable we can use to determine where
10917 # to find the Python headers and libs. We cannot guess the include
10918 # path from the python_prefix either, because that include path
10919 # depends on the Python version. So, there is nothing much we can
10920 # do except assume that the compiler will be able to find those files.
10921 python_includes=
10922 python_libs=
0c4a4063 10923 have_python_config=no
ec685c5e 10924 fi
bec39cab 10925
ec685c5e
DE
10926 # If we have python-config, only try the configuration it provides.
10927 # Otherwise fallback on the old way of trying different versions of
10928 # python in turn.
81ecdfbb 10929
ec685c5e
DE
10930 have_libpython=no
10931 if test "${have_python_config}" = yes; then
c1039e3c
JB
10932 # Determine the Python version by extracting "-lpython<version>"
10933 # part of the python_libs. <version> is usually X.Y with X and Y
10934 # being decimal numbers, but can also be XY (seen on Windows).
10935 #
10936 # The extraction is performed using sed with a regular expression.
10937 # Initially, the regexp used was using the '?' quantifier to make
10938 # the dot in the version number optional. Unfortunately, this
10939 # does not work with non-GNU versions of sed because, because of
10940 # what looks like a limitation (the '?' quantifier does not work
10941 # with back-references). We work around this limitation by using
10942 # the '*' quantifier instead. It means that, in theory, we might
10943 # match unexpected version strings such as "-lpython2..7", but
10944 # this seems unlikely in practice. And even if that happens,
10945 # an error will be triggered later on, when checking that version
10946 # number.
ec685c5e 10947 python_version=`echo " ${python_libs} " \
c1039e3c 10948 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10949 case "${python_version}" in
10950 python*)
ec685c5e
DE
10951
10952 version=${python_version}
10953
10954 new_CPPFLAGS=${python_includes}
10955 new_LIBS=${python_libs}
81ecdfbb
RW
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10957$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10958 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10959 save_LIBS=$LIBS
ec685c5e
DE
10960 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10961 LIBS="$LIBS $new_LIBS"
10962 found_usable_python=no
81ecdfbb 10963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10964/* end confdefs.h. */
ac534cba 10965#include "Python.h"
81ecdfbb
RW
10966int
10967main ()
10968{
10969Py_Initialize ();
10970 ;
10971 return 0;
10972}
bec39cab 10973_ACEOF
81ecdfbb 10974if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10975 have_libpython=${version}
10976 found_usable_python=yes
ac534cba
JB
10977 PYTHON_CPPFLAGS=$new_CPPFLAGS
10978 PYTHON_LIBS=$new_LIBS
9a156167 10979fi
81ecdfbb
RW
10980rm -f core conftest.err conftest.$ac_objext \
10981 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10982 CPPFLAGS=$save_CPPFLAGS
10983 LIBS=$save_LIBS
ec685c5e
DE
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10985$as_echo "${found_usable_python}" >&6; }
9a156167 10986
0c4a4063
DE
10987 ;;
10988 *)
ec685c5e 10989 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10990 ;;
10991 esac
e7a30f46 10992 elif test "${have_python_config}" != failed; then
ec685c5e 10993 if test "${have_libpython}" = no; then
9a156167 10994
420697bb
TT
10995 version=python2.7
10996
10997 new_CPPFLAGS=${python_includes}
10998 new_LIBS="${python_libs} -lpython2.7"
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11000$as_echo_n "checking for ${version}... " >&6; }
11001 save_CPPFLAGS=$CPPFLAGS
11002 save_LIBS=$LIBS
11003 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11004 LIBS="$LIBS $new_LIBS"
11005 found_usable_python=no
11006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11007/* end confdefs.h. */
ac534cba 11008#include "Python.h"
420697bb
TT
11009int
11010main ()
11011{
11012Py_Initialize ();
11013 ;
11014 return 0;
11015}
11016_ACEOF
11017if ac_fn_c_try_link "$LINENO"; then :
11018 have_libpython=${version}
11019 found_usable_python=yes
ac534cba
JB
11020 PYTHON_CPPFLAGS=$new_CPPFLAGS
11021 PYTHON_LIBS=$new_LIBS
420697bb
TT
11022fi
11023rm -f core conftest.err conftest.$ac_objext \
11024 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11025 CPPFLAGS=$save_CPPFLAGS
11026 LIBS=$save_LIBS
420697bb
TT
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11028$as_echo "${found_usable_python}" >&6; }
11029
11030 fi
11031 if test "${have_libpython}" = no; then
11032
ec685c5e
DE
11033 version=python2.6
11034
11035 new_CPPFLAGS=${python_includes}
11036 new_LIBS="${python_libs} -lpython2.6"
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11038$as_echo_n "checking for ${version}... " >&6; }
11039 save_CPPFLAGS=$CPPFLAGS
11040 save_LIBS=$LIBS
11041 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11042 LIBS="$LIBS $new_LIBS"
11043 found_usable_python=no
11044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11045/* end confdefs.h. */
ac534cba 11046#include "Python.h"
ec685c5e
DE
11047int
11048main ()
11049{
11050Py_Initialize ();
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055if ac_fn_c_try_link "$LINENO"; then :
11056 have_libpython=${version}
11057 found_usable_python=yes
ac534cba
JB
11058 PYTHON_CPPFLAGS=$new_CPPFLAGS
11059 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
11060fi
11061rm -f core conftest.err conftest.$ac_objext \
11062 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11063 CPPFLAGS=$save_CPPFLAGS
11064 LIBS=$save_LIBS
ec685c5e
DE
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11066$as_echo "${found_usable_python}" >&6; }
9a156167 11067
81ecdfbb 11068 fi
ec685c5e 11069 if test ${have_libpython} = no; then
9a156167 11070
81ecdfbb 11071 version=python2.5
9a156167 11072
ec685c5e
DE
11073 new_CPPFLAGS=${python_includes}
11074 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11076$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11077 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11078 save_LIBS=$LIBS
ec685c5e
DE
11079 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11080 LIBS="$LIBS $new_LIBS"
11081 found_usable_python=no
81ecdfbb 11082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11083/* end confdefs.h. */
ac534cba 11084#include "Python.h"
81ecdfbb
RW
11085int
11086main ()
11087{
11088Py_Initialize ();
11089 ;
11090 return 0;
11091}
436868fb 11092_ACEOF
81ecdfbb 11093if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11094 have_libpython=${version}
11095 found_usable_python=yes
ac534cba
JB
11096 PYTHON_CPPFLAGS=$new_CPPFLAGS
11097 PYTHON_LIBS=$new_LIBS
436868fb 11098fi
81ecdfbb
RW
11099rm -f core conftest.err conftest.$ac_objext \
11100 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11101 CPPFLAGS=$save_CPPFLAGS
11102 LIBS=$save_LIBS
ec685c5e
DE
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11104$as_echo "${found_usable_python}" >&6; }
a9322a30 11105
81ecdfbb 11106 fi
ec685c5e 11107 if test ${have_libpython} = no; then
a9322a30 11108
81ecdfbb 11109 version=python2.4
a9322a30 11110
ec685c5e
DE
11111 new_CPPFLAGS=${python_includes}
11112 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11114$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11115 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11116 save_LIBS=$LIBS
ec685c5e
DE
11117 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11118 LIBS="$LIBS $new_LIBS"
11119 found_usable_python=no
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11121/* end confdefs.h. */
ac534cba 11122#include "Python.h"
a9322a30
TT
11123int
11124main ()
11125{
81ecdfbb 11126Py_Initialize ();
a9322a30
TT
11127 ;
11128 return 0;
11129}
436868fb 11130_ACEOF
81ecdfbb 11131if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11132 have_libpython=${version}
11133 found_usable_python=yes
ac534cba
JB
11134 PYTHON_CPPFLAGS=$new_CPPFLAGS
11135 PYTHON_LIBS=$new_LIBS
436868fb 11136fi
81ecdfbb
RW
11137rm -f core conftest.err conftest.$ac_objext \
11138 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11139 CPPFLAGS=$save_CPPFLAGS
11140 LIBS=$save_LIBS
ec685c5e
DE
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11142$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11143
ec685c5e
DE
11144 fi
11145 fi
9c4ea6c5 11146 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
11147
11148$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
11149
9c4ea6c5 11150 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
11151
11152$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
11153
9c4ea6c5 11154 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
11155
11156$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
11157
9c4ea6c5 11158 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
11159
11160$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
11161
81ecdfbb 11162 fi
ec685c5e
DE
11163
11164 if test "${have_libpython}" = no; then
81ecdfbb
RW
11165 case "${with_python}" in
11166 yes)
11167 as_fn_error "python is missing or unusable" "$LINENO" 5
11168 ;;
11169 auto)
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11171$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11172 ;;
11173 *)
11174 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11175 ;;
11176 esac
0c4a4063
DE
11177 else
11178 if test -n "${python_prefix}"; then
11179
11180cat >>confdefs.h <<_ACEOF
11181#define WITH_PYTHON_PATH "${python_prefix}"
11182_ACEOF
11183
11184
11185 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11186 if test "x$prefix" = xNONE; then
11187 test_prefix=/usr/local
11188 else
11189 test_prefix=$prefix
11190 fi
11191 else
11192 test_prefix=$exec_prefix
11193 fi
11194 value=0
11195 case ${python_prefix} in
11196 "${test_prefix}"|"${test_prefix}/"*|\
11197 '${exec_prefix}'|'${exec_prefix}/'*)
11198 value=1
11199 ;;
11200 esac
11201
11202cat >>confdefs.h <<_ACEOF
11203#define PYTHON_PATH_RELOCATABLE $value
11204_ACEOF
11205
11206
11207 fi
81ecdfbb 11208 fi
436868fb 11209fi
436868fb 11210
ec685c5e 11211if test "${have_libpython}" != no; then
436868fb 11212
81ecdfbb 11213$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11214
81ecdfbb
RW
11215 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11216 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11217 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11218 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11219 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11220
81ecdfbb
RW
11221 # Flags needed to compile Python code (taken from python-config --cflags).
11222 # We cannot call python-config directly because it will output whatever was
11223 # used when compiling the Python interpreter itself, including flags which
11224 # would make the python-related objects be compiled differently from the
11225 # rest of GDB (e.g., -O2 and -fPIC).
11226 if test "${GCC}" = yes; then
11227 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11228 fi
436868fb 11229
81ecdfbb
RW
11230 if test "x${tentative_python_cflags}" != x; then
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11232$as_echo_n "checking compiler flags for python code... " >&6; }
11233 for flag in ${tentative_python_cflags}; do
11234 # Check that the compiler accepts it
11235 saved_CFLAGS="$CFLAGS"
11236 CFLAGS="$CFLAGS $flag"
11237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11238/* end confdefs.h. */
81ecdfbb 11239
a9322a30
TT
11240int
11241main ()
11242{
a9322a30
TT
11243
11244 ;
11245 return 0;
11246}
bec39cab 11247_ACEOF
81ecdfbb
RW
11248if ac_fn_c_try_compile "$LINENO"; then :
11249 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11250fi
81ecdfbb
RW
11251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11252 CFLAGS="$saved_CFLAGS"
11253 done
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11255$as_echo "${PYTHON_CFLAGS}" >&6; }
11256 fi
043b6510
JB
11257
11258 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11259 # #if _SGIAPI
11260 # #define siginfo __siginfo
11261 # #endif
11262 # The problem is that including Python causes some XOPEN macros to be
11263 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11264 # to false. So, we work around this issue by defining siginfo ourself
11265 # though the command-line.
11266 case "$gdb_host" in
11267 irix*) if test "${GCC}" = yes; then
11268 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11269 fi
11270 ;;
11271 esac
81ecdfbb
RW
11272else
11273 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11274 # included.
11275 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11276 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11277 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11278fi
9a156167 11279
9a156167 11280
ac534cba
JB
11281
11282
81ecdfbb
RW
11283# ------------------------- #
11284# Checks for header files. #
11285# ------------------------- #
c890192f 11286
81ecdfbb
RW
11287ac_header_dirent=no
11288for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11289 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11291$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11292if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11293 $as_echo_n "(cached) " >&6
bec39cab 11294else
81ecdfbb 11295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11296/* end confdefs.h. */
81ecdfbb
RW
11297#include <sys/types.h>
11298#include <$ac_hdr>
11299
a9322a30
TT
11300int
11301main ()
11302{
81ecdfbb
RW
11303if ((DIR *) 0)
11304return 0;
a9322a30
TT
11305 ;
11306 return 0;
11307}
bec39cab 11308_ACEOF
81ecdfbb
RW
11309if ac_fn_c_try_compile "$LINENO"; then :
11310 eval "$as_ac_Header=yes"
bec39cab 11311else
81ecdfbb 11312 eval "$as_ac_Header=no"
bec39cab 11313fi
81ecdfbb 11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11315fi
81ecdfbb
RW
11316eval ac_res=\$$as_ac_Header
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11318$as_echo "$ac_res" >&6; }
11319eval as_val=\$$as_ac_Header
11320 if test "x$as_val" = x""yes; then :
11321 cat >>confdefs.h <<_ACEOF
11322#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11323_ACEOF
bec39cab 11324
81ecdfbb
RW
11325ac_header_dirent=$ac_hdr; break
11326fi
bec39cab 11327
81ecdfbb
RW
11328done
11329# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11330if test $ac_header_dirent = dirent.h; then
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11332$as_echo_n "checking for library containing opendir... " >&6; }
11333if test "${ac_cv_search_opendir+set}" = set; then :
11334 $as_echo_n "(cached) " >&6
c890192f 11335else
81ecdfbb
RW
11336 ac_func_search_save_LIBS=$LIBS
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338/* end confdefs.h. */
11339
11340/* Override any GCC internal prototype to avoid an error.
11341 Use char because int might match the return type of a GCC
11342 builtin and then its argument prototype would still apply. */
11343#ifdef __cplusplus
11344extern "C"
11345#endif
11346char opendir ();
11347int
11348main ()
11349{
11350return opendir ();
11351 ;
11352 return 0;
11353}
bec39cab 11354_ACEOF
81ecdfbb
RW
11355for ac_lib in '' dir; do
11356 if test -z "$ac_lib"; then
11357 ac_res="none required"
11358 else
11359 ac_res=-l$ac_lib
11360 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11361 fi
11362 if ac_fn_c_try_link "$LINENO"; then :
11363 ac_cv_search_opendir=$ac_res
11364fi
11365rm -f core conftest.err conftest.$ac_objext \
11366 conftest$ac_exeext
11367 if test "${ac_cv_search_opendir+set}" = set; then :
11368 break
11369fi
11370done
11371if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11372
81ecdfbb
RW
11373else
11374 ac_cv_search_opendir=no
11375fi
11376rm conftest.$ac_ext
11377LIBS=$ac_func_search_save_LIBS
11378fi
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11380$as_echo "$ac_cv_search_opendir" >&6; }
11381ac_res=$ac_cv_search_opendir
11382if test "$ac_res" != no; then :
11383 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11384
bec39cab 11385fi
81ecdfbb 11386
bec39cab 11387else
81ecdfbb
RW
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11389$as_echo_n "checking for library containing opendir... " >&6; }
11390if test "${ac_cv_search_opendir+set}" = set; then :
11391 $as_echo_n "(cached) " >&6
11392else
11393 ac_func_search_save_LIBS=$LIBS
11394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11395/* end confdefs.h. */
81ecdfbb
RW
11396
11397/* Override any GCC internal prototype to avoid an error.
11398 Use char because int might match the return type of a GCC
11399 builtin and then its argument prototype would still apply. */
11400#ifdef __cplusplus
11401extern "C"
11402#endif
11403char opendir ();
a9322a30
TT
11404int
11405main ()
11406{
81ecdfbb 11407return opendir ();
a9322a30
TT
11408 ;
11409 return 0;
11410}
bec39cab 11411_ACEOF
81ecdfbb
RW
11412for ac_lib in '' x; do
11413 if test -z "$ac_lib"; then
11414 ac_res="none required"
11415 else
11416 ac_res=-l$ac_lib
11417 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11418 fi
11419 if ac_fn_c_try_link "$LINENO"; then :
11420 ac_cv_search_opendir=$ac_res
11421fi
11422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext
11424 if test "${ac_cv_search_opendir+set}" = set; then :
11425 break
11426fi
11427done
11428if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11429
81ecdfbb
RW
11430else
11431 ac_cv_search_opendir=no
bec39cab 11432fi
81ecdfbb
RW
11433rm conftest.$ac_ext
11434LIBS=$ac_func_search_save_LIBS
a9322a30 11435fi
81ecdfbb
RW
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11437$as_echo "$ac_cv_search_opendir" >&6; }
11438ac_res=$ac_cv_search_opendir
11439if test "$ac_res" != no; then :
11440 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11441
81ecdfbb 11442fi
bec39cab 11443
81ecdfbb 11444fi
bec39cab 11445
81ecdfbb
RW
11446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11447$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11448if test "${ac_cv_header_stat_broken+set}" = set; then :
11449 $as_echo_n "(cached) " >&6
9a156167 11450else
81ecdfbb
RW
11451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11452/* end confdefs.h. */
11453#include <sys/types.h>
11454#include <sys/stat.h>
11455
11456#if defined S_ISBLK && defined S_IFDIR
11457extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11458#endif
11459
11460#if defined S_ISBLK && defined S_IFCHR
11461extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11462#endif
11463
11464#if defined S_ISLNK && defined S_IFREG
11465extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11466#endif
11467
11468#if defined S_ISSOCK && defined S_IFREG
11469extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11470#endif
11471
bec39cab 11472_ACEOF
81ecdfbb
RW
11473if ac_fn_c_try_compile "$LINENO"; then :
11474 ac_cv_header_stat_broken=no
11475else
11476 ac_cv_header_stat_broken=yes
11477fi
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11479fi
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11481$as_echo "$ac_cv_header_stat_broken" >&6; }
11482if test $ac_cv_header_stat_broken = yes; then
9a156167 11483
81ecdfbb 11484$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11485
bec39cab 11486fi
81ecdfbb
RW
11487
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11489$as_echo_n "checking for ANSI C header files... " >&6; }
11490if test "${ac_cv_header_stdc+set}" = set; then :
11491 $as_echo_n "(cached) " >&6
bec39cab 11492else
81ecdfbb 11493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11494/* end confdefs.h. */
81ecdfbb
RW
11495#include <stdlib.h>
11496#include <stdarg.h>
11497#include <string.h>
11498#include <float.h>
11499
a9322a30
TT
11500int
11501main ()
11502{
a9322a30
TT
11503
11504 ;
11505 return 0;
11506}
bec39cab 11507_ACEOF
81ecdfbb
RW
11508if ac_fn_c_try_compile "$LINENO"; then :
11509 ac_cv_header_stdc=yes
bec39cab 11510else
81ecdfbb 11511 ac_cv_header_stdc=no
a9322a30 11512fi
81ecdfbb 11513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11514
81ecdfbb
RW
11515if test $ac_cv_header_stdc = yes; then
11516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518/* end confdefs.h. */
11519#include <string.h>
bec39cab 11520
81ecdfbb
RW
11521_ACEOF
11522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11523 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11524
bec39cab 11525else
81ecdfbb
RW
11526 ac_cv_header_stdc=no
11527fi
11528rm -f conftest*
11529
11530fi
11531
11532if test $ac_cv_header_stdc = yes; then
11533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535/* end confdefs.h. */
11536#include <stdlib.h>
11537
bec39cab 11538_ACEOF
81ecdfbb
RW
11539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11540 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11541
81ecdfbb
RW
11542else
11543 ac_cv_header_stdc=no
11544fi
11545rm -f conftest*
bec39cab 11546
bec39cab 11547fi
81ecdfbb
RW
11548
11549if test $ac_cv_header_stdc = yes; then
11550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11551 if test "$cross_compiling" = yes; then :
11552 :
bec39cab 11553else
81ecdfbb 11554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11555/* end confdefs.h. */
81ecdfbb
RW
11556#include <ctype.h>
11557#include <stdlib.h>
11558#if ((' ' & 0x0FF) == 0x020)
11559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11561#else
11562# define ISLOWER(c) \
11563 (('a' <= (c) && (c) <= 'i') \
11564 || ('j' <= (c) && (c) <= 'r') \
11565 || ('s' <= (c) && (c) <= 'z'))
11566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11567#endif
11568
11569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11570int
11571main ()
11572{
81ecdfbb
RW
11573 int i;
11574 for (i = 0; i < 256; i++)
11575 if (XOR (islower (i), ISLOWER (i))
11576 || toupper (i) != TOUPPER (i))
11577 return 2;
a9322a30
TT
11578 return 0;
11579}
bec39cab 11580_ACEOF
81ecdfbb
RW
11581if ac_fn_c_try_run "$LINENO"; then :
11582
bec39cab 11583else
81ecdfbb
RW
11584 ac_cv_header_stdc=no
11585fi
11586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11587 conftest.$ac_objext conftest.beam conftest.$ac_ext
11588fi
bec39cab 11589
bec39cab 11590fi
a9322a30 11591fi
81ecdfbb
RW
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11593$as_echo "$ac_cv_header_stdc" >&6; }
11594if test $ac_cv_header_stdc = yes; then
bec39cab 11595
81ecdfbb 11596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11597
81ecdfbb 11598fi
bec39cab 11599
81ecdfbb
RW
11600# elf_hp.h is for HP/UX 64-bit shared library support.
11601# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11602# unconditionally, so what's the point in checking these?
11603for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11604 thread_db.h gnu/libc-version.h signal.h stddef.h \
11605 stdlib.h string.h memory.h strings.h sys/fault.h \
11606 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11607 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11608 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11609 sys/types.h sys/wait.h wait.h termios.h termio.h \
11610 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11611do :
11612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11613ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11614eval as_val=\$$as_ac_Header
11615 if test "x$as_val" = x""yes; then :
bec39cab 11616 cat >>confdefs.h <<_ACEOF
81ecdfbb 11617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11618_ACEOF
c906108c 11619
bec39cab 11620fi
81ecdfbb
RW
11621
11622done
11623
11624for ac_header in link.h
11625do :
11626 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11627# include <sys/types.h>
11628#endif
11629#if HAVE_NLIST_H
11630# include <nlist.h>
a9322a30
TT
11631#endif
11632
81ecdfbb
RW
11633"
11634if test "x$ac_cv_header_link_h" = x""yes; then :
11635 cat >>confdefs.h <<_ACEOF
11636#define HAVE_LINK_H 1
bec39cab 11637_ACEOF
bec39cab 11638
a9322a30 11639fi
bec39cab 11640
81ecdfbb 11641done
c906108c 11642
81ecdfbb
RW
11643for ac_header in sys/proc.h
11644do :
11645 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11646# include <sys/param.h>
11647#endif
c906108c 11648
81ecdfbb
RW
11649"
11650if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11651 cat >>confdefs.h <<_ACEOF
81ecdfbb 11652#define HAVE_SYS_PROC_H 1
bec39cab 11653_ACEOF
5ee754fc 11654
bec39cab 11655fi
81ecdfbb
RW
11656
11657done
11658
11659for ac_header in sys/user.h
11660do :
11661 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11662# include <sys/param.h>
a9322a30
TT
11663#endif
11664
81ecdfbb
RW
11665"
11666if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11667 cat >>confdefs.h <<_ACEOF
11668#define HAVE_SYS_USER_H 1
bec39cab 11669_ACEOF
bec39cab 11670
a9322a30 11671fi
bec39cab 11672
81ecdfbb 11673done
5ee754fc 11674
5ee754fc 11675
81ecdfbb
RW
11676# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11677# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11678# think that we don't have <curses.h> if we're using GCC.
11679case $host_os in
11680 solaris2.[789])
11681 if test "$GCC" = yes; then
11682
11683$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11684
11685 fi ;;
11686esac
11687for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11688do :
11689 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11690ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11691eval as_val=\$$as_ac_Header
11692 if test "x$as_val" = x""yes; then :
bec39cab 11693 cat >>confdefs.h <<_ACEOF
81ecdfbb 11694#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11695_ACEOF
5ee754fc
MK
11696
11697fi
11698
81ecdfbb 11699done
bec39cab 11700
81ecdfbb
RW
11701for ac_header in term.h
11702do :
11703 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11704# include <curses.h>
11705#endif
bec39cab 11706
81ecdfbb
RW
11707"
11708if test "x$ac_cv_header_term_h" = x""yes; then :
11709 cat >>confdefs.h <<_ACEOF
11710#define HAVE_TERM_H 1
a8111142 11711_ACEOF
a8111142 11712
a8111142 11713fi
a8111142 11714
81ecdfbb 11715done
a8111142
TT
11716
11717
81ecdfbb
RW
11718# ------------------------- #
11719# Checks for declarations. #
11720# ------------------------- #
a9322a30 11721
81ecdfbb
RW
11722ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11723if test "x$ac_cv_have_decl_free" = x""yes; then :
11724 ac_have_decl=1
bec39cab 11725else
81ecdfbb
RW
11726 ac_have_decl=0
11727fi
11728
11729cat >>confdefs.h <<_ACEOF
11730#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11731_ACEOF
81ecdfbb
RW
11732ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11733if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11734 ac_have_decl=1
11735else
11736 ac_have_decl=0
11737fi
11738
11739cat >>confdefs.h <<_ACEOF
11740#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11741_ACEOF
81ecdfbb
RW
11742ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11743if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11744 ac_have_decl=1
bec39cab 11745else
81ecdfbb
RW
11746 ac_have_decl=0
11747fi
bec39cab 11748
81ecdfbb
RW
11749cat >>confdefs.h <<_ACEOF
11750#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11751_ACEOF
81ecdfbb
RW
11752ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11753if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11754 ac_have_decl=1
11755else
11756 ac_have_decl=0
11757fi
11758
11759cat >>confdefs.h <<_ACEOF
11760#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11761_ACEOF
81ecdfbb
RW
11762ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11763if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11764 ac_have_decl=1
bec39cab 11765else
81ecdfbb
RW
11766 ac_have_decl=0
11767fi
5ee754fc 11768
81ecdfbb
RW
11769cat >>confdefs.h <<_ACEOF
11770#define HAVE_DECL_STRSTR $ac_have_decl
11771_ACEOF
11772ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11773if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11774 ac_have_decl=1
11775else
11776 ac_have_decl=0
5ee754fc 11777fi
81ecdfbb
RW
11778
11779cat >>confdefs.h <<_ACEOF
11780#define HAVE_DECL_GETOPT $ac_have_decl
11781_ACEOF
11782ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11783if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11784 ac_have_decl=1
11785else
11786 ac_have_decl=0
5ee754fc 11787fi
81ecdfbb
RW
11788
11789cat >>confdefs.h <<_ACEOF
11790#define HAVE_DECL_SNPRINTF $ac_have_decl
11791_ACEOF
11792ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11793if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11794 ac_have_decl=1
11795else
11796 ac_have_decl=0
5ee754fc
MK
11797fi
11798
a9322a30 11799cat >>confdefs.h <<_ACEOF
81ecdfbb 11800#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11801_ACEOF
5ee754fc 11802
5ee754fc 11803
81ecdfbb
RW
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11805$as_echo_n "checking for LC_MESSAGES... " >&6; }
11806if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11807 $as_echo_n "(cached) " >&6
bec39cab 11808else
81ecdfbb 11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11810/* end confdefs.h. */
81ecdfbb 11811#include <locale.h>
a9322a30
TT
11812int
11813main ()
11814{
81ecdfbb 11815return LC_MESSAGES
a9322a30
TT
11816 ;
11817 return 0;
11818}
bec39cab 11819_ACEOF
81ecdfbb
RW
11820if ac_fn_c_try_link "$LINENO"; then :
11821 am_cv_val_LC_MESSAGES=yes
bec39cab 11822else
81ecdfbb
RW
11823 am_cv_val_LC_MESSAGES=no
11824fi
11825rm -f core conftest.err conftest.$ac_objext \
11826 conftest$ac_exeext conftest.$ac_ext
11827fi
11828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11829$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11830 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11831
81ecdfbb
RW
11832$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11833
11834 fi
11835
11836
11837# ----------------------- #
11838# Checks for structures. #
11839# ----------------------- #
11840
11841ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11842if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11843
11844cat >>confdefs.h <<_ACEOF
11845#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11846_ACEOF
7eb368b3 11847
81ecdfbb 11848
7eb368b3 11849fi
81ecdfbb
RW
11850ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11851if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11852
a9322a30
TT
11853cat >>confdefs.h <<_ACEOF
11854#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11855_ACEOF
11856
a9322a30 11857
7eb368b3
NR
11858fi
11859
7eb368b3 11860
a9322a30
TT
11861# ------------------ #
11862# Checks for types. #
11863# ------------------ #
7eb368b3 11864
81ecdfbb
RW
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11866$as_echo_n "checking return type of signal handlers... " >&6; }
11867if test "${ac_cv_type_signal+set}" = set; then :
11868 $as_echo_n "(cached) " >&6
bec39cab 11869else
81ecdfbb 11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11871/* end confdefs.h. */
a9322a30
TT
11872#include <sys/types.h>
11873#include <signal.h>
7cb9022a 11874
a9322a30
TT
11875int
11876main ()
11877{
81ecdfbb 11878return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11879 ;
11880 return 0;
11881}
bec39cab 11882_ACEOF
81ecdfbb
RW
11883if ac_fn_c_try_compile "$LINENO"; then :
11884 ac_cv_type_signal=int
bec39cab 11885else
81ecdfbb 11886 ac_cv_type_signal=void
bec39cab 11887fi
81ecdfbb 11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11889fi
81ecdfbb
RW
11890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11891$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11892
a9322a30
TT
11893cat >>confdefs.h <<_ACEOF
11894#define RETSIGTYPE $ac_cv_type_signal
11895_ACEOF
5ee754fc 11896
bec39cab 11897
81ecdfbb 11898ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11899#include <sys/socket.h>
11900
81ecdfbb
RW
11901"
11902if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11903
a9322a30
TT
11904cat >>confdefs.h <<_ACEOF
11905#define HAVE_SOCKLEN_T 1
11906_ACEOF
11907
11908
11909fi
11910
11911
11912# ------------------------------------- #
11913# Checks for compiler characteristics. #
11914# ------------------------------------- #
11915
81ecdfbb
RW
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11917$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11918if test "${ac_cv_c_const+set}" = set; then :
11919 $as_echo_n "(cached) " >&6
a9322a30 11920else
81ecdfbb 11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11922/* end confdefs.h. */
a9322a30
TT
11923
11924int
11925main ()
11926{
11927/* FIXME: Include the comments suggested by Paul. */
11928#ifndef __cplusplus
11929 /* Ultrix mips cc rejects this. */
11930 typedef int charset[2];
81ecdfbb 11931 const charset cs;
a9322a30 11932 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11933 char const *const *pcpcc;
11934 char **ppc;
a9322a30
TT
11935 /* NEC SVR4.0.2 mips cc rejects this. */
11936 struct point {int x, y;};
11937 static struct point const zero = {0,0};
11938 /* AIX XL C 1.02.0.0 rejects this.
11939 It does not let you subtract one const X* pointer from another in
11940 an arm of an if-expression whose if-part is not a constant
11941 expression */
11942 const char *g = "string";
81ecdfbb 11943 pcpcc = &g + (g ? g-g : 0);
a9322a30 11944 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11945 ++pcpcc;
11946 ppc = (char**) pcpcc;
11947 pcpcc = (char const *const *) ppc;
a9322a30
TT
11948 { /* SCO 3.2v4 cc rejects this. */
11949 char *t;
11950 char const *s = 0 ? (char *) 0 : (char const *) 0;
11951
11952 *t++ = 0;
81ecdfbb 11953 if (s) return 0;
a9322a30
TT
11954 }
11955 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11956 int x[] = {25, 17};
11957 const int *foo = &x[0];
11958 ++foo;
11959 }
11960 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11961 typedef const int *iptr;
11962 iptr p = 0;
11963 ++p;
11964 }
11965 { /* AIX XL C 1.02.0.0 rejects this saying
11966 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11967 struct s { int j; const int *ap[3]; };
11968 struct s *b; b->j = 5;
11969 }
11970 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11971 const int foo = 10;
81ecdfbb 11972 if (!foo) return 0;
a9322a30 11973 }
81ecdfbb 11974 return !cs[0] && !zero.x;
a9322a30
TT
11975#endif
11976
11977 ;
11978 return 0;
11979}
bec39cab 11980_ACEOF
81ecdfbb 11981if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11982 ac_cv_c_const=yes
5ee754fc 11983else
81ecdfbb 11984 ac_cv_c_const=no
5ee754fc 11985fi
81ecdfbb 11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11987fi
81ecdfbb
RW
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11989$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11990if test $ac_cv_c_const = no; then
bec39cab 11991
81ecdfbb 11992$as_echo "#define const /**/" >>confdefs.h
bec39cab 11993
5ee754fc 11994fi
bec39cab 11995
81ecdfbb
RW
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11997$as_echo_n "checking for inline... " >&6; }
11998if test "${ac_cv_c_inline+set}" = set; then :
11999 $as_echo_n "(cached) " >&6
bec39cab 12000else
a9322a30
TT
12001 ac_cv_c_inline=no
12002for ac_kw in inline __inline__ __inline; do
81ecdfbb 12003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12004/* end confdefs.h. */
a9322a30
TT
12005#ifndef __cplusplus
12006typedef int foo_t;
12007static $ac_kw foo_t static_foo () {return 0; }
12008$ac_kw foo_t foo () {return 0; }
12009#endif
12010
bec39cab 12011_ACEOF
81ecdfbb
RW
12012if ac_fn_c_try_compile "$LINENO"; then :
12013 ac_cv_c_inline=$ac_kw
bec39cab 12014fi
81ecdfbb
RW
12015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12016 test "$ac_cv_c_inline" != no && break
a9322a30 12017done
bec39cab 12018
5ee754fc 12019fi
81ecdfbb
RW
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12021$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12022
a9322a30
TT
12023case $ac_cv_c_inline in
12024 inline | yes) ;;
12025 *)
12026 case $ac_cv_c_inline in
12027 no) ac_val=;;
12028 *) ac_val=$ac_cv_c_inline;;
12029 esac
12030 cat >>confdefs.h <<_ACEOF
12031#ifndef __cplusplus
12032#define inline $ac_val
12033#endif
12034_ACEOF
bec39cab
AC
12035 ;;
12036esac
bec39cab 12037
81ecdfbb
RW
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12039$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12040if test "${ac_cv_c_bigendian+set}" = set; then :
12041 $as_echo_n "(cached) " >&6
bec39cab 12042else
81ecdfbb
RW
12043 ac_cv_c_bigendian=unknown
12044 # See if we're dealing with a universal compiler.
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h. */
12047#ifndef __APPLE_CC__
12048 not a universal capable compiler
12049 #endif
12050 typedef int dummy;
12051
12052_ACEOF
12053if ac_fn_c_try_compile "$LINENO"; then :
12054
12055 # Check for potential -arch flags. It is not universal unless
12056 # there are at least two -arch flags with different values.
12057 ac_arch=
12058 ac_prev=
12059 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12060 if test -n "$ac_prev"; then
12061 case $ac_word in
12062 i?86 | x86_64 | ppc | ppc64)
12063 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12064 ac_arch=$ac_word
12065 else
12066 ac_cv_c_bigendian=universal
12067 break
12068 fi
12069 ;;
12070 esac
12071 ac_prev=
12072 elif test "x$ac_word" = "x-arch"; then
12073 ac_prev=arch
12074 fi
12075 done
12076fi
12077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078 if test $ac_cv_c_bigendian = unknown; then
12079 # See if sys/param.h defines the BYTE_ORDER macro.
12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12081/* end confdefs.h. */
a9322a30 12082#include <sys/types.h>
81ecdfbb 12083 #include <sys/param.h>
a9322a30
TT
12084
12085int
12086main ()
12087{
81ecdfbb
RW
12088#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12089 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12090 && LITTLE_ENDIAN)
12091 bogus endian macros
12092 #endif
a9322a30
TT
12093
12094 ;
12095 return 0;
12096}
bec39cab 12097_ACEOF
81ecdfbb 12098if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12099 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12101/* end confdefs.h. */
a9322a30 12102#include <sys/types.h>
81ecdfbb 12103 #include <sys/param.h>
a9322a30
TT
12104
12105int
12106main ()
12107{
12108#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12109 not big endian
12110 #endif
a9322a30
TT
12111
12112 ;
12113 return 0;
12114}
bec39cab 12115_ACEOF
81ecdfbb 12116if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12117 ac_cv_c_bigendian=yes
5ee754fc 12118else
81ecdfbb 12119 ac_cv_c_bigendian=no
5ee754fc 12120fi
81ecdfbb
RW
12121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12122fi
12123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124 fi
12125 if test $ac_cv_c_bigendian = unknown; then
12126 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128/* end confdefs.h. */
12129#include <limits.h>
bec39cab 12130
81ecdfbb
RW
12131int
12132main ()
12133{
12134#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12135 bogus endian macros
12136 #endif
12137
12138 ;
12139 return 0;
12140}
7eb368b3 12141_ACEOF
81ecdfbb
RW
12142if ac_fn_c_try_compile "$LINENO"; then :
12143 # It does; now see whether it defined to _BIG_ENDIAN or not.
12144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12145/* end confdefs.h. */
81ecdfbb
RW
12146#include <limits.h>
12147
7eb368b3
NR
12148int
12149main ()
12150{
81ecdfbb
RW
12151#ifndef _BIG_ENDIAN
12152 not big endian
12153 #endif
12154
7eb368b3
NR
12155 ;
12156 return 0;
12157}
12158_ACEOF
81ecdfbb 12159if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12160 ac_cv_c_bigendian=yes
81ecdfbb
RW
12161else
12162 ac_cv_c_bigendian=no
a9322a30 12163fi
81ecdfbb 12164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12165fi
81ecdfbb
RW
12166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12167 fi
12168 if test $ac_cv_c_bigendian = unknown; then
12169 # Compile a test program.
12170 if test "$cross_compiling" = yes; then :
12171 # Try to guess by grepping values from an object file.
12172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173/* end confdefs.h. */
12174short int ascii_mm[] =
12175 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12176 short int ascii_ii[] =
12177 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12178 int use_ascii (int i) {
12179 return ascii_mm[i] + ascii_ii[i];
12180 }
12181 short int ebcdic_ii[] =
12182 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12183 short int ebcdic_mm[] =
12184 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12185 int use_ebcdic (int i) {
12186 return ebcdic_mm[i] + ebcdic_ii[i];
12187 }
12188 extern int foo;
7eb368b3 12189
81ecdfbb
RW
12190int
12191main ()
12192{
12193return use_ascii (foo) == use_ebcdic (foo);
12194 ;
12195 return 0;
12196}
12197_ACEOF
12198if ac_fn_c_try_compile "$LINENO"; then :
12199 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12200 ac_cv_c_bigendian=yes
12201 fi
12202 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12203 if test "$ac_cv_c_bigendian" = unknown; then
12204 ac_cv_c_bigendian=no
12205 else
12206 # finding both strings is unlikely to happen, but who knows?
12207 ac_cv_c_bigendian=unknown
12208 fi
12209 fi
7eb368b3 12210fi
81ecdfbb 12211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12212else
81ecdfbb 12213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12214/* end confdefs.h. */
81ecdfbb 12215$ac_includes_default
d3ea6809
MM
12216int
12217main ()
12218{
81ecdfbb
RW
12219
12220 /* Are we little or big endian? From Harbison&Steele. */
12221 union
12222 {
12223 long int l;
12224 char c[sizeof (long int)];
12225 } u;
12226 u.l = 1;
12227 return u.c[sizeof (long int) - 1] == 1;
12228
12229 ;
12230 return 0;
d3ea6809
MM
12231}
12232_ACEOF
81ecdfbb 12233if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12234 ac_cv_c_bigendian=no
d3ea6809 12235else
81ecdfbb 12236 ac_cv_c_bigendian=yes
d3ea6809 12237fi
81ecdfbb
RW
12238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12239 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12240fi
a9322a30 12241
81ecdfbb
RW
12242 fi
12243fi
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12245$as_echo "$ac_cv_c_bigendian" >&6; }
12246 case $ac_cv_c_bigendian in #(
12247 yes)
12248 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12249;; #(
12250 no)
12251 ;; #(
12252 universal)
12253
12254$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12255
12256 ;; #(
12257 *)
12258 as_fn_error "unknown endianness
12259 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12260 esac
d3ea6809
MM
12261
12262
a9322a30
TT
12263# ------------------------------ #
12264# Checks for library functions. #
12265# ------------------------------ #
d3ea6809 12266
a9322a30
TT
12267# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12268# for constant arguments. Useless!
81ecdfbb
RW
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12270$as_echo_n "checking for working alloca.h... " >&6; }
12271if test "${ac_cv_working_alloca_h+set}" = set; then :
12272 $as_echo_n "(cached) " >&6
d3ea6809 12273else
81ecdfbb 12274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12275/* end confdefs.h. */
a9322a30 12276#include <alloca.h>
bec39cab
AC
12277int
12278main ()
12279{
a9322a30 12280char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12281 if (p) return 0;
bec39cab
AC
12282 ;
12283 return 0;
12284}
12285_ACEOF
81ecdfbb 12286if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12287 ac_cv_working_alloca_h=yes
bec39cab 12288else
81ecdfbb 12289 ac_cv_working_alloca_h=no
bec39cab 12290fi
81ecdfbb
RW
12291rm -f core conftest.err conftest.$ac_objext \
12292 conftest$ac_exeext conftest.$ac_ext
bec39cab 12293fi
81ecdfbb
RW
12294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12295$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12296if test $ac_cv_working_alloca_h = yes; then
12297
81ecdfbb 12298$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12299
c906108c 12300fi
bec39cab 12301
81ecdfbb
RW
12302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12303$as_echo_n "checking for alloca... " >&6; }
12304if test "${ac_cv_func_alloca_works+set}" = set; then :
12305 $as_echo_n "(cached) " >&6
bec39cab 12306else
81ecdfbb 12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12308/* end confdefs.h. */
a9322a30
TT
12309#ifdef __GNUC__
12310# define alloca __builtin_alloca
b4e70030 12311#else
a9322a30
TT
12312# ifdef _MSC_VER
12313# include <malloc.h>
12314# define alloca _alloca
12315# else
81ecdfbb 12316# ifdef HAVE_ALLOCA_H
a9322a30
TT
12317# include <alloca.h>
12318# else
12319# ifdef _AIX
12320 #pragma alloca
12321# else
12322# ifndef alloca /* predefined by HP cc +Olibcalls */
12323char *alloca ();
12324# endif
12325# endif
12326# endif
12327# endif
c906108c 12328#endif
97bf5e38 12329
bec39cab
AC
12330int
12331main ()
12332{
a9322a30 12333char *p = (char *) alloca (1);
81ecdfbb 12334 if (p) return 0;
bec39cab
AC
12335 ;
12336 return 0;
12337}
12338_ACEOF
81ecdfbb 12339if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12340 ac_cv_func_alloca_works=yes
bec39cab 12341else
81ecdfbb 12342 ac_cv_func_alloca_works=no
bec39cab 12343fi
81ecdfbb
RW
12344rm -f core conftest.err conftest.$ac_objext \
12345 conftest$ac_exeext conftest.$ac_ext
bec39cab 12346fi
81ecdfbb
RW
12347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12348$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12349
12350if test $ac_cv_func_alloca_works = yes; then
12351
81ecdfbb 12352$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12353
a9322a30
TT
12354else
12355 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12356# that cause trouble. Some versions do not even contain alloca or
12357# contain a buggy version. If you still want to use their alloca,
12358# use ar to extract alloca.o from them instead of compiling alloca.c.
12359
81ecdfbb 12360ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12361
81ecdfbb 12362$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12363
bec39cab 12364
81ecdfbb
RW
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12366$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12367if test "${ac_cv_os_cray+set}" = set; then :
12368 $as_echo_n "(cached) " >&6
a9322a30 12369else
81ecdfbb 12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12371/* end confdefs.h. */
81ecdfbb 12372#if defined CRAY && ! defined CRAY2
a9322a30
TT
12373webecray
12374#else
12375wenotbecray
12376#endif
12377
12378_ACEOF
12379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12380 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12381 ac_cv_os_cray=yes
12382else
81ecdfbb 12383 ac_cv_os_cray=no
bec39cab 12384fi
81ecdfbb
RW
12385rm -f conftest*
12386
bec39cab 12387fi
81ecdfbb
RW
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12389$as_echo "$ac_cv_os_cray" >&6; }
12390if test $ac_cv_os_cray = yes; then
12391 for ac_func in _getb67 GETB67 getb67; do
12392 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12393ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12394eval as_val=\$$as_ac_var
12395 if test "x$as_val" = x""yes; then :
a9322a30
TT
12396
12397cat >>confdefs.h <<_ACEOF
12398#define CRAY_STACKSEG_END $ac_func
bec39cab 12399_ACEOF
c906108c 12400
a9322a30 12401 break
c906108c
SS
12402fi
12403
a9322a30
TT
12404 done
12405fi
bec39cab 12406
81ecdfbb
RW
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12408$as_echo_n "checking stack direction for C alloca... " >&6; }
12409if test "${ac_cv_c_stack_direction+set}" = set; then :
12410 $as_echo_n "(cached) " >&6
a9322a30 12411else
81ecdfbb 12412 if test "$cross_compiling" = yes; then :
a9322a30 12413 ac_cv_c_stack_direction=0
bec39cab 12414else
81ecdfbb 12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12416/* end confdefs.h. */
81ecdfbb 12417$ac_includes_default
a9322a30
TT
12418int
12419find_stack_direction ()
b4e70030 12420{
a9322a30
TT
12421 static char *addr = 0;
12422 auto char dummy;
12423 if (addr == 0)
12424 {
12425 addr = &dummy;
12426 return find_stack_direction ();
12427 }
12428 else
12429 return (&dummy > addr) ? 1 : -1;
b4e70030 12430}
b757528f 12431
bec39cab
AC
12432int
12433main ()
12434{
81ecdfbb 12435 return find_stack_direction () < 0;
bec39cab
AC
12436}
12437_ACEOF
81ecdfbb 12438if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12439 ac_cv_c_stack_direction=1
12440else
81ecdfbb 12441 ac_cv_c_stack_direction=-1
a9322a30 12442fi
81ecdfbb
RW
12443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12444 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12445fi
a9322a30 12446
81ecdfbb
RW
12447fi
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12449$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12450cat >>confdefs.h <<_ACEOF
12451#define STACK_DIRECTION $ac_cv_c_stack_direction
12452_ACEOF
12453
12454
12455fi
12456
a9322a30 12457for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12458do :
12459 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12460ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12461eval as_val=\$$as_ac_Header
12462 if test "x$as_val" = x""yes; then :
bec39cab 12463 cat >>confdefs.h <<_ACEOF
81ecdfbb 12464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12465_ACEOF
b757528f 12466
b757528f 12467fi
bec39cab 12468
a9322a30 12469done
a3828db0 12470
a9322a30 12471for ac_func in getpagesize
81ecdfbb
RW
12472do :
12473 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12474if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12475 cat >>confdefs.h <<_ACEOF
81ecdfbb 12476#define HAVE_GETPAGESIZE 1
bec39cab 12477_ACEOF
bcb3dc3d 12478
bcb3dc3d
MK
12479fi
12480done
12481
81ecdfbb
RW
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12483$as_echo_n "checking for working mmap... " >&6; }
12484if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12485 $as_echo_n "(cached) " >&6
a9322a30 12486else
81ecdfbb 12487 if test "$cross_compiling" = yes; then :
a9322a30 12488 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12489else
81ecdfbb 12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12491/* end confdefs.h. */
a9322a30
TT
12492$ac_includes_default
12493/* malloc might have been renamed as rpl_malloc. */
12494#undef malloc
bec39cab 12495
a9322a30
TT
12496/* Thanks to Mike Haertel and Jim Avera for this test.
12497 Here is a matrix of mmap possibilities:
12498 mmap private not fixed
12499 mmap private fixed at somewhere currently unmapped
12500 mmap private fixed at somewhere already mapped
12501 mmap shared not fixed
12502 mmap shared fixed at somewhere currently unmapped
12503 mmap shared fixed at somewhere already mapped
12504 For private mappings, we should verify that changes cannot be read()
12505 back from the file, nor mmap's back from the file at a different
12506 address. (There have been systems where private was not correctly
12507 implemented like the infamous i386 svr4.0, and systems where the
12508 VM page cache was not coherent with the file system buffer cache
12509 like early versions of FreeBSD and possibly contemporary NetBSD.)
12510 For shared mappings, we should conversely verify that changes get
12511 propagated back to all the places they're supposed to be.
bec39cab 12512
a9322a30
TT
12513 Grep wants private fixed already mapped.
12514 The main things grep needs to know about mmap are:
12515 * does it exist and is it safe to write into the mmap'd area
12516 * how to use it (BSD variants) */
8b9cf735 12517
a9322a30
TT
12518#include <fcntl.h>
12519#include <sys/mman.h>
8b9cf735 12520
81ecdfbb 12521#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12522char *malloc ();
a3828db0
MK
12523#endif
12524
a9322a30 12525/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12526#ifndef HAVE_GETPAGESIZE
a9322a30 12527/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12528# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12529# define HAVE_SYS_PARAM_H 1
12530# endif
12531
12532# ifdef _SC_PAGESIZE
12533# define getpagesize() sysconf(_SC_PAGESIZE)
12534# else /* no _SC_PAGESIZE */
81ecdfbb 12535# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12536# include <sys/param.h>
12537# ifdef EXEC_PAGESIZE
12538# define getpagesize() EXEC_PAGESIZE
12539# else /* no EXEC_PAGESIZE */
12540# ifdef NBPG
12541# define getpagesize() NBPG * CLSIZE
12542# ifndef CLSIZE
12543# define CLSIZE 1
12544# endif /* no CLSIZE */
12545# else /* no NBPG */
12546# ifdef NBPC
12547# define getpagesize() NBPC
12548# else /* no NBPC */
12549# ifdef PAGESIZE
12550# define getpagesize() PAGESIZE
12551# endif /* PAGESIZE */
12552# endif /* no NBPC */
12553# endif /* no NBPG */
12554# endif /* no EXEC_PAGESIZE */
12555# else /* no HAVE_SYS_PARAM_H */
12556# define getpagesize() 8192 /* punt totally */
12557# endif /* no HAVE_SYS_PARAM_H */
12558# endif /* no _SC_PAGESIZE */
12559
12560#endif /* no HAVE_GETPAGESIZE */
12561
bec39cab
AC
12562int
12563main ()
12564{
a9322a30
TT
12565 char *data, *data2, *data3;
12566 int i, pagesize;
12567 int fd;
12568
12569 pagesize = getpagesize ();
12570
12571 /* First, make a file with some known garbage in it. */
12572 data = (char *) malloc (pagesize);
12573 if (!data)
81ecdfbb 12574 return 1;
a9322a30
TT
12575 for (i = 0; i < pagesize; ++i)
12576 *(data + i) = rand ();
12577 umask (0);
12578 fd = creat ("conftest.mmap", 0600);
12579 if (fd < 0)
81ecdfbb 12580 return 1;
a9322a30 12581 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12582 return 1;
a9322a30
TT
12583 close (fd);
12584
12585 /* Next, try to mmap the file at a fixed address which already has
12586 something else allocated at it. If we can, also make sure that
12587 we see the same garbage. */
12588 fd = open ("conftest.mmap", O_RDWR);
12589 if (fd < 0)
81ecdfbb 12590 return 1;
a9322a30
TT
12591 data2 = (char *) malloc (2 * pagesize);
12592 if (!data2)
81ecdfbb
RW
12593 return 1;
12594 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12595 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12596 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12597 return 1;
a9322a30
TT
12598 for (i = 0; i < pagesize; ++i)
12599 if (*(data + i) != *(data2 + i))
81ecdfbb 12600 return 1;
a9322a30
TT
12601
12602 /* Finally, make sure that changes to the mapped area do not
12603 percolate back to the file as seen by read(). (This is a bug on
12604 some variants of i386 svr4.0.) */
12605 for (i = 0; i < pagesize; ++i)
12606 *(data2 + i) = *(data2 + i) + 1;
12607 data3 = (char *) malloc (pagesize);
12608 if (!data3)
81ecdfbb 12609 return 1;
a9322a30 12610 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12611 return 1;
a9322a30
TT
12612 for (i = 0; i < pagesize; ++i)
12613 if (*(data + i) != *(data3 + i))
81ecdfbb 12614 return 1;
a9322a30 12615 close (fd);
81ecdfbb 12616 return 0;
bec39cab
AC
12617}
12618_ACEOF
81ecdfbb 12619if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12620 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12621else
81ecdfbb 12622 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12623fi
81ecdfbb
RW
12624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12625 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12626fi
81ecdfbb 12627
a9322a30 12628fi
81ecdfbb
RW
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12630$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12631if test $ac_cv_func_mmap_fixed_mapped = yes; then
12632
81ecdfbb 12633$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12634
086ec9eb 12635fi
a9322a30 12636rm -f conftest.mmap
a3828db0 12637
81ecdfbb
RW
12638ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12639if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12640
a9322a30
TT
12641else
12642
12643cat >>confdefs.h <<_ACEOF
12644#define pid_t int
bec39cab 12645_ACEOF
086ec9eb
MK
12646
12647fi
12648
81ecdfbb
RW
12649for ac_header in vfork.h
12650do :
12651 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12652if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12653 cat >>confdefs.h <<_ACEOF
81ecdfbb 12654#define HAVE_VFORK_H 1
bec39cab 12655_ACEOF
c906108c
SS
12656
12657fi
a9322a30 12658
a3828db0 12659done
c906108c 12660
a9322a30 12661for ac_func in fork vfork
81ecdfbb
RW
12662do :
12663 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12664ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12665eval as_val=\$$as_ac_var
12666 if test "x$as_val" = x""yes; then :
a3828db0 12667 cat >>confdefs.h <<_ACEOF
81ecdfbb 12668#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12669_ACEOF
b83266a0 12670
97bf5e38 12671fi
a3828db0 12672done
b83266a0 12673
a9322a30 12674if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12676$as_echo_n "checking for working fork... " >&6; }
12677if test "${ac_cv_func_fork_works+set}" = set; then :
12678 $as_echo_n "(cached) " >&6
a9322a30 12679else
81ecdfbb 12680 if test "$cross_compiling" = yes; then :
a9322a30
TT
12681 ac_cv_func_fork_works=cross
12682else
81ecdfbb
RW
12683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12684/* end confdefs.h. */
12685$ac_includes_default
12686int
12687main ()
12688{
12689
12690 /* By Ruediger Kuhlmann. */
12691 return fork () < 0;
12692
12693 ;
12694 return 0;
12695}
a9322a30 12696_ACEOF
81ecdfbb 12697if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12698 ac_cv_func_fork_works=yes
12699else
81ecdfbb 12700 ac_cv_func_fork_works=no
a9322a30 12701fi
81ecdfbb
RW
12702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12703 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12704fi
81ecdfbb 12705
a9322a30 12706fi
81ecdfbb
RW
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12708$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12709
12710else
12711 ac_cv_func_fork_works=$ac_cv_func_fork
12712fi
12713if test "x$ac_cv_func_fork_works" = xcross; then
12714 case $host in
12715 *-*-amigaos* | *-*-msdosdjgpp*)
12716 # Override, as these systems have only a dummy fork() stub
12717 ac_cv_func_fork_works=no
12718 ;;
12719 *)
12720 ac_cv_func_fork_works=yes
12721 ;;
12722 esac
81ecdfbb
RW
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12724$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12725fi
12726ac_cv_func_vfork_works=$ac_cv_func_vfork
12727if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12729$as_echo_n "checking for working vfork... " >&6; }
12730if test "${ac_cv_func_vfork_works+set}" = set; then :
12731 $as_echo_n "(cached) " >&6
a9322a30 12732else
81ecdfbb 12733 if test "$cross_compiling" = yes; then :
a9322a30
TT
12734 ac_cv_func_vfork_works=cross
12735else
81ecdfbb 12736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12737/* end confdefs.h. */
12738/* Thanks to Paul Eggert for this test. */
81ecdfbb 12739$ac_includes_default
a9322a30 12740#include <sys/wait.h>
81ecdfbb 12741#ifdef HAVE_VFORK_H
a9322a30
TT
12742# include <vfork.h>
12743#endif
12744/* On some sparc systems, changes by the child to local and incoming
12745 argument registers are propagated back to the parent. The compiler
12746 is told about this with #include <vfork.h>, but some compilers
12747 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12748 static variable whose address is put into a register that is
12749 clobbered by the vfork. */
12750static void
12751#ifdef __cplusplus
12752sparc_address_test (int arg)
12753# else
12754sparc_address_test (arg) int arg;
12755#endif
12756{
12757 static pid_t child;
12758 if (!child) {
12759 child = vfork ();
12760 if (child < 0) {
12761 perror ("vfork");
12762 _exit(2);
12763 }
12764 if (!child) {
12765 arg = getpid();
12766 write(-1, "", 0);
12767 _exit (arg);
12768 }
12769 }
12770}
12771
12772int
12773main ()
12774{
12775 pid_t parent = getpid ();
12776 pid_t child;
12777
12778 sparc_address_test (0);
12779
12780 child = vfork ();
12781
12782 if (child == 0) {
12783 /* Here is another test for sparc vfork register problems. This
12784 test uses lots of local variables, at least as many local
12785 variables as main has allocated so far including compiler
12786 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12787 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12788 reuse the register of parent for one of the local variables,
12789 since it will think that parent can't possibly be used any more
12790 in this routine. Assigning to the local variable will thus
12791 munge parent in the parent process. */
12792 pid_t
12793 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12794 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12795 /* Convince the compiler that p..p7 are live; otherwise, it might
12796 use the same hardware register for all 8 local variables. */
12797 if (p != p1 || p != p2 || p != p3 || p != p4
12798 || p != p5 || p != p6 || p != p7)
12799 _exit(1);
12800
12801 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12802 from child file descriptors. If the child closes a descriptor
12803 before it execs or exits, this munges the parent's descriptor
12804 as well. Test for this by closing stdout in the child. */
12805 _exit(close(fileno(stdout)) != 0);
12806 } else {
12807 int status;
12808 struct stat st;
12809
12810 while (wait(&status) != child)
12811 ;
81ecdfbb 12812 return (
a9322a30
TT
12813 /* Was there some problem with vforking? */
12814 child < 0
12815
12816 /* Did the child fail? (This shouldn't happen.) */
12817 || status
12818
12819 /* Did the vfork/compiler bug occur? */
12820 || parent != getpid()
12821
12822 /* Did the file descriptor bug occur? */
12823 || fstat(fileno(stdout), &st) != 0
12824 );
12825 }
12826}
12827_ACEOF
81ecdfbb 12828if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12829 ac_cv_func_vfork_works=yes
12830else
81ecdfbb 12831 ac_cv_func_vfork_works=no
a9322a30 12832fi
81ecdfbb
RW
12833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12834 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12835fi
81ecdfbb 12836
a9322a30 12837fi
81ecdfbb
RW
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12839$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12840
12841fi;
12842if test "x$ac_cv_func_fork_works" = xcross; then
12843 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12845$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12846fi
12847
12848if test "x$ac_cv_func_vfork_works" = xyes; then
12849
81ecdfbb 12850$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12851
12852else
12853
81ecdfbb 12854$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12855
12856fi
12857if test "x$ac_cv_func_fork_works" = xyes; then
12858
81ecdfbb 12859$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12860
12861fi
12862
a9322a30 12863for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12864 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12865 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12866 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12867 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12868do :
12869 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12870ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12871eval as_val=\$$as_ac_var
12872 if test "x$as_val" = x""yes; then :
6c7a06a3 12873 cat >>confdefs.h <<_ACEOF
81ecdfbb 12874#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12875_ACEOF
12876
12877fi
12878done
12879
12880
81ecdfbb
RW
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12882$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12883if test "${am_cv_langinfo_codeset+set}" = set; then :
12884 $as_echo_n "(cached) " >&6
6c7a06a3 12885else
81ecdfbb 12886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12887/* end confdefs.h. */
12888#include <langinfo.h>
12889int
12890main ()
12891{
12892char* cs = nl_langinfo(CODESET);
bec39cab
AC
12893 ;
12894 return 0;
12895}
12896_ACEOF
81ecdfbb 12897if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12898 am_cv_langinfo_codeset=yes
a4db0f07 12899else
81ecdfbb 12900 am_cv_langinfo_codeset=no
a4db0f07 12901fi
81ecdfbb
RW
12902rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12904
a4db0f07 12905fi
81ecdfbb
RW
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12907$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12908 if test $am_cv_langinfo_codeset = yes; then
12909
81ecdfbb 12910$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12911
6c7a06a3 12912 fi
c906108c 12913
06825bd1 12914
a3828db0
MK
12915# Check the return and argument types of ptrace. No canned test for
12916# this, so roll our own.
12917gdb_ptrace_headers='
12918#if HAVE_SYS_TYPES_H
12919# include <sys/types.h>
12920#endif
12921#if HAVE_SYS_PTRACE_H
12922# include <sys/ptrace.h>
12923#endif
12924#if HAVE_UNISTD_H
12925# include <unistd.h>
12926#endif
12927'
12928# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12929ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12930"
12931if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12932 ac_have_decl=1
06825bd1 12933else
81ecdfbb 12934 ac_have_decl=0
06825bd1 12935fi
06825bd1 12936
a3828db0 12937cat >>confdefs.h <<_ACEOF
81ecdfbb 12938#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12939_ACEOF
81ecdfbb 12940if test $ac_have_decl = 1; then :
bec39cab 12941
a3828db0 12942else
a3828db0
MK
12943
12944 : ${gdb_cv_func_ptrace_ret='int'}
12945 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12946
06825bd1
MK
12947fi
12948
064ef605
DJ
12949# Check return type. Varargs (used on GNU/Linux) conflict with the
12950# empty argument list, so check for that explicitly.
81ecdfbb
RW
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12952$as_echo_n "checking return type of ptrace... " >&6; }
12953if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12954 $as_echo_n "(cached) " >&6
bec39cab 12955else
81ecdfbb 12956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12957/* end confdefs.h. */
a3828db0 12958$gdb_ptrace_headers
bec39cab
AC
12959int
12960main ()
12961{
064ef605
DJ
12962extern long ptrace (enum __ptrace_request, ...);
12963 ;
12964 return 0;
12965}
12966_ACEOF
81ecdfbb 12967if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12968 gdb_cv_func_ptrace_ret='long'
12969else
81ecdfbb 12970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12971/* end confdefs.h. */
12972$gdb_ptrace_headers
12973int
12974main ()
12975{
a3828db0 12976extern int ptrace ();
bec39cab
AC
12977 ;
12978 return 0;
12979}
12980_ACEOF
81ecdfbb 12981if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12982 gdb_cv_func_ptrace_ret='int'
70f9f479 12983else
81ecdfbb 12984 gdb_cv_func_ptrace_ret='long'
70f9f479 12985fi
81ecdfbb 12986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12987fi
81ecdfbb 12988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12989fi
81ecdfbb
RW
12990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12991$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12992
a3828db0
MK
12993cat >>confdefs.h <<_ACEOF
12994#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12995_ACEOF
70f9f479 12996
a3828db0 12997# Check argument types.
81ecdfbb
RW
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12999$as_echo_n "checking types of arguments for ptrace... " >&6; }
13000if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13001 $as_echo_n "(cached) " >&6
bec39cab 13002else
a3828db0 13003
81ecdfbb 13004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13005/* end confdefs.h. */
13006$gdb_ptrace_headers
13007int
13008main ()
13009{
13010extern long ptrace (enum __ptrace_request, ...);
13011 ;
13012 return 0;
13013}
13014_ACEOF
81ecdfbb 13015if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13016 gdb_cv_func_ptrace_args='int,int,long,long'
13017else
064ef605 13018
a3828db0
MK
13019for gdb_arg1 in 'int' 'long'; do
13020 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13021 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 13022 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13024/* end confdefs.h. */
a3828db0 13025$gdb_ptrace_headers
bec39cab
AC
13026int
13027main ()
13028{
a3828db0
MK
13029
13030extern $gdb_cv_func_ptrace_ret
13031 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13032
bec39cab
AC
13033 ;
13034 return 0;
13035}
13036_ACEOF
81ecdfbb 13037if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13038 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13039 break 4;
5c7f2947 13040fi
81ecdfbb 13041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13042 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13044/* end confdefs.h. */
a3828db0 13045$gdb_ptrace_headers
bec39cab
AC
13046int
13047main ()
13048{
a3828db0
MK
13049
13050extern $gdb_cv_func_ptrace_ret
13051 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13052
bec39cab
AC
13053 ;
13054 return 0;
13055}
13056_ACEOF
81ecdfbb 13057if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13058
13059gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13060 break 5;
78434e59 13061fi
81ecdfbb 13062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13063 done
13064 done
13065 done
13066 done
13067done
13068# Provide a safe default value.
13069: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13070
064ef605 13071fi
81ecdfbb 13072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13073fi
81ecdfbb
RW
13074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13075$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13076ac_save_IFS=$IFS; IFS=','
13077set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13078IFS=$ac_save_IFS
13079shift
bec39cab 13080
a3828db0
MK
13081cat >>confdefs.h <<_ACEOF
13082#define PTRACE_TYPE_ARG3 $3
13083_ACEOF
13084
13085if test -n "$5"; then
13086
13087cat >>confdefs.h <<_ACEOF
13088#define PTRACE_TYPE_ARG5 $5
bec39cab 13089_ACEOF
78434e59
MK
13090
13091fi
13092
a3828db0 13093if test "$cross_compiling" = no; then
81ecdfbb
RW
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13095$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13096if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13097 $as_echo_n "(cached) " >&6
a3828db0 13098else
81ecdfbb
RW
13099 if test "$cross_compiling" = yes; then :
13100 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13101else
81ecdfbb 13102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13103/* end confdefs.h. */
81ecdfbb 13104$ac_includes_default
bec39cab
AC
13105int
13106main ()
13107{
a3828db0
MK
13108/* If this system has a BSD-style setpgrp which takes arguments,
13109 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13110 exit successfully. */
81ecdfbb 13111 return setpgrp (1,1) != -1;
bec39cab
AC
13112 ;
13113 return 0;
13114}
13115_ACEOF
81ecdfbb 13116if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13117 ac_cv_func_setpgrp_void=no
c906108c 13118else
81ecdfbb 13119 ac_cv_func_setpgrp_void=yes
c906108c 13120fi
81ecdfbb
RW
13121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13123fi
81ecdfbb 13124
a3828db0 13125fi
81ecdfbb
RW
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13127$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13128if test $ac_cv_func_setpgrp_void = yes; then
13129
81ecdfbb 13130$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13131
13132fi
a3828db0
MK
13133
13134else
81ecdfbb
RW
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13136$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13137if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13138 $as_echo_n "(cached) " >&6
97bf5e38 13139else
81ecdfbb 13140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13141/* end confdefs.h. */
a3828db0
MK
13142
13143#include <unistd.h>
13144
bec39cab
AC
13145int
13146main ()
13147{
a3828db0
MK
13148
13149 if (setpgrp(1,1) == -1)
13150 exit (0);
13151 else
13152 exit (1);
13153
bec39cab
AC
13154 ;
13155 return 0;
13156}
13157_ACEOF
81ecdfbb 13158if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13159 ac_cv_func_setpgrp_void=no
c906108c 13160else
81ecdfbb 13161 ac_cv_func_setpgrp_void=yes
c906108c 13162fi
81ecdfbb 13163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13164fi
81ecdfbb
RW
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13166$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13167if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13168 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13169
a3828db0 13170fi
c906108c
SS
13171fi
13172
a3828db0
MK
13173# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13174# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13176$as_echo_n "checking for sigsetjmp... " >&6; }
13177if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13178 $as_echo_n "(cached) " >&6
bec39cab 13179else
81ecdfbb 13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13181/* end confdefs.h. */
a3828db0
MK
13182
13183#include <setjmp.h>
13184
bec39cab
AC
13185int
13186main ()
13187{
a3828db0 13188sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13189 ;
13190 return 0;
13191}
13192_ACEOF
81ecdfbb 13193if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13194 gdb_cv_func_sigsetjmp=yes
c906108c 13195else
81ecdfbb 13196 gdb_cv_func_sigsetjmp=no
c906108c 13197fi
81ecdfbb 13198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13199fi
81ecdfbb
RW
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13201$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13202if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13203
81ecdfbb 13204$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13205
97bf5e38 13206fi
c906108c 13207
a3828db0
MK
13208# Assume we'll default to using the included libiberty regex.
13209gdb_use_included_regex=yes
13210
13211# However, if the system regex is GNU regex, then default to *not*
13212# using the included regex.
81ecdfbb
RW
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13214$as_echo_n "checking for GNU regex... " >&6; }
13215if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13216 $as_echo_n "(cached) " >&6
bec39cab 13217else
81ecdfbb 13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13219/* end confdefs.h. */
a3828db0 13220#include <gnu-versions.h>
bec39cab
AC
13221int
13222main ()
13223{
81ecdfbb
RW
13224#define REGEX_INTERFACE_VERSION 1
13225#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13226# error "Version mismatch"
13227#endif
5c45e068
MK
13228 ;
13229 return 0;
13230}
13231_ACEOF
81ecdfbb
RW
13232if ac_fn_c_try_compile "$LINENO"; then :
13233 gdb_cv_have_gnu_regex=yes
5c45e068 13234else
81ecdfbb
RW
13235 gdb_cv_have_gnu_regex=no
13236fi
13237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13238fi
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13240$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13241if test $gdb_cv_have_gnu_regex = yes; then
13242 gdb_use_included_regex=no
5c45e068 13243fi
81ecdfbb
RW
13244
13245
13246# Check whether --with-included-regex was given.
13247if test "${with_included_regex+set}" = set; then :
13248 withval=$with_included_regex; gdb_with_regex=$withval
13249else
13250 gdb_with_regex=$gdb_use_included_regex
c906108c 13251fi
81ecdfbb
RW
13252
13253if test "$gdb_with_regex" = yes; then
13254
13255$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13256
c906108c 13257fi
81ecdfbb
RW
13258
13259# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13260ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13261#include <sys/proc.h>
13262
13263"
13264if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13265
5c45e068 13266cat >>confdefs.h <<_ACEOF
a3828db0 13267#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13268_ACEOF
c906108c 13269
5c45e068 13270
97bf5e38 13271fi
c906108c 13272
5c45e068 13273
a3828db0 13274# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13276$as_echo_n "checking for struct lwp... " >&6; }
13277if test "${gdb_cv_struct_lwp+set}" = set; then :
13278 $as_echo_n "(cached) " >&6
bec39cab 13279else
81ecdfbb 13280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13281/* end confdefs.h. */
a3828db0
MK
13282#include <sys/param.h>
13283#include <sys/lwp.h>
bec39cab
AC
13284int
13285main ()
13286{
a3828db0 13287struct lwp l;
bec39cab
AC
13288 ;
13289 return 0;
13290}
13291_ACEOF
81ecdfbb 13292if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13293 gdb_cv_struct_lwp=yes
c906108c 13294else
81ecdfbb 13295 gdb_cv_struct_lwp=no
c906108c 13296fi
81ecdfbb 13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13298fi
81ecdfbb
RW
13299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13300$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13301if test $gdb_cv_struct_lwp = yes; then
c906108c 13302
81ecdfbb 13303$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13304
97bf5e38 13305fi
c906108c 13306
a3828db0 13307# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13309$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13310if test "${gdb_cv_struct_reg+set}" = set; then :
13311 $as_echo_n "(cached) " >&6
bec39cab 13312else
81ecdfbb 13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13314/* end confdefs.h. */
a3828db0
MK
13315#include <sys/types.h>
13316#include <machine/reg.h>
bec39cab
AC
13317int
13318main ()
13319{
a3828db0 13320struct reg r;
bec39cab
AC
13321 ;
13322 return 0;
13323}
13324_ACEOF
81ecdfbb 13325if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13326 gdb_cv_struct_reg=yes
27ca5dad 13327else
81ecdfbb 13328 gdb_cv_struct_reg=no
27ca5dad 13329fi
81ecdfbb 13330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13331fi
81ecdfbb
RW
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13333$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13334if test $gdb_cv_struct_reg = yes; then
bec39cab 13335
81ecdfbb 13336$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13337
13338fi
97bf5e38 13339
a3828db0
MK
13340# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13341# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13342ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13343"
13344if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13345
13346cat >>confdefs.h <<_ACEOF
a3828db0 13347#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13348_ACEOF
3862412b 13349
5c45e068 13350
97bf5e38 13351fi
81ecdfbb
RW
13352ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13353"
13354if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13355
13356cat >>confdefs.h <<_ACEOF
a3828db0 13357#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13358_ACEOF
3862412b 13359
5c45e068 13360
97bf5e38 13361fi
3862412b 13362
5c45e068 13363
a3828db0 13364# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13366$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13367if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13368 $as_echo_n "(cached) " >&6
451928c5 13369else
81ecdfbb 13370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13371/* end confdefs.h. */
a3828db0 13372#include <sys/ptrace.h>
bec39cab
AC
13373int
13374main ()
13375{
a3828db0 13376PTRACE_GETREGS;
bec39cab
AC
13377 ;
13378 return 0;
13379}
13380_ACEOF
81ecdfbb 13381if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13382 gdb_cv_have_ptrace_getregs=yes
451928c5 13383else
81ecdfbb 13384 gdb_cv_have_ptrace_getregs=no
451928c5 13385fi
81ecdfbb 13386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13387fi
13388
81ecdfbb
RW
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13390$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13391if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13392
81ecdfbb 13393$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13394
97bf5e38 13395fi
451928c5 13396
a3828db0 13397# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13399$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13400if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13401 $as_echo_n "(cached) " >&6
451928c5 13402else
81ecdfbb 13403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13404/* end confdefs.h. */
a3828db0 13405#include <sys/ptrace.h>
bec39cab
AC
13406int
13407main ()
13408{
a3828db0 13409PTRACE_GETFPXREGS;
bec39cab
AC
13410 ;
13411 return 0;
13412}
13413_ACEOF
81ecdfbb 13414if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13415 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13416else
81ecdfbb 13417 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13418fi
81ecdfbb 13419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13420fi
13421
81ecdfbb
RW
13422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13423$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13424if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13425
81ecdfbb 13426$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13427
97bf5e38 13428fi
451928c5 13429
a3828db0 13430# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13432$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13433if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13434 $as_echo_n "(cached) " >&6
3862412b 13435else
81ecdfbb 13436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13437/* end confdefs.h. */
a3828db0
MK
13438#include <sys/types.h>
13439#include <sys/ptrace.h>
bec39cab
AC
13440int
13441main ()
13442{
a3828db0 13443PT_GETDBREGS;
bec39cab
AC
13444 ;
13445 return 0;
13446}
13447_ACEOF
81ecdfbb 13448if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13449 gdb_cv_have_pt_getdbregs=yes
3862412b 13450else
81ecdfbb 13451 gdb_cv_have_pt_getdbregs=no
3862412b 13452fi
81ecdfbb 13453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13454fi
13455
81ecdfbb
RW
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13457$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13458if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13459
81ecdfbb 13460$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13461
97bf5e38 13462fi
3862412b 13463
a3828db0 13464# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13466$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13467if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13468 $as_echo_n "(cached) " >&6
3862412b 13469else
81ecdfbb 13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13471/* end confdefs.h. */
a3828db0
MK
13472#include <sys/types.h>
13473#include <sys/ptrace.h>
bec39cab
AC
13474int
13475main ()
13476{
a3828db0 13477PT_GETXMMREGS;
bec39cab
AC
13478 ;
13479 return 0;
13480}
13481_ACEOF
81ecdfbb 13482if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13483 gdb_cv_have_pt_getxmmregs=yes
3862412b 13484else
81ecdfbb 13485 gdb_cv_have_pt_getxmmregs=no
3862412b 13486fi
81ecdfbb 13487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13488fi
13489
81ecdfbb
RW
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13491$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13492if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13493
81ecdfbb 13494$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13495
97bf5e38 13496fi
3862412b 13497
eb368090 13498# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13499
13500if test "${target}" = "${host}"; then
13501 case "${host}" in
97bf5e38 13502 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13503
81ecdfbb 13504$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13505
13506 ;;
c162e8c9 13507 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13508
81ecdfbb 13509$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13510
13511 ;;
13512 mips-sgi-irix5*)
13513 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13514
81ecdfbb 13515$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13516
13517 ;;
13518 esac
13519fi
13520
13521if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13523$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13524 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13525 $as_echo_n "(cached) " >&6
bec39cab 13526else
81ecdfbb 13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13528/* end confdefs.h. */
596c9d4b
KB
13529
13530#define _SYSCALL32
d30c5336
JK
13531/* Needed for new procfs interface on sparc-solaris. */
13532#define _STRUCTURED_PROC 1
596c9d4b 13533#include <sys/procfs.h>
bec39cab
AC
13534int
13535main ()
13536{
97bf5e38 13537pstatus_t avar
bec39cab
AC
13538 ;
13539 return 0;
13540}
13541_ACEOF
81ecdfbb 13542if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13543 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13544else
81ecdfbb 13545 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13546
596c9d4b 13547fi
81ecdfbb 13548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13549fi
13550
97bf5e38 13551 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13552
81ecdfbb 13553$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13554
13555 fi
81ecdfbb
RW
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13557$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13558
81ecdfbb
RW
13559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13560$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13561 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
596c9d4b 13563else
81ecdfbb 13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13565/* end confdefs.h. */
596c9d4b
KB
13566
13567#define _SYSCALL32
d30c5336
JK
13568/* Needed for new procfs interface on sparc-solaris. */
13569#define _STRUCTURED_PROC 1
596c9d4b 13570#include <sys/procfs.h>
bec39cab
AC
13571int
13572main ()
13573{
97bf5e38 13574prrun_t avar
bec39cab
AC
13575 ;
13576 return 0;
13577}
13578_ACEOF
81ecdfbb 13579if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13580 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13581else
81ecdfbb 13582 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13583
596c9d4b 13584fi
81ecdfbb 13585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13586fi
13587
97bf5e38 13588 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13589
81ecdfbb 13590$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13591
13592 fi
81ecdfbb
RW
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13594$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13595
81ecdfbb
RW
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13597$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13598 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13599 $as_echo_n "(cached) " >&6
596c9d4b 13600else
81ecdfbb 13601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13602/* end confdefs.h. */
596c9d4b
KB
13603
13604#define _SYSCALL32
d30c5336
JK
13605/* Needed for new procfs interface on sparc-solaris. */
13606#define _STRUCTURED_PROC 1
596c9d4b 13607#include <sys/procfs.h>
bec39cab
AC
13608int
13609main ()
13610{
97bf5e38 13611gregset_t avar
bec39cab
AC
13612 ;
13613 return 0;
13614}
13615_ACEOF
81ecdfbb 13616if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13617 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13618else
81ecdfbb 13619 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13620
596c9d4b 13621fi
81ecdfbb 13622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13623fi
13624
97bf5e38 13625 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13626
81ecdfbb 13627$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13628
13629 fi
81ecdfbb
RW
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13631$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13632
81ecdfbb
RW
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13634$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13635 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13636 $as_echo_n "(cached) " >&6
d84dd0c5 13637else
81ecdfbb 13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13639/* end confdefs.h. */
97bf5e38
MK
13640
13641#define _SYSCALL32
d30c5336
JK
13642/* Needed for new procfs interface on sparc-solaris. */
13643#define _STRUCTURED_PROC 1
d84dd0c5 13644#include <sys/procfs.h>
bec39cab
AC
13645int
13646main ()
13647{
97bf5e38 13648fpregset_t avar
bec39cab
AC
13649 ;
13650 return 0;
13651}
13652_ACEOF
81ecdfbb 13653if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13654 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13655else
81ecdfbb 13656 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13657
d84dd0c5 13658fi
81ecdfbb 13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13660fi
13661
97bf5e38 13662 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13663
81ecdfbb 13664$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13665
97bf5e38 13666 fi
81ecdfbb
RW
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13668$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13669
81ecdfbb
RW
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13671$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13672 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13673 $as_echo_n "(cached) " >&6
c906108c 13674else
81ecdfbb 13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13676/* end confdefs.h. */
c906108c 13677
97bf5e38 13678#define _SYSCALL32
d30c5336
JK
13679/* Needed for new procfs interface on sparc-solaris. */
13680#define _STRUCTURED_PROC 1
97bf5e38 13681#include <sys/procfs.h>
bec39cab
AC
13682int
13683main ()
13684{
97bf5e38 13685prgregset_t avar
bec39cab
AC
13686 ;
13687 return 0;
13688}
13689_ACEOF
81ecdfbb 13690if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13691 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13692else
81ecdfbb 13693 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13694
c906108c 13695fi
81ecdfbb 13696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13697fi
13698
97bf5e38 13699 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13700
81ecdfbb 13701$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13702
97bf5e38 13703 fi
81ecdfbb
RW
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13705$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13706
81ecdfbb
RW
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13708$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13709 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13710 $as_echo_n "(cached) " >&6
d45fe813 13711else
81ecdfbb 13712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13713/* end confdefs.h. */
97bf5e38
MK
13714
13715#define _SYSCALL32
d30c5336
JK
13716/* Needed for new procfs interface on sparc-solaris. */
13717#define _STRUCTURED_PROC 1
97bf5e38 13718#include <sys/procfs.h>
bec39cab
AC
13719int
13720main ()
13721{
97bf5e38 13722prfpregset_t avar
bec39cab
AC
13723 ;
13724 return 0;
13725}
13726_ACEOF
81ecdfbb 13727if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13728 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13729else
81ecdfbb 13730 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13731
d45fe813 13732fi
81ecdfbb 13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13734fi
13735
97bf5e38 13736 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13737
81ecdfbb 13738$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13739
97bf5e38 13740 fi
81ecdfbb
RW
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13742$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13743
81ecdfbb
RW
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13745$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13746 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13747 $as_echo_n "(cached) " >&6
d45fe813 13748else
81ecdfbb 13749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13750/* end confdefs.h. */
97bf5e38
MK
13751
13752#define _SYSCALL32
d30c5336
JK
13753/* Needed for new procfs interface on sparc-solaris. */
13754#define _STRUCTURED_PROC 1
97bf5e38 13755#include <sys/procfs.h>
bec39cab
AC
13756int
13757main ()
13758{
97bf5e38 13759prgregset32_t avar
bec39cab
AC
13760 ;
13761 return 0;
13762}
13763_ACEOF
81ecdfbb 13764if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13765 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13766else
81ecdfbb 13767 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13768
d45fe813 13769fi
81ecdfbb 13770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13771fi
13772
97bf5e38 13773 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13774
81ecdfbb 13775$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13776
97bf5e38 13777 fi
81ecdfbb
RW
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13779$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13780
81ecdfbb
RW
13781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13782$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13783 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13784 $as_echo_n "(cached) " >&6
d45fe813 13785else
81ecdfbb 13786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13787/* end confdefs.h. */
97bf5e38
MK
13788
13789#define _SYSCALL32
d30c5336
JK
13790/* Needed for new procfs interface on sparc-solaris. */
13791#define _STRUCTURED_PROC 1
97bf5e38 13792#include <sys/procfs.h>
bec39cab
AC
13793int
13794main ()
13795{
97bf5e38 13796prfpregset32_t avar
bec39cab
AC
13797 ;
13798 return 0;
13799}
13800_ACEOF
81ecdfbb 13801if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13802 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13803else
81ecdfbb 13804 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13805
d45fe813 13806fi
81ecdfbb 13807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13808fi
13809
97bf5e38 13810 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13811
81ecdfbb 13812$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13813
97bf5e38 13814 fi
81ecdfbb
RW
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13816$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13817
81ecdfbb
RW
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13819$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13820 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13821 $as_echo_n "(cached) " >&6
d45fe813 13822else
81ecdfbb 13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13824/* end confdefs.h. */
97bf5e38 13825
d45fe813 13826#define _SYSCALL32
d30c5336
JK
13827/* Needed for new procfs interface on sparc-solaris. */
13828#define _STRUCTURED_PROC 1
97bf5e38 13829#include <sys/procfs.h>
bec39cab
AC
13830int
13831main ()
13832{
97bf5e38 13833lwpid_t avar
bec39cab
AC
13834 ;
13835 return 0;
13836}
13837_ACEOF
81ecdfbb 13838if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13839 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13840else
81ecdfbb 13841 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13842
d45fe813 13843fi
81ecdfbb 13844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13845fi
13846
97bf5e38 13847 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13848
81ecdfbb 13849$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13850
97bf5e38 13851 fi
81ecdfbb
RW
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13853$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13854
81ecdfbb
RW
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13856$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13857 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13858 $as_echo_n "(cached) " >&6
c906108c 13859else
81ecdfbb 13860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13861/* end confdefs.h. */
c906108c 13862
97bf5e38 13863#define _SYSCALL32
d30c5336
JK
13864/* Needed for new procfs interface on sparc-solaris. */
13865#define _STRUCTURED_PROC 1
97bf5e38 13866#include <sys/procfs.h>
bec39cab
AC
13867int
13868main ()
13869{
97bf5e38 13870psaddr_t avar
bec39cab
AC
13871 ;
13872 return 0;
13873}
13874_ACEOF
81ecdfbb 13875if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13876 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13877else
81ecdfbb 13878 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13879
c906108c 13880fi
81ecdfbb 13881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13882fi
13883
97bf5e38 13884 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13885
81ecdfbb 13886$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13887
97bf5e38 13888 fi
81ecdfbb
RW
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13890$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13891
81ecdfbb
RW
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13893$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13894 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13895 $as_echo_n "(cached) " >&6
c906108c 13896else
81ecdfbb 13897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13898/* end confdefs.h. */
c906108c 13899
97bf5e38 13900#define _SYSCALL32
d30c5336
JK
13901/* Needed for new procfs interface on sparc-solaris. */
13902#define _STRUCTURED_PROC 1
97bf5e38 13903#include <sys/procfs.h>
bec39cab
AC
13904int
13905main ()
13906{
97bf5e38 13907prsysent_t avar
bec39cab
AC
13908 ;
13909 return 0;
13910}
13911_ACEOF
81ecdfbb 13912if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13913 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13914else
81ecdfbb 13915 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13916
c906108c 13917fi
81ecdfbb 13918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13919fi
13920
97bf5e38 13921 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13922
81ecdfbb 13923$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13924
97bf5e38 13925 fi
81ecdfbb
RW
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13927$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13928
81ecdfbb
RW
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13930$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13931 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13932 $as_echo_n "(cached) " >&6
c906108c 13933else
81ecdfbb 13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13935/* end confdefs.h. */
c906108c 13936
97bf5e38 13937#define _SYSCALL32
d30c5336
JK
13938/* Needed for new procfs interface on sparc-solaris. */
13939#define _STRUCTURED_PROC 1
97bf5e38 13940#include <sys/procfs.h>
bec39cab
AC
13941int
13942main ()
13943{
97bf5e38 13944pr_sigset_t avar
bec39cab
AC
13945 ;
13946 return 0;
13947}
13948_ACEOF
81ecdfbb 13949if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13950 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13951else
81ecdfbb 13952 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13953
c906108c 13954fi
81ecdfbb 13955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13956fi
13957
97bf5e38 13958 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13959
81ecdfbb 13960$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13961
97bf5e38 13962 fi
81ecdfbb
RW
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13964$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13965
81ecdfbb
RW
13966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13967$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13968 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13969 $as_echo_n "(cached) " >&6
c906108c 13970else
81ecdfbb 13971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13972/* end confdefs.h. */
c906108c 13973
97bf5e38 13974#define _SYSCALL32
d30c5336
JK
13975/* Needed for new procfs interface on sparc-solaris. */
13976#define _STRUCTURED_PROC 1
97bf5e38 13977#include <sys/procfs.h>
bec39cab
AC
13978int
13979main ()
13980{
97bf5e38 13981pr_sigaction64_t avar
bec39cab
AC
13982 ;
13983 return 0;
13984}
13985_ACEOF
81ecdfbb 13986if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13987 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13988else
81ecdfbb 13989 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13990
c906108c 13991fi
81ecdfbb 13992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13993fi
13994
97bf5e38 13995 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13996
81ecdfbb 13997$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13998
97bf5e38 13999 fi
81ecdfbb
RW
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14001$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14002
81ecdfbb
RW
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14004$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14005 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14006 $as_echo_n "(cached) " >&6
97bf5e38 14007else
81ecdfbb 14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14009/* end confdefs.h. */
97bf5e38
MK
14010
14011#define _SYSCALL32
d30c5336
JK
14012/* Needed for new procfs interface on sparc-solaris. */
14013#define _STRUCTURED_PROC 1
97bf5e38 14014#include <sys/procfs.h>
bec39cab
AC
14015int
14016main ()
14017{
97bf5e38 14018pr_siginfo64_t avar
bec39cab
AC
14019 ;
14020 return 0;
14021}
14022_ACEOF
81ecdfbb 14023if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14024 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14025else
81ecdfbb 14026 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14027
97bf5e38 14028fi
81ecdfbb 14029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14030fi
c906108c 14031
97bf5e38 14032 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14033
81ecdfbb 14034$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14035
97bf5e38 14036 fi
81ecdfbb
RW
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14038$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14039
14040
97bf5e38
MK
14041
14042
14043
97bf5e38 14044 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14046$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14047 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14048 $as_echo_n "(cached) " >&6
c906108c 14049else
81ecdfbb 14050 if test "$cross_compiling" = yes; then :
97bf5e38 14051 gdb_cv_prfpregset_t_broken=yes
c906108c 14052else
81ecdfbb 14053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14054/* end confdefs.h. */
97bf5e38
MK
14055#include <sys/procfs.h>
14056 int main ()
14057 {
14058 if (sizeof (prfpregset_t) == sizeof (void *))
14059 return 1;
14060 return 0;
14061 }
bec39cab 14062_ACEOF
81ecdfbb 14063if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14064 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14065else
14066 gdb_cv_prfpregset_t_broken=yes
c906108c 14067fi
81ecdfbb
RW
14068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14069 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14070fi
81ecdfbb 14071
c906108c
SS
14072fi
14073
81ecdfbb
RW
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14075$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14076 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14077
81ecdfbb 14078$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14079
97bf5e38
MK
14080 fi
14081 fi
c906108c 14082
bec39cab 14083
81ecdfbb
RW
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
14085$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
14086 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
14087 $as_echo_n "(cached) " >&6
c906108c 14088else
81ecdfbb 14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14090/* end confdefs.h. */
97bf5e38
MK
14091#include <unistd.h>
14092#include <sys/types.h>
14093#include <sys/procfs.h>
14094
bec39cab
AC
14095int
14096main ()
14097{
97bf5e38
MK
14098
14099 int dummy;;
14100 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
14101
14102 ;
14103 return 0;
14104}
14105_ACEOF
81ecdfbb 14106if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14107 gdb_cv_have_procfs_piocset=yes
c906108c 14108else
81ecdfbb 14109 gdb_cv_have_procfs_piocset=no
c906108c 14110fi
81ecdfbb 14111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14112fi
97bf5e38 14113
81ecdfbb
RW
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
14115$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 14116 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 14117
81ecdfbb 14118$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
14119
14120 fi
c906108c 14121fi
c906108c 14122
97bf5e38 14123if test ${host} = ${target} ; then
bec39cab 14124
81ecdfbb
RW
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
14126$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
14127 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
14128 $as_echo_n "(cached) " >&6
bec39cab 14129else
81ecdfbb 14130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14131/* end confdefs.h. */
97bf5e38 14132#include <link.h>
bec39cab
AC
14133int
14134main ()
14135{
97bf5e38 14136struct link_map lm; (void) lm.l_addr;
bec39cab
AC
14137 ;
14138 return 0;
14139}
14140_ACEOF
81ecdfbb 14141if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14142 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 14143else
81ecdfbb 14144 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 14145fi
81ecdfbb 14146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14147fi
14148
81ecdfbb
RW
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
14150$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 14151 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 14152
81ecdfbb 14153$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14154
14155 fi
14156
bec39cab 14157
81ecdfbb
RW
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
14159$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
14160 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
14161 $as_echo_n "(cached) " >&6
c906108c 14162else
81ecdfbb 14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14164/* end confdefs.h. */
97bf5e38
MK
14165#include <sys/types.h>
14166#include <link.h>
bec39cab
AC
14167int
14168main ()
14169{
97bf5e38 14170struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
14171 ;
14172 return 0;
14173}
14174_ACEOF
81ecdfbb 14175if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14176 gdb_cv_have_struct_link_map_with_lm_members=yes
14177else
81ecdfbb 14178 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14179fi
81ecdfbb 14180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14181fi
c906108c 14182
81ecdfbb
RW
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14184$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14185 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14186
81ecdfbb 14187$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14188
14189 fi
14190
bec39cab 14191
81ecdfbb
RW
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14193$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14194 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14195 $as_echo_n "(cached) " >&6
c906108c 14196else
81ecdfbb 14197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14198/* end confdefs.h. */
97bf5e38
MK
14199#include <sys/types.h>
14200#ifdef HAVE_NLIST_H
14201#include <nlist.h>
14202#endif
14203#include <link.h>
bec39cab
AC
14204int
14205main ()
14206{
97bf5e38 14207struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14208 ;
14209 return 0;
14210}
14211_ACEOF
81ecdfbb 14212if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14213 gdb_cv_have_struct_so_map_with_som_members=yes
14214else
81ecdfbb 14215 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14216fi
81ecdfbb 14217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14218fi
c906108c 14219
81ecdfbb
RW
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14221$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14222 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14223
81ecdfbb 14224$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14225
97bf5e38 14226 fi
c906108c 14227
bec39cab 14228
81ecdfbb
RW
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14230$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14231 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14232 $as_echo_n "(cached) " >&6
97bf5e38 14233else
81ecdfbb 14234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14235/* end confdefs.h. */
97bf5e38
MK
14236#define _SYSCALL32
14237#include <sys/link.h>
bec39cab
AC
14238int
14239main ()
14240{
97bf5e38 14241struct link_map32 l;
bec39cab
AC
14242 ;
14243 return 0;
14244}
14245_ACEOF
81ecdfbb 14246if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14247 gdb_cv_have_struct_link_map32=yes
14248else
81ecdfbb 14249 gdb_cv_have_struct_link_map32=no
97bf5e38 14250fi
81ecdfbb 14251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14252fi
c906108c 14253
81ecdfbb
RW
14254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14255$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14256 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14257
81ecdfbb 14258$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14259
60ca704f 14260
81ecdfbb 14261$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14262
97bf5e38
MK
14263 fi
14264fi
c906108c 14265
bc8bcb4b 14266# Check if the compiler supports the `long long' type.
c906108c 14267
81ecdfbb
RW
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14269$as_echo_n "checking for long long support in compiler... " >&6; }
14270if test "${gdb_cv_c_long_long+set}" = set; then :
14271 $as_echo_n "(cached) " >&6
97bf5e38 14272else
81ecdfbb 14273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14274/* end confdefs.h. */
bc8bcb4b 14275extern long long foo;
bec39cab
AC
14276int
14277main ()
14278{
bc8bcb4b 14279switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14280 ;
14281 return 0;
14282}
14283_ACEOF
81ecdfbb 14284if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14285 gdb_cv_c_long_long=yes
14286else
81ecdfbb 14287 gdb_cv_c_long_long=no
97bf5e38 14288fi
81ecdfbb 14289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14290fi
81ecdfbb
RW
14291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14292$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14293if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14294
81ecdfbb 14295$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14296
14297fi
14298
bc8bcb4b 14299# Check if the compiler and runtime support printing long longs.
97bf5e38 14300
81ecdfbb
RW
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14302$as_echo_n "checking for long long support in printf... " >&6; }
14303if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14304 $as_echo_n "(cached) " >&6
97bf5e38 14305else
81ecdfbb 14306 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14307 gdb_cv_printf_has_long_long=no
14308else
81ecdfbb 14309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14310/* end confdefs.h. */
bc8bcb4b
MK
14311$ac_includes_default
14312int
14313main ()
14314{
14315char buf[32];
97bf5e38
MK
14316 long long l = 0;
14317 l = (l << 16) + 0x0123;
14318 l = (l << 16) + 0x4567;
14319 l = (l << 16) + 0x89ab;
14320 l = (l << 16) + 0xcdef;
14321 sprintf (buf, "0x%016llx", l);
14322 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14323 ;
14324 return 0;
c906108c 14325}
bec39cab 14326_ACEOF
81ecdfbb 14327if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14328 gdb_cv_printf_has_long_long=yes
14329else
81ecdfbb 14330 gdb_cv_printf_has_long_long=no
97bf5e38 14331fi
81ecdfbb
RW
14332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14333 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14334fi
81ecdfbb 14335
97bf5e38 14336fi
81ecdfbb
RW
14337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14338$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14339if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14340
81ecdfbb 14341$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14342
14343fi
97bf5e38 14344
1a619819
LM
14345# Check if the compiler and runtime support printing decfloats.
14346
81ecdfbb
RW
14347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14348$as_echo_n "checking for decfloat support in printf... " >&6; }
14349if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14350 $as_echo_n "(cached) " >&6
1a619819 14351else
81ecdfbb 14352 if test "$cross_compiling" = yes; then :
1a619819
LM
14353 gdb_cv_printf_has_decfloat=no
14354else
81ecdfbb 14355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14356/* end confdefs.h. */
14357$ac_includes_default
14358int
14359main ()
14360{
14361char buf[64];
14362 _Decimal32 d32 = 1.2345df;
14363 _Decimal64 d64 = 1.2345dd;
14364 _Decimal128 d128 = 1.2345dl;
14365 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14366 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14367 ;
14368 return 0;
14369}
14370_ACEOF
81ecdfbb 14371if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14372 gdb_cv_printf_has_decfloat=yes
14373else
81ecdfbb 14374 gdb_cv_printf_has_decfloat=no
1a619819 14375fi
81ecdfbb
RW
14376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14377 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14378fi
81ecdfbb 14379
1a619819 14380fi
81ecdfbb
RW
14381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14382$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14383if test $gdb_cv_printf_has_decfloat = yes; then
14384
81ecdfbb 14385$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14386
14387fi
14388
bc8bcb4b
MK
14389# Check if the compiler supports the `long double' type. We can't use
14390# AC_C_LONG_DOUBLE because that one does additional checks on the
14391# constants defined in <float.h> that fail on some systems,
14392# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14393
81ecdfbb
RW
14394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14395$as_echo_n "checking for long double support in compiler... " >&6; }
14396if test "${gdb_cv_c_long_double+set}" = set; then :
14397 $as_echo_n "(cached) " >&6
97bf5e38 14398else
81ecdfbb 14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14400/* end confdefs.h. */
97bf5e38 14401long double foo;
bec39cab 14402_ACEOF
81ecdfbb 14403if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14404 gdb_cv_c_long_double=yes
97bf5e38 14405else
81ecdfbb 14406 gdb_cv_c_long_double=no
97bf5e38 14407fi
81ecdfbb 14408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14409fi
81ecdfbb
RW
14410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14411$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14412if test $gdb_cv_c_long_double = yes; then
c906108c 14413
81ecdfbb 14414$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14415
14416fi
14417
bc8bcb4b 14418# Check if the compiler and runtime support printing long doubles.
97bf5e38 14419
81ecdfbb
RW
14420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14421$as_echo_n "checking for long double support in printf... " >&6; }
14422if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14423 $as_echo_n "(cached) " >&6
97bf5e38 14424else
81ecdfbb 14425 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14426 gdb_cv_printf_has_long_double=no
14427else
81ecdfbb 14428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14429/* end confdefs.h. */
bc8bcb4b
MK
14430$ac_includes_default
14431int
14432main ()
14433{
14434char buf[16];
97bf5e38
MK
14435 long double f = 3.141592653;
14436 sprintf (buf, "%Lg", f);
14437 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14438 ;
14439 return 0;
97bf5e38 14440}
bec39cab 14441_ACEOF
81ecdfbb 14442if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14443 gdb_cv_printf_has_long_double=yes
c906108c 14444else
81ecdfbb 14445 gdb_cv_printf_has_long_double=no
c906108c 14446fi
81ecdfbb
RW
14447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14448 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14449fi
81ecdfbb 14450
c906108c 14451fi
81ecdfbb
RW
14452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14453$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14454if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14455
81ecdfbb 14456$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14457
14458fi
97bf5e38 14459
bc8bcb4b 14460# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14461
81ecdfbb
RW
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14463$as_echo_n "checking for long double support in scanf... " >&6; }
14464if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14465 $as_echo_n "(cached) " >&6
97bf5e38 14466else
81ecdfbb 14467 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14468 gdb_cv_scanf_has_long_double=no
14469else
81ecdfbb 14470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14471/* end confdefs.h. */
bc8bcb4b
MK
14472#include <stdio.h>
14473int
14474main ()
14475{
14476char *buf = "3.141592653";
97bf5e38
MK
14477 long double f = 0;
14478 sscanf (buf, "%Lg", &f);
14479 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14480 ;
14481 return 0;
97bf5e38 14482}
bec39cab 14483_ACEOF
81ecdfbb 14484if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14485 gdb_cv_scanf_has_long_double=yes
14486else
81ecdfbb 14487 gdb_cv_scanf_has_long_double=no
97bf5e38 14488fi
81ecdfbb
RW
14489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14490 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14491fi
81ecdfbb 14492
c906108c 14493fi
81ecdfbb
RW
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14495$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14496if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14497
81ecdfbb 14498$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14499
14500fi
c906108c 14501
438013df
AO
14502case ${host_os} in
14503aix*)
81ecdfbb
RW
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14505$as_echo_n "checking for -bbigtoc option... " >&6; }
14506if test "${gdb_cv_bigtoc+set}" = set; then :
14507 $as_echo_n "(cached) " >&6
438013df 14508else
bec39cab 14509
438013df
AO
14510 SAVE_LDFLAGS=$LDFLAGS
14511
14512 case $GCC in
14513 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14514 *) gdb_cv_bigtoc=-bbigtoc ;;
14515 esac
14516
14517 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14519/* end confdefs.h. */
438013df 14520
bec39cab
AC
14521int
14522main ()
14523{
438013df 14524int i;
bec39cab
AC
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14530
81ecdfbb
RW
14531else
14532 gdb_cv_bigtoc=
438013df 14533fi
81ecdfbb
RW
14534rm -f core conftest.err conftest.$ac_objext \
14535 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14536 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14537
bec39cab 14538fi
81ecdfbb
RW
14539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14540$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14541 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14542 ;;
14543esac
14544
38f6b338 14545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14546$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14547dynamic_list=false
14548if test "${gdb_native}" = yes; then
14549 # The dynamically loaded libthread_db needs access to symbols in the gdb
14550 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14551 # may not be supported there.
14552 old_LDFLAGS="$LDFLAGS"
14553 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14554 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14555 LDFLAGS="$LDFLAGS $RDYNAMIC"
14556 if test "${have_libpython}" = no; then
14557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14558/* end confdefs.h. */
14559
14560int
14561main ()
14562{
14563
14564 ;
14565 return 0;
14566}
14567_ACEOF
14568if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14569 dynamic_list=true
14570fi
14571rm -f core conftest.err conftest.$ac_objext \
14572 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14573 else
14574 # Workaround http://bugs.python.org/issue4434 where static
14575 # libpythonX.Y.a would get its symbols required for
14576 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14577 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14578 old_CFLAGS="$CFLAGS"
14579 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14580 if test "$cross_compiling" = yes; then :
3bebe2f2 14581 true
f6528abd 14582else
3bebe2f2
JK
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584/* end confdefs.h. */
14585#include "${have_libpython}/Python.h"
14586int
14587main ()
14588{
14589int err;
38f6b338
JK
14590 Py_Initialize ();
14591 err = PyRun_SimpleString ("import itertools\n");
14592 Py_Finalize ();
14593 return err == 0 ? 0 : 1;
3bebe2f2
JK
14594 ;
14595 return 0;
14596}
14597_ACEOF
14598if ac_fn_c_try_run "$LINENO"; then :
14599 dynamic_list=true
14600fi
14601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
14603fi
14604
38f6b338
JK
14605 CFLAGS="$old_CFLAGS"
14606 fi
14607 LDFLAGS="$old_LDFLAGS"
14608fi
14609if $dynamic_list; then
14610 found="-Wl,--dynamic-list"
14611 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14612else
38f6b338
JK
14613 found="-rdynamic"
14614 RDYNAMIC="-rdynamic"
f6528abd 14615fi
f6528abd 14616
38f6b338 14617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14618$as_echo "$found" >&6; }
0407b3f1 14619
f6528abd 14620
0407b3f1 14621if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14622 case ${host_os} in
c906108c 14623 solaris*)
d92419e5
JB
14624 # See if thread_db library is around for Solaris thread debugging.
14625 # Note that we must explicitly test for version 1 of the library
14626 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14627 # the same API.
81ecdfbb
RW
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14629$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14630 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14632$as_echo "yes" >&6; }
60ca704f 14633
81ecdfbb 14634$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14635
3483b318 14636 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14637 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14639$as_echo_n "checking for dlopen in -ldl... " >&6; }
14640if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14641 $as_echo_n "(cached) " >&6
c906108c 14642else
bec39cab 14643 ac_check_lib_save_LIBS=$LIBS
c906108c 14644LIBS="-ldl $LIBS"
81ecdfbb 14645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14646/* end confdefs.h. */
14647
81ecdfbb
RW
14648/* Override any GCC internal prototype to avoid an error.
14649 Use char because int might match the return type of a GCC
14650 builtin and then its argument prototype would still apply. */
bec39cab
AC
14651#ifdef __cplusplus
14652extern "C"
14653#endif
bec39cab
AC
14654char dlopen ();
14655int
14656main ()
14657{
81ecdfbb 14658return dlopen ();
bec39cab
AC
14659 ;
14660 return 0;
14661}
14662_ACEOF
81ecdfbb 14663if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14664 ac_cv_lib_dl_dlopen=yes
14665else
81ecdfbb 14666 ac_cv_lib_dl_dlopen=no
bec39cab 14667fi
81ecdfbb
RW
14668rm -f core conftest.err conftest.$ac_objext \
14669 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14670LIBS=$ac_check_lib_save_LIBS
14671fi
81ecdfbb
RW
14672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14673$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14674if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14675 cat >>confdefs.h <<_ACEOF
14676#define HAVE_LIBDL 1
14677_ACEOF
c906108c
SS
14678
14679 LIBS="-ldl $LIBS"
14680
c906108c
SS
14681fi
14682
f6528abd 14683 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14684 # Sun randomly tweaked the prototypes in <proc_service.h>
14685 # at one point.
81ecdfbb
RW
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14687$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14688 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14689 $as_echo_n "(cached) " >&6
c906108c 14690else
bec39cab 14691
81ecdfbb 14692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14693/* end confdefs.h. */
c906108c
SS
14694
14695 #include <proc_service.h>
14696 ps_err_e ps_pdwrite
14697 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14698
bec39cab
AC
14699int
14700main ()
14701{
14702
14703 ;
14704 return 0;
14705}
14706_ACEOF
81ecdfbb 14707if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14708 gdb_cv_proc_service_is_old=no
14709else
81ecdfbb 14710 gdb_cv_proc_service_is_old=yes
c906108c 14711fi
81ecdfbb 14712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14713
c906108c
SS
14714fi
14715
81ecdfbb
RW
14716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14717$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14718 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14719
81ecdfbb 14720$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14721
14722 fi
14723 else
81ecdfbb
RW
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725$as_echo "no" >&6; }
c906108c
SS
14726 fi
14727 ;;
d92419e5 14728 aix*)
81ecdfbb
RW
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14730$as_echo_n "checking for AiX thread debugging library... " >&6; }
14731 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14732 $as_echo_n "(cached) " >&6
bec39cab 14733else
81ecdfbb 14734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14735/* end confdefs.h. */
d92419e5 14736#include <sys/pthdebug.h>
bec39cab
AC
14737int
14738main ()
14739{
d92419e5
JB
14740#ifndef PTHDB_VERSION_3
14741 #error
14742 #endif
bec39cab
AC
14743 ;
14744 return 0;
14745}
14746_ACEOF
81ecdfbb 14747if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14748 gdb_cv_have_aix_thread_debug=yes
14749else
81ecdfbb 14750 gdb_cv_have_aix_thread_debug=no
d92419e5 14751fi
81ecdfbb 14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14753fi
14754
81ecdfbb
RW
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14756$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14757 if test $gdb_cv_have_aix_thread_debug = yes; then
14758 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14759 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14760 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14761
14762 # Older versions of AIX do not provide the declaration for
14763 # the getthrds function (it appears that it was introduced
14764 # with AIX 6.x).
14765 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14766"
14767if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14768 ac_have_decl=1
14769else
14770 ac_have_decl=0
14771fi
14772
14773cat >>confdefs.h <<_ACEOF
14774#define HAVE_DECL_GETTHRDS $ac_have_decl
14775_ACEOF
14776
d92419e5
JB
14777 fi
14778 ;;
c906108c 14779 esac
bec39cab 14780
c906108c
SS
14781fi
14782
3f47be5c 14783if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14785$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14786if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14787 $as_echo_n "(cached) " >&6
bec39cab 14788else
81ecdfbb 14789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14790/* end confdefs.h. */
3f47be5c 14791#include <thread_db.h>
bec39cab
AC
14792int
14793main ()
14794{
3f47be5c 14795int i = TD_NOTALLOC;
bec39cab
AC
14796 ;
14797 return 0;
14798}
14799_ACEOF
81ecdfbb 14800if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14801 gdb_cv_thread_db_h_has_td_notalloc=yes
14802else
81ecdfbb 14803 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14804
3f47be5c 14805fi
81ecdfbb 14806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14807
bec39cab 14808fi
81ecdfbb
RW
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14810$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14812$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14813if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14814 $as_echo_n "(cached) " >&6
59f80f10 14815else
81ecdfbb 14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14817/* end confdefs.h. */
14818#include <thread_db.h>
14819int
14820main ()
14821{
14822int i = TD_VERSION;
14823 ;
14824 return 0;
14825}
14826_ACEOF
81ecdfbb 14827if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14828 gdb_cv_thread_db_h_has_td_version=yes
14829else
81ecdfbb 14830 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14831
14832fi
81ecdfbb 14833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14834
14835fi
81ecdfbb
RW
14836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14837$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14839$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14840if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14841 $as_echo_n "(cached) " >&6
59f80f10 14842else
81ecdfbb 14843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14844/* end confdefs.h. */
14845#include <thread_db.h>
14846int
14847main ()
14848{
14849int i = TD_NOTLS;
14850 ;
14851 return 0;
14852}
14853_ACEOF
81ecdfbb 14854if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14855 gdb_cv_thread_db_h_has_td_notls=yes
14856else
81ecdfbb 14857 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14858
14859fi
81ecdfbb 14860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14861
14862fi
81ecdfbb
RW
14863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14864$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14865fi
14866if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14867
81ecdfbb 14868$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14869
59f80f10
DJ
14870fi
14871if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14872
81ecdfbb 14873$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14874
14875fi
14876if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14877
81ecdfbb 14878$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14879
3f47be5c
EZ
14880fi
14881
b757528f 14882if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14884$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14885if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14886 $as_echo_n "(cached) " >&6
bec39cab 14887else
81ecdfbb 14888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14889/* end confdefs.h. */
b757528f 14890#include <sys/syscall.h>
bec39cab
AC
14891int
14892main ()
14893{
b757528f 14894int i = __NR_tkill;
bec39cab
AC
14895 ;
14896 return 0;
14897}
14898_ACEOF
81ecdfbb 14899if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14900 gdb_cv_sys_syscall_h_has_tkill=yes
14901else
81ecdfbb 14902 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14903
b757528f 14904fi
81ecdfbb 14905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14906
bec39cab 14907fi
81ecdfbb
RW
14908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14909$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14910fi
14911if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14912
81ecdfbb 14913$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14914
14915fi
14916
81ecdfbb
RW
14917ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14918"
14919if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14920 ac_have_decl=1
10568435 14921else
81ecdfbb 14922 ac_have_decl=0
10568435 14923fi
10568435
JK
14924
14925cat >>confdefs.h <<_ACEOF
81ecdfbb 14926#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14927_ACEOF
14928
14929
81ecdfbb
RW
14930if test "$cross_compiling" = yes; then :
14931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14932/* end confdefs.h. */
14933#include <sys/personality.h>
14934int
14935main ()
14936{
14937
14938# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14939# define ADDR_NO_RANDOMIZE 0x0040000
14940# endif
14941 /* Test the flag could be set and stays set. */
14942 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14943 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14944 return 1
14945 ;
14946 return 0;
14947}
14948_ACEOF
81ecdfbb 14949if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14950 have_personality=true
14951else
81ecdfbb 14952 have_personality=false
10568435 14953fi
81ecdfbb
RW
14954rm -f core conftest.err conftest.$ac_objext \
14955 conftest$ac_exeext conftest.$ac_ext
10568435 14956else
81ecdfbb 14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14958/* end confdefs.h. */
14959#include <sys/personality.h>
14960int
14961main ()
14962{
14963
14964# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14965# define ADDR_NO_RANDOMIZE 0x0040000
14966# endif
14967 /* Test the flag could be set and stays set. */
14968 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14969 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14970 return 1
14971 ;
14972 return 0;
14973}
14974_ACEOF
81ecdfbb 14975if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14976 have_personality=true
14977else
81ecdfbb 14978 have_personality=false
10568435 14979fi
81ecdfbb
RW
14980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14981 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14982fi
81ecdfbb 14983
10568435
JK
14984if $have_personality
14985then
14986
81ecdfbb 14987$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14988
14989fi
14990
fb40c209 14991
b14b1491 14992target_sysroot_reloc=0
bec39cab 14993
81ecdfbb
RW
14994# Check whether --with-sysroot was given.
14995if test "${with_sysroot+set}" = set; then :
14996 withval=$with_sysroot;
030292b7 14997 case ${with_sysroot} in
715d1656 14998 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14999 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
15000 esac
15001
15002 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
15003
07abfebf
RS
15004 if test "x$prefix" = xNONE; then
15005 test_prefix=/usr/local
15006 else
15007 test_prefix=$prefix
15008 fi
aa28a74e 15009 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 15010 test_exec_prefix=$test_prefix
030292b7 15011 else
07abfebf 15012 test_exec_prefix=$exec_prefix
030292b7
DJ
15013 fi
15014 case ${TARGET_SYSTEM_ROOT} in
715d1656 15015 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
15016 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
15017 '${prefix}'|'${prefix}/'*|\
715d1656 15018 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 15019 target_sysroot_reloc=1
030292b7
DJ
15020 ;;
15021 esac
15022
15023else
bec39cab 15024
030292b7
DJ
15025 TARGET_SYSTEM_ROOT=
15026 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
15027
81ecdfbb 15028fi
b14b1491 15029
81ecdfbb 15030TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
15031
15032
15033
16e7150e 15034
16e7150e 15035
81ecdfbb
RW
15036# Check whether --with-system-gdbinit was given.
15037if test "${with_system_gdbinit+set}" = set; then :
15038 withval=$with_system_gdbinit;
b14b1491
TT
15039 SYSTEM_GDBINIT=$withval
15040else
15041 SYSTEM_GDBINIT=
81ecdfbb
RW
15042fi
15043
16e7150e
JG
15044
15045 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15046 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15047 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15048 ac_define_dir=`eval echo $ac_define_dir`
15049
15050cat >>confdefs.h <<_ACEOF
15051#define SYSTEM_GDBINIT "$ac_define_dir"
15052_ACEOF
15053
15054
15055
0c4a4063 15056
b14b1491
TT
15057 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15058 if test "x$prefix" = xNONE; then
15059 test_prefix=/usr/local
15060 else
15061 test_prefix=$prefix
15062 fi
15063 else
15064 test_prefix=$exec_prefix
15065 fi
15066 value=0
15067 case ${ac_define_dir} in
15068 "${test_prefix}"|"${test_prefix}/"*|\
15069 '${exec_prefix}'|'${exec_prefix}/'*)
15070 value=1
15071 ;;
15072 esac
16e7150e 15073
b14b1491
TT
15074cat >>confdefs.h <<_ACEOF
15075#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15076_ACEOF
15077
b14b1491 15078
16e7150e 15079
0c4a4063 15080
81ecdfbb
RW
15081# Check whether --enable-werror was given.
15082if test "${enable_werror+set}" = set; then :
15083 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15084 yes | y) ERROR_ON_WARNING="yes" ;;
15085 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15086 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15087 esac
81ecdfbb
RW
15088fi
15089
094a342e
MK
15090
15091# Enable -Werror by default when using gcc
15092if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
15093 ERROR_ON_WARNING=yes
15094fi
15095
15096WERROR_CFLAGS=""
15097if test "${ERROR_ON_WARNING}" = yes ; then
15098 WERROR_CFLAGS="-Werror"
15099fi
15100
aa79a185
DJ
15101# The entries after -Wno-pointer-sign are disabled warnings which may
15102# be enabled in the future, which can not currently be used to build
15103# GDB.
15104# NOTE: If you change this list, remember to update
3b851bce 15105# gdb/doc/gdbint.texinfo.
aa79a185
DJ
15106build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
15107-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
15108-Wno-unused -Wunused-value -Wunused-function \
15109-Wno-switch -Wno-char-subscripts"
a3b362c4 15110
3526781e
DJ
15111# Enable -Wno-format by default when using gcc on mingw since many
15112# GCC versions complain about %I64.
15113case "${host}" in
15114 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15115esac
15116
81ecdfbb
RW
15117# Check whether --enable-build-warnings was given.
15118if test "${enable_build_warnings+set}" = set; then :
15119 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15120 yes) ;;
15121 no) build_warnings="-w";;
15122 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15123 build_warnings="${build_warnings} ${t}";;
15124 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15125 build_warnings="${t} ${build_warnings}";;
15126 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15127esac
d4f3574e 15128if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15129 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15130fi
81ecdfbb
RW
15131fi
15132# Check whether --enable-gdb-build-warnings was given.
15133if test "${enable_gdb_build_warnings+set}" = set; then :
15134 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15135 yes) ;;
15136 no) build_warnings="-w";;
15137 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15138 build_warnings="${build_warnings} ${t}";;
15139 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15140 build_warnings="${t} ${build_warnings}";;
15141 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15142esac
15143if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15144 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15145fi
81ecdfbb
RW
15146fi
15147WARN_CFLAGS=""
c906108c
SS
15148if test "x${build_warnings}" != x -a "x$GCC" = xyes
15149then
81ecdfbb
RW
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15151$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15152 # Separate out the -Werror flag as some files just cannot be
15153 # compiled with it enabled.
15154 for w in ${build_warnings}; do
15155 case $w in
15156 -Werr*) WERROR_CFLAGS=-Werror ;;
15157 *) # Check that GCC accepts it
4536bbc6
AC
15158 saved_CFLAGS="$CFLAGS"
15159 CFLAGS="$CFLAGS $w"
81ecdfbb 15160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15161/* end confdefs.h. */
4536bbc6 15162
bec39cab
AC
15163int
15164main ()
15165{
4536bbc6 15166
bec39cab
AC
15167 ;
15168 return 0;
15169}
15170_ACEOF
81ecdfbb 15171if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 15172 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15173fi
81ecdfbb 15174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15175 CFLAGS="$saved_CFLAGS"
746a987d
AC
15176 esac
15177 done
81ecdfbb
RW
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15179$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15180fi
15181
15182
104c1213 15183
7a292a7a 15184# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15186$as_echo_n "checking for cygwin... " >&6; }
15187if test "${gdb_cv_os_cygwin+set}" = set; then :
15188 $as_echo_n "(cached) " >&6
bec39cab 15189else
81ecdfbb 15190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15191/* end confdefs.h. */
7a292a7a
SS
15192
15193#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15194lose
15195#endif
bec39cab 15196_ACEOF
7a292a7a 15197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15198 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15199 gdb_cv_os_cygwin=yes
15200else
7a292a7a
SS
15201 gdb_cv_os_cygwin=no
15202fi
15203rm -f conftest*
15204
15205fi
81ecdfbb
RW
15206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15207$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15208
aff38e61 15209
3eb25fda 15210SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15211case ${host} in
95cbc983
AC
15212 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15213 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15214 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15215esac
15216
15217
cd0fc7c3
SS
15218# libreadline needs libuser32.a in a cygwin environment
15219WIN32LIBS=
15220if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15221 WIN32LIBS="-luser32"
15222 case "${target}" in
15223 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15224 ;;
15225 esac
cd0fc7c3 15226fi
c906108c 15227
b4505029
MM
15228# The ser-tcp.c module requires sockets.
15229case ${host} in
15230 *mingw32*)
15231
81ecdfbb 15232$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15233
15234 WIN32LIBS="$WIN32LIBS -lws2_32"
15235 ;;
15236esac
15237
7a292a7a 15238
31d99776
DJ
15239# Add ELF support to GDB, but only if BFD includes ELF support.
15240OLD_CFLAGS=$CFLAGS
15241OLD_LDFLAGS=$LDFLAGS
15242OLD_LIBS=$LIBS
cab58a69 15243CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 15244LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 15245intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15246# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15247if test "$plugins" = "yes"; then
15248 LIBS="-ldl $LIBS"
15249fi
0f72fb1c 15250LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15252$as_echo_n "checking for ELF support in BFD... " >&6; }
15253if test "${gdb_cv_var_elf+set}" = set; then :
15254 $as_echo_n "(cached) " >&6
31d99776 15255else
81ecdfbb 15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15257/* end confdefs.h. */
15258#include <stdlib.h>
15259#include "bfd.h"
15260#include "elf-bfd.h"
15261
15262int
15263main ()
15264{
15265bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15266 ;
15267 return 0;
15268}
15269_ACEOF
81ecdfbb 15270if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15271 gdb_cv_var_elf=yes
15272else
81ecdfbb 15273 gdb_cv_var_elf=no
31d99776 15274fi
81ecdfbb
RW
15275rm -f core conftest.err conftest.$ac_objext \
15276 conftest$ac_exeext conftest.$ac_ext
31d99776 15277fi
81ecdfbb
RW
15278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15279$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15280if test $gdb_cv_var_elf = yes; then
15281 CONFIG_OBS="$CONFIG_OBS elfread.o"
15282
81ecdfbb 15283$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15284
075ff26d
JK
15285 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15286 if test "$plugins" = "yes"; then
15287 OLD_LIBS="-ldl $OLD_LIBS"
15288 fi
31d99776
DJ
15289fi
15290CFLAGS=$OLD_CFLAGS
15291LDFLAGS=$OLD_LDFLAGS
15292LIBS=$OLD_LIBS
15293
121ce6e5
DJ
15294# Add any host-specific objects to GDB.
15295CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15296
3fc11d3e
JM
15297LIBGUI="../libgui/src/libgui.a"
15298GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15299
15300
7a292a7a 15301
3fc11d3e
JM
15302WIN32LDAPP=
15303
15304
15305
d91670b9 15306case "${host}" in
686a5eed 15307*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15308 configdir="win"
15309 ;;
15310*)
15311 configdir="unix"
15312 ;;
15313esac
3fc11d3e
JM
15314
15315GDBTKLIBS=
15316if test "${enable_gdbtk}" = "yes"; then
15317
d1c3b63a
KS
15318 # Gdbtk must have an absolute path to srcdir in order to run
15319 # properly when not installed.
15320 here=`pwd`
15321 cd ${srcdir}
15322 GDBTK_SRC_DIR=`pwd`
15323 cd $here
15324
bec39cab 15325
5062cc19
KS
15326 #
15327 # Ok, lets find the tcl configuration
15328 # First, look for one uninstalled.
15329 # the alternative search directory is invoked by --with-tcl
15330 #
3fc11d3e 15331
5062cc19
KS
15332 if test x"${no_tcl}" = x ; then
15333 # we reset no_tcl in case something fails here
15334 no_tcl=true
bec39cab 15335
81ecdfbb
RW
15336# Check whether --with-tcl was given.
15337if test "${with_tcl+set}" = set; then :
15338 withval=$with_tcl; with_tclconfig=${withval}
15339fi
15340
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15342$as_echo_n "checking for Tcl configuration... " >&6; }
15343 if test "${ac_cv_c_tclconfig+set}" = set; then :
15344 $as_echo_n "(cached) " >&6
3fc11d3e 15345else
bec39cab 15346
3fc11d3e 15347
5062cc19
KS
15348 # First check to see if --with-tcl was specified.
15349 case "${host}" in
15350 *-*-cygwin*) platDir="win" ;;
15351 *) platDir="unix" ;;
15352 esac
15353 if test x"${with_tclconfig}" != x ; then
15354 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15355 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15356 else
81ecdfbb 15357 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15358 fi
15359 fi
15360
15361 # then check for a private Tcl installation
15362 if test x"${ac_cv_c_tclconfig}" = x ; then
15363 for i in \
15364 ../tcl \
15365 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15366 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15367 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15368 ../../tcl \
15369 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15370 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15371 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15372 ../../../tcl \
15373 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15374 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15375 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15376 if test -f "$i/$platDir/tclConfig.sh" ; then
15377 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15378 break
15379 fi
15380 done
15381 fi
15382
15383 # on Darwin, check in Framework installation locations
15384 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15385 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15386 `ls -d /Library/Frameworks 2>/dev/null` \
15387 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15388 `ls -d /System/Library/Frameworks 2>/dev/null` \
15389 ; do
15390 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15391 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15392 break
15393 fi
15394 done
15395 fi
15396
15397 # check in a few common install locations
15398 if test x"${ac_cv_c_tclconfig}" = x ; then
15399 for i in `ls -d ${libdir} 2>/dev/null` \
15400 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15401 `ls -d ${prefix}/lib 2>/dev/null` \
15402 `ls -d /usr/local/lib 2>/dev/null` \
15403 `ls -d /usr/contrib/lib 2>/dev/null` \
15404 `ls -d /usr/lib 2>/dev/null` \
15405 ; do
15406 if test -f "$i/tclConfig.sh" ; then
15407 ac_cv_c_tclconfig=`(cd $i; pwd)`
15408 break
15409 fi
15410 done
15411 fi
3fc11d3e 15412
5062cc19
KS
15413 # check in a few other private locations
15414 if test x"${ac_cv_c_tclconfig}" = x ; then
15415 for i in \
15416 ${srcdir}/../tcl \
15417 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15418 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15419 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15420 if test -f "$i/$platDir/tclConfig.sh" ; then
15421 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15422 break
15423 fi
15424 done
15425 fi
bec39cab 15426
3fc11d3e
JM
15427fi
15428
5062cc19
KS
15429
15430 if test x"${ac_cv_c_tclconfig}" = x ; then
15431 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15433$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15434 else
15435 no_tcl=
15436 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15438$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15439 fi
15440 fi
3fc11d3e 15441
bec39cab 15442
85541719
DE
15443 # If $no_tk is nonempty, then we can't do Tk, and there is no
15444 # point to doing Tcl.
bec39cab 15445
5062cc19
KS
15446 #
15447 # Ok, lets find the tk configuration
15448 # First, look for one uninstalled.
15449 # the alternative search directory is invoked by --with-tk
15450 #
3fc11d3e 15451
5062cc19
KS
15452 if test x"${no_tk}" = x ; then
15453 # we reset no_tk in case something fails here
15454 no_tk=true
bec39cab 15455
81ecdfbb
RW
15456# Check whether --with-tk was given.
15457if test "${with_tk+set}" = set; then :
15458 withval=$with_tk; with_tkconfig=${withval}
15459fi
15460
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15462$as_echo_n "checking for Tk configuration... " >&6; }
15463 if test "${ac_cv_c_tkconfig+set}" = set; then :
15464 $as_echo_n "(cached) " >&6
bec39cab 15465else
3fc11d3e
JM
15466
15467
5062cc19
KS
15468 # First check to see if --with-tkconfig was specified.
15469 if test x"${with_tkconfig}" != x ; then
15470 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15471 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15472 else
81ecdfbb 15473 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15474 fi
15475 fi
3fc11d3e 15476
5062cc19
KS
15477 # then check for a private Tk library
15478 case "${host}" in
15479 *-*-cygwin*) platDir="win" ;;
15480 *) platDir="unix" ;;
15481 esac
15482 if test x"${ac_cv_c_tkconfig}" = x ; then
15483 for i in \
15484 ../tk \
15485 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15486 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15487 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15488 ../../tk \
15489 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15490 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15491 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15492 ../../../tk \
15493 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15494 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15495 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15496 if test -f "$i/$platDir/tkConfig.sh" ; then
15497 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15498 break
15499 fi
15500 done
15501 fi
15502
15503 # on Darwin, check in Framework installation locations
15504 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15505 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15506 `ls -d /Library/Frameworks 2>/dev/null` \
15507 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15508 `ls -d /System/Library/Frameworks 2>/dev/null` \
15509 ; do
15510 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15511 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15512 break
15513 fi
15514 done
15515 fi
15516
15517 # check in a few common install locations
15518 if test x"${ac_cv_c_tkconfig}" = x ; then
15519 for i in `ls -d ${libdir} 2>/dev/null` \
15520 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15521 `ls -d ${prefix}/lib 2>/dev/null` \
15522 `ls -d /usr/local/lib 2>/dev/null` \
15523 `ls -d /usr/contrib/lib 2>/dev/null` \
15524 `ls -d /usr/lib 2>/dev/null` \
15525 ; do
15526 if test -f "$i/tkConfig.sh" ; then
15527 ac_cv_c_tkconfig=`(cd $i; pwd)`
15528 break
15529 fi
15530 done
15531 fi
15532 # check in a few other private locations
15533 if test x"${ac_cv_c_tkconfig}" = x ; then
15534 for i in \
15535 ${srcdir}/../tk \
15536 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15537 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15538 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15539 if test -f "$i/$platDir/tkConfig.sh" ; then
15540 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15541 break
15542 fi
15543 done
15544 fi
3fc11d3e 15545
3fc11d3e
JM
15546fi
15547
15548
5062cc19
KS
15549 if test x"${ac_cv_c_tkconfig}" = x ; then
15550 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15552$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15553 else
15554 no_tk=
15555 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15557$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15558 fi
3fc11d3e 15559 fi
dd2504ab 15560
dd2504ab 15561
85541719
DE
15562 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15563
81ecdfbb
RW
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15565$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15566
15567 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15569$as_echo "loading" >&6; }
85541719
DE
15570 . ${TCL_BIN_DIR}/tclConfig.sh
15571 else
81ecdfbb
RW
15572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15573$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15574 fi
15575
15576 # eval is required to do the TCL_DBGX substitution
15577 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15578 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15579
15580 # If the TCL_BIN_DIR is the build directory (not the install directory),
15581 # then set the common variable name to the value of the build variables.
15582 # For example, the variable TCL_LIB_SPEC will be set to the value
15583 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15584 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15585 # installed and uninstalled version of Tcl.
15586 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15587 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15588 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15589 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15590 elif test "`uname -s`" = "Darwin"; then
15591 # If Tcl was built as a framework, attempt to use the libraries
15592 # from the framework at the given location so that linking works
15593 # against Tcl.framework installed in an arbitary location.
15594 case ${TCL_DEFS} in
15595 *TCL_FRAMEWORK*)
15596 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15597 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15598 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15599 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15600 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15601 break
15602 fi
15603 done
15604 fi
15605 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15606 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15607 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15608 fi
15609 ;;
15610 esac
15611 fi
15612
15613 # eval is required to do the TCL_DBGX substitution
15614 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15615 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15616 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15617 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633 # Check for in-tree tcl
15634 here=`pwd`
15635 cd ${srcdir}/..
15636 topdir=`pwd`
15637 cd ${here}
15638
15639 intree="no"
15640 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15641 intree="yes"
15642 fi
15643
15644 # Find Tcl private headers
15645 if test x"${intree}" = xno; then
15646
81ecdfbb
RW
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15648$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15649 private_dir=""
15650 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15651 if test -f ${dir}/tclInt.h ; then
15652 private_dir=${dir}
15653 fi
15654
15655 if test x"${private_dir}" = x; then
81ecdfbb 15656 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15657 else
15658 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15660$as_echo "${private_dir}" >&6; }
85541719
DE
15661 fi
15662
15663 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15664 TCL_LIBRARY="${TCL_LIB_SPEC}"
15665 TCL_DEPS=""
15666 else
15667 # If building tcl in the same src tree, private headers
15668 # are not needed, but we need to be sure to use the right
15669 # headers library
15670 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15671 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15672 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15673 fi
15674
15675
15676
15677
15678
81ecdfbb
RW
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15680$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15681
5062cc19 15682 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15684$as_echo "loading" >&6; }
5062cc19 15685 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15686 else
81ecdfbb
RW
15687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15688$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15689 fi
bec39cab 15690
5062cc19
KS
15691 # eval is required to do the TK_DBGX substitution
15692 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15693 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15694
15695 # If the TK_BIN_DIR is the build directory (not the install directory),
15696 # then set the common variable name to the value of the build variables.
15697 # For example, the variable TK_LIB_SPEC will be set to the value
15698 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15699 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15700 # installed and uninstalled version of Tcl.
85541719 15701 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15702 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15703 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15704 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15705 elif test "`uname -s`" = "Darwin"; then
15706 # If Tk was built as a framework, attempt to use the libraries
15707 # from the framework at the given location so that linking works
15708 # against Tk.framework installed in an arbitary location.
15709 case ${TK_DEFS} in
15710 *TK_FRAMEWORK*)
85541719 15711 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15712 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15713 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15714 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15715 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15716 break
15717 fi
15718 done
15719 fi
85541719 15720 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15721 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15722 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15723 fi
15724 ;;
15725 esac
3fc11d3e
JM
15726 fi
15727
5062cc19
KS
15728 # eval is required to do the TK_DBGX substitution
15729 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15730 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15731 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15732 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15733
3fc11d3e
JM
15734
15735
bec39cab
AC
15736
15737
15738
15739
15740
15741
15742
3fc11d3e 15743
3fc11d3e 15744
bec39cab 15745
bec39cab 15746
85541719
DE
15747 # Check for in-tree Tk
15748 intree="no"
15749 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15750 intree="yes"
15751 fi
3fc11d3e 15752
85541719
DE
15753 # Find Tk private headers
15754 if test x"${intree}" = xno; then
3fc11d3e 15755
81ecdfbb
RW
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15757$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15758 private_dir=""
15759 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15760 if test -f ${dir}/tkInt.h; then
15761 private_dir=${dir}
3fc11d3e 15762 fi
bec39cab 15763
5062cc19 15764 if test x"${private_dir}" = x; then
81ecdfbb 15765 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15766 else
5062cc19 15767 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15769$as_echo "${private_dir}" >&6; }
3fc11d3e 15770 fi
3fc11d3e 15771
85541719
DE
15772 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15773 TK_LIBRARY=${TK_LIB_SPEC}
15774 TK_DEPS=""
15775 else
15776 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15777 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15778 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15779 fi
3fc11d3e
JM
15780
15781
3fc11d3e
JM
15782
15783
3fc11d3e 15784
85541719 15785 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15786
85541719
DE
15787 # Include some libraries that Tcl and Tk want.
15788 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15789 # Yes, the ordering seems wrong here. But it isn't.
15790 # TK_LIBS is the list of libraries that need to be linked
15791 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15792 # were in LIBS then any link tests after this point would
15793 # try to include things like `$(LIBGUI)', which wouldn't work.
15794 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15795
85541719
DE
15796 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15797 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15798 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15799 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15800 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15801 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15802 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15803
85541719
DE
15804 if test x$gdb_cv_os_cygwin = xyes; then
15805 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15806 WIN32LDAPP="-Wl,--subsystem,console"
15807 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15808 fi
ffc6a242 15809
81ecdfbb 15810 subdirs="$subdirs gdbtk"
3ace7edb 15811
85541719 15812 fi
3fc11d3e
JM
15813fi
15814
15815
15816
15817
15818
15819
15820
15821
81ecdfbb
RW
15822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15823$as_echo_n "checking for X... " >&6; }
bec39cab 15824
c906108c 15825
81ecdfbb
RW
15826# Check whether --with-x was given.
15827if test "${with_x+set}" = set; then :
15828 withval=$with_x;
15829fi
c906108c
SS
15830
15831# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15832if test "x$with_x" = xno; then
15833 # The user explicitly disabled X.
15834 have_x=disabled
15835else
81ecdfbb
RW
15836 case $x_includes,$x_libraries in #(
15837 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15838 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15839 $as_echo_n "(cached) " >&6
c906108c
SS
15840else
15841 # One or both of the vars are not set, and there is no cached value.
bec39cab 15842ac_x_includes=no ac_x_libraries=no
81ecdfbb 15843rm -f -r conftest.dir
bec39cab
AC
15844if mkdir conftest.dir; then
15845 cd conftest.dir
bec39cab 15846 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15847incroot:
15848 @echo incroot='${INCROOT}'
15849usrlibdir:
15850 @echo usrlibdir='${USRLIBDIR}'
15851libdir:
15852 @echo libdir='${LIBDIR}'
15853_ACEOF
15854 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15855 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15856 for ac_var in incroot usrlibdir libdir; do
15857 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15858 done
c906108c 15859 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15860 for ac_extension in a so sl dylib la dll; do
15861 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15862 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15863 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15864 fi
15865 done
15866 # Screen out bogus values from the imake configuration. They are
15867 # bogus both because they are the default anyway, and because
15868 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15869 case $ac_im_incroot in
81ecdfbb 15870 /usr/include) ac_x_includes= ;;
bec39cab 15871 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15872 esac
bec39cab 15873 case $ac_im_usrlibdir in
81ecdfbb 15874 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15875 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15876 esac
15877 fi
15878 cd ..
81ecdfbb 15879 rm -f -r conftest.dir
c906108c
SS
15880fi
15881
bec39cab
AC
15882# Standard set of common directories for X headers.
15883# Check X11 before X11Rn because it is often a symlink to the current release.
15884ac_x_header_dirs='
15885/usr/X11/include
81ecdfbb 15886/usr/X11R7/include
bec39cab
AC
15887/usr/X11R6/include
15888/usr/X11R5/include
15889/usr/X11R4/include
15890
15891/usr/include/X11
81ecdfbb 15892/usr/include/X11R7
bec39cab
AC
15893/usr/include/X11R6
15894/usr/include/X11R5
15895/usr/include/X11R4
15896
15897/usr/local/X11/include
81ecdfbb 15898/usr/local/X11R7/include
bec39cab
AC
15899/usr/local/X11R6/include
15900/usr/local/X11R5/include
15901/usr/local/X11R4/include
15902
15903/usr/local/include/X11
81ecdfbb 15904/usr/local/include/X11R7
bec39cab
AC
15905/usr/local/include/X11R6
15906/usr/local/include/X11R5
15907/usr/local/include/X11R4
15908
15909/usr/X386/include
15910/usr/x386/include
15911/usr/XFree86/include/X11
15912
15913/usr/include
15914/usr/local/include
15915/usr/unsupported/include
15916/usr/athena/include
15917/usr/local/x11r5/include
15918/usr/lpp/Xamples/include
15919
15920/usr/openwin/include
15921/usr/openwin/share/include'
15922
15923if test "$ac_x_includes" = no; then
81ecdfbb 15924 # Guess where to find include files, by looking for Xlib.h.
c906108c 15925 # First, try using that file with no special directory specified.
81ecdfbb 15926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15927/* end confdefs.h. */
81ecdfbb 15928#include <X11/Xlib.h>
bec39cab 15929_ACEOF
81ecdfbb 15930if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15931 # We can compile using X headers with no special include directory.
15932ac_x_includes=
15933else
bec39cab 15934 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15935 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15936 ac_x_includes=$ac_dir
15937 break
15938 fi
15939done
c906108c 15940fi
bec39cab
AC
15941rm -f conftest.err conftest.$ac_ext
15942fi # $ac_x_includes = no
c906108c 15943
bec39cab 15944if test "$ac_x_libraries" = no; then
c906108c 15945 # Check for the libraries.
c906108c
SS
15946 # See if we find them without any special options.
15947 # Don't add to $LIBS permanently.
bec39cab 15948 ac_save_LIBS=$LIBS
81ecdfbb
RW
15949 LIBS="-lX11 $LIBS"
15950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15951/* end confdefs.h. */
81ecdfbb 15952#include <X11/Xlib.h>
bec39cab
AC
15953int
15954main ()
15955{
81ecdfbb 15956XrmInitialize ()
bec39cab
AC
15957 ;
15958 return 0;
15959}
15960_ACEOF
81ecdfbb 15961if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15962 LIBS=$ac_save_LIBS
c906108c
SS
15963# We can link X programs with no special library path.
15964ac_x_libraries=
15965else
81ecdfbb
RW
15966 LIBS=$ac_save_LIBS
15967for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15968do
bec39cab 15969 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15970 for ac_extension in a so sl dylib la dll; do
15971 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15972 ac_x_libraries=$ac_dir
15973 break 2
15974 fi
15975 done
15976done
15977fi
81ecdfbb
RW
15978rm -f core conftest.err conftest.$ac_objext \
15979 conftest$ac_exeext conftest.$ac_ext
bec39cab 15980fi # $ac_x_libraries = no
c906108c 15981
81ecdfbb
RW
15982case $ac_x_includes,$ac_x_libraries in #(
15983 no,* | *,no | *\'*)
15984 # Didn't find X, or a directory has "'" in its name.
15985 ac_cv_have_x="have_x=no";; #(
15986 *)
15987 # Record where we found X for the cache.
15988 ac_cv_have_x="have_x=yes\
15989 ac_x_includes='$ac_x_includes'\
15990 ac_x_libraries='$ac_x_libraries'"
15991esac
c906108c 15992fi
81ecdfbb
RW
15993;; #(
15994 *) have_x=yes;;
15995 esac
c906108c
SS
15996 eval "$ac_cv_have_x"
15997fi # $with_x != no
15998
15999if test "$have_x" != yes; then
81ecdfbb
RW
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16001$as_echo "$have_x" >&6; }
c906108c
SS
16002 no_x=yes
16003else
16004 # If each of the values was on the command line, it overrides each guess.
16005 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16006 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16007 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16008 ac_cv_have_x="have_x=yes\
16009 ac_x_includes='$x_includes'\
16010 ac_x_libraries='$x_libraries'"
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16012$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16013fi
16014
16015
bec39cab 16016# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16017# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16018# This code just checks for a few cases where we'd like to ignore those
16019# definitions, even when they're present in the '.mt' file. These cases
16020# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16021# not part of the source tree.
7a292a7a 16022#
81ecdfbb
RW
16023# Check whether --enable-sim was given.
16024if test "${enable_sim+set}" = set; then :
16025 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16026 echo "enableval = ${enableval}";
16027 case "${enableval}" in
16028 yes) ignore_sim=false ;;
16029 no) ignore_sim=true ;;
16030 *) ignore_sim=false ;;
16031 esac
16032else
16033 ignore_sim=false
81ecdfbb
RW
16034fi
16035
7a292a7a
SS
16036
16037if test ! -d "${srcdir}/../sim"; then
16038 ignore_sim=true
16039fi
16040
9b624dbe
UW
16041SIM=
16042SIM_OBS=
16043if test "${ignore_sim}" = "false"; then
16044 if test x"${gdb_sim}" != x ; then
16045 SIM="${gdb_sim}"
16046 SIM_OBS="remote-sim.o"
60ca704f 16047
81ecdfbb 16048$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16049
9b624dbe 16050 fi
7a292a7a
SS
16051fi
16052
16053
16054
c906108c
SS
16055
16056
16057
16058
16059
16060
dfcd3bfb 16061
e56ac5c3
AC
16062
16063
b3a90332
AC
16064
16065
c35f4ffc 16066# List of host floatformats.
bec39cab
AC
16067
16068cat >>confdefs.h <<_ACEOF
c35f4ffc 16069#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16070_ACEOF
c35f4ffc 16071
bec39cab
AC
16072
16073cat >>confdefs.h <<_ACEOF
c35f4ffc 16074#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16075_ACEOF
16076
c35f4ffc 16077
bec39cab 16078cat >>confdefs.h <<_ACEOF
c35f4ffc 16079#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16080_ACEOF
c35f4ffc
AC
16081
16082
c906108c
SS
16083# target_subdir is used by the testsuite to find the target libraries.
16084target_subdir=
16085if test "${host}" != "${target}"; then
16086 target_subdir="${target_alias}/"
16087fi
16088
16089
16090frags=
771b4502 16091if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16092 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16093 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16094 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16095 fi
16096 frags="$frags $host_makefile_frag"
16097else
16098 host_makefile_frag=/dev/null
c906108c 16099fi
c906108c 16100
c906108c
SS
16101
16102
16103
771b4502 16104if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16105# We pick this up from the host configuration file (.mh) because we
16106# do not have a native configuration Makefile fragment.
c906108c
SS
16107nativefile=`sed -n '
16108s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16109' ${host_makefile_frag}`
c906108c
SS
16110fi
16111
16112
b00a8037 16113if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16114
16115cat >>confdefs.h <<_ACEOF
b00a8037 16116#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16117_ACEOF
b00a8037
DJ
16118
16119fi
16120
8dcde887 16121# Enable multi-ice-gdb-server.
81ecdfbb
RW
16122# Check whether --enable-multi-ice was given.
16123if test "${enable_multi_ice+set}" = set; then :
16124 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16125 yes | no)
16126 ;;
81ecdfbb 16127 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16128 esac
81ecdfbb 16129fi
b4e70030 16130
81ecdfbb
RW
16131if test "x$enable_multi_ice" = xyes; then
16132 subdirs="$subdirs multi-ice"
3ace7edb 16133
a85f51e7
DJ
16134fi
16135
496c0e1b
JB
16136# Check whether --enable-gdbserver was given.
16137if test "${enable_gdbserver+set}" = set; then :
16138 enableval=$enable_gdbserver; case "${enableval}" in
16139 yes| no|auto) ;;
16140 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16141esac
16142else
16143 enable_gdbserver=auto
16144fi
16145
16146
16147# We only build gdbserver automatically in a native configuration, and
16148# only if the user did not explicitly disable its build.
16149if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16151$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16152 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16154$as_echo "yes" >&6; }
16155 subdirs="$subdirs gdbserver"
3ace7edb 16156
496c0e1b 16157 gdbserver_build_enabled=yes
8dcde887 16158 else
81ecdfbb
RW
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16160$as_echo "no" >&6; }
8dcde887
MK
16161 fi
16162fi
16163
496c0e1b
JB
16164# If the user explicitly request the gdbserver to be built, verify that
16165# we were in fact able to enable it.
16166if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16167 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16168fi
16169
db985757 16170# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16171# to an empty version.
c906108c
SS
16172
16173files=
16174links=
5a2402b8 16175
c906108c
SS
16176rm -f nm.h
16177if test "${nativefile}" != ""; then
0f475e27
AC
16178 case "${nativefile}" in
16179 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16180 * ) GDB_NM_FILE="${nativefile}"
16181 esac
5a2402b8
AC
16182 files="${files} ${GDB_NM_FILE}"
16183 links="${links} nm.h"
60ca704f
SE
16184
16185cat >>confdefs.h <<_ACEOF
b78960be 16186#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16187_ACEOF
5a2402b8 16188
c906108c 16189fi
5a2402b8
AC
16190
16191
bec39cab
AC
16192ac_sources="$files"
16193ac_dests="$links"
16194while test -n "$ac_sources"; do
16195 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16196 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16197 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16198done
81ecdfbb 16199ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16200
16201
c906108c
SS
16202
16203
c906108c 16204
81ecdfbb 16205$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16206
bec39cab 16207
5ae98d25 16208ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16209
16210ac_config_commands="$ac_config_commands default"
89a34d1b 16211
bec39cab
AC
16212cat >confcache <<\_ACEOF
16213# This file is a shell script that caches the results of configure
16214# tests run on this system so they can be shared between configure
16215# scripts and configure runs, see configure's option --config-cache.
16216# It is not useful on other systems. If it contains results you don't
16217# want to keep, you may remove or edit it.
16218#
16219# config.status only pays attention to the cache file if you give it
16220# the --recheck option to rerun configure.
16221#
16222# `ac_cv_env_foo' variables (set or unset) will be overridden when
16223# loading this file, other *unset* `ac_cv_foo' will be assigned the
16224# following values.
16225
16226_ACEOF
16227
16228# The following way of writing the cache mishandles newlines in values,
16229# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16230# So, we kill variables containing newlines.
bec39cab
AC
16231# Ultrix sh set writes to stderr and can't be redirected directly,
16232# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16233(
16234 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16235 eval ac_val=\$$ac_var
16236 case $ac_val in #(
16237 *${as_nl}*)
16238 case $ac_var in #(
16239 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16240$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16241 esac
16242 case $ac_var in #(
16243 _ | IFS | as_nl) ;; #(
16244 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16245 *) { eval $ac_var=; unset $ac_var;} ;;
16246 esac ;;
16247 esac
16248 done
16249
bec39cab 16250 (set) 2>&1 |
81ecdfbb
RW
16251 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16252 *${as_nl}ac_space=\ *)
16253 # `set' does not quote correctly, so add quotes: double-quote
16254 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16255 sed -n \
16256 "s/'/'\\\\''/g;
16257 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16258 ;; #(
bec39cab
AC
16259 *)
16260 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16261 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16262 ;;
81ecdfbb
RW
16263 esac |
16264 sort
16265) |
bec39cab 16266 sed '
81ecdfbb 16267 /^ac_cv_env_/b end
bec39cab 16268 t clear
81ecdfbb 16269 :clear
bec39cab
AC
16270 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16271 t end
81ecdfbb
RW
16272 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16273 :end' >>confcache
16274if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16275 if test -w "$cache_file"; then
16276 test "x$cache_file" != "x/dev/null" &&
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16278$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16279 cat confcache >$cache_file
16280 else
81ecdfbb
RW
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16282$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16283 fi
16284fi
16285rm -f confcache
16286
16287test "x$prefix" = xNONE && prefix=$ac_default_prefix
16288# Let make expand exec_prefix.
16289test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16290
bec39cab
AC
16291DEFS=-DHAVE_CONFIG_H
16292
16293ac_libobjs=
16294ac_ltlibobjs=
16295for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16296 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16297 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16298 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16299 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16300 # will be set to the directory where LIBOBJS objects are built.
16301 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16302 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16303done
16304LIBOBJS=$ac_libobjs
16305
16306LTLIBOBJS=$ac_ltlibobjs
16307
16308
85981d60 16309if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16310 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16311Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16312fi
a417dc56 16313if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16314 as_fn_error "conditional \"GMAKE\" was never defined.
16315Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16316fi
783e057b 16317if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16318 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16319Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16320fi
16321
16322 gl_libobjs=
16323 gl_ltlibobjs=
16324 if test -n "$gl_LIBOBJS"; then
16325 # Remove the extension.
16326 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16327 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16328 gl_libobjs="$gl_libobjs $i.$ac_objext"
16329 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16330 done
16331 fi
16332 gl_LIBOBJS=$gl_libobjs
16333
16334 gl_LTLIBOBJS=$gl_ltlibobjs
16335
16336
16337
16338 gltests_libobjs=
16339 gltests_ltlibobjs=
16340 if test -n "$gltests_LIBOBJS"; then
16341 # Remove the extension.
16342 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16343 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16344 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16345 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16346 done
16347 fi
16348 gltests_LIBOBJS=$gltests_libobjs
16349
16350 gltests_LTLIBOBJS=$gltests_ltlibobjs
16351
16352
e28b3332 16353if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16354 as_fn_error "conditional \"AMDEP\" was never defined.
16355Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16356fi
16357if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16358 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16359Usually this means the macro was only invoked conditionally." "$LINENO" 5
16360fi
16361 if test -n "$EXEEXT"; then
16362 am__EXEEXT_TRUE=
16363 am__EXEEXT_FALSE='#'
16364else
16365 am__EXEEXT_TRUE='#'
16366 am__EXEEXT_FALSE=
e28b3332 16367fi
bec39cab 16368
81ecdfbb
RW
16369
16370
bec39cab 16371: ${CONFIG_STATUS=./config.status}
81ecdfbb 16372ac_write_fail=0
bec39cab
AC
16373ac_clean_files_save=$ac_clean_files
16374ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16375{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16376$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16377as_write_fail=0
16378cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16379#! $SHELL
16380# Generated by $as_me.
16381# Run this file to recreate the current configuration.
16382# Compiler output produced by configure, useful for debugging
16383# configure, is in config.log if it exists.
16384
16385debug=false
16386ac_cs_recheck=false
16387ac_cs_silent=false
bec39cab 16388
81ecdfbb
RW
16389SHELL=\${CONFIG_SHELL-$SHELL}
16390export SHELL
16391_ASEOF
16392cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16393## -------------------- ##
16394## M4sh Initialization. ##
16395## -------------------- ##
16396
16397# Be more Bourne compatible
16398DUALCASE=1; export DUALCASE # for MKS sh
16399if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16400 emulate sh
16401 NULLCMD=:
81ecdfbb 16402 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16403 # is contrary to our usage. Disable this feature.
16404 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16405 setopt NO_GLOB_SUBST
16406else
16407 case `(set -o) 2>/dev/null` in #(
16408 *posix*) :
16409 set -o posix ;; #(
16410 *) :
16411 ;;
16412esac
bec39cab 16413fi
bec39cab 16414
81ecdfbb
RW
16415
16416as_nl='
16417'
16418export as_nl
16419# Printing a long string crashes Solaris 7 /usr/bin/printf.
16420as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16421as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16422as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16423# Prefer a ksh shell builtin over an external printf program on Solaris,
16424# but without wasting forks for bash or zsh.
16425if test -z "$BASH_VERSION$ZSH_VERSION" \
16426 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16427 as_echo='print -r --'
16428 as_echo_n='print -rn --'
16429elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16430 as_echo='printf %s\n'
16431 as_echo_n='printf %s'
16432else
16433 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16434 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16435 as_echo_n='/usr/ucb/echo -n'
16436 else
16437 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16438 as_echo_n_body='eval
16439 arg=$1;
16440 case $arg in #(
16441 *"$as_nl"*)
16442 expr "X$arg" : "X\\(.*\\)$as_nl";
16443 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16444 esac;
16445 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16446 '
16447 export as_echo_n_body
16448 as_echo_n='sh -c $as_echo_n_body as_echo'
16449 fi
16450 export as_echo_body
16451 as_echo='sh -c $as_echo_body as_echo'
16452fi
16453
16454# The user is always right.
16455if test "${PATH_SEPARATOR+set}" != set; then
16456 PATH_SEPARATOR=:
16457 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16458 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16459 PATH_SEPARATOR=';'
16460 }
bec39cab
AC
16461fi
16462
16463
81ecdfbb
RW
16464# IFS
16465# We need space, tab and new line, in precisely that order. Quoting is
16466# there to prevent editors from complaining about space-tab.
16467# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16468# splitting by setting IFS to empty value.)
16469IFS=" "" $as_nl"
16470
16471# Find who we are. Look in the path if we contain no directory separator.
16472case $0 in #((
16473 *[\\/]* ) as_myself=$0 ;;
16474 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16475for as_dir in $PATH
16476do
16477 IFS=$as_save_IFS
16478 test -z "$as_dir" && as_dir=.
16479 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16480 done
16481IFS=$as_save_IFS
16482
16483 ;;
16484esac
16485# We did not find ourselves, most probably we were run as `sh COMMAND'
16486# in which case we are not to be found in the path.
16487if test "x$as_myself" = x; then
16488 as_myself=$0
16489fi
16490if test ! -f "$as_myself"; then
16491 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16492 exit 1
16493fi
16494
16495# Unset variables that we do not need and which cause bugs (e.g. in
16496# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16497# suppresses any "Segmentation fault" message there. '((' could
16498# trigger a bug in pdksh 5.2.14.
16499for as_var in BASH_ENV ENV MAIL MAILPATH
16500do eval test x\${$as_var+set} = xset \
16501 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16502done
bec39cab
AC
16503PS1='$ '
16504PS2='> '
16505PS4='+ '
16506
16507# NLS nuisances.
81ecdfbb
RW
16508LC_ALL=C
16509export LC_ALL
16510LANGUAGE=C
16511export LANGUAGE
16512
16513# CDPATH.
16514(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16515
16516
16517# as_fn_error ERROR [LINENO LOG_FD]
16518# ---------------------------------
16519# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16520# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16521# script with status $?, using 1 if that was 0.
16522as_fn_error ()
16523{
16524 as_status=$?; test $as_status -eq 0 && as_status=1
16525 if test "$3"; then
16526 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16527 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16528 fi
16529 $as_echo "$as_me: error: $1" >&2
16530 as_fn_exit $as_status
16531} # as_fn_error
16532
16533
16534# as_fn_set_status STATUS
16535# -----------------------
16536# Set $? to STATUS, without forking.
16537as_fn_set_status ()
16538{
16539 return $1
16540} # as_fn_set_status
16541
16542# as_fn_exit STATUS
16543# -----------------
16544# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16545as_fn_exit ()
16546{
16547 set +e
16548 as_fn_set_status $1
16549 exit $1
16550} # as_fn_exit
16551
16552# as_fn_unset VAR
16553# ---------------
16554# Portably unset VAR.
16555as_fn_unset ()
16556{
16557 { eval $1=; unset $1;}
16558}
16559as_unset=as_fn_unset
16560# as_fn_append VAR VALUE
16561# ----------------------
16562# Append the text in VALUE to the end of the definition contained in VAR. Take
16563# advantage of any shell optimizations that allow amortized linear growth over
16564# repeated appends, instead of the typical quadratic growth present in naive
16565# implementations.
16566if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16567 eval 'as_fn_append ()
16568 {
16569 eval $1+=\$2
16570 }'
16571else
16572 as_fn_append ()
16573 {
16574 eval $1=\$$1\$2
16575 }
16576fi # as_fn_append
16577
16578# as_fn_arith ARG...
16579# ------------------
16580# Perform arithmetic evaluation on the ARGs, and store the result in the
16581# global $as_val. Take advantage of shells that can avoid forks. The arguments
16582# must be portable across $(()) and expr.
16583if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16584 eval 'as_fn_arith ()
16585 {
16586 as_val=$(( $* ))
16587 }'
16588else
16589 as_fn_arith ()
16590 {
16591 as_val=`expr "$@" || test $? -eq 1`
16592 }
16593fi # as_fn_arith
bec39cab 16594
81ecdfbb
RW
16595
16596if expr a : '\(a\)' >/dev/null 2>&1 &&
16597 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16598 as_expr=expr
16599else
16600 as_expr=false
16601fi
16602
81ecdfbb 16603if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16604 as_basename=basename
16605else
16606 as_basename=false
16607fi
16608
81ecdfbb
RW
16609if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16610 as_dirname=dirname
16611else
16612 as_dirname=false
16613fi
bec39cab 16614
81ecdfbb 16615as_me=`$as_basename -- "$0" ||
bec39cab
AC
16616$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16617 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16618 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16619$as_echo X/"$0" |
16620 sed '/^.*\/\([^/][^/]*\)\/*$/{
16621 s//\1/
16622 q
16623 }
16624 /^X\/\(\/\/\)$/{
16625 s//\1/
16626 q
16627 }
16628 /^X\/\(\/\).*/{
16629 s//\1/
16630 q
16631 }
16632 s/.*/./; q'`
b4e70030 16633
b4e70030
JB
16634# Avoid depending upon Character Ranges.
16635as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16636as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16637as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16638as_cr_digits='0123456789'
16639as_cr_alnum=$as_cr_Letters$as_cr_digits
16640
81ecdfbb
RW
16641ECHO_C= ECHO_N= ECHO_T=
16642case `echo -n x` in #(((((
16643-n*)
16644 case `echo 'xy\c'` in
16645 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16646 xy) ECHO_C='\c';;
16647 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16648 ECHO_T=' ';;
16649 esac;;
16650*)
16651 ECHO_N='-n';;
bec39cab
AC
16652esac
16653
81ecdfbb
RW
16654rm -f conf$$ conf$$.exe conf$$.file
16655if test -d conf$$.dir; then
16656 rm -f conf$$.dir/conf$$.file
bec39cab 16657else
81ecdfbb
RW
16658 rm -f conf$$.dir
16659 mkdir conf$$.dir 2>/dev/null
bec39cab 16660fi
81ecdfbb
RW
16661if (echo >conf$$.file) 2>/dev/null; then
16662 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16663 as_ln_s='ln -s'
81ecdfbb
RW
16664 # ... but there are two gotchas:
16665 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16666 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16667 # In both cases, we have to default to `cp -p'.
16668 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16669 as_ln_s='cp -p'
16670 elif ln conf$$.file conf$$ 2>/dev/null; then
16671 as_ln_s=ln
16672 else
16673 as_ln_s='cp -p'
b4e70030 16674 fi
bec39cab
AC
16675else
16676 as_ln_s='cp -p'
16677fi
81ecdfbb
RW
16678rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16679rmdir conf$$.dir 2>/dev/null
16680
16681
16682# as_fn_mkdir_p
16683# -------------
16684# Create "$as_dir" as a directory, including parents if necessary.
16685as_fn_mkdir_p ()
16686{
16687
16688 case $as_dir in #(
16689 -*) as_dir=./$as_dir;;
16690 esac
16691 test -d "$as_dir" || eval $as_mkdir_p || {
16692 as_dirs=
16693 while :; do
16694 case $as_dir in #(
16695 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16696 *) as_qdir=$as_dir;;
16697 esac
16698 as_dirs="'$as_qdir' $as_dirs"
16699 as_dir=`$as_dirname -- "$as_dir" ||
16700$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16701 X"$as_dir" : 'X\(//\)[^/]' \| \
16702 X"$as_dir" : 'X\(//\)$' \| \
16703 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16704$as_echo X"$as_dir" |
16705 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16706 s//\1/
16707 q
16708 }
16709 /^X\(\/\/\)[^/].*/{
16710 s//\1/
16711 q
16712 }
16713 /^X\(\/\/\)$/{
16714 s//\1/
16715 q
16716 }
16717 /^X\(\/\).*/{
16718 s//\1/
16719 q
16720 }
16721 s/.*/./; q'`
16722 test -d "$as_dir" && break
16723 done
16724 test -z "$as_dirs" || eval "mkdir $as_dirs"
16725 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16726
bec39cab 16727
81ecdfbb 16728} # as_fn_mkdir_p
bec39cab 16729if mkdir -p . 2>/dev/null; then
81ecdfbb 16730 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16731else
16732 test -d ./-p && rmdir ./-p
16733 as_mkdir_p=false
16734fi
16735
81ecdfbb
RW
16736if test -x / >/dev/null 2>&1; then
16737 as_test_x='test -x'
16738else
16739 if ls -dL / >/dev/null 2>&1; then
16740 as_ls_L_option=L
16741 else
16742 as_ls_L_option=
16743 fi
16744 as_test_x='
16745 eval sh -c '\''
16746 if test -d "$1"; then
16747 test -d "$1/.";
16748 else
16749 case $1 in #(
16750 -*)set "./$1";;
16751 esac;
16752 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16753 ???[sx]*):;;*)false;;esac;fi
16754 '\'' sh
16755 '
16756fi
16757as_executable_p=$as_test_x
bec39cab
AC
16758
16759# Sed expression to map a string onto a valid CPP name.
16760as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16761
16762# Sed expression to map a string onto a valid variable name.
16763as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16764
16765
bec39cab 16766exec 6>&1
81ecdfbb
RW
16767## ----------------------------------- ##
16768## Main body of $CONFIG_STATUS script. ##
16769## ----------------------------------- ##
16770_ASEOF
16771test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16772
16773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16774# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16775# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16776# values after options handling.
16777ac_log="
bec39cab 16778This file was extended by $as_me, which was
81ecdfbb 16779generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16780
16781 CONFIG_FILES = $CONFIG_FILES
16782 CONFIG_HEADERS = $CONFIG_HEADERS
16783 CONFIG_LINKS = $CONFIG_LINKS
16784 CONFIG_COMMANDS = $CONFIG_COMMANDS
16785 $ $0 $@
16786
81ecdfbb
RW
16787on `(hostname || uname -n) 2>/dev/null | sed 1q`
16788"
16789
bec39cab
AC
16790_ACEOF
16791
81ecdfbb
RW
16792case $ac_config_files in *"
16793"*) set x $ac_config_files; shift; ac_config_files=$*;;
16794esac
234b45d4 16795
81ecdfbb
RW
16796case $ac_config_headers in *"
16797"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16798esac
b4e70030 16799
b4e70030 16800
81ecdfbb
RW
16801cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16802# Files that config.status was made for.
16803config_files="$ac_config_files"
16804config_headers="$ac_config_headers"
16805config_links="$ac_config_links"
16806config_commands="$ac_config_commands"
234b45d4 16807
81ecdfbb 16808_ACEOF
b4e70030 16809
81ecdfbb 16810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16811ac_cs_usage="\
81ecdfbb
RW
16812\`$as_me' instantiates files and other configuration actions
16813from templates according to the current configuration. Unless the files
16814and actions are specified as TAGs, all are instantiated by default.
234b45d4 16815
81ecdfbb 16816Usage: $0 [OPTION]... [TAG]...
234b45d4 16817
bec39cab 16818 -h, --help print this help, then exit
81ecdfbb
RW
16819 -V, --version print version number and configuration settings, then exit
16820 -q, --quiet, --silent
16821 do not print progress messages
bec39cab
AC
16822 -d, --debug don't remove temporary files
16823 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16824 --file=FILE[:TEMPLATE]
16825 instantiate the configuration file FILE
16826 --header=FILE[:TEMPLATE]
16827 instantiate the configuration header FILE
234b45d4 16828
bec39cab
AC
16829Configuration files:
16830$config_files
234b45d4 16831
bec39cab
AC
16832Configuration headers:
16833$config_headers
234b45d4 16834
bec39cab
AC
16835Configuration links:
16836$config_links
234b45d4 16837
bec39cab
AC
16838Configuration commands:
16839$config_commands
16840
81ecdfbb 16841Report bugs to the package provider."
b4e70030 16842
81ecdfbb
RW
16843_ACEOF
16844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16845ac_cs_version="\\
16846config.status
81ecdfbb
RW
16847configured by $0, generated by GNU Autoconf 2.64,
16848 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16849
81ecdfbb 16850Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16851This config.status script is free software; the Free Software Foundation
16852gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16853
16854ac_pwd='$ac_pwd'
16855srcdir='$srcdir'
16856INSTALL='$INSTALL'
16857MKDIR_P='$MKDIR_P'
16858AWK='$AWK'
16859test -n "\$AWK" || AWK=awk
bec39cab
AC
16860_ACEOF
16861
81ecdfbb
RW
16862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16863# The default lists apply if the user does not specify any file.
bec39cab
AC
16864ac_need_defaults=:
16865while test $# != 0
16866do
16867 case $1 in
16868 --*=*)
81ecdfbb
RW
16869 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16870 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16871 ac_shift=:
c906108c 16872 ;;
81ecdfbb 16873 *)
bec39cab
AC
16874 ac_option=$1
16875 ac_optarg=$2
16876 ac_shift=shift
c906108c 16877 ;;
bec39cab 16878 esac
c906108c 16879
bec39cab
AC
16880 case $ac_option in
16881 # Handling of the options.
bec39cab
AC
16882 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16883 ac_cs_recheck=: ;;
81ecdfbb
RW
16884 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16885 $as_echo "$ac_cs_version"; exit ;;
16886 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16887 debug=: ;;
16888 --file | --fil | --fi | --f )
16889 $ac_shift
81ecdfbb
RW
16890 case $ac_optarg in
16891 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16892 esac
16893 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16894 ac_need_defaults=false;;
16895 --header | --heade | --head | --hea )
16896 $ac_shift
81ecdfbb
RW
16897 case $ac_optarg in
16898 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16899 esac
16900 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16901 ac_need_defaults=false;;
81ecdfbb
RW
16902 --he | --h)
16903 # Conflict between --help and --header
16904 as_fn_error "ambiguous option: \`$1'
16905Try \`$0 --help' for more information.";;
16906 --help | --hel | -h )
16907 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16908 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16909 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16910 ac_cs_silent=: ;;
c906108c 16911
bec39cab 16912 # This is an error.
81ecdfbb
RW
16913 -*) as_fn_error "unrecognized option: \`$1'
16914Try \`$0 --help' for more information." ;;
c906108c 16915
81ecdfbb
RW
16916 *) as_fn_append ac_config_targets " $1"
16917 ac_need_defaults=false ;;
c906108c 16918
bec39cab
AC
16919 esac
16920 shift
16921done
c906108c 16922
bec39cab 16923ac_configure_extra_args=
c906108c 16924
bec39cab
AC
16925if $ac_cs_silent; then
16926 exec 6>/dev/null
16927 ac_configure_extra_args="$ac_configure_extra_args --silent"
16928fi
c906108c 16929
bec39cab 16930_ACEOF
81ecdfbb 16931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16932if \$ac_cs_recheck; then
81ecdfbb
RW
16933 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16934 shift
16935 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16936 CONFIG_SHELL='$SHELL'
16937 export CONFIG_SHELL
16938 exec "\$@"
bec39cab
AC
16939fi
16940
16941_ACEOF
81ecdfbb
RW
16942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16943exec 5>>config.log
16944{
16945 echo
16946 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16947## Running $as_me. ##
16948_ASBOX
16949 $as_echo "$ac_log"
16950} >&5
bec39cab 16951
81ecdfbb
RW
16952_ACEOF
16953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16954#
81ecdfbb 16955# INIT-COMMANDS
c906108c 16956#
a417dc56 16957ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16958AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16959
bec39cab
AC
16960_ACEOF
16961
81ecdfbb 16962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16963
81ecdfbb 16964# Handling of arguments.
bec39cab 16965for ac_config_target in $ac_config_targets
c906108c 16966do
81ecdfbb
RW
16967 case $ac_config_target in
16968 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16969 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16970 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 16971 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
16972 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16973 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16974 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16975 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16976 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16977 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16978 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16979
16980 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16981 esac
16982done
16983
81ecdfbb 16984
bec39cab
AC
16985# If the user did not use the arguments to specify the items to instantiate,
16986# then the envvar interface is used. Set only those that are not.
16987# We use the long form for the default assignment because of an extremely
16988# bizarre bug on SunOS 4.1.3.
16989if $ac_need_defaults; then
16990 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16991 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16992 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16993 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16994fi
16995
b4e70030 16996# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16997# simply because there is no reason against having it here, and in addition,
b4e70030 16998# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16999# Hook for its removal unless debugging.
17000# Note that there is a small window in which the directory will not be cleaned:
17001# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17002$debug ||
17003{
81ecdfbb
RW
17004 tmp=
17005 trap 'exit_status=$?
17006 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17007' 0
17008 trap 'as_fn_exit 1' 1 2 13 15
17009}
17010# Create a (secure) tmp directory for tmp files.
17011
17012{
17013 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17014 test -n "$tmp" && test -d "$tmp"
17015} ||
17016{
17017 tmp=./conf$$-$RANDOM
17018 (umask 077 && mkdir "$tmp")
17019} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17020
17021# Set up the scripts for CONFIG_FILES section.
17022# No need to generate them if there are no CONFIG_FILES.
17023# This happens for instance with `./config.status config.h'.
17024if test -n "$CONFIG_FILES"; then
17025
17026if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17027 ac_cs_awk_getline=:
17028 ac_cs_awk_pipe_init=
17029 ac_cs_awk_read_file='
17030 while ((getline aline < (F[key])) > 0)
17031 print(aline)
17032 close(F[key])'
17033 ac_cs_awk_pipe_fini=
17034else
17035 ac_cs_awk_getline=false
17036 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17037 ac_cs_awk_read_file='
17038 print "|#_!!_#|"
17039 print "cat " F[key] " &&"
17040 '$ac_cs_awk_pipe_init
17041 # The final `:' finishes the AND list.
17042 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17043fi
17044ac_cr=`echo X | tr X '\015'`
17045# On cygwin, bash can eat \r inside `` if the user requested igncr.
17046# But we know of no other shell where ac_cr would be empty at this
17047# point, so we can use a bashism as a fallback.
17048if test "x$ac_cr" = x; then
17049 eval ac_cr=\$\'\\r\'
17050fi
17051ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17052if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17053 ac_cs_awk_cr='\r'
17054else
17055 ac_cs_awk_cr=$ac_cr
17056fi
17057
17058echo 'BEGIN {' >"$tmp/subs1.awk" &&
17059_ACEOF
17060
17061# Create commands to substitute file output variables.
17062{
17063 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17064 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17065 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17066 echo "_ACAWK" &&
17067 echo "_ACEOF"
17068} >conf$$files.sh &&
17069. ./conf$$files.sh ||
17070 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17071rm -f conf$$files.sh
17072
17073{
17074 echo "cat >conf$$subs.awk <<_ACEOF" &&
17075 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17076 echo "_ACEOF"
17077} >conf$$subs.sh ||
17078 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17079ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17080ac_delim='%!_!# '
17081for ac_last_try in false false false false false :; do
17082 . ./conf$$subs.sh ||
17083 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17084
17085 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17086 if test $ac_delim_n = $ac_delim_num; then
17087 break
17088 elif $ac_last_try; then
17089 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17090 else
17091 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17092 fi
17093done
17094rm -f conf$$subs.sh
17095
17096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17097cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17098_ACEOF
17099sed -n '
17100h
17101s/^/S["/; s/!.*/"]=/
17102p
17103g
17104s/^[^!]*!//
17105:repl
17106t repl
17107s/'"$ac_delim"'$//
17108t delim
17109:nl
17110h
17111s/\(.\{148\}\).*/\1/
17112t more1
17113s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17114p
17115n
17116b repl
17117:more1
17118s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17119p
17120g
17121s/.\{148\}//
17122t nl
17123:delim
17124h
17125s/\(.\{148\}\).*/\1/
17126t more2
17127s/["\\]/\\&/g; s/^/"/; s/$/"/
17128p
17129b
17130:more2
17131s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17132p
17133g
17134s/.\{148\}//
17135t delim
17136' <conf$$subs.awk | sed '
17137/^[^""]/{
17138 N
17139 s/\n//
17140}
17141' >>$CONFIG_STATUS || ac_write_fail=1
17142rm -f conf$$subs.awk
17143cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17144_ACAWK
17145cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17146 for (key in S) S_is_set[key] = 1
17147 FS = "\a"
17148 \$ac_cs_awk_pipe_init
17149}
17150{
17151 line = $ 0
17152 nfields = split(line, field, "@")
17153 substed = 0
17154 len = length(field[1])
17155 for (i = 2; i < nfields; i++) {
17156 key = field[i]
17157 keylen = length(key)
17158 if (S_is_set[key]) {
17159 value = S[key]
17160 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17161 len += length(value) + length(field[++i])
17162 substed = 1
17163 } else
17164 len += 1 + keylen
17165 }
17166 if (nfields == 3 && !substed) {
17167 key = field[2]
17168 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17169 \$ac_cs_awk_read_file
17170 next
17171 }
17172 }
17173 print line
b4e70030 17174}
81ecdfbb
RW
17175\$ac_cs_awk_pipe_fini
17176_ACAWK
17177_ACEOF
17178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17179if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17180 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17181else
17182 cat
17183fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17184 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17185_ACEOF
17186
17187# VPATH may cause trouble with some makes, so we remove $(srcdir),
17188# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17189# trailing colons and then remove the whole line if VPATH becomes empty
17190# (actually we leave an empty line to preserve line numbers).
17191if test "x$srcdir" = x.; then
17192 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17193s/:*\$(srcdir):*/:/
17194s/:*\${srcdir}:*/:/
17195s/:*@srcdir@:*/:/
17196s/^\([^=]*=[ ]*\):*/\1/
17197s/:*$//
17198s/^[^=]*=[ ]*$//
17199}'
17200fi
17201
17202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17203fi # test -n "$CONFIG_FILES"
17204
17205# Set up the scripts for CONFIG_HEADERS section.
17206# No need to generate them if there are no CONFIG_HEADERS.
17207# This happens for instance with `./config.status Makefile'.
17208if test -n "$CONFIG_HEADERS"; then
17209cat >"$tmp/defines.awk" <<\_ACAWK ||
17210BEGIN {
17211_ACEOF
17212
17213# Transform confdefs.h into an awk script `defines.awk', embedded as
17214# here-document in config.status, that substitutes the proper values into
17215# config.h.in to produce config.h.
4e8d927d 17216
81ecdfbb
RW
17217# Create a delimiter string that does not exist in confdefs.h, to ease
17218# handling of long lines.
17219ac_delim='%!_!# '
17220for ac_last_try in false false :; do
17221 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17222 if test -z "$ac_t"; then
17223 break
17224 elif $ac_last_try; then
17225 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17226 else
17227 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17228 fi
17229done
4e8d927d 17230
81ecdfbb
RW
17231# For the awk script, D is an array of macro values keyed by name,
17232# likewise P contains macro parameters if any. Preserve backslash
17233# newline sequences.
17234
17235ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17236sed -n '
17237s/.\{148\}/&'"$ac_delim"'/g
17238t rset
17239:rset
17240s/^[ ]*#[ ]*define[ ][ ]*/ /
17241t def
17242d
17243:def
17244s/\\$//
17245t bsnl
17246s/["\\]/\\&/g
17247s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17248D["\1"]=" \3"/p
17249s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17250d
17251:bsnl
17252s/["\\]/\\&/g
17253s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17254D["\1"]=" \3\\\\\\n"\\/p
17255t cont
17256s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17257t cont
17258d
17259:cont
17260n
17261s/.\{148\}/&'"$ac_delim"'/g
17262t clear
17263:clear
17264s/\\$//
17265t bsnlc
17266s/["\\]/\\&/g; s/^/"/; s/$/"/p
17267d
17268:bsnlc
17269s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17270b cont
17271' <confdefs.h | sed '
17272s/'"$ac_delim"'/"\\\
17273"/g' >>$CONFIG_STATUS || ac_write_fail=1
17274
17275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17276 for (key in D) D_is_set[key] = 1
17277 FS = "\a"
17278}
17279/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17280 line = \$ 0
17281 split(line, arg, " ")
17282 if (arg[1] == "#") {
17283 defundef = arg[2]
17284 mac1 = arg[3]
17285 } else {
17286 defundef = substr(arg[1], 2)
17287 mac1 = arg[2]
17288 }
17289 split(mac1, mac2, "(") #)
17290 macro = mac2[1]
17291 prefix = substr(line, 1, index(line, defundef) - 1)
17292 if (D_is_set[macro]) {
17293 # Preserve the white space surrounding the "#".
17294 print prefix "define", macro P[macro] D[macro]
17295 next
17296 } else {
17297 # Replace #undef with comments. This is necessary, for example,
17298 # in the case of _POSIX_SOURCE, which is predefined and required
17299 # on some systems where configure will not decide to define it.
17300 if (defundef == "undef") {
17301 print "/*", prefix defundef, macro, "*/"
17302 next
17303 }
17304 }
b4e70030 17305}
81ecdfbb
RW
17306{ print }
17307_ACAWK
b4e70030 17308_ACEOF
81ecdfbb
RW
17309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17310 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17311fi # test -n "$CONFIG_HEADERS"
4e8d927d 17312
4e8d927d 17313
81ecdfbb
RW
17314eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17315shift
17316for ac_tag
17317do
17318 case $ac_tag in
17319 :[FHLC]) ac_mode=$ac_tag; continue;;
17320 esac
17321 case $ac_mode$ac_tag in
17322 :[FHL]*:*);;
17323 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17324 :[FH]-) ac_tag=-:-;;
17325 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17326 esac
17327 ac_save_IFS=$IFS
17328 IFS=:
17329 set x $ac_tag
17330 IFS=$ac_save_IFS
17331 shift
17332 ac_file=$1
17333 shift
4e8d927d 17334
81ecdfbb
RW
17335 case $ac_mode in
17336 :L) ac_source=$1;;
17337 :[FH])
17338 ac_file_inputs=
17339 for ac_f
17340 do
17341 case $ac_f in
17342 -) ac_f="$tmp/stdin";;
17343 *) # Look for the file first in the build tree, then in the source tree
17344 # (if the path is not absolute). The absolute path cannot be DOS-style,
17345 # because $ac_f cannot contain `:'.
17346 test -f "$ac_f" ||
17347 case $ac_f in
17348 [\\/$]*) false;;
17349 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17350 esac ||
17351 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17352 esac
17353 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17354 as_fn_append ac_file_inputs " '$ac_f'"
17355 done
17356
17357 # Let's still pretend it is `configure' which instantiates (i.e., don't
17358 # use $as_me), people would be surprised to read:
17359 # /* config.h. Generated by config.status. */
17360 configure_input='Generated from '`
17361 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17362 `' by configure.'
17363 if test x"$ac_file" != x-; then
17364 configure_input="$ac_file. $configure_input"
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17366$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17367 fi
81ecdfbb
RW
17368 # Neutralize special characters interpreted by sed in replacement strings.
17369 case $configure_input in #(
17370 *\&* | *\|* | *\\* )
17371 ac_sed_conf_input=`$as_echo "$configure_input" |
17372 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17373 *) ac_sed_conf_input=$configure_input;;
17374 esac
4e8d927d 17375
81ecdfbb
RW
17376 case $ac_tag in
17377 *:-:* | *:-) cat >"$tmp/stdin" \
17378 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17379 esac
17380 ;;
c906108c
SS
17381 esac
17382
81ecdfbb 17383 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17384$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17385 X"$ac_file" : 'X\(//\)[^/]' \| \
17386 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17387 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17388$as_echo X"$ac_file" |
17389 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17390 s//\1/
17391 q
17392 }
17393 /^X\(\/\/\)[^/].*/{
17394 s//\1/
17395 q
17396 }
17397 /^X\(\/\/\)$/{
17398 s//\1/
17399 q
17400 }
17401 /^X\(\/\).*/{
17402 s//\1/
17403 q
17404 }
17405 s/.*/./; q'`
17406 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17407 ac_builddir=.
17408
81ecdfbb
RW
17409case "$ac_dir" in
17410.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17411*)
17412 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17413 # A ".." for each directory in $ac_dir_suffix.
17414 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17415 case $ac_top_builddir_sub in
17416 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17417 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17418 esac ;;
17419esac
17420ac_abs_top_builddir=$ac_pwd
17421ac_abs_builddir=$ac_pwd$ac_dir_suffix
17422# for backward compatibility:
17423ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17424
17425case $srcdir in
81ecdfbb 17426 .) # We are building in place.
bec39cab 17427 ac_srcdir=.
81ecdfbb
RW
17428 ac_top_srcdir=$ac_top_builddir_sub
17429 ac_abs_top_srcdir=$ac_pwd ;;
17430 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17431 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17432 ac_top_srcdir=$srcdir
17433 ac_abs_top_srcdir=$srcdir ;;
17434 *) # Relative name.
17435 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17436 ac_top_srcdir=$ac_top_build_prefix$srcdir
17437 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17438esac
81ecdfbb 17439ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17440
c906108c 17441
81ecdfbb
RW
17442 case $ac_mode in
17443 :F)
17444 #
17445 # CONFIG_FILE
17446 #
c906108c 17447
bec39cab
AC
17448 case $INSTALL in
17449 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17450 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17451 esac
81ecdfbb
RW
17452 ac_MKDIR_P=$MKDIR_P
17453 case $MKDIR_P in
17454 [\\/$]* | ?:[\\/]* ) ;;
17455 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17456 esac
17457_ACEOF
121ce6e5 17458
81ecdfbb
RW
17459cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17460# If the template does not know about datarootdir, expand it.
17461# FIXME: This hack should be removed a few years after 2.60.
17462ac_datarootdir_hack=; ac_datarootdir_seen=
17463ac_sed_dataroot='
17464/datarootdir/ {
17465 p
17466 q
17467}
17468/@datadir@/p
17469/@docdir@/p
17470/@infodir@/p
17471/@localedir@/p
17472/@mandir@/p'
17473case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17474*datarootdir*) ac_datarootdir_seen=yes;;
17475*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17477$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17478_ACEOF
17479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17480 ac_datarootdir_hack='
17481 s&@datadir@&$datadir&g
17482 s&@docdir@&$docdir&g
17483 s&@infodir@&$infodir&g
17484 s&@localedir@&$localedir&g
17485 s&@mandir@&$mandir&g
17486 s&\\\${datarootdir}&$datarootdir&g' ;;
17487esac
4e8d927d 17488_ACEOF
81ecdfbb
RW
17489
17490# Neutralize VPATH when `$srcdir' = `.'.
17491# Shell code in configure.ac might set extrasub.
17492# FIXME: do we really want to maintain this feature?
17493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17494ac_sed_extra="$ac_vpsub
bec39cab
AC
17495$extrasub
17496_ACEOF
81ecdfbb 17497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17498:t
17499/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17500s|@configure_input@|$ac_sed_conf_input|;t t
17501s&@top_builddir@&$ac_top_builddir_sub&;t t
17502s&@top_build_prefix@&$ac_top_build_prefix&;t t
17503s&@srcdir@&$ac_srcdir&;t t
17504s&@abs_srcdir@&$ac_abs_srcdir&;t t
17505s&@top_srcdir@&$ac_top_srcdir&;t t
17506s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17507s&@builddir@&$ac_builddir&;t t
17508s&@abs_builddir@&$ac_abs_builddir&;t t
17509s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17510s&@INSTALL@&$ac_INSTALL&;t t
17511s&@MKDIR_P@&$ac_MKDIR_P&;t t
17512$ac_datarootdir_hack
17513"
17514eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17515if $ac_cs_awk_getline; then
17516 $AWK -f "$tmp/subs.awk"
17517else
17518 $AWK -f "$tmp/subs.awk" | $SHELL
17519fi >$tmp/out \
17520 || as_fn_error "could not create $ac_file" "$LINENO" 5
17521
17522test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17523 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17524 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17526which seems to be undefined. Please make sure it is defined." >&5
17527$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17528which seems to be undefined. Please make sure it is defined." >&2;}
17529
17530 rm -f "$tmp/stdin"
bec39cab 17531 case $ac_file in
81ecdfbb
RW
17532 -) cat "$tmp/out" && rm -f "$tmp/out";;
17533 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17534 esac \
17535 || as_fn_error "could not create $ac_file" "$LINENO" 5
17536 ;;
17537 :H)
17538 #
17539 # CONFIG_HEADER
17540 #
bec39cab 17541 if test x"$ac_file" != x-; then
81ecdfbb
RW
17542 {
17543 $as_echo "/* $configure_input */" \
17544 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17545 } >"$tmp/config.h" \
17546 || as_fn_error "could not create $ac_file" "$LINENO" 5
17547 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17549$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17550 else
81ecdfbb
RW
17551 rm -f "$ac_file"
17552 mv "$tmp/config.h" "$ac_file" \
17553 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17554 fi
17555 else
81ecdfbb
RW
17556 $as_echo "/* $configure_input */" \
17557 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17558 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17559 fi
81ecdfbb
RW
17560# Compute "$ac_file"'s index in $config_headers.
17561_am_arg="$ac_file"
e28b3332
DJ
17562_am_stamp_count=1
17563for _am_header in $config_headers :; do
17564 case $_am_header in
81ecdfbb 17565 $_am_arg | $_am_arg:* )
e28b3332
DJ
17566 break ;;
17567 * )
17568 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17569 esac
17570done
81ecdfbb
RW
17571echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17572$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17573 X"$_am_arg" : 'X\(//\)[^/]' \| \
17574 X"$_am_arg" : 'X\(//\)$' \| \
17575 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17576$as_echo X"$_am_arg" |
17577 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17578 s//\1/
17579 q
17580 }
17581 /^X\(\/\/\)[^/].*/{
17582 s//\1/
17583 q
17584 }
17585 /^X\(\/\/\)$/{
17586 s//\1/
17587 q
17588 }
17589 /^X\(\/\).*/{
17590 s//\1/
17591 q
17592 }
17593 s/.*/./; q'`/stamp-h$_am_stamp_count
17594 ;;
17595 :L)
17596 #
17597 # CONFIG_LINK
17598 #
c906108c 17599
81ecdfbb
RW
17600 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17601 :
b4e70030 17602 else
81ecdfbb
RW
17603 # Prefer the file from the source tree if names are identical.
17604 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17605 ac_source=$srcdir/$ac_source
17606 fi
b4e70030 17607
81ecdfbb
RW
17608 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17609$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17610
81ecdfbb
RW
17611 if test ! -r "$ac_source"; then
17612 as_fn_error "$ac_source: file not found" "$LINENO" 5
17613 fi
17614 rm -f "$ac_file"
bec39cab 17615
81ecdfbb
RW
17616 # Try a relative symlink, then a hard link, then a copy.
17617 case $srcdir in
17618 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17619 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17620 esac
17621 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17622 ln "$ac_source" "$ac_file" 2>/dev/null ||
17623 cp -p "$ac_source" "$ac_file" ||
17624 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17625 fi
17626 ;;
17627 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17628$as_echo "$as_me: executing $ac_file commands" >&6;}
17629 ;;
c906108c 17630 esac
b4e70030 17631
bec39cab 17632
81ecdfbb
RW
17633 case $ac_file$ac_mode in
17634 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17635 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17636 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17637 # are listed without --file. Let's play safe and only enable the eval
17638 # if we detect the quoting.
17639 case $CONFIG_FILES in
17640 *\'*) eval set x "$CONFIG_FILES" ;;
17641 *) set x $CONFIG_FILES ;;
17642 esac
17643 shift
17644 for mf
17645 do
17646 # Strip MF so we end up with the name of the file.
17647 mf=`echo "$mf" | sed -e 's/:.*$//'`
17648 # Check whether this is an Automake generated Makefile or not.
17649 # We used to match only the files named `Makefile.in', but
17650 # some people rename them; so instead we look at the file content.
17651 # Grep'ing the first line is not enough: some people post-process
17652 # each Makefile.in and add a new line on top of each file to say so.
17653 # Grep'ing the whole file is not good either: AIX grep has a line
17654 # limit of 2048, but all sed's we know have understand at least 4000.
17655 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17656 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17657$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17658 X"$mf" : 'X\(//\)[^/]' \| \
17659 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17660 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17661$as_echo X"$mf" |
17662 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17663 s//\1/
17664 q
17665 }
17666 /^X\(\/\/\)[^/].*/{
17667 s//\1/
17668 q
17669 }
17670 /^X\(\/\/\)$/{
17671 s//\1/
17672 q
17673 }
17674 /^X\(\/\).*/{
17675 s//\1/
17676 q
17677 }
17678 s/.*/./; q'`
17679 else
17680 continue
17681 fi
17682 # Extract the definition of DEPDIR, am__include, and am__quote
17683 # from the Makefile without running `make'.
17684 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17685 test -z "$DEPDIR" && continue
17686 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17687 test -z "am__include" && continue
17688 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17689 # When using ansi2knr, U may be empty or an underscore; expand it
17690 U=`sed -n 's/^U = //p' < "$mf"`
17691 # Find all dependency output files, they are included files with
17692 # $(DEPDIR) in their names. We invoke sed twice because it is the
17693 # simplest approach to changing $(DEPDIR) to its actual value in the
17694 # expansion.
17695 for file in `sed -n "
17696 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17697 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17698 # Make sure the directory exists.
17699 test -f "$dirpart/$file" && continue
17700 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17701$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17702 X"$file" : 'X\(//\)[^/]' \| \
17703 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17704 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17705$as_echo X"$file" |
17706 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17707 s//\1/
17708 q
17709 }
17710 /^X\(\/\/\)[^/].*/{
17711 s//\1/
17712 q
17713 }
17714 /^X\(\/\/\)$/{
17715 s//\1/
17716 q
17717 }
17718 /^X\(\/\).*/{
17719 s//\1/
17720 q
17721 }
17722 s/.*/./; q'`
17723 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17724 # echo "creating $dirpart/$file"
17725 echo '# dummy' > "$dirpart/$file"
e28b3332 17726 done
e28b3332 17727 done
81ecdfbb 17728}
4e8d927d 17729 ;;
81ecdfbb 17730 "default":C)
c906108c
SS
17731case x$CONFIG_HEADERS in
17732xconfig.h:config.in)
17733echo > stamp-h ;;
17734esac
bec39cab 17735 ;;
81ecdfbb 17736
bec39cab 17737 esac
81ecdfbb 17738done # for ac_tag
c906108c 17739
bec39cab 17740
81ecdfbb 17741as_fn_exit 0
bec39cab 17742_ACEOF
bec39cab
AC
17743ac_clean_files=$ac_clean_files_save
17744
81ecdfbb
RW
17745test $ac_write_fail = 0 ||
17746 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17747
bec39cab
AC
17748
17749# configure is writing to config.log, and then calls config.status.
17750# config.status does its own redirection, appending to config.log.
17751# Unfortunately, on DOS this fails, as config.log is still kept open
17752# by configure, so config.status won't be able to write to it; its
17753# output is simply discarded. So we exec the FD to /dev/null,
17754# effectively closing config.log, so it can be properly (re)opened and
17755# appended to by config.status. When coming back to configure, we
17756# need to make the FD available again.
17757if test "$no_create" != yes; then
17758 ac_cs_success=:
17759 ac_config_status_args=
17760 test "$silent" = yes &&
17761 ac_config_status_args="$ac_config_status_args --quiet"
17762 exec 5>/dev/null
17763 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17764 exec 5>>config.log
17765 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17766 # would make configure fail if this is the last instruction.
81ecdfbb 17767 $ac_cs_success || as_fn_exit $?
bec39cab 17768fi
c906108c 17769
bec39cab 17770#
81ecdfbb 17771# CONFIG_SUBDIRS section.
bec39cab 17772#
c906108c
SS
17773if test "$no_recursion" != yes; then
17774
81ecdfbb
RW
17775 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17776 # so they do not pile up.
c906108c
SS
17777 ac_sub_configure_args=
17778 ac_prev=
fdc59709
PB
17779 eval "set x $ac_configure_args"
17780 shift
17781 for ac_arg
17782 do
c906108c
SS
17783 if test -n "$ac_prev"; then
17784 ac_prev=
17785 continue
17786 fi
bec39cab 17787 case $ac_arg in
c906108c
SS
17788 -cache-file | --cache-file | --cache-fil | --cache-fi \
17789 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17790 ac_prev=cache_file ;;
17791 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17792 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17793 | --c=*)
17794 ;;
17795 --config-cache | -C)
c906108c
SS
17796 ;;
17797 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17798 ac_prev=srcdir ;;
17799 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17800 ;;
bec39cab
AC
17801 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17802 ac_prev=prefix ;;
17803 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17804 ;;
81ecdfbb
RW
17805 --disable-option-checking)
17806 ;;
fdc59709
PB
17807 *)
17808 case $ac_arg in
81ecdfbb 17809 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17810 esac
81ecdfbb 17811 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17812 esac
17813 done
17814
bec39cab
AC
17815 # Always prepend --prefix to ensure using the same prefix
17816 # in subdir configurations.
fdc59709
PB
17817 ac_arg="--prefix=$prefix"
17818 case $ac_arg in
81ecdfbb 17819 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17820 esac
81ecdfbb
RW
17821 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17822
17823 # Pass --silent
17824 if test "$silent" = yes; then
17825 ac_sub_configure_args="--silent $ac_sub_configure_args"
17826 fi
17827
17828 # Always prepend --disable-option-checking to silence warnings, since
17829 # different subdirs can have different --enable and --with options.
17830 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17831
b4e70030 17832 ac_popdir=`pwd`
bec39cab 17833 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17834
17835 # Do not complain, so a configure script can configure whichever
17836 # parts of a large source tree are present.
fdc59709 17837 test -d "$srcdir/$ac_dir" || continue
c906108c 17838
81ecdfbb
RW
17839 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17840 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17841 $as_echo "$ac_msg" >&6
17842 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17843 ac_builddir=.
17844
81ecdfbb
RW
17845case "$ac_dir" in
17846.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17847*)
17848 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17849 # A ".." for each directory in $ac_dir_suffix.
17850 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17851 case $ac_top_builddir_sub in
17852 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17853 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17854 esac ;;
17855esac
17856ac_abs_top_builddir=$ac_pwd
17857ac_abs_builddir=$ac_pwd$ac_dir_suffix
17858# for backward compatibility:
17859ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17860
17861case $srcdir in
81ecdfbb 17862 .) # We are building in place.
bec39cab 17863 ac_srcdir=.
81ecdfbb
RW
17864 ac_top_srcdir=$ac_top_builddir_sub
17865 ac_abs_top_srcdir=$ac_pwd ;;
17866 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17867 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17868 ac_top_srcdir=$srcdir
17869 ac_abs_top_srcdir=$srcdir ;;
17870 *) # Relative name.
17871 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17872 ac_top_srcdir=$ac_top_build_prefix$srcdir
17873 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17874esac
81ecdfbb 17875ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17876
c906108c 17877
fdc59709 17878 cd "$ac_dir"
c906108c
SS
17879
17880 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17881 if test -f "$ac_srcdir/configure.gnu"; then
17882 ac_sub_configure=$ac_srcdir/configure.gnu
17883 elif test -f "$ac_srcdir/configure"; then
17884 ac_sub_configure=$ac_srcdir/configure
17885 elif test -f "$ac_srcdir/configure.in"; then
17886 # This should be Cygnus configure.
17887 ac_sub_configure=$ac_aux_dir/configure
c906108c 17888 else
81ecdfbb
RW
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17890$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17891 ac_sub_configure=
17892 fi
17893
17894 # The recursion is here.
17895 if test -n "$ac_sub_configure"; then
c906108c 17896 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17897 case $cache_file in
17898 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17899 *) # Relative name.
17900 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17901 esac
c906108c 17902
81ecdfbb
RW
17903 { $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
17904$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17905 # The eval makes quoting arguments work.
fdc59709
PB
17906 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17907 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17908 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17909 fi
17910
fdc59709 17911 cd "$ac_popdir"
c906108c
SS
17912 done
17913fi
81ecdfbb
RW
17914if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17916$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17917fi
c906108c
SS
17918
17919
17920exit 0
This page took 2.26468 seconds and 4 git commands to generate.