* NEWS: Mention --with-iconv-bin.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
ac534cba
JB
662PYTHON_LIBS
663PYTHON_CPPFLAGS
81ecdfbb 664PYTHON_CFLAGS
ec685c5e 665python_prog_path
81ecdfbb
RW
666LTLIBEXPAT
667LIBEXPAT
668HAVE_LIBEXPAT
39037522 669READLINE_TEXI_INCFLAG
81ecdfbb
RW
670READLINE_CFLAGS
671READLINE_DEPS
672READLINE
673MIG
674WINDRES
675DLLTOOL
676AR
677YFLAGS
678YACC
679LN_S
680REPORT_BUGS_TEXI
681REPORT_BUGS_TO
682PKGVERSION
683TARGET_OBS
684subdirs
685GDB_DATADIR
686DEBUGDIR
687am__fastdepCC_FALSE
688am__fastdepCC_TRUE
689AMDEPBACKSLASH
690AMDEP_FALSE
691AMDEP_TRUE
692am__quote
693am__include
694am__untar
695am__tar
696AMTAR
697AWK
698mkdir_p
699MKDIR_P
700INSTALL_STRIP_PROGRAM
701STRIP
702install_sh
703MAKEINFO
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709CYGPATH_W
710am__isrc
711INSTALL_DATA
712INSTALL_SCRIPT
713INSTALL_PROGRAM
714PACKAGE
715GNULIB_STDINT_H
716LIBGNU_LTLIBDEPS
717LIBGNU_LIBDEPS
f434ba03
PA
718gltests_WITNESS
719HAVE_WINT_T
81ecdfbb 720HAVE_WCHAR_H
f434ba03
PA
721NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
722NEXT_WCHAR_H
81ecdfbb 723REPLACE_WCWIDTH
f434ba03
PA
724REPLACE_WCSNRTOMBS
725REPLACE_WCSRTOMBS
726REPLACE_WCRTOMB
727REPLACE_MBSNRTOWCS
728REPLACE_MBSRTOWCS
729REPLACE_MBRLEN
730REPLACE_MBRTOWC
731REPLACE_MBSINIT
732REPLACE_WCTOB
733REPLACE_BTOWC
734REPLACE_MBSTATE_T
81ecdfbb 735HAVE_DECL_WCWIDTH
f434ba03
PA
736HAVE_DECL_WCTOB
737HAVE_WCSNRTOMBS
738HAVE_WCSRTOMBS
739HAVE_WCRTOMB
740HAVE_MBSNRTOWCS
741HAVE_MBSRTOWCS
742HAVE_MBRLEN
743HAVE_MBRTOWC
744HAVE_MBSINIT
745HAVE_BTOWC
81ecdfbb 746GNULIB_WCWIDTH
f434ba03
PA
747GNULIB_WCSNRTOMBS
748GNULIB_WCSRTOMBS
749GNULIB_WCRTOMB
750GNULIB_MBSNRTOWCS
751GNULIB_MBSRTOWCS
752GNULIB_MBRLEN
753GNULIB_MBRTOWC
754GNULIB_MBSINIT
755GNULIB_WCTOB
756GNULIB_BTOWC
757NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
758NEXT_STRING_H
759STDINT_H
760WINT_T_SUFFIX
761WCHAR_T_SUFFIX
81ecdfbb 762SIG_ATOMIC_T_SUFFIX
f434ba03 763SIZE_T_SUFFIX
81ecdfbb
RW
764PTRDIFF_T_SUFFIX
765HAVE_SIGNED_WINT_T
766HAVE_SIGNED_WCHAR_T
767HAVE_SIGNED_SIG_ATOMIC_T
768BITSIZEOF_WINT_T
769BITSIZEOF_WCHAR_T
81ecdfbb 770BITSIZEOF_SIG_ATOMIC_T
f434ba03 771BITSIZEOF_SIZE_T
81ecdfbb
RW
772BITSIZEOF_PTRDIFF_T
773HAVE_SYS_BITYPES_H
774HAVE_SYS_INTTYPES_H
775HAVE_STDINT_H
f434ba03 776NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 777NEXT_STDINT_H
81ecdfbb
RW
778HAVE_SYS_TYPES_H
779HAVE_INTTYPES_H
780HAVE_UNSIGNED_LONG_LONG_INT
781HAVE_LONG_LONG_INT
f434ba03
PA
782NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
783NEXT_STDDEF_H
784PRAGMA_SYSTEM_HEADER
785INCLUDE_NEXT_AS_FIRST_DIRECTIVE
786INCLUDE_NEXT
787STDDEF_H
788HAVE_WCHAR_T
789REPLACE_NULL
790APPLE_UNIVERSAL_BUILD
791UNDEFINE_STRTOK_R
792REPLACE_STRTOK_R
81ecdfbb 793REPLACE_STRSIGNAL
f434ba03
PA
794REPLACE_STRNLEN
795REPLACE_STRNDUP
796REPLACE_STRNCAT
81ecdfbb 797REPLACE_STRERROR
f434ba03
PA
798REPLACE_STRCASESTR
799REPLACE_STRSTR
800REPLACE_STRDUP
801REPLACE_STPNCPY
802REPLACE_MEMMEM
803REPLACE_MEMCHR
804HAVE_STRVERSCMP
81ecdfbb 805HAVE_DECL_STRSIGNAL
81ecdfbb
RW
806HAVE_DECL_STRTOK_R
807HAVE_STRCASESTR
808HAVE_STRSEP
809HAVE_STRPBRK
810HAVE_DECL_STRNLEN
811HAVE_DECL_STRNDUP
81ecdfbb
RW
812HAVE_DECL_STRDUP
813HAVE_STRCHRNUL
814HAVE_STPNCPY
815HAVE_STPCPY
f434ba03 816HAVE_RAWMEMCHR
81ecdfbb
RW
817HAVE_DECL_MEMRCHR
818HAVE_MEMPCPY
819HAVE_DECL_MEMMEM
f434ba03
PA
820HAVE_MEMCHR
821HAVE_MBSLEN
822GNULIB_STRVERSCMP
81ecdfbb
RW
823GNULIB_STRSIGNAL
824GNULIB_STRERROR
825GNULIB_MBSTOK_R
826GNULIB_MBSSEP
827GNULIB_MBSSPN
828GNULIB_MBSPBRK
829GNULIB_MBSCSPN
830GNULIB_MBSCASESTR
831GNULIB_MBSPCASECMP
832GNULIB_MBSNCASECMP
833GNULIB_MBSCASECMP
834GNULIB_MBSSTR
835GNULIB_MBSRCHR
836GNULIB_MBSCHR
837GNULIB_MBSNLEN
838GNULIB_MBSLEN
839GNULIB_STRTOK_R
840GNULIB_STRCASESTR
841GNULIB_STRSTR
842GNULIB_STRSEP
843GNULIB_STRPBRK
844GNULIB_STRNLEN
845GNULIB_STRNDUP
f434ba03 846GNULIB_STRNCAT
81ecdfbb
RW
847GNULIB_STRDUP
848GNULIB_STRCHRNUL
849GNULIB_STPNCPY
850GNULIB_STPCPY
f434ba03 851GNULIB_RAWMEMCHR
81ecdfbb
RW
852GNULIB_MEMRCHR
853GNULIB_MEMPCPY
854GNULIB_MEMMEM
f434ba03 855GNULIB_MEMCHR
81ecdfbb
RW
856GL_COND_LIBTOOL_FALSE
857GL_COND_LIBTOOL_TRUE
858CATOBJEXT
859GENCAT
860INSTOBJEXT
861DATADIRNAME
862CATALOGS
863POSUB
864GMSGFMT
865XGETTEXT
866INCINTL
867LIBINTL_DEP
868LIBINTL
869USE_NLS
870SET_MAKE
871GMAKE_FALSE
872GMAKE_TRUE
873MAKE
874CCDEPMODE
875DEPDIR
876am__leading_dot
877target_os
878target_vendor
879target_cpu
880target
f434ba03
PA
881RANLIB
882EGREP
883GREP
884CPP
81ecdfbb
RW
885host_os
886host_vendor
887host_cpu
888host
889build_os
890build_vendor
891build_cpu
892build
81ecdfbb
RW
893OBJEXT
894EXEEXT
895ac_ct_CC
896CPPFLAGS
897LDFLAGS
898CFLAGS
899CC
900MAINT
901MAINTAINER_MODE_FALSE
902MAINTAINER_MODE_TRUE
903target_alias
904host_alias
905build_alias
906LIBS
907ECHO_T
908ECHO_N
909ECHO_C
910DEFS
911mandir
912localedir
913libdir
914psdir
915pdfdir
916dvidir
917htmldir
918infodir
919docdir
920oldincludedir
921includedir
922localstatedir
923sharedstatedir
924sysconfdir
925datadir
926datarootdir
927libexecdir
928sbindir
929bindir
930program_transform_name
931prefix
932exec_prefix
933PACKAGE_URL
934PACKAGE_BUGREPORT
935PACKAGE_STRING
936PACKAGE_VERSION
937PACKAGE_TARNAME
938PACKAGE_NAME
939PATH_SEPARATOR
940SHELL'
a4ce5b0d 941ac_subst_files='host_makefile_frag'
81ecdfbb
RW
942ac_user_opts='
943enable_option_checking
944enable_maintainer_mode
da2f07f1
JK
945enable_plugins
946enable_largefile
81ecdfbb
RW
947enable_dependency_tracking
948with_separate_debug_dir
949with_gdb_datadir
950with_relocated_sources
951enable_targets
952enable_64_bit_bfd
953enable_gdbcli
954enable_gdbmi
955enable_tui
956enable_gdbtk
957with_libunwind
958with_curses
959enable_profiling
960with_pkgversion
961with_bugurl
b040ad30 962with_zlib
81ecdfbb 963with_libiconv_prefix
478aac75 964with_iconv_bin
81ecdfbb
RW
965with_system_readline
966with_expat
967with_gnu_ld
968enable_rpath
969with_libexpat_prefix
970with_python
971with_included_regex
972with_sysroot
973with_system_gdbinit
974enable_werror
975enable_build_warnings
976enable_gdb_build_warnings
977with_tcl
978with_tk
979with_x
980enable_sim
981enable_multi_ice
496c0e1b 982enable_gdbserver
81ecdfbb
RW
983'
984 ac_precious_vars='build_alias
985host_alias
986target_alias
987CC
988CFLAGS
989LDFLAGS
990LIBS
991CPPFLAGS
992CPP
993YACC
994YFLAGS
995XMKMF'
5ae98d25 996ac_subdirs_all='testsuite
81ecdfbb
RW
997gdbtk
998multi-ice
999gdbserver'
c906108c
SS
1000
1001# Initialize some variables set by options.
bec39cab
AC
1002ac_init_help=
1003ac_init_version=false
81ecdfbb
RW
1004ac_unrecognized_opts=
1005ac_unrecognized_sep=
c906108c
SS
1006# The variables have the same names as the options, with
1007# dashes changed to underlines.
bec39cab 1008cache_file=/dev/null
c906108c 1009exec_prefix=NONE
c906108c 1010no_create=
c906108c
SS
1011no_recursion=
1012prefix=NONE
1013program_prefix=NONE
1014program_suffix=NONE
1015program_transform_name=s,x,x,
1016silent=
1017site=
1018srcdir=
c906108c
SS
1019verbose=
1020x_includes=NONE
1021x_libraries=NONE
bec39cab
AC
1022
1023# Installation directory options.
1024# These are left unexpanded so users can "make install exec_prefix=/foo"
1025# and all the variables that are supposed to be based on exec_prefix
1026# by default will actually change.
1027# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1028# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1029bindir='${exec_prefix}/bin'
1030sbindir='${exec_prefix}/sbin'
1031libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1032datarootdir='${prefix}/share'
1033datadir='${datarootdir}'
c906108c
SS
1034sysconfdir='${prefix}/etc'
1035sharedstatedir='${prefix}/com'
1036localstatedir='${prefix}/var'
c906108c
SS
1037includedir='${prefix}/include'
1038oldincludedir='/usr/include'
81ecdfbb
RW
1039docdir='${datarootdir}/doc/${PACKAGE}'
1040infodir='${datarootdir}/info'
1041htmldir='${docdir}'
1042dvidir='${docdir}'
1043pdfdir='${docdir}'
1044psdir='${docdir}'
1045libdir='${exec_prefix}/lib'
1046localedir='${datarootdir}/locale'
1047mandir='${datarootdir}/man'
c906108c 1048
c906108c 1049ac_prev=
81ecdfbb 1050ac_dashdash=
c906108c
SS
1051for ac_option
1052do
c906108c
SS
1053 # If the previous option needs an argument, assign it.
1054 if test -n "$ac_prev"; then
81ecdfbb 1055 eval $ac_prev=\$ac_option
c906108c
SS
1056 ac_prev=
1057 continue
1058 fi
1059
81ecdfbb
RW
1060 case $ac_option in
1061 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1062 *) ac_optarg=yes ;;
1063 esac
c906108c
SS
1064
1065 # Accept the important Cygnus configure options, so we can diagnose typos.
1066
81ecdfbb
RW
1067 case $ac_dashdash$ac_option in
1068 --)
1069 ac_dashdash=yes ;;
c906108c
SS
1070
1071 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1072 ac_prev=bindir ;;
1073 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1074 bindir=$ac_optarg ;;
c906108c
SS
1075
1076 -build | --build | --buil | --bui | --bu)
bec39cab 1077 ac_prev=build_alias ;;
c906108c 1078 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1079 build_alias=$ac_optarg ;;
c906108c
SS
1080
1081 -cache-file | --cache-file | --cache-fil | --cache-fi \
1082 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1083 ac_prev=cache_file ;;
1084 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1085 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1086 cache_file=$ac_optarg ;;
1087
1088 --config-cache | -C)
1089 cache_file=config.cache ;;
c906108c 1090
81ecdfbb 1091 -datadir | --datadir | --datadi | --datad)
c906108c 1092 ac_prev=datadir ;;
81ecdfbb 1093 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1094 datadir=$ac_optarg ;;
c906108c 1095
81ecdfbb
RW
1096 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1097 | --dataroo | --dataro | --datar)
1098 ac_prev=datarootdir ;;
1099 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1100 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1101 datarootdir=$ac_optarg ;;
1102
c906108c 1103 -disable-* | --disable-*)
81ecdfbb 1104 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1105 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1107 as_fn_error "invalid feature name: $ac_useropt"
1108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"enable_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval enable_$ac_useropt=no ;;
1118
1119 -docdir | --docdir | --docdi | --doc | --do)
1120 ac_prev=docdir ;;
1121 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1122 docdir=$ac_optarg ;;
1123
1124 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1125 ac_prev=dvidir ;;
1126 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1127 dvidir=$ac_optarg ;;
c906108c
SS
1128
1129 -enable-* | --enable-*)
81ecdfbb 1130 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1131 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1133 as_fn_error "invalid feature name: $ac_useropt"
1134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138"enable_$ac_useropt"
1139"*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
b4e70030 1142 esac
81ecdfbb 1143 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1144
1145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1147 | --exec | --exe | --ex)
1148 ac_prev=exec_prefix ;;
1149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1151 | --exec=* | --exe=* | --ex=*)
bec39cab 1152 exec_prefix=$ac_optarg ;;
c906108c
SS
1153
1154 -gas | --gas | --ga | --g)
1155 # Obsolete; use --with-gas.
1156 with_gas=yes ;;
1157
bec39cab
AC
1158 -help | --help | --hel | --he | -h)
1159 ac_init_help=long ;;
1160 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1161 ac_init_help=recursive ;;
1162 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1163 ac_init_help=short ;;
c906108c
SS
1164
1165 -host | --host | --hos | --ho)
bec39cab 1166 ac_prev=host_alias ;;
c906108c 1167 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1168 host_alias=$ac_optarg ;;
c906108c 1169
81ecdfbb
RW
1170 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1171 ac_prev=htmldir ;;
1172 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1173 | --ht=*)
1174 htmldir=$ac_optarg ;;
1175
c906108c
SS
1176 -includedir | --includedir | --includedi | --included | --include \
1177 | --includ | --inclu | --incl | --inc)
1178 ac_prev=includedir ;;
1179 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1180 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1181 includedir=$ac_optarg ;;
c906108c
SS
1182
1183 -infodir | --infodir | --infodi | --infod | --info | --inf)
1184 ac_prev=infodir ;;
1185 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1186 infodir=$ac_optarg ;;
c906108c
SS
1187
1188 -libdir | --libdir | --libdi | --libd)
1189 ac_prev=libdir ;;
1190 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1191 libdir=$ac_optarg ;;
c906108c
SS
1192
1193 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1194 | --libexe | --libex | --libe)
1195 ac_prev=libexecdir ;;
1196 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1197 | --libexe=* | --libex=* | --libe=*)
bec39cab 1198 libexecdir=$ac_optarg ;;
c906108c 1199
81ecdfbb
RW
1200 -localedir | --localedir | --localedi | --localed | --locale)
1201 ac_prev=localedir ;;
1202 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1203 localedir=$ac_optarg ;;
1204
c906108c 1205 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1206 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1207 ac_prev=localstatedir ;;
1208 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1209 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1210 localstatedir=$ac_optarg ;;
c906108c
SS
1211
1212 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1213 ac_prev=mandir ;;
1214 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1215 mandir=$ac_optarg ;;
c906108c
SS
1216
1217 -nfp | --nfp | --nf)
1218 # Obsolete; use --without-fp.
1219 with_fp=no ;;
1220
1221 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1222 | --no-cr | --no-c | -n)
c906108c
SS
1223 no_create=yes ;;
1224
1225 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1226 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1227 no_recursion=yes ;;
1228
1229 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1230 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1231 | --oldin | --oldi | --old | --ol | --o)
1232 ac_prev=oldincludedir ;;
1233 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1234 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1235 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1236 oldincludedir=$ac_optarg ;;
c906108c
SS
1237
1238 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1239 ac_prev=prefix ;;
1240 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1241 prefix=$ac_optarg ;;
c906108c
SS
1242
1243 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1244 | --program-pre | --program-pr | --program-p)
1245 ac_prev=program_prefix ;;
1246 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1247 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1248 program_prefix=$ac_optarg ;;
c906108c
SS
1249
1250 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1251 | --program-suf | --program-su | --program-s)
1252 ac_prev=program_suffix ;;
1253 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1254 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1255 program_suffix=$ac_optarg ;;
c906108c
SS
1256
1257 -program-transform-name | --program-transform-name \
1258 | --program-transform-nam | --program-transform-na \
1259 | --program-transform-n | --program-transform- \
1260 | --program-transform | --program-transfor \
1261 | --program-transfo | --program-transf \
1262 | --program-trans | --program-tran \
1263 | --progr-tra | --program-tr | --program-t)
1264 ac_prev=program_transform_name ;;
1265 -program-transform-name=* | --program-transform-name=* \
1266 | --program-transform-nam=* | --program-transform-na=* \
1267 | --program-transform-n=* | --program-transform-=* \
1268 | --program-transform=* | --program-transfor=* \
1269 | --program-transfo=* | --program-transf=* \
1270 | --program-trans=* | --program-tran=* \
1271 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1272 program_transform_name=$ac_optarg ;;
c906108c 1273
81ecdfbb
RW
1274 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1275 ac_prev=pdfdir ;;
1276 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1277 pdfdir=$ac_optarg ;;
1278
1279 -psdir | --psdir | --psdi | --psd | --ps)
1280 ac_prev=psdir ;;
1281 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1282 psdir=$ac_optarg ;;
1283
c906108c
SS
1284 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1285 | -silent | --silent | --silen | --sile | --sil)
1286 silent=yes ;;
1287
1288 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1289 ac_prev=sbindir ;;
1290 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1291 | --sbi=* | --sb=*)
bec39cab 1292 sbindir=$ac_optarg ;;
c906108c
SS
1293
1294 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1295 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1296 | --sharedst | --shareds | --shared | --share | --shar \
1297 | --sha | --sh)
1298 ac_prev=sharedstatedir ;;
1299 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1300 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1301 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1302 | --sha=* | --sh=*)
bec39cab 1303 sharedstatedir=$ac_optarg ;;
c906108c
SS
1304
1305 -site | --site | --sit)
1306 ac_prev=site ;;
1307 -site=* | --site=* | --sit=*)
bec39cab 1308 site=$ac_optarg ;;
3ace7edb 1309
c906108c
SS
1310 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1311 ac_prev=srcdir ;;
1312 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1313 srcdir=$ac_optarg ;;
c906108c
SS
1314
1315 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1316 | --syscon | --sysco | --sysc | --sys | --sy)
1317 ac_prev=sysconfdir ;;
1318 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1319 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1320 sysconfdir=$ac_optarg ;;
c906108c
SS
1321
1322 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1323 ac_prev=target_alias ;;
c906108c 1324 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1325 target_alias=$ac_optarg ;;
c906108c
SS
1326
1327 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1328 verbose=yes ;;
1329
bec39cab
AC
1330 -version | --version | --versio | --versi | --vers | -V)
1331 ac_init_version=: ;;
c906108c
SS
1332
1333 -with-* | --with-*)
81ecdfbb 1334 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1335 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1336 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1337 as_fn_error "invalid package name: $ac_useropt"
1338 ac_useropt_orig=$ac_useropt
1339 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1340 case $ac_user_opts in
1341 *"
1342"with_$ac_useropt"
1343"*) ;;
1344 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1345 ac_unrecognized_sep=', ';;
b4e70030 1346 esac
81ecdfbb 1347 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1348
1349 -without-* | --without-*)
81ecdfbb 1350 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1351 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1352 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1353 as_fn_error "invalid package name: $ac_useropt"
1354 ac_useropt_orig=$ac_useropt
1355 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1356 case $ac_user_opts in
1357 *"
1358"with_$ac_useropt"
1359"*) ;;
1360 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1361 ac_unrecognized_sep=', ';;
1362 esac
1363 eval with_$ac_useropt=no ;;
c906108c
SS
1364
1365 --x)
1366 # Obsolete; use --with-x.
1367 with_x=yes ;;
1368
1369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1370 | --x-incl | --x-inc | --x-in | --x-i)
1371 ac_prev=x_includes ;;
1372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1374 x_includes=$ac_optarg ;;
c906108c
SS
1375
1376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1378 ac_prev=x_libraries ;;
1379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1381 x_libraries=$ac_optarg ;;
c906108c 1382
81ecdfbb
RW
1383 -*) as_fn_error "unrecognized option: \`$ac_option'
1384Try \`$0 --help' for more information."
c906108c
SS
1385 ;;
1386
bec39cab
AC
1387 *=*)
1388 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1389 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1390 case $ac_envvar in #(
1391 '' | [0-9]* | *[!_$as_cr_alnum]* )
1392 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1393 esac
1394 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1395 export $ac_envvar ;;
1396
c906108c 1397 *)
bec39cab 1398 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1399 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1400 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1401 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1402 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1403 ;;
1404
1405 esac
1406done
1407
1408if test -n "$ac_prev"; then
bec39cab 1409 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1410 as_fn_error "missing argument to $ac_option"
c906108c 1411fi
c906108c 1412
81ecdfbb
RW
1413if test -n "$ac_unrecognized_opts"; then
1414 case $enable_option_checking in
1415 no) ;;
1416 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1417 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1418 esac
81ecdfbb 1419fi
b4e70030 1420
81ecdfbb
RW
1421# Check all directory arguments for consistency.
1422for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1423 datadir sysconfdir sharedstatedir localstatedir includedir \
1424 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1425 libdir localedir mandir
b4e70030 1426do
81ecdfbb
RW
1427 eval ac_val=\$$ac_var
1428 # Remove trailing slashes.
1429 case $ac_val in
1430 */ )
1431 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1432 eval $ac_var=\$ac_val;;
1433 esac
1434 # Be sure to have absolute directory names.
b4e70030 1435 case $ac_val in
81ecdfbb
RW
1436 [\\/$]* | ?:[\\/]* ) continue;;
1437 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1438 esac
81ecdfbb 1439 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1440done
1441
bec39cab
AC
1442# There might be people who depend on the old broken behavior: `$host'
1443# used to hold the argument of --host etc.
1444# FIXME: To remove some day.
1445build=$build_alias
1446host=$host_alias
1447target=$target_alias
1448
1449# FIXME: To remove some day.
1450if test "x$host_alias" != x; then
1451 if test "x$build_alias" = x; then
1452 cross_compiling=maybe
81ecdfbb 1453 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1454 If a cross compiler is detected then cross compile mode will be used." >&2
1455 elif test "x$build_alias" != "x$host_alias"; then
1456 cross_compiling=yes
1457 fi
1458fi
c906108c 1459
bec39cab
AC
1460ac_tool_prefix=
1461test -n "$host_alias" && ac_tool_prefix=$host_alias-
1462
1463test "$silent" = yes && exec 6>/dev/null
c906108c 1464
c906108c 1465
81ecdfbb
RW
1466ac_pwd=`pwd` && test -n "$ac_pwd" &&
1467ac_ls_di=`ls -di .` &&
1468ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1469 as_fn_error "working directory cannot be determined"
1470test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1471 as_fn_error "pwd does not report name of working directory"
1472
1473
c906108c
SS
1474# Find the source files, if location was not specified.
1475if test -z "$srcdir"; then
1476 ac_srcdir_defaulted=yes
81ecdfbb
RW
1477 # Try the directory containing this script, then the parent directory.
1478 ac_confdir=`$as_dirname -- "$as_myself" ||
1479$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1480 X"$as_myself" : 'X\(//\)[^/]' \| \
1481 X"$as_myself" : 'X\(//\)$' \| \
1482 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1483$as_echo X"$as_myself" |
1484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1485 s//\1/
1486 q
1487 }
1488 /^X\(\/\/\)[^/].*/{
1489 s//\1/
1490 q
1491 }
1492 /^X\(\/\/\)$/{
1493 s//\1/
1494 q
1495 }
1496 /^X\(\/\).*/{
1497 s//\1/
1498 q
1499 }
1500 s/.*/./; q'`
c906108c 1501 srcdir=$ac_confdir
81ecdfbb 1502 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1503 srcdir=..
1504 fi
1505else
1506 ac_srcdir_defaulted=no
1507fi
81ecdfbb
RW
1508if test ! -r "$srcdir/$ac_unique_file"; then
1509 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1510 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1511fi
1512ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1513ac_abs_confdir=`(
1514 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1515 pwd)`
1516# When building in place, set srcdir=.
1517if test "$ac_abs_confdir" = "$ac_pwd"; then
1518 srcdir=.
1519fi
1520# Remove unnecessary trailing slashes from srcdir.
1521# Double slashes in file names in object file debugging info
1522# mess up M-x gdb in Emacs.
1523case $srcdir in
1524*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1525esac
1526for ac_var in $ac_precious_vars; do
1527 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1528 eval ac_env_${ac_var}_value=\$${ac_var}
1529 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1530 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1531done
c906108c 1532
bec39cab
AC
1533#
1534# Report the --help message.
1535#
1536if test "$ac_init_help" = "long"; then
1537 # Omit some internal or obsolete options to make the list less imposing.
1538 # This message is too long to be a string in the A/UX 3.1 sh.
1539 cat <<_ACEOF
1540\`configure' configures this package to adapt to many kinds of systems.
1541
1542Usage: $0 [OPTION]... [VAR=VALUE]...
1543
1544To assign environment variables (e.g., CC, CFLAGS...), specify them as
1545VAR=VALUE. See below for descriptions of some of the useful variables.
1546
1547Defaults for the options are specified in brackets.
1548
1549Configuration:
1550 -h, --help display this help and exit
1551 --help=short display options specific to this package
1552 --help=recursive display the short help of all the included packages
1553 -V, --version display version information and exit
1554 -q, --quiet, --silent do not print \`checking...' messages
1555 --cache-file=FILE cache test results in FILE [disabled]
1556 -C, --config-cache alias for \`--cache-file=config.cache'
1557 -n, --no-create do not create output files
1558 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1559
bec39cab
AC
1560Installation directories:
1561 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1562 [$ac_default_prefix]
bec39cab 1563 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1564 [PREFIX]
bec39cab
AC
1565
1566By default, \`make install' will install all the files in
1567\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1568an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1569for instance \`--prefix=\$HOME'.
1570
1571For better control, use the options below.
1572
1573Fine tuning of the installation directories:
81ecdfbb
RW
1574 --bindir=DIR user executables [EPREFIX/bin]
1575 --sbindir=DIR system admin executables [EPREFIX/sbin]
1576 --libexecdir=DIR program executables [EPREFIX/libexec]
1577 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1578 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1579 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1580 --libdir=DIR object code libraries [EPREFIX/lib]
1581 --includedir=DIR C header files [PREFIX/include]
1582 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1583 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1584 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1585 --infodir=DIR info documentation [DATAROOTDIR/info]
1586 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1587 --mandir=DIR man documentation [DATAROOTDIR/man]
1588 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1589 --htmldir=DIR html documentation [DOCDIR]
1590 --dvidir=DIR dvi documentation [DOCDIR]
1591 --pdfdir=DIR pdf documentation [DOCDIR]
1592 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1593_ACEOF
1594
1595 cat <<\_ACEOF
1596
1597Program names:
1598 --program-prefix=PREFIX prepend PREFIX to installed program names
1599 --program-suffix=SUFFIX append SUFFIX to installed program names
1600 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1601
1602X features:
1603 --x-includes=DIR X include files are in DIR
1604 --x-libraries=DIR X library files are in DIR
1605
1606System types:
1607 --build=BUILD configure for building on BUILD [guessed]
1608 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1609 --target=TARGET configure for building compilers for TARGET [HOST]
1610_ACEOF
1611fi
1612
1613if test -n "$ac_init_help"; then
1614
1615 cat <<\_ACEOF
1616
1617Optional Features:
81ecdfbb 1618 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1619 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1620 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1621 --enable-maintainer-mode enable make rules and dependencies not useful
1622 (and sometimes confusing) to the casual installer
da2f07f1
JK
1623 --enable-plugins Enable support for plugins (defaults no)
1624 --disable-largefile omit support for large files
e28b3332
DJ
1625 --disable-dependency-tracking speeds up one-time build
1626 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1627 --enable-targets=TARGETS
1628 alternative target configurations
c0993dbe 1629 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1630 --disable-gdbcli disable command-line interface (CLI)
1631 --disable-gdbmi disable machine-interface (MI)
1632 --enable-tui enable full-screen terminal user interface (TUI)
1633 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1634 --enable-profiling enable profiling of GDB
3841debe 1635 --disable-rpath do not hardcode runtime library paths
a1220294 1636 --enable-werror treat compile warnings as errors
32c1c914 1637 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1638 --enable-gdb-build-warnings
32c1c914 1639 enable GDB specific build-time compiler warnings if
a1220294 1640 gcc is used
32c1c914 1641 --enable-sim link gdb with simulator
bec39cab 1642 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1643 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1644 is auto)
bec39cab
AC
1645
1646Optional Packages:
1647 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1648 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1649 --with-separate-debug-dir=PATH
32c1c914 1650 look for global separate debug info in this path
62e4f60c 1651 [LIBDIR/debug]
b14b1491
TT
1652 --with-gdb-datadir=PATH look for global separate data files in this path
1653 [DATADIR/gdb]
29b0e8a2 1654 --with-relocated-sources=PATH
32c1c914
TT
1655 automatically relocate this path for source files
1656 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1657 --with-curses use the curses library instead of the termcap
1658 library
c16158bc
JM
1659 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1660 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1661 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1662 --with-libiconv-prefix=DIR
1663 search for libiconv in DIR/include and DIR/lib
478aac75 1664 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1665 --with-system-readline use installed readline library
5c39566f 1666 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1667 --with-gnu-ld assume the C compiler uses GNU ld default=no
1668 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1669 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1670 --with-python[=PYTHON] include python support
1671 (auto/yes/no/<python-program>)
a1220294
TT
1672 --without-included-regex
1673 don't use included regex; this is the default on
1674 systems with version 2 of the GNU C library (use
1675 with caution on other system)
81ecdfbb 1676 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1677 --with-system-gdbinit=PATH
32c1c914 1678 automatically load a system-wide gdbinit file
5062cc19
KS
1679 --with-tcl directory containing tcl configuration (tclConfig.sh)
1680 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1681 --with-x use the X Window System
bec39cab
AC
1682
1683Some influential environment variables:
1684 CC C compiler command
1685 CFLAGS C compiler flags
1686 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1687 nonstandard directory <lib dir>
81ecdfbb
RW
1688 LIBS libraries to pass to the linker, e.g. -l<library>
1689 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1690 you have headers in a nonstandard directory <include dir>
bec39cab 1691 CPP C preprocessor
81ecdfbb
RW
1692 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1693 the first program found out of: `bison -y', `byacc', `yacc'.
1694 YFLAGS The list of arguments that will be passed by default to $YACC.
1695 This script will default YFLAGS to the empty string to avoid a
1696 default value of `-d' given by some make applications.
1697 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1698
1699Use these variables to override the choices made by `configure' or to help
1700it to find libraries and programs with nonstandard names/locations.
1701
81ecdfbb 1702Report bugs to the package provider.
bec39cab 1703_ACEOF
81ecdfbb 1704ac_status=$?
bec39cab
AC
1705fi
1706
1707if test "$ac_init_help" = "recursive"; then
1708 # If there are subdirs, report their specific --help.
bec39cab 1709 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1710 test -d "$ac_dir" ||
1711 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1712 continue
bec39cab
AC
1713 ac_builddir=.
1714
81ecdfbb
RW
1715case "$ac_dir" in
1716.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1717*)
1718 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1719 # A ".." for each directory in $ac_dir_suffix.
1720 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1721 case $ac_top_builddir_sub in
1722 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1723 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1724 esac ;;
1725esac
1726ac_abs_top_builddir=$ac_pwd
1727ac_abs_builddir=$ac_pwd$ac_dir_suffix
1728# for backward compatibility:
1729ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1730
1731case $srcdir in
81ecdfbb 1732 .) # We are building in place.
bec39cab 1733 ac_srcdir=.
81ecdfbb
RW
1734 ac_top_srcdir=$ac_top_builddir_sub
1735 ac_abs_top_srcdir=$ac_pwd ;;
1736 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1737 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1738 ac_top_srcdir=$srcdir
1739 ac_abs_top_srcdir=$srcdir ;;
1740 *) # Relative name.
1741 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1742 ac_top_srcdir=$ac_top_build_prefix$srcdir
1743 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1744esac
81ecdfbb 1745ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1746
81ecdfbb
RW
1747 cd "$ac_dir" || { ac_status=$?; continue; }
1748 # Check for guested configure.
1749 if test -f "$ac_srcdir/configure.gnu"; then
1750 echo &&
1751 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1752 elif test -f "$ac_srcdir/configure"; then
1753 echo &&
1754 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1755 else
81ecdfbb
RW
1756 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1757 fi || ac_status=$?
1758 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1759 done
1760fi
1761
81ecdfbb 1762test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1763if $ac_init_version; then
1764 cat <<\_ACEOF
81ecdfbb
RW
1765configure
1766generated by GNU Autoconf 2.64
bec39cab 1767
81ecdfbb 1768Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1769This configure script is free software; the Free Software Foundation
1770gives unlimited permission to copy, distribute and modify it.
1771_ACEOF
81ecdfbb 1772 exit
bec39cab 1773fi
bec39cab 1774
81ecdfbb
RW
1775## ------------------------ ##
1776## Autoconf initialization. ##
1777## ------------------------ ##
bec39cab 1778
81ecdfbb
RW
1779# ac_fn_c_try_compile LINENO
1780# --------------------------
1781# Try to compile conftest.$ac_ext, and return whether this succeeded.
1782ac_fn_c_try_compile ()
1783{
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1785 rm -f conftest.$ac_objext
1786 if { { ac_try="$ac_compile"
1787case "(($ac_try" in
1788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789 *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793 (eval "$ac_compile") 2>conftest.err
1794 ac_status=$?
1795 if test -s conftest.err; then
1796 grep -v '^ *+' conftest.err >conftest.er1
1797 cat conftest.er1 >&5
1798 mv -f conftest.er1 conftest.err
1799 fi
1800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1801 test $ac_status = 0; } && {
1802 test -z "$ac_c_werror_flag" ||
1803 test ! -s conftest.err
1804 } && test -s conftest.$ac_objext; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: failed program was:" >&5
1808sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1809
81ecdfbb
RW
1810 ac_retval=1
1811fi
1812 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1813 return $ac_retval
1814
1815} # ac_fn_c_try_compile
1816
1817# ac_fn_c_try_cpp LINENO
1818# ----------------------
1819# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1820ac_fn_c_try_cpp ()
bec39cab 1821{
81ecdfbb
RW
1822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823 if { { ac_try="$ac_cpp conftest.$ac_ext"
1824case "(($ac_try" in
1825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1826 *) ac_try_echo=$ac_try;;
1827esac
1828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1829$as_echo "$ac_try_echo"; } >&5
1830 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1831 ac_status=$?
1832 if test -s conftest.err; then
1833 grep -v '^ *+' conftest.err >conftest.er1
1834 cat conftest.er1 >&5
1835 mv -f conftest.er1 conftest.err
1836 fi
1837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1838 test $ac_status = 0; } >/dev/null && {
1839 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1840 test ! -s conftest.err
1841 }; then :
1842 ac_retval=0
1843else
1844 $as_echo "$as_me: failed program was:" >&5
1845sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1846
81ecdfbb
RW
1847 ac_retval=1
1848fi
1849 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1850 return $ac_retval
bec39cab 1851
81ecdfbb 1852} # ac_fn_c_try_cpp
bec39cab 1853
81ecdfbb
RW
1854# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1855# -------------------------------------------------------
1856# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1857# the include files in INCLUDES and setting the cache variable VAR
1858# accordingly.
1859ac_fn_c_check_header_mongrel ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1864$as_echo_n "checking for $2... " >&6; }
1865if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1866 $as_echo_n "(cached) " >&6
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
1871else
1872 # Is the header compilable?
1873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1874$as_echo_n "checking $2 usability... " >&6; }
1875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$4
1878#include <$2>
1879_ACEOF
1880if ac_fn_c_try_compile "$LINENO"; then :
1881 ac_header_compiler=yes
1882else
1883 ac_header_compiler=no
1884fi
1885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1887$as_echo "$ac_header_compiler" >&6; }
bec39cab 1888
81ecdfbb
RW
1889# Is the header present?
1890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1891$as_echo_n "checking $2 presence... " >&6; }
1892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_cpp "$LINENO"; then :
1897 ac_header_preproc=yes
1898else
1899 ac_header_preproc=no
1900fi
1901rm -f conftest.err conftest.$ac_ext
1902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1903$as_echo "$ac_header_preproc" >&6; }
bec39cab 1904
81ecdfbb
RW
1905# So? What about this header?
1906case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1907 yes:no: )
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1909$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1911$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1912 ;;
1913 no:yes:* )
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1915$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1917$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1919$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1921$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1923$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1924 ;;
1925esac
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1927$as_echo_n "checking for $2... " >&6; }
1928if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=\$ac_header_compiler"
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
1936fi
1937 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1938
81ecdfbb 1939} # ac_fn_c_check_header_mongrel
bec39cab 1940
81ecdfbb
RW
1941# ac_fn_c_try_run LINENO
1942# ----------------------
1943# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1944# that executables *can* be run.
1945ac_fn_c_try_run ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 if { { ac_try="$ac_link"
1949case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955 (eval "$ac_link") 2>&5
1956 ac_status=$?
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1959 { { case "(($ac_try" in
1960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961 *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965 (eval "$ac_try") 2>&5
1966 ac_status=$?
1967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968 test $ac_status = 0; }; }; then :
1969 ac_retval=0
1970else
1971 $as_echo "$as_me: program exited with status $ac_status" >&5
1972 $as_echo "$as_me: failed program was:" >&5
1973sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1974
81ecdfbb
RW
1975 ac_retval=$ac_status
1976fi
1977 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1978 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1979 return $ac_retval
bec39cab 1980
81ecdfbb 1981} # ac_fn_c_try_run
bec39cab 1982
81ecdfbb
RW
1983# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1984# -------------------------------------------------------
1985# Tests whether HEADER exists and can be compiled using the include files in
1986# INCLUDES, setting the cache variable VAR accordingly.
1987ac_fn_c_check_header_compile ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1991$as_echo_n "checking for $2... " >&6; }
1992if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1993 $as_echo_n "(cached) " >&6
1994else
1995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$4
1998#include <$2>
bec39cab 1999_ACEOF
81ecdfbb
RW
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 eval "$3=yes"
2002else
2003 eval "$3=no"
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007eval ac_res=\$$3
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009$as_echo "$ac_res" >&6; }
2010 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2011
81ecdfbb 2012} # ac_fn_c_check_header_compile
bec39cab 2013
81ecdfbb
RW
2014# ac_fn_c_try_link LINENO
2015# -----------------------
2016# Try to link conftest.$ac_ext, and return whether this succeeded.
2017ac_fn_c_try_link ()
b4e70030 2018{
81ecdfbb
RW
2019 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020 rm -f conftest.$ac_objext conftest$ac_exeext
2021 if { { ac_try="$ac_link"
2022case "(($ac_try" in
2023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024 *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028 (eval "$ac_link") 2>conftest.err
2029 ac_status=$?
2030 if test -s conftest.err; then
2031 grep -v '^ *+' conftest.err >conftest.er1
2032 cat conftest.er1 >&5
2033 mv -f conftest.er1 conftest.err
2034 fi
2035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036 test $ac_status = 0; } && {
2037 test -z "$ac_c_werror_flag" ||
2038 test ! -s conftest.err
2039 } && test -s conftest$ac_exeext && {
2040 test "$cross_compiling" = yes ||
2041 $as_test_x conftest$ac_exeext
2042 }; then :
2043 ac_retval=0
2044else
2045 $as_echo "$as_me: failed program was:" >&5
2046sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2047
81ecdfbb
RW
2048 ac_retval=1
2049fi
2050 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2051 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2052 # interfere with the next link command; also delete a directory that is
2053 # left behind by Apple's compiler. We do this before executing the actions.
2054 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2055 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2056 return $ac_retval
bec39cab 2057
81ecdfbb 2058} # ac_fn_c_try_link
bec39cab 2059
81ecdfbb
RW
2060# ac_fn_c_check_func LINENO FUNC VAR
2061# ----------------------------------
2062# Tests whether FUNC exists, setting the cache variable VAR accordingly
2063ac_fn_c_check_func ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2067$as_echo_n "checking for $2... " >&6; }
2068if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2069 $as_echo_n "(cached) " >&6
2070else
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2074 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2075#define $2 innocuous_$2
bec39cab 2076
81ecdfbb
RW
2077/* System header to define __stub macros and hopefully few prototypes,
2078 which can conflict with char $2 (); below.
2079 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2080 <limits.h> exists even on freestanding compilers. */
bec39cab 2081
81ecdfbb
RW
2082#ifdef __STDC__
2083# include <limits.h>
2084#else
2085# include <assert.h>
2086#endif
bec39cab 2087
81ecdfbb 2088#undef $2
bec39cab 2089
81ecdfbb
RW
2090/* Override any GCC internal prototype to avoid an error.
2091 Use char because int might match the return type of a GCC
2092 builtin and then its argument prototype would still apply. */
2093#ifdef __cplusplus
2094extern "C"
2095#endif
2096char $2 ();
2097/* The GNU C library defines this for functions which it implements
2098 to always fail with ENOSYS. Some functions are actually named
2099 something starting with __ and the normal name is an alias. */
2100#if defined __stub_$2 || defined __stub___$2
2101choke me
2102#endif
bec39cab 2103
81ecdfbb
RW
2104int
2105main ()
2106{
2107return $2 ();
2108 ;
2109 return 0;
2110}
bec39cab 2111_ACEOF
81ecdfbb
RW
2112if ac_fn_c_try_link "$LINENO"; then :
2113 eval "$3=yes"
2114else
2115 eval "$3=no"
2116fi
2117rm -f core conftest.err conftest.$ac_objext \
2118 conftest$ac_exeext conftest.$ac_ext
2119fi
2120eval ac_res=\$$3
2121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2122$as_echo "$ac_res" >&6; }
2123 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2124
81ecdfbb 2125} # ac_fn_c_check_func
bec39cab 2126
81ecdfbb
RW
2127# ac_fn_c_check_decl LINENO SYMBOL VAR
2128# ------------------------------------
2129# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2130ac_fn_c_check_decl ()
2131{
2132 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2133 as_decl_name=`echo $2|sed 's/ *(.*//'`
2134 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2136$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2137if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2138 $as_echo_n "(cached) " >&6
2139else
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h. */
2142$4
2143int
2144main ()
2145{
e7a30f46
DE
2146#ifndef $as_decl_name
2147#ifdef __cplusplus
2148 (void) $as_decl_use;
2149#else
2150 (void) $as_decl_name;
2151#endif
81ecdfbb 2152#endif
bec39cab 2153
81ecdfbb
RW
2154 ;
2155 return 0;
2156}
bec39cab 2157_ACEOF
81ecdfbb
RW
2158if ac_fn_c_try_compile "$LINENO"; then :
2159 eval "$3=yes"
2160else
2161 eval "$3=no"
2162fi
2163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164fi
2165eval ac_res=\$$3
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2167$as_echo "$ac_res" >&6; }
2168 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2169
81ecdfbb 2170} # ac_fn_c_check_decl
bec39cab 2171
81ecdfbb
RW
2172# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2173# --------------------------------------------
2174# Tries to find the compile-time value of EXPR in a program that includes
2175# INCLUDES, setting VAR accordingly. Returns whether the value could be
2176# computed
2177ac_fn_c_compute_int ()
2178{
2179 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180 if test "$cross_compiling" = yes; then
2181 # Depending upon the size, compute the lo and hi bounds.
2182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184$4
2185int
2186main ()
2187{
2188static int test_array [1 - 2 * !(($2) >= 0)];
2189test_array [0] = 0
bec39cab 2190
81ecdfbb
RW
2191 ;
2192 return 0;
2193}
2194_ACEOF
2195if ac_fn_c_try_compile "$LINENO"; then :
2196 ac_lo=0 ac_mid=0
2197 while :; do
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201int
2202main ()
2203{
2204static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2205test_array [0] = 0
bec39cab 2206
81ecdfbb
RW
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 ac_hi=$ac_mid; break
2213else
2214 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2215 if test $ac_lo -le $ac_mid; then
2216 ac_lo= ac_hi=
2217 break
2218 fi
2219 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2220fi
81ecdfbb
RW
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222 done
c906108c 2223else
81ecdfbb
RW
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$4
2227int
2228main ()
2229{
2230static int test_array [1 - 2 * !(($2) < 0)];
2231test_array [0] = 0
bec39cab 2232
81ecdfbb
RW
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_compile "$LINENO"; then :
2238 ac_hi=-1 ac_mid=-1
2239 while :; do
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2247test_array [0] = 0
bec39cab 2248
81ecdfbb
RW
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253if ac_fn_c_try_compile "$LINENO"; then :
2254 ac_lo=$ac_mid; break
2255else
2256 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2257 if test $ac_mid -le $ac_hi; then
2258 ac_lo= ac_hi=
2259 break
2260 fi
2261 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264 done
2265else
2266 ac_lo= ac_hi=
2267fi
2268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271# Binary search between lo and hi bounds.
2272while test "x$ac_lo" != "x$ac_hi"; do
2273 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2281test_array [0] = 0
bec39cab 2282
81ecdfbb
RW
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288 ac_hi=$ac_mid
2289else
2290 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293done
2294case $ac_lo in #((
2295?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2296'') ac_retval=1 ;;
2297esac
2298 else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$4
2302static long int longval () { return $2; }
2303static unsigned long int ulongval () { return $2; }
2304#include <stdio.h>
2305#include <stdlib.h>
2306int
2307main ()
2308{
bec39cab 2309
81ecdfbb
RW
2310 FILE *f = fopen ("conftest.val", "w");
2311 if (! f)
2312 return 1;
2313 if (($2) < 0)
2314 {
2315 long int i = longval ();
2316 if (i != ($2))
2317 return 1;
2318 fprintf (f, "%ld", i);
2319 }
2320 else
2321 {
2322 unsigned long int i = ulongval ();
2323 if (i != ($2))
2324 return 1;
2325 fprintf (f, "%lu", i);
2326 }
2327 /* Do not output a trailing newline, as this causes \r\n confusion
2328 on some platforms. */
2329 return ferror (f) || fclose (f) != 0;
bec39cab 2330
81ecdfbb
RW
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_run "$LINENO"; then :
2336 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2337else
2338 ac_retval=1
2339fi
2340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2341 conftest.$ac_objext conftest.beam conftest.$ac_ext
2342rm -f conftest.val
bec39cab 2343
81ecdfbb
RW
2344 fi
2345 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2346 return $ac_retval
bec39cab 2347
81ecdfbb 2348} # ac_fn_c_compute_int
bec39cab 2349
81ecdfbb
RW
2350# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2351# ----------------------------------------------------
2352# Tries to find if the field MEMBER exists in type AGGR, after including
2353# INCLUDES, setting cache variable VAR accordingly.
2354ac_fn_c_check_member ()
2355{
2356 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2358$as_echo_n "checking for $2.$3... " >&6; }
2359if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2360 $as_echo_n "(cached) " >&6
2361else
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h. */
2364$5
2365int
2366main ()
2367{
2368static $2 ac_aggr;
2369if (ac_aggr.$3)
2370return 0;
2371 ;
2372 return 0;
2373}
2374_ACEOF
2375if ac_fn_c_try_compile "$LINENO"; then :
2376 eval "$4=yes"
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (sizeof ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 eval "$4=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400eval ac_res=\$$4
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402$as_echo "$ac_res" >&6; }
2403 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2404
81ecdfbb 2405} # ac_fn_c_check_member
bec39cab 2406
81ecdfbb
RW
2407# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2408# -------------------------------------------
2409# Tests whether TYPE exists after having included INCLUDES, setting cache
2410# variable VAR accordingly.
2411ac_fn_c_check_type ()
2412{
2413 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2415$as_echo_n "checking for $2... " >&6; }
2416if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2417 $as_echo_n "(cached) " >&6
2418else
2419 eval "$3=no"
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$4
2423int
2424main ()
2425{
2426if (sizeof ($2))
2427 return 0;
2428 ;
2429 return 0;
2430}
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$4
2436int
2437main ()
2438{
2439if (sizeof (($2)))
2440 return 0;
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2446
81ecdfbb
RW
2447else
2448 eval "$3=yes"
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453fi
2454eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456$as_echo "$ac_res" >&6; }
2457 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2458
81ecdfbb
RW
2459} # ac_fn_c_check_type
2460cat >config.log <<_ACEOF
2461This file contains any messages produced by compilers while
2462running configure, to aid debugging if configure makes a mistake.
d5af19ba 2463
81ecdfbb
RW
2464It was created by $as_me, which was
2465generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2466
81ecdfbb 2467 $ $0 $@
413ccac7 2468
81ecdfbb
RW
2469_ACEOF
2470exec 5>>config.log
2471{
2472cat <<_ASUNAME
2473## --------- ##
2474## Platform. ##
2475## --------- ##
413ccac7 2476
81ecdfbb
RW
2477hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2478uname -m = `(uname -m) 2>/dev/null || echo unknown`
2479uname -r = `(uname -r) 2>/dev/null || echo unknown`
2480uname -s = `(uname -s) 2>/dev/null || echo unknown`
2481uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2482
81ecdfbb
RW
2483/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2484/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2485
81ecdfbb
RW
2486/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2487/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2488/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2489/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2490/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2491/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2492/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2493
81ecdfbb 2494_ASUNAME
bec39cab 2495
bec39cab
AC
2496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2497for as_dir in $PATH
2498do
2499 IFS=$as_save_IFS
2500 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2501 $as_echo "PATH: $as_dir"
2502 done
2503IFS=$as_save_IFS
bec39cab 2504
81ecdfbb 2505} >&5
bec39cab 2506
81ecdfbb 2507cat >&5 <<_ACEOF
bec39cab 2508
bec39cab 2509
81ecdfbb
RW
2510## ----------- ##
2511## Core tests. ##
2512## ----------- ##
2513
2514_ACEOF
2515
2516
2517# Keep a trace of the command line.
2518# Strip out --no-create and --no-recursion so they do not pile up.
2519# Strip out --silent because we don't want to record it for future runs.
2520# Also quote any args containing shell meta-characters.
2521# Make two passes to allow for proper duplicate-argument suppression.
2522ac_configure_args=
2523ac_configure_args0=
2524ac_configure_args1=
2525ac_must_keep_next=false
2526for ac_pass in 1 2
2527do
2528 for ac_arg
2529 do
2530 case $ac_arg in
2531 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2533 | -silent | --silent | --silen | --sile | --sil)
2534 continue ;;
2535 *\'*)
2536 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2537 esac
2538 case $ac_pass in
2539 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2540 2)
2541 as_fn_append ac_configure_args1 " '$ac_arg'"
2542 if test $ac_must_keep_next = true; then
2543 ac_must_keep_next=false # Got value, back to normal.
2544 else
2545 case $ac_arg in
2546 *=* | --config-cache | -C | -disable-* | --disable-* \
2547 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2548 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2549 | -with-* | --with-* | -without-* | --without-* | --x)
2550 case "$ac_configure_args0 " in
2551 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2552 esac
2553 ;;
2554 -* ) ac_must_keep_next=true ;;
2555 esac
2556 fi
2557 as_fn_append ac_configure_args " '$ac_arg'"
2558 ;;
2559 esac
2560 done
2561done
2562{ ac_configure_args0=; unset ac_configure_args0;}
2563{ ac_configure_args1=; unset ac_configure_args1;}
2564
2565# When interrupted or exit'd, cleanup temporary files, and complete
2566# config.log. We remove comments because anyway the quotes in there
2567# would cause problems or look ugly.
2568# WARNING: Use '\'' to represent an apostrophe within the trap.
2569# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2570trap 'exit_status=$?
2571 # Save into config.log some information that might help in debugging.
2572 {
2573 echo
2574
2575 cat <<\_ASBOX
2576## ---------------- ##
2577## Cache variables. ##
2578## ---------------- ##
2579_ASBOX
2580 echo
2581 # The following way of writing the cache mishandles newlines in values,
2582(
2583 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2584 eval ac_val=\$$ac_var
2585 case $ac_val in #(
2586 *${as_nl}*)
2587 case $ac_var in #(
2588 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2589$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2590 esac
2591 case $ac_var in #(
2592 _ | IFS | as_nl) ;; #(
2593 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2594 *) { eval $ac_var=; unset $ac_var;} ;;
2595 esac ;;
2596 esac
2597 done
2598 (set) 2>&1 |
2599 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2600 *${as_nl}ac_space=\ *)
2601 sed -n \
2602 "s/'\''/'\''\\\\'\'''\''/g;
2603 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2604 ;; #(
2605 *)
2606 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2607 ;;
2608 esac |
2609 sort
2610)
2611 echo
2612
2613 cat <<\_ASBOX
2614## ----------------- ##
2615## Output variables. ##
2616## ----------------- ##
2617_ASBOX
2618 echo
2619 for ac_var in $ac_subst_vars
2620 do
2621 eval ac_val=\$$ac_var
2622 case $ac_val in
2623 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2624 esac
2625 $as_echo "$ac_var='\''$ac_val'\''"
2626 done | sort
2627 echo
2628
2629 if test -n "$ac_subst_files"; then
2630 cat <<\_ASBOX
2631## ------------------- ##
2632## File substitutions. ##
2633## ------------------- ##
2634_ASBOX
2635 echo
2636 for ac_var in $ac_subst_files
2637 do
2638 eval ac_val=\$$ac_var
2639 case $ac_val in
2640 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2641 esac
2642 $as_echo "$ac_var='\''$ac_val'\''"
2643 done | sort
2644 echo
2645 fi
2646
2647 if test -s confdefs.h; then
2648 cat <<\_ASBOX
2649## ----------- ##
2650## confdefs.h. ##
2651## ----------- ##
2652_ASBOX
2653 echo
2654 cat confdefs.h
2655 echo
2656 fi
2657 test "$ac_signal" != 0 &&
2658 $as_echo "$as_me: caught signal $ac_signal"
2659 $as_echo "$as_me: exit $exit_status"
2660 } >&5
2661 rm -f core *.core core.conftest.* &&
2662 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2663 exit $exit_status
2664' 0
2665for ac_signal in 1 2 13 15; do
2666 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2667done
2668ac_signal=0
2669
2670# confdefs.h avoids OS command line length limits that DEFS can exceed.
2671rm -f -r conftest* confdefs.h
2672
2673$as_echo "/* confdefs.h */" > confdefs.h
2674
2675# Predefined preprocessor variables.
2676
2677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_NAME "$PACKAGE_NAME"
2679_ACEOF
2680
2681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2683_ACEOF
2684
2685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_VERSION "$PACKAGE_VERSION"
2687_ACEOF
2688
2689cat >>confdefs.h <<_ACEOF
2690#define PACKAGE_STRING "$PACKAGE_STRING"
2691_ACEOF
2692
2693cat >>confdefs.h <<_ACEOF
2694#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2695_ACEOF
2696
2697cat >>confdefs.h <<_ACEOF
2698#define PACKAGE_URL "$PACKAGE_URL"
2699_ACEOF
2700
2701
2702# Let the site file select an alternate cache file if it wants to.
2703# Prefer an explicitly selected file to automatically selected ones.
2704ac_site_file1=NONE
2705ac_site_file2=NONE
2706if test -n "$CONFIG_SITE"; then
2707 ac_site_file1=$CONFIG_SITE
2708elif test "x$prefix" != xNONE; then
2709 ac_site_file1=$prefix/share/config.site
2710 ac_site_file2=$prefix/etc/config.site
2711else
2712 ac_site_file1=$ac_default_prefix/share/config.site
2713 ac_site_file2=$ac_default_prefix/etc/config.site
2714fi
2715for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2716do
2717 test "x$ac_site_file" = xNONE && continue
2718 if test -r "$ac_site_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2720$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2721 sed 's/^/| /' "$ac_site_file" >&5
2722 . "$ac_site_file"
2723 fi
2724done
2725
2726if test -r "$cache_file"; then
2727 # Some versions of bash will fail to source /dev/null (special
2728 # files actually), so we avoid doing that.
2729 if test -f "$cache_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2731$as_echo "$as_me: loading cache $cache_file" >&6;}
2732 case $cache_file in
2733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2734 *) . "./$cache_file";;
2735 esac
2736 fi
2737else
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2739$as_echo "$as_me: creating cache $cache_file" >&6;}
2740 >$cache_file
bec39cab
AC
2741fi
2742
f434ba03
PA
2743gl_header_list="$gl_header_list sys/mman.h"
2744gl_func_list="$gl_func_list mprotect"
2745gl_func_list="$gl_func_list memchr"
2746gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2747gl_header_list="$gl_header_list stdint.h"
2748gl_header_list="$gl_header_list wchar.h"
2749gl_header_list="$gl_header_list string.h"
2750# Check that the precious variables saved in the cache have kept the same
2751# value.
2752ac_cache_corrupted=false
2753for ac_var in $ac_precious_vars; do
2754 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2755 eval ac_new_set=\$ac_env_${ac_var}_set
2756 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2757 eval ac_new_val=\$ac_env_${ac_var}_value
2758 case $ac_old_set,$ac_new_set in
2759 set,)
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2761$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2762 ac_cache_corrupted=: ;;
2763 ,set)
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2765$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2766 ac_cache_corrupted=: ;;
2767 ,);;
2768 *)
2769 if test "x$ac_old_val" != "x$ac_new_val"; then
2770 # differences in whitespace do not lead to failure.
2771 ac_old_val_w=`echo x $ac_old_val`
2772 ac_new_val_w=`echo x $ac_new_val`
2773 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2775$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2776 ac_cache_corrupted=:
2777 else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2779$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2780 eval $ac_var=\$ac_old_val
2781 fi
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2783$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2785$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2786 fi;;
2787 esac
2788 # Pass precious variables to config.status.
2789 if test "$ac_new_set" = set; then
2790 case $ac_new_val in
2791 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2792 *) ac_arg=$ac_var=$ac_new_val ;;
2793 esac
2794 case " $ac_configure_args " in
2795 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2796 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2797 esac
2798 fi
2799done
2800if $ac_cache_corrupted; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2804$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2805 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2806fi
2807## -------------------- ##
2808## Main body of script. ##
2809## -------------------- ##
2810
2811ac_ext=c
2812ac_cpp='$CPP $CPPFLAGS'
2813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2815ac_compiler_gnu=$ac_cv_c_compiler_gnu
2816
2817
2818
2819
2820
2821ac_config_headers="$ac_config_headers config.h:config.in"
2822
2823
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2825$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2826 # Check whether --enable-maintainer-mode was given.
2827if test "${enable_maintainer_mode+set}" = set; then :
2828 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2829else
2830 USE_MAINTAINER_MODE=no
2831fi
2832
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2834$as_echo "$USE_MAINTAINER_MODE" >&6; }
2835 if test $USE_MAINTAINER_MODE = yes; then
2836 MAINTAINER_MODE_TRUE=
2837 MAINTAINER_MODE_FALSE='#'
2838else
2839 MAINTAINER_MODE_TRUE='#'
2840 MAINTAINER_MODE_FALSE=
2841fi
2842
2843 MAINT=$MAINTAINER_MODE_TRUE
2844
2845
2846
2847ac_ext=c
2848ac_cpp='$CPP $CPPFLAGS'
2849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2851ac_compiler_gnu=$ac_cv_c_compiler_gnu
2852if test -n "$ac_tool_prefix"; then
2853 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2854set dummy ${ac_tool_prefix}gcc; ac_word=$2
2855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2856$as_echo_n "checking for $ac_word... " >&6; }
2857if test "${ac_cv_prog_CC+set}" = set; then :
2858 $as_echo_n "(cached) " >&6
c906108c
SS
2859else
2860 if test -n "$CC"; then
2861 ac_cv_prog_CC="$CC" # Let the user override the test.
2862else
bec39cab
AC
2863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864for as_dir in $PATH
2865do
2866 IFS=$as_save_IFS
2867 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2868 for ac_exec_ext in '' $ac_executable_extensions; do
2869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2870 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2872 break 2
2873 fi
2874done
81ecdfbb
RW
2875 done
2876IFS=$as_save_IFS
bec39cab 2877
c906108c
SS
2878fi
2879fi
bec39cab 2880CC=$ac_cv_prog_CC
c906108c 2881if test -n "$CC"; then
81ecdfbb
RW
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2883$as_echo "$CC" >&6; }
c906108c 2884else
81ecdfbb
RW
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2886$as_echo "no" >&6; }
c906108c
SS
2887fi
2888
81ecdfbb 2889
b4e70030
JB
2890fi
2891if test -z "$ac_cv_prog_CC"; then
2892 ac_ct_CC=$CC
81ecdfbb
RW
2893 # Extract the first word of "gcc", so it can be a program name with args.
2894set dummy gcc; ac_word=$2
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2896$as_echo_n "checking for $ac_word... " >&6; }
2897if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2898 $as_echo_n "(cached) " >&6
b4e70030
JB
2899else
2900 if test -n "$ac_ct_CC"; then
2901 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2902else
2903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2904for as_dir in $PATH
2905do
2906 IFS=$as_save_IFS
2907 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2908 for ac_exec_ext in '' $ac_executable_extensions; do
2909 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2910 ac_cv_prog_ac_ct_CC="gcc"
2911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2912 break 2
4e8d927d 2913 fi
b4e70030 2914done
81ecdfbb
RW
2915 done
2916IFS=$as_save_IFS
b4e70030
JB
2917
2918fi
2919fi
2920ac_ct_CC=$ac_cv_prog_ac_ct_CC
2921if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2923$as_echo "$ac_ct_CC" >&6; }
b4e70030 2924else
81ecdfbb
RW
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2926$as_echo "no" >&6; }
b4e70030
JB
2927fi
2928
81ecdfbb
RW
2929 if test "x$ac_ct_CC" = x; then
2930 CC=""
2931 else
2932 case $cross_compiling:$ac_tool_warned in
2933yes:)
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2936ac_tool_warned=yes ;;
2937esac
2938 CC=$ac_ct_CC
2939 fi
b4e70030
JB
2940else
2941 CC="$ac_cv_prog_CC"
2942fi
2943
c906108c 2944if test -z "$CC"; then
81ecdfbb
RW
2945 if test -n "$ac_tool_prefix"; then
2946 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2947set dummy ${ac_tool_prefix}cc; ac_word=$2
2948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2949$as_echo_n "checking for $ac_word... " >&6; }
2950if test "${ac_cv_prog_CC+set}" = set; then :
2951 $as_echo_n "(cached) " >&6
c906108c
SS
2952else
2953 if test -n "$CC"; then
2954 ac_cv_prog_CC="$CC" # Let the user override the test.
2955else
bec39cab
AC
2956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2957for as_dir in $PATH
2958do
2959 IFS=$as_save_IFS
2960 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2961 for ac_exec_ext in '' $ac_executable_extensions; do
2962 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2963 ac_cv_prog_CC="${ac_tool_prefix}cc"
2964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2965 break 2
2966 fi
2967done
81ecdfbb
RW
2968 done
2969IFS=$as_save_IFS
2970
2971fi
2972fi
2973CC=$ac_cv_prog_CC
2974if test -n "$CC"; then
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2976$as_echo "$CC" >&6; }
2977else
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
2980fi
2981
2982
2983 fi
2984fi
2985if test -z "$CC"; then
2986 # Extract the first word of "cc", so it can be a program name with args.
2987set dummy cc; ac_word=$2
2988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2989$as_echo_n "checking for $ac_word... " >&6; }
2990if test "${ac_cv_prog_CC+set}" = set; then :
2991 $as_echo_n "(cached) " >&6
2992else
2993 if test -n "$CC"; then
2994 ac_cv_prog_CC="$CC" # Let the user override the test.
2995else
2996 ac_prog_rejected=no
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3004 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3005 ac_prog_rejected=yes
3006 continue
3007 fi
3008 ac_cv_prog_CC="cc"
3009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3010 break 2
3011 fi
3012done
3013 done
3014IFS=$as_save_IFS
bec39cab 3015
c906108c
SS
3016if test $ac_prog_rejected = yes; then
3017 # We found a bogon in the path, so make sure we never use it.
3018 set dummy $ac_cv_prog_CC
3019 shift
bec39cab 3020 if test $# != 0; then
c906108c
SS
3021 # We chose a different compiler from the bogus one.
3022 # However, it has the same basename, so the bogon will be chosen
3023 # first if we set CC to just the basename; use the full file name.
3024 shift
bec39cab 3025 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3026 fi
3027fi
3028fi
3029fi
bec39cab 3030CC=$ac_cv_prog_CC
c906108c 3031if test -n "$CC"; then
81ecdfbb
RW
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3033$as_echo "$CC" >&6; }
c906108c 3034else
81ecdfbb
RW
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3036$as_echo "no" >&6; }
c906108c
SS
3037fi
3038
81ecdfbb 3039
bec39cab
AC
3040fi
3041if test -z "$CC"; then
3042 if test -n "$ac_tool_prefix"; then
81ecdfbb 3043 for ac_prog in cl.exe
bec39cab
AC
3044 do
3045 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3048$as_echo_n "checking for $ac_word... " >&6; }
3049if test "${ac_cv_prog_CC+set}" = set; then :
3050 $as_echo_n "(cached) " >&6
c906108c
SS
3051else
3052 if test -n "$CC"; then
3053 ac_cv_prog_CC="$CC" # Let the user override the test.
3054else
bec39cab
AC
3055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3056for as_dir in $PATH
3057do
3058 IFS=$as_save_IFS
3059 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3060 for ac_exec_ext in '' $ac_executable_extensions; do
3061 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3062 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3064 break 2
3065 fi
3066done
81ecdfbb
RW
3067 done
3068IFS=$as_save_IFS
bec39cab 3069
c906108c
SS
3070fi
3071fi
bec39cab 3072CC=$ac_cv_prog_CC
c906108c 3073if test -n "$CC"; then
81ecdfbb
RW
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3075$as_echo "$CC" >&6; }
c906108c 3076else
81ecdfbb
RW
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
c906108c 3079fi
bec39cab 3080
81ecdfbb 3081
bec39cab
AC
3082 test -n "$CC" && break
3083 done
3084fi
3085if test -z "$CC"; then
3086 ac_ct_CC=$CC
81ecdfbb 3087 for ac_prog in cl.exe
bec39cab
AC
3088do
3089 # Extract the first word of "$ac_prog", so it can be a program name with args.
3090set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3092$as_echo_n "checking for $ac_word... " >&6; }
3093if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3094 $as_echo_n "(cached) " >&6
bec39cab
AC
3095else
3096 if test -n "$ac_ct_CC"; then
3097 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3098else
3099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100for as_dir in $PATH
3101do
3102 IFS=$as_save_IFS
3103 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3104 for ac_exec_ext in '' $ac_executable_extensions; do
3105 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3106 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3108 break 2
c906108c 3109 fi
bec39cab 3110done
81ecdfbb
RW
3111 done
3112IFS=$as_save_IFS
bec39cab
AC
3113
3114fi
3115fi
3116ac_ct_CC=$ac_cv_prog_ac_ct_CC
3117if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3119$as_echo "$ac_ct_CC" >&6; }
bec39cab 3120else
81ecdfbb
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
c906108c
SS
3123fi
3124
81ecdfbb 3125
bec39cab
AC
3126 test -n "$ac_ct_CC" && break
3127done
c906108c 3128
81ecdfbb
RW
3129 if test "x$ac_ct_CC" = x; then
3130 CC=""
3131 else
3132 case $cross_compiling:$ac_tool_warned in
3133yes:)
3134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3136ac_tool_warned=yes ;;
3137esac
3138 CC=$ac_ct_CC
3139 fi
bec39cab
AC
3140fi
3141
3142fi
3143
3144
81ecdfbb
RW
3145test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3147as_fn_error "no acceptable C compiler found in \$PATH
3148See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3149
3150# Provide some information about the compiler.
81ecdfbb
RW
3151$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3152set X $ac_compile
3153ac_compiler=$2
3154for ac_option in --version -v -V -qversion; do
3155 { { ac_try="$ac_compiler $ac_option >&5"
3156case "(($ac_try" in
3157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3158 *) ac_try_echo=$ac_try;;
3159esac
3160eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3161$as_echo "$ac_try_echo"; } >&5
3162 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3163 ac_status=$?
81ecdfbb
RW
3164 if test -s conftest.err; then
3165 sed '10a\
3166... rest of stderr output deleted ...
3167 10q' conftest.err >conftest.er1
3168 cat conftest.er1 >&5
3169 rm -f conftest.er1 conftest.err
3170 fi
3171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3172 test $ac_status = 0; }
3173done
bec39cab 3174
81ecdfbb 3175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3176/* end confdefs.h. */
3177
3178int
3179main ()
3180{
3181
3182 ;
3183 return 0;
3184}
3185_ACEOF
3186ac_clean_files_save=$ac_clean_files
81ecdfbb 3187ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3188# Try to create an executable without -o first, disregard a.out.
3189# It will help us diagnose broken compilers, and finding out an intuition
3190# of exeext.
81ecdfbb
RW
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3192$as_echo_n "checking for C compiler default output file name... " >&6; }
3193ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3194
3195# The possible output files:
3196ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3197
3198ac_rmfiles=
3199for ac_file in $ac_files
3200do
3201 case $ac_file in
3202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3203 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3204 esac
3205done
3206rm -f $ac_rmfiles
3207
3208if { { ac_try="$ac_link_default"
3209case "(($ac_try" in
3210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3211 *) ac_try_echo=$ac_try;;
3212esac
3213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3214$as_echo "$ac_try_echo"; } >&5
3215 (eval "$ac_link_default") 2>&5
3216 ac_status=$?
3217 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3218 test $ac_status = 0; }; then :
3219 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3220# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3221# in a Makefile. We should not override ac_cv_exeext if it was cached,
3222# so that the user can short-circuit this test for compilers unknown to
3223# Autoconf.
3224for ac_file in $ac_files ''
bec39cab
AC
3225do
3226 test -f "$ac_file" || continue
3227 case $ac_file in
81ecdfbb 3228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3229 ;;
3230 [ab].out )
3231 # We found the default executable, but exeext='' is most
3232 # certainly right.
3233 break;;
3234 *.* )
81ecdfbb
RW
3235 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3236 then :; else
3237 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3238 fi
3239 # We set ac_cv_exeext here because the later test for it is not
3240 # safe: cross compilers may not add the suffix if given an `-o'
3241 # argument, so we may need to know it at that point already.
3242 # Even if this section looks crufty: it has the advantage of
3243 # actually working.
b4e70030
JB
3244 break;;
3245 * )
3246 break;;
bec39cab
AC
3247 esac
3248done
81ecdfbb
RW
3249test "$ac_cv_exeext" = no && ac_cv_exeext=
3250
bec39cab 3251else
81ecdfbb
RW
3252 ac_file=''
3253fi
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3255$as_echo "$ac_file" >&6; }
3256if test -z "$ac_file"; then :
3257 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3258sed 's/^/| /' conftest.$ac_ext >&5
3259
81ecdfbb
RW
3260{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3262{ as_fn_set_status 77
3263as_fn_error "C compiler cannot create executables
3264See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3265fi
b4e70030 3266ac_exeext=$ac_cv_exeext
b4e70030 3267
81ecdfbb 3268# Check that the compiler produces executables we can run. If not, either
bec39cab 3269# the compiler is broken, or we cross compile.
81ecdfbb
RW
3270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3271$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3272# If not cross compiling, check that we can run a simple program.
3273if test "$cross_compiling" != yes; then
3274 if { ac_try='./$ac_file'
81ecdfbb
RW
3275 { { case "(($ac_try" in
3276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277 *) ac_try_echo=$ac_try;;
3278esac
3279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280$as_echo "$ac_try_echo"; } >&5
3281 (eval "$ac_try") 2>&5
bec39cab 3282 ac_status=$?
81ecdfbb
RW
3283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3284 test $ac_status = 0; }; }; then
bec39cab 3285 cross_compiling=no
c906108c 3286 else
bec39cab
AC
3287 if test "$cross_compiling" = maybe; then
3288 cross_compiling=yes
3289 else
81ecdfbb
RW
3290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3292as_fn_error "cannot run C compiled programs.
bec39cab 3293If you meant to cross compile, use \`--host'.
81ecdfbb 3294See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3295 fi
c906108c 3296 fi
bec39cab 3297fi
81ecdfbb
RW
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3299$as_echo "yes" >&6; }
bec39cab 3300
81ecdfbb 3301rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3302ac_clean_files=$ac_clean_files_save
81ecdfbb 3303# Check that the compiler produces executables we can run. If not, either
b4e70030 3304# the compiler is broken, or we cross compile.
81ecdfbb
RW
3305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3306$as_echo_n "checking whether we are cross compiling... " >&6; }
3307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3308$as_echo "$cross_compiling" >&6; }
3309
3310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3311$as_echo_n "checking for suffix of executables... " >&6; }
3312if { { ac_try="$ac_link"
3313case "(($ac_try" in
3314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3315 *) ac_try_echo=$ac_try;;
3316esac
3317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3318$as_echo "$ac_try_echo"; } >&5
3319 (eval "$ac_link") 2>&5
bec39cab 3320 ac_status=$?
81ecdfbb
RW
3321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3322 test $ac_status = 0; }; then :
b4e70030
JB
3323 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3324# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3325# work properly (i.e., refer to `conftest.exe'), while it won't with
3326# `rm'.
3327for ac_file in conftest.exe conftest conftest.*; do
3328 test -f "$ac_file" || continue
3329 case $ac_file in
81ecdfbb 3330 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3331 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3332 break;;
3333 * ) break;;
3334 esac
3335done
c906108c 3336else
81ecdfbb
RW
3337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error "cannot compute suffix of executables: cannot compile and link
3340See \`config.log' for more details." "$LINENO" 5; }
c906108c 3341fi
b4e70030 3342rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3344$as_echo "$ac_cv_exeext" >&6; }
c906108c 3345
b4e70030 3346rm -f conftest.$ac_ext
bec39cab
AC
3347EXEEXT=$ac_cv_exeext
3348ac_exeext=$EXEEXT
81ecdfbb
RW
3349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3350$as_echo_n "checking for suffix of object files... " >&6; }
3351if test "${ac_cv_objext+set}" = set; then :
3352 $as_echo_n "(cached) " >&6
bec39cab 3353else
81ecdfbb 3354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3355/* end confdefs.h. */
3356
3357int
3358main ()
3359{
3360
3361 ;
3362 return 0;
3363}
3364_ACEOF
3365rm -f conftest.o conftest.obj
81ecdfbb
RW
3366if { { ac_try="$ac_compile"
3367case "(($ac_try" in
3368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3369 *) ac_try_echo=$ac_try;;
3370esac
3371eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3372$as_echo "$ac_try_echo"; } >&5
3373 (eval "$ac_compile") 2>&5
3374 ac_status=$?
3375 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3376 test $ac_status = 0; }; then :
3377 for ac_file in conftest.o conftest.obj conftest.*; do
3378 test -f "$ac_file" || continue;
bec39cab 3379 case $ac_file in
81ecdfbb 3380 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3381 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3382 break;;
3383 esac
3384done
c906108c 3385else
81ecdfbb 3386 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3387sed 's/^/| /' conftest.$ac_ext >&5
3388
81ecdfbb
RW
3389{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3391as_fn_error "cannot compute suffix of object files: cannot compile
3392See \`config.log' for more details." "$LINENO" 5; }
c906108c 3393fi
b4e70030 3394rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3395fi
81ecdfbb
RW
3396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3397$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3398OBJEXT=$ac_cv_objext
3399ac_objext=$OBJEXT
81ecdfbb
RW
3400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3401$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3402if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3403 $as_echo_n "(cached) " >&6
c906108c 3404else
81ecdfbb 3405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3406/* end confdefs.h. */
3407
3408int
3409main ()
3410{
3411#ifndef __GNUC__
3412 choke me
3413#endif
3414
3415 ;
3416 return 0;
3417}
3418_ACEOF
81ecdfbb 3419if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3420 ac_compiler_gnu=yes
3421else
81ecdfbb 3422 ac_compiler_gnu=no
bec39cab 3423fi
81ecdfbb 3424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3425ac_cv_c_compiler_gnu=$ac_compiler_gnu
3426
3427fi
81ecdfbb
RW
3428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3429$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3430if test $ac_compiler_gnu = yes; then
3431 GCC=yes
3432else
3433 GCC=
3434fi
bec39cab
AC
3435ac_test_CFLAGS=${CFLAGS+set}
3436ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3438$as_echo_n "checking whether $CC accepts -g... " >&6; }
3439if test "${ac_cv_prog_cc_g+set}" = set; then :
3440 $as_echo_n "(cached) " >&6
bec39cab 3441else
81ecdfbb
RW
3442 ac_save_c_werror_flag=$ac_c_werror_flag
3443 ac_c_werror_flag=yes
3444 ac_cv_prog_cc_g=no
3445 CFLAGS="-g"
3446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3447/* end confdefs.h. */
3448
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
81ecdfbb 3457if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3458 ac_cv_prog_cc_g=yes
3459else
81ecdfbb
RW
3460 CFLAGS=""
3461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3462/* end confdefs.h. */
3463
3464int
3465main ()
3466{
3467
3468 ;
3469 return 0;
3470}
3471_ACEOF
3472if ac_fn_c_try_compile "$LINENO"; then :
3473
3474else
3475 ac_c_werror_flag=$ac_save_c_werror_flag
3476 CFLAGS="-g"
3477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3478/* end confdefs.h. */
3479
3480int
3481main ()
3482{
c906108c 3483
81ecdfbb
RW
3484 ;
3485 return 0;
3486}
3487_ACEOF
3488if ac_fn_c_try_compile "$LINENO"; then :
3489 ac_cv_prog_cc_g=yes
3490fi
3491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3492fi
3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3494fi
81ecdfbb
RW
3495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3496 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3497fi
81ecdfbb
RW
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3499$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3500if test "$ac_test_CFLAGS" = set; then
bec39cab 3501 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3502elif test $ac_cv_prog_cc_g = yes; then
3503 if test "$GCC" = yes; then
3504 CFLAGS="-g -O2"
3505 else
3506 CFLAGS="-g"
3507 fi
3508else
3509 if test "$GCC" = yes; then
3510 CFLAGS="-O2"
3511 else
3512 CFLAGS=
3513 fi
3514fi
81ecdfbb
RW
3515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3516$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3517if test "${ac_cv_prog_cc_c89+set}" = set; then :
3518 $as_echo_n "(cached) " >&6
bec39cab 3519else
81ecdfbb 3520 ac_cv_prog_cc_c89=no
bec39cab 3521ac_save_CC=$CC
81ecdfbb 3522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3523/* end confdefs.h. */
c906108c
SS
3524#include <stdarg.h>
3525#include <stdio.h>
3526#include <sys/types.h>
3527#include <sys/stat.h>
3528/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3529struct buf { int x; };
3530FILE * (*rcsopen) (struct buf *, struct stat *, int);
3531static char *e (p, i)
3532 char **p;
3533 int i;
3534{
3535 return p[i];
3536}
3537static char *f (char * (*g) (char **, int), char **p, ...)
3538{
3539 char *s;
3540 va_list v;
3541 va_start (v,p);
3542 s = g (p, va_arg (v,int));
3543 va_end (v);
3544 return s;
3545}
bec39cab
AC
3546
3547/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3548 function prototypes and stuff, but not '\xHH' hex character constants.
3549 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3550 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3551 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3552 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3553 that's true only with -std. */
bec39cab
AC
3554int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3555
81ecdfbb
RW
3556/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3557 inside strings and character constants. */
3558#define FOO(x) 'x'
3559int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3560
c906108c
SS
3561int test (int i, double x);
3562struct s1 {int (*f) (int a);};
3563struct s2 {int (*f) (double a);};
3564int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3565int argc;
3566char **argv;
bec39cab
AC
3567int
3568main ()
3569{
c906108c 3570return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3571 ;
3572 return 0;
3573}
3574_ACEOF
81ecdfbb
RW
3575for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3576 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3577do
3578 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3579 if ac_fn_c_try_compile "$LINENO"; then :
3580 ac_cv_prog_cc_c89=$ac_arg
c906108c 3581fi
81ecdfbb
RW
3582rm -f core conftest.err conftest.$ac_objext
3583 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3584done
81ecdfbb 3585rm -f conftest.$ac_ext
bec39cab 3586CC=$ac_save_CC
c906108c
SS
3587
3588fi
81ecdfbb
RW
3589# AC_CACHE_VAL
3590case "x$ac_cv_prog_cc_c89" in
3591 x)
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3593$as_echo "none needed" >&6; } ;;
3594 xno)
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3596$as_echo "unsupported" >&6; } ;;
bec39cab 3597 *)
81ecdfbb
RW
3598 CC="$CC $ac_cv_prog_cc_c89"
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3600$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3601esac
81ecdfbb 3602if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3603
b4e70030
JB
3604fi
3605
bec39cab
AC
3606ac_ext=c
3607ac_cpp='$CPP $CPPFLAGS'
3608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3610ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3611
f434ba03
PA
3612ac_aux_dir=
3613for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3614 for ac_t in install-sh install.sh shtool; do
3615 if test -f "$ac_dir/$ac_t"; then
3616 ac_aux_dir=$ac_dir
3617 ac_install_sh="$ac_aux_dir/$ac_t -c"
3618 break 2
3619 fi
3620 done
3621done
3622if test -z "$ac_aux_dir"; then
3623 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3624fi
3625
3626# These three variables are undocumented and unsupported,
3627# and are intended to be withdrawn in a future Autoconf release.
3628# They can cause serious problems if a builder's source tree is in a directory
3629# whose full name contains unusual characters.
3630ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3631ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3632ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3633
3634
3635# Make sure we can run config.sub.
3636$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3637 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3638
3639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3640$as_echo_n "checking build system type... " >&6; }
3641if test "${ac_cv_build+set}" = set; then :
3642 $as_echo_n "(cached) " >&6
3643else
3644 ac_build_alias=$build_alias
3645test "x$ac_build_alias" = x &&
3646 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3647test "x$ac_build_alias" = x &&
3648 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3649ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3650 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3651
3652fi
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3654$as_echo "$ac_cv_build" >&6; }
3655case $ac_cv_build in
3656*-*-*) ;;
3657*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3658esac
3659build=$ac_cv_build
3660ac_save_IFS=$IFS; IFS='-'
3661set x $ac_cv_build
3662shift
3663build_cpu=$1
3664build_vendor=$2
3665shift; shift
3666# Remember, the first character of IFS is used to create $*,
3667# except with old shells:
3668build_os=$*
3669IFS=$ac_save_IFS
3670case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3671
3672
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3674$as_echo_n "checking host system type... " >&6; }
3675if test "${ac_cv_host+set}" = set; then :
3676 $as_echo_n "(cached) " >&6
3677else
3678 if test "x$host_alias" = x; then
3679 ac_cv_host=$ac_cv_build
3680else
3681 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3682 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3683fi
3684
3685fi
3686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3687$as_echo "$ac_cv_host" >&6; }
3688case $ac_cv_host in
3689*-*-*) ;;
3690*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3691esac
3692host=$ac_cv_host
3693ac_save_IFS=$IFS; IFS='-'
3694set x $ac_cv_host
3695shift
3696host_cpu=$1
3697host_vendor=$2
3698shift; shift
3699# Remember, the first character of IFS is used to create $*,
3700# except with old shells:
3701host_os=$*
3702IFS=$ac_save_IFS
3703case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3704
3705
60ca704f 3706
bec39cab
AC
3707ac_ext=c
3708ac_cpp='$CPP $CPPFLAGS'
3709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3711ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3713$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3714# On Suns, sometimes $CPP names a directory.
3715if test -n "$CPP" && test -d "$CPP"; then
3716 CPP=
8bb2c122 3717fi
bec39cab 3718if test -z "$CPP"; then
81ecdfbb
RW
3719 if test "${ac_cv_prog_CPP+set}" = set; then :
3720 $as_echo_n "(cached) " >&6
bec39cab
AC
3721else
3722 # Double quotes because CPP needs to be expanded
3723 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3724 do
3725 ac_preproc_ok=false
3726for ac_c_preproc_warn_flag in '' yes
3727do
3728 # Use a header file that comes with gcc, so configuring glibc
3729 # with a fresh cross-compiler works.
3730 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3731 # <limits.h> exists even on freestanding compilers.
3732 # On the NeXT, cc -E runs the code through the compiler's parser,
3733 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3735/* end confdefs.h. */
3736#ifdef __STDC__
3737# include <limits.h>
3738#else
3739# include <assert.h>
3740#endif
3741 Syntax error
3742_ACEOF
81ecdfbb 3743if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3744
81ecdfbb 3745else
bec39cab
AC
3746 # Broken: fails on valid input.
3747continue
3748fi
3749rm -f conftest.err conftest.$ac_ext
3750
81ecdfbb 3751 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3752 # can be detected and how.
81ecdfbb 3753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3754/* end confdefs.h. */
3755#include <ac_nonexistent.h>
3756_ACEOF
81ecdfbb 3757if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3758 # Broken: success on invalid input.
3759continue
8bb2c122 3760else
bec39cab
AC
3761 # Passes both tests.
3762ac_preproc_ok=:
3763break
8bb2c122 3764fi
bec39cab 3765rm -f conftest.err conftest.$ac_ext
8bb2c122 3766
bec39cab
AC
3767done
3768# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3769rm -f conftest.err conftest.$ac_ext
81ecdfbb 3770if $ac_preproc_ok; then :
bec39cab
AC
3771 break
3772fi
8bb2c122 3773
bec39cab
AC
3774 done
3775 ac_cv_prog_CPP=$CPP
ddc9cd0f 3776
c906108c 3777fi
bec39cab
AC
3778 CPP=$ac_cv_prog_CPP
3779else
3780 ac_cv_prog_CPP=$CPP
c906108c 3781fi
81ecdfbb
RW
3782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3783$as_echo "$CPP" >&6; }
bec39cab
AC
3784ac_preproc_ok=false
3785for ac_c_preproc_warn_flag in '' yes
3786do
3787 # Use a header file that comes with gcc, so configuring glibc
3788 # with a fresh cross-compiler works.
3789 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3790 # <limits.h> exists even on freestanding compilers.
3791 # On the NeXT, cc -E runs the code through the compiler's parser,
3792 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3794/* end confdefs.h. */
3795#ifdef __STDC__
3796# include <limits.h>
3797#else
3798# include <assert.h>
3799#endif
3800 Syntax error
3801_ACEOF
81ecdfbb 3802if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3803
81ecdfbb 3804else
bec39cab
AC
3805 # Broken: fails on valid input.
3806continue
3807fi
3808rm -f conftest.err conftest.$ac_ext
3809
81ecdfbb 3810 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3811 # can be detected and how.
81ecdfbb 3812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3813/* end confdefs.h. */
3814#include <ac_nonexistent.h>
3815_ACEOF
81ecdfbb 3816if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3817 # Broken: success on invalid input.
3818continue
c906108c 3819else
bec39cab
AC
3820 # Passes both tests.
3821ac_preproc_ok=:
3822break
c906108c 3823fi
bec39cab 3824rm -f conftest.err conftest.$ac_ext
c906108c 3825
bec39cab
AC
3826done
3827# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3828rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3829if $ac_preproc_ok; then :
3830
c906108c 3831else
81ecdfbb
RW
3832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3834as_fn_error "C preprocessor \"$CPP\" fails sanity check
3835See \`config.log' for more details." "$LINENO" 5; }
c906108c 3836fi
c906108c 3837
bec39cab
AC
3838ac_ext=c
3839ac_cpp='$CPP $CPPFLAGS'
3840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3842ac_compiler_gnu=$ac_cv_c_compiler_gnu
3843
3844
81ecdfbb
RW
3845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3846$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3847if test "${ac_cv_path_GREP+set}" = set; then :
3848 $as_echo_n "(cached) " >&6
4e8d927d 3849else
81ecdfbb
RW
3850 if test -z "$GREP"; then
3851 ac_path_GREP_found=false
3852 # Loop through the user's path and test for each of PROGNAME-LIST
3853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3855do
3856 IFS=$as_save_IFS
3857 test -z "$as_dir" && as_dir=.
3858 for ac_prog in grep ggrep; do
3859 for ac_exec_ext in '' $ac_executable_extensions; do
3860 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3861 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3862# Check for GNU ac_path_GREP and select it if it is found.
3863 # Check for GNU $ac_path_GREP
3864case `"$ac_path_GREP" --version 2>&1` in
3865*GNU*)
3866 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3867*)
3868 ac_count=0
3869 $as_echo_n 0123456789 >"conftest.in"
3870 while :
3871 do
3872 cat "conftest.in" "conftest.in" >"conftest.tmp"
3873 mv "conftest.tmp" "conftest.in"
3874 cp "conftest.in" "conftest.nl"
3875 $as_echo 'GREP' >> "conftest.nl"
3876 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3877 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3878 as_fn_arith $ac_count + 1 && ac_count=$as_val
3879 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3880 # Best one so far, save it but keep looking for a better one
3881 ac_cv_path_GREP="$ac_path_GREP"
3882 ac_path_GREP_max=$ac_count
bec39cab 3883 fi
81ecdfbb
RW
3884 # 10*(2^10) chars as input seems more than enough
3885 test $ac_count -gt 10 && break
3886 done
3887 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3888esac
bec39cab 3889
81ecdfbb
RW
3890 $ac_path_GREP_found && break 3
3891 done
3892 done
3893 done
3894IFS=$as_save_IFS
3895 if test -z "$ac_cv_path_GREP"; then
3896 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3897 fi
c906108c 3898else
81ecdfbb 3899 ac_cv_path_GREP=$GREP
c906108c 3900fi
c906108c 3901
81ecdfbb
RW
3902fi
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3904$as_echo "$ac_cv_path_GREP" >&6; }
3905 GREP="$ac_cv_path_GREP"
c906108c 3906
c906108c 3907
81ecdfbb
RW
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3909$as_echo_n "checking for egrep... " >&6; }
3910if test "${ac_cv_path_EGREP+set}" = set; then :
3911 $as_echo_n "(cached) " >&6
783e057b 3912else
81ecdfbb
RW
3913 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3914 then ac_cv_path_EGREP="$GREP -E"
3915 else
3916 if test -z "$EGREP"; then
3917 ac_path_EGREP_found=false
3918 # Loop through the user's path and test for each of PROGNAME-LIST
3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3921do
3922 IFS=$as_save_IFS
3923 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3924 for ac_prog in egrep; do
3925 for ac_exec_ext in '' $ac_executable_extensions; do
3926 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3927 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3928# Check for GNU ac_path_EGREP and select it if it is found.
3929 # Check for GNU $ac_path_EGREP
3930case `"$ac_path_EGREP" --version 2>&1` in
3931*GNU*)
3932 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3933*)
3934 ac_count=0
3935 $as_echo_n 0123456789 >"conftest.in"
3936 while :
3937 do
3938 cat "conftest.in" "conftest.in" >"conftest.tmp"
3939 mv "conftest.tmp" "conftest.in"
3940 cp "conftest.in" "conftest.nl"
3941 $as_echo 'EGREP' >> "conftest.nl"
3942 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3943 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3944 as_fn_arith $ac_count + 1 && ac_count=$as_val
3945 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3946 # Best one so far, save it but keep looking for a better one
3947 ac_cv_path_EGREP="$ac_path_EGREP"
3948 ac_path_EGREP_max=$ac_count
3949 fi
3950 # 10*(2^10) chars as input seems more than enough
3951 test $ac_count -gt 10 && break
3952 done
3953 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3954esac
bec39cab 3955
81ecdfbb
RW
3956 $ac_path_EGREP_found && break 3
3957 done
3958 done
3959 done
3960IFS=$as_save_IFS
3961 if test -z "$ac_cv_path_EGREP"; then
3962 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3963 fi
783e057b 3964else
81ecdfbb 3965 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3966fi
3967
81ecdfbb 3968 fi
783e057b 3969fi
81ecdfbb
RW
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3971$as_echo "$ac_cv_path_EGREP" >&6; }
3972 EGREP="$ac_cv_path_EGREP"
3973
783e057b 3974
81ecdfbb
RW
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3976$as_echo_n "checking for ANSI C header files... " >&6; }
3977if test "${ac_cv_header_stdc+set}" = set; then :
3978 $as_echo_n "(cached) " >&6
783e057b 3979else
81ecdfbb 3980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3981/* end confdefs.h. */
783e057b 3982#include <stdlib.h>
bec39cab 3983#include <stdarg.h>
783e057b
DJ
3984#include <string.h>
3985#include <float.h>
c906108c 3986
bec39cab
AC
3987int
3988main ()
3989{
c906108c 3990
bec39cab
AC
3991 ;
3992 return 0;
3993}
3994_ACEOF
81ecdfbb 3995if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3996 ac_cv_header_stdc=yes
c906108c 3997else
81ecdfbb 3998 ac_cv_header_stdc=no
c906108c 3999fi
81ecdfbb 4000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4001
783e057b
DJ
4002if test $ac_cv_header_stdc = yes; then
4003 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4005/* end confdefs.h. */
4006#include <string.h>
c906108c 4007
783e057b
DJ
4008_ACEOF
4009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4010 $EGREP "memchr" >/dev/null 2>&1; then :
4011
c906108c 4012else
783e057b 4013 ac_cv_header_stdc=no
c906108c 4014fi
783e057b 4015rm -f conftest*
c906108c
SS
4016
4017fi
4018
783e057b
DJ
4019if test $ac_cv_header_stdc = yes; then
4020 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4022/* end confdefs.h. */
4023#include <stdlib.h>
bec39cab 4024
783e057b
DJ
4025_ACEOF
4026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4027 $EGREP "free" >/dev/null 2>&1; then :
4028
bec39cab 4029else
783e057b 4030 ac_cv_header_stdc=no
bec39cab 4031fi
783e057b 4032rm -f conftest*
bec39cab
AC
4033
4034fi
bec39cab 4035
783e057b
DJ
4036if test $ac_cv_header_stdc = yes; then
4037 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4038 if test "$cross_compiling" = yes; then :
783e057b 4039 :
bec39cab 4040else
81ecdfbb 4041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4042/* end confdefs.h. */
4043#include <ctype.h>
81ecdfbb 4044#include <stdlib.h>
783e057b
DJ
4045#if ((' ' & 0x0FF) == 0x020)
4046# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4047# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4048#else
4049# define ISLOWER(c) \
4050 (('a' <= (c) && (c) <= 'i') \
4051 || ('j' <= (c) && (c) <= 'r') \
4052 || ('s' <= (c) && (c) <= 'z'))
4053# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4054#endif
4055
4056#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4057int
4058main ()
4059{
4060 int i;
4061 for (i = 0; i < 256; i++)
4062 if (XOR (islower (i), ISLOWER (i))
4063 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4064 return 2;
4065 return 0;
783e057b
DJ
4066}
4067_ACEOF
81ecdfbb 4068if ac_fn_c_try_run "$LINENO"; then :
783e057b 4069
81ecdfbb
RW
4070else
4071 ac_cv_header_stdc=no
783e057b 4072fi
81ecdfbb
RW
4073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4074 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4075fi
81ecdfbb 4076
783e057b
DJ
4077fi
4078fi
81ecdfbb
RW
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4080$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4081if test $ac_cv_header_stdc = yes; then
4082
81ecdfbb 4083$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4084
4085fi
4086
4087# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4088for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4089 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4090do :
4091 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4092ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4093"
4094eval as_val=\$$as_ac_Header
4095 if test "x$as_val" = x""yes; then :
783e057b 4096 cat >>confdefs.h <<_ACEOF
81ecdfbb 4097#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4098_ACEOF
4099
4100fi
4101
4102done
4103
4104
4105
f434ba03
PA
4106
4107
81ecdfbb
RW
4108 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4109if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4110 MINIX=yes
4111else
4112 MINIX=
4113fi
4114
4115
4116 if test "$MINIX" = yes; then
4117
81ecdfbb 4118$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4119
4120
81ecdfbb 4121$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4122
4123
81ecdfbb 4124$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4125
4126 fi
4127
f434ba03
PA
4128 case "$host_os" in
4129 hpux*)
4130
4131$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4132
4133 ;;
4134 esac
4135
783e057b 4136
81ecdfbb
RW
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4138$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4139if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4140 $as_echo_n "(cached) " >&6
783e057b 4141else
81ecdfbb 4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4143/* end confdefs.h. */
4144
f434ba03
PA
4145# define __EXTENSIONS__ 1
4146 $ac_includes_default
783e057b
DJ
4147int
4148main ()
4149{
4150
4151 ;
4152 return 0;
4153}
4154_ACEOF
81ecdfbb 4155if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4156 ac_cv_safe_to_define___extensions__=yes
4157else
81ecdfbb 4158 ac_cv_safe_to_define___extensions__=no
783e057b 4159fi
81ecdfbb 4160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4161fi
81ecdfbb
RW
4162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4163$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4164 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4165 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4166
81ecdfbb 4167 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4168
81ecdfbb 4169 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4170
81ecdfbb 4171 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4172
81ecdfbb 4173 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4174
4175
81ecdfbb
RW
4176if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4178set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4180$as_echo_n "checking for $ac_word... " >&6; }
4181if test "${ac_cv_prog_RANLIB+set}" = set; then :
4182 $as_echo_n "(cached) " >&6
4183else
4184 if test -n "$RANLIB"; then
4185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4186else
4187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190 IFS=$as_save_IFS
4191 test -z "$as_dir" && as_dir=.
4192 for ac_exec_ext in '' $ac_executable_extensions; do
4193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4194 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4196 break 2
4197 fi
4198done
4199 done
4200IFS=$as_save_IFS
783e057b 4201
81ecdfbb
RW
4202fi
4203fi
4204RANLIB=$ac_cv_prog_RANLIB
4205if test -n "$RANLIB"; then
4206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4207$as_echo "$RANLIB" >&6; }
4208else
4209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
783e057b
DJ
4212
4213
81ecdfbb
RW
4214fi
4215if test -z "$ac_cv_prog_RANLIB"; then
4216 ac_ct_RANLIB=$RANLIB
4217 # Extract the first word of "ranlib", so it can be a program name with args.
4218set dummy ranlib; ac_word=$2
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4220$as_echo_n "checking for $ac_word... " >&6; }
4221if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4222 $as_echo_n "(cached) " >&6
783e057b 4223else
81ecdfbb
RW
4224 if test -n "$ac_ct_RANLIB"; then
4225 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4226else
4227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4228for as_dir in $PATH
4229do
4230 IFS=$as_save_IFS
4231 test -z "$as_dir" && as_dir=.
4232 for ac_exec_ext in '' $ac_executable_extensions; do
4233 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4234 ac_cv_prog_ac_ct_RANLIB="ranlib"
4235 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4236 break 2
4237 fi
4238done
4239 done
4240IFS=$as_save_IFS
4241
4242fi
4243fi
4244ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4245if test -n "$ac_ct_RANLIB"; then
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4247$as_echo "$ac_ct_RANLIB" >&6; }
4248else
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4250$as_echo "no" >&6; }
4251fi
4252
4253 if test "x$ac_ct_RANLIB" = x; then
4254 RANLIB=":"
4255 else
4256 case $cross_compiling:$ac_tool_warned in
4257yes:)
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4260ac_tool_warned=yes ;;
4261esac
4262 RANLIB=$ac_ct_RANLIB
4263 fi
4264else
4265 RANLIB="$ac_cv_prog_RANLIB"
4266fi
4267
4268
4269
4270
4271
4272
3388710e
JM
4273
4274
3388710e 4275
f434ba03
PA
4276 # Code from module arg-nonnull:
4277 # Code from module c++defs:
4278 # Code from module extensions:
3388710e 4279
f434ba03
PA
4280 # Code from module include_next:
4281 # Code from module memchr:
4282 # Code from module memmem:
4283 # Code from module memmem-simple:
4284 # Code from module multiarch:
4285 # Code from module stddef:
4286 # Code from module stdint:
4287 # Code from module string:
4288 # Code from module warn-on-use:
4289 # Code from module wchar:
3388710e
JM
4290
4291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4292$as_echo_n "checking target system type... " >&6; }
4293if test "${ac_cv_target+set}" = set; then :
4294 $as_echo_n "(cached) " >&6
4295else
4296 if test "x$target_alias" = x; then
4297 ac_cv_target=$ac_cv_host
4298else
4299 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4300 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4301fi
4302
4303fi
4304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4305$as_echo "$ac_cv_target" >&6; }
4306case $ac_cv_target in
4307*-*-*) ;;
4308*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4309esac
4310target=$ac_cv_target
4311ac_save_IFS=$IFS; IFS='-'
4312set x $ac_cv_target
4313shift
4314target_cpu=$1
4315target_vendor=$2
4316shift; shift
4317# Remember, the first character of IFS is used to create $*,
4318# except with old shells:
4319target_os=$*
4320IFS=$ac_save_IFS
4321case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4322
4323
4324# The aliases save the names the user supplied, while $host etc.
4325# will get canonicalized.
4326test -n "$target_alias" &&
4327 test "$program_prefix$program_suffix$program_transform_name" = \
4328 NONENONEs,x,x, &&
4329 program_prefix=${target_alias}-
4330
4331# The tests for host and target for $enable_largefile require
4332# canonical names.
4333
4334
81ecdfbb 4335
da2f07f1
JK
4336# As the $enable_largefile decision depends on --enable-plugins we must set it
4337# even in directories otherwise not depending on the $plugins option.
4338
4339
4340# Check whether --enable-plugins was given.
4341if test "${enable_plugins+set}" = set; then :
4342 enableval=$enable_plugins; case "${enableval}" in
4343 yes | "") plugins=yes ;;
4344 no) plugins=no ;;
4345 *) plugins=yes ;;
4346 esac
4347else
4348 plugins=no
4349fi
4350
4351
4352
4353case "${host}" in
4354 sparc-*-solaris*|i[3-7]86-*-solaris*)
4355 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4356 # are mutually exclusive; and without procfs support, the bfd/ elf module
4357 # cannot provide certain routines such as elfcore_write_prpsinfo
4358 # or elfcore_write_prstatus. So unless the user explicitly requested
4359 # large-file support through the --enable-largefile switch, disable
4360 # large-file support in favor of procfs support.
4361 test "${target}" = "${host}" -a "x$plugins" = xno \
4362 && : ${enable_largefile="no"}
4363 ;;
4364esac
4365
4366# Check whether --enable-largefile was given.
4367if test "${enable_largefile+set}" = set; then :
4368 enableval=$enable_largefile;
4369fi
4370
4371if test "$enable_largefile" != no; then
4372
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4374$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4375if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4376 $as_echo_n "(cached) " >&6
4377else
4378 ac_cv_sys_largefile_CC=no
4379 if test "$GCC" != yes; then
4380 ac_save_CC=$CC
4381 while :; do
4382 # IRIX 6.2 and later do not support large files by default,
4383 # so use the C compiler's -n32 option if that helps.
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385/* end confdefs.h. */
4386#include <sys/types.h>
4387 /* Check that off_t can represent 2**63 - 1 correctly.
4388 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4389 since some C++ compilers masquerading as C compilers
4390 incorrectly reject 9223372036854775807. */
4391#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4392 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4393 && LARGE_OFF_T % 2147483647 == 1)
4394 ? 1 : -1];
4395int
4396main ()
4397{
4398
4399 ;
4400 return 0;
4401}
4402_ACEOF
4403 if ac_fn_c_try_compile "$LINENO"; then :
4404 break
4405fi
4406rm -f core conftest.err conftest.$ac_objext
4407 CC="$CC -n32"
4408 if ac_fn_c_try_compile "$LINENO"; then :
4409 ac_cv_sys_largefile_CC=' -n32'; break
4410fi
4411rm -f core conftest.err conftest.$ac_objext
4412 break
4413 done
4414 CC=$ac_save_CC
4415 rm -f conftest.$ac_ext
4416 fi
4417fi
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4419$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4420 if test "$ac_cv_sys_largefile_CC" != no; then
4421 CC=$CC$ac_cv_sys_largefile_CC
4422 fi
4423
4424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4425$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4426if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4427 $as_echo_n "(cached) " >&6
4428else
4429 while :; do
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h. */
4432#include <sys/types.h>
4433 /* Check that off_t can represent 2**63 - 1 correctly.
4434 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4435 since some C++ compilers masquerading as C compilers
4436 incorrectly reject 9223372036854775807. */
4437#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4438 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4439 && LARGE_OFF_T % 2147483647 == 1)
4440 ? 1 : -1];
4441int
4442main ()
4443{
4444
4445 ;
4446 return 0;
4447}
4448_ACEOF
4449if ac_fn_c_try_compile "$LINENO"; then :
4450 ac_cv_sys_file_offset_bits=no; break
4451fi
4452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#define _FILE_OFFSET_BITS 64
4456#include <sys/types.h>
4457 /* Check that off_t can represent 2**63 - 1 correctly.
4458 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4459 since some C++ compilers masquerading as C compilers
4460 incorrectly reject 9223372036854775807. */
4461#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4462 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4463 && LARGE_OFF_T % 2147483647 == 1)
4464 ? 1 : -1];
4465int
4466main ()
4467{
4468
4469 ;
4470 return 0;
4471}
4472_ACEOF
4473if ac_fn_c_try_compile "$LINENO"; then :
4474 ac_cv_sys_file_offset_bits=64; break
4475fi
4476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4477 ac_cv_sys_file_offset_bits=unknown
4478 break
4479done
4480fi
4481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4482$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4483case $ac_cv_sys_file_offset_bits in #(
4484 no | unknown) ;;
4485 *)
4486cat >>confdefs.h <<_ACEOF
4487#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4488_ACEOF
4489;;
4490esac
4491rm -rf conftest*
4492 if test $ac_cv_sys_file_offset_bits = unknown; then
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4494$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4495if test "${ac_cv_sys_large_files+set}" = set; then :
4496 $as_echo_n "(cached) " >&6
4497else
4498 while :; do
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500/* end confdefs.h. */
4501#include <sys/types.h>
4502 /* Check that off_t can represent 2**63 - 1 correctly.
4503 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4504 since some C++ compilers masquerading as C compilers
4505 incorrectly reject 9223372036854775807. */
4506#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4507 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4508 && LARGE_OFF_T % 2147483647 == 1)
4509 ? 1 : -1];
4510int
4511main ()
4512{
4513
4514 ;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_compile "$LINENO"; then :
4519 ac_cv_sys_large_files=no; break
4520fi
4521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523/* end confdefs.h. */
4524#define _LARGE_FILES 1
4525#include <sys/types.h>
4526 /* Check that off_t can represent 2**63 - 1 correctly.
4527 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4528 since some C++ compilers masquerading as C compilers
4529 incorrectly reject 9223372036854775807. */
4530#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4531 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4532 && LARGE_OFF_T % 2147483647 == 1)
4533 ? 1 : -1];
4534int
4535main ()
4536{
4537
4538 ;
4539 return 0;
4540}
4541_ACEOF
4542if ac_fn_c_try_compile "$LINENO"; then :
4543 ac_cv_sys_large_files=1; break
4544fi
4545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4546 ac_cv_sys_large_files=unknown
4547 break
4548done
4549fi
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4551$as_echo "$ac_cv_sys_large_files" >&6; }
4552case $ac_cv_sys_large_files in #(
4553 no | unknown) ;;
4554 *)
4555cat >>confdefs.h <<_ACEOF
4556#define _LARGE_FILES $ac_cv_sys_large_files
4557_ACEOF
4558;;
4559esac
4560rm -rf conftest*
4561 fi
4562fi
4563
4564
4565
81ecdfbb
RW
4566
4567
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4569$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4570if test "${am_cv_prog_cc_stdc+set}" = set; then :
4571 $as_echo_n "(cached) " >&6
4572else
4573 am_cv_prog_cc_stdc=no
4574ac_save_CC="$CC"
4575# Don't try gcc -ansi; that turns off useful extensions and
4576# breaks some systems' header files.
4577# AIX -qlanglvl=ansi
4578# Ultrix and OSF/1 -std1
4579# HP-UX 10.20 and later -Ae
4580# HP-UX older versions -Aa -D_HPUX_SOURCE
4581# SVR4 -Xc -D__EXTENSIONS__
4582for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4583do
783e057b 4584 CC="$ac_save_CC $ac_arg"
81ecdfbb 4585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4586/* end confdefs.h. */
4587#include <stdarg.h>
4588#include <stdio.h>
4589#include <sys/types.h>
4590#include <sys/stat.h>
4591/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4592struct buf { int x; };
4593FILE * (*rcsopen) (struct buf *, struct stat *, int);
4594static char *e (p, i)
4595 char **p;
4596 int i;
4597{
4598 return p[i];
4599}
4600static char *f (char * (*g) (char **, int), char **p, ...)
4601{
4602 char *s;
4603 va_list v;
4604 va_start (v,p);
4605 s = g (p, va_arg (v,int));
4606 va_end (v);
4607 return s;
4608}
4609int test (int i, double x);
4610struct s1 {int (*f) (int a);};
4611struct s2 {int (*f) (double a);};
4612int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4613int argc;
4614char **argv;
4615
4616int
4617main ()
4618{
4619
4620return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4621
4622 ;
4623 return 0;
4624}
4625_ACEOF
81ecdfbb 4626if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4627 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4628fi
81ecdfbb 4629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4630done
4631CC="$ac_save_CC"
4632
4633fi
4634
4635if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4637$as_echo "none needed" >&6; }
783e057b 4638else
81ecdfbb
RW
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4640$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4641fi
4642case "x$am_cv_prog_cc_stdc" in
4643 x|xno) ;;
4644 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4645esac
4646
4647
4648ac_aux_dir=
81ecdfbb
RW
4649for ac_dir in .. "$srcdir"/..; do
4650 for ac_t in install-sh install.sh shtool; do
4651 if test -f "$ac_dir/$ac_t"; then
4652 ac_aux_dir=$ac_dir
4653 ac_install_sh="$ac_aux_dir/$ac_t -c"
4654 break 2
4655 fi
4656 done
783e057b
DJ
4657done
4658if test -z "$ac_aux_dir"; then
81ecdfbb 4659 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4660fi
81ecdfbb
RW
4661
4662# These three variables are undocumented and unsupported,
4663# and are intended to be withdrawn in a future Autoconf release.
4664# They can cause serious problems if a builder's source tree is in a directory
4665# whose full name contains unusual characters.
4666ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4667ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4668ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4669
783e057b 4670
783e057b 4671
81ecdfbb 4672
a417dc56
RW
4673# Dependency checking.
4674rm -rf .tst 2>/dev/null
4675mkdir .tst 2>/dev/null
4676if test -d .tst; then
4677 am__leading_dot=.
4678else
4679 am__leading_dot=_
4680fi
4681rmdir .tst 2>/dev/null
4682
4683DEPDIR="${am__leading_dot}deps"
4684
81ecdfbb 4685ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4686
4687
4688depcc="$CC" am_compiler_list=
4689
4690am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4692$as_echo_n "checking dependency style of $depcc... " >&6; }
4693if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4694 $as_echo_n "(cached) " >&6
a417dc56
RW
4695else
4696 if test -f "$am_depcomp"; then
4697 # We make a subdir and do the tests there. Otherwise we can end up
4698 # making bogus files that we don't know about and never remove. For
4699 # instance it was reported that on HP-UX the gcc test will end up
4700 # making a dummy file named `D' -- because `-MD' means `put the output
4701 # in D'.
4702 mkdir conftest.dir
4703 # Copy depcomp to subdir because otherwise we won't find it if we're
4704 # using a relative directory.
4705 cp "$am_depcomp" conftest.dir
4706 cd conftest.dir
4707 # We will build objects and dependencies in a subdirectory because
4708 # it helps to detect inapplicable dependency modes. For instance
4709 # both Tru64's cc and ICC support -MD to output dependencies as a
4710 # side effect of compilation, but ICC will put the dependencies in
4711 # the current directory while Tru64 will put them in the object
4712 # directory.
4713 mkdir sub
4714
4715 am_cv_CC_dependencies_compiler_type=none
4716 if test "$am_compiler_list" = ""; then
4717 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4718 fi
4719 for depmode in $am_compiler_list; do
4720 if test $depmode = none; then break; fi
4721
81ecdfbb 4722 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4723 # Setup a source with many dependencies, because some compilers
4724 # like to wrap large dependency lists on column 80 (with \), and
4725 # we should not choose a depcomp mode which is confused by this.
4726 #
4727 # We need to recreate these files for each test, as the compiler may
4728 # overwrite some of them when testing with obscure command lines.
4729 # This happens at least with the AIX C compiler.
4730 : > sub/conftest.c
4731 for i in 1 2 3 4 5 6; do
4732 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4733 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4734 # Solaris 8's {/usr,}/bin/sh.
4735 touch sub/conftst$i.h
4736 done
4737 echo "include sub/conftest.Po" > confmf
4738
4739 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4740 # mode. It turns out that the SunPro C++ compiler does not properly
4741 # handle `-M -o', and we need to detect this.
4742 depcmd="depmode=$depmode \
4743 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4744 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4745 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4746 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4747 if env $depcmd > conftest.err 2>&1 &&
4748 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4749 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4750 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4751 # icc doesn't choke on unknown options, it will just issue warnings
4752 # or remarks (even with -Werror). So we grep stderr for any message
4753 # that says an option was ignored or not supported.
4754 # When given -MP, icc 7.0 and 7.1 complain thusly:
4755 # icc: Command line warning: ignoring option '-M'; no argument required
4756 # The diagnosis changed in icc 8.0:
4757 # icc: Command line remark: option '-MP' not supported
4758 if (grep 'ignoring option' conftest.err ||
4759 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4760 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4761 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4762 break
4763 fi
4764 fi
81ecdfbb 4765 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4766 sed -e 's/^/| /' < conftest.err >&5
4767 done
4768
4769 cd ..
4770 rm -rf conftest.dir
4771else
4772 am_cv_CC_dependencies_compiler_type=none
4773fi
4774
4775fi
81ecdfbb
RW
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4777$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4778if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4779then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4780else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4781
4782fi
4783
4784
4785# Check for the 'make' the user wants to use.
4786for ac_prog in make
4787do
4788 # Extract the first word of "$ac_prog", so it can be a program name with args.
4789set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4791$as_echo_n "checking for $ac_word... " >&6; }
4792if test "${ac_cv_prog_MAKE+set}" = set; then :
4793 $as_echo_n "(cached) " >&6
a417dc56
RW
4794else
4795 if test -n "$MAKE"; then
4796 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4797else
4798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in $PATH
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4803 for ac_exec_ext in '' $ac_executable_extensions; do
4804 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4805 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4807 break 2
4808 fi
4809done
81ecdfbb
RW
4810 done
4811IFS=$as_save_IFS
a417dc56
RW
4812
4813fi
4814fi
4815MAKE=$ac_cv_prog_MAKE
4816if test -n "$MAKE"; then
81ecdfbb
RW
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4818$as_echo "$MAKE" >&6; }
a417dc56 4819else
81ecdfbb
RW
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
a417dc56
RW
4822fi
4823
81ecdfbb 4824
a417dc56
RW
4825 test -n "$MAKE" && break
4826done
4827
4828MAKE_IS_GNU=
4829case "`$MAKE --version 2>&1 | sed 1q`" in
4830 *GNU*)
4831 MAKE_IS_GNU=yes
4832 ;;
4833esac
81ecdfbb 4834 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4835 GMAKE_TRUE=
4836 GMAKE_FALSE='#'
4837else
4838 GMAKE_TRUE='#'
4839 GMAKE_FALSE=
4840fi
4841
81ecdfbb
RW
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4843$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4844set x ${MAKE-make}
4845ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4846if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4847 $as_echo_n "(cached) " >&6
a417dc56
RW
4848else
4849 cat >conftest.make <<\_ACEOF
81ecdfbb 4850SHELL = /bin/sh
a417dc56 4851all:
81ecdfbb 4852 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4853_ACEOF
4854# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4855case `${MAKE-make} -f conftest.make 2>/dev/null` in
4856 *@@@%%%=?*=@@@%%%*)
4857 eval ac_cv_prog_make_${ac_make}_set=yes;;
4858 *)
4859 eval ac_cv_prog_make_${ac_make}_set=no;;
4860esac
a417dc56
RW
4861rm -f conftest.make
4862fi
81ecdfbb
RW
4863if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4865$as_echo "yes" >&6; }
a417dc56
RW
4866 SET_MAKE=
4867else
81ecdfbb
RW
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4869$as_echo "no" >&6; }
a417dc56
RW
4870 SET_MAKE="MAKE=${MAKE-make}"
4871fi
4872
4873
783e057b
DJ
4874
4875CONFIG_OBS=
4876CONFIG_DEPS=
4877CONFIG_SRCS=
4878ENABLE_CFLAGS=
4879
4880CONFIG_ALL=
4881CONFIG_CLEAN=
4882CONFIG_INSTALL=
4883CONFIG_UNINSTALL=
4884
4885# If we haven't got the data from the intl directory,
4886# assume NLS is disabled.
4887USE_NLS=no
4888LIBINTL=
4889LIBINTL_DEP=
4890INCINTL=
4891XGETTEXT=
4892GMSGFMT=
4893POSUB=
4894
4895if test -f ../intl/config.intl; then
4896 . ../intl/config.intl
4897fi
81ecdfbb
RW
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4899$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4900if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
783e057b 4903else
81ecdfbb
RW
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4905$as_echo "yes" >&6; }
783e057b 4906
81ecdfbb 4907$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4908
4909
81ecdfbb
RW
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4911$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4912 # Look for .po and .gmo files in the source directory.
4913 CATALOGS=
4914 XLINGUAS=
4915 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4916 # If there aren't any .gmo files the shell will give us the
4917 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4918 # weeded out.
4919 case "$cat" in *\**)
4920 continue;;
4921 esac
4922 # The quadruple backslash is collapsed to a double backslash
4923 # by the backticks, then collapsed again by the double quotes,
4924 # leaving us with one backslash in the sed expression (right
4925 # before the dot that mustn't act as a wildcard).
4926 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4927 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4928 # The user is allowed to set LINGUAS to a list of languages to
4929 # install catalogs for. If it's empty that means "all of them."
4930 if test "x$LINGUAS" = x; then
4931 CATALOGS="$CATALOGS $cat"
4932 XLINGUAS="$XLINGUAS $lang"
4933 else
4934 case "$LINGUAS" in *$lang*)
4935 CATALOGS="$CATALOGS $cat"
4936 XLINGUAS="$XLINGUAS $lang"
4937 ;;
4938 esac
4939 fi
4940 done
4941 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4943$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4944
4945
4946 DATADIRNAME=share
4947
4948 INSTOBJEXT=.mo
4949
4950 GENCAT=gencat
4951
4952 CATOBJEXT=.gmo
4953
4954fi
4955
4956localedir='${datadir}/locale'
4957
4958
4959if test x"$USE_NLS" = xyes; then
4960 CONFIG_ALL="$CONFIG_ALL all-po"
4961 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4962 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4963 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4964fi
4965
4966
f434ba03
PA
4967
4968
4969
4970 LIBC_FATAL_STDERR_=1
4971 export LIBC_FATAL_STDERR_
4972
4973
4974
4975
4976
4977 for ac_header in $gl_header_list
4978do :
4979 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4980ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4981eval as_val=\$$as_ac_Header
4982 if test "x$as_val" = x""yes; then :
4983 cat >>confdefs.h <<_ACEOF
4984#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4985_ACEOF
4986
4987fi
4988
4989done
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999 for ac_func in $gl_func_list
5000do :
5001 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5002ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5003eval as_val=\$$as_ac_var
5004 if test "x$as_val" = x""yes; then :
5005 cat >>confdefs.h <<_ACEOF
5006#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5007_ACEOF
5008
5009fi
5010done
5011
5012
5013
5014
5015
5016
5017 GNULIB_MEMCHR=0;
5018 GNULIB_MEMMEM=0;
5019 GNULIB_MEMPCPY=0;
5020 GNULIB_MEMRCHR=0;
5021 GNULIB_RAWMEMCHR=0;
5022 GNULIB_STPCPY=0;
5023 GNULIB_STPNCPY=0;
5024 GNULIB_STRCHRNUL=0;
5025 GNULIB_STRDUP=0;
5026 GNULIB_STRNCAT=0;
5027 GNULIB_STRNDUP=0;
5028 GNULIB_STRNLEN=0;
5029 GNULIB_STRPBRK=0;
5030 GNULIB_STRSEP=0;
5031 GNULIB_STRSTR=0;
5032 GNULIB_STRCASESTR=0;
5033 GNULIB_STRTOK_R=0;
5034 GNULIB_MBSLEN=0;
5035 GNULIB_MBSNLEN=0;
5036 GNULIB_MBSCHR=0;
5037 GNULIB_MBSRCHR=0;
5038 GNULIB_MBSSTR=0;
5039 GNULIB_MBSCASECMP=0;
5040 GNULIB_MBSNCASECMP=0;
5041 GNULIB_MBSPCASECMP=0;
5042 GNULIB_MBSCASESTR=0;
5043 GNULIB_MBSCSPN=0;
5044 GNULIB_MBSPBRK=0;
5045 GNULIB_MBSSPN=0;
5046 GNULIB_MBSSEP=0;
5047 GNULIB_MBSTOK_R=0;
5048 GNULIB_STRERROR=0;
5049 GNULIB_STRSIGNAL=0;
5050 GNULIB_STRVERSCMP=0;
5051 HAVE_MBSLEN=0;
5052 HAVE_MEMCHR=1;
5053 HAVE_DECL_MEMMEM=1;
5054 HAVE_MEMPCPY=1;
5055 HAVE_DECL_MEMRCHR=1;
5056 HAVE_RAWMEMCHR=1;
5057 HAVE_STPCPY=1;
5058 HAVE_STPNCPY=1;
5059 HAVE_STRCHRNUL=1;
5060 HAVE_DECL_STRDUP=1;
5061 HAVE_DECL_STRNDUP=1;
5062 HAVE_DECL_STRNLEN=1;
5063 HAVE_STRPBRK=1;
5064 HAVE_STRSEP=1;
5065 HAVE_STRCASESTR=1;
5066 HAVE_DECL_STRTOK_R=1;
5067 HAVE_DECL_STRSIGNAL=1;
5068 HAVE_STRVERSCMP=1;
5069 REPLACE_MEMCHR=0;
783e057b 5070 REPLACE_MEMMEM=0;
f434ba03
PA
5071 REPLACE_STPNCPY=0;
5072 REPLACE_STRDUP=0;
783e057b 5073 REPLACE_STRSTR=0;
f434ba03
PA
5074 REPLACE_STRCASESTR=0;
5075 REPLACE_STRERROR=0;
5076 REPLACE_STRNCAT=0;
5077 REPLACE_STRNDUP=0;
5078 REPLACE_STRNLEN=0;
5079 REPLACE_STRSIGNAL=0;
5080 REPLACE_STRTOK_R=0;
5081 UNDEFINE_STRTOK_R=0;
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5096 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5097 # irrelevant for anonymous mappings.
5098 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5099if test "x$ac_cv_func_mmap" = x""yes; then :
5100 gl_have_mmap=yes
5101else
5102 gl_have_mmap=no
5103fi
5104
5105
5106 # Try to allow MAP_ANONYMOUS.
5107 gl_have_mmap_anonymous=no
5108 if test $gl_have_mmap = yes; then
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5110$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5112/* end confdefs.h. */
5113
5114#include <sys/mman.h>
5115#ifdef MAP_ANONYMOUS
5116 I cant identify this map.
5117#endif
5118
5119_ACEOF
5120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5121 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5122 gl_have_mmap_anonymous=yes
5123fi
5124rm -f conftest*
5125
5126 if test $gl_have_mmap_anonymous != yes; then
5127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5128/* end confdefs.h. */
5129
5130#include <sys/mman.h>
5131#ifdef MAP_ANON
5132 I cant identify this map.
5133#endif
5134
5135_ACEOF
5136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5137 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5138
5139$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5140
5141 gl_have_mmap_anonymous=yes
5142fi
5143rm -f conftest*
5144
5145 fi
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5147$as_echo "$gl_have_mmap_anonymous" >&6; }
5148 if test $gl_have_mmap_anonymous = yes; then
5149
5150$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5151
5152 fi
5153 fi
5154
5155
5156 :
5157
5158
5159
5160
5161
5162
5163 :
5164
5165
5166
5167
5168
5169
5170
5171
5172 :
5173
5174
5175
5176
5177
5178 if test $ac_cv_func_memchr = yes; then
5179 # Detect platform-specific bugs in some versions of glibc:
5180 # memchr should not dereference anything with length 0
5181 # http://bugzilla.redhat.com/499689
5182 # memchr should not dereference overestimated length after a match
5183 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5184 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5185 # Assume that memchr works on platforms that lack mprotect.
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5187$as_echo_n "checking whether memchr works... " >&6; }
5188if test "${gl_cv_func_memchr_works+set}" = set; then :
5189 $as_echo_n "(cached) " >&6
5190else
5191 if test "$cross_compiling" = yes; then :
5192 gl_cv_func_memchr_works="guessing no"
5193else
5194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5195/* end confdefs.h. */
5196
5197#include <string.h>
5198#if HAVE_SYS_MMAN_H
5199# include <fcntl.h>
5200# include <unistd.h>
5201# include <sys/types.h>
5202# include <sys/mman.h>
5203# ifndef MAP_FILE
5204# define MAP_FILE 0
5205# endif
5206#endif
5207
5208int
5209main ()
5210{
5211
5212 char *fence = NULL;
5213#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5214# if HAVE_MAP_ANONYMOUS
5215 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5216 const int fd = -1;
5217# else /* !HAVE_MAP_ANONYMOUS */
5218 const int flags = MAP_FILE | MAP_PRIVATE;
5219 int fd = open ("/dev/zero", O_RDONLY, 0666);
5220 if (fd >= 0)
5221# endif
5222 {
5223 int pagesize = getpagesize ();
5224 char *two_pages =
5225 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5226 flags, fd, 0);
5227 if (two_pages != (char *)(-1)
5228 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5229 fence = two_pages + pagesize;
5230 }
5231#endif
5232 if (fence)
5233 {
5234 if (memchr (fence, 0, 0))
5235 return 1;
5236 strcpy (fence - 9, "12345678");
5237 if (memchr (fence - 9, 0, 79) != fence - 1)
5238 return 2;
5239 }
5240 return 0;
5241
5242 ;
5243 return 0;
5244}
5245_ACEOF
5246if ac_fn_c_try_run "$LINENO"; then :
5247 gl_cv_func_memchr_works=yes
5248else
5249 gl_cv_func_memchr_works=no
5250fi
5251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5252 conftest.$ac_objext conftest.beam conftest.$ac_ext
5253fi
5254
5255fi
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5257$as_echo "$gl_cv_func_memchr_works" >&6; }
5258 if test "$gl_cv_func_memchr_works" != yes; then
5259 REPLACE_MEMCHR=1
5260 fi
5261 else
5262 HAVE_MEMCHR=0
5263 fi
5264 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5265
5266
5267
5268
5269
5270
5271
5272
5273 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5274
5275
5276 for ac_header in bp-sym.h
5277do :
5278 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5279if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5280 cat >>confdefs.h <<_ACEOF
5281#define HAVE_BP_SYM_H 1
5282_ACEOF
5283
5284fi
5285
5286done
5287
5288
5289 fi
783e057b
DJ
5290
5291
81ecdfbb
RW
5292 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5293if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5294 ac_have_decl=1
783e057b 5295else
81ecdfbb 5296 ac_have_decl=0
783e057b 5297fi
783e057b
DJ
5298
5299cat >>confdefs.h <<_ACEOF
81ecdfbb 5300#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5301_ACEOF
5302
5303
783e057b
DJ
5304
5305
5306
5307
5308
5309
5310
5311
783e057b 5312
783e057b 5313
783e057b 5314
f434ba03 5315
81ecdfbb
RW
5316 for ac_func in memmem
5317do :
5318 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5319if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5320 cat >>confdefs.h <<_ACEOF
81ecdfbb 5321#define HAVE_MEMMEM 1
783e057b
DJ
5322_ACEOF
5323
5324else
5325
5326 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5327
5328fi
5329done
5330
5331
5332
5333 :
5334
5335
5336
5337
5338
5339 if test $ac_cv_have_decl_memmem = no; then
5340 HAVE_DECL_MEMMEM=0
5341 fi
5342 :
5343
5344
f434ba03
PA
5345 gl_cv_c_multiarch=no
5346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5347/* end confdefs.h. */
5348#ifndef __APPLE_CC__
5349 not a universal capable compiler
5350 #endif
5351 typedef int dummy;
5352
5353_ACEOF
5354if ac_fn_c_try_compile "$LINENO"; then :
5355
5356 arch=
5357 prev=
5358 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5359 if test -n "$prev"; then
5360 case $word in
5361 i?86 | x86_64 | ppc | ppc64)
5362 if test -z "$arch" || test "$arch" = "$word"; then
5363 arch="$word"
5364 else
5365 gl_cv_c_multiarch=yes
5366 fi
5367 ;;
5368 esac
5369 prev=
5370 else
5371 if test "x$word" = "x-arch"; then
5372 prev=arch
5373 fi
5374 fi
5375 done
5376
5377fi
5378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5379 if test $gl_cv_c_multiarch = yes; then
5380
5381$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5382
5383 APPLE_UNIVERSAL_BUILD=1
5384 else
5385 APPLE_UNIVERSAL_BUILD=0
5386 fi
5387
5388
5389
5390 REPLACE_NULL=0;
5391 HAVE_WCHAR_T=1;
5392 STDDEF_H='';
5393
5394
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5396$as_echo_n "checking for wchar_t... " >&6; }
5397if test "${gt_cv_c_wchar_t+set}" = set; then :
5398 $as_echo_n "(cached) " >&6
5399else
5400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5401/* end confdefs.h. */
5402#include <stddef.h>
5403 wchar_t foo = (wchar_t)'\0';
5404int
5405main ()
5406{
5407
5408 ;
5409 return 0;
5410}
5411_ACEOF
5412if ac_fn_c_try_compile "$LINENO"; then :
5413 gt_cv_c_wchar_t=yes
5414else
5415 gt_cv_c_wchar_t=no
5416fi
5417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5418fi
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5420$as_echo "$gt_cv_c_wchar_t" >&6; }
5421 if test $gt_cv_c_wchar_t = yes; then
5422
5423$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5424
5425 fi
5426
5427
5428
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5430$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5431if test "${gl_cv_have_include_next+set}" = set; then :
5432 $as_echo_n "(cached) " >&6
5433else
5434 rm -rf conftestd1a conftestd1b conftestd2
5435 mkdir conftestd1a conftestd1b conftestd2
5436 cat <<EOF > conftestd1a/conftest.h
5437#define DEFINED_IN_CONFTESTD1
5438#include_next <conftest.h>
5439#ifdef DEFINED_IN_CONFTESTD2
5440int foo;
5441#else
5442#error "include_next doesn't work"
5443#endif
5444EOF
5445 cat <<EOF > conftestd1b/conftest.h
5446#define DEFINED_IN_CONFTESTD1
5447#include <stdio.h>
5448#include_next <conftest.h>
5449#ifdef DEFINED_IN_CONFTESTD2
5450int foo;
5451#else
5452#error "include_next doesn't work"
5453#endif
5454EOF
5455 cat <<EOF > conftestd2/conftest.h
5456#ifndef DEFINED_IN_CONFTESTD1
5457#error "include_next test doesn't work"
5458#endif
5459#define DEFINED_IN_CONFTESTD2
5460EOF
5461 gl_save_CPPFLAGS="$CPPFLAGS"
5462 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <conftest.h>
5466_ACEOF
5467if ac_fn_c_try_compile "$LINENO"; then :
5468 gl_cv_have_include_next=yes
5469else
5470 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5472/* end confdefs.h. */
5473#include <conftest.h>
5474_ACEOF
5475if ac_fn_c_try_compile "$LINENO"; then :
5476 gl_cv_have_include_next=buggy
5477else
5478 gl_cv_have_include_next=no
5479fi
5480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5481
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484 CPPFLAGS="$gl_save_CPPFLAGS"
5485 rm -rf conftestd1a conftestd1b conftestd2
5486
5487fi
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5489$as_echo "$gl_cv_have_include_next" >&6; }
5490 PRAGMA_SYSTEM_HEADER=
5491 if test $gl_cv_have_include_next = yes; then
5492 INCLUDE_NEXT=include_next
5493 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5494 if test -n "$GCC"; then
5495 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5496 fi
5497 else
5498 if test $gl_cv_have_include_next = buggy; then
5499 INCLUDE_NEXT=include
5500 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5501 else
5502 INCLUDE_NEXT=include
5503 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5504 fi
5505 fi
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
81ecdfbb
RW
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5517$as_echo_n "checking for long long int... " >&6; }
5518if test "${ac_cv_type_long_long_int+set}" = set; then :
5519 $as_echo_n "(cached) " >&6
783e057b 5520else
81ecdfbb 5521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5522/* end confdefs.h. */
81ecdfbb
RW
5523
5524 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5525 implementations with broken preprocessors. Perhaps this can
5526 be revisited in 2012. In the meantime, code should not expect
5527 #if to work with literals wider than 32 bits. */
783e057b
DJ
5528 /* Test literals. */
5529 long long int ll = 9223372036854775807ll;
5530 long long int nll = -9223372036854775807LL;
5531 unsigned long long int ull = 18446744073709551615ULL;
5532 /* Test constant expressions. */
5533 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5534 ? 1 : -1)];
783e057b 5535 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5536 ? 1 : -1)];
783e057b
DJ
5537 int i = 63;
5538int
5539main ()
5540{
5541/* Test availability of runtime routines for shift and division. */
5542 long long int llmax = 9223372036854775807ll;
5543 unsigned long long int ullmax = 18446744073709551615ull;
5544 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5545 | (llmax / ll) | (llmax % ll)
5546 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5547 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5548 ;
5549 return 0;
5550}
5551
5552_ACEOF
81ecdfbb 5553if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5554 if test "$cross_compiling" = yes; then :
783e057b
DJ
5555 ac_cv_type_long_long_int=yes
5556else
81ecdfbb 5557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5558/* end confdefs.h. */
5559#include <limits.h>
f434ba03
PA
5560 #ifndef LLONG_MAX
5561 # define HALF \
5562 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5563 # define LLONG_MAX (HALF - 1 + HALF)
5564 #endif
783e057b
DJ
5565int
5566main ()
5567{
5568long long int n = 1;
f434ba03
PA
5569 int i;
5570 for (i = 0; ; i++)
5571 {
5572 long long int m = n << i;
5573 if (m >> i != n)
5574 return 1;
5575 if (LLONG_MAX / 2 < m)
5576 break;
5577 }
5578 return 0;
783e057b
DJ
5579 ;
5580 return 0;
5581}
5582_ACEOF
81ecdfbb 5583if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5584 ac_cv_type_long_long_int=yes
5585else
81ecdfbb 5586 ac_cv_type_long_long_int=no
783e057b 5587fi
81ecdfbb
RW
5588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5589 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5590fi
783e057b 5591
81ecdfbb
RW
5592else
5593 ac_cv_type_long_long_int=no
783e057b 5594fi
81ecdfbb
RW
5595rm -f core conftest.err conftest.$ac_objext \
5596 conftest$ac_exeext conftest.$ac_ext
783e057b 5597fi
81ecdfbb
RW
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5599$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5600 if test $ac_cv_type_long_long_int = yes; then
5601
81ecdfbb 5602$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5603
5604 fi
5605
5606
81ecdfbb
RW
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5608$as_echo_n "checking for unsigned long long int... " >&6; }
5609if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5610 $as_echo_n "(cached) " >&6
783e057b 5611else
81ecdfbb 5612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5613/* end confdefs.h. */
81ecdfbb
RW
5614
5615 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5616 implementations with broken preprocessors. Perhaps this can
5617 be revisited in 2012. In the meantime, code should not expect
5618 #if to work with literals wider than 32 bits. */
783e057b
DJ
5619 /* Test literals. */
5620 long long int ll = 9223372036854775807ll;
5621 long long int nll = -9223372036854775807LL;
5622 unsigned long long int ull = 18446744073709551615ULL;
5623 /* Test constant expressions. */
5624 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5625 ? 1 : -1)];
783e057b 5626 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5627 ? 1 : -1)];
783e057b
DJ
5628 int i = 63;
5629int
5630main ()
5631{
5632/* Test availability of runtime routines for shift and division. */
5633 long long int llmax = 9223372036854775807ll;
5634 unsigned long long int ullmax = 18446744073709551615ull;
5635 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5636 | (llmax / ll) | (llmax % ll)
5637 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5638 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5639 ;
5640 return 0;
5641}
5642
5643_ACEOF
81ecdfbb 5644if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5645 ac_cv_type_unsigned_long_long_int=yes
5646else
81ecdfbb 5647 ac_cv_type_unsigned_long_long_int=no
783e057b 5648fi
81ecdfbb
RW
5649rm -f core conftest.err conftest.$ac_objext \
5650 conftest$ac_exeext conftest.$ac_ext
783e057b 5651fi
81ecdfbb
RW
5652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5653$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5654 if test $ac_cv_type_unsigned_long_long_int = yes; then
5655
81ecdfbb 5656$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5657
5658 fi
5659
5660
5661
783e057b
DJ
5662
5663
5664
5665
5666
5667
5668
5669
81ecdfbb
RW
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5671$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5672if test "${ac_cv_c_restrict+set}" = set; then :
5673 $as_echo_n "(cached) " >&6
783e057b
DJ
5674else
5675 ac_cv_c_restrict=no
5676 # The order here caters to the fact that C++ does not require restrict.
5677 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5679/* end confdefs.h. */
5680typedef int * int_ptr;
5681 int foo (int_ptr $ac_kw ip) {
5682 return ip[0];
5683 }
5684int
5685main ()
5686{
5687int s[1];
5688 int * $ac_kw t = s;
5689 t[0] = 0;
5690 return foo(t)
5691 ;
5692 return 0;
5693}
5694_ACEOF
81ecdfbb 5695if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5696 ac_cv_c_restrict=$ac_kw
783e057b 5697fi
81ecdfbb 5698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5699 test "$ac_cv_c_restrict" != no && break
5700 done
5701
5702fi
81ecdfbb
RW
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5704$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5705
5706 case $ac_cv_c_restrict in
5707 restrict) ;;
81ecdfbb 5708 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5709 ;;
5710 *) cat >>confdefs.h <<_ACEOF
5711#define restrict $ac_cv_c_restrict
5712_ACEOF
5713 ;;
5714 esac
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
f434ba03 5727
783e057b
DJ
5728 :
5729
5730
5731
5732
5733
5734
5735
f434ba03
PA
5736 if test $gl_cv_have_include_next = yes; then
5737 gl_cv_next_string_h='<'string.h'>'
5738 else
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5740$as_echo_n "checking absolute name of <string.h>... " >&6; }
5741if test "${gl_cv_next_string_h+set}" = set; then :
5742 $as_echo_n "(cached) " >&6
5743else
5744
5745 if test $ac_cv_header_string_h = yes; then
5746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5747/* end confdefs.h. */
5748#include <string.h>
5749
5750_ACEOF
5751 case "$host_os" in
5752 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5753 *) gl_absname_cpp="$ac_cpp" ;;
5754 esac
5755 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5756 sed -n '\#/string.h#{
5757 s#.*"\(.*/string.h\)".*#\1#
5758 s#^/[^/]#//&#
5759 p
5760 q
5761 }'`'"'
5762 else
5763 gl_cv_next_string_h='<'string.h'>'
5764 fi
5765
5766fi
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5768$as_echo "$gl_cv_next_string_h" >&6; }
5769 fi
5770 NEXT_STRING_H=$gl_cv_next_string_h
5771
5772 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5773 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5774 gl_next_as_first_directive='<'string.h'>'
5775 else
5776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5777 gl_next_as_first_directive=$gl_cv_next_string_h
5778 fi
5779 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5780
5781
5782
5783
5784
5785 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5786 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5788$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5789if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5790 $as_echo_n "(cached) " >&6
5791else
5792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5793/* end confdefs.h. */
5794#include <string.h>
5795
5796int
5797main ()
5798{
5799#undef $gl_func
5800 (void) $gl_func;
5801 ;
5802 return 0;
5803}
5804_ACEOF
5805if ac_fn_c_try_compile "$LINENO"; then :
5806 eval "$as_gl_Symbol=yes"
5807else
5808 eval "$as_gl_Symbol=no"
5809fi
5810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5811fi
5812eval ac_res=\$$as_gl_Symbol
5813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5814$as_echo "$ac_res" >&6; }
5815 eval as_val=\$$as_gl_Symbol
5816 if test "x$as_val" = x""yes; then :
5817 cat >>confdefs.h <<_ACEOF
5818#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5819_ACEOF
5820
5821 eval ac_cv_have_decl_$gl_func=yes
5822fi
5823 done
5824
5825
5826
5827 GNULIB_BTOWC=0;
5828 GNULIB_WCTOB=0;
5829 GNULIB_MBSINIT=0;
5830 GNULIB_MBRTOWC=0;
5831 GNULIB_MBRLEN=0;
5832 GNULIB_MBSRTOWCS=0;
5833 GNULIB_MBSNRTOWCS=0;
5834 GNULIB_WCRTOMB=0;
5835 GNULIB_WCSRTOMBS=0;
5836 GNULIB_WCSNRTOMBS=0;
5837 GNULIB_WCWIDTH=0;
5838 HAVE_BTOWC=1;
5839 HAVE_MBSINIT=1;
5840 HAVE_MBRTOWC=1;
5841 HAVE_MBRLEN=1;
5842 HAVE_MBSRTOWCS=1;
5843 HAVE_MBSNRTOWCS=1;
5844 HAVE_WCRTOMB=1;
5845 HAVE_WCSRTOMBS=1;
5846 HAVE_WCSNRTOMBS=1;
5847 HAVE_DECL_WCTOB=1;
5848 HAVE_DECL_WCWIDTH=1;
5849 REPLACE_MBSTATE_T=0;
5850 REPLACE_BTOWC=0;
5851 REPLACE_WCTOB=0;
5852 REPLACE_MBSINIT=0;
5853 REPLACE_MBRTOWC=0;
5854 REPLACE_MBRLEN=0;
5855 REPLACE_MBSRTOWCS=0;
5856 REPLACE_MBSNRTOWCS=0;
5857 REPLACE_WCRTOMB=0;
5858 REPLACE_WCSRTOMBS=0;
5859 REPLACE_WCSNRTOMBS=0;
5860 REPLACE_WCWIDTH=0;
5861
5862
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5864$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5865if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5866 $as_echo_n "(cached) " >&6
783e057b 5867else
f434ba03
PA
5868 gl_cv_header_wchar_h_correct_inline=yes
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870/* end confdefs.h. */
783e057b 5871
f434ba03
PA
5872 #define wcstod renamed_wcstod
5873#include <wchar.h>
5874extern int zero (void);
5875int main () { return zero(); }
5876
5877_ACEOF
5878 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5879 (eval $ac_compile) 2>&5
5880 ac_status=$?
5881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5882 test $ac_status = 0; }; then
5883 mv conftest.$ac_objext conftest1.$ac_objext
5884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5885/* end confdefs.h. */
f434ba03
PA
5886
5887 #define wcstod renamed_wcstod
5888#include <wchar.h>
5889int zero (void) { return 0; }
783e057b
DJ
5890
5891_ACEOF
f434ba03
PA
5892 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5893 (eval $ac_compile) 2>&5
5894 ac_status=$?
5895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5896 test $ac_status = 0; }; then
5897 mv conftest.$ac_objext conftest2.$ac_objext
5898 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5899 :
5900 else
5901 gl_cv_header_wchar_h_correct_inline=no
5902 fi
5903 fi
5904 fi
5905 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5906
5907fi
f434ba03
PA
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5909$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5910 if test $gl_cv_header_wchar_h_correct_inline = no; then
5911 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5912This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5913C99 mode. You have four options:
5914 - Add the flag -fgnu89-inline to CC and reconfigure, or
5915 - Fix your include files, using parts of
5916 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5917 - Use a gcc version older than 4.3, or
5918 - Don't use the flags -std=c99 or -std=gnu99.
5919Configuration aborted." "$LINENO" 5
5920 fi
783e057b
DJ
5921
5922
f434ba03
PA
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5924$as_echo_n "checking for wint_t... " >&6; }
5925if test "${gt_cv_c_wint_t+set}" = set; then :
5926 $as_echo_n "(cached) " >&6
5927else
5928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929/* end confdefs.h. */
783e057b 5930
f434ba03
PA
5931/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5932 <wchar.h>.
5933 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5934 before <wchar.h>. */
5935#include <stddef.h>
5936#include <stdio.h>
5937#include <time.h>
5938#include <wchar.h>
5939 wint_t foo = (wchar_t)'\0';
5940int
5941main ()
5942{
783e057b 5943
f434ba03
PA
5944 ;
5945 return 0;
5946}
5947_ACEOF
5948if ac_fn_c_try_compile "$LINENO"; then :
5949 gt_cv_c_wint_t=yes
5950else
5951 gt_cv_c_wint_t=no
5952fi
5953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5954fi
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5956$as_echo "$gt_cv_c_wint_t" >&6; }
5957 if test $gt_cv_c_wint_t = yes; then
783e057b 5958
f434ba03 5959$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5960
f434ba03 5961 fi
783e057b
DJ
5962
5963
81ecdfbb 5964 if false; then
783e057b
DJ
5965 GL_COND_LIBTOOL_TRUE=
5966 GL_COND_LIBTOOL_FALSE='#'
5967else
5968 GL_COND_LIBTOOL_TRUE='#'
5969 GL_COND_LIBTOOL_FALSE=
5970fi
5971
5972 gl_cond_libtool=false
5973 gl_libdeps=
5974 gl_ltlibdeps=
f434ba03 5975 gl_m4_base='gnulib/m4'
783e057b
DJ
5976
5977
5978
783e057b
DJ
5979
5980
5981
5982
5983
5984
f434ba03
PA
5985 gl_source_base='gnulib'
5986 # Code from module arg-nonnull:
5987 # Code from module c++defs:
5988 # Code from module extensions:
5989 # Code from module include_next:
5990 # Code from module memchr:
783e057b 5991
783e057b 5992
783e057b 5993
783e057b 5994
f434ba03 5995 GNULIB_MEMCHR=1
783e057b 5996
783e057b 5997
783e057b 5998
f434ba03 5999$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6000
783e057b
DJ
6001
6002
f434ba03 6003 # Code from module memmem:
783e057b
DJ
6004
6005
f434ba03
PA
6006 if test $ac_cv_have_decl_memmem = yes; then
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6008$as_echo_n "checking whether memmem works in linear time... " >&6; }
6009if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6010 $as_echo_n "(cached) " >&6
783e057b 6011else
81ecdfbb 6012 if test "$cross_compiling" = yes; then :
f434ba03 6013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6014/* end confdefs.h. */
783e057b 6015
f434ba03
PA
6016#include <features.h>
6017#ifdef __GNU_LIBRARY__
6018 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6019 Lucky user
6020 #endif
6021#endif
6022#ifdef __CYGWIN__
6023 #include <cygwin/version.h>
6024 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6025 Lucky user
6026 #endif
6027#endif
783e057b 6028
783e057b 6029_ACEOF
f434ba03
PA
6030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6031 $EGREP "Lucky user" >/dev/null 2>&1; then :
6032 gl_cv_func_memmem_works=yes
783e057b 6033else
f434ba03 6034 gl_cv_func_memmem_works="guessing no"
783e057b 6035fi
f434ba03 6036rm -f conftest*
783e057b
DJ
6037
6038
783e057b 6039else
81ecdfbb 6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6041/* end confdefs.h. */
6042
f434ba03 6043#include <signal.h> /* for signal */
783e057b
DJ
6044#include <string.h> /* for memmem */
6045#include <stdlib.h> /* for malloc */
6046#include <unistd.h> /* for alarm */
6047
6048int
6049main ()
6050{
6051size_t m = 1000000;
6052 char *haystack = (char *) malloc (2 * m + 1);
6053 char *needle = (char *) malloc (m + 1);
6054 void *result = 0;
6055 /* Failure to compile this test due to missing alarm is okay,
6056 since all such platforms (mingw) also lack memmem. */
f434ba03 6057 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6058 alarm (5);
6059 /* Check for quadratic performance. */
6060 if (haystack && needle)
6061 {
f434ba03
PA
6062 memset (haystack, 'A', 2 * m);
6063 haystack[2 * m] = 'B';
6064 memset (needle, 'A', m);
6065 needle[m] = 'B';
6066 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6067 }
6068 /* Check for empty needle behavior. */
6069 return !result || !memmem ("a", 1, 0, 0);
6070 ;
6071 return 0;
6072}
6073_ACEOF
81ecdfbb 6074if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6075 gl_cv_func_memmem_works=yes
6076else
81ecdfbb 6077 gl_cv_func_memmem_works=no
783e057b 6078fi
81ecdfbb
RW
6079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6080 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6081fi
81ecdfbb 6082
f434ba03 6083
783e057b 6084fi
81ecdfbb
RW
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6086$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6087 if test "$gl_cv_func_memmem_works" != yes; then
6088 REPLACE_MEMMEM=1
6089
6090
6091
6092
6093
6094
6095
f434ba03 6096
783e057b
DJ
6097 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6098
6099 fi
6100 fi
6101
f434ba03
PA
6102 # Code from module memmem-simple:
6103
783e057b
DJ
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
81ecdfbb
RW
6115 for ac_func in memmem
6116do :
6117 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6118if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6119 cat >>confdefs.h <<_ACEOF
81ecdfbb 6120#define HAVE_MEMMEM 1
783e057b
DJ
6121_ACEOF
6122
6123else
6124
6125 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6126
6127fi
6128done
6129
6130
6131
6132 :
6133
6134
6135
6136
6137
6138 if test $ac_cv_have_decl_memmem = no; then
6139 HAVE_DECL_MEMMEM=0
6140 fi
6141 :
6142
6143
6144
f434ba03 6145
783e057b
DJ
6146 GNULIB_MEMMEM=1
6147
6148
6149
f434ba03
PA
6150$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6151
6152
6153
6154 # Code from module multiarch:
6155
6156 # Code from module stddef:
6157
6158
6159
6160 if test $gt_cv_c_wchar_t = no; then
6161 HAVE_WCHAR_T=0
6162 STDDEF_H=stddef.h
6163 fi
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6165$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6166if test "${gl_cv_decl_null_works+set}" = set; then :
6167 $as_echo_n "(cached) " >&6
6168else
6169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6170/* end confdefs.h. */
6171#include <stddef.h>
6172 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6173
6174int
6175main ()
6176{
6177
6178 ;
6179 return 0;
6180}
6181_ACEOF
6182if ac_fn_c_try_compile "$LINENO"; then :
6183 gl_cv_decl_null_works=yes
6184else
6185 gl_cv_decl_null_works=no
6186fi
6187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6188fi
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6190$as_echo "$gl_cv_decl_null_works" >&6; }
6191 if test $gl_cv_decl_null_works = no; then
6192 REPLACE_NULL=1
6193 STDDEF_H=stddef.h
6194 fi
6195 if test -n "$STDDEF_H"; then
6196
6197
6198
6199
6200 :
6201
6202
6203
6204
6205
6206
6207
6208 if test $gl_cv_have_include_next = yes; then
6209 gl_cv_next_stddef_h='<'stddef.h'>'
6210 else
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6212$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6213if test "${gl_cv_next_stddef_h+set}" = set; then :
6214 $as_echo_n "(cached) " >&6
6215else
6216
6217 if test $ac_cv_header_stddef_h = yes; then
6218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6219/* end confdefs.h. */
6220#include <stddef.h>
6221
6222_ACEOF
6223 case "$host_os" in
6224 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6225 *) gl_absname_cpp="$ac_cpp" ;;
6226 esac
6227 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6228 sed -n '\#/stddef.h#{
6229 s#.*"\(.*/stddef.h\)".*#\1#
6230 s#^/[^/]#//&#
6231 p
6232 q
6233 }'`'"'
6234 else
6235 gl_cv_next_stddef_h='<'stddef.h'>'
6236 fi
6237
6238fi
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6240$as_echo "$gl_cv_next_stddef_h" >&6; }
6241 fi
6242 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6243
6244 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6245 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6246 gl_next_as_first_directive='<'stddef.h'>'
6247 else
6248 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6249 gl_next_as_first_directive=$gl_cv_next_stddef_h
6250 fi
6251 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6252
6253
6254
6255 fi
6256
6257 # Code from module stdint:
6258
6259
783e057b
DJ
6260
6261 if test $ac_cv_type_long_long_int = yes; then
6262 HAVE_LONG_LONG_INT=1
6263 else
6264 HAVE_LONG_LONG_INT=0
6265 fi
6266
6267
6268 if test $ac_cv_type_unsigned_long_long_int = yes; then
6269 HAVE_UNSIGNED_LONG_LONG_INT=1
6270 else
6271 HAVE_UNSIGNED_LONG_LONG_INT=0
6272 fi
6273
6274
6275 if test $ac_cv_header_inttypes_h = yes; then
6276 HAVE_INTTYPES_H=1
6277 else
6278 HAVE_INTTYPES_H=0
6279 fi
6280
6281
6282 if test $ac_cv_header_sys_types_h = yes; then
6283 HAVE_SYS_TYPES_H=1
6284 else
6285 HAVE_SYS_TYPES_H=0
6286 fi
6287
6288
6289
6290
6291
f434ba03 6292
783e057b
DJ
6293 :
6294
6295
6296
6297
6298
6299
6300
6301 if test $gl_cv_have_include_next = yes; then
6302 gl_cv_next_stdint_h='<'stdint.h'>'
6303 else
81ecdfbb
RW
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6305$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6306if test "${gl_cv_next_stdint_h+set}" = set; then :
6307 $as_echo_n "(cached) " >&6
783e057b
DJ
6308else
6309
f434ba03
PA
6310 if test $ac_cv_header_stdint_h = yes; then
6311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6312/* end confdefs.h. */
6313#include <stdint.h>
6314
6315_ACEOF
f434ba03
PA
6316 case "$host_os" in
6317 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6318 *) gl_absname_cpp="$ac_cpp" ;;
6319 esac
6320 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6321 sed -n '\#/stdint.h#{
6322 s#.*"\(.*/stdint.h\)".*#\1#
6323 s#^/[^/]#//&#
6324 p
6325 q
6326 }'`'"'
6327 else
6328 gl_cv_next_stdint_h='<'stdint.h'>'
6329 fi
783e057b
DJ
6330
6331fi
81ecdfbb
RW
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6333$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6334 fi
6335 NEXT_STDINT_H=$gl_cv_next_stdint_h
6336
f434ba03
PA
6337 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6338 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6339 gl_next_as_first_directive='<'stdint.h'>'
6340 else
6341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6342 gl_next_as_first_directive=$gl_cv_next_stdint_h
6343 fi
6344 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6345
783e057b
DJ
6346
6347
6348 if test $ac_cv_header_stdint_h = yes; then
6349 HAVE_STDINT_H=1
6350 else
6351 HAVE_STDINT_H=0
6352 fi
6353
6354
6355 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6357$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6358if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6359 $as_echo_n "(cached) " >&6
783e057b
DJ
6360else
6361 gl_cv_header_working_stdint_h=no
81ecdfbb 6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6363/* end confdefs.h. */
6364
81ecdfbb 6365
783e057b
DJ
6366#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6367#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6368#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6369#include <stdint.h>
6370/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6371#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6372#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6373#endif
6374
6375
6376 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6377 included before <wchar.h>. */
6378 #include <stddef.h>
6379 #include <signal.h>
6380 #if HAVE_WCHAR_H
6381 # include <stdio.h>
6382 # include <time.h>
6383 # include <wchar.h>
6384 #endif
6385
6386
6387#ifdef INT8_MAX
6388int8_t a1 = INT8_MAX;
6389int8_t a1min = INT8_MIN;
6390#endif
6391#ifdef INT16_MAX
6392int16_t a2 = INT16_MAX;
6393int16_t a2min = INT16_MIN;
6394#endif
6395#ifdef INT32_MAX
6396int32_t a3 = INT32_MAX;
6397int32_t a3min = INT32_MIN;
6398#endif
6399#ifdef INT64_MAX
6400int64_t a4 = INT64_MAX;
6401int64_t a4min = INT64_MIN;
6402#endif
6403#ifdef UINT8_MAX
6404uint8_t b1 = UINT8_MAX;
6405#else
6406typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6407#endif
6408#ifdef UINT16_MAX
6409uint16_t b2 = UINT16_MAX;
6410#endif
6411#ifdef UINT32_MAX
6412uint32_t b3 = UINT32_MAX;
6413#endif
6414#ifdef UINT64_MAX
6415uint64_t b4 = UINT64_MAX;
6416#endif
6417int_least8_t c1 = INT8_C (0x7f);
6418int_least8_t c1max = INT_LEAST8_MAX;
6419int_least8_t c1min = INT_LEAST8_MIN;
6420int_least16_t c2 = INT16_C (0x7fff);
6421int_least16_t c2max = INT_LEAST16_MAX;
6422int_least16_t c2min = INT_LEAST16_MIN;
6423int_least32_t c3 = INT32_C (0x7fffffff);
6424int_least32_t c3max = INT_LEAST32_MAX;
6425int_least32_t c3min = INT_LEAST32_MIN;
6426int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6427int_least64_t c4max = INT_LEAST64_MAX;
6428int_least64_t c4min = INT_LEAST64_MIN;
6429uint_least8_t d1 = UINT8_C (0xff);
6430uint_least8_t d1max = UINT_LEAST8_MAX;
6431uint_least16_t d2 = UINT16_C (0xffff);
6432uint_least16_t d2max = UINT_LEAST16_MAX;
6433uint_least32_t d3 = UINT32_C (0xffffffff);
6434uint_least32_t d3max = UINT_LEAST32_MAX;
6435uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6436uint_least64_t d4max = UINT_LEAST64_MAX;
6437int_fast8_t e1 = INT_FAST8_MAX;
6438int_fast8_t e1min = INT_FAST8_MIN;
6439int_fast16_t e2 = INT_FAST16_MAX;
6440int_fast16_t e2min = INT_FAST16_MIN;
6441int_fast32_t e3 = INT_FAST32_MAX;
6442int_fast32_t e3min = INT_FAST32_MIN;
6443int_fast64_t e4 = INT_FAST64_MAX;
6444int_fast64_t e4min = INT_FAST64_MIN;
6445uint_fast8_t f1 = UINT_FAST8_MAX;
6446uint_fast16_t f2 = UINT_FAST16_MAX;
6447uint_fast32_t f3 = UINT_FAST32_MAX;
6448uint_fast64_t f4 = UINT_FAST64_MAX;
6449#ifdef INTPTR_MAX
6450intptr_t g = INTPTR_MAX;
6451intptr_t gmin = INTPTR_MIN;
6452#endif
6453#ifdef UINTPTR_MAX
6454uintptr_t h = UINTPTR_MAX;
6455#endif
6456intmax_t i = INTMAX_MAX;
6457uintmax_t j = UINTMAX_MAX;
6458
6459#include <limits.h> /* for CHAR_BIT */
6460#define TYPE_MINIMUM(t) \
6461 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6462#define TYPE_MAXIMUM(t) \
6463 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6464struct s {
6465 int check_PTRDIFF:
6466 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6467 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6468 ? 1 : -1;
6469 /* Detect bug in FreeBSD 6.0 / ia64. */
6470 int check_SIG_ATOMIC:
6471 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6472 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6473 ? 1 : -1;
6474 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6475 int check_WCHAR:
6476 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6477 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6478 ? 1 : -1;
6479 /* Detect bug in mingw. */
6480 int check_WINT:
6481 WINT_MIN == TYPE_MINIMUM (wint_t)
6482 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6483 ? 1 : -1;
6484
f434ba03
PA
6485 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6486 int check_UINT8_C:
6487 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6488 int check_UINT16_C:
6489 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6490
6491 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6492#ifdef UINT8_MAX
6493 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6494#endif
6495#ifdef UINT16_MAX
6496 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6497#endif
6498#ifdef UINT32_MAX
6499 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6500#endif
6501#ifdef UINT64_MAX
6502 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6503#endif
6504 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6505 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6506 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6507 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6508 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6509 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6510 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6511 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6512 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6513 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6514 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6515};
6516
6517int
6518main ()
6519{
6520
6521 ;
6522 return 0;
6523}
6524_ACEOF
6525if ac_fn_c_try_compile "$LINENO"; then :
6526 if test "$cross_compiling" = yes; then :
6527 gl_cv_header_working_stdint_h=yes
6528
6529else
6530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6531/* end confdefs.h. */
6532
6533
6534#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6535#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6536#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6537#include <stdint.h>
6538
783e057b 6539
f434ba03
PA
6540 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6541 included before <wchar.h>. */
6542 #include <stddef.h>
6543 #include <signal.h>
6544 #if HAVE_WCHAR_H
6545 # include <stdio.h>
6546 # include <time.h>
6547 # include <wchar.h>
6548 #endif
6549
6550
6551#include <stdio.h>
6552#include <string.h>
6553#define MVAL(macro) MVAL1(macro)
6554#define MVAL1(expression) #expression
6555static const char *macro_values[] =
6556 {
6557#ifdef INT8_MAX
6558 MVAL (INT8_MAX),
6559#endif
6560#ifdef INT16_MAX
6561 MVAL (INT16_MAX),
6562#endif
6563#ifdef INT32_MAX
6564 MVAL (INT32_MAX),
6565#endif
6566#ifdef INT64_MAX
6567 MVAL (INT64_MAX),
6568#endif
783e057b 6569#ifdef UINT8_MAX
f434ba03 6570 MVAL (UINT8_MAX),
783e057b
DJ
6571#endif
6572#ifdef UINT16_MAX
f434ba03 6573 MVAL (UINT16_MAX),
783e057b
DJ
6574#endif
6575#ifdef UINT32_MAX
f434ba03 6576 MVAL (UINT32_MAX),
783e057b
DJ
6577#endif
6578#ifdef UINT64_MAX
f434ba03 6579 MVAL (UINT64_MAX),
783e057b 6580#endif
f434ba03
PA
6581 NULL
6582 };
783e057b
DJ
6583
6584int
6585main ()
6586{
6587
f434ba03
PA
6588 const char **mv;
6589 for (mv = macro_values; *mv != NULL; mv++)
6590 {
6591 const char *value = *mv;
6592 /* Test whether it looks like a cast expression. */
6593 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6594 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6595 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6596 || strncmp (value, "((int)"/*)*/, 6) == 0
6597 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6598 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6599 return 1;
6600 }
6601 return 0;
6602
783e057b
DJ
6603 ;
6604 return 0;
6605}
6606_ACEOF
f434ba03 6607if ac_fn_c_try_run "$LINENO"; then :
783e057b 6608 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6609fi
6610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6611 conftest.$ac_objext conftest.beam conftest.$ac_ext
6612fi
6613
6614
783e057b 6615fi
81ecdfbb 6616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6617
783e057b 6618fi
81ecdfbb
RW
6619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6620$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6621 fi
6622 if test "$gl_cv_header_working_stdint_h" = yes; then
6623 STDINT_H=
6624 else
81ecdfbb
RW
6625 for ac_header in sys/inttypes.h sys/bitypes.h
6626do :
6627 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6628ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6629eval as_val=\$$as_ac_Header
6630 if test "x$as_val" = x""yes; then :
783e057b 6631 cat >>confdefs.h <<_ACEOF
81ecdfbb 6632#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6633_ACEOF
6634
6635fi
6636
6637done
6638
6639 if test $ac_cv_header_sys_inttypes_h = yes; then
6640 HAVE_SYS_INTTYPES_H=1
6641 else
6642 HAVE_SYS_INTTYPES_H=0
6643 fi
6644
6645 if test $ac_cv_header_sys_bitypes_h = yes; then
6646 HAVE_SYS_BITYPES_H=1
6647 else
6648 HAVE_SYS_BITYPES_H=0
6649 fi
6650
6651
6652
6653 :
6654
6655
6656
6657
6658
6659
6660
6661
f434ba03
PA
6662 if test $APPLE_UNIVERSAL_BUILD = 0; then
6663
6664
6665 for gltype in ptrdiff_t size_t ; do
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6667$as_echo_n "checking for bit size of $gltype... " >&6; }
6668if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6669 $as_echo_n "(cached) " >&6
6670else
6671 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6672 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6673 included before <wchar.h>. */
6674 #include <stddef.h>
6675 #include <signal.h>
6676 #if HAVE_WCHAR_H
6677 # include <stdio.h>
6678 # include <time.h>
6679 # include <wchar.h>
6680 #endif
6681
6682#include <limits.h>"; then :
6683
6684else
6685 result=unknown
6686fi
6687
6688 eval gl_cv_bitsizeof_${gltype}=\$result
6689
6690fi
6691eval ac_res=\$gl_cv_bitsizeof_${gltype}
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6693$as_echo "$ac_res" >&6; }
6694 eval result=\$gl_cv_bitsizeof_${gltype}
6695 if test $result = unknown; then
6696 result=0
6697 fi
6698 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6699 cat >>confdefs.h <<_ACEOF
6700#define BITSIZEOF_${GLTYPE} $result
6701_ACEOF
6702
6703 eval BITSIZEOF_${GLTYPE}=\$result
6704 done
6705
6706
6707 fi
6708
783e057b 6709
f434ba03 6710 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6712$as_echo_n "checking for bit size of $gltype... " >&6; }
6713if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6714 $as_echo_n "(cached) " >&6
6715else
6716 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6717 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6718 included before <wchar.h>. */
6719 #include <stddef.h>
6720 #include <signal.h>
6721 #if HAVE_WCHAR_H
6722 # include <stdio.h>
6723 # include <time.h>
6724 # include <wchar.h>
6725 #endif
6726
6727#include <limits.h>"; then :
6728
6729else
6730 result=unknown
6731fi
6732
6733 eval gl_cv_bitsizeof_${gltype}=\$result
6734
6735fi
6736eval ac_res=\$gl_cv_bitsizeof_${gltype}
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6738$as_echo "$ac_res" >&6; }
6739 eval result=\$gl_cv_bitsizeof_${gltype}
6740 if test $result = unknown; then
6741 result=0
6742 fi
6743 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6744 cat >>confdefs.h <<_ACEOF
6745#define BITSIZEOF_${GLTYPE} $result
6746_ACEOF
783e057b 6747
81ecdfbb
RW
6748 eval BITSIZEOF_${GLTYPE}=\$result
6749 done
783e057b
DJ
6750
6751
6752
6753
81ecdfbb
RW
6754 for gltype in sig_atomic_t wchar_t wint_t ; do
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6756$as_echo_n "checking whether $gltype is signed... " >&6; }
6757if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6758 $as_echo_n "(cached) " >&6
783e057b 6759else
81ecdfbb 6760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6761/* end confdefs.h. */
6762
6763 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6764 included before <wchar.h>. */
6765 #include <stddef.h>
6766 #include <signal.h>
6767 #if HAVE_WCHAR_H
6768 # include <stdio.h>
6769 # include <time.h>
6770 # include <wchar.h>
6771 #endif
6772
6773 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6774int
6775main ()
6776{
6777
6778 ;
6779 return 0;
6780}
6781_ACEOF
81ecdfbb 6782if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6783 result=yes
6784else
81ecdfbb 6785 result=no
20e95c23 6786fi
81ecdfbb 6787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6788 eval gl_cv_type_${gltype}_signed=\$result
6789
6790fi
81ecdfbb
RW
6791eval ac_res=\$gl_cv_type_${gltype}_signed
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6793$as_echo "$ac_res" >&6; }
783e057b
DJ
6794 eval result=\$gl_cv_type_${gltype}_signed
6795 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6796 if test "$result" = yes; then
6797 cat >>confdefs.h <<_ACEOF
6798#define HAVE_SIGNED_${GLTYPE} 1
6799_ACEOF
6800
6801 eval HAVE_SIGNED_${GLTYPE}=1
6802 else
6803 eval HAVE_SIGNED_${GLTYPE}=0
6804 fi
6805 done
6806
6807
6808 gl_cv_type_ptrdiff_t_signed=yes
6809 gl_cv_type_size_t_signed=no
f434ba03 6810 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6811
6812
f434ba03 6813 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6815$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6816if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6817 $as_echo_n "(cached) " >&6
c906108c 6818else
783e057b
DJ
6819 eval gl_cv_type_${gltype}_suffix=no
6820 eval result=\$gl_cv_type_${gltype}_signed
6821 if test "$result" = yes; then
6822 glsufu=
6823 else
6824 glsufu=u
6825 fi
6826 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6827 case $glsuf in
6828 '') gltype1='int';;
f434ba03
PA
6829 l) gltype1='long int';;
6830 ll) gltype1='long long int';;
6831 i64) gltype1='__int64';;
6832 u) gltype1='unsigned int';;
6833 ul) gltype1='unsigned long int';;
6834 ull) gltype1='unsigned long long int';;
783e057b
DJ
6835 ui64)gltype1='unsigned __int64';;
6836 esac
81ecdfbb 6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6838/* end confdefs.h. */
6839
6840 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6841 included before <wchar.h>. */
6842 #include <stddef.h>
6843 #include <signal.h>
6844 #if HAVE_WCHAR_H
6845 # include <stdio.h>
6846 # include <time.h>
6847 # include <wchar.h>
6848 #endif
6849
6850 extern $gltype foo;
6851 extern $gltype1 foo;
6852int
6853main ()
6854{
6855
6856 ;
6857 return 0;
6858}
6859_ACEOF
81ecdfbb 6860if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6861 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6862fi
81ecdfbb 6863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6864 eval result=\$gl_cv_type_${gltype}_suffix
6865 test "$result" != no && break
6866 done
6867fi
81ecdfbb
RW
6868eval ac_res=\$gl_cv_type_${gltype}_suffix
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6870$as_echo "$ac_res" >&6; }
783e057b
DJ
6871 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6872 eval result=\$gl_cv_type_${gltype}_suffix
6873 test "$result" = no && result=
6874 eval ${GLTYPE}_SUFFIX=\$result
6875 cat >>confdefs.h <<_ACEOF
6876#define ${GLTYPE}_SUFFIX $result
6877_ACEOF
6878
6879 done
6880
6881
783e057b
DJ
6882 fi
6883
6884
f434ba03
PA
6885 for gltype in sig_atomic_t wchar_t wint_t ; do
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6887$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6888if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6889 $as_echo_n "(cached) " >&6
783e057b 6890else
f434ba03
PA
6891 eval gl_cv_type_${gltype}_suffix=no
6892 eval result=\$gl_cv_type_${gltype}_signed
6893 if test "$result" = yes; then
6894 glsufu=
6895 else
6896 glsufu=u
6897 fi
6898 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6899 case $glsuf in
6900 '') gltype1='int';;
6901 l) gltype1='long int';;
6902 ll) gltype1='long long int';;
6903 i64) gltype1='__int64';;
6904 u) gltype1='unsigned int';;
6905 ul) gltype1='unsigned long int';;
6906 ull) gltype1='unsigned long long int';;
6907 ui64)gltype1='unsigned __int64';;
6908 esac
6909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6910/* end confdefs.h. */
f434ba03
PA
6911
6912 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6913 included before <wchar.h>. */
6914 #include <stddef.h>
6915 #include <signal.h>
6916 #if HAVE_WCHAR_H
6917 # include <stdio.h>
6918 # include <time.h>
6919 # include <wchar.h>
6920 #endif
6921
6922 extern $gltype foo;
6923 extern $gltype1 foo;
6924int
6925main ()
6926{
6927
6928 ;
6929 return 0;
6930}
783e057b 6931_ACEOF
81ecdfbb 6932if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6933 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6934fi
81ecdfbb 6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6936 eval result=\$gl_cv_type_${gltype}_suffix
6937 test "$result" != no && break
6938 done
783e057b 6939fi
f434ba03
PA
6940eval ac_res=\$gl_cv_type_${gltype}_suffix
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6942$as_echo "$ac_res" >&6; }
6943 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6944 eval result=\$gl_cv_type_${gltype}_suffix
6945 test "$result" = no && result=
6946 eval ${GLTYPE}_SUFFIX=\$result
6947 cat >>confdefs.h <<_ACEOF
6948#define ${GLTYPE}_SUFFIX $result
6949_ACEOF
6950
6951 done
6952
6953
6954
6955 STDINT_H=stdint.h
783e057b
DJ
6956 fi
6957
6958
f434ba03
PA
6959 # Code from module string:
6960
6961
6962
6963 # Code from module warn-on-use:
6964 # Code from module wchar:
6965
6966
6967
6968
783e057b
DJ
6969 :
6970
6971
6972
6973
6974
783e057b
DJ
6975
6976
6977
6978
6979 :
6980
6981
6982
6983
6984
6985
6986
6987 if test $gl_cv_have_include_next = yes; then
6988 gl_cv_next_wchar_h='<'wchar.h'>'
6989 else
81ecdfbb
RW
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6991$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6992if test "${gl_cv_next_wchar_h+set}" = set; then :
6993 $as_echo_n "(cached) " >&6
783e057b
DJ
6994else
6995
f434ba03
PA
6996 if test $ac_cv_header_wchar_h = yes; then
6997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6998/* end confdefs.h. */
6999#include <wchar.h>
7000
7001_ACEOF
f434ba03
PA
7002 case "$host_os" in
7003 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7004 *) gl_absname_cpp="$ac_cpp" ;;
7005 esac
7006 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7007 sed -n '\#/wchar.h#{
7008 s#.*"\(.*/wchar.h\)".*#\1#
7009 s#^/[^/]#//&#
7010 p
7011 q
7012 }'`'"'
7013 else
7014 gl_cv_next_wchar_h='<'wchar.h'>'
7015 fi
783e057b
DJ
7016
7017fi
81ecdfbb
RW
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7019$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7020 fi
7021 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7022
f434ba03
PA
7023 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7024 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7025 gl_next_as_first_directive='<'wchar.h'>'
7026 else
7027 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7028 gl_next_as_first_directive=$gl_cv_next_wchar_h
7029 fi
7030 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7031
7032
7033
7034 if test $ac_cv_header_wchar_h = yes; then
7035 HAVE_WCHAR_H=1
7036 else
7037 HAVE_WCHAR_H=0
7038 fi
7039
7040
7041
7042 if test $gt_cv_c_wint_t = yes; then
7043 HAVE_WINT_T=1
7044 else
7045 HAVE_WINT_T=0
7046 fi
7047
7048
7049
7050 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7051 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7053$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7054if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7055 $as_echo_n "(cached) " >&6
7056else
7057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7058/* end confdefs.h. */
7059
7060/* Some systems require additional headers. */
7061#ifndef __GLIBC__
7062# include <stddef.h>
7063# include <stdio.h>
7064# include <time.h>
7065#endif
7066#include <wchar.h>
7067
7068int
7069main ()
7070{
7071#undef $gl_func
7072 (void) $gl_func;
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077if ac_fn_c_try_compile "$LINENO"; then :
7078 eval "$as_gl_Symbol=yes"
7079else
7080 eval "$as_gl_Symbol=no"
7081fi
7082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7083fi
7084eval ac_res=\$$as_gl_Symbol
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7086$as_echo "$ac_res" >&6; }
7087 eval as_val=\$$as_gl_Symbol
7088 if test "x$as_val" = x""yes; then :
7089 cat >>confdefs.h <<_ACEOF
7090#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7091_ACEOF
7092
7093 eval ac_cv_have_decl_$gl_func=yes
7094fi
7095 done
7096
7097
7098 # Code from module dummy:
7099 # End of code from modules
7100
7101
c906108c 7102
c906108c 7103
c906108c 7104
c906108c 7105
c906108c 7106
c906108c 7107
c906108c 7108
783e057b
DJ
7109 gltests_libdeps=
7110 gltests_ltlibdeps=
20e95c23 7111
20e95c23 7112
20e95c23 7113
f434ba03
PA
7114
7115
7116
7117
7118
7119
783e057b 7120 gl_source_base='tests'
f434ba03
PA
7121 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
7122
7123 gl_module_indicator_condition=$gltests_WITNESS
7124
7125
7126
7127
7128
c906108c 7129
bec39cab 7130
bec39cab 7131
783e057b
DJ
7132
7133 LIBGNU_LIBDEPS="$gl_libdeps"
7134
7135 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7136
7137
e28b3332 7138
d5af19ba
DJ
7139# For Makefile dependencies.
7140GNULIB_STDINT_H=
7141if test x"$STDINT_H" != x; then
7142 GNULIB_STDINT_H=gnulib/$STDINT_H
7143fi
7144
7145
bec39cab
AC
7146PACKAGE=gdb
7147
7148cat >>confdefs.h <<_ACEOF
7149#define PACKAGE "$PACKAGE"
7150_ACEOF
7151
7152
7153
e28b3332
DJ
7154# GDB does not use automake, but gnulib does. This line lets us
7155# generate its Makefile.in.
81ecdfbb
RW
7156am__api_version='1.11'
7157
e28b3332
DJ
7158# Find a good install program. We prefer a C program (faster),
7159# so one script is as good as another. But avoid the broken or
7160# incompatible versions:
7161# SysV /etc/install, /usr/sbin/install
7162# SunOS /usr/etc/install
7163# IRIX /sbin/install
7164# AIX /bin/install
7165# AmigaOS /C/install, which installs bootblocks on floppy discs
7166# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7167# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7168# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7169# OS/2's system install, which has a completely different semantic
7170# ./install, which can be erroneously created by make from ./install.sh.
85541719 7171# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7173$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7174if test -z "$INSTALL"; then
81ecdfbb
RW
7175if test "${ac_cv_path_install+set}" = set; then :
7176 $as_echo_n "(cached) " >&6
e28b3332
DJ
7177else
7178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179for as_dir in $PATH
7180do
7181 IFS=$as_save_IFS
7182 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7183 # Account for people who put trailing slashes in PATH elements.
7184case $as_dir/ in #((
7185 ./ | .// | /[cC]/* | \
e28b3332 7186 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7187 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7188 /usr/ucb/* ) ;;
7189 *)
7190 # OSF1 and SCO ODT 3.0 have their own names for install.
7191 # Don't use installbsd from OSF since it installs stuff as root
7192 # by default.
7193 for ac_prog in ginstall scoinst install; do
7194 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7195 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7196 if test $ac_prog = install &&
7197 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7198 # AIX install. It has an incompatible calling convention.
7199 :
7200 elif test $ac_prog = install &&
7201 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7202 # program-specific install script used by HP pwplus--don't use.
7203 :
7204 else
85541719
DE
7205 rm -rf conftest.one conftest.two conftest.dir
7206 echo one > conftest.one
7207 echo two > conftest.two
7208 mkdir conftest.dir
7209 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7210 test -s conftest.one && test -s conftest.two &&
7211 test -s conftest.dir/conftest.one &&
7212 test -s conftest.dir/conftest.two
7213 then
7214 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7215 break 3
7216 fi
e28b3332
DJ
7217 fi
7218 fi
7219 done
7220 done
7221 ;;
7222esac
81ecdfbb
RW
7223
7224 done
7225IFS=$as_save_IFS
e28b3332 7226
85541719 7227rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7228
7229fi
7230 if test "${ac_cv_path_install+set}" = set; then
7231 INSTALL=$ac_cv_path_install
7232 else
85541719
DE
7233 # As a last resort, use the slow shell script. Don't cache a
7234 # value for INSTALL within a source directory, because that will
e28b3332 7235 # break other packages using the cache if that directory is
85541719 7236 # removed, or if the value is a relative name.
e28b3332
DJ
7237 INSTALL=$ac_install_sh
7238 fi
7239fi
81ecdfbb
RW
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7241$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7242
7243# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7244# It thinks the first close brace ends the variable substitution.
7245test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7246
7247test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7248
7249test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7250
81ecdfbb
RW
7251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7252$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7253# Just in case
7254sleep 1
7255echo timestamp > conftest.file
81ecdfbb
RW
7256# Reject unsafe characters in $srcdir or the absolute working directory
7257# name. Accept space and tab only in the latter.
7258am_lf='
7259'
7260case `pwd` in
7261 *[\\\"\#\$\&\'\`$am_lf]*)
7262 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7263esac
7264case $srcdir in
7265 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7266 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7267esac
7268
e28b3332
DJ
7269# Do `set' in a subshell so we don't clobber the current shell's
7270# arguments. Must try -L first in case configure is actually a
7271# symlink; some systems play weird games with the mod time of symlinks
7272# (eg FreeBSD returns the mod time of the symlink's containing
7273# directory).
7274if (
81ecdfbb 7275 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7276 if test "$*" = "X"; then
7277 # -L didn't work.
81ecdfbb 7278 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7279 fi
7280 rm -f conftest.file
7281 if test "$*" != "X $srcdir/configure conftest.file" \
7282 && test "$*" != "X conftest.file $srcdir/configure"; then
7283
7284 # If neither matched, then we have a broken ls. This can happen
7285 # if, for instance, CONFIG_SHELL is bash and it inherits a
7286 # broken ls alias from the environment. This has actually
7287 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7288 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7289alias in your environment" "$LINENO" 5
e28b3332
DJ
7290 fi
7291
7292 test "$2" = conftest.file
7293 )
7294then
7295 # Ok.
7296 :
7297else
81ecdfbb
RW
7298 as_fn_error "newly created file is older than distributed files!
7299Check your system clock" "$LINENO" 5
e28b3332 7300fi
81ecdfbb
RW
7301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7302$as_echo "yes" >&6; }
e28b3332 7303test "$program_prefix" != NONE &&
81ecdfbb 7304 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7305# Use a double $ so make ignores it.
7306test "$program_suffix" != NONE &&
81ecdfbb
RW
7307 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7308# Double any \ or $.
e28b3332 7309# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7310ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7311program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7312
7313# expand $ac_aux_dir to an absolute path
7314am_aux_dir=`cd $ac_aux_dir && pwd`
7315
81ecdfbb
RW
7316if test x"${MISSING+set}" != xset; then
7317 case $am_aux_dir in
7318 *\ * | *\ *)
7319 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7320 *)
7321 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7322 esac
7323fi
e28b3332
DJ
7324# Use eval to expand $SHELL
7325if eval "$MISSING --run true"; then
7326 am_missing_run="$MISSING --run "
7327else
7328 am_missing_run=
81ecdfbb
RW
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7330$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7331fi
7332
7333if test x"${install_sh}" != xset; then
7334 case $am_aux_dir in
7335 *\ * | *\ *)
7336 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7337 *)
7338 install_sh="\${SHELL} $am_aux_dir/install-sh"
7339 esac
7340fi
7341
7342# Installed binaries are usually stripped using `strip' when the user
7343# run `make install-strip'. However `strip' might not be the right
7344# tool to use in cross-compilation environments, therefore Automake
7345# will honor the `STRIP' environment variable to overrule this program.
7346if test "$cross_compiling" != no; then
7347 if test -n "$ac_tool_prefix"; then
7348 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7349set dummy ${ac_tool_prefix}strip; ac_word=$2
7350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7351$as_echo_n "checking for $ac_word... " >&6; }
7352if test "${ac_cv_prog_STRIP+set}" = set; then :
7353 $as_echo_n "(cached) " >&6
7354else
7355 if test -n "$STRIP"; then
7356 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7357else
7358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359for as_dir in $PATH
7360do
7361 IFS=$as_save_IFS
7362 test -z "$as_dir" && as_dir=.
7363 for ac_exec_ext in '' $ac_executable_extensions; do
7364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7365 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7367 break 2
7368 fi
7369done
7370 done
7371IFS=$as_save_IFS
7372
7373fi
7374fi
7375STRIP=$ac_cv_prog_STRIP
7376if test -n "$STRIP"; then
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7378$as_echo "$STRIP" >&6; }
7379else
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381$as_echo "no" >&6; }
7382fi
7383
7384
7385fi
7386if test -z "$ac_cv_prog_STRIP"; then
7387 ac_ct_STRIP=$STRIP
7388 # Extract the first word of "strip", so it can be a program name with args.
7389set dummy strip; ac_word=$2
7390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7391$as_echo_n "checking for $ac_word... " >&6; }
7392if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7393 $as_echo_n "(cached) " >&6
7394else
7395 if test -n "$ac_ct_STRIP"; then
7396 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7397else
7398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7399for as_dir in $PATH
7400do
7401 IFS=$as_save_IFS
7402 test -z "$as_dir" && as_dir=.
7403 for ac_exec_ext in '' $ac_executable_extensions; do
7404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7405 ac_cv_prog_ac_ct_STRIP="strip"
7406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407 break 2
7408 fi
7409done
7410 done
7411IFS=$as_save_IFS
7412
7413fi
7414fi
7415ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7416if test -n "$ac_ct_STRIP"; then
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7418$as_echo "$ac_ct_STRIP" >&6; }
7419else
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421$as_echo "no" >&6; }
7422fi
7423
7424 if test "x$ac_ct_STRIP" = x; then
7425 STRIP=":"
7426 else
7427 case $cross_compiling:$ac_tool_warned in
7428yes:)
7429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7431ac_tool_warned=yes ;;
7432esac
7433 STRIP=$ac_ct_STRIP
7434 fi
7435else
7436 STRIP="$ac_cv_prog_STRIP"
7437fi
7438
7439fi
7440INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7441
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7443$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7444if test -z "$MKDIR_P"; then
7445 if test "${ac_cv_path_mkdir+set}" = set; then :
7446 $as_echo_n "(cached) " >&6
7447else
7448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7450do
7451 IFS=$as_save_IFS
7452 test -z "$as_dir" && as_dir=.
7453 for ac_prog in mkdir gmkdir; do
7454 for ac_exec_ext in '' $ac_executable_extensions; do
7455 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7456 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7457 'mkdir (GNU coreutils) '* | \
7458 'mkdir (coreutils) '* | \
7459 'mkdir (fileutils) '4.1*)
7460 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7461 break 3;;
7462 esac
7463 done
7464 done
e28b3332 7465 done
81ecdfbb
RW
7466IFS=$as_save_IFS
7467
7468fi
7469
7470 if test "${ac_cv_path_mkdir+set}" = set; then
7471 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7472 else
81ecdfbb
RW
7473 # As a last resort, use the slow shell script. Don't cache a
7474 # value for MKDIR_P within a source directory, because that will
7475 # break other packages using the cache if that directory is
7476 # removed, or if the value is a relative name.
7477 test -d ./--version && rmdir ./--version
7478 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7479 fi
7480fi
81ecdfbb
RW
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7482$as_echo "$MKDIR_P" >&6; }
7483
f434ba03 7484
81ecdfbb
RW
7485mkdir_p="$MKDIR_P"
7486case $mkdir_p in
7487 [\\/$]* | ?:[\\/]*) ;;
7488 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7489esac
e28b3332
DJ
7490
7491for ac_prog in gawk mawk nawk awk
7492do
7493 # Extract the first word of "$ac_prog", so it can be a program name with args.
7494set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7496$as_echo_n "checking for $ac_word... " >&6; }
7497if test "${ac_cv_prog_AWK+set}" = set; then :
7498 $as_echo_n "(cached) " >&6
e28b3332
DJ
7499else
7500 if test -n "$AWK"; then
7501 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7502else
7503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504for as_dir in $PATH
7505do
7506 IFS=$as_save_IFS
7507 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7508 for ac_exec_ext in '' $ac_executable_extensions; do
7509 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7510 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7512 break 2
7513 fi
7514done
81ecdfbb
RW
7515 done
7516IFS=$as_save_IFS
e28b3332
DJ
7517
7518fi
7519fi
7520AWK=$ac_cv_prog_AWK
7521if test -n "$AWK"; then
81ecdfbb
RW
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7523$as_echo "$AWK" >&6; }
e28b3332 7524else
81ecdfbb
RW
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526$as_echo "no" >&6; }
e28b3332
DJ
7527fi
7528
81ecdfbb 7529
e28b3332
DJ
7530 test -n "$AWK" && break
7531done
7532
81ecdfbb 7533ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7534
7535
7536am_make=${MAKE-make}
7537cat > confinc << 'END'
7538am__doit:
81ecdfbb 7539 @echo this is the am__doit target
e28b3332
DJ
7540.PHONY: am__doit
7541END
7542# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7544$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7545am__include="#"
7546am__quote=
7547_am_result=none
7548# First try GNU make style include.
7549echo "include confinc" > confmf
81ecdfbb
RW
7550# Ignore all kinds of additional output from `make'.
7551case `$am_make -s -f confmf 2> /dev/null` in #(
7552*the\ am__doit\ target*)
7553 am__include=include
7554 am__quote=
7555 _am_result=GNU
7556 ;;
7557esac
e28b3332
DJ
7558# Now try BSD make style include.
7559if test "$am__include" = "#"; then
7560 echo '.include "confinc"' > confmf
81ecdfbb
RW
7561 case `$am_make -s -f confmf 2> /dev/null` in #(
7562 *the\ am__doit\ target*)
7563 am__include=.include
7564 am__quote="\""
7565 _am_result=BSD
7566 ;;
7567 esac
e28b3332
DJ
7568fi
7569
7570
81ecdfbb
RW
7571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7572$as_echo "$_am_result" >&6; }
e28b3332
DJ
7573rm -f confinc confmf
7574
81ecdfbb
RW
7575# Check whether --enable-dependency-tracking was given.
7576if test "${enable_dependency_tracking+set}" = set; then :
7577 enableval=$enable_dependency_tracking;
7578fi
e28b3332 7579
e28b3332
DJ
7580if test "x$enable_dependency_tracking" != xno; then
7581 am_depcomp="$ac_aux_dir/depcomp"
7582 AMDEPBACKSLASH='\'
7583fi
81ecdfbb 7584 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7585 AMDEP_TRUE=
7586 AMDEP_FALSE='#'
7587else
7588 AMDEP_TRUE='#'
7589 AMDEP_FALSE=
7590fi
7591
7592
81ecdfbb
RW
7593if test "`cd $srcdir && pwd`" != "`pwd`"; then
7594 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7595 # is not polluted with repeated "-I."
7596 am__isrc=' -I$(srcdir)'
7597 # test to see if srcdir already configured
7598 if test -f $srcdir/config.status; then
7599 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7600 fi
e28b3332
DJ
7601fi
7602
7603# test whether we have cygpath
7604if test -z "$CYGPATH_W"; then
7605 if (cygpath --version) >/dev/null 2>/dev/null; then
7606 CYGPATH_W='cygpath -w'
7607 else
7608 CYGPATH_W=echo
7609 fi
7610fi
7611
7612
7613# Define the identity of the package.
7614 PACKAGE=gdb
7615 VERSION=UNUSED-VERSION
7616
7617
7618# Some tools Automake needs.
7619
7620ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7621
7622
7623AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7624
7625
7626AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7627
7628
7629AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7630
7631
7632MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7633
e28b3332
DJ
7634# We need awk for the "check" target. The system "awk" is bad on
7635# some platforms.
7636# Always define AMTAR for backward compatibility.
7637
7638AMTAR=${AMTAR-"${am_missing_run}tar"}
7639
7640am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7641
7642
7643
7644
7645depcc="$CC" am_compiler_list=
7646
81ecdfbb
RW
7647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7648$as_echo_n "checking dependency style of $depcc... " >&6; }
7649if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7650 $as_echo_n "(cached) " >&6
e28b3332
DJ
7651else
7652 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7653 # We make a subdir and do the tests there. Otherwise we can end up
7654 # making bogus files that we don't know about and never remove. For
7655 # instance it was reported that on HP-UX the gcc test will end up
7656 # making a dummy file named `D' -- because `-MD' means `put the output
7657 # in D'.
7658 mkdir conftest.dir
7659 # Copy depcomp to subdir because otherwise we won't find it if we're
7660 # using a relative directory.
7661 cp "$am_depcomp" conftest.dir
7662 cd conftest.dir
7663 # We will build objects and dependencies in a subdirectory because
7664 # it helps to detect inapplicable dependency modes. For instance
7665 # both Tru64's cc and ICC support -MD to output dependencies as a
7666 # side effect of compilation, but ICC will put the dependencies in
7667 # the current directory while Tru64 will put them in the object
7668 # directory.
7669 mkdir sub
7670
7671 am_cv_CC_dependencies_compiler_type=none
7672 if test "$am_compiler_list" = ""; then
7673 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7674 fi
81ecdfbb
RW
7675 am__universal=false
7676 case " $depcc " in #(
7677 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7678 esac
7679
e28b3332
DJ
7680 for depmode in $am_compiler_list; do
7681 # Setup a source with many dependencies, because some compilers
7682 # like to wrap large dependency lists on column 80 (with \), and
7683 # we should not choose a depcomp mode which is confused by this.
7684 #
7685 # We need to recreate these files for each test, as the compiler may
7686 # overwrite some of them when testing with obscure command lines.
7687 # This happens at least with the AIX C compiler.
7688 : > sub/conftest.c
7689 for i in 1 2 3 4 5 6; do
7690 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7691 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7692 # Solaris 8's {/usr,}/bin/sh.
7693 touch sub/conftst$i.h
7694 done
7695 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7696
81ecdfbb
RW
7697 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7698 # mode. It turns out that the SunPro C++ compiler does not properly
7699 # handle `-M -o', and we need to detect this. Also, some Intel
7700 # versions had trouble with output in subdirs
7701 am__obj=sub/conftest.${OBJEXT-o}
7702 am__minus_obj="-o $am__obj"
e28b3332 7703 case $depmode in
81ecdfbb
RW
7704 gcc)
7705 # This depmode causes a compiler race in universal mode.
7706 test "$am__universal" = false || continue
7707 ;;
e28b3332
DJ
7708 nosideeffect)
7709 # after this tag, mechanisms are not by side-effect, so they'll
7710 # only be used when explicitly requested
7711 if test "x$enable_dependency_tracking" = xyes; then
7712 continue
7713 else
7714 break
7715 fi
7716 ;;
81ecdfbb
RW
7717 msvisualcpp | msvcmsys)
7718 # This compiler won't grok `-c -o', but also, the minuso test has
7719 # not run yet. These depmodes are late enough in the game, and
7720 # so weak that their functioning should not be impacted.
7721 am__obj=conftest.${OBJEXT-o}
7722 am__minus_obj=
7723 ;;
e28b3332
DJ
7724 none) break ;;
7725 esac
e28b3332 7726 if depmode=$depmode \
81ecdfbb 7727 source=sub/conftest.c object=$am__obj \
e28b3332 7728 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7729 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7730 >/dev/null 2>conftest.err &&
81ecdfbb 7731 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7732 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7733 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7734 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7735 # icc doesn't choke on unknown options, it will just issue warnings
7736 # or remarks (even with -Werror). So we grep stderr for any message
7737 # that says an option was ignored or not supported.
7738 # When given -MP, icc 7.0 and 7.1 complain thusly:
7739 # icc: Command line warning: ignoring option '-M'; no argument required
7740 # The diagnosis changed in icc 8.0:
7741 # icc: Command line remark: option '-MP' not supported
7742 if (grep 'ignoring option' conftest.err ||
7743 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7744 am_cv_CC_dependencies_compiler_type=$depmode
7745 break
7746 fi
7747 fi
7748 done
7749
7750 cd ..
7751 rm -rf conftest.dir
7752else
7753 am_cv_CC_dependencies_compiler_type=none
7754fi
7755
7756fi
81ecdfbb
RW
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7758$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7759CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7760
81ecdfbb 7761 if
e28b3332
DJ
7762 test "x$enable_dependency_tracking" != xno \
7763 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7764 am__fastdepCC_TRUE=
7765 am__fastdepCC_FALSE='#'
7766else
7767 am__fastdepCC_TRUE='#'
7768 am__fastdepCC_FALSE=
7769fi
7770
7771
7772
7773
bec39cab
AC
7774
7775
81ecdfbb
RW
7776# Check whether --with-separate-debug-dir was given.
7777if test "${with_separate_debug_dir+set}" = set; then :
7778 withval=$with_separate_debug_dir;
b14b1491
TT
7779 DEBUGDIR=$withval
7780else
7781 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7782fi
7783
20e95c23 7784
783e057b
DJ
7785 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7786 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7787 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7788 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7789
783e057b
DJ
7790cat >>confdefs.h <<_ACEOF
7791#define DEBUGDIR "$ac_define_dir"
20e95c23 7792_ACEOF
20e95c23 7793
20e95c23 7794
20e95c23 7795
0c4a4063 7796
b14b1491
TT
7797 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7798 if test "x$prefix" = xNONE; then
7799 test_prefix=/usr/local
7800 else
7801 test_prefix=$prefix
7802 fi
783e057b 7803 else
b14b1491 7804 test_prefix=$exec_prefix
783e057b 7805 fi
b14b1491
TT
7806 value=0
7807 case ${ac_define_dir} in
7808 "${test_prefix}"|"${test_prefix}/"*|\
7809 '${exec_prefix}'|'${exec_prefix}/'*)
7810 value=1
7811 ;;
7812 esac
7813
7814cat >>confdefs.h <<_ACEOF
7815#define DEBUGDIR_RELOCATABLE $value
7816_ACEOF
7817
7818
7819
0c4a4063 7820
b14b1491
TT
7821# GDB's datadir relocation
7822
7823
7824
81ecdfbb
RW
7825# Check whether --with-gdb-datadir was given.
7826if test "${with_gdb_datadir+set}" = set; then :
7827 withval=$with_gdb_datadir;
b14b1491 7828 GDB_DATADIR=$withval
20e95c23 7829else
b14b1491 7830 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7831fi
7832
20e95c23 7833
b14b1491
TT
7834 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7835 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7836 ac_define_dir=`eval echo $GDB_DATADIR`
7837 ac_define_dir=`eval echo $ac_define_dir`
7838
7839cat >>confdefs.h <<_ACEOF
7840#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7841_ACEOF
7842
b14b1491
TT
7843
7844
0c4a4063 7845
b14b1491
TT
7846 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7847 if test "x$prefix" = xNONE; then
7848 test_prefix=/usr/local
7849 else
7850 test_prefix=$prefix
7851 fi
7852 else
7853 test_prefix=$exec_prefix
7854 fi
7855 value=0
7856 case ${ac_define_dir} in
7857 "${test_prefix}"|"${test_prefix}/"*|\
7858 '${exec_prefix}'|'${exec_prefix}/'*)
7859 value=1
7860 ;;
7861 esac
7862
7863cat >>confdefs.h <<_ACEOF
7864#define GDB_DATADIR_RELOCATABLE $value
7865_ACEOF
7866
7867
783e057b 7868
20e95c23 7869
0c4a4063 7870
81ecdfbb
RW
7871# Check whether --with-relocated-sources was given.
7872if test "${with_relocated_sources+set}" = set; then :
7873 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7874
7875 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7876 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7877 ac_define_dir=`eval echo $reloc_srcdir`
7878 ac_define_dir=`eval echo $ac_define_dir`
7879
7880cat >>confdefs.h <<_ACEOF
7881#define RELOC_SRCDIR "$ac_define_dir"
7882_ACEOF
7883
7884
7885
81ecdfbb
RW
7886fi
7887
29b0e8a2
JM
7888
7889
20e95c23 7890
5ae98d25 7891subdirs="$subdirs testsuite"
20e95c23
DJ
7892
7893
783e057b 7894# Check whether to support alternative target configurations
81ecdfbb
RW
7895# Check whether --enable-targets was given.
7896if test "${enable_targets+set}" = set; then :
7897 enableval=$enable_targets; case "${enableval}" in
7898 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7899 ;;
7900 no) enable_targets= ;;
7901 *) enable_targets=$enableval ;;
7902esac
81ecdfbb
RW
7903fi
7904
20e95c23 7905
783e057b 7906# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7907# Check whether --enable-64-bit-bfd was given.
7908if test "${enable_64_bit_bfd+set}" = set; then :
7909 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7910 yes) want64=true ;;
7911 no) want64=false ;;
81ecdfbb 7912 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7913esac
7914else
7915 want64=false
81ecdfbb
RW
7916fi
7917
783e057b
DJ
7918# Provide defaults for some variables set by the per-host and per-target
7919# configuration.
7920gdb_host_obs=posix-hdep.o
20e95c23 7921
783e057b
DJ
7922if test "${target}" = "${host}"; then
7923 gdb_native=yes
7924else
7925 gdb_native=no
7926fi
20e95c23 7927
783e057b 7928. $srcdir/configure.host
20e95c23 7929
783e057b 7930# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7931
783e057b
DJ
7932TARGET_OBS=
7933all_targets=
20e95c23 7934
783e057b 7935for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7936do
783e057b
DJ
7937 if test "$targ_alias" = "all"; then
7938 all_targets=true
7939 else
7940 # Canonicalize the secondary target names.
7941 result=`$ac_config_sub $targ_alias 2>/dev/null`
7942 if test -n "$result"; then
7943 targ=$result
7944 else
7945 targ=$targ_alias
7946 fi
20e95c23 7947
783e057b 7948 . ${srcdir}/configure.tgt
20e95c23 7949
bf307134
JB
7950 if test -z "${gdb_target_obs}"; then :
7951 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
7952fi
7953
783e057b
DJ
7954 # Target-specific object files
7955 for i in ${gdb_target_obs}; do
7956 case " $TARGET_OBS " in
7957 *" ${i} "*) ;;
7958 *)
7959 TARGET_OBS="$TARGET_OBS ${i}"
7960 ;;
7961 esac
7962 done
20e95c23 7963
783e057b
DJ
7964 # Check whether this target needs 64-bit CORE_ADDR
7965 if test x${want64} = xfalse; then
7966 . ${srcdir}/../bfd/config.bfd
7967 fi
7968 fi
20e95c23
DJ
7969done
7970
783e057b
DJ
7971if test x${all_targets} = xtrue; then
7972
7973 # We want all 64-bit targets if we either:
7974 # - run on a 64-bit host or
7975 # - already require 64-bit support for some other target or
7976 # - the --enable-64-bit-bfd option was supplied
7977 # Otherwise we only support all 32-bit targets.
7978 #
7979 # NOTE: This test must be in sync with the corresponding
7980 # tests in BFD!
20e95c23 7981
783e057b 7982 if test x${want64} = xfalse; then
81ecdfbb
RW
7983 # The cast to long int works around a bug in the HP C Compiler
7984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7986# This bug is HP SR number 8606223364.
7987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7988$as_echo_n "checking size of long... " >&6; }
7989if test "${ac_cv_sizeof_long+set}" = set; then :
7990 $as_echo_n "(cached) " >&6
c0993dbe 7991else
81ecdfbb 7992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 7993
81ecdfbb
RW
7994else
7995 if test "$ac_cv_type_long" = yes; then
7996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7998{ as_fn_set_status 77
7999as_fn_error "cannot compute sizeof (long)
8000See \`config.log' for more details." "$LINENO" 5; }; }
8001 else
8002 ac_cv_sizeof_long=0
8003 fi
c0993dbe 8004fi
81ecdfbb 8005
c0993dbe 8006fi
81ecdfbb
RW
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8008$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8009
c0993dbe 8010
c0993dbe 8011
c0993dbe
UW
8012cat >>confdefs.h <<_ACEOF
8013#define SIZEOF_LONG $ac_cv_sizeof_long
8014_ACEOF
8015
8016
8017 if test "x${ac_cv_sizeof_long}" = "x8"; then
8018 want64=true
8019 fi
8020 fi
8021 if test x${want64} = xtrue; then
8022 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8023 else
8024 TARGET_OBS='$(ALL_TARGET_OBS)'
8025 fi
8026fi
8027
8028
8029
8030# For other settings, only the main target counts.
8031gdb_sim=
8032gdb_osabi=
8033build_gdbserver=
8034targ=$target; . ${srcdir}/configure.tgt
8035
8036# Fetch the default architecture and default target vector from BFD.
8037targ=$target; . $srcdir/../bfd/config.bfd
8038
8039# We only want the first architecture, so strip off the others if
8040# there is more than one.
8041targ_archs=`echo $targ_archs | sed 's/ .*//'`
8042
8043if test "x$targ_archs" != x; then
8044
8045cat >>confdefs.h <<_ACEOF
8046#define DEFAULT_BFD_ARCH $targ_archs
8047_ACEOF
8048
8049fi
8050if test "x$targ_defvec" != x; then
8051
8052cat >>confdefs.h <<_ACEOF
8053#define DEFAULT_BFD_VEC $targ_defvec
8054_ACEOF
8055
8056fi
8057
c0993dbe
UW
8058# The CLI cannot be disabled yet, but may be in the future.
8059
8060# Enable CLI.
81ecdfbb
RW
8061# Check whether --enable-gdbcli was given.
8062if test "${enable_gdbcli+set}" = set; then :
8063 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8064 yes)
8065 ;;
8066 no)
81ecdfbb 8067 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8068 *)
81ecdfbb 8069 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8070 esac
8071else
8072 enable_gdbcli=yes
81ecdfbb
RW
8073fi
8074
c0993dbe
UW
8075if test x"$enable_gdbcli" = xyes; then
8076 if test -d $srcdir/cli; then
8077 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8078 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8079 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8080 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8081 fi
8082fi
8083
8084# Enable MI.
81ecdfbb
RW
8085# Check whether --enable-gdbmi was given.
8086if test "${enable_gdbmi+set}" = set; then :
8087 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8088 yes | no)
8089 ;;
8090 *)
81ecdfbb 8091 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8092 esac
8093else
8094 enable_gdbmi=yes
81ecdfbb
RW
8095fi
8096
c0993dbe
UW
8097if test x"$enable_gdbmi" = xyes; then
8098 if test -d $srcdir/mi; then
8099 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8100 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8101 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8102 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8103 fi
8104fi
8105
8106# Enable TUI.
81ecdfbb
RW
8107# Check whether --enable-tui was given.
8108if test "${enable_tui+set}" = set; then :
8109 enableval=$enable_tui; case $enableval in
3ca64bd3 8110 yes | no | auto)
c0993dbe
UW
8111 ;;
8112 *)
81ecdfbb 8113 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8114 esac
8115else
3ca64bd3 8116 enable_tui=auto
81ecdfbb
RW
8117fi
8118
c0993dbe
UW
8119
8120# Enable gdbtk.
81ecdfbb
RW
8121# Check whether --enable-gdbtk was given.
8122if test "${enable_gdbtk+set}" = set; then :
8123 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8124 yes | no)
8125 ;;
8126 *)
81ecdfbb 8127 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8128 esac
8129else
5062cc19 8130 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8131 enable_gdbtk=yes
8132 else
8133 enable_gdbtk=no
8134 fi
81ecdfbb
RW
8135fi
8136
c0993dbe
UW
8137# We unconditionally disable gdbtk tests on selected platforms.
8138case $host_os in
8139 go32* | windows*)
81ecdfbb
RW
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8141$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8142 enable_gdbtk=no ;;
8143esac
8144
8145# Libunwind support.
bec39cab 8146
81ecdfbb
RW
8147# Check whether --with-libunwind was given.
8148if test "${with_libunwind+set}" = set; then :
8149 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8150 yes) enable_libunwind=yes ;;
8151 no) enable_libunwind=no ;;
81ecdfbb 8152 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8153esac
bec39cab 8154else
bec39cab 8155
81ecdfbb
RW
8156 for ac_header in libunwind.h libunwind-ia64.h
8157do :
8158 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8159ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8160eval as_val=\$$as_ac_Header
8161 if test "x$as_val" = x""yes; then :
bec39cab 8162 cat >>confdefs.h <<_ACEOF
81ecdfbb 8163#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8164_ACEOF
8165
8166fi
8167
8168done
8169
a9322a30
TT
8170 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8171 enable_libunwind=yes;
8172 fi
8173
bec39cab 8174fi
bec39cab 8175
bec39cab 8176
81ecdfbb
RW
8177if test x"$enable_libunwind" = xyes; then
8178 for ac_header in libunwind.h libunwind-ia64.h
8179do :
8180 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8181ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8182eval as_val=\$$as_ac_Header
8183 if test "x$as_val" = x""yes; then :
bec39cab 8184 cat >>confdefs.h <<_ACEOF
81ecdfbb 8185#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8186_ACEOF
8187
8188fi
8189
8190done
8191
bec39cab 8192
81ecdfbb 8193$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8194
8195 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8196 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8197 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8198fi
8199
cb01cfba
JB
8200opt_curses=no
8201
81ecdfbb
RW
8202# Check whether --with-curses was given.
8203if test "${with_curses+set}" = set; then :
8204 withval=$with_curses; opt_curses=$withval
8205fi
8206
cb01cfba 8207
76a39ba7 8208prefer_curses=no
cb01cfba 8209if test "$opt_curses" = "yes"; then
76a39ba7 8210 prefer_curses=yes
cb01cfba
JB
8211fi
8212
a9322a30 8213# Profiling support.
81ecdfbb
RW
8214# Check whether --enable-profiling was given.
8215if test "${enable_profiling+set}" = set; then :
8216 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8217 yes | no)
8218 ;;
8219 *)
81ecdfbb 8220 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8221 esac
8222else
8223 enable_profiling=no
81ecdfbb 8224fi
bec39cab 8225
a9322a30
TT
8226
8227for ac_func in monstartup _mcleanup
81ecdfbb
RW
8228do :
8229 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8230ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8231eval as_val=\$$as_ac_var
8232 if test "x$as_val" = x""yes; then :
8233 cat >>confdefs.h <<_ACEOF
8234#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8235_ACEOF
a9322a30 8236
81ecdfbb
RW
8237fi
8238done
a9322a30 8239
81ecdfbb
RW
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8241$as_echo_n "checking for _etext... " >&6; }
8242if test "${ac_cv_var__etext+set}" = set; then :
8243 $as_echo_n "(cached) " >&6
8244else
8245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8246/* end confdefs.h. */
8247#include <stdlib.h>
8248extern char _etext;
a9322a30
TT
8249
8250int
8251main ()
8252{
8253free (&_etext);
8254 ;
8255 return 0;
8256}
bec39cab 8257_ACEOF
81ecdfbb 8258if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8259 ac_cv_var__etext=yes
bec39cab 8260else
81ecdfbb 8261 ac_cv_var__etext=no
bec39cab 8262fi
81ecdfbb
RW
8263rm -f core conftest.err conftest.$ac_objext \
8264 conftest$ac_exeext conftest.$ac_ext
bec39cab 8265fi
81ecdfbb
RW
8266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8267$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8268if test $ac_cv_var__etext = yes; then
60ca704f 8269
81ecdfbb 8270$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8271
bec39cab 8272fi
81ecdfbb
RW
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8274$as_echo_n "checking for etext... " >&6; }
8275if test "${ac_cv_var_etext+set}" = set; then :
8276 $as_echo_n "(cached) " >&6
bec39cab 8277else
81ecdfbb 8278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8279/* end confdefs.h. */
a9322a30
TT
8280#include <stdlib.h>
8281extern char etext;
bec39cab
AC
8282
8283int
8284main ()
8285{
a9322a30 8286free (&etext);
bec39cab
AC
8287 ;
8288 return 0;
8289}
8290_ACEOF
81ecdfbb 8291if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8292 ac_cv_var_etext=yes
bec39cab 8293else
81ecdfbb 8294 ac_cv_var_etext=no
bec39cab 8295fi
81ecdfbb
RW
8296rm -f core conftest.err conftest.$ac_objext \
8297 conftest$ac_exeext conftest.$ac_ext
bec39cab 8298fi
81ecdfbb
RW
8299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8300$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8301if test $ac_cv_var_etext = yes; then
8302
81ecdfbb 8303$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8304
8305fi
a9322a30
TT
8306if test "$enable_profiling" = yes ; then
8307 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8308 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8309 fi
8310 PROFILE_CFLAGS=-pg
8311 OLD_CFLAGS="$CFLAGS"
8312 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8313
81ecdfbb
RW
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8315$as_echo_n "checking whether $CC supports -pg... " >&6; }
8316if test "${ac_cv_cc_supports_pg+set}" = set; then :
8317 $as_echo_n "(cached) " >&6
bec39cab 8318else
81ecdfbb 8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8320/* end confdefs.h. */
bec39cab
AC
8321
8322int
8323main ()
8324{
a9322a30 8325int x;
bec39cab
AC
8326 ;
8327 return 0;
8328}
8329_ACEOF
81ecdfbb 8330if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8331 ac_cv_cc_supports_pg=yes
bec39cab 8332else
81ecdfbb 8333 ac_cv_cc_supports_pg=no
bec39cab 8334fi
81ecdfbb 8335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8336fi
81ecdfbb
RW
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8338$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8339
a9322a30 8340 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8341 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8342 fi
bec39cab 8343
a9322a30 8344 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8345fi
8346
c16158bc
JM
8347
8348
81ecdfbb
RW
8349# Check whether --with-pkgversion was given.
8350if test "${with_pkgversion+set}" = set; then :
8351 withval=$with_pkgversion; case "$withval" in
8352 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8353 no) PKGVERSION= ;;
8354 *) PKGVERSION="($withval) " ;;
8355 esac
8356else
8357 PKGVERSION="(GDB) "
8358
81ecdfbb 8359fi
c16158bc
JM
8360
8361
8362
8363
81ecdfbb
RW
8364
8365# Check whether --with-bugurl was given.
8366if test "${with_bugurl+set}" = set; then :
8367 withval=$with_bugurl; case "$withval" in
8368 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8369 no) BUGURL=
8370 ;;
8371 *) BUGURL="$withval"
8372 ;;
8373 esac
8374else
8375 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8376
81ecdfbb
RW
8377fi
8378
c16158bc
JM
8379 case ${BUGURL} in
8380 "")
8381 REPORT_BUGS_TO=
8382 REPORT_BUGS_TEXI=
8383 ;;
8384 *)
8385 REPORT_BUGS_TO="<$BUGURL>"
8386 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8387 ;;
8388 esac;
8389
8390
8391
8392
8393cat >>confdefs.h <<_ACEOF
8394#define PKGVERSION "$PKGVERSION"
8395_ACEOF
8396
8397
8398cat >>confdefs.h <<_ACEOF
8399#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8400_ACEOF
8401
8402
bec39cab
AC
8403# --------------------- #
8404# Checks for programs. #
8405# --------------------- #
8406
8407for ac_prog in gawk mawk nawk awk
8408do
8409 # Extract the first word of "$ac_prog", so it can be a program name with args.
8410set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8412$as_echo_n "checking for $ac_word... " >&6; }
8413if test "${ac_cv_prog_AWK+set}" = set; then :
8414 $as_echo_n "(cached) " >&6
bec39cab
AC
8415else
8416 if test -n "$AWK"; then
8417 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8418else
8419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8420for as_dir in $PATH
8421do
8422 IFS=$as_save_IFS
8423 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8424 for ac_exec_ext in '' $ac_executable_extensions; do
8425 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8426 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8428 break 2
8429 fi
8430done
81ecdfbb
RW
8431 done
8432IFS=$as_save_IFS
bec39cab
AC
8433
8434fi
8435fi
8436AWK=$ac_cv_prog_AWK
8437if test -n "$AWK"; then
81ecdfbb
RW
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8439$as_echo "$AWK" >&6; }
bec39cab 8440else
81ecdfbb
RW
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8442$as_echo "no" >&6; }
bec39cab
AC
8443fi
8444
bec39cab 8445
81ecdfbb 8446 test -n "$AWK" && break
bec39cab
AC
8447done
8448
bec39cab 8449
81ecdfbb
RW
8450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8451$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8452LN_S=$as_ln_s
8453if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8455$as_echo "yes" >&6; }
bec39cab 8456else
81ecdfbb
RW
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8458$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8459fi
8460
8461if test -n "$ac_tool_prefix"; then
8462 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8463set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8465$as_echo_n "checking for $ac_word... " >&6; }
8466if test "${ac_cv_prog_RANLIB+set}" = set; then :
8467 $as_echo_n "(cached) " >&6
bec39cab
AC
8468else
8469 if test -n "$RANLIB"; then
8470 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8471else
8472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8473for as_dir in $PATH
8474do
8475 IFS=$as_save_IFS
8476 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8477 for ac_exec_ext in '' $ac_executable_extensions; do
8478 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8479 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8480 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8481 break 2
8482 fi
8483done
81ecdfbb
RW
8484 done
8485IFS=$as_save_IFS
bec39cab
AC
8486
8487fi
8488fi
8489RANLIB=$ac_cv_prog_RANLIB
8490if test -n "$RANLIB"; then
81ecdfbb
RW
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8492$as_echo "$RANLIB" >&6; }
bec39cab 8493else
81ecdfbb
RW
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495$as_echo "no" >&6; }
bec39cab
AC
8496fi
8497
81ecdfbb 8498
bec39cab
AC
8499fi
8500if test -z "$ac_cv_prog_RANLIB"; then
8501 ac_ct_RANLIB=$RANLIB
8502 # Extract the first word of "ranlib", so it can be a program name with args.
8503set dummy ranlib; ac_word=$2
81ecdfbb
RW
8504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505$as_echo_n "checking for $ac_word... " >&6; }
8506if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8507 $as_echo_n "(cached) " >&6
bec39cab
AC
8508else
8509 if test -n "$ac_ct_RANLIB"; then
8510 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8511else
8512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513for as_dir in $PATH
8514do
8515 IFS=$as_save_IFS
8516 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8517 for ac_exec_ext in '' $ac_executable_extensions; do
8518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8519 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8521 break 2
8522 fi
8523done
81ecdfbb
RW
8524 done
8525IFS=$as_save_IFS
bec39cab 8526
bec39cab
AC
8527fi
8528fi
8529ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8530if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8532$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8533else
81ecdfbb
RW
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535$as_echo "no" >&6; }
bec39cab
AC
8536fi
8537
81ecdfbb
RW
8538 if test "x$ac_ct_RANLIB" = x; then
8539 RANLIB=":"
8540 else
8541 case $cross_compiling:$ac_tool_warned in
8542yes:)
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8545ac_tool_warned=yes ;;
8546esac
8547 RANLIB=$ac_ct_RANLIB
8548 fi
bec39cab
AC
8549else
8550 RANLIB="$ac_cv_prog_RANLIB"
8551fi
8552
8553for ac_prog in 'bison -y' byacc
8554do
8555 # Extract the first word of "$ac_prog", so it can be a program name with args.
8556set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if test "${ac_cv_prog_YACC+set}" = set; then :
8560 $as_echo_n "(cached) " >&6
bec39cab
AC
8561else
8562 if test -n "$YACC"; then
8563 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8564else
8565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568 IFS=$as_save_IFS
8569 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8570 for ac_exec_ext in '' $ac_executable_extensions; do
8571 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8572 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8574 break 2
8575 fi
8576done
81ecdfbb
RW
8577 done
8578IFS=$as_save_IFS
bec39cab
AC
8579
8580fi
8581fi
8582YACC=$ac_cv_prog_YACC
8583if test -n "$YACC"; then
81ecdfbb
RW
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8585$as_echo "$YACC" >&6; }
bec39cab 8586else
81ecdfbb
RW
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8588$as_echo "no" >&6; }
bec39cab
AC
8589fi
8590
81ecdfbb 8591
bec39cab
AC
8592 test -n "$YACC" && break
8593done
8594test -n "$YACC" || YACC="yacc"
8595
8596
8597if test -n "$ac_tool_prefix"; then
8598 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8599set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if test "${ac_cv_prog_AR+set}" = set; then :
8603 $as_echo_n "(cached) " >&6
bec39cab
AC
8604else
8605 if test -n "$AR"; then
8606 ac_cv_prog_AR="$AR" # Let the user override the test.
8607else
8608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611 IFS=$as_save_IFS
8612 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8613 for ac_exec_ext in '' $ac_executable_extensions; do
8614 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8615 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8617 break 2
8618 fi
8619done
81ecdfbb
RW
8620 done
8621IFS=$as_save_IFS
bec39cab
AC
8622
8623fi
8624fi
8625AR=$ac_cv_prog_AR
8626if test -n "$AR"; then
81ecdfbb
RW
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8628$as_echo "$AR" >&6; }
bec39cab 8629else
81ecdfbb
RW
8630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
bec39cab
AC
8632fi
8633
81ecdfbb 8634
bec39cab
AC
8635fi
8636if test -z "$ac_cv_prog_AR"; then
8637 ac_ct_AR=$AR
8638 # Extract the first word of "ar", so it can be a program name with args.
8639set dummy ar; ac_word=$2
81ecdfbb
RW
8640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8641$as_echo_n "checking for $ac_word... " >&6; }
8642if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8643 $as_echo_n "(cached) " >&6
bec39cab
AC
8644else
8645 if test -n "$ac_ct_AR"; then
8646 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8647else
8648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649for as_dir in $PATH
8650do
8651 IFS=$as_save_IFS
8652 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8653 for ac_exec_ext in '' $ac_executable_extensions; do
8654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8655 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8657 break 2
8658 fi
8659done
81ecdfbb
RW
8660 done
8661IFS=$as_save_IFS
bec39cab
AC
8662
8663fi
8664fi
8665ac_ct_AR=$ac_cv_prog_ac_ct_AR
8666if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8668$as_echo "$ac_ct_AR" >&6; }
bec39cab 8669else
81ecdfbb
RW
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8671$as_echo "no" >&6; }
bec39cab
AC
8672fi
8673
81ecdfbb
RW
8674 if test "x$ac_ct_AR" = x; then
8675 AR=""
8676 else
8677 case $cross_compiling:$ac_tool_warned in
8678yes:)
8679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8681ac_tool_warned=yes ;;
8682esac
8683 AR=$ac_ct_AR
8684 fi
bec39cab
AC
8685else
8686 AR="$ac_cv_prog_AR"
8687fi
8688
8689if test -n "$ac_tool_prefix"; then
8690 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8691set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8695 $as_echo_n "(cached) " >&6
bec39cab
AC
8696else
8697 if test -n "$DLLTOOL"; then
8698 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8699else
8700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701for as_dir in $PATH
8702do
8703 IFS=$as_save_IFS
8704 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8705 for ac_exec_ext in '' $ac_executable_extensions; do
8706 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8707 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8709 break 2
8710 fi
8711done
81ecdfbb
RW
8712 done
8713IFS=$as_save_IFS
bec39cab
AC
8714
8715fi
8716fi
8717DLLTOOL=$ac_cv_prog_DLLTOOL
8718if test -n "$DLLTOOL"; then
81ecdfbb
RW
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8720$as_echo "$DLLTOOL" >&6; }
bec39cab 8721else
81ecdfbb
RW
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723$as_echo "no" >&6; }
bec39cab
AC
8724fi
8725
81ecdfbb 8726
bec39cab
AC
8727fi
8728if test -z "$ac_cv_prog_DLLTOOL"; then
8729 ac_ct_DLLTOOL=$DLLTOOL
8730 # Extract the first word of "dlltool", so it can be a program name with args.
8731set dummy dlltool; ac_word=$2
81ecdfbb
RW
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8735 $as_echo_n "(cached) " >&6
bec39cab
AC
8736else
8737 if test -n "$ac_ct_DLLTOOL"; then
8738 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8739else
8740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741for as_dir in $PATH
8742do
8743 IFS=$as_save_IFS
8744 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8745 for ac_exec_ext in '' $ac_executable_extensions; do
8746 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8747 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8749 break 2
8750 fi
8751done
81ecdfbb
RW
8752 done
8753IFS=$as_save_IFS
bec39cab
AC
8754
8755fi
8756fi
8757ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8758if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8760$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8761else
81ecdfbb
RW
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763$as_echo "no" >&6; }
bec39cab
AC
8764fi
8765
81ecdfbb
RW
8766 if test "x$ac_ct_DLLTOOL" = x; then
8767 DLLTOOL=""
8768 else
8769 case $cross_compiling:$ac_tool_warned in
8770yes:)
8771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8773ac_tool_warned=yes ;;
8774esac
8775 DLLTOOL=$ac_ct_DLLTOOL
8776 fi
bec39cab
AC
8777else
8778 DLLTOOL="$ac_cv_prog_DLLTOOL"
8779fi
8780
8781if test -n "$ac_tool_prefix"; then
8782 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8783set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8785$as_echo_n "checking for $ac_word... " >&6; }
8786if test "${ac_cv_prog_WINDRES+set}" = set; then :
8787 $as_echo_n "(cached) " >&6
bec39cab
AC
8788else
8789 if test -n "$WINDRES"; then
8790 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8791else
8792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795 IFS=$as_save_IFS
8796 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8797 for ac_exec_ext in '' $ac_executable_extensions; do
8798 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8799 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8801 break 2
8802 fi
8803done
81ecdfbb
RW
8804 done
8805IFS=$as_save_IFS
bec39cab
AC
8806
8807fi
8808fi
8809WINDRES=$ac_cv_prog_WINDRES
8810if test -n "$WINDRES"; then
81ecdfbb
RW
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8812$as_echo "$WINDRES" >&6; }
bec39cab 8813else
81ecdfbb
RW
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
bec39cab
AC
8816fi
8817
81ecdfbb 8818
bec39cab
AC
8819fi
8820if test -z "$ac_cv_prog_WINDRES"; then
8821 ac_ct_WINDRES=$WINDRES
8822 # Extract the first word of "windres", so it can be a program name with args.
8823set dummy windres; ac_word=$2
81ecdfbb
RW
8824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8825$as_echo_n "checking for $ac_word... " >&6; }
8826if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8827 $as_echo_n "(cached) " >&6
bec39cab
AC
8828else
8829 if test -n "$ac_ct_WINDRES"; then
8830 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8831else
8832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8833for as_dir in $PATH
8834do
8835 IFS=$as_save_IFS
8836 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8837 for ac_exec_ext in '' $ac_executable_extensions; do
8838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8839 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8841 break 2
8842 fi
8843done
81ecdfbb
RW
8844 done
8845IFS=$as_save_IFS
bec39cab
AC
8846
8847fi
8848fi
8849ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8850if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8852$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8853else
81ecdfbb
RW
8854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855$as_echo "no" >&6; }
c906108c 8856fi
bec39cab 8857
81ecdfbb
RW
8858 if test "x$ac_ct_WINDRES" = x; then
8859 WINDRES=""
8860 else
8861 case $cross_compiling:$ac_tool_warned in
8862yes:)
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8865ac_tool_warned=yes ;;
8866esac
8867 WINDRES=$ac_ct_WINDRES
8868 fi
c906108c 8869else
bec39cab 8870 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8871fi
8872
bec39cab
AC
8873
8874# Needed for GNU/Hurd.
8875if test -n "$ac_tool_prefix"; then
8876 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8877set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8879$as_echo_n "checking for $ac_word... " >&6; }
8880if test "${ac_cv_prog_MIG+set}" = set; then :
8881 $as_echo_n "(cached) " >&6
c906108c 8882else
bec39cab
AC
8883 if test -n "$MIG"; then
8884 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8885else
8886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8887for as_dir in $PATH
8888do
8889 IFS=$as_save_IFS
8890 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8891 for ac_exec_ext in '' $ac_executable_extensions; do
8892 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8893 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8895 break 2
8896 fi
8897done
81ecdfbb
RW
8898 done
8899IFS=$as_save_IFS
bec39cab 8900
c906108c 8901fi
bec39cab
AC
8902fi
8903MIG=$ac_cv_prog_MIG
8904if test -n "$MIG"; then
81ecdfbb
RW
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8906$as_echo "$MIG" >&6; }
c906108c 8907else
81ecdfbb
RW
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8909$as_echo "no" >&6; }
c906108c
SS
8910fi
8911
81ecdfbb 8912
bec39cab
AC
8913fi
8914if test -z "$ac_cv_prog_MIG"; then
8915 ac_ct_MIG=$MIG
8916 # Extract the first word of "mig", so it can be a program name with args.
8917set dummy mig; ac_word=$2
81ecdfbb
RW
8918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8919$as_echo_n "checking for $ac_word... " >&6; }
8920if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8921 $as_echo_n "(cached) " >&6
bec39cab
AC
8922else
8923 if test -n "$ac_ct_MIG"; then
8924 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8925else
8926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8927for as_dir in $PATH
8928do
8929 IFS=$as_save_IFS
8930 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8931 for ac_exec_ext in '' $ac_executable_extensions; do
8932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8933 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8935 break 2
8936 fi
8937done
81ecdfbb
RW
8938 done
8939IFS=$as_save_IFS
c906108c 8940
bec39cab
AC
8941fi
8942fi
8943ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8944if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8946$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8947else
81ecdfbb
RW
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
bec39cab 8950fi
c906108c 8951
81ecdfbb
RW
8952 if test "x$ac_ct_MIG" = x; then
8953 MIG=""
8954 else
8955 case $cross_compiling:$ac_tool_warned in
8956yes:)
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8959ac_tool_warned=yes ;;
8960esac
8961 MIG=$ac_ct_MIG
8962 fi
bec39cab
AC
8963else
8964 MIG="$ac_cv_prog_MIG"
8965fi
c906108c 8966
c906108c 8967
bec39cab
AC
8968# ---------------------- #
8969# Checks for libraries. #
8970# ---------------------- #
c906108c 8971
bec39cab 8972# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8974$as_echo_n "checking for main in -lm... " >&6; }
8975if test "${ac_cv_lib_m_main+set}" = set; then :
8976 $as_echo_n "(cached) " >&6
bec39cab
AC
8977else
8978 ac_check_lib_save_LIBS=$LIBS
8979LIBS="-lm $LIBS"
81ecdfbb 8980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8981/* end confdefs.h. */
c906108c 8982
c906108c 8983
bec39cab
AC
8984int
8985main ()
8986{
81ecdfbb 8987return main ();
bec39cab
AC
8988 ;
8989 return 0;
8990}
8991_ACEOF
81ecdfbb 8992if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8993 ac_cv_lib_m_main=yes
8994else
81ecdfbb 8995 ac_cv_lib_m_main=no
bec39cab 8996fi
81ecdfbb
RW
8997rm -f core conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8999LIBS=$ac_check_lib_save_LIBS
9000fi
81ecdfbb
RW
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9002$as_echo "$ac_cv_lib_m_main" >&6; }
9003if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9004 cat >>confdefs.h <<_ACEOF
9005#define HAVE_LIBM 1
9006_ACEOF
9007
9008 LIBS="-lm $LIBS"
c906108c 9009
c906108c 9010fi
bec39cab
AC
9011
9012
9013# We need to link with -lw to get `wctype' on Solaris before Solaris
9014# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9015# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9016# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9017ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9018if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9019
c906108c 9020else
81ecdfbb
RW
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9022$as_echo_n "checking for wctype in -lw... " >&6; }
9023if test "${ac_cv_lib_w_wctype+set}" = set; then :
9024 $as_echo_n "(cached) " >&6
bec39cab
AC
9025else
9026 ac_check_lib_save_LIBS=$LIBS
9027LIBS="-lw $LIBS"
81ecdfbb 9028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9029/* end confdefs.h. */
c906108c 9030
81ecdfbb
RW
9031/* Override any GCC internal prototype to avoid an error.
9032 Use char because int might match the return type of a GCC
9033 builtin and then its argument prototype would still apply. */
bec39cab
AC
9034#ifdef __cplusplus
9035extern "C"
9036#endif
bec39cab
AC
9037char wctype ();
9038int
9039main ()
9040{
81ecdfbb 9041return wctype ();
bec39cab
AC
9042 ;
9043 return 0;
9044}
9045_ACEOF
81ecdfbb 9046if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9047 ac_cv_lib_w_wctype=yes
9048else
81ecdfbb 9049 ac_cv_lib_w_wctype=no
bec39cab 9050fi
81ecdfbb
RW
9051rm -f core conftest.err conftest.$ac_objext \
9052 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9053LIBS=$ac_check_lib_save_LIBS
9054fi
81ecdfbb
RW
9055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9056$as_echo "$ac_cv_lib_w_wctype" >&6; }
9057if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9058 cat >>confdefs.h <<_ACEOF
9059#define HAVE_LIBW 1
9060_ACEOF
c906108c 9061
bec39cab 9062 LIBS="-lw $LIBS"
c906108c 9063
bec39cab 9064fi
c906108c 9065
bec39cab 9066fi
c906108c 9067
ddc9cd0f 9068
bec39cab 9069# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9071$as_echo_n "checking for library containing gethostbyname... " >&6; }
9072if test "${ac_cv_search_gethostbyname+set}" = set; then :
9073 $as_echo_n "(cached) " >&6
bec39cab
AC
9074else
9075 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9077/* end confdefs.h. */
ddc9cd0f 9078
81ecdfbb
RW
9079/* Override any GCC internal prototype to avoid an error.
9080 Use char because int might match the return type of a GCC
9081 builtin and then its argument prototype would still apply. */
bec39cab
AC
9082#ifdef __cplusplus
9083extern "C"
9084#endif
bec39cab
AC
9085char gethostbyname ();
9086int
9087main ()
9088{
81ecdfbb 9089return gethostbyname ();
bec39cab
AC
9090 ;
9091 return 0;
9092}
9093_ACEOF
81ecdfbb
RW
9094for ac_lib in '' nsl; do
9095 if test -z "$ac_lib"; then
9096 ac_res="none required"
9097 else
9098 ac_res=-l$ac_lib
b4e70030 9099 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9100 fi
9101 if ac_fn_c_try_link "$LINENO"; then :
9102 ac_cv_search_gethostbyname=$ac_res
9103fi
9104rm -f core conftest.err conftest.$ac_objext \
9105 conftest$ac_exeext
9106 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9107 break
9108fi
9109done
9110if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9111
bec39cab 9112else
81ecdfbb 9113 ac_cv_search_gethostbyname=no
bec39cab 9114fi
81ecdfbb 9115rm conftest.$ac_ext
bec39cab
AC
9116LIBS=$ac_func_search_save_LIBS
9117fi
81ecdfbb
RW
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9119$as_echo "$ac_cv_search_gethostbyname" >&6; }
9120ac_res=$ac_cv_search_gethostbyname
9121if test "$ac_res" != no; then :
9122 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9123
bec39cab 9124fi
96baa820 9125
c906108c 9126
b4e70030 9127# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9129$as_echo_n "checking for library containing socketpair... " >&6; }
9130if test "${ac_cv_search_socketpair+set}" = set; then :
9131 $as_echo_n "(cached) " >&6
b4e70030
JB
9132else
9133 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9135/* end confdefs.h. */
9136
81ecdfbb
RW
9137/* Override any GCC internal prototype to avoid an error.
9138 Use char because int might match the return type of a GCC
9139 builtin and then its argument prototype would still apply. */
b4e70030
JB
9140#ifdef __cplusplus
9141extern "C"
9142#endif
b4e70030
JB
9143char socketpair ();
9144int
9145main ()
9146{
81ecdfbb 9147return socketpair ();
b4e70030
JB
9148 ;
9149 return 0;
9150}
9151_ACEOF
81ecdfbb
RW
9152for ac_lib in '' socket; do
9153 if test -z "$ac_lib"; then
9154 ac_res="none required"
9155 else
9156 ac_res=-l$ac_lib
b4e70030 9157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9158 fi
9159 if ac_fn_c_try_link "$LINENO"; then :
9160 ac_cv_search_socketpair=$ac_res
9161fi
9162rm -f core conftest.err conftest.$ac_objext \
9163 conftest$ac_exeext
9164 if test "${ac_cv_search_socketpair+set}" = set; then :
9165 break
9166fi
9167done
9168if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9169
b4e70030 9170else
81ecdfbb 9171 ac_cv_search_socketpair=no
b4e70030 9172fi
81ecdfbb 9173rm conftest.$ac_ext
b4e70030
JB
9174LIBS=$ac_func_search_save_LIBS
9175fi
81ecdfbb
RW
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9177$as_echo "$ac_cv_search_socketpair" >&6; }
9178ac_res=$ac_cv_search_socketpair
9179if test "$ac_res" != no; then :
9180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9181
9182fi
9183
9184
233a11ab 9185# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9186
9187 # See if the user specified whether he wants zlib support or not.
9188
9189# Check whether --with-zlib was given.
9190if test "${with_zlib+set}" = set; then :
9191 withval=$with_zlib;
9192else
9193 with_zlib=auto
9194fi
9195
9196
9197 if test "$with_zlib" != "no"; then
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9199$as_echo_n "checking for library containing zlibVersion... " >&6; }
9200if test "${ac_cv_search_zlibVersion+set}" = set; then :
9201 $as_echo_n "(cached) " >&6
233a11ab
CS
9202else
9203 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9205/* end confdefs.h. */
9206
81ecdfbb
RW
9207/* Override any GCC internal prototype to avoid an error.
9208 Use char because int might match the return type of a GCC
233a11ab 9209 builtin and then its argument prototype would still apply. */
233a11ab
CS
9210#ifdef __cplusplus
9211extern "C"
9212#endif
233a11ab
CS
9213char zlibVersion ();
9214int
9215main ()
9216{
81ecdfbb 9217return zlibVersion ();
233a11ab
CS
9218 ;
9219 return 0;
9220}
9221_ACEOF
81ecdfbb
RW
9222for ac_lib in '' z; do
9223 if test -z "$ac_lib"; then
9224 ac_res="none required"
233a11ab 9225 else
81ecdfbb
RW
9226 ac_res=-l$ac_lib
9227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9228 fi
81ecdfbb
RW
9229 if ac_fn_c_try_link "$LINENO"; then :
9230 ac_cv_search_zlibVersion=$ac_res
233a11ab 9231fi
81ecdfbb
RW
9232rm -f core conftest.err conftest.$ac_objext \
9233 conftest$ac_exeext
9234 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9235 break
233a11ab 9236fi
81ecdfbb
RW
9237done
9238if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9239
233a11ab 9240else
81ecdfbb 9241 ac_cv_search_zlibVersion=no
233a11ab 9242fi
81ecdfbb
RW
9243rm conftest.$ac_ext
9244LIBS=$ac_func_search_save_LIBS
233a11ab 9245fi
81ecdfbb
RW
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9247$as_echo "$ac_cv_search_zlibVersion" >&6; }
9248ac_res=$ac_cv_search_zlibVersion
9249if test "$ac_res" != no; then :
9250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9251 for ac_header in zlib.h
9252do :
9253 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9254if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9255 cat >>confdefs.h <<_ACEOF
81ecdfbb 9256#define HAVE_ZLIB_H 1
233a11ab
CS
9257_ACEOF
9258
9259fi
9260
9261done
9262
9263fi
9264
b040ad30
JB
9265 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9266 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9267 fi
9268 fi
9269
233a11ab 9270
77f120bf 9271# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9273$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9274if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9275 $as_echo_n "(cached) " >&6
bec39cab
AC
9276else
9277 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9279/* end confdefs.h. */
c906108c 9280
81ecdfbb
RW
9281/* Override any GCC internal prototype to avoid an error.
9282 Use char because int might match the return type of a GCC
9283 builtin and then its argument prototype would still apply. */
bec39cab
AC
9284#ifdef __cplusplus
9285extern "C"
9286#endif
77f120bf 9287char dlgetmodinfo ();
bec39cab
AC
9288int
9289main ()
9290{
81ecdfbb 9291return dlgetmodinfo ();
bec39cab
AC
9292 ;
9293 return 0;
9294}
9295_ACEOF
81ecdfbb
RW
9296for ac_lib in '' dl xpdl; do
9297 if test -z "$ac_lib"; then
9298 ac_res="none required"
9299 else
9300 ac_res=-l$ac_lib
b4e70030 9301 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9302 fi
9303 if ac_fn_c_try_link "$LINENO"; then :
9304 ac_cv_search_dlgetmodinfo=$ac_res
9305fi
9306rm -f core conftest.err conftest.$ac_objext \
9307 conftest$ac_exeext
9308 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9309 break
9310fi
9311done
9312if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9313
4e8d927d 9314else
81ecdfbb 9315 ac_cv_search_dlgetmodinfo=no
1ba607ad 9316fi
81ecdfbb 9317rm conftest.$ac_ext
bec39cab
AC
9318LIBS=$ac_func_search_save_LIBS
9319fi
81ecdfbb
RW
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9321$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9322ac_res=$ac_cv_search_dlgetmodinfo
9323if test "$ac_res" != no; then :
9324 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9325
8bb2c122 9326fi
8bb2c122 9327
8bb2c122 9328
77f120bf 9329
77f120bf 9330
6c7a06a3 9331
81ecdfbb
RW
9332# Check whether --with-libiconv-prefix was given.
9333if test "${with_libiconv_prefix+set}" = set; then :
9334 withval=$with_libiconv_prefix;
6c7a06a3 9335 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9336 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9337 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9338 done
9339
81ecdfbb
RW
9340fi
9341
6c7a06a3 9342
f18c4681 9343 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9344 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9345
81ecdfbb
RW
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9347$as_echo_n "checking for iconv... " >&6; }
9348if test "${am_cv_func_iconv+set}" = set; then :
9349 $as_echo_n "(cached) " >&6
d542061a 9350else
6c7a06a3
TT
9351
9352 am_cv_func_iconv="no, consider installing GNU libiconv"
9353 am_cv_lib_iconv=no
9354 am_cv_use_build_libiconv=no
f0f20949 9355 am_cv_build_libiconv_path=
4edb1e84
JB
9356
9357 # If libiconv is part of the build tree, then try using it over
9358 # any system iconv.
9359 if test -d ../libiconv; then
f18c4681
JB
9360 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9361 am_save_LIBS="$LIBS"
9362 am_save_CPPFLAGS="$CPPFLAGS"
9363 LIBS="$LIBS $lib_dir/libiconv.a"
9364 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9366/* end confdefs.h. */
6c7a06a3
TT
9367#include <stdlib.h>
9368#include <iconv.h>
d542061a
UW
9369int
9370main ()
9371{
6c7a06a3 9372iconv_t cd = iconv_open("","");
f18c4681
JB
9373 iconv(cd,NULL,NULL,NULL,NULL);
9374 iconv_close(cd);
d542061a
UW
9375 ;
9376 return 0;
9377}
9378_ACEOF
81ecdfbb 9379if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9380 am_cv_use_build_libiconv=yes
f0f20949 9381 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9382 am_cv_lib_iconv=yes
9383 am_cv_func_iconv=yes
d542061a 9384fi
81ecdfbb
RW
9385rm -f core conftest.err conftest.$ac_objext \
9386 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9387 LIBS="$am_save_LIBS"
9388 CPPFLAGS="$am_save_CPPFLAGS"
9389 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9390 break
9391 fi
9392 done
4edb1e84 9393 fi
94ae1714 9394
4edb1e84 9395 # Next, try to find iconv in libc.
6c7a06a3 9396 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9398/* end confdefs.h. */
6c7a06a3
TT
9399#include <stdlib.h>
9400#include <iconv.h>
d542061a
UW
9401int
9402main ()
9403{
6c7a06a3
TT
9404iconv_t cd = iconv_open("","");
9405 iconv(cd,NULL,NULL,NULL,NULL);
9406 iconv_close(cd);
d542061a
UW
9407 ;
9408 return 0;
9409}
9410_ACEOF
81ecdfbb 9411if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9412 am_cv_func_iconv=yes
d542061a 9413fi
81ecdfbb
RW
9414rm -f core conftest.err conftest.$ac_objext \
9415 conftest$ac_exeext conftest.$ac_ext
77f120bf 9416 fi
94ae1714 9417
4edb1e84
JB
9418 # If iconv was not in libc, try -liconv. In this case, arrange to
9419 # look in the libiconv prefix, if it was specified by the user.
9420 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9421 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9422 am_save_LIBS="$LIBS"
9423 if test -n "$LIBICONV_INCLUDE"; then
9424 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9425 LIBS="$LIBS $LIBICONV_LIBDIR"
9426 fi
9427 LIBS="$LIBS -liconv"
81ecdfbb 9428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9429/* end confdefs.h. */
6c7a06a3
TT
9430#include <stdlib.h>
9431#include <iconv.h>
bec39cab
AC
9432int
9433main ()
9434{
6c7a06a3
TT
9435iconv_t cd = iconv_open("","");
9436 iconv(cd,NULL,NULL,NULL,NULL);
9437 iconv_close(cd);
bec39cab
AC
9438 ;
9439 return 0;
9440}
9441_ACEOF
81ecdfbb 9442if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9443 am_cv_lib_iconv=yes
6c7a06a3 9444 am_cv_func_iconv=yes
627af7ea 9445fi
81ecdfbb
RW
9446rm -f core conftest.err conftest.$ac_objext \
9447 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9448 LIBS="$am_save_LIBS"
fc3b640d 9449 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9450 fi
9451
9452fi
81ecdfbb
RW
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9454$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9455
9456 # Set the various flags based on the cache variables. We can't rely
9457 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9458 LIBICONV=
9459 if test "$am_cv_lib_iconv" = yes; then
9460 LIBICONV="-liconv"
94ae1714
TT
9461 else
9462 LIBICONV_LIBDIR=
9463 LIBICONV_INCLUDE=
fc3b640d
TT
9464 fi
9465 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9466 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9467 LIBICONV_LIBDIR=""
fc3b640d
TT
9468 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9469 fi
9470 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9471 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9472
6c7a06a3
TT
9473 if test "$am_cv_func_iconv" = yes; then
9474
81ecdfbb 9475$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9476
81ecdfbb
RW
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9478$as_echo_n "checking for iconv declaration... " >&6; }
9479 if test "${am_cv_proto_iconv+set}" = set; then :
9480 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9481else
9482
81ecdfbb 9483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9484/* end confdefs.h. */
9485
6c7a06a3
TT
9486#include <stdlib.h>
9487#include <iconv.h>
9488extern
b4e70030 9489#ifdef __cplusplus
6c7a06a3 9490"C"
b4e70030 9491#endif
6c7a06a3
TT
9492#if defined(__STDC__) || defined(__cplusplus)
9493size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9494#else
9495size_t iconv();
9496#endif
9497
b4e70030
JB
9498int
9499main ()
9500{
6c7a06a3 9501
b4e70030
JB
9502 ;
9503 return 0;
9504}
9505_ACEOF
81ecdfbb 9506if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9507 am_cv_proto_iconv_arg1=""
4e8d927d 9508else
81ecdfbb 9509 am_cv_proto_iconv_arg1="const"
b4e70030 9510fi
81ecdfbb 9511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9512 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);"
9513fi
9514
9515 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9517 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9518$as_echo "${ac_t:-
9519 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9520
9521cat >>confdefs.h <<_ACEOF
9522#define ICONV_CONST $am_cv_proto_iconv_arg1
9523_ACEOF
9524
9525 fi
6c7a06a3
TT
9526
9527
478aac75
DE
9528# GDB may fork/exec the iconv program to get the list of supported character
9529# sets. Allow the user to specify where to find it.
9530# There are several factors affecting the choice of option name:
9531# - There is already --with-libiconv-prefix but we can't use it, it specifies
9532# the build-time location of libiconv files.
9533# - The program we need to find is iconv, which comes with glibc. The user
9534# doesn't necessarily have libiconv installed. Therefore naming this
9535# --with-libiconv-foo feels wrong.
9536# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9537# defined to work on directories not files (though it really doesn't know
9538# the difference).
9539# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9540# with --with-libiconv-prefix.
9541# Putting these together is why the option name is --with-iconv-bin.
9542
9543
9544# Check whether --with-iconv-bin was given.
9545if test "${with_iconv_bin+set}" = set; then :
9546 withval=$with_iconv_bin; iconv_bin="${withval}"
9547
9548cat >>confdefs.h <<_ACEOF
9549#define ICONV_BIN "${iconv_bin}"
9550_ACEOF
9551
9552
9553 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9554 if test "x$prefix" = xNONE; then
9555 test_prefix=/usr/local
9556 else
9557 test_prefix=$prefix
9558 fi
9559 else
9560 test_prefix=$exec_prefix
9561 fi
9562 value=0
9563 case ${iconv_bin} in
9564 "${test_prefix}"|"${test_prefix}/"*|\
9565 '${exec_prefix}'|'${exec_prefix}/'*)
9566 value=1
9567 ;;
9568 esac
9569
9570cat >>confdefs.h <<_ACEOF
9571#define ICONV_BIN_RELOCATABLE $value
9572_ACEOF
9573
9574
9575
9576fi
9577
9578
6c7a06a3
TT
9579# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9580# There is a very specific comment in /usr/include/curses.h explaining that
9581# termcap routines built into libcurses must not be used.
9582#
9583# The symptoms we observed so far is GDB unexpectedly changing
9584# the terminal settings when tgetent is called - this is particularly
9585# visible as the output is missing carriage returns, and so rapidly
9586# becomes very hard to read.
9587#
9588# The readline configure script has already decided that libtermcap
9589# was enough for its purposes, and so decided to build readline using
9590# libtermcap. Since the TUI mode requires curses, building GDB with
9591# TUI enabled results in both libraries to be used at the same time,
9592# which is not allowed. This basically means that GDB with TUI is
9593# broken on alpha-osf.
9594
9595case $host_os in
6bcc772d
RO
9596 osf* )
9597 if test x"$enable_tui" = xyes; then
81ecdfbb 9598 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9599 fi
6bcc772d 9600 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9601 enable_tui=no
9602 fi
9603 ;;
9604esac
9605
cb01cfba 9606# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9607if test x"$enable_tui" != xno; then
cb01cfba
JB
9608 prefer_curses=yes
9609fi
9610
9611curses_found=no
9612if test x"$prefer_curses" = xyes; then
9613 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9614 # curses library because the latter might not provide all the
9615 # functionality we need. However, this leads to problems on systems
9616 # where the linker searches /usr/local/lib, but the compiler doesn't
9617 # search /usr/local/include, if ncurses is installed in /usr/local. A
9618 # default installation of ncurses on alpha*-dec-osf* will lead to such
9619 # a situation.
81ecdfbb
RW
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9621$as_echo_n "checking for library containing waddstr... " >&6; }
9622if test "${ac_cv_search_waddstr+set}" = set; then :
9623 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9624else
9625 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9627/* end confdefs.h. */
9628
81ecdfbb
RW
9629/* Override any GCC internal prototype to avoid an error.
9630 Use char because int might match the return type of a GCC
9631 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9632#ifdef __cplusplus
9633extern "C"
9634#endif
6c7a06a3
TT
9635char waddstr ();
9636int
9637main ()
9638{
81ecdfbb 9639return waddstr ();
6c7a06a3
TT
9640 ;
9641 return 0;
9642}
9643_ACEOF
81ecdfbb
RW
9644for ac_lib in '' ncurses cursesX curses; do
9645 if test -z "$ac_lib"; then
9646 ac_res="none required"
9647 else
9648 ac_res=-l$ac_lib
9649 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9650 fi
9651 if ac_fn_c_try_link "$LINENO"; then :
9652 ac_cv_search_waddstr=$ac_res
9653fi
9654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext
9656 if test "${ac_cv_search_waddstr+set}" = set; then :
9657 break
9658fi
9659done
9660if test "${ac_cv_search_waddstr+set}" = set; then :
9661
6c7a06a3 9662else
81ecdfbb
RW
9663 ac_cv_search_waddstr=no
9664fi
9665rm conftest.$ac_ext
9666LIBS=$ac_func_search_save_LIBS
9667fi
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9669$as_echo "$ac_cv_search_waddstr" >&6; }
9670ac_res=$ac_cv_search_waddstr
9671if test "$ac_res" != no; then :
9672 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9673
9674fi
9675
9676
cb01cfba
JB
9677 if test "$ac_cv_search_waddstr" != no; then
9678 curses_found=yes
9679 fi
9680fi
9681
9682# Check whether we should enable the TUI, but only do so if we really
9683# can.
9684if test x"$enable_tui" != xno; then
9685 if test -d $srcdir/tui; then
9686 if test "$curses_found" != no; then
6c7a06a3
TT
9687 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9688 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9689 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9690 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9691 CONFIG_ALL="${CONFIG_ALL} all-tui"
9692 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9693 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9694 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9695 else
9696 if test x"$enable_tui" = xyes; then
81ecdfbb 9697 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9698 else
81ecdfbb
RW
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9700$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9701 fi
9702 fi
9703 fi
9704fi
9705
9706# Since GDB uses Readline, we need termcap functionality. In many
9707# cases this will be provided by the curses library, but some systems
9708# have a seperate termcap library, or no curses library at all.
9709
9710case $host_os in
9711 cygwin*)
9712 if test -d $srcdir/libtermcap; then
9713 LIBS="../libtermcap/libtermcap.a $LIBS"
9714 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9715 fi ;;
9716 go32* | *djgpp*)
9717 ac_cv_search_tgetent="none required"
9718 ;;
9719 *mingw32*)
9720 ac_cv_search_tgetent="none required"
9721 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9722 ;;
9723esac
9724
9725# These are the libraries checked by Readline.
81ecdfbb
RW
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9727$as_echo_n "checking for library containing tgetent... " >&6; }
9728if test "${ac_cv_search_tgetent+set}" = set; then :
9729 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9730else
9731 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9733/* end confdefs.h. */
9734
81ecdfbb
RW
9735/* Override any GCC internal prototype to avoid an error.
9736 Use char because int might match the return type of a GCC
9737 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9738#ifdef __cplusplus
9739extern "C"
9740#endif
6c7a06a3
TT
9741char tgetent ();
9742int
9743main ()
9744{
81ecdfbb 9745return tgetent ();
6c7a06a3
TT
9746 ;
9747 return 0;
9748}
9749_ACEOF
81ecdfbb
RW
9750for ac_lib in '' termcap tinfo curses ncurses; do
9751 if test -z "$ac_lib"; then
9752 ac_res="none required"
9753 else
9754 ac_res=-l$ac_lib
6c7a06a3 9755 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9756 fi
9757 if ac_fn_c_try_link "$LINENO"; then :
9758 ac_cv_search_tgetent=$ac_res
9759fi
9760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext
9762 if test "${ac_cv_search_tgetent+set}" = set; then :
9763 break
9764fi
9765done
9766if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9767
6c7a06a3 9768else
81ecdfbb 9769 ac_cv_search_tgetent=no
6c7a06a3 9770fi
81ecdfbb 9771rm conftest.$ac_ext
6c7a06a3
TT
9772LIBS=$ac_func_search_save_LIBS
9773fi
81ecdfbb
RW
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9775$as_echo "$ac_cv_search_tgetent" >&6; }
9776ac_res=$ac_cv_search_tgetent
9777if test "$ac_res" != no; then :
9778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9779
06825bd1
MK
9780fi
9781
06825bd1 9782
bec39cab 9783if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9784 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9785fi
9786
3841debe 9787
81ecdfbb
RW
9788# Check whether --with-system-readline was given.
9789if test "${with_system_readline+set}" = set; then :
9790 withval=$with_system_readline;
9791fi
6a30b0a5 9792
6a30b0a5
AS
9793
9794if test "$with_system_readline" = yes; then
9795 READLINE=-lreadline
9796 READLINE_DEPS=
9797 READLINE_CFLAGS=
39037522 9798 READLINE_TEXI_INCFLAG=
a71e0887
JK
9799
9800 # readline-6.0 started to use the name `_rl_echoing_p'.
9801 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
9802
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
9804$as_echo_n "checking for readline_echoing_p... " >&6; }
9805 save_LIBS=$LIBS
9806 LIBS="$LIBS $READLINE"
9807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808/* end confdefs.h. */
9809
9810int
9811main ()
9812{
9813extern int readline_echoing_p;
9814 return readline_echoing_p;
9815 ;
9816 return 0;
9817}
9818_ACEOF
9819if ac_fn_c_try_link "$LINENO"; then :
9820 READLINE_ECHOING_P=yes
9821else
9822 READLINE_ECHOING_P=no
9823
9824$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
9825
9826fi
9827rm -f core conftest.err conftest.$ac_objext \
9828 conftest$ac_exeext conftest.$ac_ext
9829 LIBS="$save_LIBS"
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
9831$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
9832else
9833 READLINE='$(READLINE_DIR)/libreadline.a'
9834 READLINE_DEPS='$(READLINE)'
9835 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9836 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9837fi
9838
9839
9840
9841
9842
39037522 9843
81ecdfbb
RW
9844# Check whether --with-expat was given.
9845if test "${with_expat+set}" = set; then :
9846 withval=$with_expat;
5c39566f
DJ
9847else
9848 with_expat=auto
81ecdfbb
RW
9849fi
9850
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9852$as_echo_n "checking whether to use expat... " >&6; }
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9854$as_echo "$with_expat" >&6; }
5c39566f
DJ
9855
9856if test "${with_expat}" = no; then
81ecdfbb
RW
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9858$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9859 HAVE_LIBEXPAT=no
9860else
9861
3841debe
DJ
9862 if test "X$prefix" = "XNONE"; then
9863 acl_final_prefix="$ac_default_prefix"
9864 else
9865 acl_final_prefix="$prefix"
9866 fi
9867 if test "X$exec_prefix" = "XNONE"; then
9868 acl_final_exec_prefix='${prefix}'
9869 else
9870 acl_final_exec_prefix="$exec_prefix"
9871 fi
9872 acl_save_prefix="$prefix"
9873 prefix="$acl_final_prefix"
9874 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9875 prefix="$acl_save_prefix"
9876
9877
81ecdfbb
RW
9878# Check whether --with-gnu-ld was given.
9879if test "${with_gnu_ld+set}" = set; then :
9880 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9881else
9882 with_gnu_ld=no
81ecdfbb
RW
9883fi
9884
3841debe
DJ
9885# Prepare PATH_SEPARATOR.
9886# The user is always right.
9887if test "${PATH_SEPARATOR+set}" != set; then
9888 echo "#! /bin/sh" >conf$$.sh
9889 echo "exit 0" >>conf$$.sh
9890 chmod +x conf$$.sh
9891 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9892 PATH_SEPARATOR=';'
9893 else
9894 PATH_SEPARATOR=:
9895 fi
9896 rm -f conf$$.sh
9897fi
9898ac_prog=ld
9899if test "$GCC" = yes; then
9900 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9902$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9903 case $host in
9904 *-*-mingw*)
9905 # gcc leaves a trailing carriage return which upsets mingw
9906 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9907 *)
9908 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9909 esac
9910 case $ac_prog in
9911 # Accept absolute paths.
9912 [\\/]* | [A-Za-z]:[\\/]*)
9913 re_direlt='/[^/][^/]*/\.\./'
9914 # Canonicalize the path of ld
9915 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9916 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9917 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9918 done
9919 test -z "$LD" && LD="$ac_prog"
9920 ;;
9921 "")
9922 # If it fails, then pretend we aren't using GCC.
9923 ac_prog=ld
9924 ;;
9925 *)
9926 # If it is relative, then search for the first ld in PATH.
9927 with_gnu_ld=unknown
9928 ;;
9929 esac
9930elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9932$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9933else
81ecdfbb
RW
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9935$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9936fi
81ecdfbb
RW
9937if test "${acl_cv_path_LD+set}" = set; then :
9938 $as_echo_n "(cached) " >&6
3841debe
DJ
9939else
9940 if test -z "$LD"; then
9941 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9942 for ac_dir in $PATH; do
9943 test -z "$ac_dir" && ac_dir=.
9944 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9945 acl_cv_path_LD="$ac_dir/$ac_prog"
9946 # Check to see if the program is GNU ld. I'd rather use --version,
9947 # but apparently some GNU ld's only accept -v.
9948 # Break only if it was the GNU/non-GNU ld that we prefer.
9949 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9950 test "$with_gnu_ld" != no && break
9951 else
9952 test "$with_gnu_ld" != yes && break
9953 fi
9954 fi
9955 done
9956 IFS="$ac_save_ifs"
9957else
9958 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9959fi
9960fi
9961
9962LD="$acl_cv_path_LD"
9963if test -n "$LD"; then
81ecdfbb
RW
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9965$as_echo "$LD" >&6; }
3841debe 9966else
81ecdfbb
RW
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
3841debe 9969fi
81ecdfbb
RW
9970test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9972$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9973if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9974 $as_echo_n "(cached) " >&6
3841debe
DJ
9975else
9976 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9977if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9978 acl_cv_prog_gnu_ld=yes
9979else
9980 acl_cv_prog_gnu_ld=no
9981fi
9982fi
81ecdfbb
RW
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9984$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
9985with_gnu_ld=$acl_cv_prog_gnu_ld
9986
9987
9988
81ecdfbb
RW
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9990$as_echo_n "checking for shared library run path origin... " >&6; }
9991if test "${acl_cv_rpath+set}" = set; then :
9992 $as_echo_n "(cached) " >&6
3841debe
DJ
9993else
9994
9995 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9996 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9997 . ./conftest.sh
9998 rm -f ./conftest.sh
9999 acl_cv_rpath=done
10000
10001fi
81ecdfbb
RW
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10003$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10004 wl="$acl_cv_wl"
10005 libext="$acl_cv_libext"
10006 shlibext="$acl_cv_shlibext"
10007 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10008 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10009 hardcode_direct="$acl_cv_hardcode_direct"
10010 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10011 # Check whether --enable-rpath was given.
10012if test "${enable_rpath+set}" = set; then :
10013 enableval=$enable_rpath; :
3841debe
DJ
10014else
10015 enable_rpath=yes
81ecdfbb
RW
10016fi
10017
3841debe
DJ
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027 use_additional=yes
10028
10029 acl_save_prefix="$prefix"
10030 prefix="$acl_final_prefix"
10031 acl_save_exec_prefix="$exec_prefix"
10032 exec_prefix="$acl_final_exec_prefix"
10033
10034 eval additional_includedir=\"$includedir\"
10035 eval additional_libdir=\"$libdir\"
10036
10037 exec_prefix="$acl_save_exec_prefix"
10038 prefix="$acl_save_prefix"
10039
10040
81ecdfbb
RW
10041# Check whether --with-libexpat-prefix was given.
10042if test "${with_libexpat_prefix+set}" = set; then :
10043 withval=$with_libexpat_prefix;
3841debe
DJ
10044 if test "X$withval" = "Xno"; then
10045 use_additional=no
10046 else
10047 if test "X$withval" = "X"; then
10048
10049 acl_save_prefix="$prefix"
10050 prefix="$acl_final_prefix"
10051 acl_save_exec_prefix="$exec_prefix"
10052 exec_prefix="$acl_final_exec_prefix"
10053
10054 eval additional_includedir=\"$includedir\"
10055 eval additional_libdir=\"$libdir\"
10056
10057 exec_prefix="$acl_save_exec_prefix"
10058 prefix="$acl_save_prefix"
10059
10060 else
10061 additional_includedir="$withval/include"
10062 additional_libdir="$withval/lib"
10063 fi
10064 fi
10065
81ecdfbb
RW
10066fi
10067
3841debe
DJ
10068 LIBEXPAT=
10069 LTLIBEXPAT=
10070 INCEXPAT=
10071 rpathdirs=
10072 ltrpathdirs=
10073 names_already_handled=
10074 names_next_round='expat '
10075 while test -n "$names_next_round"; do
10076 names_this_round="$names_next_round"
10077 names_next_round=
10078 for name in $names_this_round; do
10079 already_handled=
10080 for n in $names_already_handled; do
10081 if test "$n" = "$name"; then
10082 already_handled=yes
10083 break
10084 fi
10085 done
10086 if test -z "$already_handled"; then
10087 names_already_handled="$names_already_handled $name"
10088 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10089 eval value=\"\$HAVE_LIB$uppername\"
10090 if test -n "$value"; then
10091 if test "$value" = yes; then
10092 eval value=\"\$LIB$uppername\"
10093 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10094 eval value=\"\$LTLIB$uppername\"
10095 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10096 else
10097 :
10098 fi
10099 else
10100 found_dir=
10101 found_la=
10102 found_so=
10103 found_a=
10104 if test $use_additional = yes; then
10105 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10106 found_dir="$additional_libdir"
10107 found_so="$additional_libdir/lib$name.$shlibext"
10108 if test -f "$additional_libdir/lib$name.la"; then
10109 found_la="$additional_libdir/lib$name.la"
10110 fi
10111 else
10112 if test -f "$additional_libdir/lib$name.$libext"; then
10113 found_dir="$additional_libdir"
10114 found_a="$additional_libdir/lib$name.$libext"
10115 if test -f "$additional_libdir/lib$name.la"; then
10116 found_la="$additional_libdir/lib$name.la"
10117 fi
10118 fi
10119 fi
10120 fi
10121 if test "X$found_dir" = "X"; then
10122 for x in $LDFLAGS $LTLIBEXPAT; do
10123
10124 acl_save_prefix="$prefix"
10125 prefix="$acl_final_prefix"
10126 acl_save_exec_prefix="$exec_prefix"
10127 exec_prefix="$acl_final_exec_prefix"
10128 eval x=\"$x\"
10129 exec_prefix="$acl_save_exec_prefix"
10130 prefix="$acl_save_prefix"
10131
10132 case "$x" in
10133 -L*)
10134 dir=`echo "X$x" | sed -e 's/^X-L//'`
10135 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10136 found_dir="$dir"
10137 found_so="$dir/lib$name.$shlibext"
10138 if test -f "$dir/lib$name.la"; then
10139 found_la="$dir/lib$name.la"
10140 fi
10141 else
10142 if test -f "$dir/lib$name.$libext"; then
10143 found_dir="$dir"
10144 found_a="$dir/lib$name.$libext"
10145 if test -f "$dir/lib$name.la"; then
10146 found_la="$dir/lib$name.la"
10147 fi
10148 fi
10149 fi
10150 ;;
10151 esac
10152 if test "X$found_dir" != "X"; then
10153 break
10154 fi
10155 done
10156 fi
10157 if test "X$found_dir" != "X"; then
10158 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10159 if test "X$found_so" != "X"; then
10160 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10161 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10162 else
10163 haveit=
10164 for x in $ltrpathdirs; do
10165 if test "X$x" = "X$found_dir"; then
10166 haveit=yes
10167 break
10168 fi
10169 done
10170 if test -z "$haveit"; then
10171 ltrpathdirs="$ltrpathdirs $found_dir"
10172 fi
10173 if test "$hardcode_direct" = yes; then
10174 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10175 else
10176 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10177 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10178 haveit=
10179 for x in $rpathdirs; do
10180 if test "X$x" = "X$found_dir"; then
10181 haveit=yes
10182 break
10183 fi
10184 done
10185 if test -z "$haveit"; then
10186 rpathdirs="$rpathdirs $found_dir"
10187 fi
10188 else
10189 haveit=
10190 for x in $LDFLAGS $LIBEXPAT; do
10191
10192 acl_save_prefix="$prefix"
10193 prefix="$acl_final_prefix"
10194 acl_save_exec_prefix="$exec_prefix"
10195 exec_prefix="$acl_final_exec_prefix"
10196 eval x=\"$x\"
10197 exec_prefix="$acl_save_exec_prefix"
10198 prefix="$acl_save_prefix"
10199
10200 if test "X$x" = "X-L$found_dir"; then
10201 haveit=yes
10202 break
10203 fi
10204 done
10205 if test -z "$haveit"; then
10206 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10207 fi
10208 if test "$hardcode_minus_L" != no; then
10209 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10210 else
10211 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10212 fi
10213 fi
10214 fi
10215 fi
10216 else
10217 if test "X$found_a" != "X"; then
10218 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10219 else
10220 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10221 fi
10222 fi
10223 additional_includedir=
10224 case "$found_dir" in
10225 */lib | */lib/)
10226 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10227 additional_includedir="$basedir/include"
10228 ;;
10229 esac
10230 if test "X$additional_includedir" != "X"; then
10231 if test "X$additional_includedir" != "X/usr/include"; then
10232 haveit=
10233 if test "X$additional_includedir" = "X/usr/local/include"; then
10234 if test -n "$GCC"; then
10235 case $host_os in
10236 linux*) haveit=yes;;
10237 esac
10238 fi
10239 fi
10240 if test -z "$haveit"; then
10241 for x in $CPPFLAGS $INCEXPAT; do
10242
10243 acl_save_prefix="$prefix"
10244 prefix="$acl_final_prefix"
10245 acl_save_exec_prefix="$exec_prefix"
10246 exec_prefix="$acl_final_exec_prefix"
10247 eval x=\"$x\"
10248 exec_prefix="$acl_save_exec_prefix"
10249 prefix="$acl_save_prefix"
10250
10251 if test "X$x" = "X-I$additional_includedir"; then
10252 haveit=yes
10253 break
10254 fi
10255 done
10256 if test -z "$haveit"; then
10257 if test -d "$additional_includedir"; then
10258 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10259 fi
10260 fi
10261 fi
10262 fi
10263 fi
10264 if test -n "$found_la"; then
10265 save_libdir="$libdir"
10266 case "$found_la" in
10267 */* | *\\*) . "$found_la" ;;
10268 *) . "./$found_la" ;;
10269 esac
10270 libdir="$save_libdir"
10271 for dep in $dependency_libs; do
10272 case "$dep" in
10273 -L*)
10274 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10275 if test "X$additional_libdir" != "X/usr/lib"; then
10276 haveit=
10277 if test "X$additional_libdir" = "X/usr/local/lib"; then
10278 if test -n "$GCC"; then
10279 case $host_os in
10280 linux*) haveit=yes;;
10281 esac
10282 fi
10283 fi
10284 if test -z "$haveit"; then
10285 haveit=
10286 for x in $LDFLAGS $LIBEXPAT; do
10287
10288 acl_save_prefix="$prefix"
10289 prefix="$acl_final_prefix"
10290 acl_save_exec_prefix="$exec_prefix"
10291 exec_prefix="$acl_final_exec_prefix"
10292 eval x=\"$x\"
10293 exec_prefix="$acl_save_exec_prefix"
10294 prefix="$acl_save_prefix"
10295
10296 if test "X$x" = "X-L$additional_libdir"; then
10297 haveit=yes
10298 break
10299 fi
10300 done
10301 if test -z "$haveit"; then
10302 if test -d "$additional_libdir"; then
10303 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10304 fi
10305 fi
10306 haveit=
10307 for x in $LDFLAGS $LTLIBEXPAT; do
10308
10309 acl_save_prefix="$prefix"
10310 prefix="$acl_final_prefix"
10311 acl_save_exec_prefix="$exec_prefix"
10312 exec_prefix="$acl_final_exec_prefix"
10313 eval x=\"$x\"
10314 exec_prefix="$acl_save_exec_prefix"
10315 prefix="$acl_save_prefix"
10316
10317 if test "X$x" = "X-L$additional_libdir"; then
10318 haveit=yes
10319 break
10320 fi
10321 done
10322 if test -z "$haveit"; then
10323 if test -d "$additional_libdir"; then
10324 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10325 fi
10326 fi
10327 fi
10328 fi
10329 ;;
10330 -R*)
10331 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10332 if test "$enable_rpath" != no; then
10333 haveit=
10334 for x in $rpathdirs; do
10335 if test "X$x" = "X$dir"; then
10336 haveit=yes
10337 break
10338 fi
10339 done
10340 if test -z "$haveit"; then
10341 rpathdirs="$rpathdirs $dir"
10342 fi
10343 haveit=
10344 for x in $ltrpathdirs; do
10345 if test "X$x" = "X$dir"; then
10346 haveit=yes
10347 break
10348 fi
10349 done
10350 if test -z "$haveit"; then
10351 ltrpathdirs="$ltrpathdirs $dir"
10352 fi
10353 fi
10354 ;;
10355 -l*)
10356 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10357 ;;
10358 *.la)
10359 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10360 ;;
10361 *)
10362 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10363 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10364 ;;
81ecdfbb
RW
10365 esac
10366 done
10367 fi
10368 else
10369 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10370 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10371 fi
10372 fi
10373 fi
10374 done
10375 done
10376 if test "X$rpathdirs" != "X"; then
10377 if test -n "$hardcode_libdir_separator"; then
10378 alldirs=
10379 for found_dir in $rpathdirs; do
10380 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10381 done
10382 acl_save_libdir="$libdir"
10383 libdir="$alldirs"
10384 eval flag=\"$hardcode_libdir_flag_spec\"
10385 libdir="$acl_save_libdir"
10386 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10387 else
10388 for found_dir in $rpathdirs; do
10389 acl_save_libdir="$libdir"
10390 libdir="$found_dir"
10391 eval flag=\"$hardcode_libdir_flag_spec\"
10392 libdir="$acl_save_libdir"
10393 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10394 done
10395 fi
10396 fi
10397 if test "X$ltrpathdirs" != "X"; then
10398 for found_dir in $ltrpathdirs; do
10399 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10400 done
10401 fi
a9322a30
TT
10402
10403
81ecdfbb 10404 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10405
81ecdfbb
RW
10406 for element in $INCEXPAT; do
10407 haveit=
10408 for x in $CPPFLAGS; do
a9322a30 10409
81ecdfbb
RW
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"
a8111142 10417
81ecdfbb
RW
10418 if test "X$x" = "X$element"; then
10419 haveit=yes
10420 break
10421 fi
10422 done
10423 if test -z "$haveit"; then
10424 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10425 fi
10426 done
a9322a30
TT
10427
10428
81ecdfbb
RW
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10430$as_echo_n "checking for libexpat... " >&6; }
10431if test "${ac_cv_libexpat+set}" = set; then :
10432 $as_echo_n "(cached) " >&6
bec39cab 10433else
bec39cab 10434
81ecdfbb
RW
10435 ac_save_LIBS="$LIBS"
10436 LIBS="$LIBS $LIBEXPAT"
10437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10438/* end confdefs.h. */
81ecdfbb
RW
10439#include "expat.h"
10440int
10441main ()
10442{
10443XML_Parser p = XML_ParserCreate (0);
10444 ;
10445 return 0;
10446}
bec39cab 10447_ACEOF
81ecdfbb
RW
10448if ac_fn_c_try_link "$LINENO"; then :
10449 ac_cv_libexpat=yes
c906108c 10450else
81ecdfbb 10451 ac_cv_libexpat=no
bec39cab 10452fi
81ecdfbb
RW
10453rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
10455 LIBS="$ac_save_LIBS"
c906108c 10456
95ca63c4 10457fi
81ecdfbb
RW
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10459$as_echo "$ac_cv_libexpat" >&6; }
10460 if test "$ac_cv_libexpat" = yes; then
10461 HAVE_LIBEXPAT=yes
bec39cab 10462
81ecdfbb 10463$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10464
81ecdfbb
RW
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10466$as_echo_n "checking how to link with libexpat... " >&6; }
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10468$as_echo "$LIBEXPAT" >&6; }
10469 else
10470 HAVE_LIBEXPAT=no
10471 CPPFLAGS="$ac_save_CPPFLAGS"
10472 LIBEXPAT=
10473 LTLIBEXPAT=
10474 fi
95ca63c4
CF
10475
10476
10477
7cb9022a
MK
10478
10479
bec39cab 10480
81ecdfbb
RW
10481 if test "$HAVE_LIBEXPAT" != yes; then
10482 if test "$with_expat" = yes; then
10483 as_fn_error "expat is missing or unusable" "$LINENO" 5
10484 else
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10486$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10487 fi
10488 else
10489 save_LIBS=$LIBS
10490 LIBS="$LIBS $LIBEXPAT"
10491 for ac_func in XML_StopParser
10492do :
10493 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10494if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10495 cat >>confdefs.h <<_ACEOF
81ecdfbb 10496#define HAVE_XML_STOPPARSER 1
bec39cab 10497_ACEOF
95ca63c4 10498
bec39cab 10499fi
bec39cab 10500done
95ca63c4 10501
81ecdfbb
RW
10502 LIBS=$save_LIBS
10503 fi
a9322a30
TT
10504fi
10505
a9322a30 10506
a9322a30
TT
10507
10508
ec685c5e 10509
0c4a4063 10510
81ecdfbb
RW
10511# Check whether --with-python was given.
10512if test "${with_python+set}" = set; then :
10513 withval=$with_python;
bec39cab 10514else
81ecdfbb 10515 with_python=auto
bec39cab 10516fi
bec39cab 10517
81ecdfbb
RW
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10519$as_echo_n "checking whether to use python... " >&6; }
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10521$as_echo "$with_python" >&6; }
9a156167 10522
81ecdfbb
RW
10523if test "${with_python}" = no; then
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10525$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10526 have_libpython=no
bec39cab 10527else
81ecdfbb 10528 case "${with_python}" in
81ecdfbb 10529 /*)
ec685c5e
DE
10530 if test -d ${with_python}; then
10531 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10532 python_prog="${with_python}/bin/python"
0c4a4063 10533 python_prefix=
9c4ea6c5
JB
10534 # If python does not exit ${with_python}/bin, then try in
10535 # ${with_python}. On Windows/MinGW, this is where the Python
10536 # executable is.
10537 if test ! -x "${python_prog}"; then
10538 python_prog="${with_python}/python"
10539 python_prefix=
10540 fi
e7a30f46 10541 if test ! -x "${python_prog}"; then
ec685c5e
DE
10542 # Fall back to gdb 7.0/7.1 behaviour.
10543 python_prog=missing
0c4a4063 10544 python_prefix=${with_python}
ec685c5e 10545 fi
e7a30f46 10546 elif test -x "${with_python}"; then
ec685c5e
DE
10547 # While we can't run python compiled for $host (unless host == build),
10548 # the user could write a script that provides the needed information,
10549 # so we support that.
ec685c5e 10550 python_prog=${with_python}
0c4a4063 10551 python_prefix=
ec685c5e
DE
10552 else
10553 as_fn_error "invalid value for --with-python" "$LINENO" 5
10554 fi
81ecdfbb 10555 ;;
ec685c5e
DE
10556 */*)
10557 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10558 as_fn_error "invalid value for --with-python" "$LINENO" 5
10559 ;;
ec685c5e
DE
10560 *)
10561 # The user has either specified auto, yes, or the name of the python
10562 # program assumed to be in $PATH.
10563 python_prefix=
10564 case "${with_python}" in
10565 yes | auto)
10566 if test ${build} = ${host}; then
10567 # Extract the first word of "python", so it can be a program name with args.
10568set dummy python; ac_word=$2
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10570$as_echo_n "checking for $ac_word... " >&6; }
10571if test "${ac_cv_path_python_prog_path+set}" = set; then :
10572 $as_echo_n "(cached) " >&6
10573else
10574 case $python_prog_path in
10575 [\\/]* | ?:[\\/]*)
10576 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10577 ;;
10578 *)
10579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10580for as_dir in $PATH
10581do
10582 IFS=$as_save_IFS
10583 test -z "$as_dir" && as_dir=.
10584 for ac_exec_ext in '' $ac_executable_extensions; do
10585 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10586 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10588 break 2
10589 fi
10590done
10591 done
10592IFS=$as_save_IFS
10593
10594 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10595 ;;
10596esac
10597fi
10598python_prog_path=$ac_cv_path_python_prog_path
10599if test -n "$python_prog_path"; then
10600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10601$as_echo "$python_prog_path" >&6; }
10602else
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605fi
10606
10607
10608 if test "${python_prog_path}" = missing; then
10609 python_prog=missing
10610 else
10611 python_prog=${python_prog_path}
10612 fi
10613 else
10614 # Not much we can do except assume the cross-compiler will find the
10615 # right files.
10616 python_prog=missing
10617 fi
10618 ;;
10619 *)
10620 # While we can't run python compiled for $host (unless host == build),
10621 # the user could write a script that provides the needed information,
10622 # so we support that.
10623 python_prog="${with_python}"
10624 # Extract the first word of "${python_prog}", so it can be a program name with args.
10625set dummy ${python_prog}; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if test "${ac_cv_path_python_prog_path+set}" = set; then :
10629 $as_echo_n "(cached) " >&6
10630else
10631 case $python_prog_path in
10632 [\\/]* | ?:[\\/]*)
10633 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10634 ;;
10635 *)
10636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639 IFS=$as_save_IFS
10640 test -z "$as_dir" && as_dir=.
10641 for ac_exec_ext in '' $ac_executable_extensions; do
10642 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10643 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645 break 2
10646 fi
10647done
10648 done
10649IFS=$as_save_IFS
10650
10651 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10652 ;;
10653esac
10654fi
10655python_prog_path=$ac_cv_path_python_prog_path
10656if test -n "$python_prog_path"; then
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10658$as_echo "$python_prog_path" >&6; }
10659else
10660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
10662fi
10663
10664
10665 if test "${python_prog_path}" = missing; then
10666 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10667 fi
10668 ;;
10669 esac
81ecdfbb
RW
10670 esac
10671
ec685c5e 10672 if test "${python_prog}" != missing; then
e7a30f46
DE
10673 # We have a python program to use, but it may be too old.
10674 # Don't flag an error for --with-python=auto (the default).
10675 have_python_config=yes
ec685c5e
DE
10676 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10677 if test $? != 0; then
e7a30f46
DE
10678 have_python_config=failed
10679 if test "${with_python}" != auto; then
10680 as_fn_error "failure running python-config --includes" "$LINENO" 5
10681 fi
ec685c5e
DE
10682 fi
10683 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10684 if test $? != 0; then
e7a30f46
DE
10685 have_python_config=failed
10686 if test "${with_python}" != auto; then
10687 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10688 fi
ec685c5e 10689 fi
0c4a4063
DE
10690 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10691 if test $? != 0; then
e7a30f46
DE
10692 have_python_config=failed
10693 if test "${with_python}" != auto; then
10694 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10695 fi
0c4a4063 10696 fi
ec685c5e 10697 else
ac534cba
JB
10698 # We do not have a python executable we can use to determine where
10699 # to find the Python headers and libs. We cannot guess the include
10700 # path from the python_prefix either, because that include path
10701 # depends on the Python version. So, there is nothing much we can
10702 # do except assume that the compiler will be able to find those files.
10703 python_includes=
10704 python_libs=
0c4a4063 10705 have_python_config=no
ec685c5e 10706 fi
bec39cab 10707
ec685c5e
DE
10708 # If we have python-config, only try the configuration it provides.
10709 # Otherwise fallback on the old way of trying different versions of
10710 # python in turn.
81ecdfbb 10711
ec685c5e
DE
10712 have_libpython=no
10713 if test "${have_python_config}" = yes; then
c1039e3c
JB
10714 # Determine the Python version by extracting "-lpython<version>"
10715 # part of the python_libs. <version> is usually X.Y with X and Y
10716 # being decimal numbers, but can also be XY (seen on Windows).
10717 #
10718 # The extraction is performed using sed with a regular expression.
10719 # Initially, the regexp used was using the '?' quantifier to make
10720 # the dot in the version number optional. Unfortunately, this
10721 # does not work with non-GNU versions of sed because, because of
10722 # what looks like a limitation (the '?' quantifier does not work
10723 # with back-references). We work around this limitation by using
10724 # the '*' quantifier instead. It means that, in theory, we might
10725 # match unexpected version strings such as "-lpython2..7", but
10726 # this seems unlikely in practice. And even if that happens,
10727 # an error will be triggered later on, when checking that version
10728 # number.
ec685c5e 10729 python_version=`echo " ${python_libs} " \
c1039e3c 10730 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10731 case "${python_version}" in
10732 python*)
ec685c5e
DE
10733
10734 version=${python_version}
10735
10736 new_CPPFLAGS=${python_includes}
10737 new_LIBS=${python_libs}
81ecdfbb
RW
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10739$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10740 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10741 save_LIBS=$LIBS
ec685c5e
DE
10742 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10743 LIBS="$LIBS $new_LIBS"
10744 found_usable_python=no
81ecdfbb 10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10746/* end confdefs.h. */
ac534cba 10747#include "Python.h"
81ecdfbb
RW
10748int
10749main ()
10750{
10751Py_Initialize ();
10752 ;
10753 return 0;
10754}
bec39cab 10755_ACEOF
81ecdfbb 10756if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10757 have_libpython=${version}
10758 found_usable_python=yes
ac534cba
JB
10759 PYTHON_CPPFLAGS=$new_CPPFLAGS
10760 PYTHON_LIBS=$new_LIBS
9a156167 10761fi
81ecdfbb
RW
10762rm -f core conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10764 CPPFLAGS=$save_CPPFLAGS
10765 LIBS=$save_LIBS
ec685c5e
DE
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10767$as_echo "${found_usable_python}" >&6; }
9a156167 10768
0c4a4063
DE
10769 ;;
10770 *)
ec685c5e 10771 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10772 ;;
10773 esac
e7a30f46 10774 elif test "${have_python_config}" != failed; then
ec685c5e 10775 if test "${have_libpython}" = no; then
9a156167 10776
420697bb
TT
10777 version=python2.7
10778
10779 new_CPPFLAGS=${python_includes}
10780 new_LIBS="${python_libs} -lpython2.7"
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10782$as_echo_n "checking for ${version}... " >&6; }
10783 save_CPPFLAGS=$CPPFLAGS
10784 save_LIBS=$LIBS
10785 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10786 LIBS="$LIBS $new_LIBS"
10787 found_usable_python=no
10788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10789/* end confdefs.h. */
ac534cba 10790#include "Python.h"
420697bb
TT
10791int
10792main ()
10793{
10794Py_Initialize ();
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799if ac_fn_c_try_link "$LINENO"; then :
10800 have_libpython=${version}
10801 found_usable_python=yes
ac534cba
JB
10802 PYTHON_CPPFLAGS=$new_CPPFLAGS
10803 PYTHON_LIBS=$new_LIBS
420697bb
TT
10804fi
10805rm -f core conftest.err conftest.$ac_objext \
10806 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10807 CPPFLAGS=$save_CPPFLAGS
10808 LIBS=$save_LIBS
420697bb
TT
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10810$as_echo "${found_usable_python}" >&6; }
10811
10812 fi
10813 if test "${have_libpython}" = no; then
10814
ec685c5e
DE
10815 version=python2.6
10816
10817 new_CPPFLAGS=${python_includes}
10818 new_LIBS="${python_libs} -lpython2.6"
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10820$as_echo_n "checking for ${version}... " >&6; }
10821 save_CPPFLAGS=$CPPFLAGS
10822 save_LIBS=$LIBS
10823 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10824 LIBS="$LIBS $new_LIBS"
10825 found_usable_python=no
10826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827/* end confdefs.h. */
ac534cba 10828#include "Python.h"
ec685c5e
DE
10829int
10830main ()
10831{
10832Py_Initialize ();
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837if ac_fn_c_try_link "$LINENO"; then :
10838 have_libpython=${version}
10839 found_usable_python=yes
ac534cba
JB
10840 PYTHON_CPPFLAGS=$new_CPPFLAGS
10841 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10842fi
10843rm -f core conftest.err conftest.$ac_objext \
10844 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10845 CPPFLAGS=$save_CPPFLAGS
10846 LIBS=$save_LIBS
ec685c5e
DE
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10848$as_echo "${found_usable_python}" >&6; }
9a156167 10849
81ecdfbb 10850 fi
ec685c5e 10851 if test ${have_libpython} = no; then
9a156167 10852
81ecdfbb 10853 version=python2.5
9a156167 10854
ec685c5e
DE
10855 new_CPPFLAGS=${python_includes}
10856 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10858$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10859 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10860 save_LIBS=$LIBS
ec685c5e
DE
10861 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10862 LIBS="$LIBS $new_LIBS"
10863 found_usable_python=no
81ecdfbb 10864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10865/* end confdefs.h. */
ac534cba 10866#include "Python.h"
81ecdfbb
RW
10867int
10868main ()
10869{
10870Py_Initialize ();
10871 ;
10872 return 0;
10873}
436868fb 10874_ACEOF
81ecdfbb 10875if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10876 have_libpython=${version}
10877 found_usable_python=yes
ac534cba
JB
10878 PYTHON_CPPFLAGS=$new_CPPFLAGS
10879 PYTHON_LIBS=$new_LIBS
436868fb 10880fi
81ecdfbb
RW
10881rm -f core conftest.err conftest.$ac_objext \
10882 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10883 CPPFLAGS=$save_CPPFLAGS
10884 LIBS=$save_LIBS
ec685c5e
DE
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10886$as_echo "${found_usable_python}" >&6; }
a9322a30 10887
81ecdfbb 10888 fi
ec685c5e 10889 if test ${have_libpython} = no; then
a9322a30 10890
81ecdfbb 10891 version=python2.4
a9322a30 10892
ec685c5e
DE
10893 new_CPPFLAGS=${python_includes}
10894 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10896$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10897 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10898 save_LIBS=$LIBS
ec685c5e
DE
10899 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10900 LIBS="$LIBS $new_LIBS"
10901 found_usable_python=no
81ecdfbb 10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10903/* end confdefs.h. */
ac534cba 10904#include "Python.h"
a9322a30
TT
10905int
10906main ()
10907{
81ecdfbb 10908Py_Initialize ();
a9322a30
TT
10909 ;
10910 return 0;
10911}
436868fb 10912_ACEOF
81ecdfbb 10913if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10914 have_libpython=${version}
10915 found_usable_python=yes
ac534cba
JB
10916 PYTHON_CPPFLAGS=$new_CPPFLAGS
10917 PYTHON_LIBS=$new_LIBS
436868fb 10918fi
81ecdfbb
RW
10919rm -f core conftest.err conftest.$ac_objext \
10920 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10921 CPPFLAGS=$save_CPPFLAGS
10922 LIBS=$save_LIBS
ec685c5e
DE
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10924$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10925
ec685c5e
DE
10926 fi
10927 fi
9c4ea6c5 10928 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10929
10930$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10931
9c4ea6c5 10932 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10933
10934$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10935
9c4ea6c5 10936 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10937
10938$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10939
9c4ea6c5 10940 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10941
10942$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10943
81ecdfbb 10944 fi
ec685c5e
DE
10945
10946 if test "${have_libpython}" = no; then
81ecdfbb
RW
10947 case "${with_python}" in
10948 yes)
10949 as_fn_error "python is missing or unusable" "$LINENO" 5
10950 ;;
10951 auto)
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10953$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10954 ;;
10955 *)
10956 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10957 ;;
10958 esac
0c4a4063
DE
10959 else
10960 if test -n "${python_prefix}"; then
10961
10962cat >>confdefs.h <<_ACEOF
10963#define WITH_PYTHON_PATH "${python_prefix}"
10964_ACEOF
10965
10966
10967 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10968 if test "x$prefix" = xNONE; then
10969 test_prefix=/usr/local
10970 else
10971 test_prefix=$prefix
10972 fi
10973 else
10974 test_prefix=$exec_prefix
10975 fi
10976 value=0
10977 case ${python_prefix} in
10978 "${test_prefix}"|"${test_prefix}/"*|\
10979 '${exec_prefix}'|'${exec_prefix}/'*)
10980 value=1
10981 ;;
10982 esac
10983
10984cat >>confdefs.h <<_ACEOF
10985#define PYTHON_PATH_RELOCATABLE $value
10986_ACEOF
10987
10988
10989 fi
81ecdfbb 10990 fi
436868fb 10991fi
436868fb 10992
ec685c5e 10993if test "${have_libpython}" != no; then
436868fb 10994
81ecdfbb 10995$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10996
81ecdfbb
RW
10997 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10998 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10999 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11000 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11001 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11002
81ecdfbb
RW
11003 # Flags needed to compile Python code (taken from python-config --cflags).
11004 # We cannot call python-config directly because it will output whatever was
11005 # used when compiling the Python interpreter itself, including flags which
11006 # would make the python-related objects be compiled differently from the
11007 # rest of GDB (e.g., -O2 and -fPIC).
11008 if test "${GCC}" = yes; then
11009 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11010 fi
436868fb 11011
81ecdfbb
RW
11012 if test "x${tentative_python_cflags}" != x; then
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11014$as_echo_n "checking compiler flags for python code... " >&6; }
11015 for flag in ${tentative_python_cflags}; do
11016 # Check that the compiler accepts it
11017 saved_CFLAGS="$CFLAGS"
11018 CFLAGS="$CFLAGS $flag"
11019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11020/* end confdefs.h. */
81ecdfbb 11021
a9322a30
TT
11022int
11023main ()
11024{
a9322a30
TT
11025
11026 ;
11027 return 0;
11028}
bec39cab 11029_ACEOF
81ecdfbb
RW
11030if ac_fn_c_try_compile "$LINENO"; then :
11031 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11032fi
81ecdfbb
RW
11033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034 CFLAGS="$saved_CFLAGS"
11035 done
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11037$as_echo "${PYTHON_CFLAGS}" >&6; }
11038 fi
043b6510
JB
11039
11040 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11041 # #if _SGIAPI
11042 # #define siginfo __siginfo
11043 # #endif
11044 # The problem is that including Python causes some XOPEN macros to be
11045 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11046 # to false. So, we work around this issue by defining siginfo ourself
11047 # though the command-line.
11048 case "$gdb_host" in
11049 irix*) if test "${GCC}" = yes; then
11050 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11051 fi
11052 ;;
11053 esac
81ecdfbb
RW
11054else
11055 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11056 # included.
11057 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11058 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11059 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11060fi
9a156167 11061
9a156167 11062
ac534cba
JB
11063
11064
81ecdfbb
RW
11065# ------------------------- #
11066# Checks for header files. #
11067# ------------------------- #
c890192f 11068
81ecdfbb
RW
11069ac_header_dirent=no
11070for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11071 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11073$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11074if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11075 $as_echo_n "(cached) " >&6
bec39cab 11076else
81ecdfbb 11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11078/* end confdefs.h. */
81ecdfbb
RW
11079#include <sys/types.h>
11080#include <$ac_hdr>
11081
a9322a30
TT
11082int
11083main ()
11084{
81ecdfbb
RW
11085if ((DIR *) 0)
11086return 0;
a9322a30
TT
11087 ;
11088 return 0;
11089}
bec39cab 11090_ACEOF
81ecdfbb
RW
11091if ac_fn_c_try_compile "$LINENO"; then :
11092 eval "$as_ac_Header=yes"
bec39cab 11093else
81ecdfbb 11094 eval "$as_ac_Header=no"
bec39cab 11095fi
81ecdfbb 11096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11097fi
81ecdfbb
RW
11098eval ac_res=\$$as_ac_Header
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11100$as_echo "$ac_res" >&6; }
11101eval as_val=\$$as_ac_Header
11102 if test "x$as_val" = x""yes; then :
11103 cat >>confdefs.h <<_ACEOF
11104#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11105_ACEOF
bec39cab 11106
81ecdfbb
RW
11107ac_header_dirent=$ac_hdr; break
11108fi
bec39cab 11109
81ecdfbb
RW
11110done
11111# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11112if test $ac_header_dirent = dirent.h; then
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11114$as_echo_n "checking for library containing opendir... " >&6; }
11115if test "${ac_cv_search_opendir+set}" = set; then :
11116 $as_echo_n "(cached) " >&6
c890192f 11117else
81ecdfbb
RW
11118 ac_func_search_save_LIBS=$LIBS
11119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120/* end confdefs.h. */
11121
11122/* Override any GCC internal prototype to avoid an error.
11123 Use char because int might match the return type of a GCC
11124 builtin and then its argument prototype would still apply. */
11125#ifdef __cplusplus
11126extern "C"
11127#endif
11128char opendir ();
11129int
11130main ()
11131{
11132return opendir ();
11133 ;
11134 return 0;
11135}
bec39cab 11136_ACEOF
81ecdfbb
RW
11137for ac_lib in '' dir; do
11138 if test -z "$ac_lib"; then
11139 ac_res="none required"
11140 else
11141 ac_res=-l$ac_lib
11142 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11143 fi
11144 if ac_fn_c_try_link "$LINENO"; then :
11145 ac_cv_search_opendir=$ac_res
11146fi
11147rm -f core conftest.err conftest.$ac_objext \
11148 conftest$ac_exeext
11149 if test "${ac_cv_search_opendir+set}" = set; then :
11150 break
11151fi
11152done
11153if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11154
81ecdfbb
RW
11155else
11156 ac_cv_search_opendir=no
11157fi
11158rm conftest.$ac_ext
11159LIBS=$ac_func_search_save_LIBS
11160fi
11161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11162$as_echo "$ac_cv_search_opendir" >&6; }
11163ac_res=$ac_cv_search_opendir
11164if test "$ac_res" != no; then :
11165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11166
bec39cab 11167fi
81ecdfbb 11168
bec39cab 11169else
81ecdfbb
RW
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11171$as_echo_n "checking for library containing opendir... " >&6; }
11172if test "${ac_cv_search_opendir+set}" = set; then :
11173 $as_echo_n "(cached) " >&6
11174else
11175 ac_func_search_save_LIBS=$LIBS
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11177/* end confdefs.h. */
81ecdfbb
RW
11178
11179/* Override any GCC internal prototype to avoid an error.
11180 Use char because int might match the return type of a GCC
11181 builtin and then its argument prototype would still apply. */
11182#ifdef __cplusplus
11183extern "C"
11184#endif
11185char opendir ();
a9322a30
TT
11186int
11187main ()
11188{
81ecdfbb 11189return opendir ();
a9322a30
TT
11190 ;
11191 return 0;
11192}
bec39cab 11193_ACEOF
81ecdfbb
RW
11194for ac_lib in '' x; do
11195 if test -z "$ac_lib"; then
11196 ac_res="none required"
11197 else
11198 ac_res=-l$ac_lib
11199 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11200 fi
11201 if ac_fn_c_try_link "$LINENO"; then :
11202 ac_cv_search_opendir=$ac_res
11203fi
11204rm -f core conftest.err conftest.$ac_objext \
11205 conftest$ac_exeext
11206 if test "${ac_cv_search_opendir+set}" = set; then :
11207 break
11208fi
11209done
11210if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11211
81ecdfbb
RW
11212else
11213 ac_cv_search_opendir=no
bec39cab 11214fi
81ecdfbb
RW
11215rm conftest.$ac_ext
11216LIBS=$ac_func_search_save_LIBS
a9322a30 11217fi
81ecdfbb
RW
11218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11219$as_echo "$ac_cv_search_opendir" >&6; }
11220ac_res=$ac_cv_search_opendir
11221if test "$ac_res" != no; then :
11222 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11223
81ecdfbb 11224fi
bec39cab 11225
81ecdfbb 11226fi
bec39cab 11227
81ecdfbb
RW
11228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11229$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11230if test "${ac_cv_header_stat_broken+set}" = set; then :
11231 $as_echo_n "(cached) " >&6
9a156167 11232else
81ecdfbb
RW
11233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11234/* end confdefs.h. */
11235#include <sys/types.h>
11236#include <sys/stat.h>
11237
11238#if defined S_ISBLK && defined S_IFDIR
11239extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11240#endif
11241
11242#if defined S_ISBLK && defined S_IFCHR
11243extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11244#endif
11245
11246#if defined S_ISLNK && defined S_IFREG
11247extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11248#endif
11249
11250#if defined S_ISSOCK && defined S_IFREG
11251extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11252#endif
11253
bec39cab 11254_ACEOF
81ecdfbb
RW
11255if ac_fn_c_try_compile "$LINENO"; then :
11256 ac_cv_header_stat_broken=no
11257else
11258 ac_cv_header_stat_broken=yes
11259fi
11260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261fi
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11263$as_echo "$ac_cv_header_stat_broken" >&6; }
11264if test $ac_cv_header_stat_broken = yes; then
9a156167 11265
81ecdfbb 11266$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11267
bec39cab 11268fi
81ecdfbb
RW
11269
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11271$as_echo_n "checking for ANSI C header files... " >&6; }
11272if test "${ac_cv_header_stdc+set}" = set; then :
11273 $as_echo_n "(cached) " >&6
bec39cab 11274else
81ecdfbb 11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11276/* end confdefs.h. */
81ecdfbb
RW
11277#include <stdlib.h>
11278#include <stdarg.h>
11279#include <string.h>
11280#include <float.h>
11281
a9322a30
TT
11282int
11283main ()
11284{
a9322a30
TT
11285
11286 ;
11287 return 0;
11288}
bec39cab 11289_ACEOF
81ecdfbb
RW
11290if ac_fn_c_try_compile "$LINENO"; then :
11291 ac_cv_header_stdc=yes
bec39cab 11292else
81ecdfbb 11293 ac_cv_header_stdc=no
a9322a30 11294fi
81ecdfbb 11295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11296
81ecdfbb
RW
11297if test $ac_cv_header_stdc = yes; then
11298 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11300/* end confdefs.h. */
11301#include <string.h>
bec39cab 11302
81ecdfbb
RW
11303_ACEOF
11304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11305 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11306
bec39cab 11307else
81ecdfbb
RW
11308 ac_cv_header_stdc=no
11309fi
11310rm -f conftest*
11311
11312fi
11313
11314if test $ac_cv_header_stdc = yes; then
11315 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317/* end confdefs.h. */
11318#include <stdlib.h>
11319
bec39cab 11320_ACEOF
81ecdfbb
RW
11321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11322 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11323
81ecdfbb
RW
11324else
11325 ac_cv_header_stdc=no
11326fi
11327rm -f conftest*
bec39cab 11328
bec39cab 11329fi
81ecdfbb
RW
11330
11331if test $ac_cv_header_stdc = yes; then
11332 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11333 if test "$cross_compiling" = yes; then :
11334 :
bec39cab 11335else
81ecdfbb 11336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11337/* end confdefs.h. */
81ecdfbb
RW
11338#include <ctype.h>
11339#include <stdlib.h>
11340#if ((' ' & 0x0FF) == 0x020)
11341# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11342# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11343#else
11344# define ISLOWER(c) \
11345 (('a' <= (c) && (c) <= 'i') \
11346 || ('j' <= (c) && (c) <= 'r') \
11347 || ('s' <= (c) && (c) <= 'z'))
11348# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11349#endif
11350
11351#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11352int
11353main ()
11354{
81ecdfbb
RW
11355 int i;
11356 for (i = 0; i < 256; i++)
11357 if (XOR (islower (i), ISLOWER (i))
11358 || toupper (i) != TOUPPER (i))
11359 return 2;
a9322a30
TT
11360 return 0;
11361}
bec39cab 11362_ACEOF
81ecdfbb
RW
11363if ac_fn_c_try_run "$LINENO"; then :
11364
bec39cab 11365else
81ecdfbb
RW
11366 ac_cv_header_stdc=no
11367fi
11368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11369 conftest.$ac_objext conftest.beam conftest.$ac_ext
11370fi
bec39cab 11371
bec39cab 11372fi
a9322a30 11373fi
81ecdfbb
RW
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11375$as_echo "$ac_cv_header_stdc" >&6; }
11376if test $ac_cv_header_stdc = yes; then
bec39cab 11377
81ecdfbb 11378$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11379
81ecdfbb 11380fi
bec39cab 11381
81ecdfbb
RW
11382# elf_hp.h is for HP/UX 64-bit shared library support.
11383# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11384# unconditionally, so what's the point in checking these?
11385for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11386 thread_db.h gnu/libc-version.h signal.h stddef.h \
11387 stdlib.h string.h memory.h strings.h sys/fault.h \
11388 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11389 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11390 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11391 sys/types.h sys/wait.h wait.h termios.h termio.h \
11392 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11393do :
11394 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11395ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11396eval as_val=\$$as_ac_Header
11397 if test "x$as_val" = x""yes; then :
bec39cab 11398 cat >>confdefs.h <<_ACEOF
81ecdfbb 11399#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11400_ACEOF
c906108c 11401
bec39cab 11402fi
81ecdfbb
RW
11403
11404done
11405
11406for ac_header in link.h
11407do :
11408 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11409# include <sys/types.h>
11410#endif
11411#if HAVE_NLIST_H
11412# include <nlist.h>
a9322a30
TT
11413#endif
11414
81ecdfbb
RW
11415"
11416if test "x$ac_cv_header_link_h" = x""yes; then :
11417 cat >>confdefs.h <<_ACEOF
11418#define HAVE_LINK_H 1
bec39cab 11419_ACEOF
bec39cab 11420
a9322a30 11421fi
bec39cab 11422
81ecdfbb 11423done
c906108c 11424
81ecdfbb
RW
11425for ac_header in sys/proc.h
11426do :
11427 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11428# include <sys/param.h>
11429#endif
c906108c 11430
81ecdfbb
RW
11431"
11432if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11433 cat >>confdefs.h <<_ACEOF
81ecdfbb 11434#define HAVE_SYS_PROC_H 1
bec39cab 11435_ACEOF
5ee754fc 11436
bec39cab 11437fi
81ecdfbb
RW
11438
11439done
11440
11441for ac_header in sys/user.h
11442do :
11443 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11444# include <sys/param.h>
a9322a30
TT
11445#endif
11446
81ecdfbb
RW
11447"
11448if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11449 cat >>confdefs.h <<_ACEOF
11450#define HAVE_SYS_USER_H 1
bec39cab 11451_ACEOF
bec39cab 11452
a9322a30 11453fi
bec39cab 11454
81ecdfbb 11455done
5ee754fc 11456
5ee754fc 11457
81ecdfbb
RW
11458# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11459# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11460# think that we don't have <curses.h> if we're using GCC.
11461case $host_os in
11462 solaris2.[789])
11463 if test "$GCC" = yes; then
11464
11465$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11466
11467 fi ;;
11468esac
11469for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11470do :
11471 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11472ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11473eval as_val=\$$as_ac_Header
11474 if test "x$as_val" = x""yes; then :
bec39cab 11475 cat >>confdefs.h <<_ACEOF
81ecdfbb 11476#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11477_ACEOF
5ee754fc
MK
11478
11479fi
11480
81ecdfbb 11481done
bec39cab 11482
81ecdfbb
RW
11483for ac_header in term.h
11484do :
11485 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11486# include <curses.h>
11487#endif
bec39cab 11488
81ecdfbb
RW
11489"
11490if test "x$ac_cv_header_term_h" = x""yes; then :
11491 cat >>confdefs.h <<_ACEOF
11492#define HAVE_TERM_H 1
a8111142 11493_ACEOF
a8111142 11494
a8111142 11495fi
a8111142 11496
81ecdfbb 11497done
a8111142
TT
11498
11499
81ecdfbb
RW
11500# ------------------------- #
11501# Checks for declarations. #
11502# ------------------------- #
a9322a30 11503
81ecdfbb
RW
11504ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11505if test "x$ac_cv_have_decl_free" = x""yes; then :
11506 ac_have_decl=1
bec39cab 11507else
81ecdfbb
RW
11508 ac_have_decl=0
11509fi
11510
11511cat >>confdefs.h <<_ACEOF
11512#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11513_ACEOF
81ecdfbb
RW
11514ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11515if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11516 ac_have_decl=1
11517else
11518 ac_have_decl=0
11519fi
11520
11521cat >>confdefs.h <<_ACEOF
11522#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11523_ACEOF
81ecdfbb
RW
11524ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11525if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11526 ac_have_decl=1
bec39cab 11527else
81ecdfbb
RW
11528 ac_have_decl=0
11529fi
bec39cab 11530
81ecdfbb
RW
11531cat >>confdefs.h <<_ACEOF
11532#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11533_ACEOF
81ecdfbb
RW
11534ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11535if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11536 ac_have_decl=1
11537else
11538 ac_have_decl=0
11539fi
11540
11541cat >>confdefs.h <<_ACEOF
11542#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11543_ACEOF
81ecdfbb
RW
11544ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11545if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11546 ac_have_decl=1
bec39cab 11547else
81ecdfbb
RW
11548 ac_have_decl=0
11549fi
5ee754fc 11550
81ecdfbb
RW
11551cat >>confdefs.h <<_ACEOF
11552#define HAVE_DECL_STRSTR $ac_have_decl
11553_ACEOF
11554ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11555if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11556 ac_have_decl=1
11557else
11558 ac_have_decl=0
5ee754fc 11559fi
81ecdfbb
RW
11560
11561cat >>confdefs.h <<_ACEOF
11562#define HAVE_DECL_GETOPT $ac_have_decl
11563_ACEOF
11564ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11565if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11566 ac_have_decl=1
11567else
11568 ac_have_decl=0
5ee754fc 11569fi
81ecdfbb
RW
11570
11571cat >>confdefs.h <<_ACEOF
11572#define HAVE_DECL_SNPRINTF $ac_have_decl
11573_ACEOF
11574ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11575if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11576 ac_have_decl=1
11577else
11578 ac_have_decl=0
5ee754fc
MK
11579fi
11580
a9322a30 11581cat >>confdefs.h <<_ACEOF
81ecdfbb 11582#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11583_ACEOF
5ee754fc 11584
5ee754fc 11585
81ecdfbb
RW
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11587$as_echo_n "checking for LC_MESSAGES... " >&6; }
11588if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11589 $as_echo_n "(cached) " >&6
bec39cab 11590else
81ecdfbb 11591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11592/* end confdefs.h. */
81ecdfbb 11593#include <locale.h>
a9322a30
TT
11594int
11595main ()
11596{
81ecdfbb 11597return LC_MESSAGES
a9322a30
TT
11598 ;
11599 return 0;
11600}
bec39cab 11601_ACEOF
81ecdfbb
RW
11602if ac_fn_c_try_link "$LINENO"; then :
11603 am_cv_val_LC_MESSAGES=yes
bec39cab 11604else
81ecdfbb
RW
11605 am_cv_val_LC_MESSAGES=no
11606fi
11607rm -f core conftest.err conftest.$ac_objext \
11608 conftest$ac_exeext conftest.$ac_ext
11609fi
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11611$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11612 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11613
81ecdfbb
RW
11614$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11615
11616 fi
11617
11618
11619# ----------------------- #
11620# Checks for structures. #
11621# ----------------------- #
11622
11623ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11624if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11625
11626cat >>confdefs.h <<_ACEOF
11627#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11628_ACEOF
7eb368b3 11629
81ecdfbb 11630
7eb368b3 11631fi
81ecdfbb
RW
11632ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11633if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11634
a9322a30
TT
11635cat >>confdefs.h <<_ACEOF
11636#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11637_ACEOF
11638
a9322a30 11639
7eb368b3
NR
11640fi
11641
7eb368b3 11642
a9322a30
TT
11643# ------------------ #
11644# Checks for types. #
11645# ------------------ #
7eb368b3 11646
81ecdfbb
RW
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11648$as_echo_n "checking return type of signal handlers... " >&6; }
11649if test "${ac_cv_type_signal+set}" = set; then :
11650 $as_echo_n "(cached) " >&6
bec39cab 11651else
81ecdfbb 11652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11653/* end confdefs.h. */
a9322a30
TT
11654#include <sys/types.h>
11655#include <signal.h>
7cb9022a 11656
a9322a30
TT
11657int
11658main ()
11659{
81ecdfbb 11660return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11661 ;
11662 return 0;
11663}
bec39cab 11664_ACEOF
81ecdfbb
RW
11665if ac_fn_c_try_compile "$LINENO"; then :
11666 ac_cv_type_signal=int
bec39cab 11667else
81ecdfbb 11668 ac_cv_type_signal=void
bec39cab 11669fi
81ecdfbb 11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11671fi
81ecdfbb
RW
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11673$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11674
a9322a30
TT
11675cat >>confdefs.h <<_ACEOF
11676#define RETSIGTYPE $ac_cv_type_signal
11677_ACEOF
5ee754fc 11678
bec39cab 11679
81ecdfbb 11680ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11681#include <sys/socket.h>
11682
81ecdfbb
RW
11683"
11684if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11685
a9322a30
TT
11686cat >>confdefs.h <<_ACEOF
11687#define HAVE_SOCKLEN_T 1
11688_ACEOF
11689
11690
11691fi
11692
11693
11694# ------------------------------------- #
11695# Checks for compiler characteristics. #
11696# ------------------------------------- #
11697
81ecdfbb
RW
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11699$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11700if test "${ac_cv_c_const+set}" = set; then :
11701 $as_echo_n "(cached) " >&6
a9322a30 11702else
81ecdfbb 11703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11704/* end confdefs.h. */
a9322a30
TT
11705
11706int
11707main ()
11708{
11709/* FIXME: Include the comments suggested by Paul. */
11710#ifndef __cplusplus
11711 /* Ultrix mips cc rejects this. */
11712 typedef int charset[2];
81ecdfbb 11713 const charset cs;
a9322a30 11714 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11715 char const *const *pcpcc;
11716 char **ppc;
a9322a30
TT
11717 /* NEC SVR4.0.2 mips cc rejects this. */
11718 struct point {int x, y;};
11719 static struct point const zero = {0,0};
11720 /* AIX XL C 1.02.0.0 rejects this.
11721 It does not let you subtract one const X* pointer from another in
11722 an arm of an if-expression whose if-part is not a constant
11723 expression */
11724 const char *g = "string";
81ecdfbb 11725 pcpcc = &g + (g ? g-g : 0);
a9322a30 11726 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11727 ++pcpcc;
11728 ppc = (char**) pcpcc;
11729 pcpcc = (char const *const *) ppc;
a9322a30
TT
11730 { /* SCO 3.2v4 cc rejects this. */
11731 char *t;
11732 char const *s = 0 ? (char *) 0 : (char const *) 0;
11733
11734 *t++ = 0;
81ecdfbb 11735 if (s) return 0;
a9322a30
TT
11736 }
11737 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11738 int x[] = {25, 17};
11739 const int *foo = &x[0];
11740 ++foo;
11741 }
11742 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11743 typedef const int *iptr;
11744 iptr p = 0;
11745 ++p;
11746 }
11747 { /* AIX XL C 1.02.0.0 rejects this saying
11748 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11749 struct s { int j; const int *ap[3]; };
11750 struct s *b; b->j = 5;
11751 }
11752 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11753 const int foo = 10;
81ecdfbb 11754 if (!foo) return 0;
a9322a30 11755 }
81ecdfbb 11756 return !cs[0] && !zero.x;
a9322a30
TT
11757#endif
11758
11759 ;
11760 return 0;
11761}
bec39cab 11762_ACEOF
81ecdfbb 11763if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11764 ac_cv_c_const=yes
5ee754fc 11765else
81ecdfbb 11766 ac_cv_c_const=no
5ee754fc 11767fi
81ecdfbb 11768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11769fi
81ecdfbb
RW
11770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11771$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11772if test $ac_cv_c_const = no; then
bec39cab 11773
81ecdfbb 11774$as_echo "#define const /**/" >>confdefs.h
bec39cab 11775
5ee754fc 11776fi
bec39cab 11777
81ecdfbb
RW
11778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11779$as_echo_n "checking for inline... " >&6; }
11780if test "${ac_cv_c_inline+set}" = set; then :
11781 $as_echo_n "(cached) " >&6
bec39cab 11782else
a9322a30
TT
11783 ac_cv_c_inline=no
11784for ac_kw in inline __inline__ __inline; do
81ecdfbb 11785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11786/* end confdefs.h. */
a9322a30
TT
11787#ifndef __cplusplus
11788typedef int foo_t;
11789static $ac_kw foo_t static_foo () {return 0; }
11790$ac_kw foo_t foo () {return 0; }
11791#endif
11792
bec39cab 11793_ACEOF
81ecdfbb
RW
11794if ac_fn_c_try_compile "$LINENO"; then :
11795 ac_cv_c_inline=$ac_kw
bec39cab 11796fi
81ecdfbb
RW
11797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11798 test "$ac_cv_c_inline" != no && break
a9322a30 11799done
bec39cab 11800
5ee754fc 11801fi
81ecdfbb
RW
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11803$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11804
a9322a30
TT
11805case $ac_cv_c_inline in
11806 inline | yes) ;;
11807 *)
11808 case $ac_cv_c_inline in
11809 no) ac_val=;;
11810 *) ac_val=$ac_cv_c_inline;;
11811 esac
11812 cat >>confdefs.h <<_ACEOF
11813#ifndef __cplusplus
11814#define inline $ac_val
11815#endif
11816_ACEOF
bec39cab
AC
11817 ;;
11818esac
bec39cab 11819
81ecdfbb
RW
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11821$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11822if test "${ac_cv_c_bigendian+set}" = set; then :
11823 $as_echo_n "(cached) " >&6
bec39cab 11824else
81ecdfbb
RW
11825 ac_cv_c_bigendian=unknown
11826 # See if we're dealing with a universal compiler.
11827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11828/* end confdefs.h. */
11829#ifndef __APPLE_CC__
11830 not a universal capable compiler
11831 #endif
11832 typedef int dummy;
11833
11834_ACEOF
11835if ac_fn_c_try_compile "$LINENO"; then :
11836
11837 # Check for potential -arch flags. It is not universal unless
11838 # there are at least two -arch flags with different values.
11839 ac_arch=
11840 ac_prev=
11841 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11842 if test -n "$ac_prev"; then
11843 case $ac_word in
11844 i?86 | x86_64 | ppc | ppc64)
11845 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11846 ac_arch=$ac_word
11847 else
11848 ac_cv_c_bigendian=universal
11849 break
11850 fi
11851 ;;
11852 esac
11853 ac_prev=
11854 elif test "x$ac_word" = "x-arch"; then
11855 ac_prev=arch
11856 fi
11857 done
11858fi
11859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860 if test $ac_cv_c_bigendian = unknown; then
11861 # See if sys/param.h defines the BYTE_ORDER macro.
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11863/* end confdefs.h. */
a9322a30 11864#include <sys/types.h>
81ecdfbb 11865 #include <sys/param.h>
a9322a30
TT
11866
11867int
11868main ()
11869{
81ecdfbb
RW
11870#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11871 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11872 && LITTLE_ENDIAN)
11873 bogus endian macros
11874 #endif
a9322a30
TT
11875
11876 ;
11877 return 0;
11878}
bec39cab 11879_ACEOF
81ecdfbb 11880if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11881 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11883/* end confdefs.h. */
a9322a30 11884#include <sys/types.h>
81ecdfbb 11885 #include <sys/param.h>
a9322a30
TT
11886
11887int
11888main ()
11889{
11890#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11891 not big endian
11892 #endif
a9322a30
TT
11893
11894 ;
11895 return 0;
11896}
bec39cab 11897_ACEOF
81ecdfbb 11898if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11899 ac_cv_c_bigendian=yes
5ee754fc 11900else
81ecdfbb 11901 ac_cv_c_bigendian=no
5ee754fc 11902fi
81ecdfbb
RW
11903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11904fi
11905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11906 fi
11907 if test $ac_cv_c_bigendian = unknown; then
11908 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910/* end confdefs.h. */
11911#include <limits.h>
bec39cab 11912
81ecdfbb
RW
11913int
11914main ()
11915{
11916#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11917 bogus endian macros
11918 #endif
11919
11920 ;
11921 return 0;
11922}
7eb368b3 11923_ACEOF
81ecdfbb
RW
11924if ac_fn_c_try_compile "$LINENO"; then :
11925 # It does; now see whether it defined to _BIG_ENDIAN or not.
11926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11927/* end confdefs.h. */
81ecdfbb
RW
11928#include <limits.h>
11929
7eb368b3
NR
11930int
11931main ()
11932{
81ecdfbb
RW
11933#ifndef _BIG_ENDIAN
11934 not big endian
11935 #endif
11936
7eb368b3
NR
11937 ;
11938 return 0;
11939}
11940_ACEOF
81ecdfbb 11941if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11942 ac_cv_c_bigendian=yes
81ecdfbb
RW
11943else
11944 ac_cv_c_bigendian=no
a9322a30 11945fi
81ecdfbb 11946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11947fi
81ecdfbb
RW
11948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11949 fi
11950 if test $ac_cv_c_bigendian = unknown; then
11951 # Compile a test program.
11952 if test "$cross_compiling" = yes; then :
11953 # Try to guess by grepping values from an object file.
11954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956short int ascii_mm[] =
11957 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11958 short int ascii_ii[] =
11959 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11960 int use_ascii (int i) {
11961 return ascii_mm[i] + ascii_ii[i];
11962 }
11963 short int ebcdic_ii[] =
11964 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11965 short int ebcdic_mm[] =
11966 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11967 int use_ebcdic (int i) {
11968 return ebcdic_mm[i] + ebcdic_ii[i];
11969 }
11970 extern int foo;
7eb368b3 11971
81ecdfbb
RW
11972int
11973main ()
11974{
11975return use_ascii (foo) == use_ebcdic (foo);
11976 ;
11977 return 0;
11978}
11979_ACEOF
11980if ac_fn_c_try_compile "$LINENO"; then :
11981 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11982 ac_cv_c_bigendian=yes
11983 fi
11984 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11985 if test "$ac_cv_c_bigendian" = unknown; then
11986 ac_cv_c_bigendian=no
11987 else
11988 # finding both strings is unlikely to happen, but who knows?
11989 ac_cv_c_bigendian=unknown
11990 fi
11991 fi
7eb368b3 11992fi
81ecdfbb 11993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11994else
81ecdfbb 11995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11996/* end confdefs.h. */
81ecdfbb 11997$ac_includes_default
d3ea6809
MM
11998int
11999main ()
12000{
81ecdfbb
RW
12001
12002 /* Are we little or big endian? From Harbison&Steele. */
12003 union
12004 {
12005 long int l;
12006 char c[sizeof (long int)];
12007 } u;
12008 u.l = 1;
12009 return u.c[sizeof (long int) - 1] == 1;
12010
12011 ;
12012 return 0;
d3ea6809
MM
12013}
12014_ACEOF
81ecdfbb 12015if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12016 ac_cv_c_bigendian=no
d3ea6809 12017else
81ecdfbb 12018 ac_cv_c_bigendian=yes
d3ea6809 12019fi
81ecdfbb
RW
12020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12021 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12022fi
a9322a30 12023
81ecdfbb
RW
12024 fi
12025fi
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12027$as_echo "$ac_cv_c_bigendian" >&6; }
12028 case $ac_cv_c_bigendian in #(
12029 yes)
12030 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12031;; #(
12032 no)
12033 ;; #(
12034 universal)
12035
12036$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12037
12038 ;; #(
12039 *)
12040 as_fn_error "unknown endianness
12041 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12042 esac
d3ea6809
MM
12043
12044
a9322a30
TT
12045# ------------------------------ #
12046# Checks for library functions. #
12047# ------------------------------ #
d3ea6809 12048
a9322a30
TT
12049# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12050# for constant arguments. Useless!
81ecdfbb
RW
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12052$as_echo_n "checking for working alloca.h... " >&6; }
12053if test "${ac_cv_working_alloca_h+set}" = set; then :
12054 $as_echo_n "(cached) " >&6
d3ea6809 12055else
81ecdfbb 12056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12057/* end confdefs.h. */
a9322a30 12058#include <alloca.h>
bec39cab
AC
12059int
12060main ()
12061{
a9322a30 12062char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12063 if (p) return 0;
bec39cab
AC
12064 ;
12065 return 0;
12066}
12067_ACEOF
81ecdfbb 12068if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12069 ac_cv_working_alloca_h=yes
bec39cab 12070else
81ecdfbb 12071 ac_cv_working_alloca_h=no
bec39cab 12072fi
81ecdfbb
RW
12073rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext conftest.$ac_ext
bec39cab 12075fi
81ecdfbb
RW
12076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12077$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12078if test $ac_cv_working_alloca_h = yes; then
12079
81ecdfbb 12080$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12081
c906108c 12082fi
bec39cab 12083
81ecdfbb
RW
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12085$as_echo_n "checking for alloca... " >&6; }
12086if test "${ac_cv_func_alloca_works+set}" = set; then :
12087 $as_echo_n "(cached) " >&6
bec39cab 12088else
81ecdfbb 12089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12090/* end confdefs.h. */
a9322a30
TT
12091#ifdef __GNUC__
12092# define alloca __builtin_alloca
b4e70030 12093#else
a9322a30
TT
12094# ifdef _MSC_VER
12095# include <malloc.h>
12096# define alloca _alloca
12097# else
81ecdfbb 12098# ifdef HAVE_ALLOCA_H
a9322a30
TT
12099# include <alloca.h>
12100# else
12101# ifdef _AIX
12102 #pragma alloca
12103# else
12104# ifndef alloca /* predefined by HP cc +Olibcalls */
12105char *alloca ();
12106# endif
12107# endif
12108# endif
12109# endif
c906108c 12110#endif
97bf5e38 12111
bec39cab
AC
12112int
12113main ()
12114{
a9322a30 12115char *p = (char *) alloca (1);
81ecdfbb 12116 if (p) return 0;
bec39cab
AC
12117 ;
12118 return 0;
12119}
12120_ACEOF
81ecdfbb 12121if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12122 ac_cv_func_alloca_works=yes
bec39cab 12123else
81ecdfbb 12124 ac_cv_func_alloca_works=no
bec39cab 12125fi
81ecdfbb
RW
12126rm -f core conftest.err conftest.$ac_objext \
12127 conftest$ac_exeext conftest.$ac_ext
bec39cab 12128fi
81ecdfbb
RW
12129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12130$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12131
12132if test $ac_cv_func_alloca_works = yes; then
12133
81ecdfbb 12134$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12135
a9322a30
TT
12136else
12137 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12138# that cause trouble. Some versions do not even contain alloca or
12139# contain a buggy version. If you still want to use their alloca,
12140# use ar to extract alloca.o from them instead of compiling alloca.c.
12141
81ecdfbb 12142ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12143
81ecdfbb 12144$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12145
bec39cab 12146
81ecdfbb
RW
12147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12148$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12149if test "${ac_cv_os_cray+set}" = set; then :
12150 $as_echo_n "(cached) " >&6
a9322a30 12151else
81ecdfbb 12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12153/* end confdefs.h. */
81ecdfbb 12154#if defined CRAY && ! defined CRAY2
a9322a30
TT
12155webecray
12156#else
12157wenotbecray
12158#endif
12159
12160_ACEOF
12161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12162 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12163 ac_cv_os_cray=yes
12164else
81ecdfbb 12165 ac_cv_os_cray=no
bec39cab 12166fi
81ecdfbb
RW
12167rm -f conftest*
12168
bec39cab 12169fi
81ecdfbb
RW
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12171$as_echo "$ac_cv_os_cray" >&6; }
12172if test $ac_cv_os_cray = yes; then
12173 for ac_func in _getb67 GETB67 getb67; do
12174 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12175ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12176eval as_val=\$$as_ac_var
12177 if test "x$as_val" = x""yes; then :
a9322a30
TT
12178
12179cat >>confdefs.h <<_ACEOF
12180#define CRAY_STACKSEG_END $ac_func
bec39cab 12181_ACEOF
c906108c 12182
a9322a30 12183 break
c906108c
SS
12184fi
12185
a9322a30
TT
12186 done
12187fi
bec39cab 12188
81ecdfbb
RW
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12190$as_echo_n "checking stack direction for C alloca... " >&6; }
12191if test "${ac_cv_c_stack_direction+set}" = set; then :
12192 $as_echo_n "(cached) " >&6
a9322a30 12193else
81ecdfbb 12194 if test "$cross_compiling" = yes; then :
a9322a30 12195 ac_cv_c_stack_direction=0
bec39cab 12196else
81ecdfbb 12197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12198/* end confdefs.h. */
81ecdfbb 12199$ac_includes_default
a9322a30
TT
12200int
12201find_stack_direction ()
b4e70030 12202{
a9322a30
TT
12203 static char *addr = 0;
12204 auto char dummy;
12205 if (addr == 0)
12206 {
12207 addr = &dummy;
12208 return find_stack_direction ();
12209 }
12210 else
12211 return (&dummy > addr) ? 1 : -1;
b4e70030 12212}
b757528f 12213
bec39cab
AC
12214int
12215main ()
12216{
81ecdfbb 12217 return find_stack_direction () < 0;
bec39cab
AC
12218}
12219_ACEOF
81ecdfbb 12220if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12221 ac_cv_c_stack_direction=1
12222else
81ecdfbb 12223 ac_cv_c_stack_direction=-1
a9322a30 12224fi
81ecdfbb
RW
12225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12226 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12227fi
a9322a30 12228
81ecdfbb
RW
12229fi
12230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12231$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12232cat >>confdefs.h <<_ACEOF
12233#define STACK_DIRECTION $ac_cv_c_stack_direction
12234_ACEOF
12235
12236
12237fi
12238
a9322a30 12239for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12240do :
12241 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12242ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12243eval as_val=\$$as_ac_Header
12244 if test "x$as_val" = x""yes; then :
bec39cab 12245 cat >>confdefs.h <<_ACEOF
81ecdfbb 12246#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12247_ACEOF
b757528f 12248
b757528f 12249fi
bec39cab 12250
a9322a30 12251done
a3828db0 12252
a9322a30 12253for ac_func in getpagesize
81ecdfbb
RW
12254do :
12255 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12256if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12257 cat >>confdefs.h <<_ACEOF
81ecdfbb 12258#define HAVE_GETPAGESIZE 1
bec39cab 12259_ACEOF
bcb3dc3d 12260
bcb3dc3d
MK
12261fi
12262done
12263
81ecdfbb
RW
12264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12265$as_echo_n "checking for working mmap... " >&6; }
12266if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12267 $as_echo_n "(cached) " >&6
a9322a30 12268else
81ecdfbb 12269 if test "$cross_compiling" = yes; then :
a9322a30 12270 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12271else
81ecdfbb 12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12273/* end confdefs.h. */
a9322a30
TT
12274$ac_includes_default
12275/* malloc might have been renamed as rpl_malloc. */
12276#undef malloc
bec39cab 12277
a9322a30
TT
12278/* Thanks to Mike Haertel and Jim Avera for this test.
12279 Here is a matrix of mmap possibilities:
12280 mmap private not fixed
12281 mmap private fixed at somewhere currently unmapped
12282 mmap private fixed at somewhere already mapped
12283 mmap shared not fixed
12284 mmap shared fixed at somewhere currently unmapped
12285 mmap shared fixed at somewhere already mapped
12286 For private mappings, we should verify that changes cannot be read()
12287 back from the file, nor mmap's back from the file at a different
12288 address. (There have been systems where private was not correctly
12289 implemented like the infamous i386 svr4.0, and systems where the
12290 VM page cache was not coherent with the file system buffer cache
12291 like early versions of FreeBSD and possibly contemporary NetBSD.)
12292 For shared mappings, we should conversely verify that changes get
12293 propagated back to all the places they're supposed to be.
bec39cab 12294
a9322a30
TT
12295 Grep wants private fixed already mapped.
12296 The main things grep needs to know about mmap are:
12297 * does it exist and is it safe to write into the mmap'd area
12298 * how to use it (BSD variants) */
8b9cf735 12299
a9322a30
TT
12300#include <fcntl.h>
12301#include <sys/mman.h>
8b9cf735 12302
81ecdfbb 12303#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12304char *malloc ();
a3828db0
MK
12305#endif
12306
a9322a30 12307/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12308#ifndef HAVE_GETPAGESIZE
a9322a30 12309/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12310# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12311# define HAVE_SYS_PARAM_H 1
12312# endif
12313
12314# ifdef _SC_PAGESIZE
12315# define getpagesize() sysconf(_SC_PAGESIZE)
12316# else /* no _SC_PAGESIZE */
81ecdfbb 12317# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12318# include <sys/param.h>
12319# ifdef EXEC_PAGESIZE
12320# define getpagesize() EXEC_PAGESIZE
12321# else /* no EXEC_PAGESIZE */
12322# ifdef NBPG
12323# define getpagesize() NBPG * CLSIZE
12324# ifndef CLSIZE
12325# define CLSIZE 1
12326# endif /* no CLSIZE */
12327# else /* no NBPG */
12328# ifdef NBPC
12329# define getpagesize() NBPC
12330# else /* no NBPC */
12331# ifdef PAGESIZE
12332# define getpagesize() PAGESIZE
12333# endif /* PAGESIZE */
12334# endif /* no NBPC */
12335# endif /* no NBPG */
12336# endif /* no EXEC_PAGESIZE */
12337# else /* no HAVE_SYS_PARAM_H */
12338# define getpagesize() 8192 /* punt totally */
12339# endif /* no HAVE_SYS_PARAM_H */
12340# endif /* no _SC_PAGESIZE */
12341
12342#endif /* no HAVE_GETPAGESIZE */
12343
bec39cab
AC
12344int
12345main ()
12346{
a9322a30
TT
12347 char *data, *data2, *data3;
12348 int i, pagesize;
12349 int fd;
12350
12351 pagesize = getpagesize ();
12352
12353 /* First, make a file with some known garbage in it. */
12354 data = (char *) malloc (pagesize);
12355 if (!data)
81ecdfbb 12356 return 1;
a9322a30
TT
12357 for (i = 0; i < pagesize; ++i)
12358 *(data + i) = rand ();
12359 umask (0);
12360 fd = creat ("conftest.mmap", 0600);
12361 if (fd < 0)
81ecdfbb 12362 return 1;
a9322a30 12363 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12364 return 1;
a9322a30
TT
12365 close (fd);
12366
12367 /* Next, try to mmap the file at a fixed address which already has
12368 something else allocated at it. If we can, also make sure that
12369 we see the same garbage. */
12370 fd = open ("conftest.mmap", O_RDWR);
12371 if (fd < 0)
81ecdfbb 12372 return 1;
a9322a30
TT
12373 data2 = (char *) malloc (2 * pagesize);
12374 if (!data2)
81ecdfbb
RW
12375 return 1;
12376 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12377 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12378 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12379 return 1;
a9322a30
TT
12380 for (i = 0; i < pagesize; ++i)
12381 if (*(data + i) != *(data2 + i))
81ecdfbb 12382 return 1;
a9322a30
TT
12383
12384 /* Finally, make sure that changes to the mapped area do not
12385 percolate back to the file as seen by read(). (This is a bug on
12386 some variants of i386 svr4.0.) */
12387 for (i = 0; i < pagesize; ++i)
12388 *(data2 + i) = *(data2 + i) + 1;
12389 data3 = (char *) malloc (pagesize);
12390 if (!data3)
81ecdfbb 12391 return 1;
a9322a30 12392 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12393 return 1;
a9322a30
TT
12394 for (i = 0; i < pagesize; ++i)
12395 if (*(data + i) != *(data3 + i))
81ecdfbb 12396 return 1;
a9322a30 12397 close (fd);
81ecdfbb 12398 return 0;
bec39cab
AC
12399}
12400_ACEOF
81ecdfbb 12401if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12402 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12403else
81ecdfbb 12404 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12405fi
81ecdfbb
RW
12406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12407 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12408fi
81ecdfbb 12409
a9322a30 12410fi
81ecdfbb
RW
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12412$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12413if test $ac_cv_func_mmap_fixed_mapped = yes; then
12414
81ecdfbb 12415$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12416
086ec9eb 12417fi
a9322a30 12418rm -f conftest.mmap
a3828db0 12419
81ecdfbb
RW
12420ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12421if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12422
a9322a30
TT
12423else
12424
12425cat >>confdefs.h <<_ACEOF
12426#define pid_t int
bec39cab 12427_ACEOF
086ec9eb
MK
12428
12429fi
12430
81ecdfbb
RW
12431for ac_header in vfork.h
12432do :
12433 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12434if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12435 cat >>confdefs.h <<_ACEOF
81ecdfbb 12436#define HAVE_VFORK_H 1
bec39cab 12437_ACEOF
c906108c
SS
12438
12439fi
a9322a30 12440
a3828db0 12441done
c906108c 12442
a9322a30 12443for ac_func in fork vfork
81ecdfbb
RW
12444do :
12445 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12446ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12447eval as_val=\$$as_ac_var
12448 if test "x$as_val" = x""yes; then :
a3828db0 12449 cat >>confdefs.h <<_ACEOF
81ecdfbb 12450#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12451_ACEOF
b83266a0 12452
97bf5e38 12453fi
a3828db0 12454done
b83266a0 12455
a9322a30 12456if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12458$as_echo_n "checking for working fork... " >&6; }
12459if test "${ac_cv_func_fork_works+set}" = set; then :
12460 $as_echo_n "(cached) " >&6
a9322a30 12461else
81ecdfbb 12462 if test "$cross_compiling" = yes; then :
a9322a30
TT
12463 ac_cv_func_fork_works=cross
12464else
81ecdfbb
RW
12465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466/* end confdefs.h. */
12467$ac_includes_default
12468int
12469main ()
12470{
12471
12472 /* By Ruediger Kuhlmann. */
12473 return fork () < 0;
12474
12475 ;
12476 return 0;
12477}
a9322a30 12478_ACEOF
81ecdfbb 12479if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12480 ac_cv_func_fork_works=yes
12481else
81ecdfbb 12482 ac_cv_func_fork_works=no
a9322a30 12483fi
81ecdfbb
RW
12484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12485 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12486fi
81ecdfbb 12487
a9322a30 12488fi
81ecdfbb
RW
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12490$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12491
12492else
12493 ac_cv_func_fork_works=$ac_cv_func_fork
12494fi
12495if test "x$ac_cv_func_fork_works" = xcross; then
12496 case $host in
12497 *-*-amigaos* | *-*-msdosdjgpp*)
12498 # Override, as these systems have only a dummy fork() stub
12499 ac_cv_func_fork_works=no
12500 ;;
12501 *)
12502 ac_cv_func_fork_works=yes
12503 ;;
12504 esac
81ecdfbb
RW
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12506$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12507fi
12508ac_cv_func_vfork_works=$ac_cv_func_vfork
12509if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12511$as_echo_n "checking for working vfork... " >&6; }
12512if test "${ac_cv_func_vfork_works+set}" = set; then :
12513 $as_echo_n "(cached) " >&6
a9322a30 12514else
81ecdfbb 12515 if test "$cross_compiling" = yes; then :
a9322a30
TT
12516 ac_cv_func_vfork_works=cross
12517else
81ecdfbb 12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12519/* end confdefs.h. */
12520/* Thanks to Paul Eggert for this test. */
81ecdfbb 12521$ac_includes_default
a9322a30 12522#include <sys/wait.h>
81ecdfbb 12523#ifdef HAVE_VFORK_H
a9322a30
TT
12524# include <vfork.h>
12525#endif
12526/* On some sparc systems, changes by the child to local and incoming
12527 argument registers are propagated back to the parent. The compiler
12528 is told about this with #include <vfork.h>, but some compilers
12529 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12530 static variable whose address is put into a register that is
12531 clobbered by the vfork. */
12532static void
12533#ifdef __cplusplus
12534sparc_address_test (int arg)
12535# else
12536sparc_address_test (arg) int arg;
12537#endif
12538{
12539 static pid_t child;
12540 if (!child) {
12541 child = vfork ();
12542 if (child < 0) {
12543 perror ("vfork");
12544 _exit(2);
12545 }
12546 if (!child) {
12547 arg = getpid();
12548 write(-1, "", 0);
12549 _exit (arg);
12550 }
12551 }
12552}
12553
12554int
12555main ()
12556{
12557 pid_t parent = getpid ();
12558 pid_t child;
12559
12560 sparc_address_test (0);
12561
12562 child = vfork ();
12563
12564 if (child == 0) {
12565 /* Here is another test for sparc vfork register problems. This
12566 test uses lots of local variables, at least as many local
12567 variables as main has allocated so far including compiler
12568 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12569 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12570 reuse the register of parent for one of the local variables,
12571 since it will think that parent can't possibly be used any more
12572 in this routine. Assigning to the local variable will thus
12573 munge parent in the parent process. */
12574 pid_t
12575 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12576 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12577 /* Convince the compiler that p..p7 are live; otherwise, it might
12578 use the same hardware register for all 8 local variables. */
12579 if (p != p1 || p != p2 || p != p3 || p != p4
12580 || p != p5 || p != p6 || p != p7)
12581 _exit(1);
12582
12583 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12584 from child file descriptors. If the child closes a descriptor
12585 before it execs or exits, this munges the parent's descriptor
12586 as well. Test for this by closing stdout in the child. */
12587 _exit(close(fileno(stdout)) != 0);
12588 } else {
12589 int status;
12590 struct stat st;
12591
12592 while (wait(&status) != child)
12593 ;
81ecdfbb 12594 return (
a9322a30
TT
12595 /* Was there some problem with vforking? */
12596 child < 0
12597
12598 /* Did the child fail? (This shouldn't happen.) */
12599 || status
12600
12601 /* Did the vfork/compiler bug occur? */
12602 || parent != getpid()
12603
12604 /* Did the file descriptor bug occur? */
12605 || fstat(fileno(stdout), &st) != 0
12606 );
12607 }
12608}
12609_ACEOF
81ecdfbb 12610if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12611 ac_cv_func_vfork_works=yes
12612else
81ecdfbb 12613 ac_cv_func_vfork_works=no
a9322a30 12614fi
81ecdfbb
RW
12615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12616 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12617fi
81ecdfbb 12618
a9322a30 12619fi
81ecdfbb
RW
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12621$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12622
12623fi;
12624if test "x$ac_cv_func_fork_works" = xcross; then
12625 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12627$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12628fi
12629
12630if test "x$ac_cv_func_vfork_works" = xyes; then
12631
81ecdfbb 12632$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12633
12634else
12635
81ecdfbb 12636$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12637
12638fi
12639if test "x$ac_cv_func_fork_works" = xyes; then
12640
81ecdfbb 12641$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12642
12643fi
12644
a9322a30 12645for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12646 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12647 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12648 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12649 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12650do :
12651 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12652ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12653eval as_val=\$$as_ac_var
12654 if test "x$as_val" = x""yes; then :
6c7a06a3 12655 cat >>confdefs.h <<_ACEOF
81ecdfbb 12656#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12657_ACEOF
12658
12659fi
12660done
12661
12662
81ecdfbb
RW
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12664$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12665if test "${am_cv_langinfo_codeset+set}" = set; then :
12666 $as_echo_n "(cached) " >&6
6c7a06a3 12667else
81ecdfbb 12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12669/* end confdefs.h. */
12670#include <langinfo.h>
12671int
12672main ()
12673{
12674char* cs = nl_langinfo(CODESET);
bec39cab
AC
12675 ;
12676 return 0;
12677}
12678_ACEOF
81ecdfbb 12679if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12680 am_cv_langinfo_codeset=yes
a4db0f07 12681else
81ecdfbb 12682 am_cv_langinfo_codeset=no
a4db0f07 12683fi
81ecdfbb
RW
12684rm -f core conftest.err conftest.$ac_objext \
12685 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12686
a4db0f07 12687fi
81ecdfbb
RW
12688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12689$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12690 if test $am_cv_langinfo_codeset = yes; then
12691
81ecdfbb 12692$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12693
6c7a06a3 12694 fi
c906108c 12695
06825bd1 12696
a3828db0
MK
12697# Check the return and argument types of ptrace. No canned test for
12698# this, so roll our own.
12699gdb_ptrace_headers='
12700#if HAVE_SYS_TYPES_H
12701# include <sys/types.h>
12702#endif
12703#if HAVE_SYS_PTRACE_H
12704# include <sys/ptrace.h>
12705#endif
12706#if HAVE_UNISTD_H
12707# include <unistd.h>
12708#endif
12709'
12710# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12711ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12712"
12713if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12714 ac_have_decl=1
06825bd1 12715else
81ecdfbb 12716 ac_have_decl=0
06825bd1 12717fi
06825bd1 12718
a3828db0 12719cat >>confdefs.h <<_ACEOF
81ecdfbb 12720#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12721_ACEOF
81ecdfbb 12722if test $ac_have_decl = 1; then :
bec39cab 12723
a3828db0 12724else
a3828db0
MK
12725
12726 : ${gdb_cv_func_ptrace_ret='int'}
12727 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12728
06825bd1
MK
12729fi
12730
064ef605
DJ
12731# Check return type. Varargs (used on GNU/Linux) conflict with the
12732# empty argument list, so check for that explicitly.
81ecdfbb
RW
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12734$as_echo_n "checking return type of ptrace... " >&6; }
12735if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12736 $as_echo_n "(cached) " >&6
bec39cab 12737else
81ecdfbb 12738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12739/* end confdefs.h. */
a3828db0 12740$gdb_ptrace_headers
bec39cab
AC
12741int
12742main ()
12743{
064ef605
DJ
12744extern long ptrace (enum __ptrace_request, ...);
12745 ;
12746 return 0;
12747}
12748_ACEOF
81ecdfbb 12749if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12750 gdb_cv_func_ptrace_ret='long'
12751else
81ecdfbb 12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12753/* end confdefs.h. */
12754$gdb_ptrace_headers
12755int
12756main ()
12757{
a3828db0 12758extern int ptrace ();
bec39cab
AC
12759 ;
12760 return 0;
12761}
12762_ACEOF
81ecdfbb 12763if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12764 gdb_cv_func_ptrace_ret='int'
70f9f479 12765else
81ecdfbb 12766 gdb_cv_func_ptrace_ret='long'
70f9f479 12767fi
81ecdfbb 12768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12769fi
81ecdfbb 12770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12771fi
81ecdfbb
RW
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12773$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12774
a3828db0
MK
12775cat >>confdefs.h <<_ACEOF
12776#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12777_ACEOF
70f9f479 12778
a3828db0 12779# Check argument types.
81ecdfbb
RW
12780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12781$as_echo_n "checking types of arguments for ptrace... " >&6; }
12782if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12783 $as_echo_n "(cached) " >&6
bec39cab 12784else
a3828db0 12785
81ecdfbb 12786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12787/* end confdefs.h. */
12788$gdb_ptrace_headers
12789int
12790main ()
12791{
12792extern long ptrace (enum __ptrace_request, ...);
12793 ;
12794 return 0;
12795}
12796_ACEOF
81ecdfbb 12797if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12798 gdb_cv_func_ptrace_args='int,int,long,long'
12799else
064ef605 12800
a3828db0
MK
12801for gdb_arg1 in 'int' 'long'; do
12802 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12803 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12804 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12806/* end confdefs.h. */
a3828db0 12807$gdb_ptrace_headers
bec39cab
AC
12808int
12809main ()
12810{
a3828db0
MK
12811
12812extern $gdb_cv_func_ptrace_ret
12813 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12814
bec39cab
AC
12815 ;
12816 return 0;
12817}
12818_ACEOF
81ecdfbb 12819if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12820 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12821 break 4;
5c7f2947 12822fi
81ecdfbb 12823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12824 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12826/* end confdefs.h. */
a3828db0 12827$gdb_ptrace_headers
bec39cab
AC
12828int
12829main ()
12830{
a3828db0
MK
12831
12832extern $gdb_cv_func_ptrace_ret
12833 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12834
bec39cab
AC
12835 ;
12836 return 0;
12837}
12838_ACEOF
81ecdfbb 12839if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12840
12841gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12842 break 5;
78434e59 12843fi
81ecdfbb 12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12845 done
12846 done
12847 done
12848 done
12849done
12850# Provide a safe default value.
12851: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12852
064ef605 12853fi
81ecdfbb 12854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12855fi
81ecdfbb
RW
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12857$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12858ac_save_IFS=$IFS; IFS=','
12859set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12860IFS=$ac_save_IFS
12861shift
bec39cab 12862
a3828db0
MK
12863cat >>confdefs.h <<_ACEOF
12864#define PTRACE_TYPE_ARG3 $3
12865_ACEOF
12866
12867if test -n "$5"; then
12868
12869cat >>confdefs.h <<_ACEOF
12870#define PTRACE_TYPE_ARG5 $5
bec39cab 12871_ACEOF
78434e59
MK
12872
12873fi
12874
a3828db0 12875if test "$cross_compiling" = no; then
81ecdfbb
RW
12876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12877$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12878if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12879 $as_echo_n "(cached) " >&6
a3828db0 12880else
81ecdfbb
RW
12881 if test "$cross_compiling" = yes; then :
12882 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12883else
81ecdfbb 12884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12885/* end confdefs.h. */
81ecdfbb 12886$ac_includes_default
bec39cab
AC
12887int
12888main ()
12889{
a3828db0
MK
12890/* If this system has a BSD-style setpgrp which takes arguments,
12891 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12892 exit successfully. */
81ecdfbb 12893 return setpgrp (1,1) != -1;
bec39cab
AC
12894 ;
12895 return 0;
12896}
12897_ACEOF
81ecdfbb 12898if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12899 ac_cv_func_setpgrp_void=no
c906108c 12900else
81ecdfbb 12901 ac_cv_func_setpgrp_void=yes
c906108c 12902fi
81ecdfbb
RW
12903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12904 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12905fi
81ecdfbb 12906
a3828db0 12907fi
81ecdfbb
RW
12908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12909$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12910if test $ac_cv_func_setpgrp_void = yes; then
12911
81ecdfbb 12912$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12913
12914fi
a3828db0
MK
12915
12916else
81ecdfbb
RW
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12918$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12919if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12920 $as_echo_n "(cached) " >&6
97bf5e38 12921else
81ecdfbb 12922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12923/* end confdefs.h. */
a3828db0
MK
12924
12925#include <unistd.h>
12926
bec39cab
AC
12927int
12928main ()
12929{
a3828db0
MK
12930
12931 if (setpgrp(1,1) == -1)
12932 exit (0);
12933 else
12934 exit (1);
12935
bec39cab
AC
12936 ;
12937 return 0;
12938}
12939_ACEOF
81ecdfbb 12940if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12941 ac_cv_func_setpgrp_void=no
c906108c 12942else
81ecdfbb 12943 ac_cv_func_setpgrp_void=yes
c906108c 12944fi
81ecdfbb 12945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12946fi
81ecdfbb
RW
12947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12948$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12949if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12950 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12951
a3828db0 12952fi
c906108c
SS
12953fi
12954
a3828db0
MK
12955# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
12956# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12958$as_echo_n "checking for sigsetjmp... " >&6; }
12959if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12960 $as_echo_n "(cached) " >&6
bec39cab 12961else
81ecdfbb 12962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12963/* end confdefs.h. */
a3828db0
MK
12964
12965#include <setjmp.h>
12966
bec39cab
AC
12967int
12968main ()
12969{
a3828db0 12970sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
12971 ;
12972 return 0;
12973}
12974_ACEOF
81ecdfbb 12975if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12976 gdb_cv_func_sigsetjmp=yes
c906108c 12977else
81ecdfbb 12978 gdb_cv_func_sigsetjmp=no
c906108c 12979fi
81ecdfbb 12980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12981fi
81ecdfbb
RW
12982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12983$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 12984if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 12985
81ecdfbb 12986$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 12987
97bf5e38 12988fi
c906108c 12989
a3828db0
MK
12990# Assume we'll default to using the included libiberty regex.
12991gdb_use_included_regex=yes
12992
12993# However, if the system regex is GNU regex, then default to *not*
12994# using the included regex.
81ecdfbb
RW
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12996$as_echo_n "checking for GNU regex... " >&6; }
12997if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12998 $as_echo_n "(cached) " >&6
bec39cab 12999else
81ecdfbb 13000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13001/* end confdefs.h. */
a3828db0 13002#include <gnu-versions.h>
bec39cab
AC
13003int
13004main ()
13005{
81ecdfbb
RW
13006#define REGEX_INTERFACE_VERSION 1
13007#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13008# error "Version mismatch"
13009#endif
5c45e068
MK
13010 ;
13011 return 0;
13012}
13013_ACEOF
81ecdfbb
RW
13014if ac_fn_c_try_compile "$LINENO"; then :
13015 gdb_cv_have_gnu_regex=yes
5c45e068 13016else
81ecdfbb
RW
13017 gdb_cv_have_gnu_regex=no
13018fi
13019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13020fi
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13022$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13023if test $gdb_cv_have_gnu_regex = yes; then
13024 gdb_use_included_regex=no
5c45e068 13025fi
81ecdfbb
RW
13026
13027
13028# Check whether --with-included-regex was given.
13029if test "${with_included_regex+set}" = set; then :
13030 withval=$with_included_regex; gdb_with_regex=$withval
13031else
13032 gdb_with_regex=$gdb_use_included_regex
c906108c 13033fi
81ecdfbb
RW
13034
13035if test "$gdb_with_regex" = yes; then
13036
13037$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13038
c906108c 13039fi
81ecdfbb
RW
13040
13041# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13042ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13043#include <sys/proc.h>
13044
13045"
13046if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13047
5c45e068 13048cat >>confdefs.h <<_ACEOF
a3828db0 13049#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13050_ACEOF
c906108c 13051
5c45e068 13052
97bf5e38 13053fi
c906108c 13054
5c45e068 13055
a3828db0 13056# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13058$as_echo_n "checking for struct lwp... " >&6; }
13059if test "${gdb_cv_struct_lwp+set}" = set; then :
13060 $as_echo_n "(cached) " >&6
bec39cab 13061else
81ecdfbb 13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13063/* end confdefs.h. */
a3828db0
MK
13064#include <sys/param.h>
13065#include <sys/lwp.h>
bec39cab
AC
13066int
13067main ()
13068{
a3828db0 13069struct lwp l;
bec39cab
AC
13070 ;
13071 return 0;
13072}
13073_ACEOF
81ecdfbb 13074if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13075 gdb_cv_struct_lwp=yes
c906108c 13076else
81ecdfbb 13077 gdb_cv_struct_lwp=no
c906108c 13078fi
81ecdfbb 13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13080fi
81ecdfbb
RW
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13082$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13083if test $gdb_cv_struct_lwp = yes; then
c906108c 13084
81ecdfbb 13085$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13086
97bf5e38 13087fi
c906108c 13088
a3828db0 13089# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13091$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13092if test "${gdb_cv_struct_reg+set}" = set; then :
13093 $as_echo_n "(cached) " >&6
bec39cab 13094else
81ecdfbb 13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13096/* end confdefs.h. */
a3828db0
MK
13097#include <sys/types.h>
13098#include <machine/reg.h>
bec39cab
AC
13099int
13100main ()
13101{
a3828db0 13102struct reg r;
bec39cab
AC
13103 ;
13104 return 0;
13105}
13106_ACEOF
81ecdfbb 13107if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13108 gdb_cv_struct_reg=yes
27ca5dad 13109else
81ecdfbb 13110 gdb_cv_struct_reg=no
27ca5dad 13111fi
81ecdfbb 13112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13113fi
81ecdfbb
RW
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13115$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13116if test $gdb_cv_struct_reg = yes; then
bec39cab 13117
81ecdfbb 13118$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13119
13120fi
97bf5e38 13121
a3828db0
MK
13122# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13123# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13124ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13125"
13126if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13127
13128cat >>confdefs.h <<_ACEOF
a3828db0 13129#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13130_ACEOF
3862412b 13131
5c45e068 13132
97bf5e38 13133fi
81ecdfbb
RW
13134ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13135"
13136if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13137
13138cat >>confdefs.h <<_ACEOF
a3828db0 13139#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13140_ACEOF
3862412b 13141
5c45e068 13142
97bf5e38 13143fi
3862412b 13144
5c45e068 13145
a3828db0 13146# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13148$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13149if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13150 $as_echo_n "(cached) " >&6
451928c5 13151else
81ecdfbb 13152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13153/* end confdefs.h. */
a3828db0 13154#include <sys/ptrace.h>
bec39cab
AC
13155int
13156main ()
13157{
a3828db0 13158PTRACE_GETREGS;
bec39cab
AC
13159 ;
13160 return 0;
13161}
13162_ACEOF
81ecdfbb 13163if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13164 gdb_cv_have_ptrace_getregs=yes
451928c5 13165else
81ecdfbb 13166 gdb_cv_have_ptrace_getregs=no
451928c5 13167fi
81ecdfbb 13168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13169fi
13170
81ecdfbb
RW
13171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13172$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13173if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13174
81ecdfbb 13175$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13176
97bf5e38 13177fi
451928c5 13178
a3828db0 13179# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13181$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13182if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13183 $as_echo_n "(cached) " >&6
451928c5 13184else
81ecdfbb 13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13186/* end confdefs.h. */
a3828db0 13187#include <sys/ptrace.h>
bec39cab
AC
13188int
13189main ()
13190{
a3828db0 13191PTRACE_GETFPXREGS;
bec39cab
AC
13192 ;
13193 return 0;
13194}
13195_ACEOF
81ecdfbb 13196if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13197 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13198else
81ecdfbb 13199 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13200fi
81ecdfbb 13201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13202fi
13203
81ecdfbb
RW
13204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13205$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13206if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13207
81ecdfbb 13208$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13209
97bf5e38 13210fi
451928c5 13211
a3828db0 13212# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13214$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13215if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13216 $as_echo_n "(cached) " >&6
3862412b 13217else
81ecdfbb 13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13219/* end confdefs.h. */
a3828db0
MK
13220#include <sys/types.h>
13221#include <sys/ptrace.h>
bec39cab
AC
13222int
13223main ()
13224{
a3828db0 13225PT_GETDBREGS;
bec39cab
AC
13226 ;
13227 return 0;
13228}
13229_ACEOF
81ecdfbb 13230if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13231 gdb_cv_have_pt_getdbregs=yes
3862412b 13232else
81ecdfbb 13233 gdb_cv_have_pt_getdbregs=no
3862412b 13234fi
81ecdfbb 13235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13236fi
13237
81ecdfbb
RW
13238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13239$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13240if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13241
81ecdfbb 13242$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13243
97bf5e38 13244fi
3862412b 13245
a3828db0 13246# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13248$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13249if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13250 $as_echo_n "(cached) " >&6
3862412b 13251else
81ecdfbb 13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13253/* end confdefs.h. */
a3828db0
MK
13254#include <sys/types.h>
13255#include <sys/ptrace.h>
bec39cab
AC
13256int
13257main ()
13258{
a3828db0 13259PT_GETXMMREGS;
bec39cab
AC
13260 ;
13261 return 0;
13262}
13263_ACEOF
81ecdfbb 13264if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13265 gdb_cv_have_pt_getxmmregs=yes
3862412b 13266else
81ecdfbb 13267 gdb_cv_have_pt_getxmmregs=no
3862412b 13268fi
81ecdfbb 13269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13270fi
13271
81ecdfbb
RW
13272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13273$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13274if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13275
81ecdfbb 13276$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13277
97bf5e38 13278fi
3862412b 13279
eb368090 13280# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13281
13282if test "${target}" = "${host}"; then
13283 case "${host}" in
97bf5e38 13284 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13285
81ecdfbb 13286$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13287
13288 ;;
c162e8c9 13289 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13290
81ecdfbb 13291$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13292
13293 ;;
13294 mips-sgi-irix5*)
13295 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13296
81ecdfbb 13297$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13298
13299 ;;
13300 esac
13301fi
13302
13303if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13305$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13306 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13307 $as_echo_n "(cached) " >&6
bec39cab 13308else
81ecdfbb 13309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13310/* end confdefs.h. */
596c9d4b
KB
13311
13312#define _SYSCALL32
d30c5336
JK
13313/* Needed for new procfs interface on sparc-solaris. */
13314#define _STRUCTURED_PROC 1
596c9d4b 13315#include <sys/procfs.h>
bec39cab
AC
13316int
13317main ()
13318{
97bf5e38 13319pstatus_t avar
bec39cab
AC
13320 ;
13321 return 0;
13322}
13323_ACEOF
81ecdfbb 13324if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13325 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13326else
81ecdfbb 13327 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13328
596c9d4b 13329fi
81ecdfbb 13330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13331fi
13332
97bf5e38 13333 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13334
81ecdfbb 13335$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13336
13337 fi
81ecdfbb
RW
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13339$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13340
81ecdfbb
RW
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13342$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13343 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13344 $as_echo_n "(cached) " >&6
596c9d4b 13345else
81ecdfbb 13346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13347/* end confdefs.h. */
596c9d4b
KB
13348
13349#define _SYSCALL32
d30c5336
JK
13350/* Needed for new procfs interface on sparc-solaris. */
13351#define _STRUCTURED_PROC 1
596c9d4b 13352#include <sys/procfs.h>
bec39cab
AC
13353int
13354main ()
13355{
97bf5e38 13356prrun_t avar
bec39cab
AC
13357 ;
13358 return 0;
13359}
13360_ACEOF
81ecdfbb 13361if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13362 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13363else
81ecdfbb 13364 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13365
596c9d4b 13366fi
81ecdfbb 13367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13368fi
13369
97bf5e38 13370 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13371
81ecdfbb 13372$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13373
13374 fi
81ecdfbb
RW
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13376$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13377
81ecdfbb
RW
13378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13379$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13380 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13381 $as_echo_n "(cached) " >&6
596c9d4b 13382else
81ecdfbb 13383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13384/* end confdefs.h. */
596c9d4b
KB
13385
13386#define _SYSCALL32
d30c5336
JK
13387/* Needed for new procfs interface on sparc-solaris. */
13388#define _STRUCTURED_PROC 1
596c9d4b 13389#include <sys/procfs.h>
bec39cab
AC
13390int
13391main ()
13392{
97bf5e38 13393gregset_t avar
bec39cab
AC
13394 ;
13395 return 0;
13396}
13397_ACEOF
81ecdfbb 13398if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13399 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13400else
81ecdfbb 13401 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13402
596c9d4b 13403fi
81ecdfbb 13404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13405fi
13406
97bf5e38 13407 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13408
81ecdfbb 13409$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13410
13411 fi
81ecdfbb
RW
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13413$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13414
81ecdfbb
RW
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13416$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13417 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13418 $as_echo_n "(cached) " >&6
d84dd0c5 13419else
81ecdfbb 13420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13421/* end confdefs.h. */
97bf5e38
MK
13422
13423#define _SYSCALL32
d30c5336
JK
13424/* Needed for new procfs interface on sparc-solaris. */
13425#define _STRUCTURED_PROC 1
d84dd0c5 13426#include <sys/procfs.h>
bec39cab
AC
13427int
13428main ()
13429{
97bf5e38 13430fpregset_t avar
bec39cab
AC
13431 ;
13432 return 0;
13433}
13434_ACEOF
81ecdfbb 13435if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13436 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13437else
81ecdfbb 13438 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13439
d84dd0c5 13440fi
81ecdfbb 13441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13442fi
13443
97bf5e38 13444 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13445
81ecdfbb 13446$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13447
97bf5e38 13448 fi
81ecdfbb
RW
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13450$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13451
81ecdfbb
RW
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13453$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13454 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13455 $as_echo_n "(cached) " >&6
c906108c 13456else
81ecdfbb 13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13458/* end confdefs.h. */
c906108c 13459
97bf5e38 13460#define _SYSCALL32
d30c5336
JK
13461/* Needed for new procfs interface on sparc-solaris. */
13462#define _STRUCTURED_PROC 1
97bf5e38 13463#include <sys/procfs.h>
bec39cab
AC
13464int
13465main ()
13466{
97bf5e38 13467prgregset_t avar
bec39cab
AC
13468 ;
13469 return 0;
13470}
13471_ACEOF
81ecdfbb 13472if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13473 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13474else
81ecdfbb 13475 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13476
c906108c 13477fi
81ecdfbb 13478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13479fi
13480
97bf5e38 13481 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13482
81ecdfbb 13483$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13484
97bf5e38 13485 fi
81ecdfbb
RW
13486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13487$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13488
81ecdfbb
RW
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13490$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13491 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13492 $as_echo_n "(cached) " >&6
d45fe813 13493else
81ecdfbb 13494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13495/* end confdefs.h. */
97bf5e38
MK
13496
13497#define _SYSCALL32
d30c5336
JK
13498/* Needed for new procfs interface on sparc-solaris. */
13499#define _STRUCTURED_PROC 1
97bf5e38 13500#include <sys/procfs.h>
bec39cab
AC
13501int
13502main ()
13503{
97bf5e38 13504prfpregset_t avar
bec39cab
AC
13505 ;
13506 return 0;
13507}
13508_ACEOF
81ecdfbb 13509if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13510 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13511else
81ecdfbb 13512 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13513
d45fe813 13514fi
81ecdfbb 13515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13516fi
13517
97bf5e38 13518 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13519
81ecdfbb 13520$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13521
97bf5e38 13522 fi
81ecdfbb
RW
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13524$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13525
81ecdfbb
RW
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13527$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13528 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13529 $as_echo_n "(cached) " >&6
d45fe813 13530else
81ecdfbb 13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13532/* end confdefs.h. */
97bf5e38
MK
13533
13534#define _SYSCALL32
d30c5336
JK
13535/* Needed for new procfs interface on sparc-solaris. */
13536#define _STRUCTURED_PROC 1
97bf5e38 13537#include <sys/procfs.h>
bec39cab
AC
13538int
13539main ()
13540{
97bf5e38 13541prgregset32_t avar
bec39cab
AC
13542 ;
13543 return 0;
13544}
13545_ACEOF
81ecdfbb 13546if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13547 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13548else
81ecdfbb 13549 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13550
d45fe813 13551fi
81ecdfbb 13552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13553fi
13554
97bf5e38 13555 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13556
81ecdfbb 13557$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13558
97bf5e38 13559 fi
81ecdfbb
RW
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13561$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13562
81ecdfbb
RW
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13564$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13565 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13566 $as_echo_n "(cached) " >&6
d45fe813 13567else
81ecdfbb 13568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13569/* end confdefs.h. */
97bf5e38
MK
13570
13571#define _SYSCALL32
d30c5336
JK
13572/* Needed for new procfs interface on sparc-solaris. */
13573#define _STRUCTURED_PROC 1
97bf5e38 13574#include <sys/procfs.h>
bec39cab
AC
13575int
13576main ()
13577{
97bf5e38 13578prfpregset32_t avar
bec39cab
AC
13579 ;
13580 return 0;
13581}
13582_ACEOF
81ecdfbb 13583if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13584 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13585else
81ecdfbb 13586 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13587
d45fe813 13588fi
81ecdfbb 13589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13590fi
13591
97bf5e38 13592 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13593
81ecdfbb 13594$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13595
97bf5e38 13596 fi
81ecdfbb
RW
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13598$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13599
81ecdfbb
RW
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13601$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13602 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13603 $as_echo_n "(cached) " >&6
d45fe813 13604else
81ecdfbb 13605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13606/* end confdefs.h. */
97bf5e38 13607
d45fe813 13608#define _SYSCALL32
d30c5336
JK
13609/* Needed for new procfs interface on sparc-solaris. */
13610#define _STRUCTURED_PROC 1
97bf5e38 13611#include <sys/procfs.h>
bec39cab
AC
13612int
13613main ()
13614{
97bf5e38 13615lwpid_t avar
bec39cab
AC
13616 ;
13617 return 0;
13618}
13619_ACEOF
81ecdfbb 13620if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13621 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13622else
81ecdfbb 13623 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13624
d45fe813 13625fi
81ecdfbb 13626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13627fi
13628
97bf5e38 13629 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13630
81ecdfbb 13631$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13632
97bf5e38 13633 fi
81ecdfbb
RW
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13635$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13636
81ecdfbb
RW
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13638$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13639 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13640 $as_echo_n "(cached) " >&6
c906108c 13641else
81ecdfbb 13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13643/* end confdefs.h. */
c906108c 13644
97bf5e38 13645#define _SYSCALL32
d30c5336
JK
13646/* Needed for new procfs interface on sparc-solaris. */
13647#define _STRUCTURED_PROC 1
97bf5e38 13648#include <sys/procfs.h>
bec39cab
AC
13649int
13650main ()
13651{
97bf5e38 13652psaddr_t avar
bec39cab
AC
13653 ;
13654 return 0;
13655}
13656_ACEOF
81ecdfbb 13657if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13658 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13659else
81ecdfbb 13660 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13661
c906108c 13662fi
81ecdfbb 13663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13664fi
13665
97bf5e38 13666 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13667
81ecdfbb 13668$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13669
97bf5e38 13670 fi
81ecdfbb
RW
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13672$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13673
81ecdfbb
RW
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13675$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13676 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13677 $as_echo_n "(cached) " >&6
c906108c 13678else
81ecdfbb 13679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13680/* end confdefs.h. */
c906108c 13681
97bf5e38 13682#define _SYSCALL32
d30c5336
JK
13683/* Needed for new procfs interface on sparc-solaris. */
13684#define _STRUCTURED_PROC 1
97bf5e38 13685#include <sys/procfs.h>
bec39cab
AC
13686int
13687main ()
13688{
97bf5e38 13689prsysent_t avar
bec39cab
AC
13690 ;
13691 return 0;
13692}
13693_ACEOF
81ecdfbb 13694if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13695 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13696else
81ecdfbb 13697 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13698
c906108c 13699fi
81ecdfbb 13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13701fi
13702
97bf5e38 13703 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13704
81ecdfbb 13705$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13706
97bf5e38 13707 fi
81ecdfbb
RW
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13709$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13710
81ecdfbb
RW
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13712$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13713 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13714 $as_echo_n "(cached) " >&6
c906108c 13715else
81ecdfbb 13716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13717/* end confdefs.h. */
c906108c 13718
97bf5e38 13719#define _SYSCALL32
d30c5336
JK
13720/* Needed for new procfs interface on sparc-solaris. */
13721#define _STRUCTURED_PROC 1
97bf5e38 13722#include <sys/procfs.h>
bec39cab
AC
13723int
13724main ()
13725{
97bf5e38 13726pr_sigset_t avar
bec39cab
AC
13727 ;
13728 return 0;
13729}
13730_ACEOF
81ecdfbb 13731if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13732 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13733else
81ecdfbb 13734 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13735
c906108c 13736fi
81ecdfbb 13737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13738fi
13739
97bf5e38 13740 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13741
81ecdfbb 13742$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13743
97bf5e38 13744 fi
81ecdfbb
RW
13745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13746$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13747
81ecdfbb
RW
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13749$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13750 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13751 $as_echo_n "(cached) " >&6
c906108c 13752else
81ecdfbb 13753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13754/* end confdefs.h. */
c906108c 13755
97bf5e38 13756#define _SYSCALL32
d30c5336
JK
13757/* Needed for new procfs interface on sparc-solaris. */
13758#define _STRUCTURED_PROC 1
97bf5e38 13759#include <sys/procfs.h>
bec39cab
AC
13760int
13761main ()
13762{
97bf5e38 13763pr_sigaction64_t avar
bec39cab
AC
13764 ;
13765 return 0;
13766}
13767_ACEOF
81ecdfbb 13768if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13769 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13770else
81ecdfbb 13771 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13772
c906108c 13773fi
81ecdfbb 13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13775fi
13776
97bf5e38 13777 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13778
81ecdfbb 13779$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13780
97bf5e38 13781 fi
81ecdfbb
RW
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13783$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13784
81ecdfbb
RW
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13786$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13787 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13788 $as_echo_n "(cached) " >&6
97bf5e38 13789else
81ecdfbb 13790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13791/* end confdefs.h. */
97bf5e38
MK
13792
13793#define _SYSCALL32
d30c5336
JK
13794/* Needed for new procfs interface on sparc-solaris. */
13795#define _STRUCTURED_PROC 1
97bf5e38 13796#include <sys/procfs.h>
bec39cab
AC
13797int
13798main ()
13799{
97bf5e38 13800pr_siginfo64_t avar
bec39cab
AC
13801 ;
13802 return 0;
13803}
13804_ACEOF
81ecdfbb 13805if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13806 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13807else
81ecdfbb 13808 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13809
97bf5e38 13810fi
81ecdfbb 13811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13812fi
c906108c 13813
97bf5e38 13814 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13815
81ecdfbb 13816$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13817
97bf5e38 13818 fi
81ecdfbb
RW
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13820$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13821
13822
97bf5e38
MK
13823
13824
13825
97bf5e38 13826 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13828$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13829 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13830 $as_echo_n "(cached) " >&6
c906108c 13831else
81ecdfbb 13832 if test "$cross_compiling" = yes; then :
97bf5e38 13833 gdb_cv_prfpregset_t_broken=yes
c906108c 13834else
81ecdfbb 13835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13836/* end confdefs.h. */
97bf5e38
MK
13837#include <sys/procfs.h>
13838 int main ()
13839 {
13840 if (sizeof (prfpregset_t) == sizeof (void *))
13841 return 1;
13842 return 0;
13843 }
bec39cab 13844_ACEOF
81ecdfbb 13845if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13846 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13847else
13848 gdb_cv_prfpregset_t_broken=yes
c906108c 13849fi
81ecdfbb
RW
13850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13851 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13852fi
81ecdfbb 13853
c906108c
SS
13854fi
13855
81ecdfbb
RW
13856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13857$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13858 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13859
81ecdfbb 13860$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13861
97bf5e38
MK
13862 fi
13863 fi
c906108c 13864
bec39cab 13865
81ecdfbb
RW
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13867$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13868 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
13869 $as_echo_n "(cached) " >&6
c906108c 13870else
81ecdfbb 13871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13872/* end confdefs.h. */
97bf5e38
MK
13873#include <unistd.h>
13874#include <sys/types.h>
13875#include <sys/procfs.h>
13876
bec39cab
AC
13877int
13878main ()
13879{
97bf5e38
MK
13880
13881 int dummy;;
13882 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13883
13884 ;
13885 return 0;
13886}
13887_ACEOF
81ecdfbb 13888if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13889 gdb_cv_have_procfs_piocset=yes
c906108c 13890else
81ecdfbb 13891 gdb_cv_have_procfs_piocset=no
c906108c 13892fi
81ecdfbb 13893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13894fi
97bf5e38 13895
81ecdfbb
RW
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13897$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13898 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13899
81ecdfbb 13900$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13901
13902 fi
c906108c 13903fi
c906108c 13904
97bf5e38 13905if test ${host} = ${target} ; then
bec39cab 13906
81ecdfbb
RW
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13908$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13909 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13910 $as_echo_n "(cached) " >&6
bec39cab 13911else
81ecdfbb 13912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13913/* end confdefs.h. */
97bf5e38 13914#include <link.h>
bec39cab
AC
13915int
13916main ()
13917{
97bf5e38 13918struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13919 ;
13920 return 0;
13921}
13922_ACEOF
81ecdfbb 13923if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13924 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13925else
81ecdfbb 13926 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13927fi
81ecdfbb 13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13929fi
13930
81ecdfbb
RW
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13932$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13933 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13934
81ecdfbb 13935$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13936
13937 fi
13938
bec39cab 13939
81ecdfbb
RW
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13941$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13942 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13943 $as_echo_n "(cached) " >&6
c906108c 13944else
81ecdfbb 13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13946/* end confdefs.h. */
97bf5e38
MK
13947#include <sys/types.h>
13948#include <link.h>
bec39cab
AC
13949int
13950main ()
13951{
97bf5e38 13952struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13953 ;
13954 return 0;
13955}
13956_ACEOF
81ecdfbb 13957if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13958 gdb_cv_have_struct_link_map_with_lm_members=yes
13959else
81ecdfbb 13960 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 13961fi
81ecdfbb 13962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13963fi
c906108c 13964
81ecdfbb
RW
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
13966$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 13967 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 13968
81ecdfbb 13969$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13970
13971 fi
13972
bec39cab 13973
81ecdfbb
RW
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
13975$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
13976 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
13977 $as_echo_n "(cached) " >&6
c906108c 13978else
81ecdfbb 13979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13980/* end confdefs.h. */
97bf5e38
MK
13981#include <sys/types.h>
13982#ifdef HAVE_NLIST_H
13983#include <nlist.h>
13984#endif
13985#include <link.h>
bec39cab
AC
13986int
13987main ()
13988{
97bf5e38 13989struct so_map lm; (void) lm.som_addr;
bec39cab
AC
13990 ;
13991 return 0;
13992}
13993_ACEOF
81ecdfbb 13994if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13995 gdb_cv_have_struct_so_map_with_som_members=yes
13996else
81ecdfbb 13997 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 13998fi
81ecdfbb 13999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14000fi
c906108c 14001
81ecdfbb
RW
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14003$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14004 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14005
81ecdfbb 14006$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14007
97bf5e38 14008 fi
c906108c 14009
bec39cab 14010
81ecdfbb
RW
14011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14012$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14013 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14014 $as_echo_n "(cached) " >&6
97bf5e38 14015else
81ecdfbb 14016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14017/* end confdefs.h. */
97bf5e38
MK
14018#define _SYSCALL32
14019#include <sys/link.h>
bec39cab
AC
14020int
14021main ()
14022{
97bf5e38 14023struct link_map32 l;
bec39cab
AC
14024 ;
14025 return 0;
14026}
14027_ACEOF
81ecdfbb 14028if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14029 gdb_cv_have_struct_link_map32=yes
14030else
81ecdfbb 14031 gdb_cv_have_struct_link_map32=no
97bf5e38 14032fi
81ecdfbb 14033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14034fi
c906108c 14035
81ecdfbb
RW
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14037$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14038 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14039
81ecdfbb 14040$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14041
60ca704f 14042
81ecdfbb 14043$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14044
97bf5e38
MK
14045 fi
14046fi
c906108c 14047
bc8bcb4b 14048# Check if the compiler supports the `long long' type.
c906108c 14049
81ecdfbb
RW
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14051$as_echo_n "checking for long long support in compiler... " >&6; }
14052if test "${gdb_cv_c_long_long+set}" = set; then :
14053 $as_echo_n "(cached) " >&6
97bf5e38 14054else
81ecdfbb 14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14056/* end confdefs.h. */
bc8bcb4b 14057extern long long foo;
bec39cab
AC
14058int
14059main ()
14060{
bc8bcb4b 14061switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14062 ;
14063 return 0;
14064}
14065_ACEOF
81ecdfbb 14066if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14067 gdb_cv_c_long_long=yes
14068else
81ecdfbb 14069 gdb_cv_c_long_long=no
97bf5e38 14070fi
81ecdfbb 14071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14072fi
81ecdfbb
RW
14073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14074$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14075if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14076
81ecdfbb 14077$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14078
14079fi
14080
bc8bcb4b 14081# Check if the compiler and runtime support printing long longs.
97bf5e38 14082
81ecdfbb
RW
14083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14084$as_echo_n "checking for long long support in printf... " >&6; }
14085if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14086 $as_echo_n "(cached) " >&6
97bf5e38 14087else
81ecdfbb 14088 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14089 gdb_cv_printf_has_long_long=no
14090else
81ecdfbb 14091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14092/* end confdefs.h. */
bc8bcb4b
MK
14093$ac_includes_default
14094int
14095main ()
14096{
14097char buf[32];
97bf5e38
MK
14098 long long l = 0;
14099 l = (l << 16) + 0x0123;
14100 l = (l << 16) + 0x4567;
14101 l = (l << 16) + 0x89ab;
14102 l = (l << 16) + 0xcdef;
14103 sprintf (buf, "0x%016llx", l);
14104 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14105 ;
14106 return 0;
c906108c 14107}
bec39cab 14108_ACEOF
81ecdfbb 14109if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14110 gdb_cv_printf_has_long_long=yes
14111else
81ecdfbb 14112 gdb_cv_printf_has_long_long=no
97bf5e38 14113fi
81ecdfbb
RW
14114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14115 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14116fi
81ecdfbb 14117
97bf5e38 14118fi
81ecdfbb
RW
14119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14120$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14121if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14122
81ecdfbb 14123$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14124
14125fi
97bf5e38 14126
1a619819
LM
14127# Check if the compiler and runtime support printing decfloats.
14128
81ecdfbb
RW
14129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14130$as_echo_n "checking for decfloat support in printf... " >&6; }
14131if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14132 $as_echo_n "(cached) " >&6
1a619819 14133else
81ecdfbb 14134 if test "$cross_compiling" = yes; then :
1a619819
LM
14135 gdb_cv_printf_has_decfloat=no
14136else
81ecdfbb 14137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14138/* end confdefs.h. */
14139$ac_includes_default
14140int
14141main ()
14142{
14143char buf[64];
14144 _Decimal32 d32 = 1.2345df;
14145 _Decimal64 d64 = 1.2345dd;
14146 _Decimal128 d128 = 1.2345dl;
14147 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14148 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14149 ;
14150 return 0;
14151}
14152_ACEOF
81ecdfbb 14153if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14154 gdb_cv_printf_has_decfloat=yes
14155else
81ecdfbb 14156 gdb_cv_printf_has_decfloat=no
1a619819 14157fi
81ecdfbb
RW
14158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14159 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14160fi
81ecdfbb 14161
1a619819 14162fi
81ecdfbb
RW
14163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14164$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14165if test $gdb_cv_printf_has_decfloat = yes; then
14166
81ecdfbb 14167$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14168
14169fi
14170
bc8bcb4b
MK
14171# Check if the compiler supports the `long double' type. We can't use
14172# AC_C_LONG_DOUBLE because that one does additional checks on the
14173# constants defined in <float.h> that fail on some systems,
14174# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14175
81ecdfbb
RW
14176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14177$as_echo_n "checking for long double support in compiler... " >&6; }
14178if test "${gdb_cv_c_long_double+set}" = set; then :
14179 $as_echo_n "(cached) " >&6
97bf5e38 14180else
81ecdfbb 14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14182/* end confdefs.h. */
97bf5e38 14183long double foo;
bec39cab 14184_ACEOF
81ecdfbb 14185if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14186 gdb_cv_c_long_double=yes
97bf5e38 14187else
81ecdfbb 14188 gdb_cv_c_long_double=no
97bf5e38 14189fi
81ecdfbb 14190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14191fi
81ecdfbb
RW
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14193$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14194if test $gdb_cv_c_long_double = yes; then
c906108c 14195
81ecdfbb 14196$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14197
14198fi
14199
bc8bcb4b 14200# Check if the compiler and runtime support printing long doubles.
97bf5e38 14201
81ecdfbb
RW
14202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14203$as_echo_n "checking for long double support in printf... " >&6; }
14204if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14205 $as_echo_n "(cached) " >&6
97bf5e38 14206else
81ecdfbb 14207 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14208 gdb_cv_printf_has_long_double=no
14209else
81ecdfbb 14210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14211/* end confdefs.h. */
bc8bcb4b
MK
14212$ac_includes_default
14213int
14214main ()
14215{
14216char buf[16];
97bf5e38
MK
14217 long double f = 3.141592653;
14218 sprintf (buf, "%Lg", f);
14219 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14220 ;
14221 return 0;
97bf5e38 14222}
bec39cab 14223_ACEOF
81ecdfbb 14224if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14225 gdb_cv_printf_has_long_double=yes
c906108c 14226else
81ecdfbb 14227 gdb_cv_printf_has_long_double=no
c906108c 14228fi
81ecdfbb
RW
14229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14230 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14231fi
81ecdfbb 14232
c906108c 14233fi
81ecdfbb
RW
14234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14235$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14236if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14237
81ecdfbb 14238$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14239
14240fi
97bf5e38 14241
bc8bcb4b 14242# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14243
81ecdfbb
RW
14244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14245$as_echo_n "checking for long double support in scanf... " >&6; }
14246if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14247 $as_echo_n "(cached) " >&6
97bf5e38 14248else
81ecdfbb 14249 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14250 gdb_cv_scanf_has_long_double=no
14251else
81ecdfbb 14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14253/* end confdefs.h. */
bc8bcb4b
MK
14254#include <stdio.h>
14255int
14256main ()
14257{
14258char *buf = "3.141592653";
97bf5e38
MK
14259 long double f = 0;
14260 sscanf (buf, "%Lg", &f);
14261 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14262 ;
14263 return 0;
97bf5e38 14264}
bec39cab 14265_ACEOF
81ecdfbb 14266if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14267 gdb_cv_scanf_has_long_double=yes
14268else
81ecdfbb 14269 gdb_cv_scanf_has_long_double=no
97bf5e38 14270fi
81ecdfbb
RW
14271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14272 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14273fi
81ecdfbb 14274
c906108c 14275fi
81ecdfbb
RW
14276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14277$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14278if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14279
81ecdfbb 14280$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14281
14282fi
c906108c 14283
438013df
AO
14284case ${host_os} in
14285aix*)
81ecdfbb
RW
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14287$as_echo_n "checking for -bbigtoc option... " >&6; }
14288if test "${gdb_cv_bigtoc+set}" = set; then :
14289 $as_echo_n "(cached) " >&6
438013df 14290else
bec39cab 14291
438013df
AO
14292 SAVE_LDFLAGS=$LDFLAGS
14293
14294 case $GCC in
14295 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14296 *) gdb_cv_bigtoc=-bbigtoc ;;
14297 esac
14298
14299 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14301/* end confdefs.h. */
438013df 14302
bec39cab
AC
14303int
14304main ()
14305{
438013df 14306int i;
bec39cab
AC
14307 ;
14308 return 0;
14309}
14310_ACEOF
81ecdfbb 14311if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14312
81ecdfbb
RW
14313else
14314 gdb_cv_bigtoc=
438013df 14315fi
81ecdfbb
RW
14316rm -f core conftest.err conftest.$ac_objext \
14317 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14318 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14319
bec39cab 14320fi
81ecdfbb
RW
14321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14322$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14323 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14324 ;;
14325esac
14326
38f6b338 14327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14328$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14329dynamic_list=false
14330if test "${gdb_native}" = yes; then
14331 # The dynamically loaded libthread_db needs access to symbols in the gdb
14332 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14333 # may not be supported there.
14334 old_LDFLAGS="$LDFLAGS"
14335 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14336 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14337 LDFLAGS="$LDFLAGS $RDYNAMIC"
14338 if test "${have_libpython}" = no; then
14339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14340/* end confdefs.h. */
14341
14342int
14343main ()
14344{
14345
14346 ;
14347 return 0;
14348}
14349_ACEOF
14350if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14351 dynamic_list=true
14352fi
14353rm -f core conftest.err conftest.$ac_objext \
14354 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14355 else
14356 # Workaround http://bugs.python.org/issue4434 where static
14357 # libpythonX.Y.a would get its symbols required for
14358 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14359 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14360 old_CFLAGS="$CFLAGS"
14361 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14362 if test "$cross_compiling" = yes; then :
3bebe2f2 14363 true
f6528abd 14364else
3bebe2f2
JK
14365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14366/* end confdefs.h. */
14367#include "${have_libpython}/Python.h"
14368int
14369main ()
14370{
14371int err;
38f6b338
JK
14372 Py_Initialize ();
14373 err = PyRun_SimpleString ("import itertools\n");
14374 Py_Finalize ();
14375 return err == 0 ? 0 : 1;
3bebe2f2
JK
14376 ;
14377 return 0;
14378}
14379_ACEOF
14380if ac_fn_c_try_run "$LINENO"; then :
14381 dynamic_list=true
14382fi
14383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14384 conftest.$ac_objext conftest.beam conftest.$ac_ext
14385fi
14386
38f6b338
JK
14387 CFLAGS="$old_CFLAGS"
14388 fi
14389 LDFLAGS="$old_LDFLAGS"
14390fi
14391if $dynamic_list; then
14392 found="-Wl,--dynamic-list"
14393 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14394else
38f6b338
JK
14395 found="-rdynamic"
14396 RDYNAMIC="-rdynamic"
f6528abd 14397fi
f6528abd 14398
38f6b338 14399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14400$as_echo "$found" >&6; }
0407b3f1 14401
f6528abd 14402
0407b3f1 14403if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14404 case ${host_os} in
c906108c 14405 solaris*)
d92419e5
JB
14406 # See if thread_db library is around for Solaris thread debugging.
14407 # Note that we must explicitly test for version 1 of the library
14408 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14409 # the same API.
81ecdfbb
RW
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14411$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14412 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14414$as_echo "yes" >&6; }
60ca704f 14415
81ecdfbb 14416$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14417
3483b318 14418 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14419 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14421$as_echo_n "checking for dlopen in -ldl... " >&6; }
14422if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14423 $as_echo_n "(cached) " >&6
c906108c 14424else
bec39cab 14425 ac_check_lib_save_LIBS=$LIBS
c906108c 14426LIBS="-ldl $LIBS"
81ecdfbb 14427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14428/* end confdefs.h. */
14429
81ecdfbb
RW
14430/* Override any GCC internal prototype to avoid an error.
14431 Use char because int might match the return type of a GCC
14432 builtin and then its argument prototype would still apply. */
bec39cab
AC
14433#ifdef __cplusplus
14434extern "C"
14435#endif
bec39cab
AC
14436char dlopen ();
14437int
14438main ()
14439{
81ecdfbb 14440return dlopen ();
bec39cab
AC
14441 ;
14442 return 0;
14443}
14444_ACEOF
81ecdfbb 14445if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14446 ac_cv_lib_dl_dlopen=yes
14447else
81ecdfbb 14448 ac_cv_lib_dl_dlopen=no
bec39cab 14449fi
81ecdfbb
RW
14450rm -f core conftest.err conftest.$ac_objext \
14451 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14452LIBS=$ac_check_lib_save_LIBS
14453fi
81ecdfbb
RW
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14455$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14456if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14457 cat >>confdefs.h <<_ACEOF
14458#define HAVE_LIBDL 1
14459_ACEOF
c906108c
SS
14460
14461 LIBS="-ldl $LIBS"
14462
c906108c
SS
14463fi
14464
f6528abd 14465 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14466 # Sun randomly tweaked the prototypes in <proc_service.h>
14467 # at one point.
81ecdfbb
RW
14468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14469$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14470 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14471 $as_echo_n "(cached) " >&6
c906108c 14472else
bec39cab 14473
81ecdfbb 14474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14475/* end confdefs.h. */
c906108c
SS
14476
14477 #include <proc_service.h>
14478 ps_err_e ps_pdwrite
14479 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14480
bec39cab
AC
14481int
14482main ()
14483{
14484
14485 ;
14486 return 0;
14487}
14488_ACEOF
81ecdfbb 14489if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14490 gdb_cv_proc_service_is_old=no
14491else
81ecdfbb 14492 gdb_cv_proc_service_is_old=yes
c906108c 14493fi
81ecdfbb 14494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14495
c906108c
SS
14496fi
14497
81ecdfbb
RW
14498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14499$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14500 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14501
81ecdfbb 14502$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14503
14504 fi
14505 else
81ecdfbb
RW
14506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14507$as_echo "no" >&6; }
c906108c
SS
14508 fi
14509 ;;
d92419e5 14510 aix*)
81ecdfbb
RW
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14512$as_echo_n "checking for AiX thread debugging library... " >&6; }
14513 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14514 $as_echo_n "(cached) " >&6
bec39cab 14515else
81ecdfbb 14516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14517/* end confdefs.h. */
d92419e5 14518#include <sys/pthdebug.h>
bec39cab
AC
14519int
14520main ()
14521{
d92419e5
JB
14522#ifndef PTHDB_VERSION_3
14523 #error
14524 #endif
bec39cab
AC
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14530 gdb_cv_have_aix_thread_debug=yes
14531else
81ecdfbb 14532 gdb_cv_have_aix_thread_debug=no
d92419e5 14533fi
81ecdfbb 14534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14535fi
14536
81ecdfbb
RW
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14538$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14539 if test $gdb_cv_have_aix_thread_debug = yes; then
14540 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14541 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14542 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14543
14544 # Older versions of AIX do not provide the declaration for
14545 # the getthrds function (it appears that it was introduced
14546 # with AIX 6.x).
14547 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14548"
14549if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14550 ac_have_decl=1
14551else
14552 ac_have_decl=0
14553fi
14554
14555cat >>confdefs.h <<_ACEOF
14556#define HAVE_DECL_GETTHRDS $ac_have_decl
14557_ACEOF
14558
d92419e5
JB
14559 fi
14560 ;;
c906108c 14561 esac
bec39cab 14562
c906108c
SS
14563fi
14564
3f47be5c 14565if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14567$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14568if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14569 $as_echo_n "(cached) " >&6
bec39cab 14570else
81ecdfbb 14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14572/* end confdefs.h. */
3f47be5c 14573#include <thread_db.h>
bec39cab
AC
14574int
14575main ()
14576{
3f47be5c 14577int i = TD_NOTALLOC;
bec39cab
AC
14578 ;
14579 return 0;
14580}
14581_ACEOF
81ecdfbb 14582if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14583 gdb_cv_thread_db_h_has_td_notalloc=yes
14584else
81ecdfbb 14585 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14586
3f47be5c 14587fi
81ecdfbb 14588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14589
bec39cab 14590fi
81ecdfbb
RW
14591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14592$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14594$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14595if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14596 $as_echo_n "(cached) " >&6
59f80f10 14597else
81ecdfbb 14598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14599/* end confdefs.h. */
14600#include <thread_db.h>
14601int
14602main ()
14603{
14604int i = TD_VERSION;
14605 ;
14606 return 0;
14607}
14608_ACEOF
81ecdfbb 14609if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14610 gdb_cv_thread_db_h_has_td_version=yes
14611else
81ecdfbb 14612 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14613
14614fi
81ecdfbb 14615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14616
14617fi
81ecdfbb
RW
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14619$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14621$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14622if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14623 $as_echo_n "(cached) " >&6
59f80f10 14624else
81ecdfbb 14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14626/* end confdefs.h. */
14627#include <thread_db.h>
14628int
14629main ()
14630{
14631int i = TD_NOTLS;
14632 ;
14633 return 0;
14634}
14635_ACEOF
81ecdfbb 14636if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14637 gdb_cv_thread_db_h_has_td_notls=yes
14638else
81ecdfbb 14639 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14640
14641fi
81ecdfbb 14642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14643
14644fi
81ecdfbb
RW
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14646$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14647fi
14648if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14649
81ecdfbb 14650$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14651
59f80f10
DJ
14652fi
14653if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14654
81ecdfbb 14655$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14656
14657fi
14658if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14659
81ecdfbb 14660$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14661
3f47be5c
EZ
14662fi
14663
b757528f 14664if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14666$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14667if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14668 $as_echo_n "(cached) " >&6
bec39cab 14669else
81ecdfbb 14670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14671/* end confdefs.h. */
b757528f 14672#include <sys/syscall.h>
bec39cab
AC
14673int
14674main ()
14675{
b757528f 14676int i = __NR_tkill;
bec39cab
AC
14677 ;
14678 return 0;
14679}
14680_ACEOF
81ecdfbb 14681if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14682 gdb_cv_sys_syscall_h_has_tkill=yes
14683else
81ecdfbb 14684 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14685
b757528f 14686fi
81ecdfbb 14687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14688
bec39cab 14689fi
81ecdfbb
RW
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14691$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14692fi
14693if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14694
81ecdfbb 14695$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14696
14697fi
14698
81ecdfbb
RW
14699ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14700"
14701if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14702 ac_have_decl=1
10568435 14703else
81ecdfbb 14704 ac_have_decl=0
10568435 14705fi
10568435
JK
14706
14707cat >>confdefs.h <<_ACEOF
81ecdfbb 14708#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14709_ACEOF
14710
14711
81ecdfbb
RW
14712if test "$cross_compiling" = yes; then :
14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14714/* end confdefs.h. */
14715#include <sys/personality.h>
14716int
14717main ()
14718{
14719
14720# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14721# define ADDR_NO_RANDOMIZE 0x0040000
14722# endif
14723 /* Test the flag could be set and stays set. */
14724 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14725 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14726 return 1
14727 ;
14728 return 0;
14729}
14730_ACEOF
81ecdfbb 14731if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14732 have_personality=true
14733else
81ecdfbb 14734 have_personality=false
10568435 14735fi
81ecdfbb
RW
14736rm -f core conftest.err conftest.$ac_objext \
14737 conftest$ac_exeext conftest.$ac_ext
10568435 14738else
81ecdfbb 14739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14740/* end confdefs.h. */
14741#include <sys/personality.h>
14742int
14743main ()
14744{
14745
14746# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14747# define ADDR_NO_RANDOMIZE 0x0040000
14748# endif
14749 /* Test the flag could be set and stays set. */
14750 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14751 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14752 return 1
14753 ;
14754 return 0;
14755}
14756_ACEOF
81ecdfbb 14757if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14758 have_personality=true
14759else
81ecdfbb 14760 have_personality=false
10568435 14761fi
81ecdfbb
RW
14762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14763 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14764fi
81ecdfbb 14765
10568435
JK
14766if $have_personality
14767then
14768
81ecdfbb 14769$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14770
14771fi
14772
fb40c209 14773
b14b1491 14774target_sysroot_reloc=0
bec39cab 14775
81ecdfbb
RW
14776# Check whether --with-sysroot was given.
14777if test "${with_sysroot+set}" = set; then :
14778 withval=$with_sysroot;
030292b7 14779 case ${with_sysroot} in
715d1656 14780 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14781 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14782 esac
14783
14784 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14785
07abfebf
RS
14786 if test "x$prefix" = xNONE; then
14787 test_prefix=/usr/local
14788 else
14789 test_prefix=$prefix
14790 fi
aa28a74e 14791 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14792 test_exec_prefix=$test_prefix
030292b7 14793 else
07abfebf 14794 test_exec_prefix=$exec_prefix
030292b7
DJ
14795 fi
14796 case ${TARGET_SYSTEM_ROOT} in
715d1656 14797 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14798 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14799 '${prefix}'|'${prefix}/'*|\
715d1656 14800 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14801 target_sysroot_reloc=1
030292b7
DJ
14802 ;;
14803 esac
14804
14805else
bec39cab 14806
030292b7
DJ
14807 TARGET_SYSTEM_ROOT=
14808 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14809
81ecdfbb 14810fi
b14b1491 14811
81ecdfbb 14812TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14813
14814
14815
16e7150e 14816
16e7150e 14817
81ecdfbb
RW
14818# Check whether --with-system-gdbinit was given.
14819if test "${with_system_gdbinit+set}" = set; then :
14820 withval=$with_system_gdbinit;
b14b1491
TT
14821 SYSTEM_GDBINIT=$withval
14822else
14823 SYSTEM_GDBINIT=
81ecdfbb
RW
14824fi
14825
16e7150e
JG
14826
14827 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14828 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14829 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14830 ac_define_dir=`eval echo $ac_define_dir`
14831
14832cat >>confdefs.h <<_ACEOF
14833#define SYSTEM_GDBINIT "$ac_define_dir"
14834_ACEOF
14835
14836
14837
0c4a4063 14838
b14b1491
TT
14839 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14840 if test "x$prefix" = xNONE; then
14841 test_prefix=/usr/local
14842 else
14843 test_prefix=$prefix
14844 fi
14845 else
14846 test_prefix=$exec_prefix
14847 fi
14848 value=0
14849 case ${ac_define_dir} in
14850 "${test_prefix}"|"${test_prefix}/"*|\
14851 '${exec_prefix}'|'${exec_prefix}/'*)
14852 value=1
14853 ;;
14854 esac
16e7150e 14855
b14b1491
TT
14856cat >>confdefs.h <<_ACEOF
14857#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14858_ACEOF
14859
b14b1491 14860
16e7150e 14861
0c4a4063 14862
81ecdfbb
RW
14863# Check whether --enable-werror was given.
14864if test "${enable_werror+set}" = set; then :
14865 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14866 yes | y) ERROR_ON_WARNING="yes" ;;
14867 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14868 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14869 esac
81ecdfbb
RW
14870fi
14871
094a342e
MK
14872
14873# Enable -Werror by default when using gcc
14874if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14875 ERROR_ON_WARNING=yes
14876fi
14877
14878WERROR_CFLAGS=""
14879if test "${ERROR_ON_WARNING}" = yes ; then
14880 WERROR_CFLAGS="-Werror"
14881fi
14882
aa79a185
DJ
14883# The entries after -Wno-pointer-sign are disabled warnings which may
14884# be enabled in the future, which can not currently be used to build
14885# GDB.
14886# NOTE: If you change this list, remember to update
3b851bce 14887# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14888build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14889-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14890-Wno-unused -Wunused-value -Wunused-function \
14891-Wno-switch -Wno-char-subscripts"
a3b362c4 14892
3526781e
DJ
14893# Enable -Wno-format by default when using gcc on mingw since many
14894# GCC versions complain about %I64.
14895case "${host}" in
14896 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14897esac
14898
81ecdfbb
RW
14899# Check whether --enable-build-warnings was given.
14900if test "${enable_build_warnings+set}" = set; then :
14901 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14902 yes) ;;
14903 no) build_warnings="-w";;
14904 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14905 build_warnings="${build_warnings} ${t}";;
14906 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14907 build_warnings="${t} ${build_warnings}";;
14908 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14909esac
d4f3574e 14910if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14911 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14912fi
81ecdfbb
RW
14913fi
14914# Check whether --enable-gdb-build-warnings was given.
14915if test "${enable_gdb_build_warnings+set}" = set; then :
14916 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14917 yes) ;;
14918 no) build_warnings="-w";;
14919 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14920 build_warnings="${build_warnings} ${t}";;
14921 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14922 build_warnings="${t} ${build_warnings}";;
14923 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14924esac
14925if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14926 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14927fi
81ecdfbb
RW
14928fi
14929WARN_CFLAGS=""
c906108c
SS
14930if test "x${build_warnings}" != x -a "x$GCC" = xyes
14931then
81ecdfbb
RW
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14933$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14934 # Separate out the -Werror flag as some files just cannot be
14935 # compiled with it enabled.
14936 for w in ${build_warnings}; do
14937 case $w in
14938 -Werr*) WERROR_CFLAGS=-Werror ;;
14939 *) # Check that GCC accepts it
4536bbc6
AC
14940 saved_CFLAGS="$CFLAGS"
14941 CFLAGS="$CFLAGS $w"
81ecdfbb 14942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14943/* end confdefs.h. */
4536bbc6 14944
bec39cab
AC
14945int
14946main ()
14947{
4536bbc6 14948
bec39cab
AC
14949 ;
14950 return 0;
14951}
14952_ACEOF
81ecdfbb 14953if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14954 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14955fi
81ecdfbb 14956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14957 CFLAGS="$saved_CFLAGS"
746a987d
AC
14958 esac
14959 done
81ecdfbb
RW
14960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14961$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14962fi
14963
14964
104c1213 14965
7a292a7a 14966# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14968$as_echo_n "checking for cygwin... " >&6; }
14969if test "${gdb_cv_os_cygwin+set}" = set; then :
14970 $as_echo_n "(cached) " >&6
bec39cab 14971else
81ecdfbb 14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14973/* end confdefs.h. */
7a292a7a
SS
14974
14975#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14976lose
14977#endif
bec39cab 14978_ACEOF
7a292a7a 14979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 14980 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
14981 gdb_cv_os_cygwin=yes
14982else
7a292a7a
SS
14983 gdb_cv_os_cygwin=no
14984fi
14985rm -f conftest*
14986
14987fi
81ecdfbb
RW
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14989$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14990
aff38e61 14991
3eb25fda 14992SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14993case ${host} in
95cbc983
AC
14994 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14995 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14996 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14997esac
14998
14999
cd0fc7c3
SS
15000# libreadline needs libuser32.a in a cygwin environment
15001WIN32LIBS=
15002if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15003 WIN32LIBS="-luser32"
15004 case "${target}" in
15005 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15006 ;;
15007 esac
cd0fc7c3 15008fi
c906108c 15009
b4505029
MM
15010# The ser-tcp.c module requires sockets.
15011case ${host} in
15012 *mingw32*)
15013
81ecdfbb 15014$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15015
15016 WIN32LIBS="$WIN32LIBS -lws2_32"
15017 ;;
15018esac
15019
7a292a7a 15020
31d99776
DJ
15021# Add ELF support to GDB, but only if BFD includes ELF support.
15022OLD_CFLAGS=$CFLAGS
15023OLD_LDFLAGS=$LDFLAGS
15024OLD_LIBS=$LIBS
cab58a69 15025CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 15026LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 15027intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15028# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15029if test "$plugins" = "yes"; then
15030 LIBS="-ldl $LIBS"
15031fi
0f72fb1c 15032LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15034$as_echo_n "checking for ELF support in BFD... " >&6; }
15035if test "${gdb_cv_var_elf+set}" = set; then :
15036 $as_echo_n "(cached) " >&6
31d99776 15037else
81ecdfbb 15038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15039/* end confdefs.h. */
15040#include <stdlib.h>
15041#include "bfd.h"
15042#include "elf-bfd.h"
15043
15044int
15045main ()
15046{
15047bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15048 ;
15049 return 0;
15050}
15051_ACEOF
81ecdfbb 15052if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15053 gdb_cv_var_elf=yes
15054else
81ecdfbb 15055 gdb_cv_var_elf=no
31d99776 15056fi
81ecdfbb
RW
15057rm -f core conftest.err conftest.$ac_objext \
15058 conftest$ac_exeext conftest.$ac_ext
31d99776 15059fi
81ecdfbb
RW
15060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15061$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15062if test $gdb_cv_var_elf = yes; then
15063 CONFIG_OBS="$CONFIG_OBS elfread.o"
15064
81ecdfbb 15065$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15066
075ff26d
JK
15067 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15068 if test "$plugins" = "yes"; then
15069 OLD_LIBS="-ldl $OLD_LIBS"
15070 fi
31d99776
DJ
15071fi
15072CFLAGS=$OLD_CFLAGS
15073LDFLAGS=$OLD_LDFLAGS
15074LIBS=$OLD_LIBS
15075
121ce6e5
DJ
15076# Add any host-specific objects to GDB.
15077CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15078
3fc11d3e
JM
15079LIBGUI="../libgui/src/libgui.a"
15080GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15081
15082
7a292a7a 15083
3fc11d3e
JM
15084WIN32LDAPP=
15085
15086
15087
d91670b9 15088case "${host}" in
686a5eed 15089*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15090 configdir="win"
15091 ;;
15092*)
15093 configdir="unix"
15094 ;;
15095esac
3fc11d3e
JM
15096
15097GDBTKLIBS=
15098if test "${enable_gdbtk}" = "yes"; then
15099
d1c3b63a
KS
15100 # Gdbtk must have an absolute path to srcdir in order to run
15101 # properly when not installed.
15102 here=`pwd`
15103 cd ${srcdir}
15104 GDBTK_SRC_DIR=`pwd`
15105 cd $here
15106
bec39cab 15107
5062cc19
KS
15108 #
15109 # Ok, lets find the tcl configuration
15110 # First, look for one uninstalled.
15111 # the alternative search directory is invoked by --with-tcl
15112 #
3fc11d3e 15113
5062cc19
KS
15114 if test x"${no_tcl}" = x ; then
15115 # we reset no_tcl in case something fails here
15116 no_tcl=true
bec39cab 15117
81ecdfbb
RW
15118# Check whether --with-tcl was given.
15119if test "${with_tcl+set}" = set; then :
15120 withval=$with_tcl; with_tclconfig=${withval}
15121fi
15122
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15124$as_echo_n "checking for Tcl configuration... " >&6; }
15125 if test "${ac_cv_c_tclconfig+set}" = set; then :
15126 $as_echo_n "(cached) " >&6
3fc11d3e 15127else
bec39cab 15128
3fc11d3e 15129
5062cc19
KS
15130 # First check to see if --with-tcl was specified.
15131 case "${host}" in
15132 *-*-cygwin*) platDir="win" ;;
15133 *) platDir="unix" ;;
15134 esac
15135 if test x"${with_tclconfig}" != x ; then
15136 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15137 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15138 else
81ecdfbb 15139 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15140 fi
15141 fi
15142
15143 # then check for a private Tcl installation
15144 if test x"${ac_cv_c_tclconfig}" = x ; then
15145 for i in \
15146 ../tcl \
15147 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15148 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15149 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15150 ../../tcl \
15151 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15152 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15153 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15154 ../../../tcl \
15155 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15156 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15157 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15158 if test -f "$i/$platDir/tclConfig.sh" ; then
15159 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15160 break
15161 fi
15162 done
15163 fi
15164
15165 # on Darwin, check in Framework installation locations
15166 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15167 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15168 `ls -d /Library/Frameworks 2>/dev/null` \
15169 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15170 `ls -d /System/Library/Frameworks 2>/dev/null` \
15171 ; do
15172 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15173 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15174 break
15175 fi
15176 done
15177 fi
15178
15179 # check in a few common install locations
15180 if test x"${ac_cv_c_tclconfig}" = x ; then
15181 for i in `ls -d ${libdir} 2>/dev/null` \
15182 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15183 `ls -d ${prefix}/lib 2>/dev/null` \
15184 `ls -d /usr/local/lib 2>/dev/null` \
15185 `ls -d /usr/contrib/lib 2>/dev/null` \
15186 `ls -d /usr/lib 2>/dev/null` \
15187 ; do
15188 if test -f "$i/tclConfig.sh" ; then
15189 ac_cv_c_tclconfig=`(cd $i; pwd)`
15190 break
15191 fi
15192 done
15193 fi
3fc11d3e 15194
5062cc19
KS
15195 # check in a few other private locations
15196 if test x"${ac_cv_c_tclconfig}" = x ; then
15197 for i in \
15198 ${srcdir}/../tcl \
15199 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15200 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15201 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15202 if test -f "$i/$platDir/tclConfig.sh" ; then
15203 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15204 break
15205 fi
15206 done
15207 fi
bec39cab 15208
3fc11d3e
JM
15209fi
15210
5062cc19
KS
15211
15212 if test x"${ac_cv_c_tclconfig}" = x ; then
15213 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15215$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15216 else
15217 no_tcl=
15218 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15220$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15221 fi
15222 fi
3fc11d3e 15223
bec39cab 15224
85541719
DE
15225 # If $no_tk is nonempty, then we can't do Tk, and there is no
15226 # point to doing Tcl.
bec39cab 15227
5062cc19
KS
15228 #
15229 # Ok, lets find the tk configuration
15230 # First, look for one uninstalled.
15231 # the alternative search directory is invoked by --with-tk
15232 #
3fc11d3e 15233
5062cc19
KS
15234 if test x"${no_tk}" = x ; then
15235 # we reset no_tk in case something fails here
15236 no_tk=true
bec39cab 15237
81ecdfbb
RW
15238# Check whether --with-tk was given.
15239if test "${with_tk+set}" = set; then :
15240 withval=$with_tk; with_tkconfig=${withval}
15241fi
15242
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15244$as_echo_n "checking for Tk configuration... " >&6; }
15245 if test "${ac_cv_c_tkconfig+set}" = set; then :
15246 $as_echo_n "(cached) " >&6
bec39cab 15247else
3fc11d3e
JM
15248
15249
5062cc19
KS
15250 # First check to see if --with-tkconfig was specified.
15251 if test x"${with_tkconfig}" != x ; then
15252 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15253 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15254 else
81ecdfbb 15255 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15256 fi
15257 fi
3fc11d3e 15258
5062cc19
KS
15259 # then check for a private Tk library
15260 case "${host}" in
15261 *-*-cygwin*) platDir="win" ;;
15262 *) platDir="unix" ;;
15263 esac
15264 if test x"${ac_cv_c_tkconfig}" = x ; then
15265 for i in \
15266 ../tk \
15267 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15268 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15269 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15270 ../../tk \
15271 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15272 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15273 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15274 ../../../tk \
15275 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15276 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15277 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15278 if test -f "$i/$platDir/tkConfig.sh" ; then
15279 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15280 break
15281 fi
15282 done
15283 fi
15284
15285 # on Darwin, check in Framework installation locations
15286 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15287 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15288 `ls -d /Library/Frameworks 2>/dev/null` \
15289 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15290 `ls -d /System/Library/Frameworks 2>/dev/null` \
15291 ; do
15292 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15293 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15294 break
15295 fi
15296 done
15297 fi
15298
15299 # check in a few common install locations
15300 if test x"${ac_cv_c_tkconfig}" = x ; then
15301 for i in `ls -d ${libdir} 2>/dev/null` \
15302 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15303 `ls -d ${prefix}/lib 2>/dev/null` \
15304 `ls -d /usr/local/lib 2>/dev/null` \
15305 `ls -d /usr/contrib/lib 2>/dev/null` \
15306 `ls -d /usr/lib 2>/dev/null` \
15307 ; do
15308 if test -f "$i/tkConfig.sh" ; then
15309 ac_cv_c_tkconfig=`(cd $i; pwd)`
15310 break
15311 fi
15312 done
15313 fi
15314 # check in a few other private locations
15315 if test x"${ac_cv_c_tkconfig}" = x ; then
15316 for i in \
15317 ${srcdir}/../tk \
15318 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15319 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15320 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15321 if test -f "$i/$platDir/tkConfig.sh" ; then
15322 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15323 break
15324 fi
15325 done
15326 fi
3fc11d3e 15327
3fc11d3e
JM
15328fi
15329
15330
5062cc19
KS
15331 if test x"${ac_cv_c_tkconfig}" = x ; then
15332 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15334$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15335 else
15336 no_tk=
15337 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15339$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15340 fi
3fc11d3e 15341 fi
dd2504ab 15342
dd2504ab 15343
85541719
DE
15344 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15345
81ecdfbb
RW
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15347$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15348
15349 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15351$as_echo "loading" >&6; }
85541719
DE
15352 . ${TCL_BIN_DIR}/tclConfig.sh
15353 else
81ecdfbb
RW
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15355$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15356 fi
15357
15358 # eval is required to do the TCL_DBGX substitution
15359 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15360 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15361
15362 # If the TCL_BIN_DIR is the build directory (not the install directory),
15363 # then set the common variable name to the value of the build variables.
15364 # For example, the variable TCL_LIB_SPEC will be set to the value
15365 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15366 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15367 # installed and uninstalled version of Tcl.
15368 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15369 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15370 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15371 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15372 elif test "`uname -s`" = "Darwin"; then
15373 # If Tcl was built as a framework, attempt to use the libraries
15374 # from the framework at the given location so that linking works
15375 # against Tcl.framework installed in an arbitary location.
15376 case ${TCL_DEFS} in
15377 *TCL_FRAMEWORK*)
15378 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15379 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15380 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15381 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15382 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15383 break
15384 fi
15385 done
15386 fi
15387 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15388 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15389 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15390 fi
15391 ;;
15392 esac
15393 fi
15394
15395 # eval is required to do the TCL_DBGX substitution
15396 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15397 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15398 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15399 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415 # Check for in-tree tcl
15416 here=`pwd`
15417 cd ${srcdir}/..
15418 topdir=`pwd`
15419 cd ${here}
15420
15421 intree="no"
15422 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15423 intree="yes"
15424 fi
15425
15426 # Find Tcl private headers
15427 if test x"${intree}" = xno; then
15428
81ecdfbb
RW
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15430$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15431 private_dir=""
15432 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15433 if test -f ${dir}/tclInt.h ; then
15434 private_dir=${dir}
15435 fi
15436
15437 if test x"${private_dir}" = x; then
81ecdfbb 15438 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15439 else
15440 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15442$as_echo "${private_dir}" >&6; }
85541719
DE
15443 fi
15444
15445 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15446 TCL_LIBRARY="${TCL_LIB_SPEC}"
15447 TCL_DEPS=""
15448 else
15449 # If building tcl in the same src tree, private headers
15450 # are not needed, but we need to be sure to use the right
15451 # headers library
15452 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15453 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15454 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15455 fi
15456
15457
15458
15459
15460
81ecdfbb
RW
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15462$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15463
5062cc19 15464 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15466$as_echo "loading" >&6; }
5062cc19 15467 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15468 else
81ecdfbb
RW
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15470$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15471 fi
bec39cab 15472
5062cc19
KS
15473 # eval is required to do the TK_DBGX substitution
15474 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15475 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15476
15477 # If the TK_BIN_DIR is the build directory (not the install directory),
15478 # then set the common variable name to the value of the build variables.
15479 # For example, the variable TK_LIB_SPEC will be set to the value
15480 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15481 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15482 # installed and uninstalled version of Tcl.
85541719 15483 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15484 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15485 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15486 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15487 elif test "`uname -s`" = "Darwin"; then
15488 # If Tk was built as a framework, attempt to use the libraries
15489 # from the framework at the given location so that linking works
15490 # against Tk.framework installed in an arbitary location.
15491 case ${TK_DEFS} in
15492 *TK_FRAMEWORK*)
85541719 15493 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15494 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15495 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15496 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15497 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15498 break
15499 fi
15500 done
15501 fi
85541719 15502 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15503 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15504 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15505 fi
15506 ;;
15507 esac
3fc11d3e
JM
15508 fi
15509
5062cc19
KS
15510 # eval is required to do the TK_DBGX substitution
15511 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15512 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15513 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15514 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15515
3fc11d3e
JM
15516
15517
bec39cab
AC
15518
15519
15520
15521
15522
15523
15524
3fc11d3e 15525
3fc11d3e 15526
bec39cab 15527
bec39cab 15528
85541719
DE
15529 # Check for in-tree Tk
15530 intree="no"
15531 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15532 intree="yes"
15533 fi
3fc11d3e 15534
85541719
DE
15535 # Find Tk private headers
15536 if test x"${intree}" = xno; then
3fc11d3e 15537
81ecdfbb
RW
15538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15539$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15540 private_dir=""
15541 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15542 if test -f ${dir}/tkInt.h; then
15543 private_dir=${dir}
3fc11d3e 15544 fi
bec39cab 15545
5062cc19 15546 if test x"${private_dir}" = x; then
81ecdfbb 15547 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15548 else
5062cc19 15549 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15551$as_echo "${private_dir}" >&6; }
3fc11d3e 15552 fi
3fc11d3e 15553
85541719
DE
15554 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15555 TK_LIBRARY=${TK_LIB_SPEC}
15556 TK_DEPS=""
15557 else
15558 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15559 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15560 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15561 fi
3fc11d3e
JM
15562
15563
3fc11d3e
JM
15564
15565
3fc11d3e 15566
85541719 15567 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15568
85541719
DE
15569 # Include some libraries that Tcl and Tk want.
15570 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15571 # Yes, the ordering seems wrong here. But it isn't.
15572 # TK_LIBS is the list of libraries that need to be linked
15573 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15574 # were in LIBS then any link tests after this point would
15575 # try to include things like `$(LIBGUI)', which wouldn't work.
15576 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15577
85541719
DE
15578 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15579 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15580 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15581 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15582 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15583 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15584 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15585
85541719
DE
15586 if test x$gdb_cv_os_cygwin = xyes; then
15587 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15588 WIN32LDAPP="-Wl,--subsystem,console"
15589 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15590 fi
ffc6a242 15591
81ecdfbb 15592 subdirs="$subdirs gdbtk"
3ace7edb 15593
85541719 15594 fi
3fc11d3e
JM
15595fi
15596
15597
15598
15599
15600
15601
15602
15603
81ecdfbb
RW
15604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15605$as_echo_n "checking for X... " >&6; }
bec39cab 15606
c906108c 15607
81ecdfbb
RW
15608# Check whether --with-x was given.
15609if test "${with_x+set}" = set; then :
15610 withval=$with_x;
15611fi
c906108c
SS
15612
15613# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15614if test "x$with_x" = xno; then
15615 # The user explicitly disabled X.
15616 have_x=disabled
15617else
81ecdfbb
RW
15618 case $x_includes,$x_libraries in #(
15619 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15620 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15621 $as_echo_n "(cached) " >&6
c906108c
SS
15622else
15623 # One or both of the vars are not set, and there is no cached value.
bec39cab 15624ac_x_includes=no ac_x_libraries=no
81ecdfbb 15625rm -f -r conftest.dir
bec39cab
AC
15626if mkdir conftest.dir; then
15627 cd conftest.dir
bec39cab 15628 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15629incroot:
15630 @echo incroot='${INCROOT}'
15631usrlibdir:
15632 @echo usrlibdir='${USRLIBDIR}'
15633libdir:
15634 @echo libdir='${LIBDIR}'
15635_ACEOF
15636 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15637 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15638 for ac_var in incroot usrlibdir libdir; do
15639 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15640 done
c906108c 15641 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15642 for ac_extension in a so sl dylib la dll; do
15643 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15644 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15645 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15646 fi
15647 done
15648 # Screen out bogus values from the imake configuration. They are
15649 # bogus both because they are the default anyway, and because
15650 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15651 case $ac_im_incroot in
81ecdfbb 15652 /usr/include) ac_x_includes= ;;
bec39cab 15653 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15654 esac
bec39cab 15655 case $ac_im_usrlibdir in
81ecdfbb 15656 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15657 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15658 esac
15659 fi
15660 cd ..
81ecdfbb 15661 rm -f -r conftest.dir
c906108c
SS
15662fi
15663
bec39cab
AC
15664# Standard set of common directories for X headers.
15665# Check X11 before X11Rn because it is often a symlink to the current release.
15666ac_x_header_dirs='
15667/usr/X11/include
81ecdfbb 15668/usr/X11R7/include
bec39cab
AC
15669/usr/X11R6/include
15670/usr/X11R5/include
15671/usr/X11R4/include
15672
15673/usr/include/X11
81ecdfbb 15674/usr/include/X11R7
bec39cab
AC
15675/usr/include/X11R6
15676/usr/include/X11R5
15677/usr/include/X11R4
15678
15679/usr/local/X11/include
81ecdfbb 15680/usr/local/X11R7/include
bec39cab
AC
15681/usr/local/X11R6/include
15682/usr/local/X11R5/include
15683/usr/local/X11R4/include
15684
15685/usr/local/include/X11
81ecdfbb 15686/usr/local/include/X11R7
bec39cab
AC
15687/usr/local/include/X11R6
15688/usr/local/include/X11R5
15689/usr/local/include/X11R4
15690
15691/usr/X386/include
15692/usr/x386/include
15693/usr/XFree86/include/X11
15694
15695/usr/include
15696/usr/local/include
15697/usr/unsupported/include
15698/usr/athena/include
15699/usr/local/x11r5/include
15700/usr/lpp/Xamples/include
15701
15702/usr/openwin/include
15703/usr/openwin/share/include'
15704
15705if test "$ac_x_includes" = no; then
81ecdfbb 15706 # Guess where to find include files, by looking for Xlib.h.
c906108c 15707 # First, try using that file with no special directory specified.
81ecdfbb 15708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15709/* end confdefs.h. */
81ecdfbb 15710#include <X11/Xlib.h>
bec39cab 15711_ACEOF
81ecdfbb 15712if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15713 # We can compile using X headers with no special include directory.
15714ac_x_includes=
15715else
bec39cab 15716 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15717 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15718 ac_x_includes=$ac_dir
15719 break
15720 fi
15721done
c906108c 15722fi
bec39cab
AC
15723rm -f conftest.err conftest.$ac_ext
15724fi # $ac_x_includes = no
c906108c 15725
bec39cab 15726if test "$ac_x_libraries" = no; then
c906108c 15727 # Check for the libraries.
c906108c
SS
15728 # See if we find them without any special options.
15729 # Don't add to $LIBS permanently.
bec39cab 15730 ac_save_LIBS=$LIBS
81ecdfbb
RW
15731 LIBS="-lX11 $LIBS"
15732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15733/* end confdefs.h. */
81ecdfbb 15734#include <X11/Xlib.h>
bec39cab
AC
15735int
15736main ()
15737{
81ecdfbb 15738XrmInitialize ()
bec39cab
AC
15739 ;
15740 return 0;
15741}
15742_ACEOF
81ecdfbb 15743if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15744 LIBS=$ac_save_LIBS
c906108c
SS
15745# We can link X programs with no special library path.
15746ac_x_libraries=
15747else
81ecdfbb
RW
15748 LIBS=$ac_save_LIBS
15749for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15750do
bec39cab 15751 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15752 for ac_extension in a so sl dylib la dll; do
15753 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15754 ac_x_libraries=$ac_dir
15755 break 2
15756 fi
15757 done
15758done
15759fi
81ecdfbb
RW
15760rm -f core conftest.err conftest.$ac_objext \
15761 conftest$ac_exeext conftest.$ac_ext
bec39cab 15762fi # $ac_x_libraries = no
c906108c 15763
81ecdfbb
RW
15764case $ac_x_includes,$ac_x_libraries in #(
15765 no,* | *,no | *\'*)
15766 # Didn't find X, or a directory has "'" in its name.
15767 ac_cv_have_x="have_x=no";; #(
15768 *)
15769 # Record where we found X for the cache.
15770 ac_cv_have_x="have_x=yes\
15771 ac_x_includes='$ac_x_includes'\
15772 ac_x_libraries='$ac_x_libraries'"
15773esac
c906108c 15774fi
81ecdfbb
RW
15775;; #(
15776 *) have_x=yes;;
15777 esac
c906108c
SS
15778 eval "$ac_cv_have_x"
15779fi # $with_x != no
15780
15781if test "$have_x" != yes; then
81ecdfbb
RW
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15783$as_echo "$have_x" >&6; }
c906108c
SS
15784 no_x=yes
15785else
15786 # If each of the values was on the command line, it overrides each guess.
15787 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15788 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15789 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15790 ac_cv_have_x="have_x=yes\
15791 ac_x_includes='$x_includes'\
15792 ac_x_libraries='$x_libraries'"
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15794$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15795fi
15796
15797
bec39cab 15798# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15799# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15800# This code just checks for a few cases where we'd like to ignore those
15801# definitions, even when they're present in the '.mt' file. These cases
15802# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15803# not part of the source tree.
7a292a7a 15804#
81ecdfbb
RW
15805# Check whether --enable-sim was given.
15806if test "${enable_sim+set}" = set; then :
15807 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15808 echo "enableval = ${enableval}";
15809 case "${enableval}" in
15810 yes) ignore_sim=false ;;
15811 no) ignore_sim=true ;;
15812 *) ignore_sim=false ;;
15813 esac
15814else
15815 ignore_sim=false
81ecdfbb
RW
15816fi
15817
7a292a7a
SS
15818
15819if test ! -d "${srcdir}/../sim"; then
15820 ignore_sim=true
15821fi
15822
9b624dbe
UW
15823SIM=
15824SIM_OBS=
15825if test "${ignore_sim}" = "false"; then
15826 if test x"${gdb_sim}" != x ; then
15827 SIM="${gdb_sim}"
15828 SIM_OBS="remote-sim.o"
60ca704f 15829
81ecdfbb 15830$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15831
9b624dbe 15832 fi
7a292a7a
SS
15833fi
15834
15835
15836
c906108c
SS
15837
15838
15839
15840
15841
15842
dfcd3bfb 15843
e56ac5c3
AC
15844
15845
b3a90332
AC
15846
15847
c35f4ffc 15848# List of host floatformats.
bec39cab
AC
15849
15850cat >>confdefs.h <<_ACEOF
c35f4ffc 15851#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15852_ACEOF
c35f4ffc 15853
bec39cab
AC
15854
15855cat >>confdefs.h <<_ACEOF
c35f4ffc 15856#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15857_ACEOF
15858
c35f4ffc 15859
bec39cab 15860cat >>confdefs.h <<_ACEOF
c35f4ffc 15861#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15862_ACEOF
c35f4ffc
AC
15863
15864
c906108c
SS
15865# target_subdir is used by the testsuite to find the target libraries.
15866target_subdir=
15867if test "${host}" != "${target}"; then
15868 target_subdir="${target_alias}/"
15869fi
15870
15871
15872frags=
771b4502 15873if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15874 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15875 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15876 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15877 fi
15878 frags="$frags $host_makefile_frag"
15879else
15880 host_makefile_frag=/dev/null
c906108c 15881fi
c906108c 15882
c906108c
SS
15883
15884
15885
771b4502 15886if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15887# We pick this up from the host configuration file (.mh) because we
15888# do not have a native configuration Makefile fragment.
c906108c
SS
15889nativefile=`sed -n '
15890s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15891' ${host_makefile_frag}`
c906108c
SS
15892fi
15893
15894
b00a8037 15895if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15896
15897cat >>confdefs.h <<_ACEOF
b00a8037 15898#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15899_ACEOF
b00a8037
DJ
15900
15901fi
15902
8dcde887 15903# Enable multi-ice-gdb-server.
81ecdfbb
RW
15904# Check whether --enable-multi-ice was given.
15905if test "${enable_multi_ice+set}" = set; then :
15906 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15907 yes | no)
15908 ;;
81ecdfbb 15909 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15910 esac
81ecdfbb 15911fi
b4e70030 15912
81ecdfbb
RW
15913if test "x$enable_multi_ice" = xyes; then
15914 subdirs="$subdirs multi-ice"
3ace7edb 15915
a85f51e7
DJ
15916fi
15917
496c0e1b
JB
15918# Check whether --enable-gdbserver was given.
15919if test "${enable_gdbserver+set}" = set; then :
15920 enableval=$enable_gdbserver; case "${enableval}" in
15921 yes| no|auto) ;;
15922 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15923esac
15924else
15925 enable_gdbserver=auto
15926fi
15927
15928
15929# We only build gdbserver automatically in a native configuration, and
15930# only if the user did not explicitly disable its build.
15931if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15933$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15934 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15936$as_echo "yes" >&6; }
15937 subdirs="$subdirs gdbserver"
3ace7edb 15938
496c0e1b 15939 gdbserver_build_enabled=yes
8dcde887 15940 else
81ecdfbb
RW
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942$as_echo "no" >&6; }
8dcde887
MK
15943 fi
15944fi
15945
496c0e1b
JB
15946# If the user explicitly request the gdbserver to be built, verify that
15947# we were in fact able to enable it.
15948if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15949 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15950fi
15951
db985757 15952# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15953# to an empty version.
c906108c
SS
15954
15955files=
15956links=
5a2402b8 15957
c906108c
SS
15958rm -f nm.h
15959if test "${nativefile}" != ""; then
0f475e27
AC
15960 case "${nativefile}" in
15961 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15962 * ) GDB_NM_FILE="${nativefile}"
15963 esac
5a2402b8
AC
15964 files="${files} ${GDB_NM_FILE}"
15965 links="${links} nm.h"
60ca704f
SE
15966
15967cat >>confdefs.h <<_ACEOF
b78960be 15968#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15969_ACEOF
5a2402b8 15970
c906108c 15971fi
5a2402b8
AC
15972
15973
bec39cab
AC
15974ac_sources="$files"
15975ac_dests="$links"
15976while test -n "$ac_sources"; do
15977 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15978 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15979 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15980done
81ecdfbb 15981ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15982
15983
c906108c
SS
15984
15985
c906108c 15986
81ecdfbb 15987$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15988
bec39cab 15989
5ae98d25 15990ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
15991
15992ac_config_commands="$ac_config_commands default"
89a34d1b 15993
bec39cab
AC
15994cat >confcache <<\_ACEOF
15995# This file is a shell script that caches the results of configure
15996# tests run on this system so they can be shared between configure
15997# scripts and configure runs, see configure's option --config-cache.
15998# It is not useful on other systems. If it contains results you don't
15999# want to keep, you may remove or edit it.
16000#
16001# config.status only pays attention to the cache file if you give it
16002# the --recheck option to rerun configure.
16003#
16004# `ac_cv_env_foo' variables (set or unset) will be overridden when
16005# loading this file, other *unset* `ac_cv_foo' will be assigned the
16006# following values.
16007
16008_ACEOF
16009
16010# The following way of writing the cache mishandles newlines in values,
16011# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16012# So, we kill variables containing newlines.
bec39cab
AC
16013# Ultrix sh set writes to stderr and can't be redirected directly,
16014# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16015(
16016 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16017 eval ac_val=\$$ac_var
16018 case $ac_val in #(
16019 *${as_nl}*)
16020 case $ac_var in #(
16021 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16022$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16023 esac
16024 case $ac_var in #(
16025 _ | IFS | as_nl) ;; #(
16026 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16027 *) { eval $ac_var=; unset $ac_var;} ;;
16028 esac ;;
16029 esac
16030 done
16031
bec39cab 16032 (set) 2>&1 |
81ecdfbb
RW
16033 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16034 *${as_nl}ac_space=\ *)
16035 # `set' does not quote correctly, so add quotes: double-quote
16036 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16037 sed -n \
16038 "s/'/'\\\\''/g;
16039 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16040 ;; #(
bec39cab
AC
16041 *)
16042 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16043 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16044 ;;
81ecdfbb
RW
16045 esac |
16046 sort
16047) |
bec39cab 16048 sed '
81ecdfbb 16049 /^ac_cv_env_/b end
bec39cab 16050 t clear
81ecdfbb 16051 :clear
bec39cab
AC
16052 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16053 t end
81ecdfbb
RW
16054 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16055 :end' >>confcache
16056if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16057 if test -w "$cache_file"; then
16058 test "x$cache_file" != "x/dev/null" &&
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16060$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16061 cat confcache >$cache_file
16062 else
81ecdfbb
RW
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16064$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16065 fi
16066fi
16067rm -f confcache
16068
16069test "x$prefix" = xNONE && prefix=$ac_default_prefix
16070# Let make expand exec_prefix.
16071test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16072
bec39cab
AC
16073DEFS=-DHAVE_CONFIG_H
16074
16075ac_libobjs=
16076ac_ltlibobjs=
16077for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16078 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16079 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16080 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16081 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16082 # will be set to the directory where LIBOBJS objects are built.
16083 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16084 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16085done
16086LIBOBJS=$ac_libobjs
16087
16088LTLIBOBJS=$ac_ltlibobjs
16089
16090
85981d60 16091if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16092 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16093Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16094fi
a417dc56 16095if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16096 as_fn_error "conditional \"GMAKE\" was never defined.
16097Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16098fi
783e057b 16099if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16100 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16101Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16102fi
16103
16104 gl_libobjs=
16105 gl_ltlibobjs=
16106 if test -n "$gl_LIBOBJS"; then
16107 # Remove the extension.
16108 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16109 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16110 gl_libobjs="$gl_libobjs $i.$ac_objext"
16111 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16112 done
16113 fi
16114 gl_LIBOBJS=$gl_libobjs
16115
16116 gl_LTLIBOBJS=$gl_ltlibobjs
16117
16118
16119
16120 gltests_libobjs=
16121 gltests_ltlibobjs=
16122 if test -n "$gltests_LIBOBJS"; then
16123 # Remove the extension.
16124 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16125 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16126 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16127 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16128 done
16129 fi
16130 gltests_LIBOBJS=$gltests_libobjs
16131
16132 gltests_LTLIBOBJS=$gltests_ltlibobjs
16133
16134
e28b3332 16135if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16136 as_fn_error "conditional \"AMDEP\" was never defined.
16137Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16138fi
16139if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16140 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16141Usually this means the macro was only invoked conditionally." "$LINENO" 5
16142fi
16143 if test -n "$EXEEXT"; then
16144 am__EXEEXT_TRUE=
16145 am__EXEEXT_FALSE='#'
16146else
16147 am__EXEEXT_TRUE='#'
16148 am__EXEEXT_FALSE=
e28b3332 16149fi
bec39cab 16150
81ecdfbb
RW
16151
16152
bec39cab 16153: ${CONFIG_STATUS=./config.status}
81ecdfbb 16154ac_write_fail=0
bec39cab
AC
16155ac_clean_files_save=$ac_clean_files
16156ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16157{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16158$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16159as_write_fail=0
16160cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16161#! $SHELL
16162# Generated by $as_me.
16163# Run this file to recreate the current configuration.
16164# Compiler output produced by configure, useful for debugging
16165# configure, is in config.log if it exists.
16166
16167debug=false
16168ac_cs_recheck=false
16169ac_cs_silent=false
bec39cab 16170
81ecdfbb
RW
16171SHELL=\${CONFIG_SHELL-$SHELL}
16172export SHELL
16173_ASEOF
16174cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16175## -------------------- ##
16176## M4sh Initialization. ##
16177## -------------------- ##
16178
16179# Be more Bourne compatible
16180DUALCASE=1; export DUALCASE # for MKS sh
16181if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16182 emulate sh
16183 NULLCMD=:
81ecdfbb 16184 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16185 # is contrary to our usage. Disable this feature.
16186 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16187 setopt NO_GLOB_SUBST
16188else
16189 case `(set -o) 2>/dev/null` in #(
16190 *posix*) :
16191 set -o posix ;; #(
16192 *) :
16193 ;;
16194esac
bec39cab 16195fi
bec39cab 16196
81ecdfbb
RW
16197
16198as_nl='
16199'
16200export as_nl
16201# Printing a long string crashes Solaris 7 /usr/bin/printf.
16202as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16203as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16204as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16205# Prefer a ksh shell builtin over an external printf program on Solaris,
16206# but without wasting forks for bash or zsh.
16207if test -z "$BASH_VERSION$ZSH_VERSION" \
16208 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16209 as_echo='print -r --'
16210 as_echo_n='print -rn --'
16211elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16212 as_echo='printf %s\n'
16213 as_echo_n='printf %s'
16214else
16215 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16216 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16217 as_echo_n='/usr/ucb/echo -n'
16218 else
16219 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16220 as_echo_n_body='eval
16221 arg=$1;
16222 case $arg in #(
16223 *"$as_nl"*)
16224 expr "X$arg" : "X\\(.*\\)$as_nl";
16225 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16226 esac;
16227 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16228 '
16229 export as_echo_n_body
16230 as_echo_n='sh -c $as_echo_n_body as_echo'
16231 fi
16232 export as_echo_body
16233 as_echo='sh -c $as_echo_body as_echo'
16234fi
16235
16236# The user is always right.
16237if test "${PATH_SEPARATOR+set}" != set; then
16238 PATH_SEPARATOR=:
16239 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16240 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16241 PATH_SEPARATOR=';'
16242 }
bec39cab
AC
16243fi
16244
16245
81ecdfbb
RW
16246# IFS
16247# We need space, tab and new line, in precisely that order. Quoting is
16248# there to prevent editors from complaining about space-tab.
16249# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16250# splitting by setting IFS to empty value.)
16251IFS=" "" $as_nl"
16252
16253# Find who we are. Look in the path if we contain no directory separator.
16254case $0 in #((
16255 *[\\/]* ) as_myself=$0 ;;
16256 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16257for as_dir in $PATH
16258do
16259 IFS=$as_save_IFS
16260 test -z "$as_dir" && as_dir=.
16261 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16262 done
16263IFS=$as_save_IFS
16264
16265 ;;
16266esac
16267# We did not find ourselves, most probably we were run as `sh COMMAND'
16268# in which case we are not to be found in the path.
16269if test "x$as_myself" = x; then
16270 as_myself=$0
16271fi
16272if test ! -f "$as_myself"; then
16273 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16274 exit 1
16275fi
16276
16277# Unset variables that we do not need and which cause bugs (e.g. in
16278# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16279# suppresses any "Segmentation fault" message there. '((' could
16280# trigger a bug in pdksh 5.2.14.
16281for as_var in BASH_ENV ENV MAIL MAILPATH
16282do eval test x\${$as_var+set} = xset \
16283 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16284done
bec39cab
AC
16285PS1='$ '
16286PS2='> '
16287PS4='+ '
16288
16289# NLS nuisances.
81ecdfbb
RW
16290LC_ALL=C
16291export LC_ALL
16292LANGUAGE=C
16293export LANGUAGE
16294
16295# CDPATH.
16296(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16297
16298
16299# as_fn_error ERROR [LINENO LOG_FD]
16300# ---------------------------------
16301# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16302# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16303# script with status $?, using 1 if that was 0.
16304as_fn_error ()
16305{
16306 as_status=$?; test $as_status -eq 0 && as_status=1
16307 if test "$3"; then
16308 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16309 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16310 fi
16311 $as_echo "$as_me: error: $1" >&2
16312 as_fn_exit $as_status
16313} # as_fn_error
16314
16315
16316# as_fn_set_status STATUS
16317# -----------------------
16318# Set $? to STATUS, without forking.
16319as_fn_set_status ()
16320{
16321 return $1
16322} # as_fn_set_status
16323
16324# as_fn_exit STATUS
16325# -----------------
16326# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16327as_fn_exit ()
16328{
16329 set +e
16330 as_fn_set_status $1
16331 exit $1
16332} # as_fn_exit
16333
16334# as_fn_unset VAR
16335# ---------------
16336# Portably unset VAR.
16337as_fn_unset ()
16338{
16339 { eval $1=; unset $1;}
16340}
16341as_unset=as_fn_unset
16342# as_fn_append VAR VALUE
16343# ----------------------
16344# Append the text in VALUE to the end of the definition contained in VAR. Take
16345# advantage of any shell optimizations that allow amortized linear growth over
16346# repeated appends, instead of the typical quadratic growth present in naive
16347# implementations.
16348if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16349 eval 'as_fn_append ()
16350 {
16351 eval $1+=\$2
16352 }'
16353else
16354 as_fn_append ()
16355 {
16356 eval $1=\$$1\$2
16357 }
16358fi # as_fn_append
16359
16360# as_fn_arith ARG...
16361# ------------------
16362# Perform arithmetic evaluation on the ARGs, and store the result in the
16363# global $as_val. Take advantage of shells that can avoid forks. The arguments
16364# must be portable across $(()) and expr.
16365if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16366 eval 'as_fn_arith ()
16367 {
16368 as_val=$(( $* ))
16369 }'
16370else
16371 as_fn_arith ()
16372 {
16373 as_val=`expr "$@" || test $? -eq 1`
16374 }
16375fi # as_fn_arith
bec39cab 16376
81ecdfbb
RW
16377
16378if expr a : '\(a\)' >/dev/null 2>&1 &&
16379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16380 as_expr=expr
16381else
16382 as_expr=false
16383fi
16384
81ecdfbb 16385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16386 as_basename=basename
16387else
16388 as_basename=false
16389fi
16390
81ecdfbb
RW
16391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16392 as_dirname=dirname
16393else
16394 as_dirname=false
16395fi
bec39cab 16396
81ecdfbb 16397as_me=`$as_basename -- "$0" ||
bec39cab
AC
16398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16399 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16401$as_echo X/"$0" |
16402 sed '/^.*\/\([^/][^/]*\)\/*$/{
16403 s//\1/
16404 q
16405 }
16406 /^X\/\(\/\/\)$/{
16407 s//\1/
16408 q
16409 }
16410 /^X\/\(\/\).*/{
16411 s//\1/
16412 q
16413 }
16414 s/.*/./; q'`
b4e70030 16415
b4e70030
JB
16416# Avoid depending upon Character Ranges.
16417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16420as_cr_digits='0123456789'
16421as_cr_alnum=$as_cr_Letters$as_cr_digits
16422
81ecdfbb
RW
16423ECHO_C= ECHO_N= ECHO_T=
16424case `echo -n x` in #(((((
16425-n*)
16426 case `echo 'xy\c'` in
16427 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16428 xy) ECHO_C='\c';;
16429 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16430 ECHO_T=' ';;
16431 esac;;
16432*)
16433 ECHO_N='-n';;
bec39cab
AC
16434esac
16435
81ecdfbb
RW
16436rm -f conf$$ conf$$.exe conf$$.file
16437if test -d conf$$.dir; then
16438 rm -f conf$$.dir/conf$$.file
bec39cab 16439else
81ecdfbb
RW
16440 rm -f conf$$.dir
16441 mkdir conf$$.dir 2>/dev/null
bec39cab 16442fi
81ecdfbb
RW
16443if (echo >conf$$.file) 2>/dev/null; then
16444 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16445 as_ln_s='ln -s'
81ecdfbb
RW
16446 # ... but there are two gotchas:
16447 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16448 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16449 # In both cases, we have to default to `cp -p'.
16450 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16451 as_ln_s='cp -p'
16452 elif ln conf$$.file conf$$ 2>/dev/null; then
16453 as_ln_s=ln
16454 else
16455 as_ln_s='cp -p'
b4e70030 16456 fi
bec39cab
AC
16457else
16458 as_ln_s='cp -p'
16459fi
81ecdfbb
RW
16460rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16461rmdir conf$$.dir 2>/dev/null
16462
16463
16464# as_fn_mkdir_p
16465# -------------
16466# Create "$as_dir" as a directory, including parents if necessary.
16467as_fn_mkdir_p ()
16468{
16469
16470 case $as_dir in #(
16471 -*) as_dir=./$as_dir;;
16472 esac
16473 test -d "$as_dir" || eval $as_mkdir_p || {
16474 as_dirs=
16475 while :; do
16476 case $as_dir in #(
16477 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16478 *) as_qdir=$as_dir;;
16479 esac
16480 as_dirs="'$as_qdir' $as_dirs"
16481 as_dir=`$as_dirname -- "$as_dir" ||
16482$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16483 X"$as_dir" : 'X\(//\)[^/]' \| \
16484 X"$as_dir" : 'X\(//\)$' \| \
16485 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16486$as_echo X"$as_dir" |
16487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16488 s//\1/
16489 q
16490 }
16491 /^X\(\/\/\)[^/].*/{
16492 s//\1/
16493 q
16494 }
16495 /^X\(\/\/\)$/{
16496 s//\1/
16497 q
16498 }
16499 /^X\(\/\).*/{
16500 s//\1/
16501 q
16502 }
16503 s/.*/./; q'`
16504 test -d "$as_dir" && break
16505 done
16506 test -z "$as_dirs" || eval "mkdir $as_dirs"
16507 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16508
bec39cab 16509
81ecdfbb 16510} # as_fn_mkdir_p
bec39cab 16511if mkdir -p . 2>/dev/null; then
81ecdfbb 16512 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16513else
16514 test -d ./-p && rmdir ./-p
16515 as_mkdir_p=false
16516fi
16517
81ecdfbb
RW
16518if test -x / >/dev/null 2>&1; then
16519 as_test_x='test -x'
16520else
16521 if ls -dL / >/dev/null 2>&1; then
16522 as_ls_L_option=L
16523 else
16524 as_ls_L_option=
16525 fi
16526 as_test_x='
16527 eval sh -c '\''
16528 if test -d "$1"; then
16529 test -d "$1/.";
16530 else
16531 case $1 in #(
16532 -*)set "./$1";;
16533 esac;
16534 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16535 ???[sx]*):;;*)false;;esac;fi
16536 '\'' sh
16537 '
16538fi
16539as_executable_p=$as_test_x
bec39cab
AC
16540
16541# Sed expression to map a string onto a valid CPP name.
16542as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16543
16544# Sed expression to map a string onto a valid variable name.
16545as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16546
16547
bec39cab 16548exec 6>&1
81ecdfbb
RW
16549## ----------------------------------- ##
16550## Main body of $CONFIG_STATUS script. ##
16551## ----------------------------------- ##
16552_ASEOF
16553test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16554
16555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16556# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16557# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16558# values after options handling.
16559ac_log="
bec39cab 16560This file was extended by $as_me, which was
81ecdfbb 16561generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16562
16563 CONFIG_FILES = $CONFIG_FILES
16564 CONFIG_HEADERS = $CONFIG_HEADERS
16565 CONFIG_LINKS = $CONFIG_LINKS
16566 CONFIG_COMMANDS = $CONFIG_COMMANDS
16567 $ $0 $@
16568
81ecdfbb
RW
16569on `(hostname || uname -n) 2>/dev/null | sed 1q`
16570"
16571
bec39cab
AC
16572_ACEOF
16573
81ecdfbb
RW
16574case $ac_config_files in *"
16575"*) set x $ac_config_files; shift; ac_config_files=$*;;
16576esac
234b45d4 16577
81ecdfbb
RW
16578case $ac_config_headers in *"
16579"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16580esac
b4e70030 16581
b4e70030 16582
81ecdfbb
RW
16583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16584# Files that config.status was made for.
16585config_files="$ac_config_files"
16586config_headers="$ac_config_headers"
16587config_links="$ac_config_links"
16588config_commands="$ac_config_commands"
234b45d4 16589
81ecdfbb 16590_ACEOF
b4e70030 16591
81ecdfbb 16592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16593ac_cs_usage="\
81ecdfbb
RW
16594\`$as_me' instantiates files and other configuration actions
16595from templates according to the current configuration. Unless the files
16596and actions are specified as TAGs, all are instantiated by default.
234b45d4 16597
81ecdfbb 16598Usage: $0 [OPTION]... [TAG]...
234b45d4 16599
bec39cab 16600 -h, --help print this help, then exit
81ecdfbb
RW
16601 -V, --version print version number and configuration settings, then exit
16602 -q, --quiet, --silent
16603 do not print progress messages
bec39cab
AC
16604 -d, --debug don't remove temporary files
16605 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16606 --file=FILE[:TEMPLATE]
16607 instantiate the configuration file FILE
16608 --header=FILE[:TEMPLATE]
16609 instantiate the configuration header FILE
234b45d4 16610
bec39cab
AC
16611Configuration files:
16612$config_files
234b45d4 16613
bec39cab
AC
16614Configuration headers:
16615$config_headers
234b45d4 16616
bec39cab
AC
16617Configuration links:
16618$config_links
234b45d4 16619
bec39cab
AC
16620Configuration commands:
16621$config_commands
16622
81ecdfbb 16623Report bugs to the package provider."
b4e70030 16624
81ecdfbb
RW
16625_ACEOF
16626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16627ac_cs_version="\\
16628config.status
81ecdfbb
RW
16629configured by $0, generated by GNU Autoconf 2.64,
16630 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16631
81ecdfbb 16632Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16633This config.status script is free software; the Free Software Foundation
16634gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16635
16636ac_pwd='$ac_pwd'
16637srcdir='$srcdir'
16638INSTALL='$INSTALL'
16639MKDIR_P='$MKDIR_P'
16640AWK='$AWK'
16641test -n "\$AWK" || AWK=awk
bec39cab
AC
16642_ACEOF
16643
81ecdfbb
RW
16644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16645# The default lists apply if the user does not specify any file.
bec39cab
AC
16646ac_need_defaults=:
16647while test $# != 0
16648do
16649 case $1 in
16650 --*=*)
81ecdfbb
RW
16651 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16652 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16653 ac_shift=:
c906108c 16654 ;;
81ecdfbb 16655 *)
bec39cab
AC
16656 ac_option=$1
16657 ac_optarg=$2
16658 ac_shift=shift
c906108c 16659 ;;
bec39cab 16660 esac
c906108c 16661
bec39cab
AC
16662 case $ac_option in
16663 # Handling of the options.
bec39cab
AC
16664 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16665 ac_cs_recheck=: ;;
81ecdfbb
RW
16666 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16667 $as_echo "$ac_cs_version"; exit ;;
16668 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16669 debug=: ;;
16670 --file | --fil | --fi | --f )
16671 $ac_shift
81ecdfbb
RW
16672 case $ac_optarg in
16673 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16674 esac
16675 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16676 ac_need_defaults=false;;
16677 --header | --heade | --head | --hea )
16678 $ac_shift
81ecdfbb
RW
16679 case $ac_optarg in
16680 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16681 esac
16682 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16683 ac_need_defaults=false;;
81ecdfbb
RW
16684 --he | --h)
16685 # Conflict between --help and --header
16686 as_fn_error "ambiguous option: \`$1'
16687Try \`$0 --help' for more information.";;
16688 --help | --hel | -h )
16689 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16690 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16691 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16692 ac_cs_silent=: ;;
c906108c 16693
bec39cab 16694 # This is an error.
81ecdfbb
RW
16695 -*) as_fn_error "unrecognized option: \`$1'
16696Try \`$0 --help' for more information." ;;
c906108c 16697
81ecdfbb
RW
16698 *) as_fn_append ac_config_targets " $1"
16699 ac_need_defaults=false ;;
c906108c 16700
bec39cab
AC
16701 esac
16702 shift
16703done
c906108c 16704
bec39cab 16705ac_configure_extra_args=
c906108c 16706
bec39cab
AC
16707if $ac_cs_silent; then
16708 exec 6>/dev/null
16709 ac_configure_extra_args="$ac_configure_extra_args --silent"
16710fi
c906108c 16711
bec39cab 16712_ACEOF
81ecdfbb 16713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16714if \$ac_cs_recheck; then
81ecdfbb
RW
16715 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16716 shift
16717 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16718 CONFIG_SHELL='$SHELL'
16719 export CONFIG_SHELL
16720 exec "\$@"
bec39cab
AC
16721fi
16722
16723_ACEOF
81ecdfbb
RW
16724cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16725exec 5>>config.log
16726{
16727 echo
16728 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16729## Running $as_me. ##
16730_ASBOX
16731 $as_echo "$ac_log"
16732} >&5
bec39cab 16733
81ecdfbb
RW
16734_ACEOF
16735cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16736#
81ecdfbb 16737# INIT-COMMANDS
c906108c 16738#
a417dc56 16739ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16740AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16741
bec39cab
AC
16742_ACEOF
16743
81ecdfbb 16744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16745
81ecdfbb 16746# Handling of arguments.
bec39cab 16747for ac_config_target in $ac_config_targets
c906108c 16748do
81ecdfbb
RW
16749 case $ac_config_target in
16750 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16751 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16752 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16753 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16754 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16755 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16756 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16757 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16758 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16759 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16760
16761 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16762 esac
16763done
16764
81ecdfbb 16765
bec39cab
AC
16766# If the user did not use the arguments to specify the items to instantiate,
16767# then the envvar interface is used. Set only those that are not.
16768# We use the long form for the default assignment because of an extremely
16769# bizarre bug on SunOS 4.1.3.
16770if $ac_need_defaults; then
16771 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16772 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16773 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16774 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16775fi
16776
b4e70030 16777# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16778# simply because there is no reason against having it here, and in addition,
b4e70030 16779# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16780# Hook for its removal unless debugging.
16781# Note that there is a small window in which the directory will not be cleaned:
16782# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16783$debug ||
16784{
81ecdfbb
RW
16785 tmp=
16786 trap 'exit_status=$?
16787 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16788' 0
16789 trap 'as_fn_exit 1' 1 2 13 15
16790}
16791# Create a (secure) tmp directory for tmp files.
16792
16793{
16794 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16795 test -n "$tmp" && test -d "$tmp"
16796} ||
16797{
16798 tmp=./conf$$-$RANDOM
16799 (umask 077 && mkdir "$tmp")
16800} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16801
16802# Set up the scripts for CONFIG_FILES section.
16803# No need to generate them if there are no CONFIG_FILES.
16804# This happens for instance with `./config.status config.h'.
16805if test -n "$CONFIG_FILES"; then
16806
16807if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16808 ac_cs_awk_getline=:
16809 ac_cs_awk_pipe_init=
16810 ac_cs_awk_read_file='
16811 while ((getline aline < (F[key])) > 0)
16812 print(aline)
16813 close(F[key])'
16814 ac_cs_awk_pipe_fini=
16815else
16816 ac_cs_awk_getline=false
16817 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16818 ac_cs_awk_read_file='
16819 print "|#_!!_#|"
16820 print "cat " F[key] " &&"
16821 '$ac_cs_awk_pipe_init
16822 # The final `:' finishes the AND list.
16823 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16824fi
16825ac_cr=`echo X | tr X '\015'`
16826# On cygwin, bash can eat \r inside `` if the user requested igncr.
16827# But we know of no other shell where ac_cr would be empty at this
16828# point, so we can use a bashism as a fallback.
16829if test "x$ac_cr" = x; then
16830 eval ac_cr=\$\'\\r\'
16831fi
16832ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16833if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16834 ac_cs_awk_cr='\r'
16835else
16836 ac_cs_awk_cr=$ac_cr
16837fi
16838
16839echo 'BEGIN {' >"$tmp/subs1.awk" &&
16840_ACEOF
16841
16842# Create commands to substitute file output variables.
16843{
16844 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16845 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16846 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16847 echo "_ACAWK" &&
16848 echo "_ACEOF"
16849} >conf$$files.sh &&
16850. ./conf$$files.sh ||
16851 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16852rm -f conf$$files.sh
16853
16854{
16855 echo "cat >conf$$subs.awk <<_ACEOF" &&
16856 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16857 echo "_ACEOF"
16858} >conf$$subs.sh ||
16859 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16860ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16861ac_delim='%!_!# '
16862for ac_last_try in false false false false false :; do
16863 . ./conf$$subs.sh ||
16864 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16865
16866 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16867 if test $ac_delim_n = $ac_delim_num; then
16868 break
16869 elif $ac_last_try; then
16870 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16871 else
16872 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16873 fi
16874done
16875rm -f conf$$subs.sh
16876
16877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16878cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16879_ACEOF
16880sed -n '
16881h
16882s/^/S["/; s/!.*/"]=/
16883p
16884g
16885s/^[^!]*!//
16886:repl
16887t repl
16888s/'"$ac_delim"'$//
16889t delim
16890:nl
16891h
16892s/\(.\{148\}\).*/\1/
16893t more1
16894s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16895p
16896n
16897b repl
16898:more1
16899s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16900p
16901g
16902s/.\{148\}//
16903t nl
16904:delim
16905h
16906s/\(.\{148\}\).*/\1/
16907t more2
16908s/["\\]/\\&/g; s/^/"/; s/$/"/
16909p
16910b
16911:more2
16912s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16913p
16914g
16915s/.\{148\}//
16916t delim
16917' <conf$$subs.awk | sed '
16918/^[^""]/{
16919 N
16920 s/\n//
16921}
16922' >>$CONFIG_STATUS || ac_write_fail=1
16923rm -f conf$$subs.awk
16924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16925_ACAWK
16926cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16927 for (key in S) S_is_set[key] = 1
16928 FS = "\a"
16929 \$ac_cs_awk_pipe_init
16930}
16931{
16932 line = $ 0
16933 nfields = split(line, field, "@")
16934 substed = 0
16935 len = length(field[1])
16936 for (i = 2; i < nfields; i++) {
16937 key = field[i]
16938 keylen = length(key)
16939 if (S_is_set[key]) {
16940 value = S[key]
16941 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16942 len += length(value) + length(field[++i])
16943 substed = 1
16944 } else
16945 len += 1 + keylen
16946 }
16947 if (nfields == 3 && !substed) {
16948 key = field[2]
16949 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16950 \$ac_cs_awk_read_file
16951 next
16952 }
16953 }
16954 print line
b4e70030 16955}
81ecdfbb
RW
16956\$ac_cs_awk_pipe_fini
16957_ACAWK
16958_ACEOF
16959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16960if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16961 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16962else
16963 cat
16964fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16965 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16966_ACEOF
16967
16968# VPATH may cause trouble with some makes, so we remove $(srcdir),
16969# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16970# trailing colons and then remove the whole line if VPATH becomes empty
16971# (actually we leave an empty line to preserve line numbers).
16972if test "x$srcdir" = x.; then
16973 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16974s/:*\$(srcdir):*/:/
16975s/:*\${srcdir}:*/:/
16976s/:*@srcdir@:*/:/
16977s/^\([^=]*=[ ]*\):*/\1/
16978s/:*$//
16979s/^[^=]*=[ ]*$//
16980}'
16981fi
16982
16983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16984fi # test -n "$CONFIG_FILES"
16985
16986# Set up the scripts for CONFIG_HEADERS section.
16987# No need to generate them if there are no CONFIG_HEADERS.
16988# This happens for instance with `./config.status Makefile'.
16989if test -n "$CONFIG_HEADERS"; then
16990cat >"$tmp/defines.awk" <<\_ACAWK ||
16991BEGIN {
16992_ACEOF
16993
16994# Transform confdefs.h into an awk script `defines.awk', embedded as
16995# here-document in config.status, that substitutes the proper values into
16996# config.h.in to produce config.h.
4e8d927d 16997
81ecdfbb
RW
16998# Create a delimiter string that does not exist in confdefs.h, to ease
16999# handling of long lines.
17000ac_delim='%!_!# '
17001for ac_last_try in false false :; do
17002 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17003 if test -z "$ac_t"; then
17004 break
17005 elif $ac_last_try; then
17006 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17007 else
17008 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17009 fi
17010done
4e8d927d 17011
81ecdfbb
RW
17012# For the awk script, D is an array of macro values keyed by name,
17013# likewise P contains macro parameters if any. Preserve backslash
17014# newline sequences.
17015
17016ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17017sed -n '
17018s/.\{148\}/&'"$ac_delim"'/g
17019t rset
17020:rset
17021s/^[ ]*#[ ]*define[ ][ ]*/ /
17022t def
17023d
17024:def
17025s/\\$//
17026t bsnl
17027s/["\\]/\\&/g
17028s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17029D["\1"]=" \3"/p
17030s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17031d
17032:bsnl
17033s/["\\]/\\&/g
17034s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17035D["\1"]=" \3\\\\\\n"\\/p
17036t cont
17037s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17038t cont
17039d
17040:cont
17041n
17042s/.\{148\}/&'"$ac_delim"'/g
17043t clear
17044:clear
17045s/\\$//
17046t bsnlc
17047s/["\\]/\\&/g; s/^/"/; s/$/"/p
17048d
17049:bsnlc
17050s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17051b cont
17052' <confdefs.h | sed '
17053s/'"$ac_delim"'/"\\\
17054"/g' >>$CONFIG_STATUS || ac_write_fail=1
17055
17056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17057 for (key in D) D_is_set[key] = 1
17058 FS = "\a"
17059}
17060/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17061 line = \$ 0
17062 split(line, arg, " ")
17063 if (arg[1] == "#") {
17064 defundef = arg[2]
17065 mac1 = arg[3]
17066 } else {
17067 defundef = substr(arg[1], 2)
17068 mac1 = arg[2]
17069 }
17070 split(mac1, mac2, "(") #)
17071 macro = mac2[1]
17072 prefix = substr(line, 1, index(line, defundef) - 1)
17073 if (D_is_set[macro]) {
17074 # Preserve the white space surrounding the "#".
17075 print prefix "define", macro P[macro] D[macro]
17076 next
17077 } else {
17078 # Replace #undef with comments. This is necessary, for example,
17079 # in the case of _POSIX_SOURCE, which is predefined and required
17080 # on some systems where configure will not decide to define it.
17081 if (defundef == "undef") {
17082 print "/*", prefix defundef, macro, "*/"
17083 next
17084 }
17085 }
b4e70030 17086}
81ecdfbb
RW
17087{ print }
17088_ACAWK
b4e70030 17089_ACEOF
81ecdfbb
RW
17090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17091 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17092fi # test -n "$CONFIG_HEADERS"
4e8d927d 17093
4e8d927d 17094
81ecdfbb
RW
17095eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17096shift
17097for ac_tag
17098do
17099 case $ac_tag in
17100 :[FHLC]) ac_mode=$ac_tag; continue;;
17101 esac
17102 case $ac_mode$ac_tag in
17103 :[FHL]*:*);;
17104 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17105 :[FH]-) ac_tag=-:-;;
17106 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17107 esac
17108 ac_save_IFS=$IFS
17109 IFS=:
17110 set x $ac_tag
17111 IFS=$ac_save_IFS
17112 shift
17113 ac_file=$1
17114 shift
4e8d927d 17115
81ecdfbb
RW
17116 case $ac_mode in
17117 :L) ac_source=$1;;
17118 :[FH])
17119 ac_file_inputs=
17120 for ac_f
17121 do
17122 case $ac_f in
17123 -) ac_f="$tmp/stdin";;
17124 *) # Look for the file first in the build tree, then in the source tree
17125 # (if the path is not absolute). The absolute path cannot be DOS-style,
17126 # because $ac_f cannot contain `:'.
17127 test -f "$ac_f" ||
17128 case $ac_f in
17129 [\\/$]*) false;;
17130 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17131 esac ||
17132 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17133 esac
17134 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17135 as_fn_append ac_file_inputs " '$ac_f'"
17136 done
17137
17138 # Let's still pretend it is `configure' which instantiates (i.e., don't
17139 # use $as_me), people would be surprised to read:
17140 # /* config.h. Generated by config.status. */
17141 configure_input='Generated from '`
17142 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17143 `' by configure.'
17144 if test x"$ac_file" != x-; then
17145 configure_input="$ac_file. $configure_input"
17146 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17147$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17148 fi
81ecdfbb
RW
17149 # Neutralize special characters interpreted by sed in replacement strings.
17150 case $configure_input in #(
17151 *\&* | *\|* | *\\* )
17152 ac_sed_conf_input=`$as_echo "$configure_input" |
17153 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17154 *) ac_sed_conf_input=$configure_input;;
17155 esac
4e8d927d 17156
81ecdfbb
RW
17157 case $ac_tag in
17158 *:-:* | *:-) cat >"$tmp/stdin" \
17159 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17160 esac
17161 ;;
c906108c
SS
17162 esac
17163
81ecdfbb 17164 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17165$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17166 X"$ac_file" : 'X\(//\)[^/]' \| \
17167 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17168 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17169$as_echo X"$ac_file" |
17170 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17171 s//\1/
17172 q
17173 }
17174 /^X\(\/\/\)[^/].*/{
17175 s//\1/
17176 q
17177 }
17178 /^X\(\/\/\)$/{
17179 s//\1/
17180 q
17181 }
17182 /^X\(\/\).*/{
17183 s//\1/
17184 q
17185 }
17186 s/.*/./; q'`
17187 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17188 ac_builddir=.
17189
81ecdfbb
RW
17190case "$ac_dir" in
17191.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17192*)
17193 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17194 # A ".." for each directory in $ac_dir_suffix.
17195 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17196 case $ac_top_builddir_sub in
17197 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17198 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17199 esac ;;
17200esac
17201ac_abs_top_builddir=$ac_pwd
17202ac_abs_builddir=$ac_pwd$ac_dir_suffix
17203# for backward compatibility:
17204ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17205
17206case $srcdir in
81ecdfbb 17207 .) # We are building in place.
bec39cab 17208 ac_srcdir=.
81ecdfbb
RW
17209 ac_top_srcdir=$ac_top_builddir_sub
17210 ac_abs_top_srcdir=$ac_pwd ;;
17211 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17212 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17213 ac_top_srcdir=$srcdir
17214 ac_abs_top_srcdir=$srcdir ;;
17215 *) # Relative name.
17216 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17217 ac_top_srcdir=$ac_top_build_prefix$srcdir
17218 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17219esac
81ecdfbb 17220ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17221
c906108c 17222
81ecdfbb
RW
17223 case $ac_mode in
17224 :F)
17225 #
17226 # CONFIG_FILE
17227 #
c906108c 17228
bec39cab
AC
17229 case $INSTALL in
17230 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17231 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17232 esac
81ecdfbb
RW
17233 ac_MKDIR_P=$MKDIR_P
17234 case $MKDIR_P in
17235 [\\/$]* | ?:[\\/]* ) ;;
17236 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17237 esac
17238_ACEOF
121ce6e5 17239
81ecdfbb
RW
17240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17241# If the template does not know about datarootdir, expand it.
17242# FIXME: This hack should be removed a few years after 2.60.
17243ac_datarootdir_hack=; ac_datarootdir_seen=
17244ac_sed_dataroot='
17245/datarootdir/ {
17246 p
17247 q
17248}
17249/@datadir@/p
17250/@docdir@/p
17251/@infodir@/p
17252/@localedir@/p
17253/@mandir@/p'
17254case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17255*datarootdir*) ac_datarootdir_seen=yes;;
17256*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17258$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17259_ACEOF
17260cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17261 ac_datarootdir_hack='
17262 s&@datadir@&$datadir&g
17263 s&@docdir@&$docdir&g
17264 s&@infodir@&$infodir&g
17265 s&@localedir@&$localedir&g
17266 s&@mandir@&$mandir&g
17267 s&\\\${datarootdir}&$datarootdir&g' ;;
17268esac
4e8d927d 17269_ACEOF
81ecdfbb
RW
17270
17271# Neutralize VPATH when `$srcdir' = `.'.
17272# Shell code in configure.ac might set extrasub.
17273# FIXME: do we really want to maintain this feature?
17274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17275ac_sed_extra="$ac_vpsub
bec39cab
AC
17276$extrasub
17277_ACEOF
81ecdfbb 17278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17279:t
17280/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17281s|@configure_input@|$ac_sed_conf_input|;t t
17282s&@top_builddir@&$ac_top_builddir_sub&;t t
17283s&@top_build_prefix@&$ac_top_build_prefix&;t t
17284s&@srcdir@&$ac_srcdir&;t t
17285s&@abs_srcdir@&$ac_abs_srcdir&;t t
17286s&@top_srcdir@&$ac_top_srcdir&;t t
17287s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17288s&@builddir@&$ac_builddir&;t t
17289s&@abs_builddir@&$ac_abs_builddir&;t t
17290s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17291s&@INSTALL@&$ac_INSTALL&;t t
17292s&@MKDIR_P@&$ac_MKDIR_P&;t t
17293$ac_datarootdir_hack
17294"
17295eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17296if $ac_cs_awk_getline; then
17297 $AWK -f "$tmp/subs.awk"
17298else
17299 $AWK -f "$tmp/subs.awk" | $SHELL
17300fi >$tmp/out \
17301 || as_fn_error "could not create $ac_file" "$LINENO" 5
17302
17303test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17304 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17305 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17307which seems to be undefined. Please make sure it is defined." >&5
17308$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17309which seems to be undefined. Please make sure it is defined." >&2;}
17310
17311 rm -f "$tmp/stdin"
bec39cab 17312 case $ac_file in
81ecdfbb
RW
17313 -) cat "$tmp/out" && rm -f "$tmp/out";;
17314 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17315 esac \
17316 || as_fn_error "could not create $ac_file" "$LINENO" 5
17317 ;;
17318 :H)
17319 #
17320 # CONFIG_HEADER
17321 #
bec39cab 17322 if test x"$ac_file" != x-; then
81ecdfbb
RW
17323 {
17324 $as_echo "/* $configure_input */" \
17325 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17326 } >"$tmp/config.h" \
17327 || as_fn_error "could not create $ac_file" "$LINENO" 5
17328 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17329 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17330$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17331 else
81ecdfbb
RW
17332 rm -f "$ac_file"
17333 mv "$tmp/config.h" "$ac_file" \
17334 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17335 fi
17336 else
81ecdfbb
RW
17337 $as_echo "/* $configure_input */" \
17338 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17339 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17340 fi
81ecdfbb
RW
17341# Compute "$ac_file"'s index in $config_headers.
17342_am_arg="$ac_file"
e28b3332
DJ
17343_am_stamp_count=1
17344for _am_header in $config_headers :; do
17345 case $_am_header in
81ecdfbb 17346 $_am_arg | $_am_arg:* )
e28b3332
DJ
17347 break ;;
17348 * )
17349 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17350 esac
17351done
81ecdfbb
RW
17352echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17353$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17354 X"$_am_arg" : 'X\(//\)[^/]' \| \
17355 X"$_am_arg" : 'X\(//\)$' \| \
17356 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17357$as_echo X"$_am_arg" |
17358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17359 s//\1/
17360 q
17361 }
17362 /^X\(\/\/\)[^/].*/{
17363 s//\1/
17364 q
17365 }
17366 /^X\(\/\/\)$/{
17367 s//\1/
17368 q
17369 }
17370 /^X\(\/\).*/{
17371 s//\1/
17372 q
17373 }
17374 s/.*/./; q'`/stamp-h$_am_stamp_count
17375 ;;
17376 :L)
17377 #
17378 # CONFIG_LINK
17379 #
c906108c 17380
81ecdfbb
RW
17381 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17382 :
b4e70030 17383 else
81ecdfbb
RW
17384 # Prefer the file from the source tree if names are identical.
17385 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17386 ac_source=$srcdir/$ac_source
17387 fi
b4e70030 17388
81ecdfbb
RW
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17390$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17391
81ecdfbb
RW
17392 if test ! -r "$ac_source"; then
17393 as_fn_error "$ac_source: file not found" "$LINENO" 5
17394 fi
17395 rm -f "$ac_file"
bec39cab 17396
81ecdfbb
RW
17397 # Try a relative symlink, then a hard link, then a copy.
17398 case $srcdir in
17399 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17400 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17401 esac
17402 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17403 ln "$ac_source" "$ac_file" 2>/dev/null ||
17404 cp -p "$ac_source" "$ac_file" ||
17405 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17406 fi
17407 ;;
17408 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17409$as_echo "$as_me: executing $ac_file commands" >&6;}
17410 ;;
c906108c 17411 esac
b4e70030 17412
bec39cab 17413
81ecdfbb
RW
17414 case $ac_file$ac_mode in
17415 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17416 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17417 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17418 # are listed without --file. Let's play safe and only enable the eval
17419 # if we detect the quoting.
17420 case $CONFIG_FILES in
17421 *\'*) eval set x "$CONFIG_FILES" ;;
17422 *) set x $CONFIG_FILES ;;
17423 esac
17424 shift
17425 for mf
17426 do
17427 # Strip MF so we end up with the name of the file.
17428 mf=`echo "$mf" | sed -e 's/:.*$//'`
17429 # Check whether this is an Automake generated Makefile or not.
17430 # We used to match only the files named `Makefile.in', but
17431 # some people rename them; so instead we look at the file content.
17432 # Grep'ing the first line is not enough: some people post-process
17433 # each Makefile.in and add a new line on top of each file to say so.
17434 # Grep'ing the whole file is not good either: AIX grep has a line
17435 # limit of 2048, but all sed's we know have understand at least 4000.
17436 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17437 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17438$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17439 X"$mf" : 'X\(//\)[^/]' \| \
17440 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17441 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17442$as_echo X"$mf" |
17443 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17444 s//\1/
17445 q
17446 }
17447 /^X\(\/\/\)[^/].*/{
17448 s//\1/
17449 q
17450 }
17451 /^X\(\/\/\)$/{
17452 s//\1/
17453 q
17454 }
17455 /^X\(\/\).*/{
17456 s//\1/
17457 q
17458 }
17459 s/.*/./; q'`
17460 else
17461 continue
17462 fi
17463 # Extract the definition of DEPDIR, am__include, and am__quote
17464 # from the Makefile without running `make'.
17465 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17466 test -z "$DEPDIR" && continue
17467 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17468 test -z "am__include" && continue
17469 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17470 # When using ansi2knr, U may be empty or an underscore; expand it
17471 U=`sed -n 's/^U = //p' < "$mf"`
17472 # Find all dependency output files, they are included files with
17473 # $(DEPDIR) in their names. We invoke sed twice because it is the
17474 # simplest approach to changing $(DEPDIR) to its actual value in the
17475 # expansion.
17476 for file in `sed -n "
17477 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17478 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17479 # Make sure the directory exists.
17480 test -f "$dirpart/$file" && continue
17481 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17482$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17483 X"$file" : 'X\(//\)[^/]' \| \
17484 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17485 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17486$as_echo X"$file" |
17487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17488 s//\1/
17489 q
17490 }
17491 /^X\(\/\/\)[^/].*/{
17492 s//\1/
17493 q
17494 }
17495 /^X\(\/\/\)$/{
17496 s//\1/
17497 q
17498 }
17499 /^X\(\/\).*/{
17500 s//\1/
17501 q
17502 }
17503 s/.*/./; q'`
17504 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17505 # echo "creating $dirpart/$file"
17506 echo '# dummy' > "$dirpart/$file"
e28b3332 17507 done
e28b3332 17508 done
81ecdfbb 17509}
4e8d927d 17510 ;;
81ecdfbb 17511 "default":C)
c906108c
SS
17512case x$CONFIG_HEADERS in
17513xconfig.h:config.in)
17514echo > stamp-h ;;
17515esac
bec39cab 17516 ;;
81ecdfbb 17517
bec39cab 17518 esac
81ecdfbb 17519done # for ac_tag
c906108c 17520
bec39cab 17521
81ecdfbb 17522as_fn_exit 0
bec39cab 17523_ACEOF
bec39cab
AC
17524ac_clean_files=$ac_clean_files_save
17525
81ecdfbb
RW
17526test $ac_write_fail = 0 ||
17527 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17528
bec39cab
AC
17529
17530# configure is writing to config.log, and then calls config.status.
17531# config.status does its own redirection, appending to config.log.
17532# Unfortunately, on DOS this fails, as config.log is still kept open
17533# by configure, so config.status won't be able to write to it; its
17534# output is simply discarded. So we exec the FD to /dev/null,
17535# effectively closing config.log, so it can be properly (re)opened and
17536# appended to by config.status. When coming back to configure, we
17537# need to make the FD available again.
17538if test "$no_create" != yes; then
17539 ac_cs_success=:
17540 ac_config_status_args=
17541 test "$silent" = yes &&
17542 ac_config_status_args="$ac_config_status_args --quiet"
17543 exec 5>/dev/null
17544 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17545 exec 5>>config.log
17546 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17547 # would make configure fail if this is the last instruction.
81ecdfbb 17548 $ac_cs_success || as_fn_exit $?
bec39cab 17549fi
c906108c 17550
bec39cab 17551#
81ecdfbb 17552# CONFIG_SUBDIRS section.
bec39cab 17553#
c906108c
SS
17554if test "$no_recursion" != yes; then
17555
81ecdfbb
RW
17556 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17557 # so they do not pile up.
c906108c
SS
17558 ac_sub_configure_args=
17559 ac_prev=
fdc59709
PB
17560 eval "set x $ac_configure_args"
17561 shift
17562 for ac_arg
17563 do
c906108c
SS
17564 if test -n "$ac_prev"; then
17565 ac_prev=
17566 continue
17567 fi
bec39cab 17568 case $ac_arg in
c906108c
SS
17569 -cache-file | --cache-file | --cache-fil | --cache-fi \
17570 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17571 ac_prev=cache_file ;;
17572 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17573 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17574 | --c=*)
17575 ;;
17576 --config-cache | -C)
c906108c
SS
17577 ;;
17578 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17579 ac_prev=srcdir ;;
17580 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17581 ;;
bec39cab
AC
17582 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17583 ac_prev=prefix ;;
17584 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17585 ;;
81ecdfbb
RW
17586 --disable-option-checking)
17587 ;;
fdc59709
PB
17588 *)
17589 case $ac_arg in
81ecdfbb 17590 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17591 esac
81ecdfbb 17592 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17593 esac
17594 done
17595
bec39cab
AC
17596 # Always prepend --prefix to ensure using the same prefix
17597 # in subdir configurations.
fdc59709
PB
17598 ac_arg="--prefix=$prefix"
17599 case $ac_arg in
81ecdfbb 17600 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17601 esac
81ecdfbb
RW
17602 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17603
17604 # Pass --silent
17605 if test "$silent" = yes; then
17606 ac_sub_configure_args="--silent $ac_sub_configure_args"
17607 fi
17608
17609 # Always prepend --disable-option-checking to silence warnings, since
17610 # different subdirs can have different --enable and --with options.
17611 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17612
b4e70030 17613 ac_popdir=`pwd`
bec39cab 17614 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17615
17616 # Do not complain, so a configure script can configure whichever
17617 # parts of a large source tree are present.
fdc59709 17618 test -d "$srcdir/$ac_dir" || continue
c906108c 17619
81ecdfbb
RW
17620 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17621 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17622 $as_echo "$ac_msg" >&6
17623 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17624 ac_builddir=.
17625
81ecdfbb
RW
17626case "$ac_dir" in
17627.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17628*)
17629 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17630 # A ".." for each directory in $ac_dir_suffix.
17631 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17632 case $ac_top_builddir_sub in
17633 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17634 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17635 esac ;;
17636esac
17637ac_abs_top_builddir=$ac_pwd
17638ac_abs_builddir=$ac_pwd$ac_dir_suffix
17639# for backward compatibility:
17640ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17641
17642case $srcdir in
81ecdfbb 17643 .) # We are building in place.
bec39cab 17644 ac_srcdir=.
81ecdfbb
RW
17645 ac_top_srcdir=$ac_top_builddir_sub
17646 ac_abs_top_srcdir=$ac_pwd ;;
17647 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17648 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17649 ac_top_srcdir=$srcdir
17650 ac_abs_top_srcdir=$srcdir ;;
17651 *) # Relative name.
17652 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17653 ac_top_srcdir=$ac_top_build_prefix$srcdir
17654 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17655esac
81ecdfbb 17656ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17657
c906108c 17658
fdc59709 17659 cd "$ac_dir"
c906108c
SS
17660
17661 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17662 if test -f "$ac_srcdir/configure.gnu"; then
17663 ac_sub_configure=$ac_srcdir/configure.gnu
17664 elif test -f "$ac_srcdir/configure"; then
17665 ac_sub_configure=$ac_srcdir/configure
17666 elif test -f "$ac_srcdir/configure.in"; then
17667 # This should be Cygnus configure.
17668 ac_sub_configure=$ac_aux_dir/configure
c906108c 17669 else
81ecdfbb
RW
17670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17671$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17672 ac_sub_configure=
17673 fi
17674
17675 # The recursion is here.
17676 if test -n "$ac_sub_configure"; then
c906108c 17677 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17678 case $cache_file in
17679 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17680 *) # Relative name.
17681 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17682 esac
c906108c 17683
81ecdfbb
RW
17684 { $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
17685$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17686 # The eval makes quoting arguments work.
fdc59709
PB
17687 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17688 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17689 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17690 fi
17691
fdc59709 17692 cd "$ac_popdir"
c906108c
SS
17693 done
17694fi
81ecdfbb
RW
17695if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17697$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17698fi
c906108c
SS
17699
17700
17701exit 0
This page took 2.158279 seconds and 4 git commands to generate.